Title: [128963] trunk
Revision
128963
Author
[email protected]
Date
2012-09-18 20:39:04 -0700 (Tue, 18 Sep 2012)

Log Message

Chromium: Scrollbar with tickmarks doesn't respond to clicks
https://bugs.webkit.org/show_bug.cgi?id=96049

Patch by Sailesh Agrawal <[email protected]> on 2012-09-18
Reviewed by Beth Dakin.

.:

Update exported symbols.

* Source/autotools/symbols.filter:

Source/Platform:

Added isAlphaLocked and setIsAlphaLocked.

* chromium/public/WebScrollbar.h:
(WebScrollbar):

Source/WebCore:

Currently when a scrollbar has tickmarks its forced to be visible by setting its alpha to 1.0. The alpha value is reset to its old value at the end of the drawing routine. This approach doesn't work with the hit testing code which relies on the scrollbar's alpha value

Unfortunately there doesn't seem to be anyway to force a scrollbar to be visible. The closest API is -[NSScrollerImpPair lockOverlayScrollerState:]. Unfortunately this locks both the horizontal and vertical scrollbar. It also doesn't expand the knob width.

My fix simply adds a new alphaLocked attribute to the scrollbar. If this attribute is set to true then hit testing will return true.

Test: fast/scrolling/scrollbar-tickmarks-hittest.html

* WebCore.exp.in:
* WebCore.order:
* page/Settings.cpp:
(WebCore):
(WebCore::Settings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars flag.
(WebCore::Settings::usesOverlayScrollbars): Gets the usesOverlayScrollbars flag.
* page/Settings.h:
(Settings):
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::Scrollbar):
* platform/Scrollbar.h:
(WebCore::Scrollbar::isAlphaLocked):
(WebCore::Scrollbar::setIsAlphaLocked):
(Scrollbar):
* platform/ScrollbarThemeClient.h:
(ScrollbarThemeClient):
* platform/chromium/ScrollbarThemeChromiumMac.mm:
(WebCore::ScrollbarThemeChromiumMac::paint): Updated to set and unset the alphaLocked attribute.
* platform/chromium/support/WebScrollbarImpl.cpp:
(WebKit::WebScrollbarImpl::isAlphaLocked):
(WebKit):
(WebKit::WebScrollbarImpl::setIsAlphaLocked):
* platform/chromium/support/WebScrollbarImpl.h:
(WebScrollbarImpl):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
(WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::isAlphaLocked):
(WebCore):
(WebCore::CCScrollbarLayerImpl::CCScrollbar::setIsAlphaLocked):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
(CCScrollbar):
(CCScrollbarLayerImpl):
* platform/mac/NSScrollerImpDetails.mm:
(WebCore::recommendedScrollerStyle): Check the usesOverlayScrollbars setting to see if overlay scrollbars should be forced on.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting): Updated to check the alphaLocked attribute.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::reset): Resets the usesOverlayScrollbars setting.
(WebCore::InternalSettings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars setting.
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl: Add a new setUsesOverlayScrollbars function.

Source/WebKit/chromium:

Pipe isAlphaLocked and setIsAlphaLocked.

* src/WebPluginScrollbarImpl.cpp:
(WebKit::WebPluginScrollbarImpl::isAlphaLocked):
(WebKit):
(WebKit::WebPluginScrollbarImpl::setIsAlphaLocked):
* src/WebPluginScrollbarImpl.h:
(WebPluginScrollbarImpl):
* src/WebScrollbarThemeClientImpl.cpp:
(WebKit::WebScrollbarThemeClientImpl::isAlphaLocked):
(WebKit):
(WebKit::WebScrollbarThemeClientImpl::setIsAlphaLocked):
* src/WebScrollbarThemeClientImpl.h:
(WebScrollbarThemeClientImpl):
* tests/ScrollbarLayerChromiumTest.cpp:

Source/WebKit2:

Update exported symbols.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

* fast/scrolling/scrollbar-tickmarks-hittest-expected.txt: Added.
* fast/scrolling/scrollbar-tickmarks-hittest.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (128962 => 128963)


--- trunk/ChangeLog	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/ChangeLog	2012-09-19 03:39:04 UTC (rev 128963)
@@ -1,3 +1,14 @@
+2012-09-18  Sailesh Agrawal  <[email protected]>
+
+        Chromium: Scrollbar with tickmarks doesn't respond to clicks
+        https://bugs.webkit.org/show_bug.cgi?id=96049
+
+        Reviewed by Beth Dakin.
+
+        Update exported symbols.
+
+        * Source/autotools/symbols.filter:
+
 2012-09-18  Bo Liu  <[email protected]>
 
         Revert 128780, 128676, 128645

Modified: trunk/LayoutTests/ChangeLog (128962 => 128963)


--- trunk/LayoutTests/ChangeLog	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/LayoutTests/ChangeLog	2012-09-19 03:39:04 UTC (rev 128963)
@@ -1,3 +1,13 @@
+2012-09-18  Sailesh Agrawal  <[email protected]>
+
+        Chromium: Scrollbar with tickmarks doesn't respond to clicks
+        https://bugs.webkit.org/show_bug.cgi?id=96049
+
+        Reviewed by Beth Dakin.
+
+        * fast/scrolling/scrollbar-tickmarks-hittest-expected.txt: Added.
+        * fast/scrolling/scrollbar-tickmarks-hittest.html: Added.
+
 2012-09-18  Noel Gordon  <[email protected]>
 
         Add partial load tests for PNG images

Added: trunk/LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest-expected.txt (0 => 128963)


--- trunk/LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest-expected.txt	2012-09-19 03:39:04 UTC (rev 128963)
@@ -0,0 +1,10 @@
+Checks that clicking on scrollbar works when tickmarks are added.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS did scroll
+PASS successfullyParsed is true
+
+TEST COMPLETE
+ 

Added: trunk/LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest.html (0 => 128963)


--- trunk/LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest.html	                        (rev 0)
+++ trunk/LayoutTests/fast/scrolling/scrollbar-tickmarks-hittest.html	2012-09-19 03:39:04 UTC (rev 128963)
@@ -0,0 +1,40 @@
+<html>
+<script src=""
+<body style="min-height: 5000px"> 
+<span id="elt">&nbsp;</span>
+
+<script>
+description('Checks that clicking on scrollbar works when tickmarks are added.');
+_onload_ = function()
+{
+    if (window.testRunner)
+        testRunner.dumpAsText();
+    var range = document.createRange();
+    var elt = document.getElementById('elt');
+    range.selectNodeContents(elt);
+    if (window.internals) {
+        window.internals.settings.setUsesOverlayScrollbars(true);
+        window.internals.addTextMatchMarker(range, true);
+    }
+    if (window.testRunner)
+        testRunner.display();
+    if (window.eventSender) {
+        eventSender.mouseMoveTo(window.innerWidth - 1, window.innerHeight - 1);
+        eventSender.mouseDown();
+        eventSender.mouseUp();
+    }
+}
+
+_onscroll_ = function()
+{
+    testPassed('did scroll');
+    finishJSTest();
+}
+
+var jsTestIsAsync = true;
+</script>
+
+<script src=""
+
+</body>
+</html>

Modified: trunk/Source/Platform/ChangeLog (128962 => 128963)


--- trunk/Source/Platform/ChangeLog	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/Platform/ChangeLog	2012-09-19 03:39:04 UTC (rev 128963)
@@ -1,3 +1,15 @@
+2012-09-18  Sailesh Agrawal  <[email protected]>
+
+        Chromium: Scrollbar with tickmarks doesn't respond to clicks
+        https://bugs.webkit.org/show_bug.cgi?id=96049
+
+        Reviewed by Beth Dakin.
+
+        Added isAlphaLocked and setIsAlphaLocked.
+
+        * chromium/public/WebScrollbar.h:
+        (WebScrollbar):
+
 2012-09-17  Brian Anderson  <[email protected]>
 
         [chromium] Add rendering commit statistics

Modified: trunk/Source/Platform/chromium/public/WebScrollbar.h (128962 => 128963)


--- trunk/Source/Platform/chromium/public/WebScrollbar.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/Platform/chromium/public/WebScrollbar.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -106,6 +106,8 @@
     virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const = 0;
     virtual bool isCustomScrollbar() const = 0;
     virtual Orientation orientation() const = 0;
+    virtual bool isAlphaLocked() const { return false; }
+    virtual void setIsAlphaLocked(bool) { }
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebCore/ChangeLog (128962 => 128963)


--- trunk/Source/WebCore/ChangeLog	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/ChangeLog	2012-09-19 03:39:04 UTC (rev 128963)
@@ -1,3 +1,62 @@
+2012-09-18  Sailesh Agrawal  <[email protected]>
+
+        Chromium: Scrollbar with tickmarks doesn't respond to clicks
+        https://bugs.webkit.org/show_bug.cgi?id=96049
+
+        Reviewed by Beth Dakin.
+
+        Currently when a scrollbar has tickmarks its forced to be visible by setting its alpha to 1.0. The alpha value is reset to its old value at the end of the drawing routine. This approach doesn't work with the hit testing code which relies on the scrollbar's alpha value
+
+        Unfortunately there doesn't seem to be anyway to force a scrollbar to be visible. The closest API is -[NSScrollerImpPair lockOverlayScrollerState:]. Unfortunately this locks both the horizontal and vertical scrollbar. It also doesn't expand the knob width.
+
+        My fix simply adds a new alphaLocked attribute to the scrollbar. If this attribute is set to true then hit testing will return true.
+
+        Test: fast/scrolling/scrollbar-tickmarks-hittest.html
+
+        * WebCore.exp.in:
+        * WebCore.order:
+        * page/Settings.cpp:
+        (WebCore):
+        (WebCore::Settings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars flag.
+        (WebCore::Settings::usesOverlayScrollbars): Gets the usesOverlayScrollbars flag.
+        * page/Settings.h:
+        (Settings):
+        * platform/Scrollbar.cpp:
+        (WebCore::Scrollbar::Scrollbar):
+        * platform/Scrollbar.h:
+        (WebCore::Scrollbar::isAlphaLocked):
+        (WebCore::Scrollbar::setIsAlphaLocked):
+        (Scrollbar):
+        * platform/ScrollbarThemeClient.h:
+        (ScrollbarThemeClient):
+        * platform/chromium/ScrollbarThemeChromiumMac.mm:
+        (WebCore::ScrollbarThemeChromiumMac::paint): Updated to set and unset the alphaLocked attribute.
+        * platform/chromium/support/WebScrollbarImpl.cpp:
+        (WebKit::WebScrollbarImpl::isAlphaLocked):
+        (WebKit):
+        (WebKit::WebScrollbarImpl::setIsAlphaLocked):
+        * platform/chromium/support/WebScrollbarImpl.h:
+        (WebScrollbarImpl):
+        * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
+        (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
+        (WebCore::CCScrollbarLayerImpl::CCScrollbar::isAlphaLocked):
+        (WebCore):
+        (WebCore::CCScrollbarLayerImpl::CCScrollbar::setIsAlphaLocked):
+        * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
+        (CCScrollbar):
+        (CCScrollbarLayerImpl):
+        * platform/mac/NSScrollerImpDetails.mm:
+        (WebCore::recommendedScrollerStyle): Check the usesOverlayScrollbars setting to see if overlay scrollbars should be forced on.
+        * platform/mac/ScrollAnimatorMac.mm:
+        (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting): Updated to check the alphaLocked attribute.
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::reset): Resets the usesOverlayScrollbars setting.
+        (WebCore::InternalSettings::setUsesOverlayScrollbars): Sets the usesOverlayScrollbars setting.
+        (WebCore):
+        * testing/InternalSettings.h:
+        (InternalSettings):
+        * testing/InternalSettings.idl: Add a new setUsesOverlayScrollbars function.
+
 2012-09-18  Kentaro Hara  <[email protected]>
 
         [V8] Notification.requestPermission(function() {alert();}) crashes

Modified: trunk/Source/WebCore/WebCore.exp.in (128962 => 128963)


--- trunk/Source/WebCore/WebCore.exp.in	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-09-19 03:39:04 UTC (rev 128963)
@@ -881,6 +881,7 @@
 __ZN7WebCore8Settings24setApplicationChromeModeEb
 __ZN7WebCore8Settings24setDNSPrefetchingEnabledEb
 __ZN7WebCore8Settings24setMockScrollbarsEnabledEb
+__ZN7WebCore8Settings24setUsesOverlayScrollbarsEb
 __ZN7WebCore8Settings24setStorageBlockingPolicyENS_14SecurityOrigin21StorageBlockingPolicyE
 __ZN7WebCore8Settings24setTextAreasAreResizableEb
 __ZN7WebCore8Settings25setDeveloperExtrasEnabledEb

Modified: trunk/Source/WebCore/WebCore.order (128962 => 128963)


--- trunk/Source/WebCore/WebCore.order	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/WebCore.order	2012-09-19 03:39:04 UTC (rev 128963)
@@ -1459,6 +1459,7 @@
 __ZN7WebCore8Settings27setLoadsImagesAutomaticallyEb
 __ZN7WebCore8Settings44setLoadsSiteIconsIgnoringImageLoadingSettingEb
 __ZN7WebCore8Settings25setShouldPrintBackgroundsEb
+__ZN7WebCore8Settings24setUsesOverlayScrollbarsEb
 __ZN7WebCore8Settings24setTextAreasAreResizableEb
 __ZN7WebCore8Settings31setShrinksStandaloneImagesToFitEb
 __ZN7WebCore8Settings23setEditableLinkBehaviorENS_20EditableLinkBehaviorE

Modified: trunk/Source/WebCore/page/Settings.cpp (128962 => 128963)


--- trunk/Source/WebCore/page/Settings.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/page/Settings.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -88,6 +88,7 @@
 #endif
 
 bool Settings::gMockScrollbarsEnabled = false;
+bool Settings::gUsesOverlayScrollbars = false;
 
 #if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
 bool Settings::gShouldUseHighResolutionTimers = true;
@@ -970,6 +971,16 @@
     return gMockScrollbarsEnabled;
 }
 
+void Settings::setUsesOverlayScrollbars(bool flag)
+{
+    gUsesOverlayScrollbars = flag;
+}
+
+bool Settings::usesOverlayScrollbars()
+{
+    return gUsesOverlayScrollbars;
+}
+
 #if USE(JSC)
 void Settings::setShouldRespectPriorityInCSSAttributeSetters(bool flag)
 {

Modified: trunk/Source/WebCore/page/Settings.h (128962 => 128963)


--- trunk/Source/WebCore/page/Settings.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/page/Settings.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -548,6 +548,9 @@
         static void setMockScrollbarsEnabled(bool flag);
         static bool mockScrollbarsEnabled();
 
+        static void setUsesOverlayScrollbars(bool flag);
+        static bool usesOverlayScrollbars();
+
         void setVisualWordMovementEnabled(bool enabled) { m_visualWordMovementEnabled = enabled; }
         bool visualWordMovementEnabled() const { return m_visualWordMovementEnabled; }
 
@@ -820,6 +823,7 @@
         static bool gAVFoundationEnabled;
 #endif
         static bool gMockScrollbarsEnabled;
+        static bool gUsesOverlayScrollbars;
 
 #if USE(SAFARI_THEME)
         static bool gShouldPaintNativeControls;

Modified: trunk/Source/WebCore/platform/Scrollbar.cpp (128962 => 128963)


--- trunk/Source/WebCore/platform/Scrollbar.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/Scrollbar.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -86,6 +86,7 @@
     , m_scrollTimer(this, &Scrollbar::autoscrollTimerFired)
     , m_overlapsResizer(false)
     , m_suppressInvalidation(false)
+    , m_isAlphaLocked(false)
 {
     if (!m_theme)
         m_theme = ScrollbarTheme::theme();

Modified: trunk/Source/WebCore/platform/Scrollbar.h (128962 => 128963)


--- trunk/Source/WebCore/platform/Scrollbar.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/Scrollbar.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -150,6 +150,9 @@
 
     void moveThumb(int pos, bool draggingDocument = false);
 
+    virtual bool isAlphaLocked() const { return m_isAlphaLocked; }
+    virtual void setIsAlphaLocked(bool flag) { m_isAlphaLocked = flag; }
+
 protected:
     Scrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0);
 
@@ -190,6 +193,8 @@
 
     bool m_suppressInvalidation;
 
+    bool m_isAlphaLocked;
+
 private:
     virtual bool isScrollbar() const { return true; }
     virtual AXObjectCache* axObjectCache() const;

Modified: trunk/Source/WebCore/platform/ScrollbarThemeClient.h (128962 => 128963)


--- trunk/Source/WebCore/platform/ScrollbarThemeClient.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/ScrollbarThemeClient.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -85,6 +85,9 @@
 
     virtual bool isOverlayScrollbar() const = 0;
 
+    virtual bool isAlphaLocked() const = 0;
+    virtual void setIsAlphaLocked(bool) = 0;
+
 protected:
     virtual ~ScrollbarThemeClient() { }
 };

Modified: trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm (128962 => 128963)


--- trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm	2012-09-19 03:39:04 UTC (rev 128963)
@@ -126,6 +126,7 @@
         bool hasTickmarks = tickmarks.size() > 0 && scrollbar->orientation() == VerticalScrollbar;
         ScrollbarPainter scrollbarPainter = painterForScrollbar(scrollbar);
         if (hasTickmarks) {
+            scrollbar->setIsAlphaLocked(true);
             oldKnobAlpha = [scrollbarPainter knobAlpha];
             [scrollbarPainter setKnobAlpha:1.0];
             oldTrackAlpha = [scrollbarPainter trackAlpha];
@@ -134,7 +135,8 @@
               oldIsExpanded = [scrollbarPainter isExpanded];
               [scrollbarPainter setExpanded:YES];
             }
-        }
+        } else
+            scrollbar->setIsAlphaLocked(false);
 
         GraphicsContextStateSaver stateSaver(*context);
         context->clip(damageRect);

Modified: trunk/Source/WebCore/platform/chromium/support/WebScrollbarImpl.cpp (128962 => 128963)


--- trunk/Source/WebCore/platform/chromium/support/WebScrollbarImpl.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/chromium/support/WebScrollbarImpl.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -123,4 +123,14 @@
     return m_scrollbar->isCustomScrollbar();
 }
 
+bool WebScrollbarImpl::isAlphaLocked() const
+{
+    return m_scrollbar->isAlphaLocked();
+}
+
+void WebScrollbarImpl::setIsAlphaLocked(bool flag)
+{
+    m_scrollbar->setIsAlphaLocked(flag);
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebCore/platform/chromium/support/WebScrollbarImpl.h (128962 => 128963)


--- trunk/Source/WebCore/platform/chromium/support/WebScrollbarImpl.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/chromium/support/WebScrollbarImpl.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -54,6 +54,8 @@
     virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const OVERRIDE;
     virtual Orientation orientation() const OVERRIDE;
     virtual bool isCustomScrollbar() const OVERRIDE;
+    virtual bool isAlphaLocked() const OVERRIDE;
+    virtual void setIsAlphaLocked(bool) OVERRIDE;
 
 private:
     RefPtr<WebCore::Scrollbar> m_scrollbar;

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp (128962 => 128963)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -59,6 +59,7 @@
     , m_enabled(false)
     , m_isCustomScrollbar(false)
     , m_isOverlayScrollbar(false)
+    , m_isAlphaLocked(false)
 {
 }
 
@@ -212,5 +213,15 @@
     return m_owner->m_isCustomScrollbar;
 }
 
+bool CCScrollbarLayerImpl::CCScrollbar::isAlphaLocked() const
+{
+    return m_owner->m_isAlphaLocked;
 }
+
+void CCScrollbarLayerImpl::CCScrollbar::setIsAlphaLocked(bool flag)
+{
+    m_owner->m_isAlphaLocked = flag;
+}
+
+}
 #endif // USE(ACCELERATED_COMPOSITING)

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCScrollbarLayerImpl.h (128962 => 128963)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCScrollbarLayerImpl.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCScrollbarLayerImpl.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -91,6 +91,8 @@
         virtual WebScrollbar::ScrollbarOverlayStyle scrollbarOverlayStyle() const;
         virtual WebScrollbar::Orientation orientation() const;
         virtual bool isCustomScrollbar() const;
+        virtual bool isAlphaLocked() const OVERRIDE;
+        virtual void setIsAlphaLocked(bool) OVERRIDE;
 
     private:
         CCScrollbarLayerImpl* m_owner;
@@ -122,6 +124,7 @@
     bool m_enabled;
     bool m_isCustomScrollbar;
     bool m_isOverlayScrollbar;
+    bool m_isAlphaLocked;
 };
 
 }

Modified: trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.mm (128962 => 128963)


--- trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.mm	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/mac/NSScrollerImpDetails.mm	2012-09-19 03:39:04 UTC (rev 128963)
@@ -27,6 +27,7 @@
 
 #include "config.h"
 #include "NSScrollerImpDetails.h"
+#include "Settings.h"
 
 namespace WebCore {
 
@@ -47,6 +48,8 @@
 #endif
 
 NSScrollerStyle recommendedScrollerStyle() {
+    if (Settings::usesOverlayScrollbars())
+        return NSScrollerStyleOverlay;
     if ([NSScroller respondsToSelector:@selector(preferredScrollerStyle)])
         return [NSScroller preferredScrollerStyle];
     return NSScrollerStyleLegacy;

Modified: trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (128962 => 128963)


--- trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm	2012-09-19 03:39:04 UTC (rev 128963)
@@ -956,6 +956,9 @@
     if (!isScrollbarOverlayAPIAvailable())
         return true;
 
+    if (scrollbar->isAlphaLocked())
+        return true;
+
     // Overlay scrollbars should participate in hit testing whenever they are at all visible.
     ScrollbarPainter painter = scrollbarPainterForScrollbar(scrollbar);
     if (!painter)

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (128962 => 128963)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -168,6 +168,7 @@
     setUserPreferredLanguages(Vector<String>());
     page()->setPagination(Pagination());
     page()->setPageScaleFactor(1, IntPoint(0, 0));
+    setUsesOverlayScrollbars(false);
 #if ENABLE(PAGE_POPUP)
     m_pagePopupDriver.clear();
     if (page()->chrome())
@@ -236,6 +237,11 @@
     settings()->setMockScrollbarsEnabled(enabled);
 }
 
+void InternalSettings::setUsesOverlayScrollbars(bool flag)
+{
+    settings()->setUsesOverlayScrollbars(flag);
+}
+
 void InternalSettings::setPasswordEchoEnabled(bool enabled, ExceptionCode& ec)
 {
     InternalSettingsGuardForSettings();

Modified: trunk/Source/WebCore/testing/InternalSettings.h (128962 => 128963)


--- trunk/Source/WebCore/testing/InternalSettings.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -100,6 +100,7 @@
     void setAcceleratedDrawingEnabled(bool enabled, ExceptionCode&);
     void setAcceleratedFiltersEnabled(bool enabled, ExceptionCode&);
     void setMockScrollbarsEnabled(bool enabled, ExceptionCode&);
+    void setUsesOverlayScrollbars(bool);
     void setPasswordEchoEnabled(bool enabled, ExceptionCode&);
     void setPasswordEchoDurationInSeconds(double durationInSeconds, ExceptionCode&);
     void setFixedElementsLayoutRelativeToFrame(bool, ExceptionCode&);

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (128962 => 128963)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2012-09-19 03:39:04 UTC (rev 128963)
@@ -34,6 +34,7 @@
         void setAcceleratedDrawingEnabled(in boolean enabled) raises(DOMException);
         void setAcceleratedFiltersEnabled(in boolean enabled) raises(DOMException);
         void setMockScrollbarsEnabled(in boolean enabled) raises(DOMException);
+        void setUsesOverlayScrollbars(in boolean flag);
         void setPasswordEchoEnabled(in boolean enabled) raises(DOMException);
         void setPasswordEchoDurationInSeconds(in double durationInSeconds) raises(DOMException);
         void setFixedElementsLayoutRelativeToFrame(in boolean enabled) raises(DOMException);

Modified: trunk/Source/WebKit/chromium/ChangeLog (128962 => 128963)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-19 03:39:04 UTC (rev 128963)
@@ -1,3 +1,26 @@
+2012-09-18  Sailesh Agrawal  <[email protected]>
+
+        Chromium: Scrollbar with tickmarks doesn't respond to clicks
+        https://bugs.webkit.org/show_bug.cgi?id=96049
+
+        Reviewed by Beth Dakin.
+
+        Pipe isAlphaLocked and setIsAlphaLocked.
+
+        * src/WebPluginScrollbarImpl.cpp:
+        (WebKit::WebPluginScrollbarImpl::isAlphaLocked):
+        (WebKit):
+        (WebKit::WebPluginScrollbarImpl::setIsAlphaLocked):
+        * src/WebPluginScrollbarImpl.h:
+        (WebPluginScrollbarImpl):
+        * src/WebScrollbarThemeClientImpl.cpp:
+        (WebKit::WebScrollbarThemeClientImpl::isAlphaLocked):
+        (WebKit):
+        (WebKit::WebScrollbarThemeClientImpl::setIsAlphaLocked):
+        * src/WebScrollbarThemeClientImpl.h:
+        (WebScrollbarThemeClientImpl):
+        * tests/ScrollbarLayerChromiumTest.cpp:
+
 2012-09-18  Alpha Lam  <[email protected]>
 
         Unreviewed, rolling out r128939.

Modified: trunk/Source/WebKit/chromium/src/WebPluginScrollbarImpl.cpp (128962 => 128963)


--- trunk/Source/WebKit/chromium/src/WebPluginScrollbarImpl.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit/chromium/src/WebPluginScrollbarImpl.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -268,6 +268,16 @@
     return false;
 }
 
+bool WebPluginScrollbarImpl::isAlphaLocked() const
+{
+    return m_scrollbar->isAlphaLocked();
+}
+
+void WebPluginScrollbarImpl::setIsAlphaLocked(bool flag)
+{
+    return m_scrollbar->setIsAlphaLocked(flag);
+}
+
 bool WebPluginScrollbarImpl::onMouseDown(const WebInputEvent& event)
 {
     WebMouseEvent mousedown = *static_cast<const WebMouseEvent*>(&event);

Modified: trunk/Source/WebKit/chromium/src/WebPluginScrollbarImpl.h (128962 => 128963)


--- trunk/Source/WebKit/chromium/src/WebPluginScrollbarImpl.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit/chromium/src/WebPluginScrollbarImpl.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -82,6 +82,8 @@
     virtual void scroll(ScrollDirection, ScrollGranularity, float multiplier) OVERRIDE;
     virtual void paint(WebCanvas*, const WebRect&) OVERRIDE;
     virtual bool handleInputEvent(const WebInputEvent&) OVERRIDE;
+    virtual bool isAlphaLocked() const OVERRIDE;
+    virtual void setIsAlphaLocked(bool) OVERRIDE;
 
 private:
     bool onMouseDown(const WebInputEvent&);

Modified: trunk/Source/WebKit/chromium/src/WebScrollbarThemeClientImpl.cpp (128962 => 128963)


--- trunk/Source/WebKit/chromium/src/WebScrollbarThemeClientImpl.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit/chromium/src/WebScrollbarThemeClientImpl.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -218,4 +218,14 @@
     return m_scrollbar->isOverlay();
 }
 
+bool WebScrollbarThemeClientImpl::isAlphaLocked() const
+{
+    return m_scrollbar->isAlphaLocked();
+}
+
+void WebScrollbarThemeClientImpl::setIsAlphaLocked(bool flag)
+{
+    m_scrollbar->setIsAlphaLocked(flag);
+}
+
 } // namespace WebKit

Modified: trunk/Source/WebKit/chromium/src/WebScrollbarThemeClientImpl.h (128962 => 128963)


--- trunk/Source/WebKit/chromium/src/WebScrollbarThemeClientImpl.h	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit/chromium/src/WebScrollbarThemeClientImpl.h	2012-09-19 03:39:04 UTC (rev 128963)
@@ -78,6 +78,8 @@
     virtual bool enabled() const OVERRIDE;
     virtual void setEnabled(bool) OVERRIDE;
     virtual bool isOverlayScrollbar() const OVERRIDE;
+    virtual bool isAlphaLocked() const OVERRIDE;
+    virtual void setIsAlphaLocked(bool) OVERRIDE;
 
 private:
     WebKit::WebScrollbar* m_scrollbar;

Modified: trunk/Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp (128962 => 128963)


--- trunk/Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit/chromium/tests/ScrollbarLayerChromiumTest.cpp	2012-09-19 03:39:04 UTC (rev 128963)
@@ -61,6 +61,8 @@
     virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const OVERRIDE { return WebScrollbar::ScrollbarOverlayStyleDefault; }
     virtual bool isCustomScrollbar() const OVERRIDE { return false; }
     virtual Orientation orientation() const OVERRIDE { return WebScrollbar::Horizontal; }
+    virtual bool isAlphaLocked() const OVERRIDE { return false; }
+    virtual void setIsAlphaLocked(bool) OVERRIDE { }
 };
 
 TEST(ScrollbarLayerChromiumTest, resolveScrollLayerPointer)

Modified: trunk/Source/WebKit2/ChangeLog (128962 => 128963)


--- trunk/Source/WebKit2/ChangeLog	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-19 03:39:04 UTC (rev 128963)
@@ -1,3 +1,15 @@
+2012-09-18  Sailesh Agrawal  <[email protected]>
+
+        Chromium: Scrollbar with tickmarks doesn't respond to clicks
+        https://bugs.webkit.org/show_bug.cgi?id=96049
+
+        Reviewed by Beth Dakin.
+
+        Update exported symbols.
+
+        * win/WebKit2.def:
+        * win/WebKit2CFLite.def:
+
 2012-09-18  Jinwoo Song  <[email protected]>
 
         [EFL][WK2] Add log macros for EINA_LOG_DOM_XXX series

Modified: trunk/Source/WebKit2/win/WebKit2.def (128962 => 128963)


--- trunk/Source/WebKit2/win/WebKit2.def	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit2/win/WebKit2.def	2012-09-19 03:39:04 UTC (rev 128963)
@@ -224,6 +224,7 @@
         ?setFixedFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
         ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
         ?mockScrollbarsEnabled@Settings@WebCore@@SA_NXZ
+        ?setUsesOverlayScrollbars@Settings@WebCore@@SAX_N@Z
         ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
         ?setPagination@Page@WebCore@@QAEXABUPagination@2@@Z
         ?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z

Modified: trunk/Source/WebKit2/win/WebKit2CFLite.def (128962 => 128963)


--- trunk/Source/WebKit2/win/WebKit2CFLite.def	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/WebKit2/win/WebKit2CFLite.def	2012-09-19 03:39:04 UTC (rev 128963)
@@ -218,6 +218,7 @@
         ?setImagesEnabled@Settings@WebCore@@QAEX_N@Z
         ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
         ?mockScrollbarsEnabled@Settings@WebCore@@SA_NXZ
+        ?setUsesOverlayScrollbars@Settings@WebCore@@SAX_N@Z
         ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
         ?setPagination@Page@WebCore@@QAEXABUPagination@2@@Z
         ?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z

Modified: trunk/Source/autotools/symbols.filter (128962 => 128963)


--- trunk/Source/autotools/symbols.filter	2012-09-19 03:33:36 UTC (rev 128962)
+++ trunk/Source/autotools/symbols.filter	2012-09-19 03:39:04 UTC (rev 128963)
@@ -154,6 +154,7 @@
 _ZN7WebCore8Settings22setSansSerifFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
 _ZN7WebCore8Settings23setPictographFontFamilyERKN3WTF12AtomicStringE11UScriptCode;
 _ZN7WebCore8Settings24setMockScrollbarsEnabledEb;
+_ZN7WebCore8Settings24setUsesOverlayScrollbarsEb;
 _ZN7WebCore8Settings24setStorageBlockingPolicyENS_14SecurityOrigin21StorageBlockingPolicyE;
 _ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb;
 _ZN7WebCore9FrameView17paintControlTintsEv;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to