Title: [153863] branches/safari-537-branch/Source/WebCore
- Revision
- 153863
- Author
- [email protected]
- Date
- 2013-08-08 16:57:29 -0700 (Thu, 08 Aug 2013)
Log Message
Merged r153810. <rdar://problem/14669010>
Modified Paths
Diff
Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153862 => 153863)
--- branches/safari-537-branch/Source/WebCore/ChangeLog 2013-08-08 23:47:01 UTC (rev 153862)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog 2013-08-08 23:57:29 UTC (rev 153863)
@@ -1,5 +1,37 @@
2013-08-08 Lucas Forschler <[email protected]>
+ Merge r153810
+
+ 2013-08-07 Simon Fraser <[email protected]>
+
+ Avoid spurious "all repaint" layouts when scrolling WebViews on Retina displays
+ https://bugs.webkit.org/show_bug.cgi?id=119564
+
+ Reviewed by Beth Dakin.
+
+ When scrolling WebViews on Macs with Retina displays, AppKit uses
+ device pixels for the scroll offset, so [scrollView() documentVisibleRect]
+ can return a CGRect with non-integral origin. This rect is used by layout,
+ via layoutSize(), to decide whether the view size changed, which prompts
+ a full repaint. However, FrameView gets a value which has been rounded
+ by enclosingIntRect(), which increases the height or width by 1px if the
+ y or x offset is on a half-pixel, causing spurious full repaints.
+
+ Fix by plumbing through platformVisibleContentSize(), which just
+ gets the size of the -documentVisibleRect.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::layout): Don't get layoutHeight and layoutWidth
+ separately, since that is two calls down into platformVisibleContentSize.
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::unscaledVisibleContentSize):
+ (WebCore::ScrollView::platformVisibleContentSize):
+ * platform/ScrollView.h:
+ * platform/mac/ScrollViewMac.mm:
+ (WebCore::ScrollView::platformVisibleContentSize):
+
+2013-08-08 Lucas Forschler <[email protected]>
+
Merge r153845
2013-08-08 Brent Fulgham <[email protected]>
Modified: branches/safari-537-branch/Source/WebCore/page/FrameView.cpp (153862 => 153863)
--- branches/safari-537-branch/Source/WebCore/page/FrameView.cpp 2013-08-08 23:47:01 UTC (rev 153862)
+++ branches/safari-537-branch/Source/WebCore/page/FrameView.cpp 2013-08-08 23:57:29 UTC (rev 153863)
@@ -1287,7 +1287,7 @@
LayoutSize oldSize = m_size;
- m_size = LayoutSize(layoutWidth(), layoutHeight());
+ m_size = layoutSize();
if (oldSize != m_size) {
m_doFullRepaint = true;
Modified: branches/safari-537-branch/Source/WebCore/platform/ScrollView.cpp (153862 => 153863)
--- branches/safari-537-branch/Source/WebCore/platform/ScrollView.cpp 2013-08-08 23:47:01 UTC (rev 153862)
+++ branches/safari-537-branch/Source/WebCore/platform/ScrollView.cpp 2013-08-08 23:57:29 UTC (rev 153863)
@@ -221,7 +221,7 @@
IntSize ScrollView::unscaledVisibleContentSize(VisibleContentRectIncludesScrollbars scrollbarInclusion) const
{
if (platformWidget())
- return platformVisibleContentRect(scrollbarInclusion == IncludeScrollbars).size();
+ return platformVisibleContentSize(scrollbarInclusion == IncludeScrollbars);
if (!m_fixedVisibleContentRect.isEmpty())
return m_fixedVisibleContentRect.size();
@@ -1406,6 +1406,11 @@
return IntRect();
}
+IntSize ScrollView::platformVisibleContentSize(bool) const
+{
+ return IntSize();
+}
+
void ScrollView::platformSetContentsSize()
{
}
Modified: branches/safari-537-branch/Source/WebCore/platform/ScrollView.h (153862 => 153863)
--- branches/safari-537-branch/Source/WebCore/platform/ScrollView.h 2013-08-08 23:47:01 UTC (rev 153862)
+++ branches/safari-537-branch/Source/WebCore/platform/ScrollView.h 2013-08-08 23:57:29 UTC (rev 153863)
@@ -388,6 +388,7 @@
void platformSetCanBlitOnScroll(bool);
bool platformCanBlitOnScroll() const;
IntRect platformVisibleContentRect(bool includeScrollbars) const;
+ IntSize platformVisibleContentSize(bool includeScrollbars) const;
void platformSetContentsSize();
IntRect platformContentsToScreen(const IntRect&) const;
IntPoint platformScreenToContents(const IntPoint&) const;
Modified: branches/safari-537-branch/Source/WebCore/platform/mac/ScrollViewMac.mm (153862 => 153863)
--- branches/safari-537-branch/Source/WebCore/platform/mac/ScrollViewMac.mm 2013-08-08 23:47:01 UTC (rev 153862)
+++ branches/safari-537-branch/Source/WebCore/platform/mac/ScrollViewMac.mm 2013-08-08 23:57:29 UTC (rev 153863)
@@ -28,6 +28,7 @@
#import "BlockExceptions.h"
#import "FloatRect.h"
+#import "FloatSize.h"
#import "IntRect.h"
#import "Logging.h"
#import "NotImplemented.h"
@@ -116,6 +117,17 @@
return IntRect();
}
+IntSize ScrollView::platformVisibleContentSize(bool includeScrollbars) const
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ if (includeScrollbars)
+ return IntSize([scrollView() frame].size);
+
+ return expandedIntSize(FloatSize([scrollView() documentVisibleRect].size));
+ END_BLOCK_OBJC_EXCEPTIONS;
+ return IntSize();
+}
+
void ScrollView::platformSetContentsSize()
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes