| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 63 #include "core/layout/compositing/CompositedLayerMapping.h" | 63 #include "core/layout/compositing/CompositedLayerMapping.h" | 
| 64 #include "core/layout/compositing/PaintLayerCompositor.h" | 64 #include "core/layout/compositing/PaintLayerCompositor.h" | 
| 65 #include "core/loader/FrameLoaderClient.h" | 65 #include "core/loader/FrameLoaderClient.h" | 
| 66 #include "core/page/ChromeClient.h" | 66 #include "core/page/ChromeClient.h" | 
| 67 #include "core/page/FocusController.h" | 67 #include "core/page/FocusController.h" | 
| 68 #include "core/page/Page.h" | 68 #include "core/page/Page.h" | 
| 69 #include "core/page/scrolling/ScrollingCoordinator.h" | 69 #include "core/page/scrolling/ScrollingCoordinator.h" | 
| 70 #include "core/paint/PaintLayerFragment.h" | 70 #include "core/paint/PaintLayerFragment.h" | 
| 71 #include "platform/PlatformGestureEvent.h" | 71 #include "platform/PlatformGestureEvent.h" | 
| 72 #include "platform/PlatformMouseEvent.h" | 72 #include "platform/PlatformMouseEvent.h" | 
|  | 73 #include "platform/graphics/CompositorMutableProperties.h" | 
| 73 #include "platform/graphics/GraphicsLayer.h" | 74 #include "platform/graphics/GraphicsLayer.h" | 
| 74 #include "platform/graphics/paint/DrawingRecorder.h" | 75 #include "platform/graphics/paint/DrawingRecorder.h" | 
| 75 #include "platform/scroll/ScrollAnimatorBase.h" | 76 #include "platform/scroll/ScrollAnimatorBase.h" | 
| 76 #include "platform/scroll/ScrollbarTheme.h" | 77 #include "platform/scroll/ScrollbarTheme.h" | 
| 77 #include "public/platform/Platform.h" | 78 #include "public/platform/Platform.h" | 
| 78 #include "public/platform/WebCompositorMutableProperties.h" |  | 
| 79 | 79 | 
| 80 namespace blink { | 80 namespace blink { | 
| 81 | 81 | 
| 82 const int ResizerControlExpandRatioForTouch = 2; | 82 const int ResizerControlExpandRatioForTouch = 2; | 
| 83 | 83 | 
| 84 PaintLayerScrollableArea::PaintLayerScrollableArea(PaintLayer& layer) | 84 PaintLayerScrollableArea::PaintLayerScrollableArea(PaintLayer& layer) | 
| 85     : m_layer(layer) | 85     : m_layer(layer) | 
| 86     , m_inResizeMode(false) | 86     , m_inResizeMode(false) | 
| 87     , m_scrollsOverflow(false) | 87     , m_scrollsOverflow(false) | 
| 88     , m_inOverflowRelayout(false) | 88     , m_inOverflowRelayout(false) | 
| (...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1385     DisableCompositingQueryAsserts disabler; | 1385     DisableCompositingQueryAsserts disabler; | 
| 1386     return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi
      ng()->scrollingLayer(); | 1386     return layer()->hasCompositedLayerMapping() && layer()->compositedLayerMappi
      ng()->scrollingLayer(); | 
| 1387 } | 1387 } | 
| 1388 | 1388 | 
| 1389 static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode 
      mode, const PaintLayer* layer) | 1389 static bool layerNeedsCompositedScrolling(PaintLayerScrollableArea::LCDTextMode 
      mode, const PaintLayer* layer) | 
| 1390 { | 1390 { | 
| 1391     if (!layer->scrollsOverflow()) | 1391     if (!layer->scrollsOverflow()) | 
| 1392         return false; | 1392         return false; | 
| 1393 | 1393 | 
| 1394     Node* node = layer->enclosingNode(); | 1394     Node* node = layer->enclosingNode(); | 
| 1395     if (node && node->isElementNode() && (toElement(node)->compositorMutableProp
      erties() & (WebCompositorMutablePropertyScrollTop | WebCompositorMutableProperty
      ScrollLeft))) | 1395     if (node && node->isElementNode() && (toElement(node)->compositorMutableProp
      erties() & (CompositorMutableProperty::kScrollTop | CompositorMutableProperty::k
      ScrollLeft))) | 
| 1396         return true; | 1396         return true; | 
| 1397 | 1397 | 
| 1398     if (mode == PaintLayerScrollableArea::ConsiderLCDText && !layer->compositor(
      )->preferCompositingToLCDTextEnabled()) | 1398     if (mode == PaintLayerScrollableArea::ConsiderLCDText && !layer->compositor(
      )->preferCompositingToLCDTextEnabled()) | 
| 1399         return false; | 1399         return false; | 
| 1400 | 1400 | 
| 1401     return !layer->hasDescendantWithClipPath() | 1401     return !layer->hasDescendantWithClipPath() | 
| 1402         && !layer->hasAncestorWithClipPath() | 1402         && !layer->hasAncestorWithClipPath() | 
| 1403         && !layer->layoutObject()->style()->hasBorderRadius(); | 1403         && !layer->layoutObject()->style()->hasBorderRadius(); | 
| 1404 } | 1404 } | 
| 1405 | 1405 | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1536 } | 1536 } | 
| 1537 | 1537 | 
| 1538 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1538 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 
| 1539 { | 1539 { | 
| 1540     visitor->trace(m_scrollableArea); | 1540     visitor->trace(m_scrollableArea); | 
| 1541     visitor->trace(m_hBar); | 1541     visitor->trace(m_hBar); | 
| 1542     visitor->trace(m_vBar); | 1542     visitor->trace(m_vBar); | 
| 1543 } | 1543 } | 
| 1544 | 1544 | 
| 1545 } // namespace blink | 1545 } // namespace blink | 
| OLD | NEW | 
|---|