Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch makes full page zoom work pretty well. It fixes repaintin…
…g so that it works when transforms are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when zooming. The page will still try to constrain to the viewport size even when zoomed. Reviewed by john * dom/Document.cpp: (WebCore::Document::recalcStyle): Make sure to test for transform changes even when there is no zoom. This fixes repainting issues caused by jumping from a zoomed state back to the standard size. * page/FrameView.cpp: (WebCore::FrameView::adjustViewSize): Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view need to handle zoomed coordinates). * rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight): Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when stretching to fill the viewport. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): (WebCore::RenderLayer::setHasVisibleContent): Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView. * rendering/RenderView.cpp: (WebCore::RenderView::calcHeight): (WebCore::RenderView::calcWidth): Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout" behavior. (WebCore::RenderView::layout): When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just the viewport size. (WebCore::RenderView::computeAbsoluteRepaintRect): Patched to take into account transforms set on the RenderView. (WebCore::RenderView::docHeight): (WebCore::RenderView::docWidth): Patched to just always use m_width and m_height initially, since those have already been adjusted for the zoom factor. (WebCore::RenderView::zoomedHeight): (WebCore::RenderView::zoomedWidth): * rendering/RenderView.h: New helper methods for obtaining the adjusted width/height of the viewport taking into account the zoom factor. Canonical link: https://commits.webkit.org/24720@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@31037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
David Hyatt
committed
Mar 13, 2008
1 parent
7187613
commit ab0deb3
Showing
8 changed files
with
112 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters