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

Unified Diff: third_party/WebKit/Source/core/page/Page.h

Issue 2724543002: Renamed deviceScaleFactor() to deviceScaleFactorDeprecated() in Page (Closed)
Patch Set: Rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/Page.h
diff --git a/third_party/WebKit/Source/core/page/Page.h b/third_party/WebKit/Source/core/page/Page.h
index 53fbb15b23e069a362494daf78758a4412a3dc44..32b7bcfaadcab46fa98eecc43278032f78793e25 100644
--- a/third_party/WebKit/Source/core/page/Page.h
+++ b/third_party/WebKit/Source/core/page/Page.h
@@ -69,7 +69,7 @@ class WebLayerTreeView;
typedef uint64_t LinkHash;
-float deviceScaleFactor(LocalFrame*);
+float deviceScaleFactorDeprecated(LocalFrame*);
class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
public Supplementable<Page>,
@@ -199,8 +199,18 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized<Page>,
void setPageScaleFactor(float);
float pageScaleFactor() const;
- float deviceScaleFactor() const { return m_deviceScaleFactor; }
- void setDeviceScaleFactor(float);
+ // Corresponds to pixel density of the device where this Page is
+ // being displayed. In multi-monitor setups this can vary between pages.
+ // This value does not account for Page zoom, use LocalFrame::devicePixelRatio
+ // instead. This is to be deprecated. Use this with caution.
+ // 1) If you need to scale the content per device scale factor, this is still
+ // valid. In use-zoom-for-dsf mode, this is always 1, and will be remove
+ // when transition is complete.
+ // 2) If you want to compute the device related measure (such as device pixel
+ // height, or the scale factor for drag image), use
+ // ChromeClient::screenInfo() instead.
+ float deviceScaleFactorDeprecated() const { return m_deviceScaleFactor; }
+ void setDeviceScaleFactorDeprecated(float);
static void allVisitedStateChanged(bool invalidateVisitedLinkHashes);
static void visitedStateChanged(LinkHash visitedHash);
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp ('k') | third_party/WebKit/Source/core/page/Page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698