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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.h

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Dmitry's comments + sync. Created 4 years, 3 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 void adjustViewSizeAndLayout(); 183 void adjustViewSizeAndLayout();
184 184
185 // Scale used to convert incoming input events. 185 // Scale used to convert incoming input events.
186 float inputEventsScaleFactor() const; 186 float inputEventsScaleFactor() const;
187 187
188 // Offset used to convert incoming input events while emulating device metic s. 188 // Offset used to convert incoming input events while emulating device metic s.
189 IntSize inputEventsOffsetForEmulation() const; 189 IntSize inputEventsOffsetForEmulation() const;
190 void setInputEventsTransformForEmulation(const IntSize&, float); 190 void setInputEventsTransformForEmulation(const IntSize&, float);
191 191
192 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro llBehaviorInstant) override; 192 void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavior = Scro llBehaviorInstant) override;
193 void didChangeScrollOffset();
193 194
194 void didUpdateElasticOverscroll(); 195 void didUpdateElasticOverscroll();
195 196
196 void viewportSizeChanged(bool widthChanged, bool heightChanged); 197 void viewportSizeChanged(bool widthChanged, bool heightChanged);
197 198
198 AtomicString mediaType() const; 199 AtomicString mediaType() const;
199 void setMediaType(const AtomicString&); 200 void setMediaType(const AtomicString&);
200 void adjustMediaTypeForPrinting(bool printing); 201 void adjustMediaTypeForPrinting(bool printing);
201 202
202 WebDisplayMode displayMode() { return m_displayMode; } 203 WebDisplayMode displayMode() { return m_displayMode; }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 443
443 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } 444 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
444 445
445 // The visible content rect has a location that is the scrolled offset of 446 // The visible content rect has a location that is the scrolled offset of
446 // the document. The width and height are the layout viewport width and 447 // the document. The width and height are the layout viewport width and
447 // height. By default the scrollbars themselves are excluded from this 448 // height. By default the scrollbars themselves are excluded from this
448 // rectangle, but an optional boolean argument allows them to be included. 449 // rectangle, but an optional boolean argument allows them to be included.
449 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t override; 450 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t override;
450 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons t; 451 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons t;
451 452
453 // Clips the provided rect to the visible content area. For this purpose, we
454 // also query the chrome client for any active overrides to the visible area
455 // (e.g. DevTool's viewport override).
456 void clipPaintRect(FloatRect*) const;
457
452 // Functions for getting/setting the size of the document contained inside t he FrameView (as an IntSize or as individual width and height 458 // Functions for getting/setting the size of the document contained inside t he FrameView (as an IntSize or as individual width and height
453 // values). 459 // values).
454 IntSize contentsSize() const override; // Always at least as big as the visi bleWidth()/visibleHeight(). 460 IntSize contentsSize() const override; // Always at least as big as the visi bleWidth()/visibleHeight().
455 int contentsWidth() const { return contentsSize().width(); } 461 int contentsWidth() const { return contentsSize().width(); }
456 int contentsHeight() const { return contentsSize().height(); } 462 int contentsHeight() const { return contentsSize().height(); }
457 463
458 // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values). 464 // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values).
459 // Be careful in using the Double version scrollPositionDouble() and scrollO ffsetDouble(). They are meant to be 465 // Be careful in using the Double version scrollPositionDouble() and scrollO ffsetDouble(). They are meant to be
460 // used to communicate the fractional scroll position/offset with chromium c ompositor which can do sub-pixel positioning. 466 // used to communicate the fractional scroll position/offset with chromium c ompositor which can do sub-pixel positioning.
461 // Do not call these if the scroll position/offset is used in Blink for posi tioning. Use the Int version instead. 467 // Do not call these if the scroll position/offset is used in Blink for posi tioning. Use the Int version instead.
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 981 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
976 setIsVisuallyNonEmpty(); 982 setIsVisuallyNonEmpty();
977 } 983 }
978 984
979 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 985 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
980 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 986 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
981 987
982 } // namespace blink 988 } // namespace blink
983 989
984 #endif // FrameView_h 990 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698