| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| 11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
| 12 * | 12 * |
| 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND | 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND |
| 14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 14 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR | 16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR |
| 17 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 17 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | 19 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | 20 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #include "core/page/scrolling/ScrollingCoordinator.h" | 25 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 26 | 26 |
| 27 #include "core/css/CSSStyleSheet.h" | 27 #include "core/css/CSSStyleSheet.h" |
| 28 #include "core/css/StyleSheetList.h" | 28 #include "core/css/StyleSheetList.h" |
| 29 #include "core/exported/WebViewBase.h" |
| 29 #include "core/frame/FrameView.h" | 30 #include "core/frame/FrameView.h" |
| 30 #include "core/frame/VisualViewport.h" | 31 #include "core/frame/VisualViewport.h" |
| 31 #include "core/html/HTMLIFrameElement.h" | 32 #include "core/html/HTMLIFrameElement.h" |
| 32 #include "core/layout/LayoutPart.h" | 33 #include "core/layout/LayoutPart.h" |
| 33 #include "core/layout/api/LayoutViewItem.h" | 34 #include "core/layout/api/LayoutViewItem.h" |
| 34 #include "core/layout/compositing/CompositedLayerMapping.h" | 35 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 35 #include "core/layout/compositing/PaintLayerCompositor.h" | 36 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 36 #include "core/page/Page.h" | 37 #include "core/page/Page.h" |
| 37 #include "platform/geometry/IntPoint.h" | 38 #include "platform/geometry/IntPoint.h" |
| 38 #include "platform/geometry/IntRect.h" | 39 #include "platform/geometry/IntRect.h" |
| 39 #include "platform/graphics/GraphicsLayer.h" | 40 #include "platform/graphics/GraphicsLayer.h" |
| 40 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" | 41 #include "platform/testing/RuntimeEnabledFeaturesTestHelpers.h" |
| 41 #include "platform/testing/URLTestHelpers.h" | 42 #include "platform/testing/URLTestHelpers.h" |
| 42 #include "platform/testing/UnitTestHelpers.h" | 43 #include "platform/testing/UnitTestHelpers.h" |
| 43 #include "public/platform/Platform.h" | 44 #include "public/platform/Platform.h" |
| 44 #include "public/platform/WebCache.h" | 45 #include "public/platform/WebCache.h" |
| 45 #include "public/platform/WebLayer.h" | 46 #include "public/platform/WebLayer.h" |
| 46 #include "public/platform/WebLayerPositionConstraint.h" | 47 #include "public/platform/WebLayerPositionConstraint.h" |
| 47 #include "public/platform/WebLayerTreeView.h" | 48 #include "public/platform/WebLayerTreeView.h" |
| 48 #include "public/platform/WebURLLoaderMockFactory.h" | 49 #include "public/platform/WebURLLoaderMockFactory.h" |
| 49 #include "public/web/WebSettings.h" | 50 #include "public/web/WebSettings.h" |
| 50 #include "public/web/WebViewClient.h" | 51 #include "public/web/WebViewClient.h" |
| 51 #include "testing/gtest/include/gtest/gtest.h" | 52 #include "testing/gtest/include/gtest/gtest.h" |
| 52 #include "web/WebLocalFrameImpl.h" | 53 #include "web/WebLocalFrameImpl.h" |
| 53 #include "web/WebViewImpl.h" | |
| 54 #include "web/tests/FrameTestHelpers.h" | 54 #include "web/tests/FrameTestHelpers.h" |
| 55 | 55 |
| 56 namespace blink { | 56 namespace blink { |
| 57 | 57 |
| 58 class ScrollingCoordinatorTest : public ::testing::Test, | 58 class ScrollingCoordinatorTest : public ::testing::Test, |
| 59 public ::testing::WithParamInterface<bool>, | 59 public ::testing::WithParamInterface<bool>, |
| 60 private ScopedRootLayerScrollingForTest { | 60 private ScopedRootLayerScrollingForTest { |
| 61 public: | 61 public: |
| 62 ScrollingCoordinatorTest() | 62 ScrollingCoordinatorTest() |
| 63 : ScopedRootLayerScrollingForTest(GetParam()), | 63 : ScopedRootLayerScrollingForTest(GetParam()), |
| (...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1233 ForceFullCompositingUpdate(); | 1233 ForceFullCompositingUpdate(); |
| 1234 PaintLayerScrollableArea* scrollable_area2 = | 1234 PaintLayerScrollableArea* scrollable_area2 = |
| 1235 ToLayoutBoxModelObject(container2->GetLayoutObject()) | 1235 ToLayoutBoxModelObject(container2->GetLayoutObject()) |
| 1236 ->GetScrollableArea(); | 1236 ->GetScrollableArea(); |
| 1237 ASSERT_TRUE(scrollable_area2); | 1237 ASSERT_TRUE(scrollable_area2); |
| 1238 EXPECT_TRUE(scrollable_area2->GetNonCompositedMainThreadScrollingReasons() & | 1238 EXPECT_TRUE(scrollable_area2->GetNonCompositedMainThreadScrollingReasons() & |
| 1239 MainThreadScrollingReason::kHasBorderRadius); | 1239 MainThreadScrollingReason::kHasBorderRadius); |
| 1240 } | 1240 } |
| 1241 | 1241 |
| 1242 } // namespace blink | 1242 } // namespace blink |
| OLD | NEW |