WebKit Bugzilla
Attachment 362551 Details for
Bug 194875
: [Win] Guard CF usage in RenderThemeWin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194875.diff (text/plain), 3.61 KB, created by
Don Olmstead
on 2019-02-20 15:08:36 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Don Olmstead
Created:
2019-02-20 15:08:36 PST
Size:
3.61 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 24a9da37dfa..e6a00788370 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-02-20 Don Olmstead <don.olmstead@sony.com> >+ >+ [Win] Guard CF usage in RenderThemeWin >+ https://bugs.webkit.org/show_bug.cgi?id=194875 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests. No change in behavior. >+ >+ Add #if USE(CF) checks to RenderThemeWin so it can compile without CF support. >+ >+ * rendering/RenderThemeWin.cpp: >+ (WebCore::RenderThemeWin::stringWithContentsOfFile): >+ (WebCore::RenderThemeWin::mediaControlsStyleSheet): >+ (WebCore::RenderThemeWin::mediaControlsScript): >+ * rendering/RenderThemeWin.h: >+ > 2019-02-20 Adrian Perez de Castro <aperez@igalia.com> > > [WPE][GTK] Enable support for CONTENT_EXTENSIONS >diff --git a/Source/WebCore/rendering/RenderThemeWin.cpp b/Source/WebCore/rendering/RenderThemeWin.cpp >index 219657e1f24..6e4138164be 100644 >--- a/Source/WebCore/rendering/RenderThemeWin.cpp >+++ b/Source/WebCore/rendering/RenderThemeWin.cpp >@@ -1048,9 +1048,10 @@ static void fillBufferWithContentsOfFile(FileSystem::PlatformFileHandle file, lo > buffer[filesize] = 0; > } > >-String RenderThemeWin::stringWithContentsOfFile(CFStringRef name, CFStringRef type) >+String RenderThemeWin::stringWithContentsOfFile(const String& name, const String& type) > { >- RetainPtr<CFURLRef> requestedURLRef = adoptCF(CFBundleCopyResourceURL(webKitBundle(), name, type, 0)); >+#if USE(CF) >+ RetainPtr<CFURLRef> requestedURLRef = adoptCF(CFBundleCopyResourceURL(webKitBundle(), name.createCFString().get(), type.createCFString().get(), 0)); > if (!requestedURLRef) > return String(); > >@@ -1073,13 +1074,16 @@ String RenderThemeWin::stringWithContentsOfFile(CFStringRef name, CFStringRef ty > FileSystem::closeFile(requestedFileHandle); > > return String(fileContents.data(), static_cast<size_t>(filesize)); >+#else >+ return emptyString(); >+#endif > } > > String RenderThemeWin::mediaControlsStyleSheet() > { > #if ENABLE(MEDIA_CONTROLS_SCRIPT) > if (m_mediaControlsStyleSheet.isEmpty()) >- m_mediaControlsStyleSheet = stringWithContentsOfFile(CFSTR("mediaControlsApple"), CFSTR("css")); >+ m_mediaControlsStyleSheet = stringWithContentsOfFile("mediaControlsApple"_s, "css"_s); > return m_mediaControlsStyleSheet; > #else > return emptyString(); >@@ -1091,8 +1095,8 @@ String RenderThemeWin::mediaControlsScript() > #if ENABLE(MEDIA_CONTROLS_SCRIPT) > if (m_mediaControlsScript.isEmpty()) { > StringBuilder scriptBuilder; >- scriptBuilder.append(stringWithContentsOfFile(CFSTR("mediaControlsLocalizedStrings"), CFSTR("js"))); >- scriptBuilder.append(stringWithContentsOfFile(CFSTR("mediaControlsApple"), CFSTR("js"))); >+ scriptBuilder.append(stringWithContentsOfFile("mediaControlsLocalizedStrings"_s, "js"_s)); >+ scriptBuilder.append(stringWithContentsOfFile("mediaControlsApple"_s, "js"_s)); > m_mediaControlsScript = scriptBuilder.toString(); > } > return m_mediaControlsScript; >diff --git a/Source/WebCore/rendering/RenderThemeWin.h b/Source/WebCore/rendering/RenderThemeWin.h >index fee24b6d948..8280f91b004 100644 >--- a/Source/WebCore/rendering/RenderThemeWin.h >+++ b/Source/WebCore/rendering/RenderThemeWin.h >@@ -115,7 +115,7 @@ public: > > static void setWebKitIsBeingUnloaded(); > >- static String stringWithContentsOfFile(CFStringRef name, CFStringRef type); >+ static String stringWithContentsOfFile(const String& name, const String& type); > > bool supportsFocusRing(const RenderStyle&) const override; >
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 194875
: 362551