Changeset 96549 in webkit
- Timestamp:
- Oct 3, 2011 3:31:24 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96547 r96549 1 2011-10-03 Anders Carlsson <andersca@apple.com> 2 3 Remove custom scrollbar painting hooks 4 https://bugs.webkit.org/show_bug.cgi?id=69163 5 6 Reviewed by Alexey Proskuryakov. 7 8 The custom scrollbar and scroll corner painting hooks aren't used by anyone 9 so go ahead and remove them. This removes the setter/getter and ChromeClient functions. 10 11 * page/Chrome.cpp: 12 * page/ChromeClient.h: 13 * page/Settings.cpp: 14 (WebCore::Settings::Settings): 15 * page/Settings.h: 16 * platform/ScrollbarThemeComposite.cpp: 17 (WebCore::ScrollbarThemeComposite::paint): 18 (WebCore::ScrollbarThemeComposite::paintScrollCorner): 19 1 20 2011-09-22 Darin Adler <darin@apple.com> 2 21 -
trunk/Source/WebCore/WebCore.exp.in
r96480 r96549 224 224 __ZN7WebCore11toUserSpaceERK7_NSRectP8NSWindow 225 225 __ZN7WebCore11writeToFileEiPKci 226 __ZN7WebCore12ChromeClient20paintCustomScrollbarEPNS_15GraphicsContextERKNS_9FloatRectENS_20ScrollbarControlSizeEjNS_13ScrollbarPartEbffj227 226 __ZN7WebCore12ChromeClient23paintCustomOverhangAreaEPNS_15GraphicsContextERKNS_7IntRectES5_S5_ 228 __ZN7WebCore12ChromeClient23paintCustomScrollCornerEPNS_15GraphicsContextERKNS_9FloatRectE229 227 __ZN7WebCore12EditingStyleD1Ev 230 228 __ZN7WebCore12EventHandler10mouseMovedEP7NSEvent -
trunk/Source/WebCore/page/Chrome.cpp
r94908 r96549 560 560 } 561 561 562 bool ChromeClient::paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize,563 ScrollbarControlState, ScrollbarPart, bool,564 float, float, ScrollbarControlPartMask)565 {566 return false;567 }568 569 bool ChromeClient::paintCustomScrollCorner(GraphicsContext*, const FloatRect&)570 {571 return false;572 }573 574 562 bool ChromeClient::paintCustomOverhangArea(GraphicsContext*, const IntRect&, const IntRect&, const IntRect&) 575 563 { -
trunk/Source/WebCore/page/ChromeClient.h
r95919 r96549 218 218 virtual String generateReplacementFile(const String& path); 219 219 220 virtual bool paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize,221 ScrollbarControlState, ScrollbarPart pressedPart, bool vertical,222 float value, float proportion, ScrollbarControlPartMask);223 virtual bool paintCustomScrollCorner(GraphicsContext*, const FloatRect&);224 225 220 virtual bool paintCustomOverhangArea(GraphicsContext*, const IntRect&, const IntRect&, const IntRect&); 226 221 -
trunk/Source/WebCore/page/Settings.cpp
r95988 r96549 168 168 , m_inApplicationChromeMode(false) 169 169 , m_offlineWebApplicationCacheEnabled(false) 170 , m_shouldPaintCustomScrollbars(false)171 170 , m_enforceCSSMIMETypeInNoQuirksMode(true) 172 171 , m_usesEncodingDetector(false) … … 651 650 } 652 651 653 void Settings::setShouldPaintCustomScrollbars(bool shouldPaintCustomScrollbars)654 {655 m_shouldPaintCustomScrollbars = shouldPaintCustomScrollbars;656 }657 658 652 void Settings::setEnforceCSSMIMETypeInNoQuirksMode(bool enforceCSSMIMETypeInNoQuirksMode) 659 653 { -
trunk/Source/WebCore/page/Settings.h
r95988 r96549 279 279 void setOfflineWebApplicationCacheEnabled(bool); 280 280 bool offlineWebApplicationCacheEnabled() const { return m_offlineWebApplicationCacheEnabled; } 281 282 void setShouldPaintCustomScrollbars(bool);283 bool shouldPaintCustomScrollbars() const { return m_shouldPaintCustomScrollbars; }284 281 285 282 void setEnforceCSSMIMETypeInNoQuirksMode(bool); … … 551 548 bool m_inApplicationChromeMode : 1; 552 549 bool m_offlineWebApplicationCacheEnabled : 1; 553 bool m_shouldPaintCustomScrollbars : 1;554 550 bool m_enforceCSSMIMETypeInNoQuirksMode : 1; 555 551 bool m_usesEncodingDetector : 1; -
trunk/Source/WebCore/platform/ScrollbarThemeComposite.cpp
r96348 r96549 42 42 namespace WebCore { 43 43 44 static Page* pageForScrollView(ScrollView* view)45 {46 if (!view)47 return 0;48 if (!view->isFrameView())49 return 0;50 FrameView* frameView = static_cast<FrameView*>(view);51 if (!frameView->frame())52 return 0;53 return frameView->frame()->page();54 }55 56 44 bool ScrollbarThemeComposite::paint(Scrollbar* scrollbar, GraphicsContext* graphicsContext, const IntRect& damageRect) 57 45 { … … 95 83 scrollMask |= ForwardTrackPart; 96 84 } 97 98 #if PLATFORM(WIN)99 // FIXME: This API makes the assumption that the custom scrollbar's metrics will match100 // the theme's metrics. This is not a valid assumption. The ability for a client to paint101 // custom scrollbars should be removed once scrollbars can be styled via CSS.102 if (Page* page = pageForScrollView(scrollbar->parent())) {103 if (page->settings()->shouldPaintCustomScrollbars()) {104 float proportion = static_cast<float>(scrollbar->visibleSize()) / scrollbar->totalSize();105 float value = scrollbar->currentPos() / static_cast<float>(scrollbar->maximum());106 ScrollbarControlState s = 0;107 if (scrollbar->scrollableArea()->isActive())108 s |= ActiveScrollbarState;109 if (scrollbar->enabled())110 s |= EnabledScrollbarState;111 if (scrollbar->pressedPart() != NoPart)112 s |= PressedScrollbarState;113 if (page->chrome()->client()->paintCustomScrollbar(graphicsContext,114 scrollbar->frameRect(),115 scrollbar->controlSize(),116 s,117 scrollbar->pressedPart(),118 scrollbar->orientation() == VerticalScrollbar,119 value,120 proportion,121 scrollMask))122 return true;123 }124 }125 #endif126 85 127 86 // Paint the scrollbar background (only used by custom CSS scrollbars). … … 305 264 } 306 265 307 void ScrollbarThemeComposite::paintScrollCorner(ScrollView* view, GraphicsContext* context, const IntRect& cornerRect) 308 { 309 Page* page = pageForScrollView(view); 310 if (page && page->settings()->shouldPaintCustomScrollbars() && page->chrome()->client()->paintCustomScrollCorner(context, cornerRect)) 311 return; 266 void ScrollbarThemeComposite::paintScrollCorner(ScrollView*, GraphicsContext* context, const IntRect& cornerRect) 267 { 312 268 context->fillRect(cornerRect, Color::white, ColorSpaceDeviceRGB); 313 269 } -
trunk/Source/WebKit/chromium/ChangeLog
r96533 r96549 1 2011-10-03 Anders Carlsson <andersca@apple.com> 2 3 Remove custom scrollbar painting hooks 4 https://bugs.webkit.org/show_bug.cgi?id=69163 5 6 Reviewed by Alexey Proskuryakov. 7 8 * src/WebSettingsImpl.cpp: 9 (WebKit::WebSettingsImpl::setShouldPaintCustomScrollbars): 10 1 11 2011-10-03 Elliot Poger <epoger@google.com> 2 12 -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp
r95901 r96549 248 248 void WebSettingsImpl::setShouldPaintCustomScrollbars(bool enabled) 249 249 { 250 m_settings->setShouldPaintCustomScrollbars(enabled);250 // FIXME: This should be removed. 251 251 } 252 252 -
trunk/Source/WebKit/win/ChangeLog
r95944 r96549 1 2011-10-03 Anders Carlsson <andersca@apple.com> 2 3 Remove custom scrollbar painting hooks 4 https://bugs.webkit.org/show_bug.cgi?id=69163 5 6 Reviewed by Alexey Proskuryakov. 7 8 Remove now unused WebPreferences and ChromeClient overrides. 9 10 * Interfaces/IWebPreferences.idl: 11 * WebCoreSupport/WebChromeClient.cpp: 12 * WebCoreSupport/WebChromeClient.h: 13 * WebPreferenceKeysPrivate.h: 14 * WebPreferences.cpp: 15 (WebPreferences::unused3): 16 (WebPreferences::unused4): 17 * WebPreferences.h: 18 * WebView.cpp: 19 (WebView::notifyPreferencesChanged): 20 1 21 2011-09-23 Adam Roben <aroben@apple.com> 2 22 -
trunk/Source/WebKit/win/Interfaces/IWebPreferences.idl
r95650 r96549 189 189 HRESULT setCacheModel([in] WebCacheModel cacheModel); 190 190 191 HRESULT setShouldPaintCustomScrollbars(BOOL shouldPaint);192 HRESULT shouldPaintCustomScrollbars(BOOL *shouldPaint);191 HRESULT unused3(); 192 HRESULT unused4(); 193 193 194 194 HRESULT setZoomsTextOnly(BOOL zoomsTextOnly); -
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
r95919 r96549 644 644 } 645 645 646 bool WebChromeClient::paintCustomScrollbar(GraphicsContext* context, const FloatRect& rect, ScrollbarControlSize size,647 ScrollbarControlState state, ScrollbarPart pressedPart, bool vertical,648 float value, float proportion, ScrollbarControlPartMask parts)649 {650 if (context->paintingDisabled())651 return false;652 653 COMPtr<IWebUIDelegate> delegate = uiDelegate();654 if (!delegate)655 return false;656 657 WebScrollbarControlPartMask webParts = WebNoScrollPart;658 if (parts & BackButtonStartPart) // FIXME: Hyatt, what about BackButtonEndPart?659 webParts |= WebBackButtonPart;660 if (parts & BackTrackPart)661 webParts |= WebBackTrackPart;662 if (parts & ThumbPart)663 webParts |= WebThumbPart;664 if (parts & ForwardTrackPart)665 webParts |= WebForwardTrackPart;666 if (parts & ForwardButtonStartPart) // FIXME: Hyatt, what about ForwardButtonEndPart?667 webParts |= WebForwardButtonPart;668 669 WebScrollbarControlPart webPressedPart = WebNoScrollPart;670 switch (pressedPart) {671 case BackButtonStartPart: // FIXME: Hyatt, what about BackButtonEndPart?672 webPressedPart = WebBackButtonPart;673 break;674 case BackTrackPart:675 webPressedPart = WebBackTrackPart;676 break;677 case ThumbPart:678 webPressedPart = WebThumbPart;679 break;680 case ForwardTrackPart:681 webPressedPart = WebForwardTrackPart;682 break;683 case ForwardButtonStartPart: // FIXME: Hyatt, what about ForwardButtonEndPart?684 webPressedPart = WebForwardButtonPart;685 break;686 default:687 break;688 }689 690 WebScrollBarControlSize webSize;691 switch (size) {692 case SmallScrollbar:693 webSize = WebSmallScrollbar;694 break;695 case RegularScrollbar:696 default:697 webSize = WebRegularScrollbar;698 }699 WebScrollbarControlState webState = 0;700 if (state & ActiveScrollbarState)701 webState |= WebActiveScrollbarState;702 if (state & EnabledScrollbarState)703 webState |= WebEnabledScrollbarState;704 if (state & PressedScrollbarState)705 webState |= WebPressedScrollbarState;706 707 RECT webRect = enclosingIntRect(rect);708 LocalWindowsContext windowsContext(context, webRect);709 HRESULT hr = delegate->paintCustomScrollbar(m_webView, windowsContext.hdc(), webRect, webSize, webState, webPressedPart,710 vertical, value, proportion, webParts);711 return SUCCEEDED(hr);712 }713 714 bool WebChromeClient::paintCustomScrollCorner(GraphicsContext* context, const FloatRect& rect)715 {716 if (context->paintingDisabled())717 return false;718 719 COMPtr<IWebUIDelegate> delegate = uiDelegate();720 if (!delegate)721 return false;722 723 RECT webRect = enclosingIntRect(rect);724 LocalWindowsContext windowsContext(context, webRect);725 HRESULT hr = delegate->paintCustomScrollCorner(m_webView, windowsContext.hdc(), webRect);726 return SUCCEEDED(hr);727 }728 729 646 void WebChromeClient::runOpenPanel(Frame*, PassRefPtr<FileChooser> prpFileChooser) 730 647 { -
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
r95919 r96549 127 127 virtual void populateVisitedLinks(); 128 128 129 virtual bool paintCustomScrollbar(WebCore::GraphicsContext*, const WebCore::FloatRect&, WebCore::ScrollbarControlSize,130 WebCore::ScrollbarControlState, WebCore::ScrollbarPart pressedPart, bool vertical,131 float value, float proportion, WebCore::ScrollbarControlPartMask);132 virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&);133 134 129 virtual void runOpenPanel(WebCore::Frame*, PassRefPtr<WebCore::FileChooser>); 135 130 virtual void loadIconForFiles(const Vector<WTF::String>&, WebCore::FileIconLoader*); -
trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h
r93027 r96549 126 126 #define WebKitAuthorAndUserStylesEnabledPreferenceKey "WebKitAuthorAndUserStylesEnabled" 127 127 128 #define WebKitPaintCustomScrollbarsPreferenceKey "WebKitPaintCustomScrollbars"129 130 128 #define WebKitPaintNativeControlsPreferenceKey "WebKitPaintNativeControls" 131 129 -
trunk/Source/WebKit/win/WebPreferences.cpp
r93014 r96549 1319 1319 } 1320 1320 1321 HRESULT WebPreferences:: setShouldPaintCustomScrollbars(BOOL shouldPaint)1322 { 1323 setBoolValue(CFSTR(WebKitPaintCustomScrollbarsPreferenceKey), shouldPaint);1324 return S_OK;1325 } 1326 1327 HRESULT WebPreferences:: shouldPaintCustomScrollbars(BOOL* shouldPaint)1328 { 1329 *shouldPaint = boolValueForKey(CFSTR(WebKitPaintCustomScrollbarsPreferenceKey));1330 return S_OK;1321 HRESULT WebPreferences::unused3() 1322 { 1323 ASSERT_NOT_REACHED(); 1324 return E_FAIL; 1325 } 1326 1327 HRESULT WebPreferences::unused4() 1328 { 1329 ASSERT_NOT_REACHED(); 1330 return E_FAIL; 1331 1331 } 1332 1332 -
trunk/Source/WebKit/win/WebPreferences.h
r93014 r96549 287 287 /* [in] */ WebCacheModel cacheModel); 288 288 289 virtual HRESULT STDMETHODCALLTYPE setShouldPaintCustomScrollbars( 290 /* [in] */ BOOL shouldPaint); 291 292 virtual HRESULT STDMETHODCALLTYPE shouldPaintCustomScrollbars( 293 /* [retval][out] */ BOOL *shouldPaint); 289 virtual HRESULT STDMETHODCALLTYPE unused3(); 290 virtual HRESULT STDMETHODCALLTYPE unused4(); 294 291 295 292 virtual HRESULT STDMETHODCALLTYPE setAVFoundationEnabled( -
trunk/Source/WebKit/win/WebView.cpp
r95271 r96549 4706 4706 settings->setDOMPasteAllowed(!!enabled); 4707 4707 4708 hr = preferences->shouldPaintCustomScrollbars(&enabled);4709 if (FAILED(hr))4710 return hr;4711 settings->setShouldPaintCustomScrollbars(!!enabled);4712 4713 4708 hr = preferences->zoomsTextOnly(&enabled); 4714 4709 if (FAILED(hr)) -
trunk/Source/WebKit2/ChangeLog
r96545 r96549 1 2011-10-03 Anders Carlsson <andersca@apple.com> 2 3 Remove custom scrollbar painting hooks 4 https://bugs.webkit.org/show_bug.cgi?id=69163 5 6 Remove overridden ChromeClient member functions. 7 8 Reviewed by Alexey Proskuryakov. 9 10 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 11 * WebProcess/WebCoreSupport/WebChromeClient.h: 12 1 13 2011-10-03 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r96413 r96549 588 588 } 589 589 590 bool WebChromeClient::paintCustomScrollbar(GraphicsContext*, const FloatRect&, ScrollbarControlSize,591 ScrollbarControlState, ScrollbarPart pressedPart, bool vertical,592 float value, float proportion, ScrollbarControlPartMask)593 {594 notImplemented();595 return false;596 }597 598 bool WebChromeClient::paintCustomScrollCorner(GraphicsContext*, const FloatRect&)599 {600 notImplemented();601 return false;602 }603 604 590 bool WebChromeClient::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) 605 591 { -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r95919 r96549 152 152 virtual String generateReplacementFile(const String& path) OVERRIDE; 153 153 154 virtual bool paintCustomScrollbar(WebCore::GraphicsContext*, const WebCore::FloatRect&, WebCore::ScrollbarControlSize,155 WebCore::ScrollbarControlState, WebCore::ScrollbarPart pressedPart, bool vertical,156 float value, float proportion, WebCore::ScrollbarControlPartMask) OVERRIDE;157 virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&) OVERRIDE;158 159 154 virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&) OVERRIDE; 160 155 -
trunk/Tools/ChangeLog
r96541 r96549 1 2011-10-03 Anders Carlsson <andersca@apple.com> 2 3 Remove custom scrollbar painting hooks 4 https://bugs.webkit.org/show_bug.cgi?id=69163 5 6 Reviewed by Alexey Proskuryakov. 7 8 * DumpRenderTree/chromium/WebPreferences.cpp: 9 (WebPreferences::applyTo): 10 No need to enable custom scrollbar painting. 11 1 12 2011-10-03 David Levin <levin@chromium.org> 2 13 -
trunk/Tools/DumpRenderTree/chromium/WebPreferences.cpp
r94214 r96549 171 171 172 172 // Fixed values. 173 settings->setShouldPaintCustomScrollbars(true);174 173 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); 175 174 settings->setDownloadableBinaryFontsEnabled(true);
Note: See TracChangeset
for help on using the changeset viewer.