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

Unified Diff: Source/web/WebViewImpl.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/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 14a53bd58e219e52df8c994e93142f0b7ee5c08c..7c7350bd46357a270e4cb0757bd9e1795183f925 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -535,7 +535,7 @@ void WebViewImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEvent& ev
result.setToShadowHostIfInClosedShadowRoot();
Node* hitNode = result.innerNonSharedNode();
- if (!result.scrollbar() && hitNode && hitNode->renderer() && hitNode->renderer()->isEmbeddedObject()) {
+ if (!result.scrollbar() && hitNode && hitNode->layoutObject() && hitNode->layoutObject()->isEmbeddedObject()) {
m_mouseCaptureNode = hitNode;
TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this);
}
@@ -1052,7 +1052,7 @@ bool WebViewImpl::handleKeyEvent(const WebKeyboardEvent& event)
// Suppress the next keypress event unless the focused node is a plug-in node.
// (Flash needs these keypress events to handle non-US keyboards.)
Element* element = focusedElement();
- if (!element || !element->renderer() || !element->renderer()->isEmbeddedObject())
+ if (!element || !element->layoutObject() || !element->layoutObject()->isEmbeddedObject())
m_suppressNextKeypressEvent = true;
}
return true;
@@ -1140,7 +1140,7 @@ WebRect WebViewImpl::computeBlockBound(const WebPoint& webPoint, bool ignoreClip
// Find the block type node based on the hit node.
// FIXME: This wants to walk composed tree with NodeRenderingTraversal::parent().
- while (node && (!node->renderer() || node->renderer()->isInline()))
+ while (node && (!node->layoutObject() || node->layoutObject()->isInline()))
node = NodeRenderingTraversal::parent(*node);
// Return the bounding box in the window coordinate system.
@@ -1259,8 +1259,8 @@ static Node* findCursorDefiningAncestor(Node* node, LocalFrame* frame)
{
// Go up the tree to find the node that defines a mouse cursor style
while (node) {
- if (node->renderer()) {
- ECursor cursor = node->renderer()->style()->cursor();
+ if (node->layoutObject()) {
+ ECursor cursor = node->layoutObject()->style()->cursor();
if (cursor != CURSOR_AUTO || frame->eventHandler().useHandCursor(node, node->isLink()))
break;
}
@@ -1272,10 +1272,10 @@ static Node* findCursorDefiningAncestor(Node* node, LocalFrame* frame)
static bool showsHandCursor(Node* node, LocalFrame* frame)
{
- if (!node || !node->renderer())
+ if (!node || !node->layoutObject())
return false;
- ECursor cursor = node->renderer()->style()->cursor();
+ ECursor cursor = node->layoutObject()->style()->cursor();
return cursor == CURSOR_POINTER
|| (cursor == CURSOR_AUTO && frame->eventHandler().useHandCursor(node, node->isLink()));
}
@@ -1293,7 +1293,7 @@ Node* WebViewImpl::bestTapNode(const GestureEventWithHitTestResults& targetedTap
// We might hit something like an image map that has no renderer on it
// Walk up the tree until we have a node with an attached renderer
- while (!bestTouchNode->renderer()) {
+ while (!bestTouchNode->layoutObject()) {
bestTouchNode = NodeRenderingTraversal::parent(*bestTouchNode);
if (!bestTouchNode)
return nullptr;
@@ -1348,10 +1348,10 @@ void WebViewImpl::enableTapHighlights(WillBeHeapVector<RawPtrWillBeMember<Node>>
for (size_t i = 0; i < highlightNodes.size(); ++i) {
Node* node = highlightNodes[i];
- if (!node || !node->renderer())
+ if (!node || !node->layoutObject())
continue;
- Color highlightColor = node->renderer()->style()->tapHighlightColor();
+ Color highlightColor = node->layoutObject()->style()->tapHighlightColor();
// Safari documentation for -webkit-tap-highlight-color says if the specified color has 0 alpha,
// then tap highlighting is disabled.
// http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safaricssref/articles/standardcssproperties.html
@@ -3545,7 +3545,7 @@ void WebViewImpl::performPluginAction(const WebPluginAction& action,
if (!isHTMLObjectElement(*node) && !isHTMLEmbedElement(*node))
return;
- LayoutObject* object = node->renderer();
+ LayoutObject* object = node->layoutObject();
if (object && object->isLayoutPart()) {
Widget* widget = toLayoutPart(object)->widget();
if (widget && widget->isPluginContainer()) {

Powered by Google App Engine
This is Rietveld 408576698