[Title] Update a work-around patch for a naver page
authorGyuyoung Kim <gyuyoung.kim@samsung.com>
Tue, 9 Jul 2013 11:22:40 +0000 (20:22 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Thu, 11 Jul 2013 07:29:21 +0000 (07:29 +0000)
[Issues] There are some side-effect by existing work-around patch
[Problem] Some web pages can't layout properly.
[Solution] Improve a condition to adjust the work-around patch

Change-Id: I914d1200199d556a1b46f4e4482eaf0ad1f109bd

Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

index 5d47646..166b8b5 100755 (executable)
@@ -506,17 +506,12 @@ PlatformPageClient WebChromeClient::platformPageClient() const
 }
 
 #if ENABLE(TIZEN_VIEWPORT_META_TAG)
-static const int landscapeWidth = 640;
 bool WebChromeClient::canContentsSizeChange(Frame* frame, const IntSize& size) const
 {
     // FIXME1: This patch should be removed AS SOON AS unexpected layout change problem is fixed.
-    // ex) m.news.naver.com
-    // FIXME2: By this patch, contents size is not changed properly on big size contents
-    // ex) www.expedia.com - fixedLayoutSize.width: 980, changedContentsSize: 1272
-    // ex) www.adobe.com - fixedLayoutSize.width: 360, changedContentsSize: 950
-    // ex) www.mt.co.kr (desktop site) - fixedLayoutSize.width: 980, changedContentsSize: 1090
-    FrameView* view = m_page->mainFrame()->view();
-    if (view->fixedLayoutSize().width() < size.width() && size.width() < landscapeWidth)
+    // A page on naver isn't fitted when device is moved from landscape to portrait.
+    String url = frame->document()->url().string();
+    if (url.startsWith("https://nid.naver.com/user"))
         return false;
 
     return true;