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

Unified Diff: Source/core/css/resolver/SharedStyleFinder.cpp

Issue 150273003: Don't allow style sharing between top layer and non-top layer elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/HTMLDialogElement/dont-share-style-to-top-layer-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/SharedStyleFinder.cpp
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp
index a82521d270e3f05fa027289ca10e4e4480cb92df..9ee0d9b1e070fe09dd19049b1603c41a9797d5bb 100644
--- a/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -209,6 +209,8 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const
return false;
if (candidate.shadow() && candidate.shadow()->containsActiveStyles() && !sharingCandidateShadowHasSharedStyleSheetContents(candidate))
return false;
+ if (candidate.isInTopLayer() != element().isInTopLayer())
+ return false;
bool isControl = candidate.isFormControlElement();
« no previous file with comments | « LayoutTests/fast/dom/HTMLDialogElement/dont-share-style-to-top-layer-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698