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

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

Issue 18080016: [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: Fixed failing test (fullscreen issue), added SVG test Created 7 years, 6 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 | « Source/core/dom/Element.h ('k') | Source/core/dom/ElementRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index e4b478f129e06776c5d9e69e3de002e8d3ec93b4..93da0ae14755896c77839fed3e71c772f5004842 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1385,6 +1385,7 @@ void Element::detach(const AttachContext& context)
data->setIsInCanvasSubtree(false);
data->resetComputedStyle();
data->resetDynamicRestyleObservations();
+ data->setIsInsideRegion(false);
}
if (ElementShadow* shadow = this->shadow())
shadow->detach(context);
@@ -2331,6 +2332,19 @@ bool Element::isUnresolvedCustomElement()
return isCustomElement() && document()->registry()->isUnresolved(this);
}
+void Element::setIsInsideRegion(bool value)
+{
+ if (value == isInsideRegion())
+ return;
+
+ ensureElementRareData()->setIsInsideRegion(value);
+}
+
+bool Element::isInsideRegion() const
+{
+ return hasRareData() ? elementRareData()->isInsideRegion() : false;
+}
+
void Element::setRegionOversetState(RegionOversetState state)
{
ensureElementRareData()->setRegionOversetState(state);
@@ -2629,6 +2643,22 @@ RenderRegion* Element::renderRegion() const
return 0;
}
+bool Element::shouldMoveToFlowThread(RenderStyle* styleToUse) const
+{
+ ASSERT(styleToUse);
+
+ if (FullscreenController::isActiveFullScreenElement(this))
+ return false;
+
+ if (isInShadowTree())
+ return false;
+
+ if (styleToUse->flowThread().isEmpty())
+ return false;
+
+ return !isRegisteredWithNamedFlow();
+}
+
const AtomicString& Element::webkitRegionOverset() const
{
document()->updateLayoutIgnorePendingStylesheets();
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/ElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698