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

Side by Side Diff: cc/CCLayerImpl.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/CCLayerImpl.h ('k') | cc/CCScrollbarLayerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #if USE(ACCELERATED_COMPOSITING) 7 #if USE(ACCELERATED_COMPOSITING)
8 8
9 #include "CCLayerImpl.h" 9 #include "CCLayerImpl.h"
10 10
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 217 }
218 218
219 if (!scrollable()) { 219 if (!scrollable()) {
220 TRACE_EVENT0("cc", "CCLayerImpl::tryScroll: Ignored not scrollable"); 220 TRACE_EVENT0("cc", "CCLayerImpl::tryScroll: Ignored not scrollable");
221 return CCInputHandlerClient::ScrollIgnored; 221 return CCInputHandlerClient::ScrollIgnored;
222 } 222 }
223 223
224 return CCInputHandlerClient::ScrollStarted; 224 return CCInputHandlerClient::ScrollStarted;
225 } 225 }
226 226
227 IntRect CCLayerImpl::layerRectToContentRect(const WebKit::WebRect& layerRect)
228 {
229 float widthScale = static_cast<float>(contentBounds().width()) / bounds().wi dth();
230 float heightScale = static_cast<float>(contentBounds().height()) / bounds(). height();
231 FloatRect contentRect(layerRect.x, layerRect.y, layerRect.width, layerRect.h eight);
232 contentRect.scale(widthScale, heightScale);
233 return enclosingIntRect(contentRect);
234 }
235
227 std::string CCLayerImpl::indentString(int indent) 236 std::string CCLayerImpl::indentString(int indent)
228 { 237 {
229 std::string str; 238 std::string str;
230 for (int i = 0; i != indent; ++i) 239 for (int i = 0; i != indent; ++i)
231 str.append(" "); 240 str.append(" ");
232 return str; 241 return str;
233 } 242 }
234 243
235 void CCLayerImpl::dumpLayerProperties(std::string* str, int indent) const 244 void CCLayerImpl::dumpLayerProperties(std::string* str, int indent) const
236 { 245 {
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 if (!m_scrollbarAnimationController) 668 if (!m_scrollbarAnimationController)
660 m_scrollbarAnimationController = CCScrollbarAnimationController::create( this); 669 m_scrollbarAnimationController = CCScrollbarAnimationController::create( this);
661 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 670 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
662 m_scrollbarAnimationController->updateScrollOffset(this); 671 m_scrollbarAnimationController->updateScrollOffset(this);
663 } 672 }
664 673
665 } 674 }
666 675
667 676
668 #endif // USE(ACCELERATED_COMPOSITING) 677 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« 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