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

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

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/Document.h ('k') | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index d7b1dadf11f0a394322b45496dfcac5a2c457121..c68ca92740f82b8baeb5aa3286c2d8f23f9fddf3 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();
@@ -1743,7 +1743,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())
@@ -1904,7 +1904,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) {
@@ -2495,7 +2495,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.
@@ -3349,7 +3349,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
@@ -3371,7 +3371,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;
@@ -5255,15 +5255,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);
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/DocumentMarkerController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698