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

Unified Diff: cc/CCScrollbarLayerImpl.cpp

Issue 10990004: 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/CCLayerImpl.cpp ('k') | cc/LayerChromium.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCScrollbarLayerImpl.cpp
===================================================================
--- cc/CCScrollbarLayerImpl.cpp (revision 158385)
+++ cc/CCScrollbarLayerImpl.cpp (working copy)
@@ -79,8 +79,7 @@
bool premultipledAlpha = false;
bool flipped = false;
FloatRect uvRect(0, 0, 1, 1);
- IntRect boundsRect(IntPoint(), bounds());
- IntRect contentBoundsRect(IntPoint(), contentBounds());
+ IntRect boundsRect(IntPoint(), contentBounds());
CCSharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQuadState());
appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData);
@@ -91,7 +90,7 @@
thumbRect = WebRect();
if (m_thumbResourceId && !thumbRect.isEmpty()) {
- OwnPtr<CCTextureDrawQuad> quad = CCTextureDrawQuad::create(sharedQuadState, layerRectToContentRect(thumbRect), m_thumbResourceId, premultipledAlpha, uvRect, flipped);
+ OwnPtr<CCTextureDrawQuad> quad = CCTextureDrawQuad::create(sharedQuadState, IntRect(thumbRect.x, thumbRect.y, thumbRect.width, thumbRect.height), m_thumbResourceId, premultipledAlpha, uvRect, flipped);
quad->setNeedsBlending();
quadSink.append(quad.release(), appendQuadsData);
}
@@ -101,12 +100,12 @@
// We only paint the track in two parts if we were given a texture for the forward track part.
if (m_foreTrackResourceId && !foreTrackRect.isEmpty())
- quadSink.append(CCTextureDrawQuad::create(sharedQuadState, layerRectToContentRect(foreTrackRect), m_foreTrackResourceId, premultipledAlpha, toUVRect(foreTrackRect, boundsRect), flipped), appendQuadsData);
+ quadSink.append(CCTextureDrawQuad::create(sharedQuadState, IntRect(foreTrackRect.x, foreTrackRect.y, foreTrackRect.width, foreTrackRect.height), m_foreTrackResourceId, premultipledAlpha, toUVRect(foreTrackRect, boundsRect), flipped), appendQuadsData);
// Order matters here: since the back track texture is being drawn to the entire contents rect, we must append it after the thumb and
// fore track quads. The back track texture contains (and displays) the buttons.
- if (!contentBoundsRect.isEmpty())
- quadSink.append(CCTextureDrawQuad::create(sharedQuadState, IntRect(contentBoundsRect), m_backTrackResourceId, premultipledAlpha, uvRect, flipped), appendQuadsData);
+ if (!boundsRect.isEmpty())
+ quadSink.append(CCTextureDrawQuad::create(sharedQuadState, IntRect(boundsRect), m_backTrackResourceId, premultipledAlpha, uvRect, flipped), appendQuadsData);
}
void CCScrollbarLayerImpl::didLoseContext()
@@ -133,7 +132,7 @@
WebKit::WebSize CCScrollbarLayerImpl::CCScrollbar::size() const
{
- return WebKit::WebSize(m_owner->bounds().width(), m_owner->bounds().height());
+ return WebKit::WebSize(m_owner->contentBounds().width(), m_owner->contentBounds().height());
}
bool CCScrollbarLayerImpl::CCScrollbar::enabled() const
« no previous file with comments | « cc/CCLayerImpl.cpp ('k') | cc/LayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698