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

Changeset 144031 in webkit


Ignore:
Timestamp:
Feb 26, 2013, 2:51:58 AM (14 years ago)
Author:
tasak@google.com
Message:

Shadow DOM styles appear to be over-eagerly shared
https://bugs.webkit.org/show_bug.cgi?id=110797

Reviewed by Dimitri Glazkov.

Source/WebCore:

A style of a distributed node should not be shared, because the node
might be affected by styles in a shadow dom tree, i.e. :distributed
or something.

Test: fast/dom/shadow/no-style-sharing-with-distributed-nodes.html

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::locateCousinList):
Skip shadow hosts, because children of shadow hosts are distributed
nodes and cannot share their styles.

LayoutTests:

  • fast/dom/shadow/no-style-sharing-with-distributed-nodes-expected.html: Added.
  • fast/dom/shadow/no-style-sharing-with-distributed-nodes.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r144029 r144031  
     12013-02-26  Takashi Sakamoto  <tasak@google.com>
     2
     3        Shadow DOM styles appear to be over-eagerly shared
     4        https://bugs.webkit.org/show_bug.cgi?id=110797
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        * fast/dom/shadow/no-style-sharing-with-distributed-nodes-expected.html: Added.
     9        * fast/dom/shadow/no-style-sharing-with-distributed-nodes.html: Added.
     10
    1112013-02-26  Ádám Kallai  <kadam@inf.u-szeged.hu>
    212
  • trunk/Source/WebCore/ChangeLog

    r144030 r144031  
     12013-02-26  Takashi Sakamoto  <tasak@google.com>
     2
     3        Shadow DOM styles appear to be over-eagerly shared
     4        https://bugs.webkit.org/show_bug.cgi?id=110797
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        A style of a distributed node should not be shared, because the node
     9        might be affected by styles in a shadow dom tree, i.e. :distributed
     10        or something.
     11
     12        Test: fast/dom/shadow/no-style-sharing-with-distributed-nodes.html
     13
     14        * css/StyleResolver.cpp:
     15        (WebCore::StyleResolver::locateCousinList):
     16        Skip shadow hosts, because children of shadow hosts are distributed
     17        nodes and cannot share their styles.
     18
    1192013-02-26  Adam Klein  <adamk@chromium.org>
    220
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r143941 r144031  
    876876            ++subcount;
    877877            if (currentNode->renderStyle() == parentStyle && currentNode->lastChild()
    878                 && currentNode->isElementNode() && !parentElementPreventsSharing(toElement(currentNode))) {
     878                && currentNode->isElementNode() && !parentElementPreventsSharing(toElement(currentNode))
     879#if ENABLE(SHADOW_DOM)
     880                && !toElement(currentNode)->shadow()
     881#endif
     882                ) {
    879883                // Adjust for unused reserved tries.
    880884                visitedNodeCount -= cStyleSearchThreshold - subcount;
Note: See TracChangeset for help on using the changeset viewer.