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

Unified Diff: Source/core/dom/Element.cpp

Issue 15027005: [CSS Regions] Elements in a region should be assignable to a named flow (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 856e7406d41552206a98dc8234200660b012162f..cd0e1ee41dd0208e1a50145c38eae846892dfcb8 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -2557,6 +2557,30 @@ RenderRegion* Element::renderRegion() const
return 0;
}
+bool Element::moveToFlowThreadIsNeeded(RefPtr<RenderStyle>& cachedStyle)
Julien - ping for review 2013/05/09 15:30:18 I don't see a good reason why this isn't const as
Mihai Maerean 2013/05/09 16:25:55 styleForRenderer not being const (as you might exp
+{
+ Document* doc = document();
+
+ if (!RuntimeEnabledFeatures::cssRegionsEnabled())
+ return false;
+
+ if (doc->webkitIsFullScreen() && doc->webkitCurrentFullScreenElement() == this)
+ return false;
+
+ if (isInShadowTree())
+ return false;
+
+ if (!cachedStyle)
+ cachedStyle = styleForRenderer();
Julien - ping for review 2013/05/09 15:30:18 It smells very bad to have this function fill the
Mihai Maerean 2013/05/09 16:25:55 Calling styleForRenderer is very slow, so caching
Julien - ping for review 2013/05/10 00:13:05 You are missing the point. That we do need to cach
+ if (!cachedStyle)
+ return false;
+
+ if (cachedStyle->flowThread().isEmpty())
+ return false;
+
+ return !document()->renderView()->flowThreadController()->isContentNodeRegisteredWithAnyNamedFlow(this);
Julien - ping for review 2013/05/09 15:30:18 Is it possible for the document not to be attached
Mihai Maerean 2013/05/09 16:25:55 I don't know. How can we tell? moveToFlowThreadIsN
+}
+
const AtomicString& Element::webkitRegionOverset() const
{
document()->updateLayoutIgnorePendingStylesheets();

Powered by Google App Engine
This is Rietveld 408576698