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

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: Apply setBoundsContainPageScale recursively on LayerChromium. 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
Index: cc/CCLayerImpl.cpp
diff --git a/cc/CCLayerImpl.cpp b/cc/CCLayerImpl.cpp
index 9068d31aaa6f76dab4e4af38643c0b6ec9595b77..c08b8604b0bb4d6a2fb36071238d317b311a4cb6 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') | cc/LayerChromium.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698