Changeset 207236 in webkit
- Timestamp:
- Oct 12, 2016 1:23:03 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r207224 r207236 1 2016-10-12 Alex Christensen <achristensen@webkit.org> 2 3 Fix assertion after switching to URLParser 4 https://bugs.webkit.org/show_bug.cgi?id=163350 5 rdar://problem/28739938 6 7 Reviewed by Brady Eidson. 8 9 Covered by a new API test. 10 11 * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: 12 (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]): 13 The { } here is not understood by the compiler to mean WebCore::URL(), but rather the empty constructor for the enum ParsedURLStringTag. 14 We used to be unsafely trusting that the URL was valid and canonicalized, but with URLParser we are canonicalizing it, 15 and the assertion (url == m_string) in URL.cpp was failing. 16 1 17 2016-10-12 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserStyleSheet.mm
r202758 r207236 71 71 WebKit::InitializeWebKit2(); 72 72 73 API::Object::constructInWrapper<API::UserStyleSheet>(self, WebCore::UserStyleSheet { WTF::String(source), { { }, WTF::String([baseURL _web_originalDataAsWTFString]) }, API::toStringVector(legacyWhitelist), API::toStringVector(legacyBlacklist), forMainFrameOnly ? WebCore::InjectInTopFrameOnly : WebCore::InjectInAllFrames, WebCore::UserStyleUserLevel }, *userContentWorld->_userContentWorld);73 API::Object::constructInWrapper<API::UserStyleSheet>(self, WebCore::UserStyleSheet { WTF::String(source), { WebCore::URL(), WTF::String([baseURL _web_originalDataAsWTFString]) }, API::toStringVector(legacyWhitelist), API::toStringVector(legacyBlacklist), forMainFrameOnly ? WebCore::InjectInTopFrameOnly : WebCore::InjectInAllFrames, WebCore::UserStyleUserLevel }, *userContentWorld->_userContentWorld); 74 74 75 75 return self; -
trunk/Tools/ChangeLog
r207225 r207236 1 2016-10-12 Alex Christensen <achristensen@webkit.org> 2 3 Fix assertion after switching to URLParser 4 https://bugs.webkit.org/show_bug.cgi?id=163350 5 rdar://problem/28739938 6 7 Reviewed by Brady Eidson. 8 9 * TestWebKitAPI/Tests/WebKit2Cocoa/UserContentController.mm: 10 (TEST): 11 1 12 2016-10-11 Sam Weinig <sam@webkit.org> 2 13 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/UserContentController.mm
r205329 r207236 363 363 } 364 364 365 TEST(WKUserContentController, NonCanonicalizedURL) 366 { 367 RetainPtr<_WKUserContentWorld> world = adoptNS([_WKUserContentWorld worldWithName:@"TestWorld"]); 368 RetainPtr<_WKUserStyleSheet> styleSheet = adoptNS([[_WKUserStyleSheet alloc] initWithSource:styleSheetSource forMainFrameOnly:NO legacyWhitelist:@[] legacyBlacklist:@[] baseURL:[[NSURL alloc] initWithString:@"http://CamelCase/"] userContentWorld:world.get()]); 369 } 370 365 371 TEST(WKUserContentController, AddUserStyleSheetAfterCreatingView) 366 372 {
Note: See TracChangeset
for help on using the changeset viewer.