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

Changeset 275938 in webkit


Ignore:
Timestamp:
Apr 14, 2021, 2:42:27 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

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:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275935 r275938  
     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
  • trunk/Source/WebCore/dom/Element.cpp

    r275935 r275938  
    42424242
    42434243    auto reset = [](Element& element) {
    4244         if (!element.hasRareData() || !element.elementRareData()->computedStyle())
    4245             return;
    42464244        if (element.hasCustomStyleResolveCallbacks())
    42474245            element.willResetComputedStyle();
    … …  
    42494247    };
    42504248    reset(*this);
    4251     for (auto& child : descendantsOfType<Element>(*this))
     4249    for (auto& child : descendantsOfType<Element>(*this)) {
     4250        if (!child.hasRareData() || !child.elementRareData()->computedStyle() || child.hasDisplayContents())
     4251            continue;
    42524252        reset(child);
     4253    }
    42534254}
    42544255
Note: See TracChangeset for help on using the changeset viewer.