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

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: 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 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 33efe07ede69872e94fbcfd40eb1e8f44abe5cb6..9400141a9d9ae7fbe8e53e6c24028a446ebd6796 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())
tdanderson 2013/08/08 20:01:16 I would re-write as: if (box->isTextField())
bokan 2013/08/12 16:19:29 Done.
+ return true;
+
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
tdanderson 2013/08/08 20:01:16 Add a period at the end of the comment.
bokan 2013/08/12 16:19:29 Done.
+ 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
+ return false;
+
return isComposited() && backing()->scrollingLayer();
}

Powered by Google App Engine
This is Rietveld 408576698