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

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

Issue 2467693002: Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: overlay-scrollbar-mouse-capture now works on Mac Created 4 years, 1 month 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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 } 798 }
799 799
800 void PaintLayer::updateLayerPosition() { 800 void PaintLayer::updateLayerPosition() {
801 LayoutPoint localPoint; 801 LayoutPoint localPoint;
802 802
803 if (layoutObject()->isInline() && layoutObject()->isLayoutInline()) { 803 if (layoutObject()->isInline() && layoutObject()->isLayoutInline()) {
804 LayoutInline* inlineFlow = toLayoutInline(layoutObject()); 804 LayoutInline* inlineFlow = toLayoutInline(layoutObject());
805 IntRect lineBox = enclosingIntRect(inlineFlow->linesBoundingBox()); 805 IntRect lineBox = enclosingIntRect(inlineFlow->linesBoundingBox());
806 m_size = lineBox.size(); 806 m_size = lineBox.size();
807 } else if (LayoutBox* box = layoutBox()) { 807 } else if (LayoutBox* box = layoutBox()) {
808 m_size = pixelSnappedIntSize(box->size(), box->location()); 808 IntSize newSize = pixelSnappedIntSize(box->size(), box->location());
809 if (newSize != m_size && m_scrollableArea)
810 m_scrollableArea->visibleContentResized();
dtapuska 2016/11/02 16:53:21 I fear you have a re-entry problem here. You are n
bokan 2016/11/02 22:41:57 Good catch, I'll add it to the bottom.
811 m_size = newSize;
809 localPoint.moveBy(box->topLeftLocation()); 812 localPoint.moveBy(box->topLeftLocation());
810 } 813 }
811 814
812 if (!layoutObject()->isOutOfFlowPositioned() && 815 if (!layoutObject()->isOutOfFlowPositioned() &&
813 !layoutObject()->isColumnSpanAll() && layoutObject()->parent()) { 816 !layoutObject()->isColumnSpanAll() && layoutObject()->parent()) {
814 // We must adjust our position by walking up the layout tree looking for the 817 // We must adjust our position by walking up the layout tree looking for the
815 // nearest enclosing object with a layer. 818 // nearest enclosing object with a layer.
816 LayoutObject* curr = layoutObject()->parent(); 819 LayoutObject* curr = layoutObject()->parent();
817 while (curr && !curr->hasLayer()) { 820 while (curr && !curr->hasLayer()) {
818 if (curr->isBox() && !curr->isTableRow()) { 821 if (curr->isBox() && !curr->isTableRow()) {
(...skipping 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after
3266 } 3269 }
3267 3270
3268 void showLayerTree(const blink::LayoutObject* layoutObject) { 3271 void showLayerTree(const blink::LayoutObject* layoutObject) {
3269 if (!layoutObject) { 3272 if (!layoutObject) {
3270 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); 3273 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n");
3271 return; 3274 return;
3272 } 3275 }
3273 showLayerTree(layoutObject->enclosingLayer()); 3276 showLayerTree(layoutObject->enclosingLayer());
3274 } 3277 }
3275 #endif 3278 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698