Title: [95570] trunk/Source
- Revision
- 95570
- Author
- [email protected]
- Date
- 2011-09-20 14:47:07 -0700 (Tue, 20 Sep 2011)
Log Message
Remove ScrollView::platformContentsSize
https://bugs.webkit.org/show_bug.cgi?id=68188
Reviewed by Darin Adler.
../WebCore:
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:
../WebKit/mac:
When creating the document view, make sure it's zero sized which matches the initial size
of the ScrollView. This is fine to do early since DocumentWriter::begin sets the contents
size to a zero size anyway.
* WebView/WebFrameView.mm:
(-[WebFrameView _makeDocumentViewForDataSource:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (95569 => 95570)
--- trunk/Source/WebCore/ChangeLog 2011-09-20 21:14:33 UTC (rev 95569)
+++ trunk/Source/WebCore/ChangeLog 2011-09-20 21:47:07 UTC (rev 95570)
@@ -1,3 +1,21 @@
+2011-09-20 Anders Carlsson <[email protected]>
+
+ 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-20 Alexis Menard <[email protected]>
[Qt] [WK2] Implement a persistent cookie storage.
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (95569 => 95570)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2011-09-20 21:14:33 UTC (rev 95569)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2011-09-20 21:47:07 UTC (rev 95570)
@@ -280,8 +280,6 @@
IntSize ScrollView::contentsSize() const
{
- if (platformWidget())
- return platformContentsSize();
return m_contentsSize;
}
@@ -1328,11 +1326,6 @@
return IntRect();
}
-IntSize ScrollView::platformContentsSize() const
-{
- return IntSize();
-}
-
void ScrollView::platformSetContentsSize()
{
}
Modified: trunk/Source/WebCore/platform/ScrollView.h (95569 => 95570)
--- trunk/Source/WebCore/platform/ScrollView.h 2011-09-20 21:14:33 UTC (rev 95569)
+++ trunk/Source/WebCore/platform/ScrollView.h 2011-09-20 21:47:07 UTC (rev 95570)
@@ -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 (95569 => 95570)
--- trunk/Source/WebCore/platform/mac/ScrollViewMac.mm 2011-09-20 21:14:33 UTC (rev 95569)
+++ trunk/Source/WebCore/platform/mac/ScrollViewMac.mm 2011-09-20 21:47:07 UTC (rev 95570)
@@ -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 (95569 => 95570)
--- trunk/Source/WebCore/platform/wx/ScrollViewWx.cpp 2011-09-20 21:14:33 UTC (rev 95569)
+++ trunk/Source/WebCore/platform/wx/ScrollViewWx.cpp 2011-09-20 21:47:07 UTC (rev 95570)
@@ -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();
Modified: trunk/Source/WebKit/mac/ChangeLog (95569 => 95570)
--- trunk/Source/WebKit/mac/ChangeLog 2011-09-20 21:14:33 UTC (rev 95569)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-09-20 21:47:07 UTC (rev 95570)
@@ -1,3 +1,17 @@
+2011-09-20 Anders Carlsson <[email protected]>
+
+ Remove ScrollView::platformContentsSize
+ https://bugs.webkit.org/show_bug.cgi?id=68188
+
+ Reviewed by Darin Adler.
+
+ When creating the document view, make sure it's zero sized which matches the initial size
+ of the ScrollView. This is fine to do early since DocumentWriter::begin sets the contents
+ size to a zero size anyway.
+
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView _makeDocumentViewForDataSource:]):
+
2011-09-19 Pavel Feldman <[email protected]>
Web Inspector: streamline Console's MessageType and MessageSource semantics.
Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (95569 => 95570)
--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm 2011-09-20 21:14:33 UTC (rev 95569)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm 2011-09-20 21:47:07 UTC (rev 95570)
@@ -167,7 +167,7 @@
if (dataSourceRepresentation && [dataSourceRepresentation class] == viewClass)
documentView = (NSView <WebDocumentView> *)[dataSourceRepresentation retain];
else
- documentView = [[viewClass alloc] initWithFrame:[self bounds]];
+ documentView = [[viewClass alloc] init];
} else
documentView = nil;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes