Changeset 102080 in webkit
- Timestamp:
- Dec 5, 2011, 5:51:27 PM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
-
ChangeLog (modified) (1 diff)
-
dom/Document.cpp (modified) (1 diff)
-
loader/FrameLoader.cpp (modified) (1 diff)
-
loader/archive/cf/LegacyWebArchive.cpp (modified) (1 diff)
-
page/DOMWindow.cpp (modified) (1 diff)
-
platform/KURL.cpp (modified) (1 diff)
-
platform/KURL.h (modified) (1 diff)
-
platform/KURLGoogle.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102073 r102080 1 2011-12-05 Benjamin Poulain <benjamin@webkit.org> 2 3 Get rid of KURL::KURL(ParsedURLStringTag, const char*); 4 https://bugs.webkit.org/show_bug.cgi?id=73792 5 6 Reviewed by Andreas Kling. 7 8 In all cases where the constructor is used, the constructor 9 taking a String is as effective because the string is valid and converted 10 to String for m_string. 11 12 This patch remove the constructor KURL::KURL(ParsedURLStringTag, const char*) 13 and change the call sites that were using that constructor to build 14 empty URLs. 15 16 * dom/Document.cpp: 17 (WebCore::Document::initSecurityContext): 18 * loader/FrameLoader.cpp: 19 (WebCore::FrameLoader::init): 20 * loader/archive/cf/LegacyWebArchive.cpp: 21 (WebCore::LegacyWebArchive::create): 22 * page/DOMWindow.cpp: 23 (WebCore::DOMWindow::createWindow): 24 * platform/KURL.cpp: 25 * platform/KURL.h: 26 * platform/KURLGoogle.cpp: 27 1 28 2011-12-05 Benjamin Poulain <benjamin@webkit.org> 2 29 -
trunk/Source/WebCore/dom/Document.cpp
r101932 r102080 4473 4473 // No source for a security context. 4474 4474 // This can occur via document.implementation.createDocument(). 4475 m_cookieURL = KURL(ParsedURLString, "");4475 m_cookieURL = KURL(ParsedURLString, emptyString()); 4476 4476 setSecurityOrigin(SecurityOrigin::createUnique()); 4477 4477 setContentSecurityPolicy(ContentSecurityPolicy::create(this)); -
trunk/Source/WebCore/loader/FrameLoader.cpp
r102062 r102080 221 221 // It would be better if this could be done with even fewer steps. 222 222 m_stateMachine.advanceTo(FrameLoaderStateMachine::CreatingInitialEmptyDocument); 223 setPolicyDocumentLoader(m_client->createDocumentLoader(ResourceRequest(KURL(ParsedURLString, "")), SubstituteData()).get());223 setPolicyDocumentLoader(m_client->createDocumentLoader(ResourceRequest(KURL(ParsedURLString, emptyString())), SubstituteData()).get()); 224 224 setProvisionalDocumentLoader(m_policyDocumentLoader.get()); 225 225 setState(FrameStateProvisional); -
trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
r95901 r102080 508 508 // <rdar://problem/5454935> 509 509 if (responseURL.isNull()) 510 responseURL = KURL(ParsedURLString, "");510 responseURL = KURL(ParsedURLString, emptyString()); 511 511 512 512 PassRefPtr<ArchiveResource> mainResource = ArchiveResource::create(utf8Buffer(markupString), responseURL, response.mimeType(), "UTF-8", frame->tree()->uniqueName()); -
trunk/Source/WebCore/page/DOMWindow.cpp
r101587 r102080 1814 1814 String referrer = firstFrame->loader()->outgoingReferrer(); 1815 1815 1816 KURL completedURL = urlString.isEmpty() ? KURL(ParsedURLString, "") : firstFrame->document()->completeURL(urlString);1816 KURL completedURL = urlString.isEmpty() ? KURL(ParsedURLString, emptyString()) : firstFrame->document()->completeURL(urlString); 1817 1817 ResourceRequest request(completedURL, referrer); 1818 1818 FrameLoader::addHTTPOriginIfNeeded(request, firstFrame->loader()->outgoingOrigin()); -
trunk/Source/WebCore/platform/KURL.cpp
r102059 r102080 321 321 } 322 322 323 KURL::KURL(ParsedURLStringTag, const char* url)324 {325 parse(url);326 ASSERT(url == m_string);327 }328 329 323 KURL::KURL(ParsedURLStringTag, const String& url) 330 324 { -
trunk/Source/WebCore/platform/KURL.h
r102073 r102080 74 74 // KURL object, or indiscernible from such. 75 75 // It is usually best to avoid repeatedly parsing a string, unless memory saving outweigh the possible slow-downs. 76 KURL(ParsedURLStringTag, const char*);77 76 KURL(ParsedURLStringTag, const String&); 78 77 KURL(ParsedURLStringTag, const URLString&); -
trunk/Source/WebCore/platform/KURLGoogle.cpp
r96779 r102080 342 342 // KURL ------------------------------------------------------------------------ 343 343 344 // Creates with null-terminated string input representing an absolute URL.345 // WebCore generally calls this only with hardcoded strings, so the input is346 // ASCII. We treat it as UTF-8 just in case.347 KURL::KURL(ParsedURLStringTag, const char *url)348 {349 // FIXME The Mac code checks for beginning with a slash and converts it to350 // file: URL. We will want to add this as well once we can compile on a351 // system like that.352 m_url.init(KURL(), url, strlen(url), 0);353 354 // The one-argument constructors should never generate a null string.355 // This is a funny quirk of KURL.cpp (probably a bug) which we preserve.356 if (m_url.utf8String().isNull())357 m_url.setAscii(CString("", 0));358 }359 360 344 // Initializes with a string representing an absolute URL. No encoding 361 345 // information is specified. This generally happens when a KURL is converted
Note:
See TracChangeset
for help on using the changeset viewer.