| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 PaintLayerScrollableArea* scrollableArea = | 997 PaintLayerScrollableArea* scrollableArea = |
| 998 ancestorOverflowLayer->getScrollableArea(); | 998 ancestorOverflowLayer->getScrollableArea(); |
| 999 | 999 |
| 1000 // The sticky offset is physical, so we can just return the delta computed in | 1000 // The sticky offset is physical, so we can just return the delta computed in |
| 1001 // absolute coords (though it may be wrong with transforms). | 1001 // absolute coords (though it may be wrong with transforms). |
| 1002 // TODO: Force compositing input update if we ask for offset with stale | 1002 // TODO: Force compositing input update if we ask for offset with stale |
| 1003 // compositing inputs. | 1003 // compositing inputs. |
| 1004 if (!scrollableArea->stickyConstraintsMap().contains(layer())) | 1004 if (!scrollableArea->stickyConstraintsMap().contains(layer())) |
| 1005 return LayoutSize(); | 1005 return LayoutSize(); |
| 1006 return LayoutSize( | 1006 return LayoutSize( |
| 1007 scrollableArea->stickyConstraintsMap().get(layer()).computeStickyOffset( | 1007 scrollableArea->stickyConstraintsMap().at(layer()).computeStickyOffset( |
| 1008 constrainingRect)); | 1008 constrainingRect)); |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 LayoutPoint LayoutBoxModelObject::adjustedPositionRelativeTo( | 1011 LayoutPoint LayoutBoxModelObject::adjustedPositionRelativeTo( |
| 1012 const LayoutPoint& startPoint, | 1012 const LayoutPoint& startPoint, |
| 1013 const Element* offsetParent) const { | 1013 const Element* offsetParent) const { |
| 1014 // If the element is the HTML body element or doesn't have a parent | 1014 // If the element is the HTML body element or doesn't have a parent |
| 1015 // return 0 and stop this algorithm. | 1015 // return 0 and stop this algorithm. |
| 1016 if (isBody() || !parent()) | 1016 if (isBody() || !parent()) |
| 1017 return LayoutPoint(); | 1017 return LayoutPoint(); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 if (padding.isPercentOrCalc()) | 1110 if (padding.isPercentOrCalc()) |
| 1111 w = containingBlockLogicalWidthForContent(); | 1111 w = containingBlockLogicalWidthForContent(); |
| 1112 return minimumValueForLength(padding, w); | 1112 return minimumValueForLength(padding, w); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 LayoutUnit LayoutBoxModelObject::containingBlockLogicalWidthForContent() const { | 1115 LayoutUnit LayoutBoxModelObject::containingBlockLogicalWidthForContent() const { |
| 1116 return containingBlock()->availableLogicalWidth(); | 1116 return containingBlock()->availableLogicalWidth(); |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 LayoutBoxModelObject* LayoutBoxModelObject::continuation() const { | 1119 LayoutBoxModelObject* LayoutBoxModelObject::continuation() const { |
| 1120 return (!continuationMap) ? nullptr : continuationMap->get(this); | 1120 return (!continuationMap) ? nullptr : continuationMap->at(this); |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 void LayoutBoxModelObject::setContinuation(LayoutBoxModelObject* continuation) { | 1123 void LayoutBoxModelObject::setContinuation(LayoutBoxModelObject* continuation) { |
| 1124 if (continuation) { | 1124 if (continuation) { |
| 1125 ASSERT(continuation->isLayoutInline() || continuation->isLayoutBlockFlow()); | 1125 ASSERT(continuation->isLayoutInline() || continuation->isLayoutBlockFlow()); |
| 1126 if (!continuationMap) | 1126 if (!continuationMap) |
| 1127 continuationMap = new ContinuationMap; | 1127 continuationMap = new ContinuationMap; |
| 1128 continuationMap->set(this, continuation); | 1128 continuationMap->set(this, continuation); |
| 1129 } else { | 1129 } else { |
| 1130 if (continuationMap) | 1130 if (continuationMap) |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 if (rootElementStyle->hasBackground()) | 1368 if (rootElementStyle->hasBackground()) |
| 1369 return false; | 1369 return false; |
| 1370 | 1370 |
| 1371 if (node() != document().firstBodyElement()) | 1371 if (node() != document().firstBodyElement()) |
| 1372 return false; | 1372 return false; |
| 1373 | 1373 |
| 1374 return true; | 1374 return true; |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 } // namespace blink | 1377 } // namespace blink |
| OLD | NEW |