Diff
Modified: trunk/Source/WebCore/ChangeLog (91063 => 91064)
--- trunk/Source/WebCore/ChangeLog 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebCore/ChangeLog 2011-07-15 12:02:59 UTC (rev 91064)
@@ -1,3 +1,37 @@
+2011-07-15 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ Upstream QtWebKit/N9 changes related to visibleContentRect
+ https://bugs.webkit.org/show_bug.cgi?id=64589
+
+ Reviewed by Simon Hausmann.
+
+ Rename setActualVisibleContentRect to setFixedVisibleContentRect
+ as that makes it more obvious that it is an override. It is also
+ consistent with the setFixedLayout which is often used in
+ conjunction with it.
+
+ Make visibleContentRect return the fixed value if set, and remove
+ all calls to actualVisibleContentRect.
+
+ Also updated the documentation.
+
+ This is similar to what we have on our QtWebKit/N9 branch and is
+ pretty well tested.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::visibleContentRect):
+ If a fixed visibleContentRect is set, return that.
+ Remove the code returning the contents size when in
+ paintsEntireContents mode as that is wrong and already
+ ifdeffed out for EFL.
+ (WebCore::ScrollView::setScrollPosition):
+ Do not try to be smart and update the fixed visibleContentsRect
+ automatically, as the embedder might ignore the scroll request
+ for various reasons.
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::setFixedVisibleContentRect):
+ (WebCore::ScrollView::fixedVisibleContentRect):
+
2011-07-15 Mike West <mk...@chromium.org>
Web Inspector: Rename console.markTimeline() to console.timeStamp() for Firebug compatibility.
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (91063 => 91064)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2011-07-15 12:02:59 UTC (rev 91064)
@@ -228,10 +228,8 @@
if (platformWidget())
return platformVisibleContentRect(includeScrollbars);
-#if !PLATFORM(EFL)
- if (paintsEntireContents())
- return IntRect(IntPoint(0, 0), contentsSize());
-#endif
+ if (!m_fixedVisibleContentRect.isEmpty())
+ return m_fixedVisibleContentRect;
int verticalScrollbarWidth = verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar()
&& !includeScrollbars ? verticalScrollbar()->width() : 0;
@@ -383,8 +381,6 @@
#if ENABLE(TILED_BACKING_STORE)
if (delegatesScrolling()) {
hostWindow()->delegatedScrollRequested(scrollPoint);
- if (!m_actualVisibleContentRect.isEmpty())
- m_actualVisibleContentRect.setLocation(scrollPoint);
return;
}
#endif
Modified: trunk/Source/WebCore/platform/ScrollView.h (91063 => 91064)
--- trunk/Source/WebCore/platform/ScrollView.h 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebCore/platform/ScrollView.h 2011-07-15 12:02:59 UTC (rev 91064)
@@ -140,10 +140,10 @@
// and height. By default the scrollbars themselves are excluded from this rectangle, but an optional boolean argument allows them to be
// included.
// In the situation the client is responsible for the scrolling (ie. with a tiled backing store) it is possible to use
- // the actualVisibleContentRect instead, though this must be updated manually, e.g after panning ends.
- IntRect visibleContentRect(bool includeScrollbars = false) const;
- IntRect actualVisibleContentRect() const { return m_actualVisibleContentRect.isEmpty() ? visibleContentRect() : m_actualVisibleContentRect; }
- void setActualVisibleContentRect(const IntRect& actualVisibleContentRect) { m_actualVisibleContentRect = actualVisibleContentRect; }
+ // the setFixedVisibleContentRect instead for the mainframe, though this must be updated manually, e.g just before resuming the page
+ // which usually will happen when panning, pinching and rotation ends, or when scale or position are changed manually.
+ virtual IntRect visibleContentRect(bool includeScrollbars = false) const;
+ void setFixedVisibleContentRect(const IntRect& visibleContentRect) { m_fixedVisibleContentRect = visibleContentRect; }
LayoutUnit visibleWidth() const { return visibleContentRect().width(); }
LayoutUnit visibleHeight() const { return visibleContentRect().height(); }
@@ -296,6 +296,8 @@
virtual void contentsResized() = 0;
virtual void visibleContentsResized() = 0;
+ IntRect fixedVisibleContentRect() const { return m_fixedVisibleContentRect; }
+
IntSize boundsSize() const { return m_boundsSize; }
void setInitialBoundsSize(const IntSize&);
@@ -335,7 +337,7 @@
// whether it is safe to blit on scroll.
bool m_canBlitOnScroll;
- IntRect m_actualVisibleContentRect;
+ IntRect m_fixedVisibleContentRect;
IntSize m_scrollOffset; // FIXME: Would rather store this as a position, but we will wait to make this change until more code is shared.
IntPoint m_cachedScrollPosition;
IntSize m_fixedLayoutSize;
Modified: trunk/Source/WebKit/qt/Api/qwebpage.cpp (91063 => 91064)
--- trunk/Source/WebKit/qt/Api/qwebpage.cpp 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit/qt/Api/qwebpage.cpp 2011-07-15 12:02:59 UTC (rev 91064)
@@ -2643,7 +2643,7 @@
return;
WebCore::FrameView* view = frame->d->frame->view();
- view->setActualVisibleContentRect(rect);
+ view->setFixedVisibleContentRect(rect);
}
/*!
Modified: trunk/Source/WebKit/qt/ChangeLog (91063 => 91064)
--- trunk/Source/WebKit/qt/ChangeLog 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit/qt/ChangeLog 2011-07-15 12:02:59 UTC (rev 91064)
@@ -1,3 +1,18 @@
+2011-07-15 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ Upstream QtWebKit/N9 changes related to visibleContentRect
+ https://bugs.webkit.org/show_bug.cgi?id=64589
+
+ Reviewed by Simon Hausmann.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::setActualVisibleContentRect):
+ Change to use setFixedVisibleContentRect.
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
+ Only set fixedVisibleContentRect for the mainframe.
+ * symbian/eabi/QtWebKitu.def:
+
2011-07-13 Joseph Pecoraro <joep...@webkit.org>
Improve names of some ApplicationCacheStorage accessor methods
Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (91063 => 91064)
--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp 2011-07-15 12:02:59 UTC (rev 91064)
@@ -285,7 +285,7 @@
bool hLock = hScrollbar != ScrollbarAuto;
bool vLock = vScrollbar != ScrollbarAuto;
- IntSize currentVisibleContentSize = m_frame->view() ? m_frame->view()->actualVisibleContentRect().size() : IntSize();
+ IntSize currentVisibleContentSize = m_frame->view() ? m_frame->view()->visibleContentRect().size() : IntSize();
m_frame->createView(m_webFrame->page()->viewportSize(),
backgroundColor, !backgroundColor.alpha(),
@@ -298,10 +298,10 @@
if (isMainFrame && page->d->client) {
m_frame->view()->setPaintsEntireContents(page->d->client->viewResizesToContentsEnabled());
m_frame->view()->setDelegatesScrolling(page->d->client->viewResizesToContentsEnabled());
+
+ // The HistoryController will update the scroll position later if needed.
+ m_frame->view()->setFixedVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
}
-
- // The HistoryController will update the scroll position later if needed.
- m_frame->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
}
void FrameLoaderClientQt::didSaveToPageCache()
Modified: trunk/Source/WebKit/qt/symbian/eabi/QtWebKitu.def (91063 => 91064)
--- trunk/Source/WebKit/qt/symbian/eabi/QtWebKitu.def 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit/qt/symbian/eabi/QtWebKitu.def 2011-07-15 12:02:59 UTC (rev 91064)
@@ -831,7 +831,7 @@
_ZN23DumpRenderTreeSupportQt28dumpUserGestureInFrameLoaderEb @ 830 NONAME
_ZNK8QWebPage19supportsContentTypeERK7QString @ 831 NONAME
_ZNK8QWebPage21supportedContentTypesEv @ 832 NONAME
- _ZNK8QWebPage27setActualVisibleContentRectERK5QRect @ 833 NONAME
+ _ZNK8QWebPage26setFixedVisibleContentRectERK5QRect @ 833 NONAME
_ZN8QWebPage20setFeaturePermissionEP9QWebFrameNS_7FeatureENS_16PermissionPolicyE @ 834 NONAME
_ZN8QWebPage26featurePermissionRequestedEP9QWebFrameNS_7FeatureE @ 835 NONAME
_ZN8QWebPage32featurePermissionRequestCanceledEP9QWebFrameNS_7FeatureE @ 836 NONAME
Modified: trunk/Source/WebKit2/ChangeLog (91063 => 91064)
--- trunk/Source/WebKit2/ChangeLog 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-15 12:02:59 UTC (rev 91064)
@@ -1,3 +1,28 @@
+2011-07-15 Kenneth Rohde Christiansen <kenn...@webkit.org>
+
+ Upstream QtWebKit/N9 changes related to visibleContentRect
+ https://bugs.webkit.org/show_bug.cgi?id=64589
+
+ Reviewed by Simon Hausmann.
+
+ Rename setActualVisibleContentRect to setFixedVisibleContentRect
+ as that makes it more obvious that it is an override. It is also
+ consistent with the setFixedLayout which is often used in
+ conjunction with it.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::setFixedVisibleContentRect):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/qt/qtouchwebpageproxy.cpp:
+ (QTouchWebPageProxy::setVisibleArea):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+ Only set fixedVisibleContentRect for the mainframe.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::setFixedVisibleContentRect):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+
2011-07-15 Carlos Garcia Campos <cgar...@igalia.com>
Reviewed by Martin Robinson.
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (91063 => 91064)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2011-07-15 12:02:59 UTC (rev 91064)
@@ -775,12 +775,12 @@
#endif
#if ENABLE(TILED_BACKING_STORE)
-void WebPageProxy::setActualVisibleContentRect(const IntRect& rect)
+void WebPageProxy::setFixedVisibleContentRect(const IntRect& rect)
{
if (!isValid())
return;
- process()->send(Messages::WebPage::SetActualVisibleContentRect(rect), m_pageID);
+ process()->send(Messages::WebPage::SetFixedVisibleContentRect(rect), m_pageID);
}
#endif
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (91063 => 91064)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h 2011-07-15 12:02:59 UTC (rev 91064)
@@ -337,7 +337,7 @@
Evas_Object* viewObject();
#endif
#if ENABLE(TILED_BACKING_STORE)
- void setActualVisibleContentRect(const WebCore::IntRect& rect);
+ void setFixedVisibleContentRect(const WebCore::IntRect&);
#endif
void handleMouseEvent(const NativeWebMouseEvent&);
Modified: trunk/Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.cpp (91063 => 91064)
--- trunk/Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.cpp 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.cpp 2011-07-15 12:02:59 UTC (rev 91064)
@@ -93,7 +93,7 @@
// FIXME: Once we support suspend and resume, this should be delayed until the page is active if the page is suspended.
IntRect contentVisibleArea = tiledDrawingArea->mapToContents(alignedVisibleArea);
- m_webPageProxy->setActualVisibleContentRect(contentVisibleArea);
+ m_webPageProxy->setFixedVisibleContentRect(contentVisibleArea);
}
void QTouchWebPageProxy::setResizesToContentsUsingLayoutSize(const QSize& targetLayoutSize)
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (91063 => 91064)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2011-07-15 12:02:59 UTC (rev 91064)
@@ -1136,16 +1136,16 @@
bool isMainFrame = webPage->mainFrame() == m_frame;
#if ENABLE(TILED_BACKING_STORE)
- IntSize currentVisibleContentSize = m_frame->coreFrame()->view() ? m_frame->coreFrame()->view()->actualVisibleContentRect().size() : IntSize();
+ IntSize currentVisibleContentSize = m_frame->coreFrame()->view() ? m_frame->coreFrame()->view()->visibleContentRect().size() : IntSize();
m_frame->coreFrame()->createView(webPage->size(), backgroundColor, false, webPage->resizesToContentsLayoutSize(), isMainFrame && webPage->resizesToContentsEnabled());
if (isMainFrame && webPage->resizesToContentsEnabled()) {
m_frame->coreFrame()->view()->setDelegatesScrolling(true);
m_frame->coreFrame()->view()->setPaintsEntireContents(true);
+ // The HistoryController will update the scroll position later if needed.
+ m_frame->coreFrame()->view()->setFixedVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
}
- // The HistoryController will update the scroll position later if needed.
- m_frame->coreFrame()->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
#else
const ResourceResponse& response = m_frame->coreFrame()->loader()->documentLoader()->response();
m_frameHasCustomRepresentation = isMainFrame && WebProcess::shared().shouldUseCustomRepresentationForResponse(response);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (91063 => 91064)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2011-07-15 12:02:59 UTC (rev 91064)
@@ -637,11 +637,11 @@
}
#if ENABLE(TILED_BACKING_STORE)
-void WebPage::setActualVisibleContentRect(const IntRect& rect)
+void WebPage::setFixedVisibleContentRect(const IntRect& rect)
{
Frame* frame = m_page->mainFrame();
- frame->view()->setActualVisibleContentRect(rect);
+ frame->view()->setFixedVisibleContentRect(rect);
}
void WebPage::setResizesToContentsUsingLayoutSize(const IntSize& targetLayoutSize)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (91063 => 91064)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2011-07-15 12:02:59 UTC (rev 91064)
@@ -290,7 +290,7 @@
void pageDidScroll();
#if ENABLE(TILED_BACKING_STORE)
void pageDidRequestScroll(const WebCore::IntPoint&);
- void setActualVisibleContentRect(const WebCore::IntRect&);
+ void setFixedVisibleContentRect(const WebCore::IntRect&);
bool resizesToContentsEnabled() const { return !m_resizesToContentsLayoutSize.isEmpty(); }
WebCore::IntSize resizesToContentsLayoutSize() const { return m_resizesToContentsLayoutSize; }
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (91063 => 91064)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2011-07-15 11:09:38 UTC (rev 91063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in 2011-07-15 12:02:59 UTC (rev 91064)
@@ -93,7 +93,7 @@
SetCustomTextEncodingName(WTF::String encodingName)
#if ENABLE(TILED_BACKING_STORE)
- SetActualVisibleContentRect(WebCore::IntRect rect)
+ SetFixedVisibleContentRect(WebCore::IntRect rect)
SetResizesToContentsUsingLayoutSize(WebCore::IntSize size)
#endif