| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 */ | 42 */ |
| 43 | 43 |
| 44 #include "config.h" | 44 #include "config.h" |
| 45 #include "core/paint/DeprecatedPaintLayerScrollableArea.h" | 45 #include "core/paint/DeprecatedPaintLayerScrollableArea.h" |
| 46 | 46 |
| 47 #include "core/css/PseudoStyleRequest.h" | 47 #include "core/css/PseudoStyleRequest.h" |
| 48 #include "core/dom/AXObjectCache.h" | 48 #include "core/dom/AXObjectCache.h" |
| 49 #include "core/dom/Node.h" | 49 #include "core/dom/Node.h" |
| 50 #include "core/dom/shadow/ShadowRoot.h" | 50 #include "core/dom/shadow/ShadowRoot.h" |
| 51 #include "core/editing/FrameSelection.h" | 51 #include "core/editing/FrameSelection.h" |
| 52 #include "core/frame/FrameHost.h" | |
| 53 #include "core/frame/FrameView.h" | 52 #include "core/frame/FrameView.h" |
| 54 #include "core/frame/LocalFrame.h" | 53 #include "core/frame/LocalFrame.h" |
| 55 #include "core/frame/Settings.h" | 54 #include "core/frame/Settings.h" |
| 56 #include "core/html/HTMLFrameOwnerElement.h" | 55 #include "core/html/HTMLFrameOwnerElement.h" |
| 57 #include "core/input/EventHandler.h" | 56 #include "core/input/EventHandler.h" |
| 58 #include "core/layout/LayoutGeometryMap.h" | 57 #include "core/layout/LayoutGeometryMap.h" |
| 59 #include "core/layout/LayoutPart.h" | 58 #include "core/layout/LayoutPart.h" |
| 60 #include "core/layout/LayoutScrollbar.h" | 59 #include "core/layout/LayoutScrollbar.h" |
| 61 #include "core/layout/LayoutScrollbarPart.h" | 60 #include "core/layout/LayoutScrollbarPart.h" |
| 62 #include "core/layout/LayoutTheme.h" | 61 #include "core/layout/LayoutTheme.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 ScrollableArea::trace(visitor); | 163 ScrollableArea::trace(visitor); |
| 165 } | 164 } |
| 166 | 165 |
| 167 HostWindow* DeprecatedPaintLayerScrollableArea::hostWindow() const | 166 HostWindow* DeprecatedPaintLayerScrollableArea::hostWindow() const |
| 168 { | 167 { |
| 169 if (Page* page = box().frame()->page()) | 168 if (Page* page = box().frame()->page()) |
| 170 return &page->chromeClient(); | 169 return &page->chromeClient(); |
| 171 return nullptr; | 170 return nullptr; |
| 172 } | 171 } |
| 173 | 172 |
| 174 GraphicsLayer* DeprecatedPaintLayerScrollableArea::layerForScrollbarContainer()
const | |
| 175 { | |
| 176 if (layer()->isRootLayer()) | |
| 177 return box().frame()->host()->visualViewport().layerForScrollbarContaine
r(); | |
| 178 return layerForContainer(); | |
| 179 } | |
| 180 | |
| 181 GraphicsLayer* DeprecatedPaintLayerScrollableArea::layerForScrolling() const | 173 GraphicsLayer* DeprecatedPaintLayerScrollableArea::layerForScrolling() const |
| 182 { | 174 { |
| 183 return layer()->hasCompositedDeprecatedPaintLayerMapping() ? layer()->compos
itedDeprecatedPaintLayerMapping()->scrollingContentsLayer() : 0; | 175 return layer()->hasCompositedDeprecatedPaintLayerMapping() ? layer()->compos
itedDeprecatedPaintLayerMapping()->scrollingContentsLayer() : 0; |
| 184 } | 176 } |
| 185 | 177 |
| 186 GraphicsLayer* DeprecatedPaintLayerScrollableArea::layerForHorizontalScrollbar()
const | 178 GraphicsLayer* DeprecatedPaintLayerScrollableArea::layerForHorizontalScrollbar()
const |
| 187 { | 179 { |
| 188 // See crbug.com/343132. | 180 // See crbug.com/343132. |
| 189 DisableCompositingQueryAsserts disabler; | 181 DisableCompositingQueryAsserts disabler; |
| 190 | 182 |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 return false; | 1471 return false; |
| 1480 | 1472 |
| 1481 LocalFrame* frame = box().frame(); | 1473 LocalFrame* frame = box().frame(); |
| 1482 if (!frame || !frame->isMainFrame() || !frame->settings()) | 1474 if (!frame || !frame->isMainFrame() || !frame->settings()) |
| 1483 return false; | 1475 return false; |
| 1484 | 1476 |
| 1485 return frame->settings()->viewportMetaEnabled(); | 1477 return frame->settings()->viewportMetaEnabled(); |
| 1486 } | 1478 } |
| 1487 | 1479 |
| 1488 } // namespace blink | 1480 } // namespace blink |
| OLD | NEW |