Changeset 180607 in webkit
- Timestamp:
- Feb 24, 2015 8:07:06 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r180605 r180607 1 2015-02-24 Simon Fraser <simon.fraser@apple.com> 2 3 Use an enum for scrollbar style 4 https://bugs.webkit.org/show_bug.cgi?id=141985 5 6 Reviewed by Beth Dakin. 7 8 Switch to an enum class for the scrollbar style (normal or overlay). 9 10 * page/ChromeClient.h: 11 * page/FrameView.cpp: 12 (WebCore::FrameView::scrollbarStyleChanged): 13 * page/FrameView.h: 14 * platform/ScrollTypes.h: 15 * platform/ScrollView.cpp: 16 (WebCore::ScrollView::scrollbarStyleChanged): 17 * platform/ScrollView.h: 18 * platform/ScrollableArea.h: 19 (WebCore::ScrollableArea::scrollbarStyleChanged): 20 * platform/mac/ScrollAnimatorMac.mm: 21 (WebCore::ScrollAnimatorMac::updateScrollerStyle): 22 1 23 2015-02-24 Commit Queue <commit-queue@webkit.org> 2 24 -
trunk/Source/WebCore/page/ChromeClient.h
r178575 r180607 387 387 388 388 virtual void notifyScrollerThumbIsVisibleInRect(const IntRect&) { } 389 virtual void recommendedScrollbarStyleDidChange( int /*newStyle*/) { }389 virtual void recommendedScrollbarStyleDidChange(ScrollbarStyle) { } 390 390 391 391 enum DialogType { -
trunk/Source/WebCore/page/FrameView.cpp
r180574 r180607 3487 3487 } 3488 3488 3489 void FrameView::scrollbarStyleChanged( intnewStyle, bool forceUpdate)3489 void FrameView::scrollbarStyleChanged(ScrollbarStyle newStyle, bool forceUpdate) 3490 3490 { 3491 3491 if (!frame().isMainFrame()) -
trunk/Source/WebCore/page/FrameView.h
r180574 r180607 425 425 426 426 virtual bool shouldSuspendScrollAnimations() const override; 427 virtual void scrollbarStyleChanged( int newStyle, bool forceUpdate) override;427 virtual void scrollbarStyleChanged(ScrollbarStyle, bool forceUpdate) override; 428 428 429 429 RenderBox* embeddedContentBox() const; -
trunk/Source/WebCore/platform/ScrollTypes.h
r173034 r180607 155 155 ScrollbarButtonsDoubleBoth 156 156 }; 157 158 enum class ScrollbarStyle { 159 AlwaysVisible, 160 Overlay 161 }; 157 162 158 163 enum ScrollbarOverlayStyle { -
trunk/Source/WebCore/platform/ScrollView.cpp
r180474 r180607 1163 1163 } 1164 1164 1165 void ScrollView::scrollbarStyleChanged( int, bool forceUpdate)1165 void ScrollView::scrollbarStyleChanged(ScrollbarStyle, bool forceUpdate) 1166 1166 { 1167 1167 if (!forceUpdate) -
trunk/Source/WebCore/platform/ScrollView.h
r179886 r180607 74 74 WEBCORE_EXPORT virtual void setScrollOffset(const IntPoint&) override; 75 75 virtual bool isScrollCornerVisible() const override; 76 virtual void scrollbarStyleChanged( int newStyle, bool forceUpdate) override;76 virtual void scrollbarStyleChanged(ScrollbarStyle, bool forceUpdate) override; 77 77 78 78 virtual void notifyPageThatContentAreaWillPaint() const; -
trunk/Source/WebCore/platform/ScrollableArea.h
r180474 r180607 202 202 203 203 virtual bool shouldSuspendScrollAnimations() const { return true; } 204 virtual void scrollbarStyleChanged( int /*newStyle*/, bool /*forceUpdate*/) { }204 virtual void scrollbarStyleChanged(ScrollbarStyle, bool /*forceUpdate*/) { } 205 205 virtual void setVisibleScrollerThumbRect(const IntRect&) { } 206 206 -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
r180596 r180607 1343 1343 // If m_needsScrollerStyleUpdate is true, then the page is restoring from the page cache, and 1344 1344 // a relayout will happen on its own. Otherwise, we must initiate a re-layout ourselves. 1345 scrollableArea().scrollbarStyleChanged(newStyle , !m_needsScrollerStyleUpdate);1345 scrollableArea().scrollbarStyleChanged(newStyle == NSScrollerStyleOverlay ? ScrollbarStyle::Overlay : ScrollbarStyle::AlwaysVisible, !m_needsScrollerStyleUpdate); 1346 1346 1347 1347 m_needsScrollerStyleUpdate = false; -
trunk/Source/WebKit2/ChangeLog
r180606 r180607 1 2015-02-24 Simon Fraser <simon.fraser@apple.com> 2 3 Use an enum for scrollbar style 4 https://bugs.webkit.org/show_bug.cgi?id=141985 5 6 Reviewed by Beth Dakin. 7 8 Switch to an enum class for the scrollbar style (normal or overlay). 9 10 Sadly it still has to be passed as an int across the process boundary. 11 12 * UIProcess/PageClient.h: 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::WebPageProxy::recommendedScrollbarStyleDidChange): 15 * UIProcess/mac/PageClientImpl.h: 16 * UIProcess/mac/PageClientImpl.mm: 17 (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange): 18 * WebProcess/Plugins/PDF/PDFPlugin.h: 19 * WebProcess/Plugins/PDF/PDFPlugin.mm: 20 (WebKit::PDFPlugin::scrollbarStyleChanged): 21 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 22 (WebKit::WebChromeClient::recommendedScrollbarStyleDidChange): 23 * WebProcess/WebCoreSupport/WebChromeClient.h: 24 1 25 2015-02-24 Chris Dumez <cdumez@apple.com> 2 26 -
trunk/Source/WebKit2/UIProcess/PageClient.h
r180465 r180607 234 234 virtual String dismissCorrectionPanelSoon(WebCore::ReasonForDismissingAlternativeText) = 0; 235 235 virtual void recordAutocorrectionResponse(WebCore::AutocorrectionResponseType, const String& replacedString, const String& replacementString) = 0; 236 virtual void recommendedScrollbarStyleDidChange( int32_t newStyle) = 0;236 virtual void recommendedScrollbarStyleDidChange(WebCore::ScrollbarStyle) = 0; 237 237 virtual void removeNavigationGestureSnapshot() = 0; 238 238 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r180565 r180607 5025 5025 { 5026 5026 #if USE(APPKIT) 5027 m_pageClient.recommendedScrollbarStyleDidChange( newStyle);5027 m_pageClient.recommendedScrollbarStyleDidChange(static_cast<WebCore::ScrollbarStyle>(newStyle)); 5028 5028 #else 5029 5029 UNUSED_PARAM(newStyle); -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h
r180473 r180607 149 149 virtual void recordAutocorrectionResponse(WebCore::AutocorrectionResponseType, const String& replacedString, const String& replacementString) override; 150 150 151 virtual void recommendedScrollbarStyleDidChange( int32_t newStyle) override;151 virtual void recommendedScrollbarStyleDidChange(WebCore::ScrollbarStyle) override; 152 152 153 153 virtual WKView* wkView() const override { return m_wkView; } -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
r180465 r180607 609 609 } 610 610 611 void PageClientImpl::recommendedScrollbarStyleDidChange( int32_tnewStyle)611 void PageClientImpl::recommendedScrollbarStyleDidChange(ScrollbarStyle newStyle) 612 612 { 613 613 // Now re-create a tracking area with the appropriate options given the new scrollbar style 614 614 NSTrackingAreaOptions options = NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect; 615 if (newStyle == NSScrollerStyleLegacy)615 if (newStyle == ScrollbarStyle::AlwaysVisible) 616 616 options |= NSTrackingActiveAlways; 617 617 else -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h
r179236 r180607 195 195 virtual WebCore::Scrollbar* verticalScrollbar() const override { return m_verticalScrollbar.get(); } 196 196 virtual bool shouldSuspendScrollAnimations() const override { return false; } // If we return true, ScrollAnimatorMac will keep cycling a timer forever, waiting for a good time to animate. 197 virtual void scrollbarStyleChanged( int newStyle, bool forceUpdate) override;197 virtual void scrollbarStyleChanged(WebCore::ScrollbarStyle, bool forceUpdate) override; 198 198 virtual WebCore::IntRect convertFromScrollbarToContainingView(const WebCore::Scrollbar*, const WebCore::IntRect& scrollbarRect) const override; 199 199 virtual WebCore::IntRect convertFromContainingViewToScrollbar(const WebCore::Scrollbar*, const WebCore::IntRect& parentRect) const override; -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
r180474 r180607 789 789 } 790 790 791 void PDFPlugin::scrollbarStyleChanged( int, bool forceUpdate)791 void PDFPlugin::scrollbarStyleChanged(ScrollbarStyle style, bool forceUpdate) 792 792 { 793 793 if (!forceUpdate) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r179744 r180607 972 972 } 973 973 974 void WebChromeClient::recommendedScrollbarStyleDidChange( int32_tnewStyle)975 { 976 m_page->send(Messages::WebPageProxy::RecommendedScrollbarStyleDidChange( newStyle));974 void WebChromeClient::recommendedScrollbarStyleDidChange(ScrollbarStyle newStyle) 975 { 976 m_page->send(Messages::WebPageProxy::RecommendedScrollbarStyleDidChange(static_cast<int32_t>(newStyle))); 977 977 } 978 978 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r178575 r180607 275 275 276 276 virtual void notifyScrollerThumbIsVisibleInRect(const WebCore::IntRect&) override; 277 virtual void recommendedScrollbarStyleDidChange( int32_tnewStyle) override;277 virtual void recommendedScrollbarStyleDidChange(WebCore::ScrollbarStyle newStyle) override; 278 278 279 279 virtual WebCore::Color underlayColor() const override;
Note: See TracChangeset
for help on using the changeset viewer.