[BlackBerry] notifyContentRendered() call missing in two spots
https://bugs.webkit.org/show_bug.cgi?id=92153
RIM PR 173340
Reviewed by Antonio Gomes.
In dispatchDidFirstVisualLayout() and repaint() in
immediate mode, we render but don't notify the
WebPageClient that the content was modified.
In the long run, we should probably keep track of
the modified reason from within render() itself
and use this to automatically notify the client
from within blitContents() and/or invalidateWindow(),
depending on the rendering path. That's somewhat of
a medium-size undertaking though; for now, adding
the call directly to the renderVisibleContents()
call sites will do.
This patch also adds a blitVisibleContents() to
dispatchDidFirstVisualLayout() where it was
inexplicably missing, probably on account of
old code that was never updated.
* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::repaint):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit/blackberry/Api/BackingStore.cpp b/Source/WebKit/blackberry/Api/BackingStore.cpp
index 0e62703..e6f4922 100644
--- a/Source/WebKit/blackberry/Api/BackingStore.cpp
+++ b/Source/WebKit/blackberry/Api/BackingStore.cpp
@@ -399,8 +399,11 @@
#endif
if (immediate) {
- if (render(rect) && !shouldDirectRenderingToWindow())
- blitVisibleContents();
+ if (render(rect)) {
+ if (!shouldDirectRenderingToWindow())
+ blitVisibleContents();
+ m_webPage->d->m_client->notifyContentRendered(rect);
+ }
} else
m_renderQueue->addToQueue(RenderQueue::RegularRender, rect);
}
diff --git a/Source/WebKit/blackberry/Api/WebPage.cpp b/Source/WebKit/blackberry/Api/WebPage.cpp
index 9d630f4..fbac446 100644
--- a/Source/WebKit/blackberry/Api/WebPage.cpp
+++ b/Source/WebKit/blackberry/Api/WebPage.cpp
@@ -3648,12 +3648,14 @@
m_backingStore->d->orientationChanged(); // Updates tile geometry and creates visible tile buffer.
m_backingStore->d->resetTiles(true /* resetBackground */);
m_backingStore->d->updateTiles(false /* updateVisible */, false /* immediate */);
+
// This value may have changed, so we need to update it.
directRendering = m_backingStore->d->shouldDirectRenderingToWindow();
- if (m_backingStore->d->renderVisibleContents() && !m_backingStore->d->isSuspended() && !directRendering)
- m_backingStore->d->blitVisibleContents();
-
- m_client->notifyContentRendered(m_backingStore->d->visibleContentsRect());
+ if (m_backingStore->d->renderVisibleContents()) {
+ if (!m_backingStore->d->isSuspended() && !directRendering)
+ m_backingStore->d->blitVisibleContents();
+ m_client->notifyContentRendered(m_backingStore->d->visibleContentsRect());
+ }
} else {
if (m_backingStore->d->isOpenGLCompositing())
setCompositorDrawsRootLayer(false);
diff --git a/Source/WebKit/blackberry/ChangeLog b/Source/WebKit/blackberry/ChangeLog
index 8f29d75..d3452be 100644
--- a/Source/WebKit/blackberry/ChangeLog
+++ b/Source/WebKit/blackberry/ChangeLog
@@ -1,3 +1,36 @@
+2012-07-25 Jakob Petsovits <jpetsovits@rim.com>
+
+ [BlackBerry] notifyContentRendered() call missing in two spots
+ https://bugs.webkit.org/show_bug.cgi?id=92153
+ RIM PR 173340
+
+ Reviewed by Antonio Gomes.
+
+ In dispatchDidFirstVisualLayout() and repaint() in
+ immediate mode, we render but don't notify the
+ WebPageClient that the content was modified.
+
+ In the long run, we should probably keep track of
+ the modified reason from within render() itself
+ and use this to automatically notify the client
+ from within blitContents() and/or invalidateWindow(),
+ depending on the rendering path. That's somewhat of
+ a medium-size undertaking though; for now, adding
+ the call directly to the renderVisibleContents()
+ call sites will do.
+
+ This patch also adds a blitVisibleContents() to
+ dispatchDidFirstVisualLayout() where it was
+ inexplicably missing, probably on account of
+ old code that was never updated.
+
+ * Api/BackingStore.cpp:
+ (BlackBerry::WebKit::BackingStorePrivate::repaint):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
+ * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
+ (WebCore::FrameLoaderClientBlackBerry::dispatchDidFirstVisuallyNonEmptyLayout):
+
2012-07-24 Rob Buis <rbuis@rim.com>
[BlackBerry] Do not call settings setters twice on page construction
diff --git a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
index 4902f60..2c8bf04 100644
--- a/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
+++ b/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
@@ -849,9 +849,14 @@
m_webPagePrivate->setShouldZoomToInitialScaleAfterLoadFinished(true);
if (m_webPagePrivate->shouldZoomToInitialScaleOnLoad()) {
+ BackingStorePrivate* backingStorePrivate = m_webPagePrivate->m_backingStore->d;
m_webPagePrivate->zoomToInitialScaleOnLoad(); // Set the proper zoom level first.
- m_webPagePrivate->m_backingStore->d->clearVisibleZoom(); // Clear the visible zoom since we're explicitly rendering+blitting below.
- m_webPagePrivate->m_backingStore->d->renderVisibleContents();
+ backingStorePrivate->clearVisibleZoom(); // Clear the visible zoom since we're explicitly rendering+blitting below.
+ if (backingStorePrivate->renderVisibleContents()) {
+ if (!backingStorePrivate->shouldDirectRenderingToWindow())
+ backingStorePrivate->blitVisibleContents();
+ m_webPagePrivate->m_client->notifyContentRendered(backingStorePrivate->visibleContentsRect());
+ }
}
m_webPagePrivate->m_client->notifyFirstVisuallyNonEmptyLayout();