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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2146313003: [Layout API] Use layoutViewItem() in PaintLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | 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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 1594
1595 return LayoutRect(frameView->visibleContentRect()); 1595 return LayoutRect(frameView->visibleContentRect());
1596 } 1596 }
1597 1597
1598 bool PaintLayer::hitTest(HitTestResult& result) 1598 bool PaintLayer::hitTest(HitTestResult& result)
1599 { 1599 {
1600 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant()); 1600 ASSERT(isSelfPaintingLayer() || hasSelfPaintingLayerDescendant());
1601 1601
1602 // LayoutView should make sure to update layout before entering hit testing 1602 // LayoutView should make sure to update layout before entering hit testing
1603 ASSERT(!layoutObject()->frame()->view()->layoutPending()); 1603 ASSERT(!layoutObject()->frame()->view()->layoutPending());
1604 ASSERT(!layoutObject()->document().layoutView()->needsLayout()); 1604 ASSERT(!layoutObject()->document().layoutViewItem().needsLayout());
1605 1605
1606 const HitTestRequest& request = result.hitTestRequest(); 1606 const HitTestRequest& request = result.hitTestRequest();
1607 const HitTestLocation& hitTestLocation = result.hitTestLocation(); 1607 const HitTestLocation& hitTestLocation = result.hitTestLocation();
1608 1608
1609 // Start with frameVisibleRect to ensure we include the scrollbars. 1609 // Start with frameVisibleRect to ensure we include the scrollbars.
1610 LayoutRect hitTestArea = frameVisibleRect(layoutObject()); 1610 LayoutRect hitTestArea = frameVisibleRect(layoutObject());
1611 if (request.ignoreClipping()) 1611 if (request.ignoreClipping())
1612 hitTestArea.unite(LayoutRect(layoutObject()->view()->documentRect())); 1612 hitTestArea.unite(LayoutRect(layoutObject()->view()->documentRect()));
1613 1613
1614 PaintLayer* insideLayer = hitTestLayer(this, 0, result, hitTestArea, hitTest Location, false); 1614 PaintLayer* insideLayer = hitTestLayer(this, 0, result, hitTestArea, hitTest Location, false);
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 2948
2949 void showLayerTree(const blink::LayoutObject* layoutObject) 2949 void showLayerTree(const blink::LayoutObject* layoutObject)
2950 { 2950 {
2951 if (!layoutObject) { 2951 if (!layoutObject) {
2952 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 2952 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
2953 return; 2953 return;
2954 } 2954 }
2955 showLayerTree(layoutObject->enclosingLayer()); 2955 showLayerTree(layoutObject->enclosingLayer());
2956 } 2956 }
2957 #endif 2957 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698