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

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 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
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderTextControlSingleLine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index e99cc003238e6ad5cc6687ce24825c945c53824e..41988bd68eb1c956d3ad43e737b26b1a416825db 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1320,6 +1320,9 @@ bool RenderLayer::userInputScrollable(ScrollbarOrientation orientation) const
RenderBox* box = renderBox();
ASSERT(box);
+ if (box->isIntristicallyScrollable(orientation))
+ return true;
+
EOverflow overflowStyle = (orientation == HorizontalScrollbar) ?
renderer()->style()->overflowX() : renderer()->style()->overflowY();
return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY);
@@ -1948,6 +1951,12 @@ void RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer, LayoutR
bool RenderLayer::usesCompositedScrolling() const
{
+ RenderBox* box = renderBox();
+
+ // Scroll form controls on the main thread so they exhibit correct touch scroll event bubbling
+ if (box && (box->isIntristicallyScrollable(VerticalScrollbar) || box->isIntristicallyScrollable(HorizontalScrollbar)))
+ return false;
+
return isComposited() && backing()->scrollingLayer();
}
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderTextControlSingleLine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698