Bug 207748 - Null Ptr Deref @ WebCore::Node::Treescope
Summary: Null Ptr Deref @ WebCore::Node::Treescope
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 208306 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-14 00:01 PST by Pinki Gyanchandani
Modified: 2020-02-27 17:29 PST (History)
11 users (show)

See Also:


Attachments
Patch (4.04 KB, patch)
2020-02-14 00:32 PST, Pinki Gyanchandani
no flags Details | Formatted Diff | Diff
Patch (4.41 KB, patch)
2020-02-14 13:52 PST, Pinki Gyanchandani
no flags Details | Formatted Diff | Diff
Patch (4.10 KB, patch)
2020-02-17 11:40 PST, Pinki Gyanchandani
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pinki Gyanchandani 2020-02-14 00:01:42 PST
Null Ptr Deref @ WebCore::Node::Treescope
Comment 1 Pinki Gyanchandani 2020-02-14 00:32:06 PST
Created attachment 390735 [details]
Patch
Comment 2 Ryosuke Niwa 2020-02-14 00:50:34 PST
Comment on attachment 390735 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390735&action=review

r- due to the issues listed below.

> Source/WebCore/ChangeLog:6
> +        Reviewed by Ryosuke Niwa. 

This is definitely not reviewed by me yet. Please undo this and say NOBODY (OOPS!).

> Source/WebCore/html/HTMLTextFormControlElement.cpp:307
> +        if (!isTextField())
> +            return;

Let's check this before getting innerText. It's weird to try to update innerText if it's not a text field

> LayoutTests/ChangeLog:6
> +        Reviewed by Ryosuke Niwa NOBODY.

Ditto. This is definitely not reviewed by me.

In fact, since I wrote this case, it's not appropriate for me to review this test.

> LayoutTests/ChangeLog:8
> +        Added a regression test to verify the fix

Missing a period at the end. Also, we need to give the test author (me in this case) a credit in this case.
Say something like: "Added a regression test to verify the fix based on a test case written by Ryosuke Niwa".

> LayoutTests/editing/selection/ignore-selection-range-on-input-style-change.html:1
> +<html>

Missing <!DOCTYPE html>.

> LayoutTests/editing/selection/ignore-selection-range-on-input-style-change.html:11
> +    const input3 = document.createElement('input');

Please rename this to inputWithAutofocus or something.

> LayoutTests/editing/selection/ignore-selection-range-on-input-style-change.html:22
> +

Please remove this blank lines.

> LayoutTests/editing/selection/ignore-selection-range-on-input-style-change.html:24
> +<p>Testcase passes if there is no crash </p>

"Testcase" should be "test case" but I think we should just say "This test".

> LayoutTests/editing/selection/ignore-selection-range-on-input-style-change.html:25
> +

Ditto.
Comment 3 Pinki Gyanchandani 2020-02-14 13:52:14 PST
Created attachment 390810 [details]
Patch
Comment 4 Darin Adler 2020-02-16 16:17:39 PST
Comment on attachment 390810 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=390810&action=review

> Source/WebCore/html/HTMLTextFormControlElement.cpp:308
> +    

Should not make this white space change.
Comment 5 Pinki Gyanchandani 2020-02-17 11:40:49 PST
Created attachment 390950 [details]
Patch
Comment 6 WebKit Commit Bot 2020-02-17 13:13:08 PST
Comment on attachment 390950 [details]
Patch

Clearing flags on attachment: 390950

Committed r256764: <https://trac.webkit.org/changeset/256764>
Comment 7 WebKit Commit Bot 2020-02-17 13:13:10 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Ryosuke Niwa 2020-02-17 13:36:30 PST
<rdar://problem/58923336>
Comment 9 Ryosuke Niwa 2020-02-27 17:29:19 PST
*** Bug 208306 has been marked as a duplicate of this bug. ***