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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/Text.h ('k') | Source/core/editing/ApplyBlockElementCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Text.cpp
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp
index c6a2a9895ec07ce6625614f6c468152ef9bd4c69..19f9f38ad2d9a09aea78ef96e67aea27b52dda6c 100644
--- a/Source/core/dom/Text.cpp
+++ b/Source/core/dom/Text.cpp
@@ -237,7 +237,7 @@ PassRefPtrWillBeRawPtr<Node> Text::cloneNode(bool /*deep*/)
return cloneWithData(data());
}
-static inline bool canHaveWhitespaceChildren(const RenderObject& parent)
+static inline bool canHaveWhitespaceChildren(const LayoutObject& parent)
{
// <button> should allow whitespace even though RenderFlexibleBox doesn't.
if (parent.isRenderButton())
@@ -254,7 +254,7 @@ static inline bool canHaveWhitespaceChildren(const RenderObject& parent)
return true;
}
-bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& parent)
+bool Text::textRendererIsNeeded(const RenderStyle& style, const LayoutObject& parent)
{
if (!parent.canHaveChildren())
return false;
@@ -281,7 +281,7 @@ bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& pa
if (document().childNeedsDistributionRecalc())
return true;
- const RenderObject* prev = NodeRenderingTraversal::previousSiblingRenderer(*this);
+ const LayoutObject* prev = NodeRenderingTraversal::previousSiblingRenderer(*this);
if (prev && prev->isBR()) // <span><br/> <br/></span>
return false;
@@ -297,7 +297,7 @@ bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& pa
// So to avoid blowing up on very wide DOMs, we limit the number of siblings to visit.
unsigned maxSiblingsToVisit = 50;
- RenderObject* first = parent.slowFirstChild();
+ LayoutObject* first = parent.slowFirstChild();
while (first && first->isFloatingOrOutOfFlowPositioned() && maxSiblingsToVisit--)
first = first->nextSibling();
if (!first || first == renderer() || NodeRenderingTraversal::nextSiblingRenderer(*this) == first)
@@ -329,7 +329,7 @@ RenderText* Text::createTextRenderer(RenderStyle* style)
void Text::attach(const AttachContext& context)
{
if (ContainerNode* renderingParent = NodeRenderingTraversal::parent(*this)) {
- if (RenderObject* parentRenderer = renderingParent->renderer()) {
+ if (LayoutObject* parentRenderer = renderingParent->renderer()) {
if (textRendererIsNeeded(*parentRenderer->style(), *parentRenderer))
RenderTreeBuilderForText(*this, parentRenderer).createRenderer();
}
@@ -342,7 +342,7 @@ void Text::reattachIfNeeded(const AttachContext& context)
bool rendererIsNeeded = false;
ContainerNode* renderingParent = NodeRenderingTraversal::parent(*this);
if (renderingParent) {
- if (RenderObject* parentRenderer = renderingParent->renderer()) {
+ if (LayoutObject* parentRenderer = renderingParent->renderer()) {
if (textRendererIsNeeded(*parentRenderer->style(), *parentRenderer))
rendererIsNeeded = true;
}
« no previous file with comments | « Source/core/dom/Text.h ('k') | Source/core/editing/ApplyBlockElementCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698