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

Unified Diff: Source/core/dom/Document.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/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 8e3a75aaac353ec29d77bf72ed342f51b431477b..62287a4ed9b78b63dba0e144d90839e822b86866 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -315,7 +315,7 @@ static bool shouldInheritSecurityOriginFromOwner(const KURL& url)
static Widget* widgetForElement(const Element& focusedElement)
{
- RenderObject* renderer = focusedElement.renderer();
+ LayoutObject* renderer = focusedElement.renderer();
if (!renderer || !renderer->isRenderPart())
return 0;
return toRenderPart(renderer)->widget();
@@ -1253,7 +1253,7 @@ PassRefPtrWillBeRawPtr<Range> Document::caretRangeFromPoint(int x, int y)
if (!renderView())
return nullptr;
HitTestResult result = hitTestInDocument(this, x, y);
- RenderObject* renderer = result.renderer();
+ LayoutObject* renderer = result.renderer();
if (!renderer)
return nullptr;
@@ -5198,7 +5198,7 @@ Node* eventTargetNodeForDocument(Document* doc)
return node;
}
-void Document::adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>& quads, RenderObject& renderer)
+void Document::adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>& quads, LayoutObject& renderer)
{
if (!view())
return;
@@ -5210,7 +5210,7 @@ void Document::adjustFloatQuadsForScrollAndAbsoluteZoom(Vector<FloatQuad>& quads
}
}
-void Document::adjustFloatRectForScrollAndAbsoluteZoom(FloatRect& rect, RenderObject& renderer)
+void Document::adjustFloatRectForScrollAndAbsoluteZoom(FloatRect& rect, LayoutObject& renderer)
{
if (!view())
return;
@@ -5230,13 +5230,13 @@ void Document::setContextFeatures(ContextFeatures& features)
m_contextFeatures = PassRefPtrWillBeRawPtr<ContextFeatures>(features);
}
-static RenderObject* nearestCommonHoverAncestor(RenderObject* obj1, RenderObject* obj2)
+static LayoutObject* nearestCommonHoverAncestor(LayoutObject* obj1, LayoutObject* obj2)
{
if (!obj1 || !obj2)
return 0;
- for (RenderObject* currObj1 = obj1; currObj1; currObj1 = currObj1->hoverAncestor()) {
- for (RenderObject* currObj2 = obj2; currObj2; currObj2 = currObj2->hoverAncestor()) {
+ for (LayoutObject* currObj1 = obj1; currObj1; currObj1 = currObj1->hoverAncestor()) {
+ for (LayoutObject* currObj2 = obj2; currObj2; currObj2 = currObj2->hoverAncestor()) {
if (currObj1 == currObj2)
return currObj1;
}
@@ -5301,11 +5301,11 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
setHoverNode(newHoverNode);
// We have two different objects. Fetch their renderers.
- RenderObject* oldHoverObj = oldHoverNode ? oldHoverNode->renderer() : 0;
- RenderObject* newHoverObj = newHoverNode ? newHoverNode->renderer() : 0;
+ LayoutObject* oldHoverObj = oldHoverNode ? oldHoverNode->renderer() : 0;
+ LayoutObject* newHoverObj = newHoverNode ? newHoverNode->renderer() : 0;
// Locate the common ancestor render object for the two renderers.
- RenderObject* ancestor = nearestCommonHoverAncestor(oldHoverObj, newHoverObj);
+ LayoutObject* ancestor = nearestCommonHoverAncestor(oldHoverObj, newHoverObj);
RefPtrWillBeRawPtr<Node> ancestorNode(ancestor ? ancestor->node() : 0);
WillBeHeapVector<RefPtrWillBeMember<Node>, 32> nodesToRemoveFromChain;
@@ -5324,14 +5324,14 @@ void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
}
// The old hover path only needs to be cleared up to (and not including) the common ancestor;
- for (RenderObject* curr = oldHoverObj; curr && curr != ancestor; curr = curr->hoverAncestor()) {
+ for (LayoutObject* curr = oldHoverObj; curr && curr != ancestor; curr = curr->hoverAncestor()) {
if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain()))
nodesToRemoveFromChain.append(curr->node());
}
}
// Now set the hover state for our new object up to the root.
- for (RenderObject* curr = newHoverObj; curr; curr = curr->hoverAncestor()) {
+ for (LayoutObject* curr = newHoverObj; curr; curr = curr->hoverAncestor()) {
if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain()))
nodesToAddToChain.append(curr->node());
}
« 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