Changeset 171132 in webkit
- Timestamp:
- Jul 15, 2014, 7:58:21 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r171119 r171132 1 2014-07-15 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS] Fix touches inside accelerated overflow:scroll 4 https://bugs.webkit.org/show_bug.cgi?id=134961 5 <rdar://problem/16088789> 6 7 Reviewed by Benjamin Poulain. 8 9 When individual elements inside an overflow:scroll with -webkit-overflow-scrolling: touch 10 had touch event listeners, we would fail to take the scroll offset into account when 11 building the touch event region, causing touches on those elements to fail after scrolling. 12 13 Touch event region building uses RenderObject::absoluteClippedOverflowRect(), and that 14 code path tries to fix up repaint rects to work correctly in composited overflow:scroll. 15 However, that broke the touch region computation. 16 17 Fix by only ignoring the scroll offset for calls to computeRectForRepaint() which 18 have a non-null repaintContainer (which indicates that we're doing a repaint in the 19 compositing layer), and for which the repaintContainer is the containing block 20 which is using composited scrolling. This restores correct behavior to the event region 21 code which always calls this with a null repaintContainer. 22 23 * rendering/RenderBox.cpp: 24 (WebCore::shouldAppyContainersClipAndOffset): 25 (WebCore::RenderBox::computeRectForRepaint): 26 1 27 2014-07-15 Simon Fraser <simon.fraser@apple.com> 2 28 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r170841 r171132 2111 2111 } 2112 2112 2113 static inline bool shouldAppyContainersClipAndOffset(const RenderLayerModelObject* repaintContainer, RenderBox* containerBox) 2114 { 2115 #if PLATFORM(IOS) 2116 if (!repaintContainer || repaintContainer != containerBox) 2117 return true; 2118 2119 return !containerBox->hasLayer() || !containerBox->layer()->usesCompositedScrolling(); 2120 #else 2121 return true; 2122 #endif 2123 } 2124 2113 2125 void RenderBox::computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect& rect, bool fixed) const 2114 2126 { … … 2201 2213 if (o->hasOverflowClip()) { 2202 2214 RenderBox* containerBox = toRenderBox(o); 2203 #if PLATFORM(IOS) 2204 if (!containerBox->layer() || !containerBox->layer()->usesCompositedScrolling()) { 2205 #endif 2206 containerBox->applyCachedClipAndScrollOffsetForRepaint(rect); 2207 if (rect.isEmpty()) 2208 return; 2209 #if PLATFORM(IOS) 2210 } 2211 #endif 2215 if (shouldAppyContainersClipAndOffset(repaintContainer, containerBox)) { 2216 containerBox->applyCachedClipAndScrollOffsetForRepaint(rect); 2217 if (rect.isEmpty()) 2218 return; 2219 } 2212 2220 } 2213 2221
Note:
See TracChangeset
for help on using the changeset viewer.