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

Unified Diff: cc/CCLayerImpl.cpp

Issue 10909255: Support high DPI scrollbar on top level web frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCScrollbarLayerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCLayerImpl.cpp
diff --git a/cc/CCLayerImpl.cpp b/cc/CCLayerImpl.cpp
index a78453d4883323cc991963c508d6f43a91ac2caa..9fa2139eaf3fe11c1a56de05bce3e1d3331cd90e 100644
--- a/cc/CCLayerImpl.cpp
+++ b/cc/CCLayerImpl.cpp
@@ -209,6 +209,15 @@ CCInputHandlerClient::ScrollStatus CCLayerImpl::tryScroll(const IntPoint& viewpo
return CCInputHandlerClient::ScrollStarted;
}
+IntRect CCLayerImpl::layerRectToContentRect(const WebKit::WebRect& layerRect)
+{
+ float widthScale = static_cast<float>(contentBounds().width()) / bounds().width();
+ float heightScale = static_cast<float>(contentBounds().height()) / bounds().height();
+ FloatRect contentRect(layerRect.x, layerRect.y, layerRect.width, layerRect.height);
+ contentRect.scale(widthScale, heightScale);
+ return enclosingIntRect(contentRect);
+}
+
std::string CCLayerImpl::indentString(int indent)
{
std::string str;
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCScrollbarLayerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698