Changeset 162480 in webkit
- Timestamp:
- Jan 21, 2014, 3:54:34 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
page/FrameView.cpp (modified) (1 diff)
-
rendering/RenderBoxModelObject.cpp (modified) (1 diff)
-
rendering/RenderLayerBacking.cpp (modified) (1 diff)
-
rendering/RenderLayerCompositor.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r162477 r162480 1 2014-01-21 Simon Fraser <simon.fraser@apple.com> 2 3 Remove #if PLATFORM(IOS) in various places around customFixedPositionLayoutRect() code 4 https://bugs.webkit.org/show_bug.cgi?id=127373 5 6 Reviewed by Beth Dakin. 7 8 Instead of PLATFORM(IOS) #idefs at every call site for viewportConstrainedVisibleContentRect(), 9 move the #ifdef inside viewportConstrainedVisibleContentRect(). 10 11 The one call site that needs special handling is RenderLayerBacking::updateCompositedBounds(), 12 which needs to avoid clipping fixed layers to the custom fixed position rect, but instead to 13 visibleContentRect() (which is really the document bounds on iOS). This ensures that the 14 fixed layers aren't clipped when zooming out. 15 16 * page/FrameView.cpp: 17 (WebCore::FrameView::viewportConstrainedVisibleContentRect): 18 * rendering/RenderBoxModelObject.cpp: 19 (WebCore::RenderBoxModelObject::stickyPositionOffset): 20 * rendering/RenderLayerBacking.cpp: 21 (WebCore::RenderLayerBacking::updateCompositedBounds): 22 * rendering/RenderLayerCompositor.cpp: 23 (WebCore::RenderLayerCompositor::requiresCompositingForPosition): 24 (WebCore::RenderLayerCompositor::computeFixedViewportConstraints): 25 (WebCore::RenderLayerCompositor::computeStickyViewportConstraints): 26 1 27 2014-01-21 Andy Estes <aestes@apple.com> 2 28 -
trunk/Source/WebCore/page/FrameView.cpp
r162264 r162480 1619 1619 LayoutRect FrameView::viewportConstrainedVisibleContentRect() const 1620 1620 { 1621 #if PLATFORM(IOS) 1622 if (useCustomFixedPositionLayoutRect()) 1623 return customFixedPositionLayoutRect(); 1624 #endif 1621 1625 LayoutRect viewportRect = visibleContentRect(); 1622 1626 viewportRect.setLocation(toPoint(scrollOffsetForFixedPosition())); -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r162238 r162480 433 433 constrainingRect.setLocation(scrollOffset); 434 434 } else { 435 #if PLATFORM(IOS)436 LayoutRect viewportRect = view().frameView().customFixedPositionLayoutRect();437 #else438 435 LayoutRect viewportRect = view().frameView().viewportConstrainedVisibleContentRect(); 439 #endif440 436 float scale = view().frameView().frame().frameScaleFactor(); 441 437 viewportRect.scale(1 / scale); -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r162230 r162480 490 490 491 491 LayoutRect clippingBounds; 492 if (renderer().style().position() == FixedPosition && renderer().container() == &view) 492 if (renderer().style().position() == FixedPosition && renderer().container() == &view) { 493 #if PLATFORM(IOS) 494 clippingBounds = view.frameView().visibleContentRect(); 495 #else 493 496 clippingBounds = view.frameView().viewportConstrainedVisibleContentRect(); 494 else 497 #endif 498 } else 495 499 clippingBounds = view.unscaledDocumentRect(); 496 500 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r162443 r162480 2558 2558 2559 2559 // Fixed position elements that are invisible in the current view don't get their own layer. 2560 #if PLATFORM(IOS)2561 LayoutRect viewBounds = m_renderView.frameView().customFixedPositionLayoutRect();2562 #else2563 2560 LayoutRect viewBounds = m_renderView.frameView().viewportConstrainedVisibleContentRect(); 2564 #endif2565 2561 LayoutRect layerBounds = layer.calculateLayerBounds(&layer, 0, RenderLayer::UseLocalClipRectIfPossible | RenderLayer::IncludeLayerFilterOutsets | RenderLayer::UseFragmentBoxes 2566 2562 | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask | RenderLayer::IncludeCompositedDescendants); … … 3386 3382 ASSERT(layer.isComposited()); 3387 3383 3388 #if PLATFORM(IOS) 3389 LayoutRect viewportRect = m_renderView.frameView().customFixedPositionLayoutRect(); 3390 #else 3384 GraphicsLayer* graphicsLayer = layer.backing()->graphicsLayer(); 3391 3385 LayoutRect viewportRect = m_renderView.frameView().viewportConstrainedVisibleContentRect(); 3392 #endif3393 3386 3394 3387 FixedPositionViewportConstraints constraints; 3395 3396 GraphicsLayer* graphicsLayer = layer.backing()->graphicsLayer();3397 3398 3388 constraints.setLayerPositionAtLastLayout(graphicsLayer->position()); 3399 3389 constraints.setViewportRectAtLastLayout(viewportRect); … … 3432 3422 #endif 3433 3423 3434 #if PLATFORM(IOS)3435 LayoutRect viewportRect = m_renderView.frameView().customFixedPositionLayoutRect();3436 #else3437 3424 LayoutRect viewportRect = m_renderView.frameView().viewportConstrainedVisibleContentRect(); 3438 #endif3439 3440 3425 RenderBoxModelObject& renderer = toRenderBoxModelObject(layer.renderer()); 3441 3426
Note:
See TracChangeset
for help on using the changeset viewer.