Title: [125796] trunk/Source/WebKit/blackberry
Revision
125796
Author
[email protected]
Date
2012-08-16 11:46:58 -0700 (Thu, 16 Aug 2012)

Log Message

[BlackBerry] Remove Mobile mode from WebPage.cpp and WebPage_p.h
https://bugs.webkit.org/show_bug.cgi?id=94223
PR #192773

Patch by Leo Yang <[email protected]> on 2012-08-16
Reviewed by Rob Buis.
Reviewed internally by Arvid Nilsson.

Remove Mobile mode as it's not been used. Also remove code that
handle top-level SVG document because now we can handle it in Desktop mode.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (125795 => 125796)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-08-16 18:07:14 UTC (rev 125795)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2012-08-16 18:46:58 UTC (rev 125796)
@@ -1093,16 +1093,6 @@
             didReceiveTouchEventMode(ProcessedTouchEvents);
 #endif
 
-            // If it's a outmost SVG document, we use FixedDesktop mode, otherwise
-            // we default to Mobile mode. For example, using FixedDesktop mode to
-            // render http://www.croczilla.com/bits_and_pieces/svg/samples/tiger/tiger.svg
-            // is user-experience friendly.
-            if (m_page->mainFrame()->document()->isSVGDocument()) {
-                setShouldUseFixedDesktopMode(true);
-                setViewMode(FixedDesktop);
-            } else
-                setViewMode(Mobile);
-
             // Reset block zoom and reflow.
             resetBlockZoom();
 #if ENABLE(VIEWPORT_REFLOW)
@@ -2536,32 +2526,8 @@
         return IntSize(width, height);
     }
 
-    if (m_webSettings->isZoomToFitOnLoad()) {
-        // We need to clamp the layout width to the minimum of the layout
-        // width or the content width. This is important under rotation for mobile
-        // websites. We want the page to remain layouted at the same width which
-        // it was loaded with, and instead change the zoom level to fit to screen.
-        // The height is welcome to adapt to the height used in the new orientation,
-        // otherwise we will get a grey bar below the web page.
-        if (m_mainFrame->view() && !contentsSize().isEmpty())
-            minWidth = contentsSize().width();
-        else {
-            // If there is no contents width, use the minimum of screen width
-            // and layout width to shape the first layout to a contents width
-            // that we could reasonably zoom to fit, in a manner that takes
-            // orientation into account and still respects a small default
-            // layout width.
-#if ENABLE(ORIENTATION_EVENTS)
-            minWidth = m_mainFrame->orientation() % 180
-                ? Platform::Graphics::Screen::primaryScreen()->height()
-                : Platform::Graphics::Screen::primaryScreen()->width();
-#else
-            minWidth = Platform::Graphics::Screen::primaryScreen()->width();
-#endif
-        }
-    }
-
-    return IntSize(std::min(minWidth, defaultLayoutWidth), defaultLayoutHeight);
+    ASSERT_NOT_REACHED();
+    return IntSize(defaultLayoutWidth, defaultLayoutHeight);
 }
 
 BackingStoreClient* WebPagePrivate::backingStoreClientForFrame(const Frame* frame) const

Modified: trunk/Source/WebKit/blackberry/Api/WebPage_p.h (125795 => 125796)


--- trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-08-16 18:07:14 UTC (rev 125795)
+++ trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2012-08-16 18:46:58 UTC (rev 125796)
@@ -91,7 +91,7 @@
 #endif
                      , public Platform::GuardedPointerBase {
 public:
-    enum ViewMode { Mobile, Desktop, FixedDesktop };
+    enum ViewMode { Desktop, FixedDesktop };
     enum LoadState { None /* on instantiation of page */, Provisional, Committed, Finished, Failed };
 
     WebPagePrivate(WebPage*, WebPageClient*, const WebCore::IntRect&);

Modified: trunk/Source/WebKit/blackberry/ChangeLog (125795 => 125796)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-08-16 18:07:14 UTC (rev 125795)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-08-16 18:46:58 UTC (rev 125796)
@@ -1,3 +1,20 @@
+2012-08-16  Leo Yang  <[email protected]>
+
+        [BlackBerry] Remove Mobile mode from WebPage.cpp and WebPage_p.h
+        https://bugs.webkit.org/show_bug.cgi?id=94223
+        PR #192773
+
+        Reviewed by Rob Buis.
+        Reviewed internally by Arvid Nilsson.
+
+        Remove Mobile mode as it's not been used. Also remove code that
+        handle top-level SVG document because now we can handle it in Desktop mode.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::setLoadState):
+        (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
+        * Api/WebPage_p.h:
+
 2012-08-16  Arvid Nilsson  <[email protected]>
 
         [BlackBerry] SurfacePool::waitForBuffer() sometimes waits for deleted EGLSyncKHR object
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to