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/core/frame/FrameView.h

Issue 1844013002: Fix main thread top controls scrolling to mirror CC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@propertyTreesBoundsDelta
Patch Set: Override top controls resize() in classes that override resize() Created 4 years, 8 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) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 m_tickmarks = tickmarks; 349 m_tickmarks = tickmarks;
350 invalidatePaintForTickmarks(); 350 invalidatePaintForTickmarks();
351 } 351 }
352 352
353 void invalidatePaintForTickmarks(); 353 void invalidatePaintForTickmarks();
354 354
355 // Since the compositor can resize the viewport due to top controls and 355 // Since the compositor can resize the viewport due to top controls and
356 // commit scroll offsets before a WebView::resize occurs, we need to adjust 356 // commit scroll offsets before a WebView::resize occurs, we need to adjust
357 // our scroll extents to prevent clamping the scroll offsets. 357 // our scroll extents to prevent clamping the scroll offsets.
358 void setTopControlsViewportAdjustment(float); 358 void setTopControlsViewportAdjustment(float);
359 IntSize topControlsSize() const { return IntSize(0, roundf(m_topControlsView portAdjustment)); } 359 IntSize topControlsSize() const { return IntSize(0, ceilf(m_topControlsViewp ortAdjustment)); }
360 360
361 IntPoint maximumScrollPosition() const override; 361 IntPoint maximumScrollPosition() const override;
362 362
363 // ScrollableArea interface 363 // ScrollableArea interface
364 void scrollControlWasSetNeedsPaintInvalidation() override { } 364 void scrollControlWasSetNeedsPaintInvalidation() override { }
365 void getTickmarks(Vector<IntRect>&) const override; 365 void getTickmarks(Vector<IntRect>&) const override;
366 IntRect scrollableAreaBoundingBox() const override; 366 IntRect scrollableAreaBoundingBox() const override;
367 bool scrollAnimatorEnabled() const override; 367 bool scrollAnimatorEnabled() const override;
368 bool usesCompositedScrolling() const override; 368 bool usesCompositedScrolling() const override;
369 bool shouldScrollOnMainThread() const override; 369 bool shouldScrollOnMainThread() const override;
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 931 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
932 setIsVisuallyNonEmpty(); 932 setIsVisuallyNonEmpty();
933 } 933 }
934 934
935 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 935 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
936 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 936 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
937 937
938 } // namespace blink 938 } // namespace blink
939 939
940 #endif // FrameView_h 940 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698