Changeset 241018 in webkit


Ignore:
Timestamp:
Feb 6, 2019 7:44:28 AM (5 years ago)
Author:
Antti Koivisto
Message:

RELEASE_ASSERT(!m_document.isResolvingTreeStyle()) in com.apple.WebKit.WebContent at WebCore: WebCore::StyleResolver::~StyleResolver
https://bugs.webkit.org/show_bug.cgi?id=194333
<rdar://problem/47822929>

Reviewed by Zalan Bujtas.

Source/WebCore:

Content extensions may mutate the extension stylesheet in the middle of a style resolution as a result of
the legacy animation code triggering a resource load.

Test: http/tests/contentextensions/css-display-none-keyframe.html

  • style/StyleScope.cpp:

(WebCore::Style::Scope::scheduleUpdate):

Avoid clearing the style resolver if we are in the middle of a style resolution.
A better fix that avoid doing this in the first place is tracked by https://bugs.webkit.org/show_bug.cgi?id=194335.

LayoutTests:

  • http/tests/contentextensions/css-display-none-keyframe-expected.txt: Added.
  • http/tests/contentextensions/css-display-none-keyframe.html: Added.
  • http/tests/contentextensions/css-display-none-keyframe.html.json: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r241015 r241018  
     12019-02-06  Antti Koivisto  <antti@apple.com>
     2
     3        RELEASE_ASSERT(!m_document.isResolvingTreeStyle()) in com.apple.WebKit.WebContent at WebCore: WebCore::StyleResolver::~StyleResolver
     4        https://bugs.webkit.org/show_bug.cgi?id=194333
     5        <rdar://problem/47822929>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * http/tests/contentextensions/css-display-none-keyframe-expected.txt: Added.
     10        * http/tests/contentextensions/css-display-none-keyframe.html: Added.
     11        * http/tests/contentextensions/css-display-none-keyframe.html.json: Added.
     12
    1132019-02-05  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r241017 r241018  
     12019-02-06  Antti Koivisto  <antti@apple.com>
     2
     3        RELEASE_ASSERT(!m_document.isResolvingTreeStyle()) in com.apple.WebKit.WebContent at WebCore: WebCore::StyleResolver::~StyleResolver
     4        https://bugs.webkit.org/show_bug.cgi?id=194333
     5        <rdar://problem/47822929>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Content extensions may mutate the extension stylesheet in the middle of a style resolution as a result of
     10        the legacy animation code triggering a resource load.
     11
     12        Test: http/tests/contentextensions/css-display-none-keyframe.html
     13
     14        * style/StyleScope.cpp:
     15        (WebCore::Style::Scope::scheduleUpdate):
     16
     17        Avoid clearing the style resolver if we are in the middle of a style resolution.
     18        A better fix that avoid doing this in the first place is tracked by https://bugs.webkit.org/show_bug.cgi?id=194335.
     19
    1202019-02-06  Pablo Saavedra  <psaavedra@igalia.com>
    221
  • trunk/Source/WebCore/style/StyleScope.cpp

    r239057 r241018  
    603603        if (m_shadowRoot && m_resolver)
    604604            invalidateHostAndSlottedStyleIfNeeded(*m_shadowRoot, *m_resolver);
     605        // FIXME: Animation code may trigger resource load in middle of style recalc and that can add a rule to a content extension stylesheet.
     606        //        Fix and remove isResolvingTreeStyle() test below, see https://bugs.webkit.org/show_bug.cgi?id=194335
    605607        // FIXME: The m_isUpdatingStyleResolver test is here because extension stylesheets can get us here from StyleResolver::appendAuthorStyleSheets.
    606         if (!m_isUpdatingStyleResolver)
     608        if (!m_isUpdatingStyleResolver && !m_document.isResolvingTreeStyle())
    607609            clearResolver();
    608610    }
Note: See TracChangeset for help on using the changeset viewer.