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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutPart.cpp

Issue 1998643002: [Layout API] Use FrameView::layoutViewItem() in LayoutPart.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/core/layout/api/LayoutViewItem.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutPart.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutPart.cpp b/third_party/WebKit/Source/core/layout/LayoutPart.cpp
index e412d9a0fd9ba9c8c7df2261f0bd73da544666dc..55d3c2ff8586c420707620a2e5865c905a3a5e7f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutPart.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutPart.cpp
@@ -129,8 +129,9 @@ bool LayoutPart::requiresAcceleratedCompositing() const
return true;
if (Document* contentDocument = element->contentDocument()) {
- if (LayoutView* view = contentDocument->layoutView())
- return view->usesCompositing();
+ LayoutViewItem viewItem = contentDocument->layoutViewItem();
+ if (!viewItem.isNull())
+ return viewItem.usesCompositing();
}
return false;
@@ -168,9 +169,9 @@ bool LayoutPart::nodeAtPoint(HitTestResult& result, const HitTestLocation& locat
if (action == HitTestForeground) {
FrameView* childFrameView = toFrameView(widget());
- LayoutView* childRoot = childFrameView->layoutView();
+ LayoutViewItem childRootItem = childFrameView->layoutViewItem();
- if (visibleToHitTestRequest(result.hitTestRequest()) && childRoot) {
+ if (visibleToHitTestRequest(result.hitTestRequest()) && !childRootItem.isNull()) {
LayoutPoint adjustedLocation = accumulatedOffset + location();
LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), borderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset());
HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocation - contentOffset);
@@ -178,7 +179,7 @@ bool LayoutPart::nodeAtPoint(HitTestResult& result, const HitTestLocation& locat
HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation);
// The frame's layout and style must be up-to-date if we reach here.
- bool isInsideChildFrame = childRoot->hitTestNoLifecycleUpdate(childFrameResult);
+ bool isInsideChildFrame = childRootItem.hitTestNoLifecycleUpdate(childFrameResult);
if (result.hitTestRequest().listBased()) {
result.append(childFrameResult);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/api/LayoutViewItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698