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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index c08cf4e4af8b4b5b0719d72cf1a779e04616a81e..11542d29e41986aa93448b4ad127b85447dd6134 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -316,7 +316,7 @@ static bool shouldInheritSecurityOriginFromOwner(const KURL& url)
static Widget* widgetForElement(const Element& focusedElement)
{
- LayoutObject* renderer = focusedElement.renderer();
+ LayoutObject* renderer = focusedElement.layoutObject();
if (!renderer || !renderer->isLayoutPart())
return 0;
return toLayoutPart(renderer)->widget();
@@ -1258,7 +1258,7 @@ PassRefPtrWillBeRawPtr<Range> Document::caretRangeFromPoint(int x, int y)
if (!layoutView())
return nullptr;
HitTestResult result = hitTestInDocument(this, x, y);
- LayoutObject* renderer = result.renderer();
+ LayoutObject* renderer = result.layoutObject();
if (!renderer)
return nullptr;
@@ -1755,7 +1755,7 @@ void Document::updateRenderTree(StyleRecalcChange change)
// As a result of the style recalculation, the currently hovered element might have been
// detached (for example, by setting display:none in the :hover style), schedule another mouseMove event
// to check if any other elements ended up under the mouse pointer due to re-layout.
- if (hoverNode() && !hoverNode()->renderer() && frame())
+ if (hoverNode() && !hoverNode()->layoutObject() && frame())
frame()->eventHandler().dispatchFakeMouseMoveEventSoon();
if (m_focusedElement && !m_focusedElement->isFocusable())
@@ -1916,7 +1916,7 @@ void Document::updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks
// is a hack, since what we really want to do is suspend JS instead of doing a layout with
// inaccurate information.
HTMLElement* bodyElement = body();
- if (bodyElement && !bodyElement->renderer() && m_pendingSheetLayout == NoLayoutWithPendingSheets) {
+ if (bodyElement && !bodyElement->layoutObject() && m_pendingSheetLayout == NoLayoutWithPendingSheets) {
m_pendingSheetLayout = DidLayoutWithPendingSheets;
styleResolverChanged();
} else if (m_hasNodesWithPlaceholderStyle) {
@@ -2512,7 +2512,7 @@ void Document::implicitClose()
// We used to force a synchronous display and flush here. This really isn't
// necessary and can in fact be actively harmful if pages are loading at a rate of > 60fps
// (if your platform is syncing flushes and limiting them to 60fps).
- if (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->renderer()->needsLayout())) {
+ if (!ownerElement() || (ownerElement()->layoutObject() && !ownerElement()->layoutObject()->needsLayout())) {
updateRenderTreeIfNeeded();
// Always do a layout after loading if needed.
@@ -3371,7 +3371,7 @@ void Document::hoveredNodeDetached(Node* node)
return;
m_hoverNode = NodeRenderingTraversal::parent(*node);
- while (m_hoverNode && !m_hoverNode->renderer())
+ while (m_hoverNode && !m_hoverNode->layoutObject())
m_hoverNode = NodeRenderingTraversal::parent(*m_hoverNode);
// If the mouse cursor is not visible, do not clear existing
@@ -3393,7 +3393,7 @@ void Document::activeChainNodeDetached(Node* node)
return;
Node* activeNode = NodeRenderingTraversal::parent(*node);
- while (activeNode && activeNode->isElementNode() && !activeNode->renderer())
+ while (activeNode && activeNode->isElementNode() && !activeNode->layoutObject())
activeNode = NodeRenderingTraversal::parent(*activeNode);
m_activeHoverElement = activeNode && activeNode->isElementNode() ? toElement(activeNode) : 0;
@@ -5265,15 +5265,15 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
// Check to see if the hovered node has changed.
// If it hasn't, we do not need to do anything.
Node* newHoverNode = innerElementInDocument;
- while (newHoverNode && !newHoverNode->renderer())
+ while (newHoverNode && !newHoverNode->layoutObject())
newHoverNode = newHoverNode->parentOrShadowHostNode();
// Update our current hover node.
setHoverNode(newHoverNode);
// We have two different objects. Fetch their renderers.
- LayoutObject* oldHoverObj = oldHoverNode ? oldHoverNode->renderer() : 0;
- LayoutObject* newHoverObj = newHoverNode ? newHoverNode->renderer() : 0;
+ LayoutObject* oldHoverObj = oldHoverNode ? oldHoverNode->layoutObject() : 0;
+ LayoutObject* newHoverObj = newHoverNode ? newHoverNode->layoutObject() : 0;
// Locate the common ancestor render object for the two renderers.
LayoutObject* ancestor = nearestCommonHoverAncestor(oldHoverObj, newHoverObj);

Powered by Google App Engine
This is Rietveld 408576698