Diff
Modified: trunk/Source/WebCore/ChangeLog (92247 => 92248)
--- trunk/Source/WebCore/ChangeLog 2011-08-02 23:47:26 UTC (rev 92247)
+++ trunk/Source/WebCore/ChangeLog 2011-08-03 00:02:01 UTC (rev 92248)
@@ -1,3 +1,20 @@
+2011-08-02 Zhenyao Mo <z...@google.com>
+
+ Unreviewed, rolling out r92238.
+ http://trac.webkit.org/changeset/92238
+ https://bugs.webkit.org/show_bug.cgi?id=65555
+
+ fail fast/events/scrollbar-double-click.html on Mac
+
+ * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h:
+ * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
+ * platform/chromium/ScrollbarThemeChromiumMac.h:
+ * platform/chromium/ScrollbarThemeChromiumMac.mm:
+ (WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
+ (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
+ (WebCore::toScrollbarPainterKnobStyle):
+ (WebCore::ScrollbarThemeChromiumMac::paint):
+
2011-08-02 Mark Pilgrim <pilg...@chromium.org>
Remove LegacyDefaultOptionalArguments flag from History.idl
Modified: trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h (92247 => 92248)
--- trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h 2011-08-02 23:47:26 UTC (rev 92247)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h 2011-08-03 00:02:01 UTC (rev 92248)
@@ -61,7 +61,6 @@
void wkScrollbarPainterPaintKnob(WKScrollbarPainterRef);
int wkScrollbarMinimumThumbLength(WKScrollbarPainterRef);
void wkScrollbarPainterSetDelegate(WKScrollbarPainterRef, id scrollbarPainterDelegate);
-void wkScrollbarPainterSetEnabled(WKScrollbarPainterRef, bool enabled);
CGFloat wkScrollbarPainterTrackAlpha(WKScrollbarPainterRef);
WKScrollbarPainterRef wkMakeScrollbarPainter(int controlSize, bool isHorizontal);
int wkScrollbarThickness(int controlSize);
Modified: trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm (92247 => 92248)
--- trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm 2011-08-02 23:47:26 UTC (rev 92247)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm 2011-08-03 00:02:01 UTC (rev 92248)
@@ -187,11 +187,6 @@
[painter setDelegate:scrollbarPainterDelegate];
}
-void wkScrollbarPainterSetEnabled(WKScrollbarPainterRef painter, bool enabled)
-{
- [painter setEnabled:enabled];
-}
-
CGFloat wkScrollbarPainterTrackAlpha(WKScrollbarPainterRef painter)
{
return [painter trackAlpha];
Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.h (92247 => 92248)
--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.h 2011-08-02 23:47:26 UTC (rev 92247)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.h 2011-08-03 00:02:01 UTC (rev 92248)
@@ -40,15 +40,12 @@
ScrollbarThemeChromiumMac();
virtual ~ScrollbarThemeChromiumMac();
- virtual void updateEnabledState(Scrollbar*);
-
virtual bool paint(Scrollbar*, GraphicsContext* context, const IntRect& damageRect);
virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar);
virtual bool supportsControlTints() const { return true; }
virtual bool usesOverlayScrollbars() const;
- virtual void updateScrollbarOverlayStyle(Scrollbar*);
virtual double initialAutoscrollTimerDelay();
virtual double autoscrollTimerDelay();
@@ -69,8 +66,6 @@
virtual IntRect forwardButtonRect(Scrollbar*, ScrollbarPart, bool painting = false);
virtual IntRect trackRect(Scrollbar*, bool painting = false);
- virtual int maxOverlapBetweenPages() { return 40; }
-
virtual int minimumThumbLength(Scrollbar*);
virtual bool shouldCenterOnThumb(Scrollbar*, const PlatformMouseEvent&);
Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm (92247 => 92248)
--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm 2011-08-02 23:47:26 UTC (rev 92247)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm 2011-08-03 00:02:01 UTC (rev 92248)
@@ -163,8 +163,6 @@
bool isHorizontal = scrollbar->orientation() == HorizontalScrollbar;
WKScrollbarPainterRef scrollbarPainter = wkMakeScrollbarPainter(scrollbar->controlSize(), isHorizontal);
scrollbarMap()->add(scrollbar, scrollbarPainter);
- updateEnabledState(scrollbar);
- updateScrollbarOverlayStyle(scrollbar);
}
void ScrollbarThemeChromiumMac::unregisterScrollbar(Scrollbar* scrollbar)
@@ -175,8 +173,6 @@
void ScrollbarThemeChromiumMac::setNewPainterForScrollbar(Scrollbar* scrollbar, WKScrollbarPainterRef newPainter)
{
scrollbarMap()->set(scrollbar, newPainter);
- updateEnabledState(scrollbar);
- updateScrollbarOverlayStyle(scrollbar);
}
WKScrollbarPainterRef ScrollbarThemeChromiumMac::painterForScrollbar(Scrollbar* scrollbar)
@@ -224,25 +220,6 @@
return false;
}
-static inline wkScrollerKnobStyle toScrollbarPainterKnobStyle(ScrollbarOverlayStyle style)
-{
- switch (style) {
- case ScrollbarOverlayStyleDark:
- return wkScrollerKnobStyleDark;
- case ScrollbarOverlayStyleLight:
- return wkScrollerKnobStyleLight;
- default:
- return wkScrollerKnobStyleDefault;
- }
-}
-
-void ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle(Scrollbar* scrollbar)
-{
- if (isScrollbarOverlayAPIAvailable()) {
- wkSetScrollbarPainterKnobStyle(painterForScrollbar(scrollbar), toScrollbarPainterKnobStyle(scrollbar->scrollableArea()->scrollbarOverlayStyle()));
- }
-}
-
double ScrollbarThemeChromiumMac::initialAutoscrollTimerDelay()
{
return gInitialButtonDelay;
@@ -447,6 +424,18 @@
}
}
+static inline wkScrollerKnobStyle toScrollbarPainterKnobStyle(ScrollbarOverlayStyle style)
+{
+ switch (style) {
+ case ScrollbarOverlayStyleDark:
+ return wkScrollerKnobStyleDark;
+ case ScrollbarOverlayStyleLight:
+ return wkScrollerKnobStyleLight;
+ default:
+ return wkScrollerKnobStyleDefault;
+ }
+}
+
static PlatformBridge::ThemePaintState scrollbarStateToThemeState(Scrollbar* scrollbar) {
if (!scrollbar->enabled())
return PlatformBridge::StateDisabled;
@@ -458,13 +447,6 @@
return PlatformBridge::StateActive;
}
-void ScrollbarThemeChromiumMac::updateEnabledState(Scrollbar* scrollbar)
-{
- if (isScrollbarOverlayAPIAvailable()) {
- wkScrollbarPainterSetEnabled(scrollbarMap()->get(scrollbar).get(), scrollbar->enabled());
- }
-}
-
bool ScrollbarThemeChromiumMac::paint(Scrollbar* scrollbar, GraphicsContext* context, const IntRect& damageRect)
{
if (isScrollbarOverlayAPIAvailable()) {
@@ -495,6 +477,8 @@
scrollAnimator->setIsDrawingIntoLayer(false);
#endif
+ wkSetScrollbarPainterKnobStyle(painterForScrollbar(scrollbar), toScrollbarPainterKnobStyle(scrollbar->scrollableArea()->scrollbarOverlayStyle()));
+
GraphicsContextStateSaver stateSaver(*context);
context->clip(damageRect);
context->translate(scrollbar->frameRect().x(), scrollbar->frameRect().y());