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

Unified Diff: sky/engine/core/frame/LocalFrame.cpp

Issue 714013002: Remove some more zoom-related code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/frame/LocalFrame.h ('k') | sky/engine/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/LocalFrame.cpp
diff --git a/sky/engine/core/frame/LocalFrame.cpp b/sky/engine/core/frame/LocalFrame.cpp
index 5fd9fc072e084902a91845ca689341af3b08b233..ccf1a607af236ff355ee3a47e9aa4a549419b332 100644
--- a/sky/engine/core/frame/LocalFrame.cpp
+++ b/sky/engine/core/frame/LocalFrame.cpp
@@ -77,8 +77,6 @@ inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host)
, m_eventHandler(adoptPtr(new EventHandler(this)))
, m_console(FrameConsole::create(*this))
, m_inputMethodController(InputMethodController::create(*this))
- , m_pageZoomFactor(1)
- , m_textZoomFactor(1)
{
page()->setMainFrame(this);
}
@@ -347,36 +345,6 @@ String LocalFrame::localLayerTreeAsText(unsigned flags) const
return contentRenderer()->compositor()->layerTreeAsText(static_cast<LayerTreeFlags>(flags));
}
-void LocalFrame::setPageZoomFactor(float factor)
-{
- setPageAndTextZoomFactors(factor, m_textZoomFactor);
-}
-
-void LocalFrame::setTextZoomFactor(float factor)
-{
- setPageAndTextZoomFactors(m_pageZoomFactor, factor);
-}
-
-void LocalFrame::setPageAndTextZoomFactors(float pageZoomFactor, float textZoomFactor)
-{
- if (m_pageZoomFactor == pageZoomFactor && m_textZoomFactor == textZoomFactor)
- return;
-
- Page* page = this->page();
- if (!page)
- return;
-
- Document* document = this->document();
- if (!document)
- return;
-
- m_pageZoomFactor = pageZoomFactor;
- m_textZoomFactor = textZoomFactor;
-
- document->setNeedsStyleRecalc(SubtreeStyleChange);
- document->updateLayoutIgnorePendingStylesheets();
-}
-
void LocalFrame::deviceOrPageScaleFactorChanged()
{
document()->mediaQueryAffectingValueChanged();
@@ -408,10 +376,7 @@ double LocalFrame::devicePixelRatio() const
{
if (!m_host)
return 0;
-
- double ratio = m_host->deviceScaleFactor();
- ratio *= pageZoomFactor();
- return ratio;
+ return m_host->deviceScaleFactor();
}
} // namespace blink
« no previous file with comments | « sky/engine/core/frame/LocalFrame.h ('k') | sky/engine/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698