Chromium Code Reviews| Index: Source/core/dom/Element.cpp |
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
| index 4d3bae11dc22da0efb848f2c39ba49160f8fa334..981e575681547872e39d421d40427eb030ef7b5c 100644 |
| --- a/Source/core/dom/Element.cpp |
| +++ b/Source/core/dom/Element.cpp |
| @@ -2331,6 +2331,19 @@ bool Element::isUnresolvedCustomElement() |
| return isCustomElement() && document()->registry()->isUnresolved(this); |
| } |
| +void Element::setIsDOMChildOfRegion(bool value) |
| +{ |
| + if (value == isDOMChildOfRegion()) |
| + return; // Will always be called during attaching, don't create rare data structure if not necessary. |
|
esprehn
2013/06/28 20:29:36
Remove the comment. This kind of oldValue == newVa
|
| + |
| + ensureElementRareData()->setIsDOMChildOfRegion(value); |
| +} |
| + |
| +bool Element::isDOMChildOfRegion() const |
| +{ |
| + return hasRareData() ? elementRareData()->isDOMChildOfRegion() : false; |
| +} |
| + |
| void Element::setRegionOversetState(RegionOversetState state) |
| { |
| ensureElementRareData()->setRegionOversetState(state); |
| @@ -2629,6 +2642,31 @@ RenderRegion* Element::renderRegion() const |
| return 0; |
| } |
| +bool Element::shouldMoveToFlowThread(RenderStyle* styleToUse) const |
| +{ |
| + Document* doc = document(); |
|
esprehn
2013/06/28 20:29:36
Remove this, just call document() below. You do it
|
| + |
| + if (!RuntimeEnabledFeatures::cssRegionsEnabled()) |
|
esprehn
2013/06/28 20:29:36
This check should probably be in NodeRenderingCont
|
| + return false; |
| + |
| + ASSERT(styleToUse); |
| + if (!styleToUse) |
| + return false; |
|
esprehn
2013/06/28 20:29:36
Remove this, if you're asserting you shouldn't be
|
| + |
| +#if ENABLE(FULLSCREEN_API) |
| + if (doc->webkitIsFullScreen() && doc->webkitCurrentFullScreenElement() == this) |
|
esprehn
2013/06/28 20:29:36
FullScreenController::isActiveFullScreenElement(th
|
| + return false; |
| +#endif |
| + |
| + if (isInShadowTree()) |
| + return false; |
|
esprehn
2013/06/28 20:29:36
Interesting, so nothing inside a shadow is ever in
stavila
2013/07/01 15:33:39
For the moment, no. It is still under discussion a
|
| + |
| + if (styleToUse->flowThread().isEmpty()) |
| + return false; |
| + |
| + return !document()->renderView()->flowThreadController()->isContentNodeRegisteredWithAnyNamedFlow(this); |
| +} |
| + |
| const AtomicString& Element::webkitRegionOverset() const |
| { |
| document()->updateLayoutIgnorePendingStylesheets(); |