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

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

Issue 1086873002: Rename NodeRenderingTraversal to LayoutTreeBuilderTraversal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 8 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/LayoutTreeBuilderTraversal.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/LayoutTreeBuilderTraversal.cpp
diff --git a/Source/core/dom/NodeRenderingTraversal.cpp b/Source/core/dom/LayoutTreeBuilderTraversal.cpp
similarity index 91%
copy from Source/core/dom/NodeRenderingTraversal.cpp
copy to Source/core/dom/LayoutTreeBuilderTraversal.cpp
index 2764c1dc7dd8100ddc84d4d8b892d089cd9f6c1a..5eae79fb2853a4720805f79fc4a96e9dd0443509 100644
--- a/Source/core/dom/NodeRenderingTraversal.cpp
+++ b/Source/core/dom/LayoutTreeBuilderTraversal.cpp
@@ -25,7 +25,7 @@
*/
#include "config.h"
-#include "core/dom/NodeRenderingTraversal.h"
+#include "core/dom/LayoutTreeBuilderTraversal.h"
#include "core/HTMLNames.h"
#include "core/dom/PseudoElement.h"
@@ -34,7 +34,7 @@
namespace blink {
-namespace NodeRenderingTraversal {
+namespace LayoutTreeBuilderTraversal {
static bool isRendererReparented(const LayoutObject* renderer)
{
@@ -54,14 +54,16 @@ void ParentDetails::didTraverseInsertionPoint(const InsertionPoint* insertionPoi
ContainerNode* parent(const Node& node, ParentDetails* details)
{
- // TODO(hayato): Uncomment this once we can be sure NodeRenderingTraversal is used only for a node in a document.
- // ASSERT(node.inDocument());
+ ASSERT(node.inDocument() ? !node.document().childNeedsDistributionRecalc() : !node.childNeedsDistributionRecalc());
hayato 2015/04/15 10:36:11 Looks this is the result of wrong rebase, which is
+ ASSERT(!node.isShadowRoot());
+ if (isActiveInsertionPoint(node))
+ return 0;
return ComposedTreeTraversal::parent(node, details);
}
bool contains(const ContainerNode& container, const Node& node)
{
- for (const Node* current = &node; current; current = NodeRenderingTraversal::parent(*current)) {
+ for (const Node* current = &node; current; current = LayoutTreeBuilderTraversal::parent(*current)) {
if (current == &container)
return true;
}
@@ -225,7 +227,7 @@ Node* next(const Node& node, const Node* stayWithin)
LayoutObject* nextSiblingRenderer(const Node& node)
{
- for (Node* sibling = NodeRenderingTraversal::nextSibling(node); sibling; sibling = NodeRenderingTraversal::nextSibling(*sibling)) {
+ for (Node* sibling = LayoutTreeBuilderTraversal::nextSibling(node); sibling; sibling = LayoutTreeBuilderTraversal::nextSibling(*sibling)) {
LayoutObject* renderer = sibling->layoutObject();
if (renderer && !isRendererReparented(renderer))
return renderer;
@@ -235,7 +237,7 @@ LayoutObject* nextSiblingRenderer(const Node& node)
LayoutObject* previousSiblingRenderer(const Node& node)
{
- for (Node* sibling = NodeRenderingTraversal::previousSibling(node); sibling; sibling = NodeRenderingTraversal::previousSibling(*sibling)) {
+ for (Node* sibling = LayoutTreeBuilderTraversal::previousSibling(node); sibling; sibling = LayoutTreeBuilderTraversal::previousSibling(*sibling)) {
LayoutObject* renderer = sibling->layoutObject();
if (renderer && !isRendererReparented(renderer))
return renderer;
« no previous file with comments | « Source/core/dom/LayoutTreeBuilderTraversal.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698