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

Side by Side Diff: Source/core/platform/ScrollView.h

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Another rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/Screen.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Holger Hans Peter Freyther 3 * Copyright (C) 2009 Holger Hans Peter Freyther
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = Ex cludeScrollbars) const OVERRIDE; 123 virtual IntRect visibleContentRect(VisibleContentRectIncludesScrollbars = Ex cludeScrollbars) const OVERRIDE;
124 IntSize visibleSize() const { return visibleContentRect().size(); } 124 IntSize visibleSize() const { return visibleContentRect().size(); }
125 virtual int visibleWidth() const OVERRIDE { return visibleContentRect().widt h(); } 125 virtual int visibleWidth() const OVERRIDE { return visibleContentRect().widt h(); }
126 virtual int visibleHeight() const OVERRIDE { return visibleContentRect().hei ght(); } 126 virtual int visibleHeight() const OVERRIDE { return visibleContentRect().hei ght(); }
127 127
128 // visibleContentRect().size() is computed from unscaledVisibleContentSize() divided by the value of visibleContentScaleFactor. 128 // visibleContentRect().size() is computed from unscaledVisibleContentSize() divided by the value of visibleContentScaleFactor.
129 // For the main frame, visibleContentScaleFactor is equal to the page's page ScaleFactor; it's 1 otherwise. 129 // For the main frame, visibleContentScaleFactor is equal to the page's page ScaleFactor; it's 1 otherwise.
130 IntSize unscaledVisibleContentSize(VisibleContentRectIncludesScrollbars = Ex cludeScrollbars) const; 130 IntSize unscaledVisibleContentSize(VisibleContentRectIncludesScrollbars = Ex cludeScrollbars) const;
131 virtual float visibleContentScaleFactor() const { return 1; } 131 virtual float visibleContentScaleFactor() const { return 1; }
132 132
133 // Scale used to convert incoming input events. Usually the same as visibleC ontentScaleFactor(), unless specifically changed.
134 virtual float inputEventsScaleFactor() const { return visibleContentScaleFac tor(); }
135
133 // Functions for getting/setting the size webkit should use to layout the co ntents. By default this is the same as the visible 136 // Functions for getting/setting the size webkit should use to layout the co ntents. By default this is the same as the visible
134 // content size. Explicitly setting a layout size value will cause webkit to layout the contents using this size instead. 137 // content size. Explicitly setting a layout size value will cause webkit to layout the contents using this size instead.
135 IntSize layoutSize(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const; 138 IntSize layoutSize(VisibleContentRectIncludesScrollbars = ExcludeScrollbars) const;
136 int layoutWidth(VisibleContentRectIncludesScrollbars scrollbarInclusion = Ex cludeScrollbars) const { return layoutSize(scrollbarInclusion).width(); } 139 int layoutWidth(VisibleContentRectIncludesScrollbars scrollbarInclusion = Ex cludeScrollbars) const { return layoutSize(scrollbarInclusion).width(); }
137 int layoutHeight(VisibleContentRectIncludesScrollbars scrollbarInclusion = E xcludeScrollbars) const { return layoutSize(scrollbarInclusion).height(); } 140 int layoutHeight(VisibleContentRectIncludesScrollbars scrollbarInclusion = E xcludeScrollbars) const { return layoutSize(scrollbarInclusion).height(); }
138 IntSize fixedLayoutSize() const; 141 IntSize fixedLayoutSize() const;
139 void setFixedLayoutSize(const IntSize&); 142 void setFixedLayoutSize(const IntSize&);
140 bool useFixedLayout() const; 143 bool useFixedLayout() const;
141 void setUseFixedLayout(bool enable); 144 void setUseFixedLayout(bool enable);
142 145
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 ASSERT(!widget || widget->isScrollView()); 359 ASSERT(!widget || widget->isScrollView());
357 return static_cast<const ScrollView*>(widget); 360 return static_cast<const ScrollView*>(widget);
358 } 361 }
359 362
360 // This will catch anyone doing an unnecessary cast. 363 // This will catch anyone doing an unnecessary cast.
361 void toScrollView(const ScrollView*); 364 void toScrollView(const ScrollView*);
362 365
363 } // namespace WebCore 366 } // namespace WebCore
364 367
365 #endif // ScrollView_h 368 #endif // ScrollView_h
OLDNEW
« no previous file with comments | « Source/core/page/Screen.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698