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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 22488004: Made text inside <input> elements scrollable using touch gestures (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Layout test minor fix Created 7 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 IntRect RenderLayer::scrollableAreaBoundingBox() const 1315 IntRect RenderLayer::scrollableAreaBoundingBox() const
1316 { 1316 {
1317 return renderer()->absoluteBoundingBoxRect(); 1317 return renderer()->absoluteBoundingBoxRect();
1318 } 1318 }
1319 1319
1320 bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const 1320 bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const
1321 { 1321 {
1322 RenderBox* box = renderBox(); 1322 RenderBox* box = renderBox();
1323 ASSERT(box); 1323 ASSERT(box);
1324 1324
1325 if (box->isTextField())
tdanderson 2013/08/08 20:01:16 I would re-write as: if (box->isTextField())
bokan 2013/08/12 16:19:29 Done.
1326 return true;
1327
1325 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ? 1328 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ?
1326 renderer()->style()->overflowX() : renderer()->style()->overflowY(); 1329 renderer()->style()->overflowX() : renderer()->style()->overflowY();
1327 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY); 1330 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY);
1328 } 1331 }
1329 1332
1330 int RenderLayer::pageStep(ScrollbarOrientation orientation) const 1333 int RenderLayer::pageStep(ScrollbarOrientation orientation) const
1331 { 1334 {
1332 RenderBox* box = renderBox(); 1335 RenderBox* box = renderBox();
1333 ASSERT(box); 1336 ASSERT(box);
1334 1337
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 1946
1944 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR ect& rect) const 1947 void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR ect& rect) const
1945 { 1948 {
1946 LayoutPoint delta; 1949 LayoutPoint delta;
1947 convertToLayerCoords(ancestorLayer, delta); 1950 convertToLayerCoords(ancestorLayer, delta);
1948 rect.move(-delta.x(), -delta.y()); 1951 rect.move(-delta.x(), -delta.y());
1949 } 1952 }
1950 1953
1951 bool RenderLayer::usesCompositedScrolling() const 1954 bool RenderLayer::usesCompositedScrolling() const
1952 { 1955 {
1956 // Scroll textfields on the main thread so we get appropriate touch gesture propagation
tdanderson 2013/08/08 20:01:16 Add a period at the end of the comment.
bokan 2013/08/12 16:19:29 Done.
1957 if (renderBox() && renderBox()->isTextField())
tdanderson 2013/08/08 20:01:16 Are you sure that usesCompositedScrolling() is cal
bokan 2013/08/12 16:19:29 It's called when a frame has its layout updated to
1958 return false;
1959
1953 return isComposited() && backing()->scrollingLayer(); 1960 return isComposited() && backing()->scrollingLayer();
1954 } 1961 }
1955 1962
1956 bool RenderLayer::needsCompositedScrolling() const 1963 bool RenderLayer::needsCompositedScrolling() const
1957 { 1964 {
1958 switch (m_forceNeedsCompositedScrolling) { 1965 switch (m_forceNeedsCompositedScrolling) {
1959 case DoNotForceCompositedScrolling: 1966 case DoNotForceCompositedScrolling:
1960 return m_needsCompositedScrolling; 1967 return m_needsCompositedScrolling;
1961 case CompositedScrollingAlwaysOn: 1968 case CompositedScrollingAlwaysOn:
1962 return true; 1969 return true;
(...skipping 4361 matching lines...) Expand 10 before | Expand all | Expand 10 after
6324 } 6331 }
6325 } 6332 }
6326 6333
6327 void showLayerTree(const WebCore::RenderObject* renderer) 6334 void showLayerTree(const WebCore::RenderObject* renderer)
6328 { 6335 {
6329 if (!renderer) 6336 if (!renderer)
6330 return; 6337 return;
6331 showLayerTree(renderer->enclosingLayer()); 6338 showLayerTree(renderer->enclosingLayer());
6332 } 6339 }
6333 #endif 6340 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698