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

Unified Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2739573005: Rename Document::widgetForElement to frameViewBaseForElement (Closed)
Patch Set: Move Document::widgetForElement to Node::frameViewBase Created 3 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
Index: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index b8c3eb497fd360ab5fcc1e67c7bb0509642f0390..add82d65035434356372c09455066ab444d04c94 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -92,6 +92,7 @@
#include "core/html/HTMLSlotElement.h"
#include "core/input/EventHandler.h"
#include "core/layout/LayoutBox.h"
+#include "core/layout/LayoutPart.h"
#include "core/page/ContextMenuController.h"
#include "core/page/Page.h"
#include "core/svg/SVGElement.h"
@@ -594,6 +595,13 @@ LayoutBoxModelObject* Node::layoutBoxModelObject() const {
: nullptr;
}
+FrameViewBase* Node::frameViewBase() const {
+ LayoutObject* layoutObject = this->layoutObject();
+ return layoutObject && layoutObject->isLayoutPart()
sashab 2017/03/10 04:30:13 I actually don't know if this is easier to read :(
joelhockey 2017/03/10 04:37:53 I wrote it to match the surrounding, related code.
sashab 2017/03/10 04:47:22 Oh, so you did, sorry about that :)
+ ? toLayoutPart(layoutObject)->frameViewBase()
+ : nullptr;
+}
+
LayoutRect Node::boundingBox() const {
if (layoutObject())
return LayoutRect(layoutObject()->absoluteBoundingBoxRect());
« third_party/WebKit/Source/core/dom/Node.h ('K') | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698