Changeset 170461 in webkit
- Timestamp:
- Jun 25, 2014 9:15:40 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r170459 r170461 1 2014-06-25 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Tweak the logic used to choose the scale at which position:fixed gets pushed out of view 4 https://bugs.webkit.org/show_bug.cgi?id=134323 5 6 Reviewed by Benjamin Poulain. 7 8 Previously we used a fixed scale (1.2x) at which we'd start pushing position:fixed elements 9 out of the viewport. This worked well on iPad, but terribly on iPhone. Instead, choose a scale 10 relative to how much of the page is visible width-wise, the threshold being 2/3 of the page width. 11 The width is clamped to get reasonable behavior on wide pages. 12 13 * page/FrameView.cpp: 14 (WebCore::FrameView::rectForViewportConstrainedObjects): 15 1 16 2014-06-25 Brady Eidson <beidson@apple.com> 2 17 -
trunk/Source/WebCore/page/FrameView.cpp
r170297 r170461 1636 1636 return visibleContentRect; 1637 1637 1638 if (totalContentsSize.isEmpty()) 1639 return visibleContentRect; 1640 1638 1641 // We impose an lower limit on the size (so an upper limit on the scale) of 1639 1642 // the rect used to position fixed objects so that they don't crowd into the 1640 1643 // center of the screen at larger scales. 1641 const float constraintThresholdScale = 1.2; 1642 1644 const LayoutUnit maxContentWidthForZoomThreshold = LayoutUnit::fromPixel(1024); 1645 float zoomedOutScale = frameScaleFactor * visibleContentRect.width() / std::min(maxContentWidthForZoomThreshold, totalContentsSize.width()); 1646 float constraintThresholdScale = 1.5 * zoomedOutScale; 1643 1647 float maxPostionedObjectsRectScale = std::min(frameScaleFactor, constraintThresholdScale); 1644 1648
Note: See TracChangeset
for help on using the changeset viewer.