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

Unified Diff: Source/core/rendering/RenderNamedFlowThread.cpp

Issue 22623003: RenderNamedFlowThread should not create NodeRenderingContext objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderNamedFlowThread.cpp
diff --git a/Source/core/rendering/RenderNamedFlowThread.cpp b/Source/core/rendering/RenderNamedFlowThread.cpp
index 97774fb63f1fe6afed91b3413df0b8252a5eb954..8f6688356a1f18329d718c36d46cfb019b303189 100644
--- a/Source/core/rendering/RenderNamedFlowThread.cpp
+++ b/Source/core/rendering/RenderNamedFlowThread.cpp
@@ -29,7 +29,7 @@
#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/NamedFlow.h"
-#include "core/dom/NodeRenderingContext.h"
+#include "core/dom/NodeRenderingTraversal.h"
#include "core/dom/NodeTraversal.h"
#include "core/dom/Position.h"
#include "core/dom/Range.h"
@@ -455,18 +455,15 @@ const AtomicString& RenderNamedFlowThread::flowThreadName() const
bool RenderNamedFlowThread::isChildAllowed(RenderObject* child, RenderStyle* style) const
{
- ASSERT(child);
- ASSERT(style);
-
if (!child->node())
return true;
ASSERT(child->node()->isElementNode());
- RenderObject* parentRenderer = NodeRenderingContext(child->node()).parentRenderer();
- if (!parentRenderer)
+ Node* originalParent = NodeRenderingTraversal::parent(child->node());
+ if (!originalParent || !originalParent->renderer())
return true;
- return parentRenderer->isChildAllowed(child, style);
+ return originalParent->renderer()->isChildAllowed(child, style);
}
void RenderNamedFlowThread::dispatchRegionLayoutUpdateEvent()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698