Changeset 163182 in webkit
- Timestamp:
- Jan 31, 2014, 11:36:57 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r163181 r163182 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 iOS uses fixed layout mode in both WK1 and WK2, but lays out fixed position 9 elements relative to a variable viewport. This code assumed that fixed layout 10 implies a fixed viewport. 11 12 Fix by testing for useCustomFixedPositionLayoutRect() in the fixed layout case. 13 14 Also removed RenderView::hasCustomFixedPosition() which is no longer used. 15 16 * page/FrameView.cpp: 17 (WebCore::FrameView::shouldLayoutAfterViewportChange): 18 (WebCore::FrameView::visibleContentsResized): 19 * page/FrameView.h: 20 * rendering/RenderView.cpp: 21 * rendering/RenderView.h: 22 1 23 2014-01-31 Zan Dobersek <zdobersek@igalia.com> 2 24 -
trunk/Source/WebCore/page/FrameView.cpp
r163180 r163182 2140 2140 } 2141 2141 2142 bool FrameView::shouldLayoutAfterViewportChange() const 2143 { 2144 return hasViewportConstrainedObjects() && (!useFixedLayout() || useCustomFixedPositionLayoutRect()); 2145 } 2146 2142 2147 void FrameView::visibleContentsResized() 2143 2148 { … … 2161 2166 #endif 2162 2167 2163 if ( !useFixedLayout() && needsLayout())2168 if (shouldLayoutAfterViewportChange() && needsLayout()) 2164 2169 layout(); 2165 2170 -
trunk/Source/WebCore/page/FrameView.h
r163146 r163182 130 130 void setCustomFixedPositionLayoutRect(const IntRect&); 131 131 bool updateFixedPositionLayoutRect(); 132 #else 133 bool useCustomFixedPositionLayoutRect() const { return false; } 132 134 #endif 133 135 … … 480 482 void updateCanBlitOnScrollRecursively(); 481 483 bool contentsInCompositedLayer() const; 484 bool shouldLayoutAfterViewportChange() const; 482 485 483 486 bool shouldUpdateCompositingLayersAfterScrolling() const; -
trunk/Source/WebCore/rendering/RenderView.cpp
r163079 r163182 1198 1198 } 1199 1199 1200 #if PLATFORM(IOS)1201 static bool isFixedPositionInViewport(const RenderObject& renderer, const RenderObject* container)1202 {1203 return (renderer.style().position() == FixedPosition) && renderer.container() == container;1204 }1205 1206 bool RenderView::hasCustomFixedPosition(const RenderObject& renderer, ContainingBlockCheck checkContainer) const1207 {1208 if (!frameView().useCustomFixedPositionLayoutRect())1209 return false;1210 1211 if (checkContainer == CheckContainingBlock)1212 return isFixedPositionInViewport(renderer, this);1213 1214 return renderer.style().position() == FixedPosition;1215 }1216 #endif1217 1218 1200 void RenderView::pushLayoutStateForCurrentFlowThread(const RenderObject& object) 1219 1201 { -
trunk/Source/WebCore/rendering/RenderView.h
r163079 r163182 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.