Title: [118405] trunk/Source/WebKit/blackberry
- Revision
- 118405
- Author
- [email protected]
- Date
- 2012-05-24 12:40:09 -0700 (Thu, 24 May 2012)
Log Message
Possible missing layout in Iris browser after hiding VKB
https://bugs.webkit.org/show_bug.cgi?id=87408
PR #153056 / MKS_3674963
Reviewed by Adam Treat.
Patch by Antonio Gomes <[email protected]>
Also informally reviewed by Mike Fenton.
If we are not rotating and we've started a viewport resize with
the Render tree in dirty state (i.e. it needs layout), lets
reset the needsLayout flag for now but set our own 'needsLayout'.
Reason: calls like ScrollView::setFixedLayoutSize can trigger a layout
if the render tree needs it. We want to avoid it till the viewport resize
is actually done (i.e. ScrollView::setViewportSize gets called
further down the method) so we do not get render artifacts.
Since our WebPage::setViewportSize calls rely on async Virtual
Keyboard responses, we were getting it called with the render
tree sometimes in a dirty state, sometimes not. It was flaky!
Patch ensures a clear render tree state, and sets it as dirty
afterwards as needed, so layout happens at the proper time.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (118404 => 118405)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-05-24 19:38:10 UTC (rev 118404)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-05-24 19:40:09 UTC (rev 118405)
@@ -3514,9 +3514,26 @@
if (!m_visible || !m_backingStore->d->isActive())
setShouldResetTilesWhenShown(true);
+ bool needsLayout = false;
+
bool hasPendingOrientation = m_pendingOrientation != -1;
if (hasPendingOrientation)
screenRotated();
+ else {
+ // If we are not rotating and we've started a viewport resize with
+ // the Render tree in dirty state (i.e. it needs layout), lets
+ // reset the needsLayout flag for now but set our own 'needsLayout'.
+ //
+ // Reason: calls like ScrollView::setFixedLayoutSize can trigger a layout
+ // if the render tree needs it. We want to avoid it till the viewport resize
+ // is actually done (i.e. ScrollView::setViewportSize gets called
+ // further down the method).
+ if (m_mainFrame->view()->needsLayout()) {
+ m_mainFrame->view()->unscheduleRelayout();
+ m_mainFrame->contentRenderer()->setNeedsLayout(false);
+ needsLayout = true;
+ }
+ }
// The window buffers might have been recreated, cleared, moved, etc., so:
m_backingStore->d->windowFrontBufferState()->clearBlittedRegion();
@@ -3541,7 +3558,6 @@
setDefaultLayoutSize(transformedActualVisibleSize);
// Recompute our virtual viewport.
- bool needsLayout = false;
static ViewportArguments defaultViewportArguments;
if (!(m_viewportArguments == defaultViewportArguments)) {
// We may need to infer the width and height for the viewport with respect to the rotation.
Modified: trunk/Source/WebKit/blackberry/ChangeLog (118404 => 118405)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-05-24 19:38:10 UTC (rev 118404)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-05-24 19:40:09 UTC (rev 118405)
@@ -1,3 +1,31 @@
+2012-05-24 Antonio Gomes <[email protected]>
+
+ Possible missing layout in Iris browser after hiding VKB
+ https://bugs.webkit.org/show_bug.cgi?id=87408
+ PR #153056 / MKS_3674963
+
+ Reviewed by Adam Treat.
+
+ Also informally reviewed by Mike Fenton.
+
+ If we are not rotating and we've started a viewport resize with
+ the Render tree in dirty state (i.e. it needs layout), lets
+ reset the needsLayout flag for now but set our own 'needsLayout'.
+
+ Reason: calls like ScrollView::setFixedLayoutSize can trigger a layout
+ if the render tree needs it. We want to avoid it till the viewport resize
+ is actually done (i.e. ScrollView::setViewportSize gets called
+ further down the method) so we do not get render artifacts.
+
+ Since our WebPage::setViewportSize calls rely on async Virtual
+ Keyboard responses, we were getting it called with the render
+ tree sometimes in a dirty state, sometimes not. It was flaky!
+ Patch ensures a clear render tree state, and sets it as dirty
+ afterwards as needed, so layout happens at the proper time.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
+
2012-05-24 Mike Fenton <[email protected]>
[BlackBerry] Padding adjustment for determining the relative distance for a point was backwards.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes