Title: [171224] trunk/Source/WebCore
Revision
171224
Author
commit-qu...@webkit.org
Date
2014-07-18 10:14:38 -0700 (Fri, 18 Jul 2014)

Log Message

Unreviewed, rolling out r171207.
https://bugs.webkit.org/show_bug.cgi?id=135056

Broke multiple tests on Yosemite (Requested by ap on #webkit).

Reverted changeset:

"Fixed position elements are misplaced when a WK1 view has
contentInsets set"
https://bugs.webkit.org/show_bug.cgi?id=135031
http://trac.webkit.org/changeset/171207

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (171223 => 171224)


--- trunk/Source/WebCore/ChangeLog	2014-07-18 17:01:44 UTC (rev 171223)
+++ trunk/Source/WebCore/ChangeLog	2014-07-18 17:14:38 UTC (rev 171224)
@@ -1,5 +1,19 @@
 2014-07-18  Commit Queue  <commit-qu...@webkit.org>
 
+        Unreviewed, rolling out r171207.
+        https://bugs.webkit.org/show_bug.cgi?id=135056
+
+        Broke multiple tests on Yosemite (Requested by ap on #webkit).
+
+        Reverted changeset:
+
+        "Fixed position elements are misplaced when a WK1 view has
+        contentInsets set"
+        https://bugs.webkit.org/show_bug.cgi?id=135031
+        http://trac.webkit.org/changeset/171207
+
+2014-07-18  Commit Queue  <commit-qu...@webkit.org>
+
         Unreviewed, rolling out r171218.
         https://bugs.webkit.org/show_bug.cgi?id=135055
 

Modified: trunk/Source/WebCore/platform/graphics/IntSize.h (171223 => 171224)


--- trunk/Source/WebCore/platform/graphics/IntSize.h	2014-07-18 17:01:44 UTC (rev 171223)
+++ trunk/Source/WebCore/platform/graphics/IntSize.h	2014-07-18 17:14:38 UTC (rev 171224)
@@ -81,12 +81,6 @@
         m_height += height;
     }
 
-    void contract(int width, int height)
-    {
-        m_width -= width;
-        m_height -= height;
-    }
-
     void scale(float widthScale, float heightScale)
     {
         m_width = static_cast<int>(static_cast<float>(m_width) * widthScale);

Modified: trunk/Source/WebCore/platform/mac/ScrollViewMac.mm (171223 => 171224)


--- trunk/Source/WebCore/platform/mac/ScrollViewMac.mm	2014-07-18 17:01:44 UTC (rev 171223)
+++ trunk/Source/WebCore/platform/mac/ScrollViewMac.mm	2014-07-18 17:14:38 UTC (rev 171224)
@@ -34,14 +34,6 @@
 #import "NotImplemented.h"
 #import "WebCoreFrameView.h"
 
-@interface NSClipView (Details)
-- (NSRect)_insetBounds;
-@end
-
-@interface NSScrollView (Details)
-- (NSEdgeInsets)contentInsets;
-@end
-
 @interface NSWindow (WebWindowDetails)
 - (BOOL)_needsToResetDragMargins;
 - (void)_setNeedsToResetDragMargins:(BOOL)needs;
@@ -115,31 +107,23 @@
 IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
-    IntRect visibleContentRect;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-    visibleContentRect = enclosingIntRect([[scrollView() contentView] _insetBounds]);
-#else
-    visibleContentRect = enclosingIntRect([scrollView() documentVisibleRect]);
-#endif
-
-    if (includeScrollbars) {
-        IntSize frameSize([scrollView() frame].size);
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 10100
-        frameSize.contract(scrollView().contentInsets.left + scrollView().contentInsets.right, scrollView().contentInsets.top + scrollView().contentInsets.bottom);
-#endif
-        visibleContentRect.setSize(frameSize);
-    }
-
-    return visibleContentRect;
+    IntRect result = enclosingIntRect([scrollView() documentVisibleRect]);
+    if (includeScrollbars)
+        result.setSize(IntSize([scrollView() frame].size));
+    return result;
     END_BLOCK_OBJC_EXCEPTIONS;
-
     return IntRect();
 }
 
 IntSize ScrollView::platformVisibleContentSize(bool includeScrollbars) const
 {
-    return platformVisibleContentRect(includeScrollbars).size();
+    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()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to