Changeset 168230 in webkit


Ignore:
Timestamp:
May 3, 2014 3:16:53 PM (10 years ago)
Author:
akling@apple.com
Message:

Invalidate scrollbars when custom scrollbar style changes dynamically.
<https://webkit.org/b/132529>

Source/WebCore:
Add a ScrollView::styleDidChange() and call that from RenderView::styleDidChange()
so that the scrollbars are sure to get repainted with potentially different style.

Reviewed by Antti Koivisto.

Test: fast/css/scrollbar-dynamic-style-change.html

  • platform/ScrollView.cpp:

(WebCore::ScrollView::styleDidChange):

  • platform/ScrollView.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::styleDidChange):

LayoutTests:
Reviewed by Antti Koivisto.

  • fast/css/scrollbar-dynamic-style-change-expected.html: Added.
  • fast/css/scrollbar-dynamic-style-change.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r168228 r168230  
     12014-05-03  Andreas Kling  <akling@apple.com>
     2
     3        Invalidate scrollbars when custom scrollbar style changes dynamically.
     4        <https://webkit.org/b/132529>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * fast/css/scrollbar-dynamic-style-change-expected.html: Added.
     9        * fast/css/scrollbar-dynamic-style-change.html: Added.
     10
    1112014-05-03  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r168227 r168230  
     12014-05-03  Andreas Kling  <akling@apple.com>
     2
     3        Invalidate scrollbars when custom scrollbar style changes dynamically.
     4        <https://webkit.org/b/132529>
     5
     6        Add a ScrollView::styleDidChange() and call that from RenderView::styleDidChange()
     7        so that the scrollbars are sure to get repainted with potentially different style.
     8
     9        Reviewed by Antti Koivisto.
     10
     11        Test: fast/css/scrollbar-dynamic-style-change.html
     12
     13        * platform/ScrollView.cpp:
     14        (WebCore::ScrollView::styleDidChange):
     15        * platform/ScrollView.h:
     16        * rendering/RenderView.cpp:
     17        (WebCore::RenderView::styleDidChange):
     18
    1192014-05-03  Simon Fraser  <simon.fraser@apple.com>
    220
  • trunk/Source/WebCore/platform/ScrollView.cpp

    r167529 r168230  
    14601460}
    14611461
     1462void ScrollView::styleDidChange()
     1463{
     1464    if (m_horizontalScrollbar)
     1465        m_horizontalScrollbar->styleChanged();
     1466
     1467    if (m_verticalScrollbar)
     1468        m_verticalScrollbar->styleChanged();
     1469}
     1470
    14621471#if !PLATFORM(COCOA)
    14631472
  • trunk/Source/WebCore/platform/ScrollView.h

    r167503 r168230  
    145145    virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
    146146
     147    void styleDidChange();
     148
    147149    // If the prohibits scrolling flag is set, then all scrolling in the view (even programmatic scrolling) is turned off.
    148150    void setProhibitsScrolling(bool b) { m_prohibitsScrolling = b; }
  • trunk/Source/WebCore/rendering/RenderView.cpp

    r168121 r168230  
    12611261    if (hasRenderNamedFlowThreads())
    12621262        flowThreadController().styleDidChange();
     1263
     1264    frameView().styleDidChange();
    12631265}
    12641266
Note: See TracChangeset for help on using the changeset viewer.