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

Unified 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: CR Fixes 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 9f6939f1046f1f00c4a7356acce22fcdd430e778..9edce46c1f801f0d30d09d4705147c306a268eec 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1322,6 +1322,9 @@ bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const
RenderBox* box = renderBox();
ASSERT(box);
+ if (box->isTextField())
+ return orientation == HorizontalScrollbar;
esprehn 2013/08/12 23:38:06 This doesn't seem writing mode aware.
bokan 2013/08/13 01:13:48 I've changed this to defer the decision to the con
+
EOverflow overflowStyle = (orientation == HorizontalScrollbar) ?
renderer()->style()->overflowX() : renderer()->style()->overflowY();
return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY);
@@ -1950,6 +1953,10 @@ void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR
bool RenderLayer::usesCompositedScrolling() const
{
+ // Scroll textfields on the main thread so we get appropriate touch gesture propagation.
+ if (renderBox() && renderBox()->isTextField())
+ return false;
+
return isComposited() && backing()->scrollingLayer();
}

Powered by Google App Engine
This is Rietveld 408576698