From 965fc3e3a2ae0316a67f7e1c82a04bc533a383d4 Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Tue, 22 Nov 2011 17:27:11 -0800 Subject: A WAR to enable the slider touch event on youtube.com bug:5520141 Change-Id: Ib346c42037f68b5e8303f0c61196fb28e698f7c9 --- Source/WebCore/rendering/RenderBox.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Source/WebCore/rendering') diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index 80d5699..fb1dd2c 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -1562,6 +1562,13 @@ void RenderBox::computeLogicalWidth() // https://bugs.webkit.org/show_bug.cgi?id=46418 if (hasOverrideSize() && parent()->style()->boxOrient() == HORIZONTAL && parent()->isFlexibleBox() && parent()->isFlexingChildren()) { +#if PLATFORM(ANDROID) + // Strangely, the slider is get overrided as width 0 on youtube.com + // The wrong width will cause the touch hit test for the slider failed. + // This WAR should be safe since it is only targeted to slider. + // TODO: root cause this and see if any webkit update fix this. + if (!(isSlider() && overrideSize() == 0)) +#endif setLogicalWidth(overrideSize()); return; } -- cgit v1.1