| OLD | NEW |
| 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@gmail.com> | 10 * Christian Biesinger <cbiesinger@gmail.com> |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 if (docElement && docElement->layoutObject() && | 1142 if (docElement && docElement->layoutObject() && |
| 1143 docElement->layoutObject()->style()->hasPseudoStyle( | 1143 docElement->layoutObject()->style()->hasPseudoStyle( |
| 1144 PseudoIdScrollbar)) | 1144 PseudoIdScrollbar)) |
| 1145 return *docElement->layoutObject(); | 1145 return *docElement->layoutObject(); |
| 1146 } | 1146 } |
| 1147 | 1147 |
| 1148 if (layoutObject.styleRef().hasPseudoStyle(PseudoIdScrollbar)) | 1148 if (layoutObject.styleRef().hasPseudoStyle(PseudoIdScrollbar)) |
| 1149 return layoutObject; | 1149 return layoutObject; |
| 1150 | 1150 |
| 1151 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { | 1151 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { |
| 1152 if (shadowRoot->type() == ShadowRootType::UserAgent) | 1152 if (shadowRoot->type() == ShadowRootType::UserAgent) { |
| 1153 return *shadowRoot->host().layoutObject(); | 1153 if (LayoutObject* hostLayoutObject = shadowRoot->host().layoutObject()) |
| 1154 return *hostLayoutObject; |
| 1155 } |
| 1154 } | 1156 } |
| 1155 } | 1157 } |
| 1156 | 1158 |
| 1157 return layoutObject; | 1159 return layoutObject; |
| 1158 } | 1160 } |
| 1159 | 1161 |
| 1160 bool PaintLayerScrollableArea::needsScrollbarReconstruction() const { | 1162 bool PaintLayerScrollableArea::needsScrollbarReconstruction() const { |
| 1161 const LayoutObject& styleSource = scrollbarStyleSource(box()); | 1163 const LayoutObject& styleSource = scrollbarStyleSource(box()); |
| 1162 bool shouldUseCustom = | 1164 bool shouldUseCustom = |
| 1163 styleSource.isBox() && | 1165 styleSource.isBox() && |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 | 2132 |
| 2131 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2133 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 2132 clampScrollableAreas() { | 2134 clampScrollableAreas() { |
| 2133 for (auto& scrollableArea : *s_needsClamp) | 2135 for (auto& scrollableArea : *s_needsClamp) |
| 2134 scrollableArea->clampScrollOffsetAfterOverflowChange(); | 2136 scrollableArea->clampScrollOffsetAfterOverflowChange(); |
| 2135 delete s_needsClamp; | 2137 delete s_needsClamp; |
| 2136 s_needsClamp = nullptr; | 2138 s_needsClamp = nullptr; |
| 2137 } | 2139 } |
| 2138 | 2140 |
| 2139 } // namespace blink | 2141 } // namespace blink |
| OLD | NEW |