Changeset 163216 in webkit
- Timestamp:
- Jan 31, 2014, 3:57:29 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r163212 r163216 1 2014-01-31 Simon Fraser <simon.fraser@apple.com> 2 3 Even when in fixed layout mode, some platforms need to do layout after a viewport change 4 https://bugs.webkit.org/show_bug.cgi?id=128003 5 6 Reviewed by Andreas Kling. 7 8 Re-land 163182 with a less aggresive check in visibleContentsResized() for 9 needing to layout. 10 11 iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position 12 elements relative to a variable viewport. This code assumed that fixed layout 13 implies a fixed viewport. 14 15 Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case. 16 17 Also removed RenderView::hasCustomFixedPosition() which is no longer used. 18 19 * page/FrameView.cpp: 20 (WebCore::FrameView::shouldLayoutAfterViewportChange): 21 (WebCore::FrameView::visibleContentsResized): 22 * page/FrameView.h: 23 * rendering/RenderView.cpp: 24 * rendering/RenderView.h: 25 1 26 2014-01-31 Alexey Proskuryakov <ap@apple.com> 2 27 -
trunk/Source/WebCore/page/FrameView.cpp
r163190 r163216 2140 2140 } 2141 2141 2142 bool FrameView::shouldLayoutAfterContentsResized() const 2143 { 2144 return !useFixedLayout() || useCustomFixedPositionLayoutRect(); 2145 } 2146 2142 2147 void FrameView::visibleContentsResized() 2143 2148 { … … 2161 2166 #endif 2162 2167 2163 if ( !useFixedLayout() && needsLayout())2168 if (shouldLayoutAfterContentsResized() && needsLayout()) 2164 2169 layout(); 2165 2170 -
trunk/Source/WebCore/page/FrameView.h
r163190 r163216 130 130 void setCustomFixedPositionLayoutRect(const IntRect&); 131 131 bool updateFixedPositionLayoutRect(); 132 #else 133 bool useCustomFixedPositionLayoutRect() const { return false; } 132 134 #endif 133 135 … … 487 489 void updateCanBlitOnScrollRecursively(); 488 490 bool contentsInCompositedLayer() const; 491 bool shouldLayoutAfterContentsResized() const; 489 492 490 493 bool shouldUpdateCompositingLayersAfterScrolling() const; -
trunk/Source/WebCore/rendering/RenderView.cpp
r163190 r163216 1199 1199 } 1200 1200 1201 #if PLATFORM(IOS)1202 static bool isFixedPositionInViewport(const RenderObject& renderer, const RenderObject* container)1203 {1204 return (renderer.style().position() == FixedPosition) && renderer.container() == container;1205 }1206 1207 bool RenderView::hasCustomFixedPosition(const RenderObject& renderer, ContainingBlockCheck checkContainer) const1208 {1209 if (!frameView().useCustomFixedPositionLayoutRect())1210 return false;1211 1212 if (checkContainer == CheckContainingBlock)1213 return isFixedPositionInViewport(renderer, this);1214 1215 return renderer.style().position() == FixedPosition;1216 }1217 #endif1218 1219 1201 void RenderView::pushLayoutStateForCurrentFlowThread(const RenderObject& object) 1220 1202 { -
trunk/Source/WebCore/rendering/RenderView.h
r163188 r163216 192 192 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override; 193 193 194 #if PLATFORM(IOS)195 enum ContainingBlockCheck { CheckContainingBlock, DontCheckContainingBlock };196 bool hasCustomFixedPosition(const RenderObject&, ContainingBlockCheck = CheckContainingBlock) const;197 #endif198 199 194 IntervalArena* intervalArena(); 200 195
Note:
See TracChangeset
for help on using the changeset viewer.