Title: [95227] trunk/Source/WebCore
Revision
95227
Author
ander...@apple.com
Date
2011-09-15 14:10:27 -0700 (Thu, 15 Sep 2011)

Log Message

Remove ScrollView::platformContentsSize
https://bugs.webkit.org/show_bug.cgi?id=68188

Reviewed by Darin Adler.

Since ScrollView keeps track of the contents size in ScrollView::m_contentsSize, we never
have to ask the underlying platform scroll view for contents size since it should always just
be equal to m_contentsSize.

* platform/ScrollView.cpp:
(WebCore::ScrollView::contentsSize):
(WebCore::ScrollView::wheelEvent):
* platform/ScrollView.h:
* platform/mac/ScrollViewMac.mm:
* platform/wx/ScrollViewWx.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (95226 => 95227)


--- trunk/Source/WebCore/ChangeLog	2011-09-15 21:04:09 UTC (rev 95226)
+++ trunk/Source/WebCore/ChangeLog	2011-09-15 21:10:27 UTC (rev 95227)
@@ -1,3 +1,21 @@
+2011-09-15  Anders Carlsson  <ander...@apple.com>
+
+        Remove ScrollView::platformContentsSize
+        https://bugs.webkit.org/show_bug.cgi?id=68188
+
+        Reviewed by Darin Adler.
+
+        Since ScrollView keeps track of the contents size in ScrollView::m_contentsSize, we never
+        have to ask the underlying platform scroll view for contents size since it should always just
+        be equal to m_contentsSize.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::contentsSize):
+        (WebCore::ScrollView::wheelEvent):
+        * platform/ScrollView.h:
+        * platform/mac/ScrollViewMac.mm:
+        * platform/wx/ScrollViewWx.cpp:
+
 2011-09-15  Jon Lee  <jon...@apple.com>
 
         Submitting a form with target=_blank works only once

Modified: trunk/Source/WebCore/platform/ScrollView.cpp (95226 => 95227)


--- trunk/Source/WebCore/platform/ScrollView.cpp	2011-09-15 21:04:09 UTC (rev 95226)
+++ trunk/Source/WebCore/platform/ScrollView.cpp	2011-09-15 21:10:27 UTC (rev 95227)
@@ -280,8 +280,6 @@
 
 IntSize ScrollView::contentsSize() const
 {
-    if (platformWidget())
-        return platformContentsSize();
     return m_contentsSize;
 }
 
@@ -1326,11 +1324,6 @@
     return IntRect();
 }
 
-IntSize ScrollView::platformContentsSize() const
-{
-    return IntSize();
-}
-
 void ScrollView::platformSetContentsSize()
 {
 }

Modified: trunk/Source/WebCore/platform/ScrollView.h (95226 => 95227)


--- trunk/Source/WebCore/platform/ScrollView.h	2011-09-15 21:04:09 UTC (rev 95226)
+++ trunk/Source/WebCore/platform/ScrollView.h	2011-09-15 21:10:27 UTC (rev 95227)
@@ -384,7 +384,6 @@
     void platformSetCanBlitOnScroll(bool);
     bool platformCanBlitOnScroll() const;
     IntRect platformVisibleContentRect(bool includeScrollbars) const;
-    IntSize platformContentsSize() const;
     void platformSetContentsSize();
     IntRect platformContentsToScreen(const IntRect&) const;
     IntPoint platformScreenToContents(const IntPoint&) const;

Modified: trunk/Source/WebCore/platform/mac/ScrollViewMac.mm (95226 => 95227)


--- trunk/Source/WebCore/platform/mac/ScrollViewMac.mm	2011-09-15 21:04:09 UTC (rev 95226)
+++ trunk/Source/WebCore/platform/mac/ScrollViewMac.mm	2011-09-15 21:10:27 UTC (rev 95227)
@@ -117,15 +117,6 @@
     return IntRect();
 }
 
-IntSize ScrollView::platformContentsSize() const
-{
-    BEGIN_BLOCK_OBJC_EXCEPTIONS;
-    if (NSView* documentView = this->documentView())
-        return enclosingIntRect([documentView bounds]).size();
-    END_BLOCK_OBJC_EXCEPTIONS;
-    return IntSize();
-}
-
 void ScrollView::platformSetContentsSize()
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;

Modified: trunk/Source/WebCore/platform/wx/ScrollViewWx.cpp (95226 => 95227)


--- trunk/Source/WebCore/platform/wx/ScrollViewWx.cpp	2011-09-15 21:04:09 UTC (rev 95226)
+++ trunk/Source/WebCore/platform/wx/ScrollViewWx.cpp	2011-09-15 21:10:27 UTC (rev 95227)
@@ -165,17 +165,6 @@
     return IntRect(m_data->viewStart.x, m_data->viewStart.y, width, height);
 }
 
-IntSize ScrollView::platformContentsSize() const
-{
-    int width = 0;
-    int height = 0;
-    if (platformWidget()) {
-        platformWidget()->GetVirtualSize(&width, &height);
-        ASSERT(width >= 0 && height >= 0);
-    }
-    return IntSize(width, height);
-}
-
 void ScrollView::platformSetScrollPosition(const IntPoint& scrollPoint)
 {
     wxWindow* win = platformWidget();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to