Changeset 163157 in webkit
- Timestamp:
- Jan 30, 2014 9:42:25 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r163156 r163157 1 2014-01-30 Simon Fraser <simon.fraser@apple.com> 2 3 Some fixed position elements disappear in WK2 on iOS 4 https://bugs.webkit.org/show_bug.cgi?id=127977 5 6 Reviewed by Tim Horton. 7 8 Use the appropriate rectangle to ensure that on iOS we don't 9 consider a fixed element outside the viewport when zoomed in, 10 and therefore never make a compositing layer for it. 11 12 Also remove the iOS-specific code in RenderLayerCompositor::requiresCompositingForPosition(), 13 since it's OK to use the common code. Doing so requires that we 14 set the "acceleratedCompositingForFixedPositionEnabled" setting to true 15 for iOS, so do so. 16 17 * page/Settings.cpp: 18 * page/Settings.in: 19 * rendering/RenderLayerCompositor.cpp: 20 (WebCore::RenderLayerCompositor::requiresCompositingForPosition): 21 1 22 2014-01-30 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/page/Settings.cpp
r163079 r163157 125 125 #if PLATFORM(IOS) 126 126 static const bool defaultFixedPositionCreatesStackingContext = true; 127 static const bool defaultAcceleratedCompositingForFixedPositionEnabled = true; 127 128 static const bool defaultMediaPlaybackAllowsInline = false; 128 129 static const bool defaultMediaPlaybackRequiresUserGesture = true; … … 130 131 #else 131 132 static const bool defaultFixedPositionCreatesStackingContext = false; 133 static const bool defaultAcceleratedCompositingForFixedPositionEnabled = false; 132 134 static const bool defaultMediaPlaybackAllowsInline = true; 133 135 static const bool defaultMediaPlaybackRequiresUserGesture = false; -
trunk/Source/WebCore/page/Settings.in
r162507 r163157 96 96 xssAuditorEnabled initial=false 97 97 unsafePluginPastingEnabled initial=true 98 acceleratedCompositingForFixedPositionEnabled initial= false98 acceleratedCompositingForFixedPositionEnabled initial=defaultAcceleratedCompositingForFixedPositionEnabled 99 99 acceleratedCompositingForOverflowScrollEnabled initial=false 100 100 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r163079 r163157 2496 2496 bool RenderLayerCompositor::requiresCompositingForPosition(RenderLayerModelObject& renderer, const RenderLayer& layer, RenderLayer::ViewportConstrainedNotCompositedReason* viewportConstrainedNotCompositedReason) const 2497 2497 { 2498 #if PLATFORM(IOS)2499 if (renderer.isStickyPositioned())2500 return true;2501 2502 // position:fixed elements that create their own stacking context (e.g. have an explicit z-index,2503 // opacity, transform) can get their own composited layer. A stacking context is required otherwise2504 // z-index and clipping will be broken.2505 if (!(renderer.isOutOfFlowPositioned() && renderer.style().position() == FixedPosition))2506 return false;2507 2508 if (!m_renderView.hasCustomFixedPosition(renderer, RenderView::CheckContainingBlock)) {2509 m_reevaluateCompositingAfterLayout = true;2510 return false;2511 }2512 #else2513 2498 // position:fixed elements that create their own stacking context (e.g. have an explicit z-index, 2514 2499 // opacity, transform) can get their own composited layer. A stacking context is required otherwise … … 2533 2518 if (isSticky) 2534 2519 return hasCoordinatedScrolling() && isViewportConstrainedFixedOrStickyLayer(layer); 2535 #endif2536 2520 2537 2521 auto container = renderer.container(); … … 2564 2548 2565 2549 // Fixed position elements that are invisible in the current view don't get their own layer. 2566 LayoutRect viewBounds = m_renderView.frameView().viewportConstrained VisibleContentRect();2550 LayoutRect viewBounds = m_renderView.frameView().viewportConstrainedExtentRect(); 2567 2551 LayoutRect layerBounds = layer.calculateLayerBounds(&layer, 0, RenderLayer::UseLocalClipRectIfPossible | RenderLayer::IncludeLayerFilterOutsets | RenderLayer::UseFragmentBoxes 2568 2552 | RenderLayer::ExcludeHiddenDescendants | RenderLayer::DontConstrainForMask | RenderLayer::IncludeCompositedDescendants);
Note: See TracChangeset
for help on using the changeset viewer.