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

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

Issue 2499853002: Fixed clip resize for document.rootScroller with inertTopControls (Closed)
Patch Set: Fixed typo Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/web/tests/RootScrollerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/VisualViewport.h" 5 #include "core/frame/VisualViewport.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/BrowserControls.h" 8 #include "core/frame/BrowserControls.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after
2368 // setNeedsLayout from viewportSizeChanged. 2368 // setNeedsLayout from viewportSizeChanged.
2369 document->view()->viewportSizeChanged(false, true); 2369 document->view()->viewportSizeChanged(false, true);
2370 unsigned needsLayoutObjects = 0; 2370 unsigned needsLayoutObjects = 0;
2371 unsigned totalObjects = 0; 2371 unsigned totalObjects = 0;
2372 bool isSubtree = false; 2372 bool isSubtree = false;
2373 EXPECT_FALSE(document->view()->needsLayout()); 2373 EXPECT_FALSE(document->view()->needsLayout());
2374 document->view()->countObjectsNeedingLayout(needsLayoutObjects, totalObjects, 2374 document->view()->countObjectsNeedingLayout(needsLayoutObjects, totalObjects,
2375 isSubtree); 2375 isSubtree);
2376 EXPECT_EQ(0u, needsLayoutObjects); 2376 EXPECT_EQ(0u, needsLayoutObjects);
2377 2377
2378 webViewImpl->updateAllLifecyclePhases();
2379
2378 // Do a real resize to check for invalidations. 2380 // Do a real resize to check for invalidations.
2379 document->view()->setTracksPaintInvalidations(true); 2381 document->view()->setTracksPaintInvalidations(true);
2380 webViewImpl->resizeWithBrowserControls(WebSize(pageWidth, smallestHeight), 2382 webViewImpl->resizeWithBrowserControls(WebSize(pageWidth, smallestHeight),
2381 browserControlsHeight, true); 2383 browserControlsHeight, true);
2382 2384
2383 // The layout size should not have changed. 2385 // The layout size should not have changed.
2384 ASSERT_EQ(pageWidth, document->view()->layoutSize().width()); 2386 ASSERT_EQ(pageWidth, document->view()->layoutSize().width());
2385 ASSERT_EQ(smallestHeight, document->view()->layoutSize().height()); 2387 ASSERT_EQ(smallestHeight, document->view()->layoutSize().height());
2386 2388
2387 const RasterInvalidationTracking* invalidationTracking = 2389 const RasterInvalidationTracking* invalidationTracking =
(...skipping 10 matching lines...) Expand all
2398 if (rootLayerScrolling) 2400 if (rootLayerScrolling)
2399 EXPECT_TRUE(invalidationTracking); 2401 EXPECT_TRUE(invalidationTracking);
2400 else 2402 else
2401 EXPECT_FALSE(invalidationTracking); 2403 EXPECT_FALSE(invalidationTracking);
2402 2404
2403 document->view()->setTracksPaintInvalidations(false); 2405 document->view()->setTracksPaintInvalidations(false);
2404 RuntimeEnabledFeatures::setInertTopControlsEnabled(originalInertTopControls); 2406 RuntimeEnabledFeatures::setInertTopControlsEnabled(originalInertTopControls);
2405 } 2407 }
2406 2408
2407 } // namespace 2409 } // namespace
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/RootScrollerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698