Changeset 255340 in webkit


Ignore:
Timestamp:
Jan 29, 2020 12:04:56 AM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Nullptr crash when setting custom properties on detached style
https://bugs.webkit.org/show_bug.cgi?id=206724

Patch by Sunny He <sunny_he@apple.com> on 2020-01-29
Reviewed by Darin Adler.

Source/WebCore:

Test: fast/dom/StyleSheet/detached-style-set-custom-property.html

  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::StyleRuleCSSStyleDeclaration::clearParentRule):
(WebCore::InlineCSSStyleDeclaration::clearParentElement):

LayoutTests:

  • fast/dom/StyleSheet/detached-style-set-custom-property-expected.txt: Added.
  • fast/dom/StyleSheet/detached-style-set-custom-property.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r255334 r255340  
     12020-01-29  Sunny He  <sunny_he@apple.com>
     2
     3        Nullptr crash when setting custom properties on detached style
     4        https://bugs.webkit.org/show_bug.cgi?id=206724
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/dom/StyleSheet/detached-style-set-custom-property-expected.txt: Added.
     9        * fast/dom/StyleSheet/detached-style-set-custom-property.html: Added.
     10
    1112020-01-28  Pinki Gyanchandani  <pgyanchandani@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r255338 r255340  
     12020-01-29  Sunny He  <sunny_he@apple.com>
     2
     3        Nullptr crash when setting custom properties on detached style
     4        https://bugs.webkit.org/show_bug.cgi?id=206724
     5
     6        Reviewed by Darin Adler.
     7
     8        Test: fast/dom/StyleSheet/detached-style-set-custom-property.html
     9
     10        * css/PropertySetCSSStyleDeclaration.cpp:
     11        (WebCore::PropertySetCSSStyleDeclaration::setProperty):
     12        (WebCore::StyleRuleCSSStyleDeclaration::clearParentRule):
     13        (WebCore::InlineCSSStyleDeclaration::clearParentElement):
     14
    1152020-01-28  Said Abou-Hallawa  <said@apple.com>
    216
  • trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp

    r251655 r255340  
    253253        if (parentElement())
    254254            document = &parentElement()->document();
    255         else
     255        else if (parentStyleSheet())
    256256            document = parentStyleSheet()->ownerDocument();
    257257
Note: See TracChangeset for help on using the changeset viewer.