Title: [153349] trunk/Source/WebCore
Revision
153349
Author
[email protected]
Date
2013-07-25 15:25:18 -0700 (Thu, 25 Jul 2013)

Log Message

Null check m_frame in maximum and minimumScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=119109
<rdar://problem/14545393>

Reviewed by Darin Adler.

* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
Null-check m_frame (and move the early-return after the clamp-to-0
as the revert in r152911 should have).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153348 => 153349)


--- trunk/Source/WebCore/ChangeLog	2013-07-25 21:48:27 UTC (rev 153348)
+++ trunk/Source/WebCore/ChangeLog	2013-07-25 22:25:18 UTC (rev 153349)
@@ -1,3 +1,17 @@
+2013-07-25  Tim Horton  <[email protected]>
+
+        Null check m_frame in maximum and minimumScrollPosition
+        https://bugs.webkit.org/show_bug.cgi?id=119109
+        <rdar://problem/14545393>
+
+        Reviewed by Darin Adler.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::minimumScrollPosition):
+        (WebCore::FrameView::maximumScrollPosition):
+        Null-check m_frame (and move the early-return after the clamp-to-0
+        as the revert in r152911 should have).
+
 2013-07-25  Anders Carlsson  <[email protected]>
 
         Localizable.strings generated by extract-localizable-strings should be UTF-8

Modified: trunk/Source/WebCore/page/FrameView.cpp (153348 => 153349)


--- trunk/Source/WebCore/page/FrameView.cpp	2013-07-25 21:48:27 UTC (rev 153348)
+++ trunk/Source/WebCore/page/FrameView.cpp	2013-07-25 22:25:18 UTC (rev 153349)
@@ -1636,7 +1636,7 @@
 {
     IntPoint minimumPosition(ScrollView::minimumScrollPosition());
 
-    if (!m_frame->page())
+    if (!m_frame || !m_frame->page())
         return minimumPosition;
 
     if (m_frame == m_frame->page()->mainFrame() && m_scrollPinningBehavior == PinToBottom)
@@ -1649,11 +1649,11 @@
 {
     IntPoint maximumOffset(contentsWidth() - visibleWidth() - scrollOrigin().x(), totalContentsSize().height() - visibleHeight() - scrollOrigin().y());
 
-    if (!m_frame->page())
+    maximumOffset.clampNegativeToZero();
+
+    if (!m_frame || !m_frame->page())
         return maximumOffset;
 
-    maximumOffset.clampNegativeToZero();
-
     if (m_frame == m_frame->page()->mainFrame() && m_scrollPinningBehavior == PinToTop)
         maximumOffset.setY(minimumScrollPosition().y());
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to