WebKit Bugzilla
Attachment 343104 Details for
Bug 186819
: Corner of two scroll bars is white with dark mode enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186819-20180619145230.patch (text/plain), 60.10 KB, created by
Timothy Hatcher
on 2018-06-19 14:52:30 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2018-06-19 14:52:30 PDT
Size:
60.10 KB
patch
obsolete
>Subversion Revision: 232932 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d45797da3eeef3e4a3cb526a0188a9e58886a90e..5c863c3dd24089bd7d86e1e9737b8726f66e0fb7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,79 @@ >+2018-06-19 Timothy Hatcher <timothy@apple.com> >+ >+ Corner of two scroll bars is white with dark mode enabled. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=186819 >+ rdar://problem/40434350 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Pass useSystemAppearance and defaultAppearance down through Widget drawing >+ so we can paint the scrollbars with the right appearance. >+ >+ Start drawing the scrollbar corner with CoreUI, so we can get the right appearance, >+ even in light mode -- instead of always white. >+ >+ * Configurations/WebCore.xcconfig: Link against CoreUI. >+ * inspector/InspectorOverlay.cpp: >+ (WebCore::InspectorOverlay::paint): >+ * page/FrameView.cpp: >+ (WebCore::FrameView::paintScrollCorner): >+ (WebCore::FrameView::paintScrollbar): >+ (WebCore::FrameView::paintControlTints): >+ (WebCore::FrameView::paintContentsForSnapshot): >+ * page/FrameView.h: >+ * page/Page.h: >+ * platform/ScrollView.cpp: >+ (WebCore::ScrollView::paintScrollCorner): >+ (WebCore::ScrollView::paintScrollbar): >+ (WebCore::ScrollView::paintScrollbars): >+ (WebCore::ScrollView::paint): >+ * platform/ScrollView.h: >+ * platform/Scrollbar.cpp: >+ (WebCore::Scrollbar::paint): >+ * platform/Scrollbar.h: >+ * platform/ScrollbarTheme.h: >+ (WebCore::ScrollbarTheme::paint): >+ (WebCore::ScrollbarTheme::paintScrollCorner): >+ * platform/ScrollbarThemeComposite.cpp: >+ (WebCore::ScrollbarThemeComposite::paint): >+ (WebCore::ScrollbarThemeComposite::paintScrollCorner): Deleted. >+ * platform/ScrollbarThemeComposite.h: >+ * platform/Widget.h: >+ * platform/gtk/WidgetGtk.cpp: >+ (WebCore::Widget::paint): >+ * platform/mac/ScrollbarThemeMac.h: >+ * platform/mac/ScrollbarThemeMac.mm: >+ (WebCore::ScrollbarThemeMac::paint): >+ (WebCore::ScrollbarThemeMac::paintScrollCorner): >+ * platform/mac/WidgetMac.mm: >+ (WebCore::Widget::paint): >+ * platform/win/WidgetWin.cpp: >+ (WebCore::Widget::paint): >+ * platform/wpe/WidgetWPE.cpp: >+ (WebCore::Widget::paint): >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::paintOverflowControls): >+ (WebCore::RenderLayer::paintScrollCorner): >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::paintContents): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::paintScrollbar): >+ (WebCore::RenderLayerCompositor::paintContents): >+ * rendering/RenderLayerCompositor.h: >+ * rendering/RenderListBox.cpp: >+ (WebCore::RenderListBox::paintScrollbar): >+ * rendering/RenderScrollbar.cpp: >+ (WebCore::RenderScrollbar::paint): >+ * rendering/RenderScrollbar.h: >+ * rendering/RenderScrollbarTheme.cpp: >+ (WebCore::RenderScrollbarTheme::paintScrollCorner): >+ * rendering/RenderScrollbarTheme.h: >+ * rendering/RenderWidget.cpp: >+ (WebCore::RenderWidget::paintContents): >+ * svg/graphics/SVGImage.cpp: >+ (WebCore::SVGImage::draw): >+ > 2018-06-18 Carlos Alberto Lopez Perez <clopez@igalia.com> > > [WTF] Remove workarounds needed to support libstdc++-4 >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index c9954a4735ff61ae01bd891dc07b9b77834a2168..0e2939434bfbb5ea018d652efb27dffb67d06950 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-19 Timothy Hatcher <timothy@apple.com> >+ >+ Corner of two scroll bars is white with dark mode enabled. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=186819 >+ rdar://problem/40434350 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Expose some SPI of CoreUI and NSAppearance to draw scrollbar corners. >+ >+ * PAL.xcodeproj/project.pbxproj: >+ * pal/spi/mac/CoreUISPI.h: Added. >+ * pal/spi/mac/NSAppearanceSPI.h: Added. >+ > 2018-06-15 Jonathan Bedard <jbedard@apple.com> > > Complex text handling should opt out of bounded text layout (follow-up fix) >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index d2f64247e3e6dcdd2a3c77854328e32121a25629..c50c3be3c2b0477fba111b5b9df60d69a7dd2072 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,25 @@ >+2018-06-19 Timothy Hatcher <timothy@apple.com> >+ >+ Corner of two scroll bars is white with dark mode enabled. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=186819 >+ rdar://problem/40434350 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Pass useSystemAppearance and defaultAppearance down through Widget drawing >+ so we can paint the scrollbars with the right appearance. >+ >+ * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: >+ (WebKit::InjectedBundleRangeHandle::renderedImage): >+ * WebProcess/Plugins/PDF/PDFPlugin.mm: >+ (WebKit::PDFPlugin::paintControlForLayerInContext): >+ * WebProcess/Plugins/PluginView.cpp: >+ (WebKit::PluginView::paint): >+ * WebProcess/Plugins/PluginView.h: >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::drawRect): >+ > 2018-06-18 Karl Leplat <karl.leplat_ext@softathome.com> > > [Threaded paintingEngine] Fix rendering glitches >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index bf9618b5d4c142cbf585982f3d94c944d2f18554..2825cdba79ecc2054828ed0224fdd2d643e55a2e 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-19 Timothy Hatcher <timothy@apple.com> >+ >+ Corner of two scroll bars is white with dark mode enabled. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=186819 >+ rdar://problem/40434350 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Pass useSystemAppearance and defaultAppearance down through Widget drawing >+ so we can paint the scrollbars with the right appearance. >+ >+ * WebView/WebFrame.mm: >+ (-[WebFrame _drawRect:contentsOnly:]): >+ > 2018-06-12 Darin Adler <darin@apple.com> > > [Cocoa] Make some RetainPtr refinements to get more ready for ARC >diff --git a/Source/WebCore/Configurations/WebCore.xcconfig b/Source/WebCore/Configurations/WebCore.xcconfig >index 29b680620f61f5452f8459175027912600dd37cd..29863fe8faeb28ded9892fd0284f12d0f2c4eadb 100644 >--- a/Source/WebCore/Configurations/WebCore.xcconfig >+++ b/Source/WebCore/Configurations/WebCore.xcconfig >@@ -80,6 +80,9 @@ WK_AUDIO_UNIT_LDFLAGS_macosx = -framework AudioUnit; > WK_CARBON_LDFLAGS = $(WK_CARBON_LDFLAGS_$(WK_PLATFORM_NAME)); > WK_CARBON_LDFLAGS_macosx = -framework Carbon; > >+WK_CORE_UI_LDFLAGS = $(WK_CORE_UI_LDFLAGS_$(WK_PLATFORM_NAME)); >+WK_CORE_UI_LDFLAGS_macosx = -framework CoreUI; >+ > WK_DATA_DETECTORS_CORE_LDFLAGS = $(WK_DATA_DETECTORS_CORE_LDFLAGS_$(WK_PLATFORM_NAME)); > WK_DATA_DETECTORS_CORE_LDFLAGS_macosx = -framework DataDetectorsCore; > >@@ -126,7 +129,7 @@ WK_URL_FORMATTING_LDFLAGS = $(WK_URL_FORMATTING_LDFLAGS_$(WK_HAVE_URL_FORMATTING > WK_URL_FORMATTING_LDFLAGS_YES = -framework URLFormatting; > > // FIXME: Reduce the number of allowable_clients <rdar://problem/31823969> >-OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework Metal $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)) $(OTHER_LDFLAGS_PLATFORM_$(WK_PLATFORM_NAME)) $(WK_APPKIT_LDFLAGS) $(WK_APPSUPPORT_LDFLAGS) $(WK_AUDIO_UNIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_DATA_DETECTORS_CORE_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_SYSTEM_CONFIGURATION_LDFLAGS) $(WK_SYSTEM_PREVIEW_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS); >+OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy -force_load $(BUILT_PRODUCTS_DIR)/libPAL.a -framework CFNetwork -framework CoreAudio -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework Metal $(OTHER_LDFLAGS_PLATFORM_$(WK_COCOA_TOUCH)) $(OTHER_LDFLAGS_PLATFORM_$(WK_PLATFORM_NAME)) $(WK_APPKIT_LDFLAGS) $(WK_APPSUPPORT_LDFLAGS) $(WK_AUDIO_UNIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_UI_LDFLAGS) $(WK_DATA_DETECTORS_CORE_LDFLAGS) $(WK_DEVICE_IDENTITY_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_IOSURFACE_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_OPENGL_LDFLAGS) $(WK_SYSTEM_CONFIGURATION_LDFLAGS) $(WK_SYSTEM_PREVIEW_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS); > > OTHER_LDFLAGS_PLATFORM_cocoatouch = -allowable_client WebKit -allowable_client iTunesU -allowable_client Casablanca -allowable_client Remote -allowable_client TVBooks -allowable_client DumpRenderTree -allowable_client WebKitTestRunner -allowable_client TestWebKitAPI; > OTHER_LDFLAGS_PLATFORM_macosx = -sub_library libobjc -umbrella WebKit; >diff --git a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >index 1b00b1628e8d9b490e760ca338417d747ae9cacc..446f2d03511a44f44f9b91219e60cf2b705aa1a9 100644 >--- a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >+++ b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >@@ -105,6 +105,8 @@ > 1C09D0581E31C57E00725F18 /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C09D0571E31C57E00725F18 /* config.h */; }; > 1C4876D81F8D7F4E00CCEEBD /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C4876D61F8D7F4E00CCEEBD /* Logging.cpp */; }; > 1C4876D91F8D7F4E00CCEEBD /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C4876D71F8D7F4E00CCEEBD /* Logging.h */; }; >+ 1CCEE4F520D871930047B097 /* CoreUISPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCEE4F420D871930047B097 /* CoreUISPI.h */; }; >+ 1CCEE4F720D8743F0047B097 /* NSAppearanceSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */; }; > 2D02E93C2056FAA700A13797 /* AudioToolboxSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */; }; > 31308B1420A21705003FB929 /* SystemPreviewSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31308B1320A21705003FB929 /* SystemPreviewSPI.h */; }; > 570AB8F120AE2E8D00B8BE87 /* SecKeyProxySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */; }; >@@ -252,6 +254,8 @@ > 1C4876DC1F8D7FC600CCEEBD /* LogMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogMacros.h; sourceTree = "<group>"; }; > 1C67CEA11E32EDA800F80F2E /* FeatureDefines.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = FeatureDefines.xcconfig; sourceTree = "<group>"; }; > 1C67CEA21E32EE2600F80F2E /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; }; >+ 1CCEE4F420D871930047B097 /* CoreUISPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreUISPI.h; sourceTree = "<group>"; }; >+ 1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSAppearanceSPI.h; sourceTree = "<group>"; }; > 2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioToolboxSPI.h; sourceTree = "<group>"; }; > 31308B1320A21705003FB929 /* SystemPreviewSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemPreviewSPI.h; sourceTree = "<group>"; }; > 37119A7820CCB5FF002C6DC9 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; }; >@@ -417,6 +421,7 @@ > isa = PBXGroup; > children = ( > 0C7785701F45130F00F4EBB6 /* AVFoundationSPI.h */, >+ 1CCEE4F420D871930047B097 /* CoreUISPI.h */, > 0C7785711F45130F00F4EBB6 /* DataDetectorsSPI.h */, > A102658D1F567E9D00B4C844 /* HIServicesSPI.h */, > A10265881F56747A00B4C844 /* HIToolboxSPI.h */, >@@ -424,6 +429,7 @@ > 0C7785731F45130F00F4EBB6 /* MediaRemoteSPI.h */, > A1F55DCE1F5528EC00EDB75F /* MetadataSPI.h */, > 0C7785741F45130F00F4EBB6 /* NSAccessibilitySPI.h */, >+ 1CCEE4F620D8743F0047B097 /* NSAppearanceSPI.h */, > 0C7785751F45130F00F4EBB6 /* NSApplicationSPI.h */, > A1175B4A1F6B2D7E00C4B9F0 /* NSCellSPI.h */, > 0C7785761F45130F00F4EBB6 /* NSEventSPI.h */, >@@ -629,6 +635,7 @@ > 0CF99CA91F738437007EE793 /* CoreMediaSoftLink.h in Headers */, > 0C2DA0721F33CA8400DBC317 /* CoreMediaSPI.h in Headers */, > 0C2DA1401F3BEB4900DBC317 /* CoreTextSPI.h in Headers */, >+ 1CCEE4F520D871930047B097 /* CoreUISPI.h in Headers */, > 0C5AF9191F43A4C7002EAC02 /* CoreUISPI.h in Headers */, > 1C09D0531E31C44100725F18 /* CryptoDigest.h in Headers */, > 0C2DA1411F3BEB4900DBC317 /* DataDetectorsCoreSPI.h in Headers */, >@@ -660,6 +667,7 @@ > 0C5AF91E1F43A4C7002EAC02 /* MobileGestaltSPI.h in Headers */, > 0C2DA1491F3BEB4900DBC317 /* NEFilterSourceSPI.h in Headers */, > 0C77858D1F45130F00F4EBB6 /* NSAccessibilitySPI.h in Headers */, >+ 1CCEE4F720D8743F0047B097 /* NSAppearanceSPI.h in Headers */, > 0C77858E1F45130F00F4EBB6 /* NSApplicationSPI.h in Headers */, > 0C2DA14A1F3BEB4900DBC317 /* NSAttributedStringSPI.h in Headers */, > 0C2DA14B1F3BEB4900DBC317 /* NSButtonCellSPI.h in Headers */, >diff --git a/Source/WebCore/PAL/pal/spi/mac/CoreUISPI.h b/Source/WebCore/PAL/pal/spi/mac/CoreUISPI.h >new file mode 100644 >index 0000000000000000000000000000000000000000..689878771db3101aac042b9b9dcd0d3e7e39404a >--- /dev/null >+++ b/Source/WebCore/PAL/pal/spi/mac/CoreUISPI.h >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if USE(APPLE_INTERNAL_SDK) >+ >+#include <CoreUI/CoreUI.h> >+ >+#else >+ >+extern const CFStringRef kCUIWidgetKey; >+extern const CFStringRef kCUIIsFlippedKey; >+ >+extern const CFStringRef kCUIWidgetScrollBarTrackCorner; >+ >+#endif >diff --git a/Source/WebCore/PAL/pal/spi/mac/NSAppearanceSPI.h b/Source/WebCore/PAL/pal/spi/mac/NSAppearanceSPI.h >new file mode 100644 >index 0000000000000000000000000000000000000000..0730ff35a288ec7678fa7c417d29da1da8e18d60 >--- /dev/null >+++ b/Source/WebCore/PAL/pal/spi/mac/NSAppearanceSPI.h >@@ -0,0 +1,34 @@ >+/* >+ * Copyright (C) 2015 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#if USE(APPKIT) >+ >+@interface NSAppearance () >+ >+- (void)_drawInRect:(NSRect)rect context:(CGContextRef)context options:(NSDictionary *)options; >+ >+@end >+ >+#endif // USE(APPKIT) >diff --git a/Source/WebCore/inspector/InspectorOverlay.cpp b/Source/WebCore/inspector/InspectorOverlay.cpp >index 328218f9c2c0362548172ec22ab19c1c9317f18c..a6ac127a77d0460f51994347f50fc3a6e28cd006 100644 >--- a/Source/WebCore/inspector/InspectorOverlay.cpp >+++ b/Source/WebCore/inspector/InspectorOverlay.cpp >@@ -180,7 +180,7 @@ void InspectorOverlay::paint(GraphicsContext& context) > GraphicsContextStateSaver stateSaver(context); > FrameView* view = overlayPage()->mainFrame().view(); > view->updateLayoutAndStyleIfNeededRecursive(); >- view->paint(context, IntRect(0, 0, view->width(), view->height())); >+ view->paint(context, IntRect(0, 0, view->width(), view->height()), m_page.useSystemAppearance(), m_page.defaultAppearance()); > } > > void InspectorOverlay::getHighlight(Highlight& highlight, InspectorOverlay::CoordinateSystem coordinateSystem) const >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index e80df81311561d9dfcc753dc27cf4c481e8a938b..3afeedaf20372e74195e51259c4379c9313e6ead 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -3866,7 +3866,7 @@ void FrameView::updateScrollCorner() > } > } > >-void FrameView::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect) >+void FrameView::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect, bool useSystemAppearance, bool useDefaultAppearance) > { > if (context.updatingControlTints()) { > updateScrollCorner(); >@@ -3880,10 +3880,10 @@ void FrameView::paintScrollCorner(GraphicsContext& context, const IntRect& corne > return; > } > >- ScrollView::paintScrollCorner(context, cornerRect); >+ ScrollView::paintScrollCorner(context, cornerRect, useSystemAppearance, useDefaultAppearance); > } > >-void FrameView::paintScrollbar(GraphicsContext& context, Scrollbar& bar, const IntRect& rect) >+void FrameView::paintScrollbar(GraphicsContext& context, Scrollbar& bar, const IntRect& rect, bool useSystemAppearance, bool useDefaultAppearance) > { > if (bar.isCustomScrollbar() && frame().isMainFrame()) { > IntRect toFill = bar.frameRect(); >@@ -3891,7 +3891,7 @@ void FrameView::paintScrollbar(GraphicsContext& context, Scrollbar& bar, const I > context.fillRect(toFill, baseBackgroundColor()); > } > >- ScrollView::paintScrollbar(context, bar, rect); >+ ScrollView::paintScrollbar(context, bar, rect, useSystemAppearance, useDefaultAppearance); > } > > Color FrameView::documentBackgroundColor() const >@@ -4020,8 +4020,10 @@ void FrameView::paintControlTints() > if (platformWidget()) { > // FIXME: consult paintsEntireContents(). > paintContents(context, visibleContentRect(LegacyIOSDocumentVisibleRect)); >- } else >- paint(context, frameRect()); >+ } else { >+ auto* page = frame().page(); >+ paint(context, frameRect(), page->useSystemAppearance(), page->defaultAppearance()); >+ } > } > > bool FrameView::wasScrolledByUser() const >@@ -4209,7 +4211,8 @@ void FrameView::paintContentsForSnapshot(GraphicsContext& context, const IntRect > else { > // A snapshot in ViewCoordinates will include a scrollbar, and the snapshot will contain > // whatever content the document is currently scrolled to. >- paint(context, imageRect); >+ auto* page = frame().page(); >+ paint(context, imageRect, page->useSystemAppearance(), page->defaultAppearance()); > } > > // Restore selection. >diff --git a/Source/WebCore/page/FrameView.h b/Source/WebCore/page/FrameView.h >index 8f60e7cdb275fbef0876bd10dc7382af634b9bda..070505d21286ca1b09a670c586ec7030a416edfc 100644 >--- a/Source/WebCore/page/FrameView.h >+++ b/Source/WebCore/page/FrameView.h >@@ -375,8 +375,8 @@ public: > WEBCORE_EXPORT void paintContentsForSnapshot(GraphicsContext&, const IntRect& imageRect, SelectionInSnapshot shouldPaintSelection, CoordinateSpaceForSnapshot); > > void paintOverhangAreas(GraphicsContext&, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) final; >- void paintScrollCorner(GraphicsContext&, const IntRect& cornerRect) final; >- void paintScrollbar(GraphicsContext&, Scrollbar&, const IntRect&) final; >+ void paintScrollCorner(GraphicsContext&, const IntRect& cornerRect, bool useSystemAppearance, bool useDefaultAppearance) final; >+ void paintScrollbar(GraphicsContext&, Scrollbar&, const IntRect&, bool useSystemAppearance, bool useDefaultAppearance) final; > > WEBCORE_EXPORT Color documentBackgroundColor() const; > >diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h >index 6b8482ad23e887f7d05561c075cf3b6b8be814b0..a4f2c7bb9a03b2809f101706b7dcf1178f53e63b 100644 >--- a/Source/WebCore/page/Page.h >+++ b/Source/WebCore/page/Page.h >@@ -342,7 +342,7 @@ public: > bool useSystemAppearance() const { return m_useSystemAppearance; } > void setUseSystemAppearance(bool a) { m_useSystemAppearance = a; } > >- bool defaultAppearance() const; >+ WEBCORE_EXPORT bool defaultAppearance() const; > void setDefaultAppearance(bool a) { m_defaultAppearance = a; } > > #if ENABLE(TEXT_AUTOSIZING) >diff --git a/Source/WebCore/platform/ScrollView.cpp b/Source/WebCore/platform/ScrollView.cpp >index 4f53ad7d827f9c455ecbac6bc61e6e3bf489da6c..07f7f212d7044312d54d5c434332ed18c318ced2 100644 >--- a/Source/WebCore/platform/ScrollView.cpp >+++ b/Source/WebCore/platform/ScrollView.cpp >@@ -1120,14 +1120,14 @@ void ScrollView::scrollbarStyleChanged(ScrollbarStyle newStyle, bool forceUpdate > positionScrollbarLayers(); > } > >-void ScrollView::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect) >+void ScrollView::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect, bool useSystemAppearance, bool useDefaultAppearance) > { >- ScrollbarTheme::theme().paintScrollCorner(this, context, cornerRect); >+ ScrollbarTheme::theme().paintScrollCorner(context, cornerRect, useSystemAppearance, useDefaultAppearance); > } > >-void ScrollView::paintScrollbar(GraphicsContext& context, Scrollbar& bar, const IntRect& rect) >+void ScrollView::paintScrollbar(GraphicsContext& context, Scrollbar& bar, const IntRect& rect, bool useSystemAppearance, bool useDefaultAppearance) > { >- bar.paint(context, rect); >+ bar.paint(context, rect, useSystemAppearance, useDefaultAppearance); > } > > void ScrollView::invalidateScrollCornerRect(const IntRect& rect) >@@ -1135,17 +1135,17 @@ void ScrollView::invalidateScrollCornerRect(const IntRect& rect) > invalidateRect(rect); > } > >-void ScrollView::paintScrollbars(GraphicsContext& context, const IntRect& rect) >+void ScrollView::paintScrollbars(GraphicsContext& context, const IntRect& rect, bool useSystemAppearance, bool useDefaultAppearance) > { > if (m_horizontalScrollbar && !layerForHorizontalScrollbar()) >- paintScrollbar(context, *m_horizontalScrollbar.get(), rect); >+ paintScrollbar(context, *m_horizontalScrollbar.get(), rect, useSystemAppearance, useDefaultAppearance); > if (m_verticalScrollbar && !layerForVerticalScrollbar()) >- paintScrollbar(context, *m_verticalScrollbar.get(), rect); >+ paintScrollbar(context, *m_verticalScrollbar.get(), rect, useSystemAppearance, useDefaultAppearance); > > if (layerForScrollCorner()) > return; > >- paintScrollCorner(context, scrollCornerRect()); >+ paintScrollCorner(context, scrollCornerRect(), useSystemAppearance, useDefaultAppearance); > } > > void ScrollView::paintPanScrollIcon(GraphicsContext& context) >@@ -1157,10 +1157,10 @@ void ScrollView::paintPanScrollIcon(GraphicsContext& context) > context.drawImage(panScrollIcon, iconGCPoint); > } > >-void ScrollView::paint(GraphicsContext& context, const IntRect& rect, SecurityOriginPaintPolicy securityOriginPaintPolicy) >+void ScrollView::paint(GraphicsContext& context, const IntRect& rect, bool useSystemAppearance, bool useDefaultAppearance, SecurityOriginPaintPolicy securityOriginPaintPolicy) > { > if (platformWidget()) { >- Widget::paint(context, rect); >+ Widget::paint(context, rect, useSystemAppearance, useDefaultAppearance); > return; > } > >@@ -1209,7 +1209,7 @@ void ScrollView::paint(GraphicsContext& context, const IntRect& rect, SecurityOr > scrollViewDirtyRect.moveBy(-location()); > context.clip(IntRect(IntPoint(), visibleAreaWithScrollbars.size())); > >- paintScrollbars(context, scrollViewDirtyRect); >+ paintScrollbars(context, scrollViewDirtyRect, useSystemAppearance, useDefaultAppearance); > } > > // Paint the panScroll Icon >diff --git a/Source/WebCore/platform/ScrollView.h b/Source/WebCore/platform/ScrollView.h >index e45ad2bbc3733ce4b93f356361c36b955310ffc3..d938701a2c347c92907ce23628336c638bc43831 100644 >--- a/Source/WebCore/platform/ScrollView.h >+++ b/Source/WebCore/platform/ScrollView.h >@@ -342,8 +342,8 @@ public: > } > > // Widget override. Handles painting of the contents of the view as well as the scrollbars. >- WEBCORE_EXPORT void paint(GraphicsContext&, const IntRect&, Widget::SecurityOriginPaintPolicy = SecurityOriginPaintPolicy::AnyOrigin) final; >- void paintScrollbars(GraphicsContext&, const IntRect&); >+ WEBCORE_EXPORT void paint(GraphicsContext&, const IntRect&, bool useSystemAppearance, bool useDefaultAppearance, Widget::SecurityOriginPaintPolicy = SecurityOriginPaintPolicy::AnyOrigin) final; >+ void paintScrollbars(GraphicsContext&, const IntRect&, bool useSystemAppearance, bool useDefaultAppearance); > > // Widget overrides to ensure that our children's visibility status is kept up to date when we get shown and hidden. > WEBCORE_EXPORT void show() override; >@@ -359,8 +359,8 @@ public: > bool isPointInScrollbarCorner(const IntPoint&); > bool scrollbarCornerPresent() const; > IntRect scrollCornerRect() const final; >- virtual void paintScrollCorner(GraphicsContext&, const IntRect& cornerRect); >- virtual void paintScrollbar(GraphicsContext&, Scrollbar&, const IntRect&); >+ virtual void paintScrollCorner(GraphicsContext&, const IntRect& cornerRect, bool useSystemAppearance, bool useDefaultAppearance); >+ virtual void paintScrollbar(GraphicsContext&, Scrollbar&, const IntRect&, bool useSystemAppearance, bool useDefaultAppearance); > > IntRect convertFromScrollbarToContainingView(const Scrollbar&, const IntRect&) const final; > IntRect convertFromContainingViewToScrollbar(const Scrollbar&, const IntRect&) const final; >diff --git a/Source/WebCore/platform/Scrollbar.cpp b/Source/WebCore/platform/Scrollbar.cpp >index 9ee938126ad45508f045f4b599b152dfb1bd8a33..67304280243f45c00003e4641ebc58bff4ecb455 100644 >--- a/Source/WebCore/platform/Scrollbar.cpp >+++ b/Source/WebCore/platform/Scrollbar.cpp >@@ -156,7 +156,7 @@ void Scrollbar::updateThumbProportion() > updateThumb(); > } > >-void Scrollbar::paint(GraphicsContext& context, const IntRect& damageRect, Widget::SecurityOriginPaintPolicy) >+void Scrollbar::paint(GraphicsContext& context, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance, Widget::SecurityOriginPaintPolicy) > { > if (context.updatingControlTints() && theme().supportsControlTints()) { > invalidate(); >@@ -166,8 +166,8 @@ void Scrollbar::paint(GraphicsContext& context, const IntRect& damageRect, Widge > if (context.paintingDisabled() || !frameRect().intersects(damageRect)) > return; > >- if (!theme().paint(*this, context, damageRect)) >- Widget::paint(context, damageRect); >+ if (!theme().paint(*this, context, damageRect, useSystemAppearance, useDefaultAppearance)) >+ Widget::paint(context, damageRect, useSystemAppearance, useDefaultAppearance); > } > > void Scrollbar::autoscrollTimerFired() >diff --git a/Source/WebCore/platform/Scrollbar.h b/Source/WebCore/platform/Scrollbar.h >index 62f5044a8393be64eebbc6475475e8b2e2d72024..8c51b43d5bf43c4e1e2a24162090b9bcdd3b8894 100644 >--- a/Source/WebCore/platform/Scrollbar.h >+++ b/Source/WebCore/platform/Scrollbar.h >@@ -83,7 +83,7 @@ public: > WEBCORE_EXPORT void setProportion(int visibleSize, int totalSize); > void setPressedPos(int p) { m_pressedPos = p; } > >- void paint(GraphicsContext&, const IntRect& damageRect, Widget::SecurityOriginPaintPolicy = SecurityOriginPaintPolicy::AnyOrigin) override; >+ void paint(GraphicsContext&, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance, Widget::SecurityOriginPaintPolicy = SecurityOriginPaintPolicy::AnyOrigin) override; > > bool enabled() const { return m_enabled; } > virtual void setEnabled(bool); >diff --git a/Source/WebCore/platform/ScrollbarTheme.h b/Source/WebCore/platform/ScrollbarTheme.h >index b533d7fd254261b160dddec73831d9610082d33d..49d58920fb0cd34224868a4ef034cb7e72a158b7 100644 >--- a/Source/WebCore/platform/ScrollbarTheme.h >+++ b/Source/WebCore/platform/ScrollbarTheme.h >@@ -48,7 +48,7 @@ public: > > virtual void updateEnabledState(Scrollbar&) { } > >- virtual bool paint(Scrollbar&, GraphicsContext&, const IntRect& /*damageRect*/) { return false; } >+ virtual bool paint(Scrollbar&, GraphicsContext&, const IntRect& /*damageRect*/, bool /*useSystemAppearance*/, bool /*useDefaultAppearance*/) { return false; } > virtual ScrollbarPart hitTest(Scrollbar&, const IntPoint&) { return NoPart; } > > virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar, ScrollbarExpansionState = ScrollbarExpansionState::Expanded) { return 0; } >@@ -84,7 +84,7 @@ public: > > virtual void invalidatePart(Scrollbar&, ScrollbarPart) { } > >- virtual void paintScrollCorner(ScrollView*, GraphicsContext& context, const IntRect& cornerRect) { defaultPaintScrollCorner(context, cornerRect); } >+ virtual void paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect, bool /*useSystemAppearance*/, bool /*useDefaultAppearance*/) { defaultPaintScrollCorner(context, cornerRect); } > static void defaultPaintScrollCorner(GraphicsContext& context, const IntRect& cornerRect) { context.fillRect(cornerRect, Color::white); } > > virtual void paintTickmarks(GraphicsContext&, Scrollbar&, const IntRect&) { } >diff --git a/Source/WebCore/platform/ScrollbarThemeComposite.cpp b/Source/WebCore/platform/ScrollbarThemeComposite.cpp >index 46d9ee672d377f5823dc137ff323b4a359fcd5aa..839ccf95cf077a88a9aec1ac73637b48b2f5b11b 100644 >--- a/Source/WebCore/platform/ScrollbarThemeComposite.cpp >+++ b/Source/WebCore/platform/ScrollbarThemeComposite.cpp >@@ -31,7 +31,7 @@ > > namespace WebCore { > >-bool ScrollbarThemeComposite::paint(Scrollbar& scrollbar, GraphicsContext& graphicsContext, const IntRect& damageRect) >+bool ScrollbarThemeComposite::paint(Scrollbar& scrollbar, GraphicsContext& graphicsContext, const IntRect& damageRect, bool, bool) > { > // Create the ScrollbarControlPartMask based on the damageRect > ScrollbarControlPartMask scrollMask = NoPart; >@@ -260,11 +260,6 @@ int ScrollbarThemeComposite::trackLength(Scrollbar& scrollbar) > return (scrollbar.orientation() == HorizontalScrollbar) ? constrainedTrackRect.width() : constrainedTrackRect.height(); > } > >-void ScrollbarThemeComposite::paintScrollCorner(ScrollView*, GraphicsContext& context, const IntRect& cornerRect) >-{ >- context.fillRect(cornerRect, Color::white); >-} >- > IntRect ScrollbarThemeComposite::thumbRect(Scrollbar& scrollbar) > { > if (!hasThumb(scrollbar)) >diff --git a/Source/WebCore/platform/ScrollbarThemeComposite.h b/Source/WebCore/platform/ScrollbarThemeComposite.h >index 8ea6910281e52011851e008b62345bf2591bb49b..d32f807d1b88a571320cac0937e45a7f32384cd4 100644 >--- a/Source/WebCore/platform/ScrollbarThemeComposite.h >+++ b/Source/WebCore/platform/ScrollbarThemeComposite.h >@@ -37,14 +37,13 @@ namespace WebCore { > class ScrollbarThemeComposite : public ScrollbarTheme { > public: > // Implement ScrollbarTheme interface >- bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect) override; >+ bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance) override; > ScrollbarPart hitTest(Scrollbar&, const IntPoint&) override; > void invalidatePart(Scrollbar&, ScrollbarPart) override; > int thumbPosition(Scrollbar&) override; > int thumbLength(Scrollbar&) override; > int trackPosition(Scrollbar&) override; > int trackLength(Scrollbar&) override; >- void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect) override; > void paintOverhangAreas(ScrollView&, GraphicsContext&, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect) override; > > virtual bool hasButtons(Scrollbar&) = 0; >diff --git a/Source/WebCore/platform/Widget.h b/Source/WebCore/platform/Widget.h >index f31f245a80bbd70acce62118549cd2d400ac21f3..ab6190894493faaddfa7a79c9080b8717fedeefa 100644 >--- a/Source/WebCore/platform/Widget.h >+++ b/Source/WebCore/platform/Widget.h >@@ -113,7 +113,7 @@ public: > > enum class SecurityOriginPaintPolicy { AnyOrigin, AccessibleOriginOnly }; > >- WEBCORE_EXPORT virtual void paint(GraphicsContext&, const IntRect&, SecurityOriginPaintPolicy = SecurityOriginPaintPolicy::AnyOrigin); >+ WEBCORE_EXPORT virtual void paint(GraphicsContext&, const IntRect&, bool useSystemAppearance, bool useDefaultAppearance, SecurityOriginPaintPolicy = SecurityOriginPaintPolicy::AnyOrigin); > void invalidate() { invalidateRect(boundsRect()); } > virtual void invalidateRect(const IntRect&) = 0; > >diff --git a/Source/WebCore/platform/gtk/WidgetGtk.cpp b/Source/WebCore/platform/gtk/WidgetGtk.cpp >index 874129339793ad2e6b3dad9f719fa0605b4520ad..c8a16fe08b2db2ffd9cccbaa39ff26c6333ef4bc 100644 >--- a/Source/WebCore/platform/gtk/WidgetGtk.cpp >+++ b/Source/WebCore/platform/gtk/WidgetGtk.cpp >@@ -80,7 +80,7 @@ void Widget::hide() > gtk_widget_hide(platformWidget()); > } > >-void Widget::paint(GraphicsContext&, const IntRect&, SecurityOriginPaintPolicy) >+void Widget::paint(GraphicsContext&, const IntRect&, bool, bool, SecurityOriginPaintPolicy) > { > } > >diff --git a/Source/WebCore/platform/ios/ScrollbarThemeIOS.h b/Source/WebCore/platform/ios/ScrollbarThemeIOS.h >index 1182c352a2d1f409723a3528dc46fac0967b99f7..59801ee714fd00442520e6ce043a60d3ec54f952 100644 >--- a/Source/WebCore/platform/ios/ScrollbarThemeIOS.h >+++ b/Source/WebCore/platform/ios/ScrollbarThemeIOS.h >@@ -36,7 +36,7 @@ public: > ScrollbarThemeIOS(); > virtual ~ScrollbarThemeIOS(); > >- bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect) override; >+ bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance) override; > > int scrollbarThickness(ScrollbarControlSize = RegularScrollbar, ScrollbarExpansionState = ScrollbarExpansionState::Expanded) override; > >diff --git a/Source/WebCore/platform/ios/ScrollbarThemeIOS.mm b/Source/WebCore/platform/ios/ScrollbarThemeIOS.mm >index a5590f913d65bed30ef2c202c250ad146468854c..a7f92138d8abf4ae338f9dcdc0c7decbed02cfa4 100644 >--- a/Source/WebCore/platform/ios/ScrollbarThemeIOS.mm >+++ b/Source/WebCore/platform/ios/ScrollbarThemeIOS.mm >@@ -113,7 +113,7 @@ int ScrollbarThemeIOS::minimumThumbLength(Scrollbar&) > return 0; > } > >-bool ScrollbarThemeIOS::paint(Scrollbar&, GraphicsContext&, const IntRect& /*damageRect*/) >+bool ScrollbarThemeIOS::paint(Scrollbar&, GraphicsContext&, bool, bool, const IntRect& /*damageRect*/) > { > return true; > } >diff --git a/Source/WebCore/platform/mac/ScrollbarThemeMac.h b/Source/WebCore/platform/mac/ScrollbarThemeMac.h >index 10be37675ce3cefd2b691de4413b97324c5e6d62..456f29f66ca72f845c52a931de6fef6158f3eb64 100644 >--- a/Source/WebCore/platform/mac/ScrollbarThemeMac.h >+++ b/Source/WebCore/platform/mac/ScrollbarThemeMac.h >@@ -40,7 +40,8 @@ public: > > void updateEnabledState(Scrollbar&) override; > >- bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect) override; >+ bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance) override; >+ void paintScrollCorner(GraphicsContext&, const IntRect&, bool useSystemAppearance, bool useDefaultAppearance) override; > > int scrollbarThickness(ScrollbarControlSize = RegularScrollbar, ScrollbarExpansionState = ScrollbarExpansionState::Expanded) override; > >diff --git a/Source/WebCore/platform/mac/ScrollbarThemeMac.mm b/Source/WebCore/platform/mac/ScrollbarThemeMac.mm >index 5c2ca3ad6b3298db6364d2d1c6af9be59c22c256..c9e7d316f1983ee120083807e658dd559b94d23d 100644 >--- a/Source/WebCore/platform/mac/ScrollbarThemeMac.mm >+++ b/Source/WebCore/platform/mac/ScrollbarThemeMac.mm >@@ -32,12 +32,15 @@ > #import "GraphicsLayer.h" > #import "ImageBuffer.h" > #import "LocalCurrentGraphicsContext.h" >+#import "LocalDefaultSystemAppearance.h" > #import "NSScrollerImpDetails.h" > #import "PlatformMouseEvent.h" > #import "ScrollAnimatorMac.h" > #import "ScrollView.h" > #import <Carbon/Carbon.h> > #import <pal/spi/cg/CoreGraphicsSPI.h> >+#import <pal/spi/mac/CoreUISPI.h> >+#import <pal/spi/mac/NSAppearanceSPI.h> > #import <pal/spi/mac/NSScrollerImpSPI.h> > #import <wtf/BlockObjCExceptions.h> > #import <wtf/HashMap.h> >@@ -546,15 +549,17 @@ static void scrollerImpPaint(NSScrollerImp *scrollerImp, bool enabled) > END_BLOCK_OBJC_EXCEPTIONS; > } > >-bool ScrollbarThemeMac::paint(Scrollbar& scrollbar, GraphicsContext& context, const IntRect& damageRect) >+bool ScrollbarThemeMac::paint(Scrollbar& scrollbar, GraphicsContext& context, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance) > { >+ LocalDefaultSystemAppearance localAppearance(useSystemAppearance, useDefaultAppearance); >+ > setPaintCharacteristicsForScrollbar(scrollbar); > > if (scrollbar.supportsUpdateOnSecondaryThread()) > return true; > > SetForScope<bool> isCurrentlyDrawingIntoLayer(g_isCurrentlyDrawingIntoLayer, context.isCALayerContext()); >- >+ > GraphicsContextStateSaver stateSaver(context); > context.clip(damageRect); > context.translate(scrollbar.frameRect().location()); >@@ -564,6 +569,19 @@ bool ScrollbarThemeMac::paint(Scrollbar& scrollbar, GraphicsContext& context, co > return true; > } > >+void ScrollbarThemeMac::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect, bool useSystemAppearance, bool useDefaultAppearance) >+{ >+ auto cornerDrawingOptions = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); >+ >+ CFDictionarySetValue(cornerDrawingOptions.get(), kCUIWidgetKey, kCUIWidgetScrollBarTrackCorner); >+ CFDictionarySetValue(cornerDrawingOptions.get(), kCUIIsFlippedKey, kCFBooleanTrue); >+ >+ LocalDefaultSystemAppearance localAppearance(useSystemAppearance, useDefaultAppearance); >+ LocalCurrentGraphicsContext localContext(context); >+ >+ [[NSAppearance currentAppearance] _drawInRect:cornerRect context:localContext.cgContext() options:(__bridge NSDictionary *)cornerDrawingOptions.get()]; >+} >+ > #if ENABLE(RUBBER_BANDING) > static RetainPtr<CGColorRef> linenBackgroundColor() > { >diff --git a/Source/WebCore/platform/mac/WidgetMac.mm b/Source/WebCore/platform/mac/WidgetMac.mm >index 996c19d550f9131fa02360b657f88be9f9e666bb..1c47575da864ee5474fc27d649e00b6eeadfef14 100644 >--- a/Source/WebCore/platform/mac/WidgetMac.mm >+++ b/Source/WebCore/platform/mac/WidgetMac.mm >@@ -186,7 +186,7 @@ NSView *Widget::getOuterView() const > return view; > } > >-void Widget::paint(GraphicsContext& p, const IntRect& r, SecurityOriginPaintPolicy) >+void Widget::paint(GraphicsContext& p, const IntRect& r, bool, bool, SecurityOriginPaintPolicy) > { > if (p.paintingDisabled()) > return; >diff --git a/Source/WebCore/platform/win/WidgetWin.cpp b/Source/WebCore/platform/win/WidgetWin.cpp >index 8bdc023a43766d45f3c1a9fca8ce093ef935d7b9..a77a6ee174076b6638d9a6e6b6b92bc3e59849cd 100644 >--- a/Source/WebCore/platform/win/WidgetWin.cpp >+++ b/Source/WebCore/platform/win/WidgetWin.cpp >@@ -75,7 +75,7 @@ void Widget::setCursor(const Cursor& cursor) > view->hostWindow()->setCursor(cursor); > } > >-void Widget::paint(GraphicsContext&, const IntRect&, SecurityOriginPaintPolicy) >+void Widget::paint(GraphicsContext&, const IntRect&, bool, bool, SecurityOriginPaintPolicy) > { > } > >diff --git a/Source/WebCore/platform/wpe/WidgetWPE.cpp b/Source/WebCore/platform/wpe/WidgetWPE.cpp >index 5f66330c523987a670850004b3989ccac640fb5d..ef24d96a79e09492bbad5c23590d9b9ca7495457 100644 >--- a/Source/WebCore/platform/wpe/WidgetWPE.cpp >+++ b/Source/WebCore/platform/wpe/WidgetWPE.cpp >@@ -52,7 +52,7 @@ IntRect Widget::frameRect() const > return m_frame; > } > >-void Widget::paint(GraphicsContext&, const IntRect&, SecurityOriginPaintPolicy) >+void Widget::paint(GraphicsContext&, const IntRect&, bool, bool, SecurityOriginPaintPolicy) > { > notImplemented(); > } >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index e107e44b7673b7bf5856895413e00da2a508dd88..04acc6e168f3e427227f54cd42e135cb10fd6515 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -3678,9 +3678,9 @@ void RenderLayer::paintOverflowControls(GraphicsContext& context, const IntPoint > > // Now that we're sure the scrollbars are in the right place, paint them. > if (m_hBar && !layerForHorizontalScrollbar()) >- m_hBar->paint(context, damageRect); >+ m_hBar->paint(context, damageRect, page().useSystemAppearance(), page().defaultAppearance()); > if (m_vBar && !layerForVerticalScrollbar()) >- m_vBar->paint(context, damageRect); >+ m_vBar->paint(context, damageRect, page().useSystemAppearance(), page().defaultAppearance()); > > if (layerForScrollCorner()) > return; >@@ -3710,10 +3710,10 @@ void RenderLayer::paintScrollCorner(GraphicsContext& context, const IntPoint& pa > return; > } > >- // We don't want to paint white if we have overlay scrollbars, since we need >+ // We don't want to paint a corner if we have overlay scrollbars, since we need > // to see what is behind it. > if (!hasOverlayScrollbars()) >- context.fillRect(absRect, Color::white); >+ ScrollbarTheme::theme().paintScrollCorner(context, absRect, page().useSystemAppearance(), page().defaultAppearance()); > } > > void RenderLayer::drawPlatformResizerImage(GraphicsContext& context, const LayoutRect& resizerCornerRect) >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index db39ab83e4ae4bcd03f346e7cf9adbcfa15eca47..21295075302b9a90f034bc97f24bb91c43bcd980 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -2611,9 +2611,9 @@ void RenderLayerBacking::paintContents(const GraphicsLayer* graphicsLayer, Graph > > InspectorInstrumentation::didPaint(renderer(), dirtyRect); > } else if (graphicsLayer == layerForHorizontalScrollbar()) { >- paintScrollbar(m_owningLayer.horizontalScrollbar(), context, dirtyRect); >+ paintScrollbar(m_owningLayer.horizontalScrollbar(), context, dirtyRect, renderer().page().useSystemAppearance(), renderer().page().defaultAppearance()); > } else if (graphicsLayer == layerForVerticalScrollbar()) { >- paintScrollbar(m_owningLayer.verticalScrollbar(), context, dirtyRect); >+ paintScrollbar(m_owningLayer.verticalScrollbar(), context, dirtyRect, renderer().page().useSystemAppearance(), renderer().page().defaultAppearance()); > } else if (graphicsLayer == layerForScrollCorner()) { > const LayoutRect& scrollCornerAndResizer = m_owningLayer.scrollCornerAndResizerRect(); > context.save(); >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index b5511103884849940f290b03a5d37587cfd81a90..7417001b24c75cb489d3e5e67d7124c432c21445 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -2750,7 +2750,7 @@ bool RenderLayerCompositor::requiresScrollLayer(RootLayerAttachment attachment) > || attachment == RootLayerAttachedViaEnclosingFrame; // a composited frame on Mac > } > >-void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRect& clip) >+void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRect& clip, bool useSystemAppearance, bool useDefaultAppearance) > { > if (!scrollbar) > return; >@@ -2760,7 +2760,7 @@ void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const IntRec > context.translate(-scrollbarRect.location()); > IntRect transformedClip = clip; > transformedClip.moveBy(scrollbarRect.location()); >- scrollbar->paint(context, transformedClip); >+ scrollbar->paint(context, transformedClip, useSystemAppearance, useDefaultAppearance); > context.restore(); > } > >@@ -2768,16 +2768,16 @@ void RenderLayerCompositor::paintContents(const GraphicsLayer* graphicsLayer, Gr > { > IntRect pixelSnappedRectForIntegralPositionedItems = snappedIntRect(LayoutRect(clip)); > if (graphicsLayer == layerForHorizontalScrollbar()) >- paintScrollbar(m_renderView.frameView().horizontalScrollbar(), context, pixelSnappedRectForIntegralPositionedItems); >+ paintScrollbar(m_renderView.frameView().horizontalScrollbar(), context, pixelSnappedRectForIntegralPositionedItems, page().useSystemAppearance(), page().defaultAppearance()); > else if (graphicsLayer == layerForVerticalScrollbar()) >- paintScrollbar(m_renderView.frameView().verticalScrollbar(), context, pixelSnappedRectForIntegralPositionedItems); >+ paintScrollbar(m_renderView.frameView().verticalScrollbar(), context, pixelSnappedRectForIntegralPositionedItems, page().useSystemAppearance(), page().defaultAppearance()); > else if (graphicsLayer == layerForScrollCorner()) { > const IntRect& scrollCorner = m_renderView.frameView().scrollCornerRect(); > context.save(); > context.translate(-scrollCorner.location()); > IntRect transformedClip = pixelSnappedRectForIntegralPositionedItems; > transformedClip.moveBy(scrollCorner.location()); >- m_renderView.frameView().paintScrollCorner(context, transformedClip); >+ m_renderView.frameView().paintScrollCorner(context, transformedClip, page().useSystemAppearance(), page().defaultAppearance()); > context.restore(); > } > } >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.h b/Source/WebCore/rendering/RenderLayerCompositor.h >index 5f554b62555112a0d391d0dbc934390e166f68e4..bf605b4413450932b84142a62aadb98ae241edca 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.h >+++ b/Source/WebCore/rendering/RenderLayerCompositor.h >@@ -566,7 +566,7 @@ private: > HashMap<ScrollingNodeID, RenderLayer*> m_scrollingNodeToLayerMap; > }; > >-void paintScrollbar(Scrollbar*, GraphicsContext&, const IntRect& clip); >+void paintScrollbar(Scrollbar*, GraphicsContext&, const IntRect& clip, bool useSystemAppearance, bool useDefaultAppearance); > > WTF::TextStream& operator<<(WTF::TextStream&, CompositingUpdateType); > >diff --git a/Source/WebCore/rendering/RenderListBox.cpp b/Source/WebCore/rendering/RenderListBox.cpp >index 4a312028637b7107fb4b0ba755f30cdb292bfd67..b4b0fc66d1ce41fd324a07aaa3f86fd45480d100 100644 >--- a/Source/WebCore/rendering/RenderListBox.cpp >+++ b/Source/WebCore/rendering/RenderListBox.cpp >@@ -381,7 +381,7 @@ void RenderListBox::paintScrollbar(PaintInfo& paintInfo, const LayoutPoint& pain > LayoutUnit height = this->height() - (borderTop() + borderBottom()); > IntRect scrollRect = snappedIntRect(left, top, width, height); > m_vBar->setFrameRect(scrollRect); >- m_vBar->paint(paintInfo.context(), snappedIntRect(paintInfo.rect)); >+ m_vBar->paint(paintInfo.context(), snappedIntRect(paintInfo.rect), page().useSystemAppearance(), page().defaultAppearance()); > } > > static LayoutSize itemOffsetForAlignment(TextRun textRun, const RenderStyle* itemStyle, FontCascade itemFont, LayoutRect itemBoudingBox) >diff --git a/Source/WebCore/rendering/RenderScrollbar.cpp b/Source/WebCore/rendering/RenderScrollbar.cpp >index f954a961c8146702c1d8dc4a80735e47da453339..9e3e7c5690b3f2c35b6d065e606259fc2b73cc67 100644 >--- a/Source/WebCore/rendering/RenderScrollbar.cpp >+++ b/Source/WebCore/rendering/RenderScrollbar.cpp >@@ -100,13 +100,13 @@ void RenderScrollbar::styleChanged() > updateScrollbarParts(); > } > >-void RenderScrollbar::paint(GraphicsContext& context, const IntRect& damageRect, Widget::SecurityOriginPaintPolicy) >+void RenderScrollbar::paint(GraphicsContext& context, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance, Widget::SecurityOriginPaintPolicy) > { > if (context.updatingControlTints()) { > updateScrollbarParts(); > return; > } >- Scrollbar::paint(context, damageRect); >+ Scrollbar::paint(context, damageRect, useSystemAppearance, useDefaultAppearance); > } > > void RenderScrollbar::setHoveredPart(ScrollbarPart part) >diff --git a/Source/WebCore/rendering/RenderScrollbar.h b/Source/WebCore/rendering/RenderScrollbar.h >index 176fcca8687fe91c6c74b9d9e34caf448eead312..30be876b17e248feea47564f6861fb7f03ec5b63 100644 >--- a/Source/WebCore/rendering/RenderScrollbar.h >+++ b/Source/WebCore/rendering/RenderScrollbar.h >@@ -66,7 +66,7 @@ private: > void setParent(ScrollView*) override; > void setEnabled(bool) override; > >- void paint(GraphicsContext&, const IntRect& damageRect, Widget::SecurityOriginPaintPolicy) override; >+ void paint(GraphicsContext&, const IntRect& damageRect, bool useSystemAppearance, bool useDefaultAppearance, Widget::SecurityOriginPaintPolicy) override; > > void setHoveredPart(ScrollbarPart) override; > void setPressedPart(ScrollbarPart) override; >diff --git a/Source/WebCore/rendering/RenderScrollbarTheme.cpp b/Source/WebCore/rendering/RenderScrollbarTheme.cpp >index 1692ddcaeb7e62362a1d3fc04c189b4460bc6fa4..9eb4cf82b8cf56f6486bb19a5b88522e9223fe51 100644 >--- a/Source/WebCore/rendering/RenderScrollbarTheme.cpp >+++ b/Source/WebCore/rendering/RenderScrollbarTheme.cpp >@@ -126,10 +126,9 @@ void RenderScrollbarTheme::didPaintScrollbar(GraphicsContext& context, Scrollbar > } > } > >-void RenderScrollbarTheme::paintScrollCorner(ScrollView*, GraphicsContext& context, const IntRect& cornerRect) >+void RenderScrollbarTheme::paintScrollCorner(GraphicsContext& context, const IntRect& cornerRect, bool useSystemAppearanc, bool defaultAppearance) > { >- // FIXME: Implement. >- context.fillRect(cornerRect, Color::white); >+ ScrollbarTheme::theme().paintScrollCorner(context, cornerRect, useSystemAppearanc, defaultAppearance); > } > > void RenderScrollbarTheme::paintScrollbarBackground(GraphicsContext& context, Scrollbar& scrollbar) >diff --git a/Source/WebCore/rendering/RenderScrollbarTheme.h b/Source/WebCore/rendering/RenderScrollbarTheme.h >index 6ed98a20b0d2713d783c1c3b341fc4d88c9673bd..048cf6460c53e883ef11999c89af2cb126a3ac91 100644 >--- a/Source/WebCore/rendering/RenderScrollbarTheme.h >+++ b/Source/WebCore/rendering/RenderScrollbarTheme.h >@@ -43,7 +43,7 @@ public: > > bool supportsControlTints() const override { return true; } > >- void paintScrollCorner(ScrollView*, GraphicsContext&, const IntRect& cornerRect) override; >+ void paintScrollCorner(GraphicsContext&, const IntRect& cornerRect, bool useSystemAppearance, bool useDefaultAppearance) override; > > ScrollbarButtonPressAction handleMousePressEvent(Scrollbar& scrollbar, const PlatformMouseEvent& event, ScrollbarPart pressedPart) override { return ScrollbarTheme::theme().handleMousePressEvent(scrollbar, event, pressedPart); } > >diff --git a/Source/WebCore/rendering/RenderWidget.cpp b/Source/WebCore/rendering/RenderWidget.cpp >index ae5fe5f5e73700e3d11dc03c09f51a2d1586c4c6..4a7c03c3cb78233e0ac333e85344c1243e0bc633 100644 >--- a/Source/WebCore/rendering/RenderWidget.cpp >+++ b/Source/WebCore/rendering/RenderWidget.cpp >@@ -247,7 +247,7 @@ void RenderWidget::paintContents(PaintInfo& paintInfo, const LayoutPoint& paintO > paintRect.move(-widgetPaintOffset); > } > // FIXME: Remove repaintrect enclosing/integral snapping when RenderWidget becomes device pixel snapped. >- m_widget->paint(paintInfo.context(), snappedIntRect(paintRect), paintInfo.requireSecurityOriginAccessForWidgets ? Widget::SecurityOriginPaintPolicy::AccessibleOriginOnly : Widget::SecurityOriginPaintPolicy::AnyOrigin); >+ m_widget->paint(paintInfo.context(), snappedIntRect(paintRect), page().useSystemAppearance(), page().defaultAppearance(), paintInfo.requireSecurityOriginAccessForWidgets ? Widget::SecurityOriginPaintPolicy::AccessibleOriginOnly : Widget::SecurityOriginPaintPolicy::AnyOrigin); > > if (!widgetPaintOffset.isZero()) > paintInfo.context().translate(-widgetPaintOffset); >diff --git a/Source/WebCore/svg/graphics/SVGImage.cpp b/Source/WebCore/svg/graphics/SVGImage.cpp >index 58c25c66c88b574f991e46bc3aa2d4d153c572c0..494176e5ae648ee982fdce49eeb05547b7c7bb1a 100644 >--- a/Source/WebCore/svg/graphics/SVGImage.cpp >+++ b/Source/WebCore/svg/graphics/SVGImage.cpp >@@ -319,7 +319,7 @@ ImageDrawResult SVGImage::draw(GraphicsContext& context, const FloatRect& dstRec > view->layoutContext().layout(); > } > >- view->paint(context, intersection(context.clipBounds(), enclosingIntRect(srcRect))); >+ view->paint(context, intersection(context.clipBounds(), enclosingIntRect(srcRect)), m_page->useSystemAppearance(), m_page->defaultAppearance()); > > if (compositingRequiresTransparencyLayer) > context.endTransparencyLayer(); >diff --git a/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp b/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp >index 7bd6a42e744506e4a5227e8c39990d85b25a9829..b9b834b73da41001c2cf401235a0fdd4bbcd3ef6 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp >@@ -152,7 +152,7 @@ RefPtr<WebImage> InjectedBundleRangeHandle::renderedImage(SnapshotOptions option > frameView->setPaintBehavior(paintBehavior); > ownerDocument.updateLayout(); > >- frameView->paint(*graphicsContext, paintRect); >+ frameView->paint(*graphicsContext, paintRect, frame->page()->useSystemAppearance(), frame->page()->defaultAppearance()); > frameView->setPaintBehavior(oldPaintBehavior); > > frame->selection().setSelection(oldSelection); >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >index 203db1a4740f733cf518c7b69c1b57ac57f5732b..f25e97c8cd678d9db98a55cfe9c496f5ac847e8f 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm >@@ -1211,18 +1211,20 @@ void PDFPlugin::paintControlForLayerInContext(CALayer *layer, CGContextRef conte > { > GraphicsContext graphicsContext(context); > GraphicsContextStateSaver stateSaver(graphicsContext); >- >+ > graphicsContext.setIsCALayerContext(true); >- >+ >+ auto* page = webFrame()->coreFrame()->page(); >+ > if (layer == m_scrollCornerLayer) { > IntRect scrollCornerRect = this->scrollCornerRect(); > graphicsContext.translate(-scrollCornerRect.x(), -scrollCornerRect.y()); >- ScrollbarTheme::theme().paintScrollCorner(nullptr, graphicsContext, scrollCornerRect); >+ ScrollbarTheme::theme().paintScrollCorner(graphicsContext, scrollCornerRect, page->useSystemAppearance(), page->defaultAppearance()); > return; > } >- >+ > Scrollbar* scrollbar = nullptr; >- >+ > if (layer == m_verticalScrollbarLayer) > scrollbar = verticalScrollbar(); > else if (layer == m_horizontalScrollbarLayer) >@@ -1230,9 +1232,9 @@ void PDFPlugin::paintControlForLayerInContext(CALayer *layer, CGContextRef conte > > if (!scrollbar) > return; >- >+ > graphicsContext.translate(-scrollbar->x(), -scrollbar->y()); >- scrollbar->paint(graphicsContext, scrollbar->frameRect()); >+ scrollbar->paint(graphicsContext, scrollbar->frameRect(), page->useSystemAppearance(), page->defaultAppearance()); > } > > RefPtr<ShareableBitmap> PDFPlugin::snapshot() >diff --git a/Source/WebKit/WebProcess/Plugins/PluginView.cpp b/Source/WebKit/WebProcess/Plugins/PluginView.cpp >index 90e0109e966079116cdbafb468832d87c251ca75..7a0ebc972003023c0240a05587ce82e1e3fa6fcc 100644 >--- a/Source/WebKit/WebProcess/Plugins/PluginView.cpp >+++ b/Source/WebKit/WebProcess/Plugins/PluginView.cpp >@@ -782,7 +782,7 @@ void PluginView::setFrameRect(const WebCore::IntRect& rect) > viewGeometryDidChange(); > } > >-void PluginView::paint(GraphicsContext& context, const IntRect& /*dirtyRect*/, Widget::SecurityOriginPaintPolicy) >+void PluginView::paint(GraphicsContext& context, const IntRect& /*dirtyRect*/, bool, bool, Widget::SecurityOriginPaintPolicy) > { > if (!m_plugin || !m_isInitialized || m_pluginElement->displayState() < HTMLPlugInElement::Restarting) > return; >diff --git a/Source/WebKit/WebProcess/Plugins/PluginView.h b/Source/WebKit/WebProcess/Plugins/PluginView.h >index 58960ca120545673bf51fb4d83588c4a6dddd935..2bac658dda3e6c68c0f1851b4526c46815c10d22 100644 >--- a/Source/WebKit/WebProcess/Plugins/PluginView.h >+++ b/Source/WebKit/WebProcess/Plugins/PluginView.h >@@ -173,7 +173,7 @@ private: > > // WebCore::Widget > void setFrameRect(const WebCore::IntRect&) override; >- void paint(WebCore::GraphicsContext&, const WebCore::IntRect&, WebCore::Widget::SecurityOriginPaintPolicy) override; >+ void paint(WebCore::GraphicsContext&, const WebCore::IntRect&, bool useSystemAppearance, bool useDefaultAppearance, WebCore::Widget::SecurityOriginPaintPolicy) override; > void invalidateRect(const WebCore::IntRect&) override; > void setFocus(bool) override; > void frameRectsChanged() override; >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 43bd0c08708042f4505165744b85446d886e6ee7..6d23fab5b4a407f670a224252badf42933d2d067 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -1520,7 +1520,8 @@ void WebPage::drawRect(GraphicsContext& graphicsContext, const IntRect& rect) > GraphicsContextStateSaver stateSaver(graphicsContext); > graphicsContext.clip(rect); > >- m_mainFrame->coreFrame()->view()->paint(graphicsContext, rect); >+ auto* page = m_mainFrame->coreFrame()->page(); >+ m_mainFrame->coreFrame()->view()->paint(graphicsContext, rect, page->useSystemAppearance(), page->defaultAppearance()); > } > > double WebPage::textZoomFactor() const >diff --git a/Source/WebKitLegacy/mac/WebView/WebFrame.mm b/Source/WebKitLegacy/mac/WebView/WebFrame.mm >index 7b47e52e4b1aa0122c234661c9967cf1b0bad9b2..cffafefabb5e1511ed04792515f3482d41aa3344 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebFrame.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebFrame.mm >@@ -664,8 +664,10 @@ - (void)_drawRect:(NSRect)rect contentsOnly:(BOOL)contentsOnly > > if (contentsOnly) > view->paintContents(context, enclosingIntRect(rect)); >- else >- view->paint(context, enclosingIntRect(rect)); >+ else { >+ auto* page = core(self)->page(); >+ view->paint(context, enclosingIntRect(rect), page->useSystemAppearance(), page->defaultAppearance()); >+ } > > view->setPaintBehavior(oldBehavior); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186819
:
343098
|
343104
|
343105
|
343112
|
343172
|
343177
|
343184
|
343336
|
343387
|
343393
|
343394
|
343404