OLD | NEW |
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@gmail.com> | 9 * Christian Biesinger <cbiesinger@gmail.com> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 | 981 |
982 // Try the <body> element first as a scrollbar source. | 982 // Try the <body> element first as a scrollbar source. |
983 Element* body = doc.body(); | 983 Element* body = doc.body(); |
984 if (body && body->layoutObject() && body->layoutObject()->style()->h
asPseudoStyle(PseudoIdScrollbar)) | 984 if (body && body->layoutObject() && body->layoutObject()->style()->h
asPseudoStyle(PseudoIdScrollbar)) |
985 return *body->layoutObject(); | 985 return *body->layoutObject(); |
986 | 986 |
987 // If the <body> didn't have a custom style, then the root element m
ight. | 987 // If the <body> didn't have a custom style, then the root element m
ight. |
988 Element* docElement = doc.documentElement(); | 988 Element* docElement = doc.documentElement(); |
989 if (docElement && docElement->layoutObject() && docElement->layoutOb
ject()->style()->hasPseudoStyle(PseudoIdScrollbar)) | 989 if (docElement && docElement->layoutObject() && docElement->layoutOb
ject()->style()->hasPseudoStyle(PseudoIdScrollbar)) |
990 return *docElement->layoutObject(); | 990 return *docElement->layoutObject(); |
991 | |
992 // If we have an owning ipage/LocalFrame element, then it can set th
e custom scrollbar also. | |
993 LayoutPart* frameLayoutObject = node->document().frame()->ownerLayou
tObject(); | |
994 if (frameLayoutObject && frameLayoutObject->style()->hasPseudoStyle(
PseudoIdScrollbar)) | |
995 return *frameLayoutObject; | |
996 } | 991 } |
997 | 992 |
998 if (layoutObject.styleRef().hasPseudoStyle(PseudoIdScrollbar)) | 993 if (layoutObject.styleRef().hasPseudoStyle(PseudoIdScrollbar)) |
999 return layoutObject; | 994 return layoutObject; |
1000 | 995 |
1001 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { | 996 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { |
1002 if (shadowRoot->type() == ShadowRootType::UserAgent) | 997 if (shadowRoot->type() == ShadowRootType::UserAgent) |
1003 return *shadowRoot->host().layoutObject(); | 998 return *shadowRoot->host().layoutObject(); |
1004 } | 999 } |
1005 } | 1000 } |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1718 | 1713 |
1719 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre
as() | 1714 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre
as() |
1720 { | 1715 { |
1721 for (auto& scrollableArea : *s_needsClamp) | 1716 for (auto& scrollableArea : *s_needsClamp) |
1722 scrollableArea->clampScrollPositionsAfterLayout(); | 1717 scrollableArea->clampScrollPositionsAfterLayout(); |
1723 delete s_needsClamp; | 1718 delete s_needsClamp; |
1724 s_needsClamp = nullptr; | 1719 s_needsClamp = nullptr; |
1725 } | 1720 } |
1726 | 1721 |
1727 } // namespace blink | 1722 } // namespace blink |
OLD | NEW |