Title: [126772] trunk/Source/WebKit/blackberry
Revision
126772
Author
[email protected]
Date
2012-08-27 10:06:06 -0700 (Mon, 27 Aug 2012)

Log Message

[BlackBerry] Not using absoluteVisibleOverSize when rotating
https://bugs.webkit.org/show_bug.cgi?id=95092
PR #190469

Patch by Leo Yang <[email protected]> on 2012-08-27
Reviewed by Antonio Gomes.
Reviewed internally by Arvid Nilsson.

When we are rotating don't count absolute overflow visible size
into fixed layout size because we are in a transient state. The
absolute overflow visible size remains old size during rotation.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (126771 => 126772)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-08-27 17:04:45 UTC (rev 126771)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-08-27 17:06:06 UTC (rev 126772)
@@ -2495,11 +2495,20 @@
     }
 
     if (m_viewMode == Desktop) {
-        // If we detect an overflow larger than the contents size then use that instead since
-        // it'll still be clamped by the maxWidth below...
-        int width = std::max(absoluteVisibleOverflowSize().width(), contentsSize().width());
-        if (m_pendingOrientation != -1 && !m_nestedLayoutFinishedCount)
-            width = 0;
+        int width;
+        if (m_pendingOrientation == -1) {
+            // If we detect an overflow larger than the contents size then use that instead since
+            // it'll still be clamped by the maxWidth below...
+            width = std::max(absoluteVisibleOverflowSize().width(), contentsSize().width());
+        } else {
+            if (!m_nestedLayoutFinishedCount)
+                width = 0;
+            else {
+                // Don't consider absoluteVisibleOverflowSize when we are in the middle of determining final layout size.
+                // See PR #190469.
+                width = contentsSize().width();
+            }
+        }
 
         if (snapToIncrement) {
             // Snap to increments of defaultLayoutWidth / 2.0.

Modified: trunk/Source/WebKit/blackberry/ChangeLog (126771 => 126772)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-08-27 17:04:45 UTC (rev 126771)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-08-27 17:06:06 UTC (rev 126772)
@@ -1,3 +1,19 @@
+2012-08-27  Leo Yang  <[email protected]>
+
+        [BlackBerry] Not using absoluteVisibleOverSize when rotating
+        https://bugs.webkit.org/show_bug.cgi?id=95092
+        PR #190469
+
+        Reviewed by Antonio Gomes.
+        Reviewed internally by Arvid Nilsson.
+
+        When we are rotating don't count absolute overflow visible size
+        into fixed layout size because we are in a transient state. The
+        absolute overflow visible size remains old size during rotation.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
+
 2012-08-25  Antonio Gomes  <[email protected]>
 
         [BlackBerry] Remove the 'in region scrollable starting node' concept from InRegionScroller
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to