Title: [98059] trunk/Source/WebKit/chromium
Revision
98059
Author
fsam...@chromium.org
Date
2011-10-20 19:37:01 -0700 (Thu, 20 Oct 2011)

Log Message

[Chromium] Fixed Layout API needs to check that a FrameView has been created to avoid segfaults
https://bugs.webkit.org/show_bug.cgi?id=70519

Reviewed by Adam Barth.

Simple patch. Upcoming patches for https://bugs.webkit.org/show_bug.cgi?id=70559 will make
use of these methods in certain situations where the main frame doesn't yet have a FrameView.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::isFixedLayoutModeEnabled):
(WebKit::WebViewImpl::enableFixedLayoutMode):
(WebKit::WebViewImpl::fixedLayoutSize):
(WebKit::WebViewImpl::setFixedLayoutSize):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (98058 => 98059)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-10-21 02:35:12 UTC (rev 98058)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-10-21 02:37:01 UTC (rev 98059)
@@ -1,3 +1,19 @@
+2011-10-20  Fady Samuel  <fsam...@chromium.org>
+
+        [Chromium] Fixed Layout API needs to check that a FrameView has been created to avoid segfaults
+        https://bugs.webkit.org/show_bug.cgi?id=70519
+
+        Reviewed by Adam Barth.
+
+        Simple patch. Upcoming patches for https://bugs.webkit.org/show_bug.cgi?id=70559 will make
+        use of these methods in certain situations where the main frame doesn't yet have a FrameView.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::isFixedLayoutModeEnabled):
+        (WebKit::WebViewImpl::enableFixedLayoutMode):
+        (WebKit::WebViewImpl::fixedLayoutSize):
+        (WebKit::WebViewImpl::setFixedLayoutSize):
+
 2011-10-20  Sheriff Bot  <webkit.review....@gmail.com>
 
         Unreviewed.  Rolled DEPS.

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (98058 => 98059)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-10-21 02:35:12 UTC (rev 98058)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2011-10-21 02:37:01 UTC (rev 98059)
@@ -1919,7 +1919,7 @@
         return false;
 
     Frame* frame = page()->mainFrame();
-    if (!frame)
+    if (!frame || !frame->view())
         return false;
 
     return frame->view()->useFixedLayout();
@@ -1931,7 +1931,7 @@
         return;
 
     Frame* frame = page()->mainFrame();
-    if (!frame)
+    if (!frame || !frame->view())
         return;
 
     frame->view()->setUseFixedLayout(enable);
@@ -1943,7 +1943,7 @@
         return WebSize();
 
     Frame* frame = page()->mainFrame();
-    if (!frame)
+    if (!frame || !frame->view())
         return WebSize();
 
     return frame->view()->fixedLayoutSize();
@@ -1955,7 +1955,7 @@
         return;
 
     Frame* frame = page()->mainFrame();
-    if (!frame)
+    if (!frame || !frame->view())
         return;
 
     frame->view()->setFixedLayoutSize(layoutSize);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to