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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 #include "core/events/WheelEvent.h" 85 #include "core/events/WheelEvent.h"
86 #include "core/frame/EventHandlerRegistry.h" 86 #include "core/frame/EventHandlerRegistry.h"
87 #include "core/frame/FrameView.h" 87 #include "core/frame/FrameView.h"
88 #include "core/frame/LocalDOMWindow.h" 88 #include "core/frame/LocalDOMWindow.h"
89 #include "core/frame/LocalFrame.h" 89 #include "core/frame/LocalFrame.h"
90 #include "core/html/HTMLDialogElement.h" 90 #include "core/html/HTMLDialogElement.h"
91 #include "core/html/HTMLFrameOwnerElement.h" 91 #include "core/html/HTMLFrameOwnerElement.h"
92 #include "core/html/HTMLSlotElement.h" 92 #include "core/html/HTMLSlotElement.h"
93 #include "core/input/EventHandler.h" 93 #include "core/input/EventHandler.h"
94 #include "core/layout/LayoutBox.h" 94 #include "core/layout/LayoutBox.h"
95 #include "core/layout/LayoutPart.h"
95 #include "core/page/ContextMenuController.h" 96 #include "core/page/ContextMenuController.h"
96 #include "core/page/Page.h" 97 #include "core/page/Page.h"
97 #include "core/svg/SVGElement.h" 98 #include "core/svg/SVGElement.h"
98 #include "core/svg/graphics/SVGImage.h" 99 #include "core/svg/graphics/SVGImage.h"
99 #include "platform/EventDispatchForbiddenScope.h" 100 #include "platform/EventDispatchForbiddenScope.h"
100 #include "platform/InstanceCounters.h" 101 #include "platform/InstanceCounters.h"
101 #include "platform/RuntimeEnabledFeatures.h" 102 #include "platform/RuntimeEnabledFeatures.h"
102 #include "platform/instrumentation/tracing/TraceEvent.h" 103 #include "platform/instrumentation/tracing/TraceEvent.h"
103 #include "platform/instrumentation/tracing/TracedValue.h" 104 #include "platform/instrumentation/tracing/TracedValue.h"
104 #include "wtf/HashSet.h" 105 #include "wtf/HashSet.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 : nullptr; 588 : nullptr;
588 } 589 }
589 590
590 LayoutBoxModelObject* Node::layoutBoxModelObject() const { 591 LayoutBoxModelObject* Node::layoutBoxModelObject() const {
591 LayoutObject* layoutObject = this->layoutObject(); 592 LayoutObject* layoutObject = this->layoutObject();
592 return layoutObject && layoutObject->isBoxModelObject() 593 return layoutObject && layoutObject->isBoxModelObject()
593 ? toLayoutBoxModelObject(layoutObject) 594 ? toLayoutBoxModelObject(layoutObject)
594 : nullptr; 595 : nullptr;
595 } 596 }
596 597
598 FrameViewBase* Node::frameViewBase() const {
599 LayoutObject* layoutObject = this->layoutObject();
600 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 :)
601 ? toLayoutPart(layoutObject)->frameViewBase()
602 : nullptr;
603 }
604
597 LayoutRect Node::boundingBox() const { 605 LayoutRect Node::boundingBox() const {
598 if (layoutObject()) 606 if (layoutObject())
599 return LayoutRect(layoutObject()->absoluteBoundingBoxRect()); 607 return LayoutRect(layoutObject()->absoluteBoundingBoxRect());
600 return LayoutRect(); 608 return LayoutRect();
601 } 609 }
602 610
603 #ifndef NDEBUG 611 #ifndef NDEBUG
604 inline static ShadowRoot* oldestShadowRootFor(const Node* node) { 612 inline static ShadowRoot* oldestShadowRootFor(const Node* node) {
605 if (!node->isElementNode()) 613 if (!node->isElementNode())
606 return nullptr; 614 return nullptr;
(...skipping 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 if (node) { 2575 if (node) {
2568 std::stringstream stream; 2576 std::stringstream stream;
2569 node->printNodePathTo(stream); 2577 node->printNodePathTo(stream);
2570 LOG(INFO) << stream.str(); 2578 LOG(INFO) << stream.str();
2571 } else { 2579 } else {
2572 LOG(INFO) << "Cannot showNodePath for <null>"; 2580 LOG(INFO) << "Cannot showNodePath for <null>";
2573 } 2581 }
2574 } 2582 }
2575 2583
2576 #endif 2584 #endif
OLDNEW
« 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