Title: [198817] trunk/Source/WebCore
Revision
198817
Author
mmaxfi...@apple.com
Date
2016-03-29 18:24:50 -0700 (Tue, 29 Mar 2016)

Log Message

REGRESSION(r198784) Shouldn't add platform-dependent code to ScrollableArea.h
https://bugs.webkit.org/show_bug.cgi?id=155999

Rolling out the patch.

* platform/ScrollableArea.h:
(WebCore::ScrollableArea::horizontalScrollbar):
(WebCore::ScrollableArea::verticalScrollbar):
(WebCore::ScrollableArea::tiledBacking):
(WebCore::ScrollableArea::layerForHorizontalScrollbar):
(WebCore::ScrollableArea::layerForVerticalScrollbar):
(WebCore::ScrollableArea::layerForScrolling):
(WebCore::ScrollableArea::layerForScrollCorner):
(WebCore::ScrollableArea::layerForOverhangAreas):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle): Deleted.
* platform/mac/ScrollableAreaMac.mm:
(WebCore::ScrollableArea::setScrollbarLayoutDirection): Deleted.
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::registerScrollbar): Deleted.
* platform/spi/mac/NSScrollerImpSPI.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (198816 => 198817)


--- trunk/Source/WebCore/ChangeLog	2016-03-30 00:40:28 UTC (rev 198816)
+++ trunk/Source/WebCore/ChangeLog	2016-03-30 01:24:50 UTC (rev 198817)
@@ -1,3 +1,27 @@
+2016-03-29  Myles C. Maxfield  <mmaxfi...@apple.com>
+
+        REGRESSION(r198784) Shouldn't add platform-dependent code to ScrollableArea.h
+        https://bugs.webkit.org/show_bug.cgi?id=155999
+
+        Rolling out the patch.
+
+        * platform/ScrollableArea.h:
+        (WebCore::ScrollableArea::horizontalScrollbar):
+        (WebCore::ScrollableArea::verticalScrollbar):
+        (WebCore::ScrollableArea::tiledBacking):
+        (WebCore::ScrollableArea::layerForHorizontalScrollbar):
+        (WebCore::ScrollableArea::layerForVerticalScrollbar):
+        (WebCore::ScrollableArea::layerForScrolling):
+        (WebCore::ScrollableArea::layerForScrollCorner):
+        (WebCore::ScrollableArea::layerForOverhangAreas):
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::updateScrollerStyle): Deleted.
+        * platform/mac/ScrollableAreaMac.mm:
+        (WebCore::ScrollableArea::setScrollbarLayoutDirection): Deleted.
+        * platform/mac/ScrollbarThemeMac.mm:
+        (WebCore::ScrollbarThemeMac::registerScrollbar): Deleted.
+        * platform/spi/mac/NSScrollerImpSPI.h:
+
 2016-03-29  Alex Christensen  <achristen...@webkit.org>
 
         Fix Windows clean build.

Modified: trunk/Source/WebCore/platform/ScrollableArea.h (198816 => 198817)


--- trunk/Source/WebCore/platform/ScrollableArea.h	2016-03-30 00:40:28 UTC (rev 198816)
+++ trunk/Source/WebCore/platform/ScrollableArea.h	2016-03-30 01:24:50 UTC (rev 198817)
@@ -29,10 +29,6 @@
 #include "Scrollbar.h"
 #include <wtf/Vector.h>
 
-#if PLATFORM(COCOA)
-OBJC_CLASS NSScrollerImp;
-#endif
-
 namespace WebCore {
 
 class FloatPoint;
@@ -184,8 +180,8 @@
     int verticalScrollbarIntrusion() const;
     WEBCORE_EXPORT IntSize scrollbarIntrusion() const;
 
-    virtual Scrollbar* horizontalScrollbar() const { return nullptr; }
-    virtual Scrollbar* verticalScrollbar() const { return nullptr; }
+    virtual Scrollbar* horizontalScrollbar() const { return 0; }
+    virtual Scrollbar* verticalScrollbar() const { return 0; }
 
     const IntPoint& scrollOrigin() const { return m_scrollOrigin; }
     bool scrollOriginChanged() const { return m_scrollOriginChanged; }
@@ -297,15 +293,15 @@
     bool isPinnedVerticallyInDirection(int verticalScrollDelta) const;
 #endif
 
-    virtual TiledBacking* tiledBacking() const { return nullptr; }
+    virtual TiledBacking* tiledBacking() const { return 0; }
 
     // True if scrolling happens by moving compositing layers.
     virtual bool usesCompositedScrolling() const { return false; }
     // True if the contents can be scrolled asynchronously (i.e. by a ScrollingCoordinator).
     virtual bool usesAsyncScrolling() const { return false; }
 
-    virtual GraphicsLayer* layerForHorizontalScrollbar() const { return nullptr; }
-    virtual GraphicsLayer* layerForVerticalScrollbar() const { return nullptr; }
+    virtual GraphicsLayer* layerForHorizontalScrollbar() const { return 0; }
+    virtual GraphicsLayer* layerForVerticalScrollbar() const { return 0; }
 
     bool hasLayerForHorizontalScrollbar() const;
     bool hasLayerForVerticalScrollbar() const;
@@ -318,9 +314,6 @@
 
     bool verticalScrollbarIsOnLeft() const;
     static bool systemLanguageIsRTL();
-#if PLATFORM(COCOA)
-    void setScrollbarLayoutDirection(NSScrollerImp *) const;
-#endif
 
 protected:
     WEBCORE_EXPORT ScrollableArea();
@@ -334,10 +327,10 @@
     virtual void invalidateScrollCornerRect(const IntRect&) = 0;
 
     friend class ScrollingCoordinator;
-    virtual GraphicsLayer* layerForScrolling() const { return nullptr; }
-    virtual GraphicsLayer* layerForScrollCorner() const { return nullptr; }
+    virtual GraphicsLayer* layerForScrolling() const { return 0; }
+    virtual GraphicsLayer* layerForScrollCorner() const { return 0; }
 #if ENABLE(RUBBER_BANDING)
-    virtual GraphicsLayer* layerForOverhangAreas() const { return nullptr; }
+    virtual GraphicsLayer* layerForOverhangAreas() const { return 0; }
 #endif
 
     bool hasLayerForScrollCorner() const;

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (198816 => 198817)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2016-03-30 00:40:28 UTC (rev 198816)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2016-03-30 01:24:50 UTC (rev 198817)
@@ -1300,7 +1300,6 @@
 
         NSScrollerImp *oldVerticalPainter = [m_scrollerImpPair verticalScrollerImp];
         NSScrollerImp *newVerticalPainter = [NSScrollerImp scrollerImpWithStyle:newStyle controlSize:(NSControlSize)verticalScrollbar->controlSize() horizontal:NO replacingScrollerImp:oldVerticalPainter];
-        m_scrollableArea.setScrollbarLayoutDirection(newVerticalPainter);
 
         [m_scrollerImpPair setVerticalScrollerImp:newVerticalPainter];
         macTheme->setNewPainterForScrollbar(*verticalScrollbar, newVerticalPainter);
@@ -1317,7 +1316,6 @@
 
         NSScrollerImp *oldHorizontalPainter = [m_scrollerImpPair horizontalScrollerImp];
         NSScrollerImp *newHorizontalPainter = [NSScrollerImp scrollerImpWithStyle:newStyle controlSize:(NSControlSize)horizontalScrollbar->controlSize() horizontal:YES replacingScrollerImp:oldHorizontalPainter];
-        m_scrollableArea.setScrollbarLayoutDirection(newHorizontalPainter);
 
         [m_scrollerImpPair setHorizontalScrollerImp:newHorizontalPainter];
         macTheme->setNewPainterForScrollbar(*horizontalScrollbar, newHorizontalPainter);

Modified: trunk/Source/WebCore/platform/mac/ScrollableAreaMac.mm (198816 => 198817)


--- trunk/Source/WebCore/platform/mac/ScrollableAreaMac.mm	2016-03-30 00:40:28 UTC (rev 198816)
+++ trunk/Source/WebCore/platform/mac/ScrollableAreaMac.mm	2016-03-30 01:24:50 UTC (rev 198817)
@@ -54,13 +54,4 @@
 #endif
 }
 
-void ScrollableArea::setScrollbarLayoutDirection(NSScrollerImp *scroller) const
-{
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
-    scroller.userInterfaceLayoutDirection = verticalScrollbarIsOnLeft() ? NSUserInterfaceLayoutDirectionRightToLeft : NSUserInterfaceLayoutDirectionLeftToRight;
-#else
-    UNUSED_PARAM(scroller);
-#endif
 }
-
-}

Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (198816 => 198817)


--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2016-03-30 00:40:28 UTC (rev 198816)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm	2016-03-30 01:24:50 UTC (rev 198817)
@@ -160,7 +160,6 @@
 
     bool isHorizontal = scrollbar.orientation() == HorizontalScrollbar;
     NSScrollerImp *scrollerImp = [NSScrollerImp scrollerImpWithStyle:recommendedScrollerStyle() controlSize:scrollbarControlSizeToNSControlSize(scrollbar.controlSize()) horizontal:isHorizontal replacingScrollerImp:nil];
-    scrollbar.scrollableArea().setScrollbarLayoutDirection(scrollerImp);
     scrollbarMap()->add(&scrollbar, scrollerImp);
     updateEnabledState(scrollbar);
     updateScrollbarOverlayStyle(scrollbar);

Modified: trunk/Source/WebCore/platform/spi/mac/NSScrollerImpSPI.h (198816 => 198817)


--- trunk/Source/WebCore/platform/spi/mac/NSScrollerImpSPI.h	2016-03-30 00:40:28 UTC (rev 198816)
+++ trunk/Source/WebCore/platform/spi/mac/NSScrollerImpSPI.h	2016-03-30 01:24:50 UTC (rev 198817)
@@ -79,7 +79,6 @@
 @property(readonly) CGFloat knobMinLength;
 @property(readonly) CGFloat knobOverlapEndInset;
 @property(readonly) CGFloat trackOverlapEndInset;
-@property NSUserInterfaceLayoutDirection userInterfaceLayoutDirection;
 - (NSRect)rectForPart:(NSScrollerPart)partCode;
 - (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag alpha:(CGFloat)alpha;
 - (void)drawKnobSlotInRect:(NSRect)slotRect highlight:(BOOL)flag;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to