Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2613213002: Support Style Sharing for Shadow DOM V1 (Closed)
Patch Set: update Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/SharedStyleFinderTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * (C) 2007 Eric Seidel (eric@webkit.org) 9 * (C) 2007 Eric Seidel (eric@webkit.org)
10 * 10 *
(...skipping 4029 matching lines...) Expand 10 before | Expand all | Expand 10 after
4040 // and no siblings or cousins will have the same state. There's also only one 4040 // and no siblings or cousins will have the same state. There's also only one
4041 // :focus element per scope so we don't need to attempt to share. 4041 // :focus element per scope so we don't need to attempt to share.
4042 if (isUserActionElement()) 4042 if (isUserActionElement())
4043 return false; 4043 return false;
4044 if (!parentOrShadowHostElement()->childrenSupportStyleSharing()) 4044 if (!parentOrShadowHostElement()->childrenSupportStyleSharing())
4045 return false; 4045 return false;
4046 if (this == document().cssTarget()) 4046 if (this == document().cssTarget())
4047 return false; 4047 return false;
4048 if (isHTMLElement() && toHTMLElement(this)->hasDirectionAuto()) 4048 if (isHTMLElement() && toHTMLElement(this)->hasDirectionAuto())
4049 return false; 4049 return false;
4050 // TODO(kochi): This prevents any slotted elements from sharing styles.
4051 // Investigate cases where we share styles to optimize styling performance.
4052 if (isChildOfV1ShadowHost())
4053 return false;
4054 if (hasAnimations()) 4050 if (hasAnimations())
4055 return false; 4051 return false;
4056 if (Fullscreen::isFullscreenElement(*this)) 4052 if (Fullscreen::isFullscreenElement(*this))
4057 return false; 4053 return false;
4058 return true; 4054 return true;
4059 } 4055 }
4060 4056
4061 void Element::logAddElementIfIsolatedWorldAndInDocument( 4057 void Element::logAddElementIfIsolatedWorldAndInDocument(
4062 const char element[], 4058 const char element[],
4063 const QualifiedName& attr1) { 4059 const QualifiedName& attr1) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
4134 } 4130 }
4135 4131
4136 DEFINE_TRACE_WRAPPERS(Element) { 4132 DEFINE_TRACE_WRAPPERS(Element) {
4137 if (hasRareData()) { 4133 if (hasRareData()) {
4138 visitor->traceWrappers(elementRareData()); 4134 visitor->traceWrappers(elementRareData());
4139 } 4135 }
4140 ContainerNode::traceWrappers(visitor); 4136 ContainerNode::traceWrappers(visitor);
4141 } 4137 }
4142 4138
4143 } // namespace blink 4139 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/SharedStyleFinderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698