WebKit Bugzilla
Attachment 343208 Details for
Bug 186875
: [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186875-20180620202823.patch (text/plain), 21.10 KB, created by
Darin Adler
on 2018-06-20 20:28:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2018-06-20 20:28:24 PDT
Size:
21.10 KB
patch
obsolete
>Subversion Revision: 233029 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 8c24d92d0b122089d5f39b827e291f492a12b21d..ad5b6511f986c7a80f58525b5e44362b2760e0d4 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,13 @@ >+2018-06-20 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity >+ https://bugs.webkit.org/show_bug.cgi?id=186875 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * API/tests/testapi.mm: >+ (testObjectiveCAPIMain): Use isDirectory:NO when creating a URL for a JavaScript file. >+ > 2018-06-20 Keith Miller <keith_miller@apple.com> > > Expand concurrent GC assertion to accept JSValue() or 0 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6b71bfb2a8b40c967830b01885d1f2a5a7b51ad8..22b8ee05a36d8263ce5c90d20a4ab1dd9d6e9c38 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-20 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity >+ https://bugs.webkit.org/show_bug.cgi?id=186875 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/cocoa/ThemeCocoa.mm: >+ (WebCore::passKitBundle): Use isDirectory:YES when creating a URL pointing to a framework, >+ since frameworks are directories. >+ > 2018-06-20 David Kilzer <ddkilzer@apple.com> > > Fix leaks in WebCore found by clang static analyzer in deep mode >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 78aa1c12b37851fd402e7ba89c0cf9676fc438c9..815205caa258c71e71f64bf2f8e365fe7e2b131d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,38 @@ >+2018-06-20 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity >+ https://bugs.webkit.org/show_bug.cgi?id=186875 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm: >+ (API::WebsiteDataStore::tempDirectoryFileSystemRepresentation): Use isDirectory:YES to create a URL >+ to the temporary directory. >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination): Use isDirectory:NO to create a URL >+ pointing to the write location. >+ * UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm: >+ (WebKit::LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup const): Use isDirectory:YES to >+ create a URL for the local storage directory. >+ * UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm: >+ (WebKit::ResourceLoadStatisticsPersistentStorage::excludeFromBackup const): Use isDirectory:NO to >+ create a URL for the storage directory. >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView _prepareToDragPromisedBlob:]): Use isDirectory:NO to create a URL for the temporary >+ file location. >+ * UIProcess/ios/forms/WKFileUploadPanel.mm: >+ (-[WKFileUploadPanel _uploadItemForImageData:imageName:successBlock:failureBlock:]): Use isDirectory:NO >+ to create a URL for the image file to upload. >+ * UIProcess/mac/WebInspectorProxyMac.mm: >+ (WebKit::WebInspectorProxy::inspectorPageURL): Use isDirectory:NO to create a URL for the HTML file. >+ (WebKit::WebInspectorProxy::inspectorTestPageURL): Ditto. >+ (WebKit::WebInspectorProxy::inspectorBaseURL): Ditto. >+ * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: >+ (WebKit::WebChromeClient::createIconForFiles): Use isDirectory:NO to create a URL for the image file. >+ * WebProcess/WebPage/mac/WebInspectorUIMac.mm: >+ (WebKit::webInspectorUILocalizedStringsURL): Use isDirectory:NO to create a URL for the localized >+ strings file. >+ > 2018-06-20 Wenson Hsieh <wenson_hsieh@apple.com> > > [WebKit on watchOS] Fixed position elements sometimes flicker when scrolling >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index bf9618b5d4c142cbf585982f3d94c944d2f18554..6479254258f25f4bcbf37c0c12b4eded74b5d8f9 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,18 @@ >+2018-06-20 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity >+ https://bugs.webkit.org/show_bug.cgi?id=186875 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebHTMLView.mm: >+ (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use isDirectory:NO for the URL of the location >+ to write te file to. >+ * WebView/WebPreferences.mm: >+ (-[WebPreferences userStyleSheetLocation]): Use isDirectory:NO to create a URL for the user style sheet. >+ * WebView/WebView.mm: >+ (-[WebView setMainFrameURL:]): Use isDirectory:NO to create a URL for a local webpage to load. >+ > 2018-06-12 Darin Adler <darin@apple.com> > > [Cocoa] Make some RetainPtr refinements to get more ready for ARC >diff --git a/Source/JavaScriptCore/API/tests/testapi.mm b/Source/JavaScriptCore/API/tests/testapi.mm >index d7cc2656831bf54412e4d8779af53a349e2a093f..75f0b55bef429f4e24fc65d881bf37413c7554f6 100644 >--- a/Source/JavaScriptCore/API/tests/testapi.mm >+++ b/Source/JavaScriptCore/API/tests/testapi.mm >@@ -706,7 +706,7 @@ static void testObjectiveCAPIMain() > context.exceptionHandler = ^(JSContext *, JSValue *exception) { > exceptionSourceURL = [exception[@"sourceURL"] toString]; > }; >- NSURL *url = [NSURL fileURLWithPath:@"/foo/bar.js"]; >+ NSURL *url = [NSURL fileURLWithPath:@"/foo/bar.js" isDirectory:NO]; > [context evaluateScript:@"!@#$%^&*() THIS IS NOT VALID JAVASCRIPT SYNTAX !@#$%^&*()" withSourceURL:url]; > checkResult(@"evaluateScript:withSourceURL: exception has expected sourceURL", [exceptionSourceURL isEqualToString:[url absoluteString]]); > } >diff --git a/Source/WebCore/platform/cocoa/ThemeCocoa.mm b/Source/WebCore/platform/cocoa/ThemeCocoa.mm >index 86150e5a8ae37bcaace142e12af8ad03095b9cfc..eeff5922c16f19363fd28ee9b85113da5e54adf3 100644 >--- a/Source/WebCore/platform/cocoa/ThemeCocoa.mm >+++ b/Source/WebCore/platform/cocoa/ThemeCocoa.mm >@@ -59,7 +59,7 @@ static NSBundle *passKitBundle() > static dispatch_once_t onceToken; > dispatch_once(&onceToken, ^{ > #if PLATFORM(MAC) >- passKitBundle = [NSBundle bundleWithURL:[NSURL fileURLWithPath:@"/System/Library/PrivateFrameworks/PassKit.framework"]]; >+ passKitBundle = [NSBundle bundleWithURL:[NSURL fileURLWithPath:@"/System/Library/PrivateFrameworks/PassKit.framework" isDirectory:YES]]; > #else > dlopen("/System/Library/Frameworks/PassKit.framework/PassKit", RTLD_NOW); > passKitBundle = [NSBundle bundleForClass:NSClassFromString(@"PKPaymentAuthorizationViewController")]; >diff --git a/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm b/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm >index 706174201dd376b9c65506b6ffd10529d1a30f03..14c5e36f2ffe64aa23359ea56bb0499bbb516208 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm >@@ -108,7 +108,7 @@ String WebsiteDataStore::tempDirectoryFileSystemRepresentation(const String& dir > static NSURL *tempURL; > > dispatch_once(&onceToken, ^{ >- NSURL *url = [NSURL fileURLWithPath:NSTemporaryDirectory()]; >+ NSURL *url = [NSURL fileURLWithPath:NSTemporaryDirectory() isDirectory:YES]; > if (!url) > RELEASE_ASSERT_NOT_REACHED(); > >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 939c050eb6cd1cc8ac28614d79b100a7a0c48116..4c7a1262335cf12c8cdddc7a3fdd589d9daf758c 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -3959,7 +3959,7 @@ NSArray *WebViewImpl::namesOfPromisedFilesDroppedAtDestination(NSURL *dropDestin > // FIXME: Report an error if we fail to create a file. > NSString *path = [[dropDestination path] stringByAppendingPathComponent:[wrapper preferredFilename]]; > path = pathWithUniqueFilenameForPath(path); >- if (![wrapper writeToURL:[NSURL fileURLWithPath:path] options:NSFileWrapperWritingWithNameUpdating originalContentsURL:nil error:nullptr]) >+ if (![wrapper writeToURL:[NSURL fileURLWithPath:path isDirectory:NO] options:NSFileWrapperWritingWithNameUpdating originalContentsURL:nil error:nullptr]) > LOG_ERROR("Failed to create image file via -[NSFileWrapper writeToURL:options:originalContentsURL:error:]"); > > if (!m_promisedURL.isEmpty()) >diff --git a/Source/WebKit/UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm b/Source/WebKit/UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm >index fd909ea6b250319b01306c436bd0f132c0f82856..57c91394cb149aaf369225dd66470c273ceb45be 100644 >--- a/Source/WebKit/UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm >+++ b/Source/WebKit/UIProcess/WebStorage/ios/LocalStorageDatabaseTrackerIOS.mm >@@ -40,7 +40,7 @@ void LocalStorageDatabaseTracker::platformMaybeExcludeFromBackup() const > m_hasExcludedFromBackup = true; > > if (linkedOnOrAfter(SDKVersion::FirstToExcludeLocalStorageFromBackup)) >- [[NSURL fileURLWithPath:(NSString *)m_localStorageDirectory] setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:nil]; >+ [[NSURL fileURLWithPath:(NSString *)m_localStorageDirectory isDirectory:YES] setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:nil]; > } > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm b/Source/WebKit/UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm >index 5b5cbd28e2492913a432764c9ba9365277c97721..e29e78ba422e42bffaf0c7cd720100a8174feafd 100644 >--- a/Source/WebKit/UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm >+++ b/Source/WebKit/UIProcess/ios/ResourceLoadStatisticsPersistentStorageIOS.mm >@@ -32,7 +32,7 @@ namespace WebKit { > > void ResourceLoadStatisticsPersistentStorage::excludeFromBackup() const > { >- [[NSURL fileURLWithPath:(NSString *)m_storageDirectoryPath] setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:nil]; >+ [[NSURL fileURLWithPath:(NSString *)m_storageDirectoryPath isDirectory:YES] setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:nil]; > } > > } >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index 266926d0b0009658f2c6c21a5739aef530dae6a8..21fd28cb241f355dbae99485840b5ee2dfdf8240 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -5056,7 +5056,7 @@ - (void)_prepareToDragPromisedBlob:(const PromisedBlobInfo&)info > } > > NSString *temporaryBlobDirectory = FileSystem::createTemporaryDirectory(@"blobs"); >- NSURL *destinationURL = [NSURL fileURLWithPath:[temporaryBlobDirectory stringByAppendingPathComponent:[NSUUID UUID].UUIDString]]; >+ NSURL *destinationURL = [NSURL fileURLWithPath:[temporaryBlobDirectory stringByAppendingPathComponent:[NSUUID UUID].UUIDString] isDirectory:NO]; > > RELEASE_LOG(DragAndDrop, "Drag session: %p delivering promised blob at path: %@", session.get(), destinationURL.path); > strongSelf->_page->writeBlobToFilePath(url, destinationURL.path, [protectedURL = retainPtr(destinationURL), protectedCallback = makeBlockPtr(callback)] (bool success) { >diff --git a/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm b/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm >index 2186ee8cf53347182f729cd0ef282556fb9291e7..ff5bd9ccdc864108751fef12549ee43a86c0d204 100644 >--- a/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm >+++ b/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm >@@ -629,7 +629,7 @@ - (void)_uploadItemForImageData:(NSData *)imageData imageName:(NSString *)imageN > return; > } > >- successBlock(adoptNS([[_WKImageFileUploadItem alloc] initWithFileURL:[NSURL fileURLWithPath:filePath]]).get()); >+ successBlock(adoptNS([[_WKImageFileUploadItem alloc] initWithFileURL:[NSURL fileURLWithPath:filePath isDirectory:NO]]).get()); > } > > - (void)_uploadItemForJPEGRepresentationOfImage:(UIImage *)image successBlock:(void (^)(_WKFileUploadItem *))successBlock failureBlock:(void (^)(void))failureBlock >diff --git a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >index 3cfab990d8a3d53f49920f2672f21cf9970af2cd..6c8d07a045188ad8d374583bfe90b7ec7e6eeb2b 100644 >--- a/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >+++ b/Source/WebKit/UIProcess/mac/WebInspectorProxyMac.mm >@@ -656,7 +656,7 @@ String WebInspectorProxy::inspectorPageURL() > NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"Main" ofType:@"html"]; > ASSERT([path length]); > >- return [[NSURL fileURLWithPath:path] absoluteString]; >+ return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString]; > } > > String WebInspectorProxy::inspectorTestPageURL() >@@ -670,7 +670,7 @@ String WebInspectorProxy::inspectorTestPageURL() > if (!path) > return String(); > >- return [[NSURL fileURLWithPath:path] absoluteString]; >+ return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString]; > } > > String WebInspectorProxy::inspectorBaseURL() >@@ -681,7 +681,7 @@ String WebInspectorProxy::inspectorBaseURL() > NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] resourcePath]; > ASSERT([path length]); > >- return [[NSURL fileURLWithPath:path] absoluteString]; >+ return [[NSURL fileURLWithPath:path isDirectory:YES] absoluteString]; > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm >index cd5e642e49a13e70b2dc3c80d592ac61c04e8fe8..aec45c02aaa0c4b747631374e0a425b858926269 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm >+++ b/Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm >@@ -157,7 +157,7 @@ RefPtr<Icon> WebChromeClient::createIconForFiles(const Vector<String>& filenames > > // FIXME: We should generate an icon showing multiple files here, if applicable. Currently, if there are multiple > // files, we only use the first URL to generate an icon. >- return Icon::createIconForImage(iconForFile([NSURL fileURLWithPath:filenames[0]]).CGImage); >+ return Icon::createIconForImage(iconForFile([NSURL fileURLWithPath:filenames[0] isDirectory:NO]).CGImage); > } > > } // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm b/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm >index 73d7b1bf94396237645b185353329c1a90af0195..9ab4b40d09566ba1e13bc5d4eaa16434179c8937 100644 >--- a/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm >+++ b/Source/WebKit/WebProcess/WebPage/mac/WebInspectorUIMac.mm >@@ -45,7 +45,7 @@ static String webInspectorUILocalizedStringsURL() > > NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.WebInspectorUI"] pathForResource:@"localizedStrings" ofType:@"js"]; > if (path.length) >- return [[NSURL fileURLWithPath:path] absoluteString]; >+ return [[NSURL fileURLWithPath:path isDirectory:NO] absoluteString]; > > return String(); > } >diff --git a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >index d009fc258e252fb9b282112b4be816c24a0c3fa7..e22182cee60e9e5413a12a4b7f16f56657fe6289 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm >@@ -4387,7 +4387,7 @@ - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination > // FIXME: Report an error if we fail to create a file. > NSString *path = [[dropDestination path] stringByAppendingPathComponent:[wrapper preferredFilename]]; > path = [[NSFileManager defaultManager] _webkit_pathWithUniqueFilenameForPath:path]; >- if (![wrapper writeToURL:[NSURL fileURLWithPath:path] options:NSFileWrapperWritingWithNameUpdating originalContentsURL:nil error:nullptr]) >+ if (![wrapper writeToURL:[NSURL fileURLWithPath:path isDirectory:NO] options:NSFileWrapperWritingWithNameUpdating originalContentsURL:nil error:nullptr]) > LOG_ERROR("Failed to create image file via -[NSFileWrapper writeToURL:options:originalContentsURL:error:]"); > > if (draggingElementURL) >diff --git a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >index 30c4098638ce632db3425abc80b63aa48d0b8696..f09a666397052f63f89e2e1428fc984d3f2b2992 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebPreferences.mm >@@ -1015,7 +1015,7 @@ - (NSURL *)userStyleSheetLocation > return [NSURL _web_URLWithDataAsString:locationString]; > } else { > locationString = [locationString stringByExpandingTildeInPath]; >- return [NSURL fileURLWithPath:locationString]; >+ return [NSURL fileURLWithPath:locationString isDirectory:NO]; > } > } > >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 795e78f8388fac89b71eacc6b4e28936c8ec474a..57310f7e966cd6afb009b06411f614a794c3ad8d 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -7103,7 +7103,7 @@ - (void)setMainFrameURL:(NSString *)URLString > > NSURL *url; > if ([URLString hasPrefix:@"/"]) >- url = [NSURL fileURLWithPath:URLString]; >+ url = [NSURL fileURLWithPath:URLString isDirectory:NO]; > else > url = [NSURL _web_URLWithDataAsString:URLString]; > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 5c0faf043d17ad7f8f0e061270070327a18bff2f..ebf457fadabd0fb5273c3a46bc78e1c5903367de 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2018-06-20 Darin Adler <darin@apple.com> >+ >+ [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity >+ https://bugs.webkit.org/show_bug.cgi?id=186875 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/mac/DumpRenderTree.mm: >+ (activateTestingFonts): Use isDirectory:NO to create a URL for a font file. >+ * WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm: >+ (WTR::activateFonts): Ditto. >+ (WTR::installFakeHelvetica): Ditto. >+ > 2018-06-20 Wenson Hsieh <wenson_hsieh@apple.com> > > [WebKit on watchOS] Fixed position elements sometimes flicker when scrolling >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >index 99b3628f8b15fbc22e4db0cd45204a4e99c79bae..f659e94af216c1072fdb0538547fa87a10bcbe9c 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm >@@ -520,7 +520,7 @@ static void activateTestingFonts() > NSMutableArray *fontURLs = [NSMutableArray array]; > NSURL *resourcesDirectory = [NSURL URLWithString:@"DumpRenderTree.resources" relativeToURL:[[NSBundle mainBundle] executableURL]]; > for (unsigned i = 0; fontFileNames[i]; ++i) { >- NSURL *fontURL = [resourcesDirectory URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]]]; >+ NSURL *fontURL = [resourcesDirectory URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]] isDirectory:NO]; > [fontURLs addObject:[fontURL absoluteURL]]; > } > >diff --git a/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm b/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >index a73ca072114315a5b4f38a8cd93ff3085275712c..12eb48e4f0253a25028a044f06cac2a190453746 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >+++ b/Tools/WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm >@@ -117,7 +117,7 @@ void activateFonts() > > NSMutableArray *fontURLs = [NSMutableArray array]; > for (unsigned i = 0; fontFileNames[i]; ++i) { >- NSURL *fontURL = [resourcesDirectoryURL() URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]]]; >+ NSURL *fontURL = [resourcesDirectoryURL() URLByAppendingPathComponent:[NSString stringWithUTF8String:fontFileNames[i]] isDirectory:NO]; > [fontURLs addObject:[fontURL absoluteURL]]; > } > >@@ -136,7 +136,7 @@ void activateFonts() > void installFakeHelvetica(WKStringRef configuration) > { > RetainPtr<CFStringRef> configurationString = adoptCF(WKStringCopyCFString(kCFAllocatorDefault, configuration)); >- NSURL *resourceURL = [resourcesDirectoryURL() URLByAppendingPathComponent:[NSString stringWithFormat:@"FakeHelvetica-%@.ttf", configurationString.get()]]; >+ NSURL *resourceURL = [resourcesDirectoryURL() URLByAppendingPathComponent:[NSString stringWithFormat:@"FakeHelvetica-%@.ttf", configurationString.get()] isDirectory:NO]; > CFErrorRef error = nullptr; > CTFontManagerRegisterFontsForURL(static_cast<CFURLRef>(resourceURL), kCTFontManagerScopeProcess, &error); > }
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
Flags:
andersca
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186875
: 343208 |
343228