Changeset 100594 in webkit
- Timestamp:
- Nov 17, 2011 3:26:29 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r100588 r100594 1 2011-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Make use-fixed-layout work reliable 4 https://bugs.webkit.org/show_bug.cgi?id=72511 5 6 Reviewed by Simon Hausmann. 7 8 Always send a viewport update per page load as we depend on that, 9 to reset all viewport handling before doing layout. 10 11 * page/Page.cpp: 12 (WebCore::Page::updateViewportArguments): 13 1 14 2011-11-16 Alexander Pavlov <apavlov@chromium.org> 2 15 -
trunk/Source/WebCore/page/Page.cpp
r100555 r100594 405 405 void Page::updateViewportArguments() 406 406 { 407 if (!mainFrame() || !mainFrame()->document() || mainFrame()->document()->viewportArguments() == m_viewportArguments)407 if (!mainFrame() || !mainFrame()->document()) 408 408 return; 409 409 -
trunk/Source/WebKit2/ChangeLog
r100590 r100594 1 2011-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Make use-fixed-layout work reliable 4 https://bugs.webkit.org/show_bug.cgi?id=72511 5 6 Reviewed by Simon Hausmann. 7 8 The code handling use-fixed-layout wasn't 100% reliable. The code 9 was changed to make sure the value is always correct. 10 11 It also doesn't set the value by looking at the previous FrameView, 12 as that wouldn't work in cases, such as when the web process has 13 crashed. 14 15 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 16 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 17 * WebProcess/WebPage/WebPage.cpp: 18 (WebKit::WebPage::WebPage): 19 (WebKit::WebPage::setResizesToContentsUsingLayoutSize): 20 (WebKit::WebPage::setUseFixedLayout): 21 * WebProcess/WebPage/WebPage.h: 22 (WebKit::WebPage::useFixedLayout): 23 24 Store the state as m_useFixedLayout so that it can be used 25 from the WebFrameLoaderClient. 26 1 27 2011-11-17 Zalan Bujtas <zbujtas@gmail.com> 2 28 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r100534 r100594 1140 1140 { 1141 1141 WebPage* webPage = m_frame->page(); 1142 1142 1143 Color backgroundColor = webPage->drawsTransparentBackground() ? Color::transparent : Color::white; 1143 1144 bool isMainFrame = webPage->mainWebFrame() == m_frame; 1145 1146 #if USE(TILED_BACKING_STORE) 1147 IntSize currentVisibleContentSize; 1148 IntSize fixedLayoutSize; 1149 1150 if (FrameView* view = m_frame->coreFrame()->view()) { 1151 currentVisibleContentSize = view->visibleContentRect().size(); 1152 fixedLayoutSize = view->fixedLayoutSize(); 1153 } 1154 1155 m_frame->coreFrame()->createView(webPage->size(), backgroundColor, false, fixedLayoutSize, !fixedLayoutSize.isEmpty()); 1156 1157 if (isMainFrame && !fixedLayoutSize.isEmpty()) { 1158 m_frame->coreFrame()->view()->setDelegatesScrolling(true); 1159 m_frame->coreFrame()->view()->setPaintsEntireContents(true); 1160 // The HistoryController will update the scroll position later if needed. 1161 m_frame->coreFrame()->view()->setFixedVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize)); 1162 } 1163 1164 #else 1144 bool shouldUseFixedLayout = webPage->mainWebFrame() == m_frame && webPage->useFixedLayout(); 1145 1146 #if !USE(TILED_BACKING_STORE) 1165 1147 const ResourceResponse& response = m_frame->coreFrame()->loader()->documentLoader()->response(); 1166 1148 m_frameHasCustomRepresentation = isMainFrame && WebProcess::shared().shouldUseCustomRepresentationForResponse(response); 1167 1168 m_frame->coreFrame()->createView(webPage->size(), backgroundColor, false, IntSize(), false);1169 1149 #endif 1170 1150 1151 m_frame->coreFrame()->createView(webPage->size(), backgroundColor, /* transparent */ false, IntSize(), shouldUseFixedLayout); 1171 1152 m_frame->coreFrame()->view()->setTransparent(!webPage->drawsBackground()); 1172 1153 } -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r100534 r100594 173 173 WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters) 174 174 : m_viewSize(parameters.viewSize) 175 , m_useFixedLayout(false) 175 176 , m_drawsBackground(true) 176 177 , m_drawsTransparentBackground(false) … … 709 710 FrameView* view = m_page->mainFrame()->view(); 710 711 712 m_useFixedLayout = !targetLayoutSize.isEmpty(); 713 714 // Set view attributes based on whether fixed layout is used. 715 view->setDelegatesScrolling(m_useFixedLayout); 716 view->setUseFixedLayout(m_useFixedLayout); 717 view->setPaintsEntireContents(m_useFixedLayout); 718 711 719 if (view->fixedLayoutSize() == targetLayoutSize) 712 720 return; 713 721 714 bool fixedLayout = !targetLayoutSize.isEmpty(); 715 716 if (fixedLayout) 717 view->setFixedLayoutSize(targetLayoutSize); 718 719 // Set view attributes based on whether fixed layout is used. 720 view->setDelegatesScrolling(fixedLayout); 721 view->setUseFixedLayout(fixedLayout); 722 view->setPaintsEntireContents(fixedLayout); 722 // Always reset even when empty. 723 view->setFixedLayoutSize(targetLayoutSize); 723 724 724 725 // Schedule a layout to use the new target size. … … 894 895 void WebPage::setUseFixedLayout(bool fixed) 895 896 { 897 m_useFixedLayout = fixed; 898 896 899 Frame* frame = m_mainFrame->coreFrame(); 897 900 if (!frame) -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r100534 r100594 264 264 265 265 void setUseFixedLayout(bool); 266 bool useFixedLayout() const { return m_useFixedLayout; } 266 267 void setFixedLayoutSize(const WebCore::IntSize&); 267 268 … … 610 611 WebCore::IntSize m_viewSize; 611 612 OwnPtr<DrawingArea> m_drawingArea; 613 bool m_useFixedLayout; 612 614 613 615 bool m_drawsBackground;
Note: See TracChangeset
for help on using the changeset viewer.