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

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: unique_ptr -> Optional. Created 4 years, 4 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 442
442 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } 443 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
443 444
444 // The visible content rect has a location that is the scrolled offset of 445 // The visible content rect has a location that is the scrolled offset of
445 // the document. The width and height are the layout viewport width and 446 // the document. The width and height are the layout viewport width and
446 // height. By default the scrollbars themselves are excluded from this 447 // height. By default the scrollbars themselves are excluded from this
447 // rectangle, but an optional boolean argument allows them to be included. 448 // rectangle, but an optional boolean argument allows them to be included.
448 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t override; 449 IntRect visibleContentRect(IncludeScrollbarsInRect = ExcludeScrollbars) cons t override;
449 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons t; 450 IntSize visibleContentSize(IncludeScrollbarsInRect = ExcludeScrollbars) cons t;
450 451
452 // Set a custom painting area. Used for visual transform overrides to ensure
453 // that the content inside the overridden visible area is painted. If not
454 // set, the painting area defaults to visibleContentRect().
chrishtr 2016/08/12 22:24:24 Add a note that this should only be used by devtoo
Eric Seckler 2016/08/15 16:18:11 Done.
455 void setVisibleContentRectForPainting(const IntRect&);
456 void resetVisibleContentRectForPainting();
457 IntRect visibleContentRectForPainting() const;
458
451 // Functions for getting/setting the size of the document contained inside t he FrameView (as an IntSize or as individual width and height 459 // Functions for getting/setting the size of the document contained inside t he FrameView (as an IntSize or as individual width and height
452 // values). 460 // values).
453 IntSize contentsSize() const override; // Always at least as big as the visi bleWidth()/visibleHeight(). 461 IntSize contentsSize() const override; // Always at least as big as the visi bleWidth()/visibleHeight().
454 int contentsWidth() const { return contentsSize().width(); } 462 int contentsWidth() const { return contentsSize().width(); }
455 int contentsHeight() const { return contentsSize().height(); } 463 int contentsHeight() const { return contentsSize().height(); }
456 464
457 // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values). 465 // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values).
458 // Be careful in using the Double version scrollPositionDouble() and scrollO ffsetDouble(). They are meant to be 466 // Be careful in using the Double version scrollPositionDouble() and scrollO ffsetDouble(). They are meant to be
459 // used to communicate the fractional scroll position/offset with chromium c ompositor which can do sub-pixel positioning. 467 // used to communicate the fractional scroll position/offset with chromium c ompositor which can do sub-pixel positioning.
460 // Do not call these if the scroll position/offset is used in Blink for posi tioning. Use the Int version instead. 468 // Do not call these if the scroll position/offset is used in Blink for posi tioning. Use the Int version instead.
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 ScrollbarMode m_verticalScrollbarMode; 875 ScrollbarMode m_verticalScrollbarMode;
868 876
869 bool m_horizontalScrollbarLock; 877 bool m_horizontalScrollbarLock;
870 bool m_verticalScrollbarLock; 878 bool m_verticalScrollbarLock;
871 879
872 ChildrenWidgetSet m_children; 880 ChildrenWidgetSet m_children;
873 881
874 DoubleSize m_pendingScrollDelta; 882 DoubleSize m_pendingScrollDelta;
875 DoublePoint m_scrollPosition; 883 DoublePoint m_scrollPosition;
876 IntSize m_contentsSize; 884 IntSize m_contentsSize;
885 WTF::Optional<IntRect> m_visibleContentRectForPainting;
877 886
878 int m_scrollbarsAvoidingResizer; 887 int m_scrollbarsAvoidingResizer;
879 bool m_scrollbarsSuppressed; 888 bool m_scrollbarsSuppressed;
880 889
881 bool m_inUpdateScrollbars; 890 bool m_inUpdateScrollbars;
882 891
883 std::unique_ptr<LayoutAnalyzer> m_analyzer; 892 std::unique_ptr<LayoutAnalyzer> m_analyzer;
884 893
885 // Mark if something has changed in the mapping from Frame to GraphicsLayer 894 // Mark if something has changed in the mapping from Frame to GraphicsLayer
886 // and the Frame Timing regions should be recalculated. 895 // and the Frame Timing regions should be recalculated.
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold) 967 if (m_visuallyNonEmptyPixelCount > visualPixelThreshold)
959 setIsVisuallyNonEmpty(); 968 setIsVisuallyNonEmpty();
960 } 969 }
961 970
962 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView()); 971 DEFINE_TYPE_CASTS(FrameView, Widget, widget, widget->isFrameView(), widget.isFra meView());
963 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView()); 972 DEFINE_TYPE_CASTS(FrameView, ScrollableArea, scrollableArea, scrollableArea->isF rameView(), scrollableArea.isFrameView());
964 973
965 } // namespace blink 974 } // namespace blink
966 975
967 #endif // FrameView_h 976 #endif // FrameView_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | third_party/WebKit/Source/web/DevToolsEmulator.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698