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

Unified Diff: Source/core/editing/Caret.cpp

Issue 1122723005: Rename renderer to layoutObject in core/editing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/editing/Caret.h ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Caret.cpp
diff --git a/Source/core/editing/Caret.cpp b/Source/core/editing/Caret.cpp
index a5fa1a8519873c60bf43a8c86e9442f641061921..8b840276788d8792302f7f8522e67053c4336fa9 100644
--- a/Source/core/editing/Caret.cpp
+++ b/Source/core/editing/Caret.cpp
@@ -128,13 +128,13 @@ LayoutBlock* CaretBase::caretLayoutObject(Node* node)
if (!node)
return 0;
- LayoutObject* renderer = node->layoutObject();
- if (!renderer)
+ LayoutObject* layoutObject = node->layoutObject();
+ if (!layoutObject)
return 0;
// if caretNode is a block and caret is inside it then caret should be painted by that block
- bool paintedByBlock = renderer->isLayoutBlock() && caretRendersInsideNode(node);
- return paintedByBlock ? toLayoutBlock(renderer) : renderer->containingBlock();
+ bool paintedByBlock = layoutObject->isLayoutBlock() && caretRendersInsideNode(node);
+ return paintedByBlock ? toLayoutBlock(layoutObject) : layoutObject->containingBlock();
}
static void mapCaretRectToCaretPainter(LayoutObject* caretLayoutObject, LayoutBlock* caretPainter, LayoutRect& caretRect)
@@ -169,15 +169,15 @@ bool CaretBase::updateCaretRect(Document* document, const PositionWithAffinity&
ASSERT(caretPosition.position().deprecatedNode()->layoutObject());
- // First compute a rect local to the renderer at the selection start.
- LayoutObject* renderer;
- m_caretLocalRect = localCaretRectOfPosition(caretPosition, renderer);
+ // First compute a rect local to the layoutObject at the selection start.
+ LayoutObject* layoutObject;
+ m_caretLocalRect = localCaretRectOfPosition(caretPosition, layoutObject);
- // Get the renderer that will be responsible for painting the caret
- // (which is either the renderer we just found, or one of its containers).
+ // Get the layoutObject that will be responsible for painting the caret
+ // (which is either the layoutObject we just found, or one of its containers).
LayoutBlock* caretPainter = caretLayoutObject(caretPosition.position().deprecatedNode());
- mapCaretRectToCaretPainter(renderer, caretPainter, m_caretLocalRect);
+ mapCaretRectToCaretPainter(layoutObject, caretPainter, m_caretLocalRect);
return true;
}
@@ -257,8 +257,8 @@ void CaretBase::paintCaret(Node* node, GraphicsContext* context, const LayoutPoi
return;
LayoutRect drawingRect = localCaretRectWithoutUpdate();
- if (LayoutBlock* renderer = caretLayoutObject(node))
- renderer->flipForWritingMode(drawingRect);
+ if (LayoutBlock* layoutObject = caretLayoutObject(node))
+ layoutObject->flipForWritingMode(drawingRect);
drawingRect.moveBy(roundedIntPoint(paintOffset));
LayoutRect caret = intersection(drawingRect, clipRect);
if (caret.isEmpty())
« no previous file with comments | « Source/core/editing/Caret.h ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698