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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adress Dmitry's comments + sync. Created 4 years, 2 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) 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@gmail.com> 9 * Christian Biesinger <cbiesinger@gmail.com>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 if (box().node()) 406 if (box().node())
407 box().node()->document().enqueueScrollEventForNode(box().node()); 407 box().node()->document().enqueueScrollEventForNode(box().node());
408 408
409 if (AXObjectCache* cache = box().document().existingAXObjectCache()) 409 if (AXObjectCache* cache = box().document().existingAXObjectCache())
410 cache->handleScrollPositionChanged(&box()); 410 cache->handleScrollPositionChanged(&box());
411 box().view()->clearHitTestCache(); 411 box().view()->clearHitTestCache();
412 412
413 // Inform the FrameLoader of the new scroll position, so it can be restored when navigating back. 413 // Inform the FrameLoader of the new scroll position, so it can be restored when navigating back.
414 if (layer()->isRootLayer()) { 414 if (layer()->isRootLayer()) {
415 frameView->frame().loader().saveScrollState(); 415 frameView->frame().loader().saveScrollState();
416 frame->loader().client()->didChangeScrollOffset(); 416 frameView->didChangeScrollOffset();
417 } 417 }
418 418
419 // All scrolls clear the fragment anchor. 419 // All scrolls clear the fragment anchor.
420 frameView->clearFragmentAnchor(); 420 frameView->clearFragmentAnchor();
421 421
422 // Clear the scroll anchor, unless it is the reason for this scroll. 422 // Clear the scroll anchor, unless it is the reason for this scroll.
423 if (RuntimeEnabledFeatures::scrollAnchoringEnabled() && scrollType != Anchor ingScroll) 423 if (RuntimeEnabledFeatures::scrollAnchoringEnabled() && scrollType != Anchor ingScroll)
424 scrollAnchor()->clear(); 424 scrollAnchor()->clear();
425 } 425 }
426 426
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 1768
1769 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as() 1769 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre as()
1770 { 1770 {
1771 for (auto& scrollableArea : *s_needsClamp) 1771 for (auto& scrollableArea : *s_needsClamp)
1772 scrollableArea->clampScrollPositionsAfterLayout(); 1772 scrollableArea->clampScrollPositionsAfterLayout();
1773 delete s_needsClamp; 1773 delete s_needsClamp;
1774 s_needsClamp = nullptr; 1774 s_needsClamp = nullptr;
1775 } 1775 }
1776 1776
1777 } // namespace blink 1777 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/ChromeClient.h ('k') | third_party/WebKit/Source/platform/graphics/GraphicsLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698