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

Unified Diff: cc/LayerChromium.cpp

Issue 10989003: Revert 158386 - Revert 158362 - Support high DPI scrollbar on top level web frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/LayerChromium.h ('k') | cc/ScrollbarLayerChromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/LayerChromium.cpp
===================================================================
--- cc/LayerChromium.cpp (revision 158397)
+++ cc/LayerChromium.cpp (working copy)
@@ -116,6 +116,15 @@
m_layerTreeHost->setNeedsCommit();
}
+IntRect LayerChromium::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);
+}
+
void LayerChromium::setParent(LayerChromium* layer)
{
ASSERT(!layer || !layer->hasAncestor(this));
@@ -622,6 +631,9 @@
void LayerChromium::setBoundsContainPageScale(bool boundsContainPageScale)
{
+ for (size_t i = 0; i < m_children.size(); ++i)
+ m_children[i]->setBoundsContainPageScale(boundsContainPageScale);
+
if (boundsContainPageScale == m_boundsContainPageScale)
return;
« no previous file with comments | « cc/LayerChromium.h ('k') | cc/ScrollbarLayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698