Changeset 256764 in webkit


Ignore:
Timestamp:
Feb 17, 2020 1:13:03 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Null Ptr Deref @ WebCore::Node::Treescope
https://bugs.webkit.org/show_bug.cgi?id=207748

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-02-17
Reviewed by Darin Adler.

Source/WebCore:

Added a check for isTextField after updateLayoutIgnorePendingStylesheets as that could cause modification of input element type.

Test: editing/selection/ignore-selection-range-on-input-style-change.html

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange):

LayoutTests:

Added a regression test provided by Ryosuke Niwa to verify the fix.

  • editing/selection/ignore-selection-range-on-input-style-change-expected.txt: Added.
  • editing/selection/ignore-selection-range-on-input-style-change.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r256763 r256764  
     12020-02-17  Pinki Gyanchandani  <pgyanchandani@apple.com>
     2
     3        Null Ptr Deref @ WebCore::Node::Treescope
     4        https://bugs.webkit.org/show_bug.cgi?id=207748
     5
     6        Reviewed by Darin Adler.
     7
     8        Added a regression test provided by Ryosuke Niwa to verify the fix.
     9
     10        * editing/selection/ignore-selection-range-on-input-style-change-expected.txt: Added.
     11        * editing/selection/ignore-selection-range-on-input-style-change.html: Added.
     12
    1132020-02-17  Zalan Bujtas  <zalan@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r256762 r256764  
     12020-02-17  Pinki Gyanchandani  <pgyanchandani@apple.com>
     2
     3        Null Ptr Deref @ WebCore::Node::Treescope
     4        https://bugs.webkit.org/show_bug.cgi?id=207748
     5
     6        Reviewed by Darin Adler.
     7
     8        Added a check for isTextField after updateLayoutIgnorePendingStylesheets as that could cause modification of input element type.
     9
     10        Test: editing/selection/ignore-selection-range-on-input-style-change.html
     11
     12        * html/HTMLTextFormControlElement.cpp:
     13        (WebCore::HTMLTextFormControlElement::setSelectionRange):
     14
    1152020-02-17  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebCore/html/HTMLTextFormControlElement.cpp

    r256563 r256764  
    304304        // FIXME: Removing this synchronous layout requires fixing setSelectionWithoutUpdatingAppearance not needing up-to-date style.
    305305        document().updateLayoutIgnorePendingStylesheets();
     306       
     307        if (!isTextField())
     308            return;
    306309
    307310        // Double-check the state of innerTextElement after the layout.
Note: See TracChangeset for help on using the changeset viewer.