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

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

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WIP - fix on release, still hits CHECK in LayoutGeometryMap.cpp:156 Created 4 years, 10 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) 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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 m_resizer = LayoutScrollbarPart::createAnonymous(&box().document()); 1223 m_resizer = LayoutScrollbarPart::createAnonymous(&box().document());
1224 m_resizer->setDangerousOneWayParent(&box()); 1224 m_resizer->setDangerousOneWayParent(&box());
1225 } 1225 }
1226 m_resizer->setStyle(resizer.release()); 1226 m_resizer->setStyle(resizer.release());
1227 } else if (m_resizer) { 1227 } else if (m_resizer) {
1228 m_resizer->destroy(); 1228 m_resizer->destroy();
1229 m_resizer = nullptr; 1229 m_resizer = nullptr;
1230 } 1230 }
1231 } 1231 }
1232 1232
1233 void PaintLayerScrollableArea::invalidateStickyConstraints()
1234 {
1235 if (PaintLayerScrollableAreaRareData* d = rareData()) {
1236 for (auto& iter : d->m_stickyConstraintsMap) {
1237 iter.key->setNeedsCompositingInputsUpdate();
1238 }
1239 d->m_stickyConstraintsMap.clear();
1240 }
1241 }
1242
1233 IntSize PaintLayerScrollableArea::offsetFromResizeCorner(const IntPoint& absolut ePoint) const 1243 IntSize PaintLayerScrollableArea::offsetFromResizeCorner(const IntPoint& absolut ePoint) const
1234 { 1244 {
1235 // Currently the resize corner is either the bottom right corner or the bott om left corner. 1245 // Currently the resize corner is either the bottom right corner or the bott om left corner.
1236 // FIXME: This assumes the location is 0, 0. Is this guaranteed to always be the case? 1246 // FIXME: This assumes the location is 0, 0. Is this guaranteed to always be the case?
1237 IntSize elementSize = layer()->size(); 1247 IntSize elementSize = layer()->size();
1238 if (box().shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) 1248 if (box().shouldPlaceBlockDirectionScrollbarOnLogicalLeft())
1239 elementSize.setWidth(0); 1249 elementSize.setWidth(0);
1240 IntPoint resizerPoint = IntPoint(elementSize); 1250 IntPoint resizerPoint = IntPoint(elementSize);
1241 IntPoint localPoint = roundedIntPoint(box().absoluteToLocal(absolutePoint, U seTransforms)); 1251 IntPoint localPoint = roundedIntPoint(box().absoluteToLocal(absolutePoint, U seTransforms));
1242 return localPoint - resizerPoint; 1252 return localPoint - resizerPoint;
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 } 1564 }
1555 1565
1556 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) 1566 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager)
1557 { 1567 {
1558 visitor->trace(m_scrollableArea); 1568 visitor->trace(m_scrollableArea);
1559 visitor->trace(m_hBar); 1569 visitor->trace(m_hBar);
1560 visitor->trace(m_vBar); 1570 visitor->trace(m_vBar);
1561 } 1571 }
1562 1572
1563 } // namespace blink 1573 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698