Changeset 106875 in webkit
- Timestamp:
- Feb 6, 2012 4:43:26 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106874 r106875 1 2012-02-06 Anders Carlsson <andersca@apple.com> 2 3 Overlay scrollbars flash when window is simply activated 4 https://bugs.webkit.org/show_bug.cgi?id=77911 5 <rdar://problem/10211995> 6 7 Reviewed by Kenneth Russell. 8 9 Add a new member function, FocusController::setContainingWindowIsVisible, and move the code 10 that calls ScrollableArea::contentAreaDidShow/ScrollableArea::contentAreaDidHide there, since 11 we only want to flash scrollers when the window becomes visible. 12 13 * WebCore.exp.in: 14 * page/FocusController.cpp: 15 (WebCore::FocusController::FocusController): 16 (WebCore::FocusController::setActive): 17 (WebCore::FocusController::setContainingWindowIsVisible): 18 (WebCore): 19 * page/FocusController.h: 20 (FocusController): 21 (WebCore::FocusController::containingWindowIsVisible): 22 23 * platform/mac/ScrollAnimatorMac.mm: 24 (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]): 25 Call ScrollAnimatorMac::contentAreaWillPaint here, since that will trigger AppKit to flash the scrollers. 26 1 27 2012-02-06 Greg Simon <gregsimon@chromium.org> 2 28 -
trunk/Source/WebCore/WebCore.exp.in
r106836 r106875 435 435 __ZN7WebCore15FocusController15setFocusedFrameEN3WTF10PassRefPtrINS_5FrameEEE 436 436 __ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE 437 __ZN7WebCore15FocusController28setContainingWindowIsVisibleEb 437 438 __ZN7WebCore15FocusController9setActiveEb 438 439 __ZN7WebCore15GraphicsContext11clearShadowEv -
trunk/Source/WebCore/page/FocusController.cpp
r106530 r106875 89 89 , m_isFocused(false) 90 90 , m_isChangingFocusedFrame(false) 91 , m_containingWindowIsVisible(false) 91 92 { 92 93 } … … 574 575 view->updateControlTints(); 575 576 } 576 577 if (const HashSet<ScrollableArea*>* scrollableAreas = m_page->scrollableAreaSet()) {578 HashSet<ScrollableArea*>::const_iterator end = scrollableAreas->end();579 for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(); it != end; ++it) {580 if (!active)581 (*it)->contentAreaDidHide();582 else583 (*it)->contentAreaDidShow();584 }585 }586 577 } 587 578 … … 590 581 if (m_focusedFrame && isFocused()) 591 582 dispatchEventsOnWindowAndFocusedNode(m_focusedFrame->document(), active); 583 } 584 585 void FocusController::setContainingWindowIsVisible(bool containingWindowIsVisible) 586 { 587 if (m_containingWindowIsVisible == containingWindowIsVisible) 588 return; 589 590 m_containingWindowIsVisible = containingWindowIsVisible; 591 592 FrameView* view = m_page->mainFrame()->view(); 593 if (!view) 594 return; 595 596 if (const HashSet<ScrollableArea*>* scrollableAreas = m_page->scrollableAreaSet()) { 597 HashSet<ScrollableArea*>::const_iterator end = scrollableAreas->end(); 598 for (HashSet<ScrollableArea*>::const_iterator it = scrollableAreas->begin(); it != end; ++it) { 599 if (!containingWindowIsVisible) 600 (*it)->contentAreaDidHide(); 601 else 602 (*it)->contentAreaDidShow(); 603 } 604 } 592 605 } 593 606 -
trunk/Source/WebCore/page/FocusController.h
r103365 r106875 64 64 bool isFocused() const { return m_isFocused; } 65 65 66 void setContainingWindowIsVisible(bool); 67 bool containingWindowIsVisible() const { return m_containingWindowIsVisible; } 68 66 69 bool transferFocusToElementInShadowRoot(Element* shadowHost, bool restorePreviousSelection); 67 70 … … 97 100 bool m_isFocused; 98 101 bool m_isChangingFocusedFrame; 102 bool m_containingWindowIsVisible; 99 103 100 104 }; -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
r106073 r106875 254 254 UNUSED_PARAM(scrollerImpPair); 255 255 UNUSED_PARAM(rect); 256 257 if (!_scrollableArea) 258 return; 259 260 if (!_scrollableArea->isOnActivePage()) 261 return; 262 263 _scrollableArea->scrollAnimator()->contentAreaWillPaint(); 256 264 } 257 265 -
trunk/Source/WebKit/mac/ChangeLog
r106836 r106875 1 2012-02-06 Anders Carlsson <andersca@apple.com> 2 3 Overlay scrollbars flash when window is simply activated 4 https://bugs.webkit.org/show_bug.cgi?id=77911 5 <rdar://problem/10211995> 6 7 Reviewed by Kenneth Russell. 8 9 * WebView/WebView.mm: 10 (-[WebView _windowWillOrderOnScreen:]): 11 (-[WebView _windowWillOrderOffScreen:]): 12 Call FocusController::setContainingWindowIsVisible. 13 14 1 15 2012-02-06 Matthew Delaney <mdelaney@apple.com> 2 16 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r106511 r106875 3470 3470 [self doWindowDidChangeScreen]; 3471 3471 3472 if (_private && _private->page) 3473 _private->page->resumeScriptedAnimations(); 3472 if (_private && _private->page) { 3473 _private->page->resumeScriptedAnimations(); 3474 _private->page->focusController()->setContainingWindowIsVisible(true); 3475 } 3474 3476 } 3475 3477 … … 3481 3483 - (void)_windowWillOrderOffScreen:(NSNotification *)notification 3482 3484 { 3483 if (_private && _private->page) 3484 _private->page->suspendScriptedAnimations(); 3485 if (_private && _private->page) { 3486 _private->page->suspendScriptedAnimations(); 3487 _private->page->focusController()->setContainingWindowIsVisible(false); 3488 } 3485 3489 } 3486 3490 -
trunk/Source/WebKit2/ChangeLog
r106838 r106875 1 2012-02-06 Anders Carlsson <andersca@apple.com> 2 3 Overlay scrollbars flash when window is simply activated 4 https://bugs.webkit.org/show_bug.cgi?id=77911 5 6 Reviewed by Kenneth Russell. 7 8 * UIProcess/API/mac/WKView.mm: 9 (-[WKView _updateWindowVisibility]): 10 Use -[NSWindow isVisible] here, since we also want to consider the window hidden if the application itself is hidden. 11 12 (-[WKView _windowDidOrderOffScreen:]): 13 (-[WKView _windowDidOrderOnScreen:]): 14 Call -[WKView updateWindowVisibility]. 15 16 * WebProcess/WebPage/WebPage.cpp: 17 (WebKit::WebPage::setWindowIsVisible): 18 Call FocusController::setContainingWindowIsVisible. 19 1 20 2012-02-06 Martin Robinson <mrobinson@igalia.com> 2 21 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r106678 r106875 1710 1710 - (void)_updateWindowVisibility 1711 1711 { 1712 _data->_page->updateWindowIsVisible( ![[self window] isMiniaturized]);1712 _data->_page->updateWindowIsVisible([[self window] isVisible]); 1713 1713 } 1714 1714 … … 1925 1925 _data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible); 1926 1926 _data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive); 1927 [self _updateWindowVisibility]; 1927 1928 } 1928 1929 … … 1933 1934 _data->_page->viewStateDidChange(WebPageProxy::ViewWindowIsActive); 1934 1935 _data->_page->viewStateDidChange(WebPageProxy::ViewIsVisible); 1936 [self _updateWindowVisibility]; 1935 1937 } 1936 1938 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r106706 r106875 2389 2389 m_windowIsVisible = windowIsVisible; 2390 2390 2391 corePage()->focusController()->setContainingWindowIsVisible(windowIsVisible); 2392 2391 2393 // Tell all our plug-in views that the window visibility changed. 2392 2394 for (HashSet<PluginView*>::const_iterator it = m_pluginViews.begin(), end = m_pluginViews.end(); it != end; ++it)
Note: See TracChangeset
for help on using the changeset viewer.