| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/frame/FrameHost.h" | 5 #include "core/frame/FrameHost.h" |
| 6 #include "core/frame/FrameView.h" | 6 #include "core/frame/FrameView.h" |
| 7 #include "core/frame/RootFrameViewport.h" | 7 #include "core/frame/RootFrameViewport.h" |
| 8 #include "core/frame/TopControls.h" | 8 #include "core/frame/TopControls.h" |
| 9 #include "core/html/HTMLFrameOwnerElement.h" | 9 #include "core/html/HTMLFrameOwnerElement.h" |
| 10 #include "core/layout/LayoutBox.h" | 10 #include "core/layout/LayoutBox.h" |
| (...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 | 755 |
| 756 EXPECT_FALSE( | 756 EXPECT_FALSE( |
| 757 childCompositor->rootContentLayer()->platformLayer()->masksToBounds()); | 757 childCompositor->rootContentLayer()->platformLayer()->masksToBounds()); |
| 758 EXPECT_FALSE( | 758 EXPECT_FALSE( |
| 759 childCompositor->rootGraphicsLayer()->platformLayer()->masksToBounds()); | 759 childCompositor->rootGraphicsLayer()->platformLayer()->masksToBounds()); |
| 760 EXPECT_FALSE( | 760 EXPECT_FALSE( |
| 761 childCompositor->containerLayer()->platformLayer()->masksToBounds()); | 761 childCompositor->containerLayer()->platformLayer()->masksToBounds()); |
| 762 } | 762 } |
| 763 | 763 |
| 764 // Now reset the iframe's root scroller. Since the iframe itself is now the | 764 // Now reset the iframe's root scroller. Since the iframe itself is now the |
| 765 // global root scroller we want it to behave as if it were the main frame, whi
ch | 765 // global root scroller we want it to behave as if it were the main frame, |
| 766 // means it should clip only on its root content layer. | 766 // which means it should clip only on its root content layer. |
| 767 { | 767 { |
| 768 iframe->contentDocument()->setRootScroller(nullptr, nonThrow); | 768 iframe->contentDocument()->setRootScroller(nullptr, nonThrow); |
| 769 mainFrameView()->updateAllLifecyclePhases(); | 769 mainFrameView()->updateAllLifecyclePhases(); |
| 770 | 770 |
| 771 ASSERT_EQ(iframe, mainController->effectiveRootScroller()); | 771 ASSERT_EQ(iframe, mainController->effectiveRootScroller()); |
| 772 ASSERT_EQ(iframe->contentDocument()->documentElement(), | 772 ASSERT_EQ(iframe->contentDocument()->documentElement(), |
| 773 childController->effectiveRootScroller()); | 773 childController->effectiveRootScroller()); |
| 774 ASSERT_EQ(iframe->contentDocument()->documentElement(), | 774 ASSERT_EQ(iframe->contentDocument()->documentElement(), |
| 775 globalController.globalRootScroller()); | 775 globalController.globalRootScroller()); |
| 776 | 776 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 mainFrameView()->getRootFrameViewport()->serviceScrollAnimations(0); | 905 mainFrameView()->getRootFrameViewport()->serviceScrollAnimations(0); |
| 906 | 906 |
| 907 EXPECT_EQ(iframe->contentDocument()->documentElement(), | 907 EXPECT_EQ(iframe->contentDocument()->documentElement(), |
| 908 effectiveRootScroller(iframe->contentDocument())); | 908 effectiveRootScroller(iframe->contentDocument())); |
| 909 } | 909 } |
| 910 } | 910 } |
| 911 | 911 |
| 912 } // namespace | 912 } // namespace |
| 913 | 913 |
| 914 } // namespace blink | 914 } // namespace blink |
| OLD | NEW |