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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 417093006: Have Node::enclosingLinkEventParentOrSelf() return an Element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 2501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document. 2512 // exited the WebView, and so hit testing over a scrollbar hits the cont ent document.
2513 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) { 2513 if (!request.isChildFrameHitTest() && (request.active() || request.relea se()) && isRootLayer()) {
2514 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl ipForWritingMode(hitTestLocation.point())); 2514 renderer()->updateHitTestResult(result, toRenderView(renderer())->fl ipForWritingMode(hitTestLocation.point()));
2515 insideLayer = this; 2515 insideLayer = this;
2516 } 2516 }
2517 } 2517 }
2518 2518
2519 // Now determine if the result is inside an anchor - if the urlElement isn't already set. 2519 // Now determine if the result is inside an anchor - if the urlElement isn't already set.
2520 Node* node = result.innerNode(); 2520 Node* node = result.innerNode();
2521 if (node && !result.URLElement()) 2521 if (node && !result.URLElement())
2522 result.setURLElement(toElement(node->enclosingLinkEventParentOrSelf())); 2522 result.setURLElement(node->enclosingLinkEventParentOrSelf());
2523 2523
2524 // Now return whether we were inside this layer (this will always be true fo r the root 2524 // Now return whether we were inside this layer (this will always be true fo r the root
2525 // layer). 2525 // layer).
2526 return insideLayer; 2526 return insideLayer;
2527 } 2527 }
2528 2528
2529 Node* RenderLayer::enclosingElement() const 2529 Node* RenderLayer::enclosingElement() const
2530 { 2530 {
2531 for (RenderObject* r = renderer(); r; r = r->parent()) { 2531 for (RenderObject* r = renderer(); r; r = r->parent()) {
2532 if (Node* e = r->node()) 2532 if (Node* e = r->node())
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
3799 } 3799 }
3800 } 3800 }
3801 3801
3802 void showLayerTree(const blink::RenderObject* renderer) 3802 void showLayerTree(const blink::RenderObject* renderer)
3803 { 3803 {
3804 if (!renderer) 3804 if (!renderer)
3805 return; 3805 return;
3806 showLayerTree(renderer->enclosingLayer()); 3806 showLayerTree(renderer->enclosingLayer());
3807 } 3807 }
3808 #endif 3808 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698