Changeset 138036 in webkit
- Timestamp:
- Dec 18, 2012, 10:07:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r138027 r138036 1 2012-12-17 Simon Fraser <simon.fraser@apple.com> 2 3 Fix position:-webkit-sticky behavior when zoomed 4 https://bugs.webkit.org/show_bug.cgi?id=105251 5 6 Reviewed by Dean Jackson. 7 8 Ref test for sticky elements in a zoomed page. 9 10 This test is marked as failing for WK1, because scrollbars always show on 11 zoomed pages and cannot be hidden there. 12 13 * fast/css/sticky/sticky-top-zoomed-expected.html: Added. 14 * fast/css/sticky/sticky-top-zoomed.html: Added. 15 * platform/mac-wk2/TestExpectations: 16 * platform/mac/TestExpectations: 17 1 18 2012-12-18 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 19 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r137391 r138036 363 363 364 364 platform/mac/tiled-drawing/ [ Pass ] 365 fast/css/sticky/sticky-top-zoomed.html [ Pass ] 365 366 366 367 ### END OF (5) Features that are not supported in WebKit1, so skipped in mac/TestExpectations then re-enabled here -
trunk/LayoutTests/platform/mac/TestExpectations
r138017 r138036 1217 1217 platform/mac/tiled-drawing/ [ Skip ] 1218 1218 1219 # Can't hide scrollbars in WK1 1220 fast/css/sticky/sticky-top-zoomed.html [ ImageOnlyFailure ] 1221 1219 1222 webkit.org/b/100846 inspector-protocol/debugger-pause-dedicated-worker.html [ Skip ] 1220 1223 webkit.org/b/100846 inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r138035 r138036 1 2012-12-17 Simon Fraser <simon.fraser@apple.com> 2 3 Fix position:-webkit-sticky behavior when zoomed 4 https://bugs.webkit.org/show_bug.cgi?id=105251 5 6 Reviewed by Dean Jackson. 7 8 Position sticky elements were misplaced when stickily-constrained, under zooming. 9 The cause was that some of the functions used to compute sticky position 10 took page scale into account, and some did not. 11 12 Fix by using localToContainerQuad(..., view()) to compute RenderView-relative 13 quads, which avoids page scale, so all the constraints math is done ignoring 14 page scale. This also requires that we compute a scale-free viewport rect 15 in stickyPositionOffset(). 16 17 Test: fast/css/sticky/sticky-top-zoomed.html 18 19 * rendering/RenderBoxModelObject.cpp: 20 (WebCore::RenderBoxModelObject::computeStickyPositionConstraints): 21 (WebCore::RenderBoxModelObject::stickyPositionOffset): 22 1 23 2012-12-18 Eugene Klyuchnikov <eustas@chromium.org> 2 24 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r137847 r138036 472 472 containerContentRect.move(minLeftMargin, minTopMargin); 473 473 containerContentRect.contract(minLeftMargin + minRightMargin, minTopMargin + minBottomMargin); 474 constraints.setAbsoluteContainingBlockRect(containingBlock->localToAbsoluteQuad(FloatRect(containerContentRect)).boundingBox()); 474 // Map to the view to avoid including page scale factor. 475 constraints.setAbsoluteContainingBlockRect(containingBlock->localToContainerQuad(FloatRect(containerContentRect), view()).boundingBox()); 475 476 476 477 LayoutRect stickyBoxRect = frameRectForStickyPositioning(); … … 480 481 481 482 // FIXME: sucks to call localToAbsolute again, but we can't just offset from the previously computed rect if there are transforms. 482 FloatRect absContainerFrame = containingBlock->localToAbsoluteQuad(FloatRect(FloatPoint(), containingBlock->size())).boundingBox(); 483 // Map to the view to avoid including page scale factor. 484 FloatRect absContainerFrame = containingBlock->localToContainerQuad(FloatRect(FloatPoint(), containingBlock->size()), view()).boundingBox(); 485 483 486 // We can't call localToAbsolute on |this| because that will recur. FIXME: For now, assume that |this| is not transformed. 484 487 FloatRect absoluteStickyBoxRect(absContainerFrame.location() + stickyLocation, flippedStickyBoxRect.size()); … … 509 512 { 510 513 LayoutRect viewportRect = view()->frameView()->visibleContentRect(); 511 514 float scale = 1; 515 if (Frame* frame = view()->frameView()->frame()) 516 scale = frame->frameScaleFactor(); 517 518 viewportRect.scale(1 / scale); 519 512 520 StickyPositionViewportConstraints constraints; 513 521 computeStickyPositionConstraints(constraints, viewportRect);
Note:
See TracChangeset
for help on using the changeset viewer.