Changeset 246934 in webkit


Ignore:
Timestamp:
Jun 28, 2019 1:23:12 PM (5 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r239984): pages with custom scrollbars also show normal scrollbars
https://bugs.webkit.org/show_bug.cgi?id=199321
<rdar://problem/52308095>

Reviewed by Timothy Hatcher.

Revert the part of r239984 that made isCustomScrollbar() virtual, since theme().registerScrollbar()
calls it from the base class constructor.

I wasn't able to make a test that tests rendering of overlay scrollbars (webkit.org/b/199323).

  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::Scrollbar):

  • platform/Scrollbar.h:

(WebCore::Scrollbar::isCustomScrollbar const):

  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::RenderScrollbar):

  • rendering/RenderScrollbar.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r246931 r246934  
     12019-06-28  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r239984): pages with custom scrollbars also show normal scrollbars
     4        https://bugs.webkit.org/show_bug.cgi?id=199321
     5        <rdar://problem/52308095>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        Revert the part of r239984 that made isCustomScrollbar() virtual, since theme().registerScrollbar()
     10        calls it from the base class constructor.
     11
     12        I wasn't able to make a test that tests rendering of overlay scrollbars (webkit.org/b/199323).
     13
     14        * platform/Scrollbar.cpp:
     15        (WebCore::Scrollbar::Scrollbar):
     16        * platform/Scrollbar.h:
     17        (WebCore::Scrollbar::isCustomScrollbar const):
     18        * rendering/RenderScrollbar.cpp:
     19        (WebCore::RenderScrollbar::RenderScrollbar):
     20        * rendering/RenderScrollbar.h:
     21
    1222019-06-28  Wenson Hsieh  <wenson_hsieh@apple.com>
    223
  • trunk/Source/WebCore/platform/Scrollbar.cpp

    r246488 r246934  
    5555}
    5656
    57 Scrollbar::Scrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, ScrollbarTheme* customTheme)
     57Scrollbar::Scrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, ScrollbarTheme* customTheme, bool isCustomScrollbar)
    5858    : m_scrollableArea(scrollableArea)
    5959    , m_orientation(orientation)
    6060    , m_controlSize(controlSize)
    6161    , m_theme(customTheme ? *customTheme : ScrollbarTheme::theme())
     62    , m_isCustomScrollbar(isCustomScrollbar)
    6263    , m_scrollTimer(*this, &Scrollbar::autoscrollTimerFired)
    6364{
  • trunk/Source/WebCore/platform/Scrollbar.h

    r239984 r246934  
    5757    ScrollableArea& scrollableArea() const { return m_scrollableArea; }
    5858
    59     virtual bool isCustomScrollbar() const { return false; }
     59    bool isCustomScrollbar() const { return m_isCustomScrollbar; }
    6060    ScrollbarOrientation orientation() const { return m_orientation; }
    6161
     
    133133
    134134protected:
    135     Scrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = nullptr);
     135    Scrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = nullptr, bool isCustomScrollbar = false);
    136136
    137137    void updateThumb();
     
    166166
    167167    bool m_enabled { true };
     168    bool m_isCustomScrollbar { false };
    168169
    169170    Timer m_scrollTimer;
  • trunk/Source/WebCore/rendering/RenderScrollbar.cpp

    r239984 r246934  
    4343
    4444RenderScrollbar::RenderScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, Element* ownerElement, Frame* owningFrame)
    45     : Scrollbar(scrollableArea, orientation, RegularScrollbar, RenderScrollbarTheme::renderScrollbarTheme())
     45    : Scrollbar(scrollableArea, orientation, RegularScrollbar, RenderScrollbarTheme::renderScrollbarTheme(), true)
    4646    , m_ownerElement(ownerElement)
    4747    , m_owningFrame(owningFrame)
  • trunk/Source/WebCore/rendering/RenderScrollbar.h

    r239984 r246934  
    6262    RenderScrollbar(ScrollableArea&, ScrollbarOrientation, Element*, Frame*);
    6363
    64     bool isCustomScrollbar() const override { return true; }
    6564    bool isOverlayScrollbar() const override { return false; }
    6665
Note: See TracChangeset for help on using the changeset viewer.