Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp

Issue 2036403002: Always use the WebFrameWidget when attaching the root graphics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 public: 53 public:
54 ScrollingCoordinatorTest() 54 ScrollingCoordinatorTest()
55 : m_baseURL("http://www.test.com/") 55 : m_baseURL("http://www.test.com/")
56 { 56 {
57 m_helper.initialize(true, nullptr, &m_mockWebViewClient, nullptr, &confi gureSettings); 57 m_helper.initialize(true, nullptr, &m_mockWebViewClient, nullptr, &confi gureSettings);
58 webViewImpl()->resize(IntSize(320, 240)); 58 webViewImpl()->resize(IntSize(320, 240));
59 59
60 // OSX attaches main frame scrollbars to the VisualViewport so the Visua lViewport layers need 60 // OSX attaches main frame scrollbars to the VisualViewport so the Visua lViewport layers need
61 // to be initialized. 61 // to be initialized.
62 webViewImpl()->updateAllLifecyclePhases(); 62 webViewImpl()->updateAllLifecyclePhases();
63 webViewImpl()->setRootGraphicsLayer( 63 WebFrameWidget* mainFrameWidget = static_cast<WebFrameWidget*>(webViewIm pl()->mainFrame()->toWebLocalFrame()->frameWidget());
64 mainFrameWidget->setRootGraphicsLayer(
64 webViewImpl()->mainFrameImpl()->frame()->view()->layoutViewItem().co mpositor()->rootGraphicsLayer()); 65 webViewImpl()->mainFrameImpl()->frame()->view()->layoutViewItem().co mpositor()->rootGraphicsLayer());
65 } 66 }
66 67
67 ~ScrollingCoordinatorTest() override 68 ~ScrollingCoordinatorTest() override
68 { 69 {
69 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs(); 70 Platform::current()->getURLLoaderMockFactory()->unregisterAllURLs();
70 WebCache::clear(); 71 WebCache::clear();
71 } 72 }
72 73
73 void navigateTo(const std::string& url) 74 void navigateTo(const std::string& url)
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // remove custom scrollbar class, the scrollbar is expected to scroll on 666 // remove custom scrollbar class, the scrollbar is expected to scroll on
666 // impl thread as it is an overlay scrollbar. 667 // impl thread as it is an overlay scrollbar.
667 container->removeAttribute("class"); 668 container->removeAttribute("class");
668 forceFullCompositingUpdate(); 669 forceFullCompositingUpdate();
669 scrollbarGraphicsLayer = compositedLayerMapping->layerForVerticalScrollbar() ; 670 scrollbarGraphicsLayer = compositedLayerMapping->layerForVerticalScrollbar() ;
670 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->shouldScrollOnMainThre ad()); 671 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->shouldScrollOnMainThre ad());
671 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->mainThreadScrollingRea sons() & MainThreadScrollingReason::kCustomScrollbarScrolling); 672 ASSERT_FALSE(scrollbarGraphicsLayer->platformLayer()->mainThreadScrollingRea sons() & MainThreadScrollingReason::kCustomScrollbarScrolling);
672 } 673 }
673 674
674 } // namespace blink 675 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698