Changeset 258869 in webkit


Ignore:
Timestamp:
Mar 23, 2020 12:46:57 PM (4 years ago)
Author:
youenn@apple.com
Message:

Rename blankURL to aboutBlankURL
https://bugs.webkit.org/show_bug.cgi?id=209344

Reviewed by Darin Adler.

Source/WebCore:

No change of behavior.

  • dom/Document.cpp:

(WebCore::Document::setURL):
(WebCore::Document::completeURL const):
(WebCore::Document::ensureTemplateDocument):

  • dom/Document.h:

(WebCore::Document::urlForBindings const):

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::parserContextForElement):

  • dom/Node.cpp:

(WebCore::Node::baseURI const):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::WebContentReader::readWebArchive):

  • editing/markup.cpp:

(WebCore::createFragmentFromMarkup):

  • html/DOMURL.cpp:

(WebCore::DOMURL::create):

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::location const):

  • html/parser/XSSAuditor.cpp:

(WebCore::XSSAuditor::filterScriptToken):
(WebCore::XSSAuditor::filterObjectToken):
(WebCore::XSSAuditor::filterParamToken):
(WebCore::XSSAuditor::filterEmbedToken):
(WebCore::XSSAuditor::filterFormToken):
(WebCore::XSSAuditor::filterInputToken):
(WebCore::XSSAuditor::filterButtonToken):
(WebCore::XSSAuditor::isLikelySafeResource):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::maybeLoadEmpty):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::serverRedirectSourceForHistory const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadWithDocumentLoader):

  • loader/HistoryController.cpp:

(WebCore::HistoryController::currentItemShouldBeReplaced const):
(WebCore::HistoryController::initializeItem):

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::requestFrame):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::createFromSelection):

  • page/Location.cpp:

(WebCore::Location::url const):

  • page/SecurityPolicy.cpp:

(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):

  • platform/win/ClipboardUtilitiesWin.cpp:

(WebCore::markupToCFHTML):

  • svg/SVGImageLoader.cpp:

(WebCore::SVGImageLoader::sourceURI const):

Source/WebKit:

  • UIProcess/API/C/WKPage.cpp:

(WKPageLoadPlainTextStringWithUserData):

  • UIProcess/API/C/WKPageGroup.cpp:

(WKPageGroupAddUserStyleSheet):
(WKPageGroupAddUserScript):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_load_plain_text):

  • UIProcess/Inspector/WebPageDebuggable.cpp:

(WebKit::WebPageDebuggable::url const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::loadDataWithNavigationShared):
(WebKit::WebPageProxy::loadWebArchiveData):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::loadData):
(WebKit::WebPage::loadAlternateHTML):
(WebKit::WebPage::dumpHistoryForTesting):
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::updateGlobalHistory):

  • WebView/WebFrame.mm:

(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):

Source/WTF:

Rename blankURL to aboutBlankURL and allow using it without WTF:: prefix.

  • wtf/URL.cpp:

(WTF::aboutBlankURL):
(WTF::blankURL): Deleted.

  • wtf/URL.h:
Location:
trunk/Source
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r258866 r258869  
     12020-03-23  youenn fablet  <youenn@apple.com>
     2
     3        Rename blankURL to aboutBlankURL
     4        https://bugs.webkit.org/show_bug.cgi?id=209344
     5
     6        Reviewed by Darin Adler.
     7
     8        Rename blankURL to aboutBlankURL and allow using it without WTF:: prefix.
     9
     10        * wtf/URL.cpp:
     11        (WTF::aboutBlankURL):
     12        (WTF::blankURL): Deleted.
     13        * wtf/URL.h:
     14
    1152020-03-23  Rob Buis  <rbuis@igalia.com>
    216
  • trunk/Source/WTF/wtf/URL.cpp

    r258769 r258869  
    868868}
    869869
    870 const URL& blankURL()
     870const URL& aboutBlankURL()
    871871{
    872872    static NeverDestroyed<URL> staticBlankURL(URL(), "about:blank");
  • trunk/Source/WTF/wtf/URL.h

    r258769 r258869  
    260260WTF_EXPORT_PRIVATE bool hostsAreEqual(const URL&, const URL&);
    261261
    262 WTF_EXPORT_PRIVATE const URL& blankURL();
     262WTF_EXPORT_PRIVATE const URL& aboutBlankURL();
    263263WTF_EXPORT_PRIVATE const URL& aboutSrcDocURL();
    264264
     
    388388
    389389} // namespace WTF
     390
     391using WTF::aboutBlankURL;
     392using WTF::aboutSrcDocURL;
  • trunk/Source/WebCore/ChangeLog

    r258868 r258869  
     12020-03-23  youenn fablet  <youenn@apple.com>
     2
     3        Rename blankURL to aboutBlankURL
     4        https://bugs.webkit.org/show_bug.cgi?id=209344
     5
     6        Reviewed by Darin Adler.
     7
     8        No change of behavior.
     9
     10        * dom/Document.cpp:
     11        (WebCore::Document::setURL):
     12        (WebCore::Document::completeURL const):
     13        (WebCore::Document::ensureTemplateDocument):
     14        * dom/Document.h:
     15        (WebCore::Document::urlForBindings const):
     16        * dom/InlineStyleSheetOwner.cpp:
     17        (WebCore::parserContextForElement):
     18        * dom/Node.cpp:
     19        (WebCore::Node::baseURI const):
     20        * editing/cocoa/WebContentReaderCocoa.mm:
     21        (WebCore::WebContentReader::readWebArchive):
     22        * editing/markup.cpp:
     23        (WebCore::createFragmentFromMarkup):
     24        * html/DOMURL.cpp:
     25        (WebCore::DOMURL::create):
     26        * html/HTMLFrameElementBase.cpp:
     27        (WebCore::HTMLFrameElementBase::openURL):
     28        (WebCore::HTMLFrameElementBase::location const):
     29        * html/parser/XSSAuditor.cpp:
     30        (WebCore::XSSAuditor::filterScriptToken):
     31        (WebCore::XSSAuditor::filterObjectToken):
     32        (WebCore::XSSAuditor::filterParamToken):
     33        (WebCore::XSSAuditor::filterEmbedToken):
     34        (WebCore::XSSAuditor::filterFormToken):
     35        (WebCore::XSSAuditor::filterInputToken):
     36        (WebCore::XSSAuditor::filterButtonToken):
     37        (WebCore::XSSAuditor::isLikelySafeResource):
     38        * loader/DocumentLoader.cpp:
     39        (WebCore::DocumentLoader::maybeLoadEmpty):
     40        * loader/DocumentLoader.h:
     41        (WebCore::DocumentLoader::serverRedirectSourceForHistory const):
     42        * loader/FrameLoader.cpp:
     43        (WebCore::FrameLoader::loadWithDocumentLoader):
     44        * loader/HistoryController.cpp:
     45        (WebCore::HistoryController::currentItemShouldBeReplaced const):
     46        (WebCore::HistoryController::initializeItem):
     47        * loader/SubframeLoader.cpp:
     48        (WebCore::SubframeLoader::requestFrame):
     49        * loader/archive/cf/LegacyWebArchive.cpp:
     50        (WebCore::LegacyWebArchive::createFromSelection):
     51        * page/Location.cpp:
     52        (WebCore::Location::url const):
     53        * page/SecurityPolicy.cpp:
     54        (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
     55        * platform/win/ClipboardUtilitiesWin.cpp:
     56        (WebCore::markupToCFHTML):
     57        * svg/SVGImageLoader.cpp:
     58        (WebCore::SVGImageLoader::sourceURI const):
     59
    1602020-03-23  youenn fablet  <youenn@apple.com>
    261
  • trunk/Source/WebCore/dom/Document.cpp

    r258787 r258869  
    32373237void Document::setURL(const URL& url)
    32383238{
    3239     const URL& newURL = url.isEmpty() ? WTF::blankURL() : url;
     3239    const URL& newURL = url.isEmpty() ? aboutBlankURL() : url;
    32403240    if (newURL == m_url)
    32413241        return;
     
    52115211    if (url.isNull())
    52125212        return URL();
    5213     const URL& baseURL = ((baseURLOverride.isEmpty() || baseURLOverride == WTF::blankURL()) && parentDocument()) ? parentDocument()->baseURL() : baseURLOverride;
     5213    const URL& baseURL = ((baseURLOverride.isEmpty() || baseURLOverride == aboutBlankURL()) && parentDocument()) ? parentDocument()->baseURL() : baseURLOverride;
    52145214    if (!m_decoder || forceUTF8 == ForceUTF8::Yes)
    52155215        return URL(baseURL, url);
     
    70647064
    70657065    if (isHTMLDocument())
    7066         m_templateDocument = HTMLDocument::create(nullptr, WTF::blankURL());
     7066        m_templateDocument = HTMLDocument::create(nullptr, aboutBlankURL());
    70677067    else
    7068         m_templateDocument = create(WTF::blankURL());
     7068        m_templateDocument = create(aboutBlankURL());
    70697069
    70707070    m_templateDocument->setContextDocument(contextDocument());
  • trunk/Source/WebCore/dom/Document.h

    r258434 r258869  
    685685    const URL& url() const final { return m_url; }
    686686    void setURL(const URL&);
    687     const URL& urlForBindings() const { return m_url.isEmpty() ? WTF::blankURL() : m_url; }
     687    const URL& urlForBindings() const { return m_url.isEmpty() ? aboutBlankURL() : m_url; }
    688688
    689689    // To understand how these concepts relate to one another, please see the
  • trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp

    r246490 r258869  
    5151    auto* shadowRoot = element.containingShadowRoot();
    5252    // User agent shadow trees can't contain document-relative URLs. Use blank URL as base allowing cross-document sharing.
    53     auto& baseURL = shadowRoot && shadowRoot->mode() == ShadowRootMode::UserAgent ? WTF::blankURL() : element.document().baseURL();
     53    auto& baseURL = shadowRoot && shadowRoot->mode() == ShadowRootMode::UserAgent ? aboutBlankURL() : element.document().baseURL();
    5454
    5555    CSSParserContext result = CSSParserContext { element.document(), baseURL, element.document().characterSetWithUTF8Fallback() };
  • trunk/Source/WebCore/dom/Node.cpp

    r258316 r258869  
    13341334{
    13351335    auto& url = document().baseURL();
    1336     return url.isNull() ? WTF::blankURL() : url;
     1336    return url.isNull() ? aboutBlankURL() : url;
    13371337}
    13381338
  • trunk/Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm

    r250061 r258869  
    530530        return frame.loader().client().canShowMIMETypeAsHTML(type);
    531531    });
    532     fragment = createFragmentFromMarkup(*frame.document(), sanitizedMarkup, WTF::blankURL(), DisallowScriptingAndPluginContent);
     532    fragment = createFragmentFromMarkup(*frame.document(), sanitizedMarkup, aboutBlankURL(), DisallowScriptingAndPluginContent);
    533533
    534534    if (!fragment)
  • trunk/Source/WebCore/editing/markup.cpp

    r257196 r258869  
    10221022    fragment->parseHTML(markup, fakeBody.ptr(), parserContentPolicy);
    10231023    restoreAttachmentElementsInFragment(fragment);
    1024     if (!baseURL.isEmpty() && baseURL != WTF::blankURL() && baseURL != document.baseURL())
     1024    if (!baseURL.isEmpty() && baseURL != aboutBlankURL() && baseURL != document.baseURL())
    10251025        completeURLs(fragment.ptr(), baseURL);
    10261026
  • trunk/Source/WebCore/html/DOMURL.cpp

    r248473 r258869  
    6464ExceptionOr<Ref<DOMURL>> DOMURL::create(const String& url)
    6565{
    66     URL baseURL { WTF::blankURL() };
     66    URL baseURL { aboutBlankURL() };
    6767    URL completeURL { baseURL, url };
    6868    if (!completeURL.isValid())
  • trunk/Source/WebCore/html/HTMLFrameElementBase.cpp

    r258769 r258869  
    8888
    8989    if (m_URL.isEmpty())
    90         m_URL = WTF::blankURL().string();
     90        m_URL = aboutBlankURL().string();
    9191
    9292    RefPtr<Frame> parentFrame = document().frame();
     
    154154{
    155155    if (hasAttributeWithoutSynchronization(srcdocAttr))
    156         return WTF::aboutSrcDocURL();
     156        return aboutSrcDocURL();
    157157    return document().completeURL(attributeWithoutSynchronization(srcAttr));
    158158}
  • trunk/Source/WebCore/html/parser/XSSAuditor.cpp

    r248846 r258869  
    442442    bool didBlockScript = false;
    443443    if (m_wasScriptTagFoundInRequest) {
    444         didBlockScript |= eraseAttributeIfInjected(request, srcAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
    445         didBlockScript |= eraseAttributeIfInjected(request, SVGNames::hrefAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
    446         didBlockScript |= eraseAttributeIfInjected(request, XLinkNames::hrefAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
     444        didBlockScript |= eraseAttributeIfInjected(request, srcAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
     445        didBlockScript |= eraseAttributeIfInjected(request, SVGNames::hrefAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
     446        didBlockScript |= eraseAttributeIfInjected(request, XLinkNames::hrefAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
    447447    }
    448448
     
    457457    bool didBlockScript = false;
    458458    if (isContainedInRequest(canonicalizedSnippetForTagName(request))) {
    459         didBlockScript |= eraseAttributeIfInjected(request, dataAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
     459        didBlockScript |= eraseAttributeIfInjected(request, dataAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
    460460        didBlockScript |= eraseAttributeIfInjected(request, typeAttr);
    461461        didBlockScript |= eraseAttributeIfInjected(request, classidAttr);
     
    477477        return false;
    478478
    479     return eraseAttributeIfInjected(request, valueAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
     479    return eraseAttributeIfInjected(request, valueAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
    480480}
    481481
     
    488488    if (isContainedInRequest(canonicalizedSnippetForTagName(request))) {
    489489        didBlockScript |= eraseAttributeIfInjected(request, codeAttr, String(), TruncationStyle::SrcLikeAttribute);
    490         didBlockScript |= eraseAttributeIfInjected(request, srcAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
     490        didBlockScript |= eraseAttributeIfInjected(request, srcAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
    491491        didBlockScript |= eraseAttributeIfInjected(request, typeAttr);
    492492    }
     
    540540    ASSERT(hasName(request.token, formTag));
    541541
    542     return eraseAttributeIfInjected(request, actionAttr, WTF::blankURL().string());
     542    return eraseAttributeIfInjected(request, actionAttr, aboutBlankURL().string());
    543543}
    544544
     
    548548    ASSERT(hasName(request.token, inputTag));
    549549
    550     return eraseAttributeIfInjected(request, formactionAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
     550    return eraseAttributeIfInjected(request, formactionAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
    551551}
    552552
     
    556556    ASSERT(hasName(request.token, buttonTag));
    557557
    558     return eraseAttributeIfInjected(request, formactionAttr, WTF::blankURL().string(), TruncationStyle::SrcLikeAttribute);
     558    return eraseAttributeIfInjected(request, formactionAttr, aboutBlankURL().string(), TruncationStyle::SrcLikeAttribute);
    559559}
    560560
     
    734734    // empty string below will likely later fail the "no query args test" as
    735735    // it inherits the document's query args.
    736     if (url.isEmpty() || url == WTF::blankURL().string())
     736    if (url.isEmpty() || url == aboutBlankURL().string())
    737737        return true;
    738738
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r257648 r258869  
    17841784
    17851785    if (m_request.url().isEmpty() && !frameLoader()->stateMachine().creatingInitialEmptyDocument()) {
    1786         m_request.setURL(WTF::blankURL());
     1786        m_request.setURL(aboutBlankURL());
    17871787        if (isLoadingMainResource())
    17881788            frameLoader()->client().dispatchDidChangeProvisionalURL();
  • trunk/Source/WebCore/loader/DocumentLoader.h

    r255961 r258869  
    271271    void setClientRedirectSourceForHistory(const String& clientRedirectSourceForHistory) { m_clientRedirectSourceForHistory = clientRedirectSourceForHistory; }
    272272   
    273     String serverRedirectSourceForHistory() const { return (urlForHistory() == url() || url() == WTF::blankURL()) ? String() : urlForHistory().string(); } // null if no server redirect occurred.
     273    String serverRedirectSourceForHistory() const { return (urlForHistory() == url() || url() == aboutBlankURL()) ? String() : urlForHistory().string(); } // null if no server redirect occurred.
    274274    String serverRedirectDestinationForHistory() const { return url(); }
    275275
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r258769 r258869  
    15831583    // Only the first iframe navigation or the first iframe navigation after about:blank should be reported.
    15841584    // https://www.w3.org/TR/resource-timing-2/#resources-included-in-the-performanceresourcetiming-interface
    1585     if (m_shouldReportResourceTimingToParentFrame && !m_previousURL.isNull() && m_previousURL != WTF::blankURL())
     1585    if (m_shouldReportResourceTimingToParentFrame && !m_previousURL.isNull() && m_previousURL != aboutBlankURL())
    15861586        m_shouldReportResourceTimingToParentFrame = false;
    15871587
  • trunk/Source/WebCore/loader/HistoryController.cpp

    r256831 r258869  
    615615    //   and that was the about:blank Document created when the browsing context
    616616    //   was created, then the navigation must be done with replacement enabled."
    617     return m_currentItem && !m_previousItem && equalIgnoringASCIICase(m_currentItem->urlString(), WTF::blankURL());
     617    return m_currentItem && !m_previousItem && equalIgnoringASCIICase(m_currentItem->urlString(), aboutBlankURL());
    618618}
    619619
     
    654654    // See bug 3368236 and related bugs for more information.
    655655    if (url.isEmpty())
    656         url = WTF::blankURL();
     656        url = aboutBlankURL();
    657657    if (originalURL.isEmpty())
    658         originalURL = WTF::blankURL();
     658        originalURL = aboutBlankURL();
    659659   
    660660    StringWithDirection title = documentLoader->title();
  • trunk/Source/WebCore/loader/SubframeLoader.cpp

    r247924 r258869  
    8181    if (WTF::protocolIsJavaScript(urlString)) {
    8282        scriptURL = completeURL(urlString); // completeURL() encodes the URL.
    83         url = WTF::blankURL();
     83        url = aboutBlankURL();
    8484    } else
    8585        url = completeURL(urlString);
    8686
    8787    if (shouldConvertInvalidURLsToBlank() && !url.isValid())
    88         url = WTF::blankURL();
     88        url = aboutBlankURL();
    8989
    9090    // If we will schedule a JavaScript URL load, we need to delay the firing of the load event at least until we've run the JavaScript in the URL.
  • trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp

    r248846 r258869  
    613613    // another document (which will have a body or frameset of its own).
    614614    String iframeMarkup = "<iframe frameborder=\"no\" marginwidth=\"0\" marginheight=\"0\" width=\"98%%\" height=\"98%%\" src=\"" + frame->loader().documentLoader()->response().url().string() + "\"></iframe>";
    615     auto iframeResource = ArchiveResource::create(utf8Buffer(iframeMarkup), WTF::blankURL(), "text/html", "UTF-8", String());
     615    auto iframeResource = ArchiveResource::create(utf8Buffer(iframeMarkup), aboutBlankURL(), "text/html", "UTF-8", String());
    616616
    617617    Vector<Ref<LegacyWebArchive>> subframeArchives;
  • trunk/Source/WebCore/page/Location.cpp

    r258685 r258869  
    5151{
    5252    if (!frame())
    53         return WTF::blankURL();
     53        return aboutBlankURL();
    5454
    5555    const URL& url = frame()->document()->url();
    5656    if (!url.isValid())
    57         return WTF::blankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
     57        return aboutBlankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
    5858
    5959    return url;
  • trunk/Source/WebCore/page/SecurityPolicy.cpp

    r258769 r258869  
    168168    // Note: We generalize this to invalid URLs because we treat such URLs as about:blank.
    169169    // FIXME: We also allow some URLs like "about:BLANK". We should probably block navigation to these URLs, see rdar://problem/57966056.
    170     return url.isEmpty() || url.isAboutBlank() || url.isAboutSrcDoc() || equalIgnoringASCIICase(url.string(), WTF::blankURL());
     170    return url.isEmpty() || url.isAboutBlank() || url.isAboutSrcDoc() || equalIgnoringASCIICase(url.string(), aboutBlankURL());
    171171}
    172172
  • trunk/Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp

    r242592 r258869  
    273273    const char* endMarkup = "\n<!--EndFragment-->\n</BODY>\n</HTML>";
    274274
    275     CString sourceURLUTF8 = srcURL == WTF::blankURL() ? "" : srcURL.utf8();
     275    CString sourceURLUTF8 = srcURL == aboutBlankURL() ? "" : srcURL.utf8();
    276276    CString markupUTF8 = markup.utf8();
    277277
  • trunk/Source/WebCore/svg/SVGImageLoader.cpp

    r251290 r258869  
    4848{
    4949    URL base = element().baseURI();
    50     if (base != WTF::blankURL())
     50    if (base != aboutBlankURL())
    5151        return URL(base, stripLeadingAndTrailingHTMLSpaces(attribute)).string();
    5252    return element().document().completeURL(stripLeadingAndTrailingHTMLSpaces(attribute));
  • trunk/Source/WebKit/ChangeLog

    r258862 r258869  
     12020-03-23  youenn fablet  <youenn@apple.com>
     2
     3        Rename blankURL to aboutBlankURL
     4        https://bugs.webkit.org/show_bug.cgi?id=209344
     5
     6        Reviewed by Darin Adler.
     7
     8        * UIProcess/API/C/WKPage.cpp:
     9        (WKPageLoadPlainTextStringWithUserData):
     10        * UIProcess/API/C/WKPageGroup.cpp:
     11        (WKPageGroupAddUserStyleSheet):
     12        (WKPageGroupAddUserScript):
     13        * UIProcess/API/glib/WebKitWebView.cpp:
     14        (webkit_web_view_load_plain_text):
     15        * UIProcess/Inspector/WebPageDebuggable.cpp:
     16        (WebKit::WebPageDebuggable::url const):
     17        * UIProcess/WebPageProxy.cpp:
     18        (WebKit::WebPageProxy::loadDataWithNavigationShared):
     19        (WebKit::WebPageProxy::loadWebArchiveData):
     20        * WebProcess/WebPage/WebPage.cpp:
     21        (WebKit::WebPage::loadData):
     22        (WebKit::WebPage::loadAlternateHTML):
     23        (WebKit::WebPage::dumpHistoryForTesting):
     24        (WebKit::WebPage::addUserScript):
     25        (WebKit::WebPage::addUserStyleSheet):
     26
    1272020-03-23  Alex Christensen  <achristensen@webkit.org>
    228
  • trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp

    r258574 r258869  
    262262void WKPageLoadPlainTextStringWithUserData(WKPageRef pageRef, WKStringRef plainTextStringRef, WKTypeRef userDataRef)
    263263{
    264     loadString(pageRef, plainTextStringRef, "text/plain"_s, WTF::blankURL().string(), userDataRef);
     264    loadString(pageRef, plainTextStringRef, "text/plain"_s, aboutBlankURL().string(), userDataRef);
    265265}
    266266
  • trunk/Source/WebKit/UIProcess/API/C/WKPageGroup.cpp

    r257552 r258869  
    7878    auto blacklist = toImpl(blacklistedURLPatterns);
    7979
    80     Ref<API::UserStyleSheet> userStyleSheet = API::UserStyleSheet::create(WebCore::UserStyleSheet { source, (baseURLString.isEmpty() ? WTF::blankURL() :  URL(URL(), baseURLString)), whitelist ? whitelist->toStringVector() : Vector<String>(), blacklist ? blacklist->toStringVector() : Vector<String>(), toUserContentInjectedFrames(injectedFrames), WebCore::UserStyleUserLevel }, API::ContentWorld::pageContentWorld());
     80    Ref<API::UserStyleSheet> userStyleSheet = API::UserStyleSheet::create(WebCore::UserStyleSheet { source, (baseURLString.isEmpty() ? aboutBlankURL() :  URL(URL(), baseURLString)), whitelist ? whitelist->toStringVector() : Vector<String>(), blacklist ? blacklist->toStringVector() : Vector<String>(), toUserContentInjectedFrames(injectedFrames), WebCore::UserStyleUserLevel }, API::ContentWorld::pageContentWorld());
    8181
    8282    toImpl(pageGroupRef)->userContentController().addUserStyleSheet(userStyleSheet.get());
     
    9999    auto blacklist = toImpl(blacklistedURLPatterns);
    100100   
    101     auto url = baseURLString.isEmpty() ? WTF::blankURL() :  URL(URL(), baseURLString);
     101    auto url = baseURLString.isEmpty() ? aboutBlankURL() :  URL(URL(), baseURLString);
    102102    Ref<API::UserScript> userScript = API::UserScript::create(WebCore::UserScript { WTFMove(source), WTFMove(url), whitelist ? whitelist->toStringVector() : Vector<String>(), blacklist ? blacklist->toStringVector() : Vector<String>(), toUserScriptInjectionTime(injectionTime), toUserContentInjectedFrames(injectedFrames) }, API::ContentWorld::pageContentWorld());
    103103    toImpl(pageGroupRef)->userContentController().addUserScript(userScript.get(), InjectUserScriptImmediately::No);
  • trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp

    r257882 r258869  
    29902990    g_return_if_fail(plainText);
    29912991
    2992     getPage(webView).loadData({ reinterpret_cast<const uint8_t*>(plainText), plainText ? strlen(plainText) : 0 }, "text/plain"_s, "UTF-8"_s, WTF::blankURL().string());
     2992    getPage(webView).loadData({ reinterpret_cast<const uint8_t*>(plainText), plainText ? strlen(plainText) : 0 }, "text/plain"_s, "UTF-8"_s, aboutBlankURL().string());
    29932993}
    29942994
  • trunk/Source/WebKit/UIProcess/Inspector/WebPageDebuggable.cpp

    r255214 r258869  
    5656{
    5757    if (!m_page.mainFrame())
    58         return WTF::blankURL().string();
     58        return aboutBlankURL().string();
    5959
    6060    String url = m_page.mainFrame()->url().string();
    6161    if (url.isEmpty())
    62         return WTF::blankURL().string();
     62        return aboutBlankURL().string();
    6363
    6464    return url;
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r258829 r258869  
    14211421    auto transaction = m_pageLoadState.transaction();
    14221422
    1423     m_pageLoadState.setPendingAPIRequest(transaction, { navigation.navigationID(), !baseURL.isEmpty() ? baseURL : WTF::blankURL().string() });
     1423    m_pageLoadState.setPendingAPIRequest(transaction, { navigation.navigationID(), !baseURL.isEmpty() ? baseURL : aboutBlankURL().string() });
    14241424
    14251425    LoadParameters loadParameters;
     
    14981498
    14991499    auto transaction = m_pageLoadState.transaction();
    1500     m_pageLoadState.setPendingAPIRequest(transaction, { 0, WTF::blankURL().string() });
     1500    m_pageLoadState.setPendingAPIRequest(transaction, { 0, aboutBlankURL().string() });
    15011501
    15021502    LoadParameters loadParameters;
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r258829 r258869  
    16241624
    16251625    auto sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(loadParameters.data.data()), loadParameters.data.size());
    1626     URL baseURL = loadParameters.baseURLString.isEmpty() ? WTF::blankURL() : URL(URL(), loadParameters.baseURLString);
     1626    URL baseURL = loadParameters.baseURLString.isEmpty() ? aboutBlankURL() : URL(URL(), loadParameters.baseURLString);
    16271627    loadDataImpl(loadParameters.navigationID, loadParameters.shouldTreatAsContinuingLoad, WTFMove(loadParameters.websitePolicies), WTFMove(sharedBuffer), loadParameters.MIMEType, loadParameters.encodingName, baseURL, URL(), loadParameters.userData, loadParameters.isNavigatingToAppBoundDomain, loadParameters.hasNavigatedAwayFromAppBoundDomain, loadParameters.shouldOpenExternalURLsPolicy);
    16281628}
     
    16321632    platformDidReceiveLoadParameters(loadParameters);
    16331633
    1634     URL baseURL = loadParameters.baseURLString.isEmpty() ? WTF::blankURL() : URL(URL(), loadParameters.baseURLString);
     1634    URL baseURL = loadParameters.baseURLString.isEmpty() ? aboutBlankURL() : URL(URL(), loadParameters.baseURLString);
    16351635    URL unreachableURL = loadParameters.unreachableURLString.isEmpty() ? URL() : URL(URL(), loadParameters.unreachableURLString);
    16361636    URL provisionalLoadErrorURL = loadParameters.provisionalLoadErrorURLString.isEmpty() ? URL() : URL(URL(), loadParameters.provisionalLoadErrorURLString);
     
    19631963    StringBuilder builder;
    19641964    int begin = -list.backCount();
    1965     if (list.itemAtIndex(begin)->url() == WTF::blankURL())
     1965    if (list.itemAtIndex(begin)->url() == aboutBlankURL())
    19661966        ++begin;
    19671967    for (int i = begin; i <= static_cast<int>(list.forwardCount()); ++i)
     
    64536453void WebPage::addUserScript(String&& source, WebCore::UserContentInjectedFrames injectedFrames, WebCore::UserScriptInjectionTime injectionTime)
    64546454{
    6455     WebCore::UserScript userScript { WTFMove(source), URL(WTF::blankURL()), Vector<String>(), Vector<String>(), injectionTime, injectedFrames };
     6455    WebCore::UserScript userScript { WTFMove(source), URL(aboutBlankURL()), Vector<String>(), Vector<String>(), injectionTime, injectedFrames };
    64566456
    64576457    m_userContentController->addUserScript(InjectedBundleScriptWorld::normalWorld(), WTFMove(userScript));
     
    64606460void WebPage::addUserStyleSheet(const String& source, WebCore::UserContentInjectedFrames injectedFrames)
    64616461{
    6462     WebCore::UserStyleSheet userStyleSheet {source, WTF::blankURL(), Vector<String>(), Vector<String>(), injectedFrames, UserStyleUserLevel };
     6462    WebCore::UserStyleSheet userStyleSheet {source, aboutBlankURL(), Vector<String>(), Vector<String>(), injectedFrames, UserStyleUserLevel };
    64636463
    64646464    m_userContentController->addUserStyleSheet(InjectedBundleScriptWorld::normalWorld(), WTFMove(userStyleSheet));
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r258795 r258869  
     12020-03-23  youenn fablet  <youenn@apple.com>
     2
     3        Rename blankURL to aboutBlankURL
     4        https://bugs.webkit.org/show_bug.cgi?id=209344
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebCoreSupport/WebFrameLoaderClient.mm:
     9        (WebFrameLoaderClient::updateGlobalHistory):
     10        * WebView/WebFrame.mm:
     11        (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
     12
    1132020-03-20  Jer Noble  <jer.noble@apple.com>
    214
  • trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm

    r258782 r258869  
    10341034    auto* loader = core(m_webFrame.get())->loader().documentLoader();
    10351035#if PLATFORM(IOS_FAMILY)
    1036     if (loader->urlForHistory() == WTF::blankURL())
     1036    if (loader->urlForHistory() == aboutBlankURL())
    10371037        return;
    10381038#endif
  • trunk/Source/WebKitLegacy/mac/WebView/WebFrame.mm

    r258628 r258869  
    25342534        baseURL = [baseURL absoluteURL];
    25352535    else {
    2536         baseURL = WTF::blankURL();
     2536        baseURL = aboutBlankURL();
    25372537        responseURL = createUniqueWebDataURL();
    25382538    }
Note: See TracChangeset for help on using the changeset viewer.