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

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 46163008: Revert "Re-land deferred compositing updates with fixed assumptions" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 horizontalScrollbar->setFrameRect(hBarRect); 879 horizontalScrollbar->setFrameRect(hBarRect);
880 } 880 }
881 881
882 const IntRect& scrollCorner = scrollCornerRect(); 882 const IntRect& scrollCorner = scrollCornerRect();
883 if (m_scrollCorner) 883 if (m_scrollCorner)
884 m_scrollCorner->setFrameRect(scrollCorner); 884 m_scrollCorner->setFrameRect(scrollCorner);
885 885
886 if (m_resizer) 886 if (m_resizer)
887 m_resizer->setFrameRect(resizerCornerRect(borderBox, ResizerForPointer)) ; 887 m_resizer->setFrameRect(resizerCornerRect(borderBox, ResizerForPointer)) ;
888 888
889 // FIXME, this should eventually be removed, once we are certain that compos ited
890 // controls get correctly positioned on a compositor update. For now, conser vatively
891 // leaving this unchanged.
892 if (m_box->compositedLayerMapping()) 889 if (m_box->compositedLayerMapping())
893 m_box->compositedLayerMapping()->positionOverflowControlsLayers(offsetFr omRoot); 890 m_box->compositedLayerMapping()->positionOverflowControlsLayers(offsetFr omRoot);
894 } 891 }
895 892
893 void RenderLayerScrollableArea::positionNewlyCreatedOverflowControls()
894 {
895 if (!m_box->compositedLayerMapping()->hasUnpositionedOverflowControlsLayers( ))
896 return;
897
898 RenderGeometryMap geometryMap(UseTransforms);
899 RenderView* view = m_box->view();
900 if (this != view->layer()->scrollableArea() && m_box->layer()->parent())
901 geometryMap.pushMappingsToAncestor(m_box->layer()->parent(), 0);
902
903 LayoutPoint offsetFromRoot = LayoutPoint(geometryMap.absolutePoint(FloatPoin t()));
904 positionOverflowControls(toIntSize(roundedIntPoint(offsetFromRoot)));
905 }
906
896 bool RenderLayerScrollableArea::scrollsOverflow() const 907 bool RenderLayerScrollableArea::scrollsOverflow() const
897 { 908 {
898 if (FrameView* frameView = m_box->view()->frameView()) 909 if (FrameView* frameView = m_box->view()->frameView())
899 return frameView->containsScrollableArea(this); 910 return frameView->containsScrollableArea(this);
900 911
901 return false; 912 return false;
902 } 913 }
903 914
904 void RenderLayerScrollableArea::updateScrollCornerStyle() 915 void RenderLayerScrollableArea::updateScrollCornerStyle()
905 { 916 {
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 bool RenderLayerScrollableArea::usesCompositedScrolling() const 1450 bool RenderLayerScrollableArea::usesCompositedScrolling() const
1440 { 1451 {
1441 // Scroll form controls on the main thread so they exhibit correct touch scr oll event bubbling 1452 // Scroll form controls on the main thread so they exhibit correct touch scr oll event bubbling
1442 if (m_box && (m_box->isIntristicallyScrollable(VerticalScrollbar) || m_box-> isIntristicallyScrollable(HorizontalScrollbar))) 1453 if (m_box && (m_box->isIntristicallyScrollable(VerticalScrollbar) || m_box-> isIntristicallyScrollable(HorizontalScrollbar)))
1443 return false; 1454 return false;
1444 1455
1445 return m_box->compositedLayerMapping() && m_box->compositedLayerMapping()->s crollingLayer(); 1456 return m_box->compositedLayerMapping() && m_box->compositedLayerMapping()->s crollingLayer();
1446 } 1457 }
1447 1458
1448 } // Namespace WebCore 1459 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerScrollableArea.h ('k') | Source/core/rendering/RenderLayerStackingNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698