⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282502 in webkit


Ignore:
Timestamp:
Sep 16, 2021, 1:12:36 AM (5 years ago)
Author:
Adrian Perez de Castro
Message:

Merge r275938 - Do not reset computed style for element children with display contents style
​https://bugs.webkit.org/show_bug.cgi?id=223794

Patch by Carlos Garcia Campos <​cgarcia@igalia.com> on 2021-04-14
Reviewed by Antti Koivisto.

We were checking hasDisplayContents() was false before calling resetComputedStyle() on the parent, but we don't
check it when iterating the children.

  • dom/Element.cpp:

(WebCore::Element::resetComputedStyle):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveComposedTree):

Location:
releases/WebKitGTK/webkit-2.32/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog

    r282501 r282502  
     12021-04-14  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Do not reset computed style for element children with display contents style
     4        https://bugs.webkit.org/show_bug.cgi?id=223794
     5
     6        Reviewed by Antti Koivisto.
     7
     8        We were checking hasDisplayContents() was false before calling resetComputedStyle() on the parent, but we don't
     9        check it when iterating the children.
     10
     11        * dom/Element.cpp:
     12        (WebCore::Element::resetComputedStyle):
     13        * style/StyleTreeResolver.cpp:
     14        (WebCore::Style::TreeResolver::resolveComposedTree):
     15
    1162021-04-13  Rob Buis  <rbuis@igalia.com>
    217
  • releases/WebKitGTK/webkit-2.32/Source/WebCore/dom/Element.cpp

    r282501 r282502  
    42184218
    42194219    auto reset = [](Element& element) {
    4220         if (!element.hasRareData() || !element.elementRareData()->computedStyle())
    4221             return;
    42224220        if (element.hasCustomStyleResolveCallbacks())
    42234221            element.willResetComputedStyle();
    … …  
    42254223    };
    42264224    reset(*this);
    4227     for (auto& child : descendantsOfType<Element>(*this))
     4225    for (auto& child : descendantsOfType<Element>(*this)) {
     4226        if (!child.hasRareData() || !child.elementRareData()->computedStyle() || child.hasDisplayContents())
     4227            continue;
    42284228        reset(child);
     4229    }
    42294230}
    42304231
Note: See TracChangeset for help on using the changeset viewer.