Changeset 91064 in webkit
- Timestamp:
- Jul 15, 2011 5:02:59 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91061 r91064 1 2011-07-15 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Upstream QtWebKit/N9 changes related to visibleContentRect 4 https://bugs.webkit.org/show_bug.cgi?id=64589 5 6 Reviewed by Simon Hausmann. 7 8 Rename setActualVisibleContentRect to setFixedVisibleContentRect 9 as that makes it more obvious that it is an override. It is also 10 consistent with the setFixedLayout which is often used in 11 conjunction with it. 12 13 Make visibleContentRect return the fixed value if set, and remove 14 all calls to actualVisibleContentRect. 15 16 Also updated the documentation. 17 18 This is similar to what we have on our QtWebKit/N9 branch and is 19 pretty well tested. 20 21 * platform/ScrollView.cpp: 22 (WebCore::ScrollView::visibleContentRect): 23 If a fixed visibleContentRect is set, return that. 24 Remove the code returning the contents size when in 25 paintsEntireContents mode as that is wrong and already 26 ifdeffed out for EFL. 27 (WebCore::ScrollView::setScrollPosition): 28 Do not try to be smart and update the fixed visibleContentsRect 29 automatically, as the embedder might ignore the scroll request 30 for various reasons. 31 * platform/ScrollView.h: 32 (WebCore::ScrollView::setFixedVisibleContentRect): 33 (WebCore::ScrollView::fixedVisibleContentRect): 34 1 35 2011-07-15 Mike West <mkwst@chromium.org> 2 36 -
trunk/Source/WebCore/platform/ScrollView.cpp
r90478 r91064 229 229 return platformVisibleContentRect(includeScrollbars); 230 230 231 #if !PLATFORM(EFL) 232 if (paintsEntireContents()) 233 return IntRect(IntPoint(0, 0), contentsSize()); 234 #endif 231 if (!m_fixedVisibleContentRect.isEmpty()) 232 return m_fixedVisibleContentRect; 235 233 236 234 int verticalScrollbarWidth = verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar() … … 384 382 if (delegatesScrolling()) { 385 383 hostWindow()->delegatedScrollRequested(scrollPoint); 386 if (!m_actualVisibleContentRect.isEmpty())387 m_actualVisibleContentRect.setLocation(scrollPoint);388 384 return; 389 385 } -
trunk/Source/WebCore/platform/ScrollView.h
r90734 r91064 141 141 // included. 142 142 // In the situation the client is responsible for the scrolling (ie. with a tiled backing store) it is possible to use 143 // the actualVisibleContentRect instead, though this must be updated manually, e.g after panning ends.144 IntRect visibleContentRect(bool includeScrollbars = false) const;145 IntRect actualVisibleContentRect() const { return m_actualVisibleContentRect.isEmpty() ? visibleContentRect() : m_actualVisibleContentRect; }146 void set ActualVisibleContentRect(const IntRect& actualVisibleContentRect) { m_actualVisibleContentRect = actualVisibleContentRect; }143 // the setFixedVisibleContentRect instead for the mainframe, though this must be updated manually, e.g just before resuming the page 144 // which usually will happen when panning, pinching and rotation ends, or when scale or position are changed manually. 145 virtual IntRect visibleContentRect(bool includeScrollbars = false) const; 146 void setFixedVisibleContentRect(const IntRect& visibleContentRect) { m_fixedVisibleContentRect = visibleContentRect; } 147 147 LayoutUnit visibleWidth() const { return visibleContentRect().width(); } 148 148 LayoutUnit visibleHeight() const { return visibleContentRect().height(); } … … 297 297 virtual void visibleContentsResized() = 0; 298 298 299 IntRect fixedVisibleContentRect() const { return m_fixedVisibleContentRect; } 300 299 301 IntSize boundsSize() const { return m_boundsSize; } 300 302 void setInitialBoundsSize(const IntSize&); … … 336 338 bool m_canBlitOnScroll; 337 339 338 IntRect m_ actualVisibleContentRect;340 IntRect m_fixedVisibleContentRect; 339 341 IntSize m_scrollOffset; // FIXME: Would rather store this as a position, but we will wait to make this change until more code is shared. 340 342 IntPoint m_cachedScrollPosition; -
trunk/Source/WebKit/qt/Api/qwebpage.cpp
r90856 r91064 2644 2644 2645 2645 WebCore::FrameView* view = frame->d->frame->view(); 2646 view->set ActualVisibleContentRect(rect);2646 view->setFixedVisibleContentRect(rect); 2647 2647 } 2648 2648 -
trunk/Source/WebKit/qt/ChangeLog
r90948 r91064 1 2011-07-15 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Upstream QtWebKit/N9 changes related to visibleContentRect 4 https://bugs.webkit.org/show_bug.cgi?id=64589 5 6 Reviewed by Simon Hausmann. 7 8 * Api/qwebpage.cpp: 9 (QWebPage::setActualVisibleContentRect): 10 Change to use setFixedVisibleContentRect. 11 * WebCoreSupport/FrameLoaderClientQt.cpp: 12 (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage): 13 Only set fixedVisibleContentRect for the mainframe. 14 * symbian/eabi/QtWebKitu.def: 15 1 16 2011-07-13 Joseph Pecoraro <joepeck@webkit.org> 2 17 -
trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r88628 r91064 286 286 bool vLock = vScrollbar != ScrollbarAuto; 287 287 288 IntSize currentVisibleContentSize = m_frame->view() ? m_frame->view()-> actualVisibleContentRect().size() : IntSize();288 IntSize currentVisibleContentSize = m_frame->view() ? m_frame->view()->visibleContentRect().size() : IntSize(); 289 289 290 290 m_frame->createView(m_webFrame->page()->viewportSize(), … … 299 299 m_frame->view()->setPaintsEntireContents(page->d->client->viewResizesToContentsEnabled()); 300 300 m_frame->view()->setDelegatesScrolling(page->d->client->viewResizesToContentsEnabled()); 301 } 302 303 // The HistoryController will update the scroll position later if needed.304 m_frame->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));301 302 // The HistoryController will update the scroll position later if needed. 303 m_frame->view()->setFixedVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize)); 304 } 305 305 } 306 306 -
trunk/Source/WebKit/qt/symbian/eabi/QtWebKitu.def
r90276 r91064 832 832 _ZNK8QWebPage19supportsContentTypeERK7QString @ 831 NONAME 833 833 _ZNK8QWebPage21supportedContentTypesEv @ 832 NONAME 834 _ZNK8QWebPage2 7setActualVisibleContentRectERK5QRect @ 833 NONAME834 _ZNK8QWebPage26setFixedVisibleContentRectERK5QRect @ 833 NONAME 835 835 _ZN8QWebPage20setFeaturePermissionEP9QWebFrameNS_7FeatureENS_16PermissionPolicyE @ 834 NONAME 836 836 _ZN8QWebPage26featurePermissionRequestedEP9QWebFrameNS_7FeatureE @ 835 NONAME -
trunk/Source/WebKit2/ChangeLog
r91062 r91064 1 2011-07-15 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 3 Upstream QtWebKit/N9 changes related to visibleContentRect 4 https://bugs.webkit.org/show_bug.cgi?id=64589 5 6 Reviewed by Simon Hausmann. 7 8 Rename setActualVisibleContentRect to setFixedVisibleContentRect 9 as that makes it more obvious that it is an override. It is also 10 consistent with the setFixedLayout which is often used in 11 conjunction with it. 12 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::WebPageProxy::setFixedVisibleContentRect): 15 * UIProcess/WebPageProxy.h: 16 * UIProcess/qt/qtouchwebpageproxy.cpp: 17 (QTouchWebPageProxy::setVisibleArea): 18 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 19 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 20 Only set fixedVisibleContentRect for the mainframe. 21 * WebProcess/WebPage/WebPage.cpp: 22 (WebKit::WebPage::setFixedVisibleContentRect): 23 * WebProcess/WebPage/WebPage.h: 24 * WebProcess/WebPage/WebPage.messages.in: 25 1 26 2011-07-15 Carlos Garcia Campos <cgarcia@igalia.com> 2 27 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r91012 r91064 776 776 777 777 #if ENABLE(TILED_BACKING_STORE) 778 void WebPageProxy::set ActualVisibleContentRect(const IntRect& rect)779 { 780 if (!isValid()) 781 return; 782 783 process()->send(Messages::WebPage::Set ActualVisibleContentRect(rect), m_pageID);778 void WebPageProxy::setFixedVisibleContentRect(const IntRect& rect) 779 { 780 if (!isValid()) 781 return; 782 783 process()->send(Messages::WebPage::SetFixedVisibleContentRect(rect), m_pageID); 784 784 } 785 785 #endif -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r91012 r91064 338 338 #endif 339 339 #if ENABLE(TILED_BACKING_STORE) 340 void set ActualVisibleContentRect(const WebCore::IntRect& rect);340 void setFixedVisibleContentRect(const WebCore::IntRect&); 341 341 #endif 342 342 -
trunk/Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.cpp
r90838 r91064 94 94 // FIXME: Once we support suspend and resume, this should be delayed until the page is active if the page is suspended. 95 95 IntRect contentVisibleArea = tiledDrawingArea->mapToContents(alignedVisibleArea); 96 m_webPageProxy->set ActualVisibleContentRect(contentVisibleArea);96 m_webPageProxy->setFixedVisibleContentRect(contentVisibleArea); 97 97 } 98 98 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r90760 r91064 1137 1137 1138 1138 #if ENABLE(TILED_BACKING_STORE) 1139 IntSize currentVisibleContentSize = m_frame->coreFrame()->view() ? m_frame->coreFrame()->view()-> actualVisibleContentRect().size() : IntSize();1139 IntSize currentVisibleContentSize = m_frame->coreFrame()->view() ? m_frame->coreFrame()->view()->visibleContentRect().size() : IntSize(); 1140 1140 m_frame->coreFrame()->createView(webPage->size(), backgroundColor, false, webPage->resizesToContentsLayoutSize(), isMainFrame && webPage->resizesToContentsEnabled()); 1141 1141 … … 1143 1143 m_frame->coreFrame()->view()->setDelegatesScrolling(true); 1144 1144 m_frame->coreFrame()->view()->setPaintsEntireContents(true); 1145 }1146 1147 // The HistoryController will update the scroll position later if needed.1148 m_frame->coreFrame()->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize)); 1145 // The HistoryController will update the scroll position later if needed. 1146 m_frame->coreFrame()->view()->setFixedVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize)); 1147 } 1148 1149 1149 #else 1150 1150 const ResourceResponse& response = m_frame->coreFrame()->loader()->documentLoader()->response(); -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r91012 r91064 638 638 639 639 #if ENABLE(TILED_BACKING_STORE) 640 void WebPage::set ActualVisibleContentRect(const IntRect& rect)640 void WebPage::setFixedVisibleContentRect(const IntRect& rect) 641 641 { 642 642 Frame* frame = m_page->mainFrame(); 643 643 644 frame->view()->set ActualVisibleContentRect(rect);644 frame->view()->setFixedVisibleContentRect(rect); 645 645 } 646 646 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r91012 r91064 291 291 #if ENABLE(TILED_BACKING_STORE) 292 292 void pageDidRequestScroll(const WebCore::IntPoint&); 293 void set ActualVisibleContentRect(const WebCore::IntRect&);293 void setFixedVisibleContentRect(const WebCore::IntRect&); 294 294 295 295 bool resizesToContentsEnabled() const { return !m_resizesToContentsLayoutSize.isEmpty(); } -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r91012 r91064 94 94 95 95 #if ENABLE(TILED_BACKING_STORE) 96 Set ActualVisibleContentRect(WebCore::IntRect rect)96 SetFixedVisibleContentRect(WebCore::IntRect rect) 97 97 SetResizesToContentsUsingLayoutSize(WebCore::IntSize size) 98 98 #endif
Note: See TracChangeset
for help on using the changeset viewer.