⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 173544 in webkit


Ignore:
Timestamp:
Sep 11, 2014, 3:18:58 PM (12 years ago)
Author:
Beth Dakin
Message:

WebKit scrollbars flash in non-dominant spaces when entering Mission Control
​https://bugs.webkit.org/show_bug.cgi?id=136761
-and corresponding-
rdar://problem/18195616

Reviewed by Tim Horton.

This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
Show match the logic in AppKit. We only want these notifications when the window
has become both visible and active (or lost both, in the case of hide).

Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it
only when both visibility and active-state have changed.

  • page/FocusController.cpp:

(WebCore::FocusController::setViewState):
(WebCore::FocusController::setIsVisibleAndActiveInternal):
(WebCore::FocusController::setIsVisibleInternal): Deleted.

  • page/FocusController.h:

FocusController::setViewState() is the only place that needs to call
ScrollableArea::contentAreaDidHide/Show, so remove these callers.

  • page/FrameView.cpp:

(WebCore::FrameView::didMoveOnscreen): Deleted.
(WebCore::FrameView::willMoveOffscreen): Deleted.

  • page/FrameView.h:
  • page/Page.cpp:

(WebCore::Page::setIsVisibleInternal):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r173541 r173544  
     12014-09-11  Beth Dakin  <bdakin@apple.com>
     2
     3        WebKit scrollbars flash in non-dominant spaces when entering Mission Control
     4        https://bugs.webkit.org/show_bug.cgi?id=136761
     5        -and corresponding-
     6        rdar://problem/18195616
     7
     8        Reviewed by Tim Horton.
     9
     10        This patch makes our logic about when to call ScrollableArea::contentAreaDidHide/
     11        Show match the logic in AppKit. We only want these notifications when the window
     12        has become both visible and active (or lost both, in the case of hide).
     13
     14        Re-name setIsVisibleInternal() to setIsVisibleAndActiveInternal(), and call it
     15        only when both visibility and active-state have changed.
     16        * page/FocusController.cpp:
     17        (WebCore::FocusController::setViewState):
     18        (WebCore::FocusController::setIsVisibleAndActiveInternal):
     19        (WebCore::FocusController::setIsVisibleInternal): Deleted.
     20        * page/FocusController.h:
     21
     22        FocusController::setViewState() is the only place that needs to call
     23        ScrollableArea::contentAreaDidHide/Show, so remove these callers.
     24        * page/FrameView.cpp:
     25        (WebCore::FrameView::didMoveOnscreen): Deleted.
     26        (WebCore::FrameView::willMoveOffscreen): Deleted.
     27        * page/FrameView.h:
     28        * page/Page.cpp:
     29        (WebCore::Page::setIsVisibleInternal):
     30
    1312014-09-10  Michael Saboff  <msaboff@apple.com>
    232
  • trunk/Source/WebCore/page/FocusController.cpp

    r168397 r173544  
    646646    if (changed & ViewState::IsFocused)
    647647        setFocusedInternal(viewState & ViewState::IsFocused);
    648     if (changed & ViewState::WindowIsActive)
     648    if (changed & ViewState::WindowIsActive) {
    649649        setActiveInternal(viewState & ViewState::WindowIsActive);
    650     if (changed & ViewState::IsVisible)
    651         setIsVisibleInternal(viewState & ViewState::IsVisible);
     650        if (changed & ViewState::IsVisible)
     651            setIsVisibleAndActiveInternal(viewState & ViewState::WindowIsActive);
     652    }
    652653}
    653654
    … …  
    680681}
    681682
    682 void FocusController::setIsVisibleInternal(bool contentIsVisible)
     683void FocusController::setIsVisibleAndActiveInternal(bool contentIsVisible)
    683684{
    684685    FrameView* view = m_page.mainFrame().view();
  • trunk/Source/WebCore/page/FocusController.h

    r172862 r173544  
    9696    void setActiveInternal(bool);
    9797    void setFocusedInternal(bool);
    98     void setIsVisibleInternal(bool);
     98    void setIsVisibleAndActiveInternal(bool);
    9999
    100100    bool advanceFocusDirectionally(FocusDirection, KeyboardEvent*);
  • trunk/Source/WebCore/page/FrameView.cpp

    r173523 r173544  
    10621062}
    10631063
    1064 void FrameView::didMoveOnscreen()
    1065 {
    1066     contentAreaDidShow();
    1067 }
    1068 
    1069 void FrameView::willMoveOffscreen()
    1070 {
    1071     contentAreaDidHide();
    1072 }
    1073 
    10741064void FrameView::setIsInWindow(bool isInWindow)
    10751065{
  • trunk/Source/WebCore/page/FrameView.h

    r173320 r173544  
    178178    WEBCORE_EXPORT bool isSoftwareRenderable() const;
    179179
    180     void didMoveOnscreen();
    181     void willMoveOffscreen();
    182180    void setIsInWindow(bool);
    183181
  • trunk/Source/WebCore/page/Page.cpp

    r173251 r173544  
    12541254        m_isPrerender = false;
    12551255
    1256         for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
    1257             if (FrameView* frameView = frame->view())
    1258                 frameView->didMoveOnscreen();
    1259         }
    1260 
    12611256        resumeScriptedAnimations();
    12621257
    … …  
    12801275        if (m_settings->hiddenPageCSSAnimationSuspensionEnabled())
    12811276            mainFrame().animation().suspendAnimations();
    1282 
    1283         for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) {
    1284             if (FrameView* frameView = frame->view())
    1285                 frameView->willMoveOffscreen();
    1286         }
    12871277
    12881278        suspendScriptedAnimations();
Note: See TracChangeset for help on using the changeset viewer.