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@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
959 return body->layoutObject(); | 959 return body->layoutObject(); |
960 | 960 |
961 // If the <body> didn't have a custom style, then the root element m ight. | 961 // If the <body> didn't have a custom style, then the root element m ight. |
962 Element* docElement = doc.documentElement(); | 962 Element* docElement = doc.documentElement(); |
963 if (docElement && docElement->layoutObject() && docElement->layoutOb ject()->style()->hasPseudoStyle(SCROLLBAR)) | 963 if (docElement && docElement->layoutObject() && docElement->layoutOb ject()->style()->hasPseudoStyle(SCROLLBAR)) |
964 return docElement->layoutObject(); | 964 return docElement->layoutObject(); |
965 | 965 |
966 // If we have an owning ipage/LocalFrame element, then it can set th e custom scrollbar also. | 966 // If we have an owning ipage/LocalFrame element, then it can set th e custom scrollbar also. |
967 LayoutPart* frameLayoutObject = node->document().frame()->ownerLayou tObject(); | 967 LayoutPart* frameLayoutObject = node->document().frame()->ownerLayou tObject(); |
968 if (frameLayoutObject && frameLayoutObject->style()->hasPseudoStyle( SCROLLBAR)) | 968 if (frameLayoutObject && frameLayoutObject->style()->hasPseudoStyle( SCROLLBAR)) |
969 return frameLayoutObject; | 969 return &layoutObject; |
skobes
2015/09/12 02:36:52
Based on the comment on line 966, it looks like th
| |
970 } | 970 } |
971 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { | 971 if (ShadowRoot* shadowRoot = node->containingShadowRoot()) { |
972 if (shadowRoot->type() == ShadowRootType::UserAgent) | 972 if (shadowRoot->type() == ShadowRootType::UserAgent) |
973 return shadowRoot->host()->layoutObject(); | 973 return shadowRoot->host()->layoutObject(); |
974 } | 974 } |
975 } | 975 } |
976 | 976 |
977 return &layoutObject; | 977 return &layoutObject; |
978 } | 978 } |
979 | 979 |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1479 return false; | 1479 return false; |
1480 | 1480 |
1481 LocalFrame* frame = box().frame(); | 1481 LocalFrame* frame = box().frame(); |
1482 if (!frame || !frame->isMainFrame() || !frame->settings()) | 1482 if (!frame || !frame->isMainFrame() || !frame->settings()) |
1483 return false; | 1483 return false; |
1484 | 1484 |
1485 return frame->settings()->viewportMetaEnabled(); | 1485 return frame->settings()->viewportMetaEnabled(); |
1486 } | 1486 } |
1487 | 1487 |
1488 } // namespace blink | 1488 } // namespace blink |
OLD | NEW |