Changeset 28639 in webkit
- Timestamp:
- Dec 11, 2007 11:26:19 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 86 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r28637 r28639 1 2007-12-11 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Scrub URL out of the tree in preparation for renaming KURL to URL. 6 - Renames Document::URL() -> Document::url() 7 - Renames DocumentLoader::URL() -> DocumentLoader::url() 8 - Renames KURL::url() to KURL::string() and KURL::deprecatedString() 9 - Remove FrameLoader::URL() 10 - Various variable renames. 11 12 The change from Document::URL() to Document::url() required changes 13 to the bindings scripts as well, because URL() is the name of a DOM 14 method. The code generation scripts now have code to special case URL() 15 to url(). 16 17 * WebCore.base.exp: 18 * bindings/js/kjs_events.cpp: 19 (WebCore::JSLazyEventListener::parseCode): 20 * bindings/js/kjs_navigator.cpp: 21 (KJS::Navigator::getValueProperty): 22 * bindings/js/kjs_proxy.cpp: 23 (WebCore::KJSProxy::initScript): 24 * bindings/js/kjs_window.cpp: 25 (KJS::Window::put): 26 (KJS::Window::allowsAccessFrom): 27 (KJS::Location::put): 28 (KJS::LocationProtoFuncReplace::callAsFunction): 29 (KJS::LocationProtoFuncReload::callAsFunction): 30 (KJS::LocationProtoFuncAssign::callAsFunction): 31 * bindings/scripts/CodeGenerator.pm: 32 * bindings/scripts/CodeGeneratorCOM.pm: 33 * bindings/scripts/CodeGeneratorJS.pm: 34 * bindings/scripts/CodeGeneratorObjC.pm: 35 * css/CSSImportRule.cpp: 36 (WebCore::CSSImportRule::insertedIntoParent): 37 * css/CSSParser.cpp: 38 (WebCore::CSSParser::parseValue): 39 (WebCore::CSSParser::parseContent): 40 (WebCore::CSSParser::parseBackgroundImage): 41 (WebCore::CSSParser::parseFontFaceSrc): 42 (WebCore::CSSParser::parseBorderImage): 43 (WebCore::CSSParser::createImportRule): 44 * css/CSSStyleSelector.cpp: 45 (WebCore::CSSStyleSelector::setEncodedURL): 46 * dom/Document.cpp: 47 (WebCore::Document::processHttpEquiv): 48 (WebCore::Document::cookie): 49 (WebCore::Document::setCookie): 50 (WebCore::Document::domain): 51 (WebCore::Document::setDomain): 52 (WebCore::Document::getImageMap): 53 (WebCore::Document::completeURL): 54 * dom/Document.h: 55 (WebCore::Document::url): 56 (WebCore::Document::baseURL): 57 * dom/Element.cpp: 58 (WebCore::Element::baseURI): 59 * dom/ProcessingInstruction.h: 60 * dom/StyledElement.cpp: 61 (WebCore::StyledElement::addCSSImageProperty): 62 * dom/StyledElement.h: 63 * dom/XMLTokenizer.cpp: 64 (WebCore::XMLTokenizer::endElementNs): 65 (WebCore::XMLTokenizer::end): 66 (WebCore::): 67 * dom/XMLTokenizer.h: 68 * editing/Editor.cpp: 69 (WebCore::Editor::copy): 70 * editing/markup.cpp: 71 (WebCore::completeURLs): 72 * history/CachedPage.h: 73 (WebCore::CachedPage::url): 74 * history/HistoryItem.cpp: 75 (WebCore::HistoryItem::HistoryItem): 76 (WebCore::HistoryItem::setURL): 77 (WebCore::HistoryItem::isCurrentDocument): 78 * html/HTMLBaseElement.cpp: 79 (WebCore::HTMLBaseElement::process): 80 * html/HTMLParser.cpp: 81 (WebCore::HTMLParser::reportErrorToConsole): 82 * html/HTMLScriptElement.cpp: 83 (WebCore::HTMLScriptElement::childrenChanged): 84 (WebCore::HTMLScriptElement::insertedIntoDocument): 85 (WebCore::HTMLScriptElement::evaluateScript): 86 * html/HTMLScriptElement.h: 87 * html/HTMLTokenizer.cpp: 88 (WebCore::HTMLTokenizer::scriptExecution): 89 * loader/Cache.cpp: 90 (WebCore::createResource): 91 (WebCore::Cache::requestResource): 92 * loader/CachedCSSStyleSheet.cpp: 93 (WebCore::CachedCSSStyleSheet::checkNotify): 94 * loader/CachedResource.cpp: 95 (WebCore::CachedResource::CachedResource): 96 * loader/CachedResource.h: 97 (WebCore::CachedResource::): 98 * loader/CachedScript.h: 99 * loader/DocLoader.cpp: 100 (WebCore::DocLoader::checkForReload): 101 (WebCore::DocLoader::requestResource): 102 * loader/DocumentLoader.cpp: 103 (WebCore::DocumentLoader::url): 104 (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll): 105 (WebCore::DocumentLoader::setRequest): 106 (WebCore::DocumentLoader::startLoadingMainResource): 107 * loader/DocumentLoader.h: 108 * loader/FrameLoader.cpp: 109 (WebCore::FormSubmission::FormSubmission): 110 (WebCore::ScheduledRedirection::ScheduledRedirection): 111 (WebCore::FrameLoader::changeLocation): 112 (WebCore::FrameLoader::urlSelected): 113 (WebCore::FrameLoader::requestFrame): 114 (WebCore::FrameLoader::loadSubframe): 115 (WebCore::FrameLoader::submitFormAgain): 116 (WebCore::FrameLoader::submitForm): 117 (WebCore::FrameLoader::didExplicitOpen): 118 (WebCore::FrameLoader::replaceContentsWithScriptResult): 119 (WebCore::FrameLoader::executeScript): 120 (WebCore::FrameLoader::receivedFirstData): 121 (WebCore::FrameLoader::begin): 122 (WebCore::FrameLoader::startIconLoader): 123 (WebCore::FrameLoader::commitIconURLToIconDatabase): 124 (WebCore::FrameLoader::scheduleRefresh): 125 (WebCore::FrameLoader::redirectionTimerFired): 126 (WebCore::FrameLoader::loadPlugin): 127 (WebCore::FrameLoader::didNotOpenURL): 128 (WebCore::FrameLoader::updatePolicyBaseURL): 129 (WebCore::FrameLoader::scrollToAnchor): 130 (WebCore::FrameLoader::startRedirectionTimer): 131 (WebCore::FrameLoader::load): 132 (WebCore::FrameLoader::canLoad): 133 (WebCore::FrameLoader::shouldHideReferrer): 134 (WebCore::FrameLoader::shouldAllowNavigation): 135 (WebCore::FrameLoader::commitProvisionalLoad): 136 (WebCore::FrameLoader::clientRedirected): 137 (WebCore::FrameLoader::open): 138 (WebCore::FrameLoader::didTellBridgeAboutLoad): 139 (WebCore::FrameLoader::haveToldBridgeAboutLoad): 140 (WebCore::FrameLoader::post): 141 (WebCore::FrameLoader::loadResourceSynchronously): 142 (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy): 143 (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent): 144 (WebCore::FrameLoader::createHistoryItem): 145 (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): 146 (WebCore::FrameLoader::loadItem): 147 (WebCore::FrameLoader::urlsMatchItem): 148 (WebCore::FrameLoader::recursiveGoToItem): 149 (WebCore::FrameLoader::updateHistoryForStandardLoad): 150 (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): 151 * loader/FrameLoader.h: 152 (WebCore::FrameLoader::url): 153 * loader/ImageDocument.cpp: 154 (WebCore::ImageDocument::createDocumentStructure): 155 * loader/MainResourceLoader.cpp: 156 (WebCore::shouldLoadAsEmptyDocument): 157 (WebCore::MainResourceLoader::didFinishLoading): 158 * loader/NavigationAction.cpp: 159 (WebCore::NavigationAction::NavigationAction): 160 * loader/NavigationAction.h: 161 (WebCore::NavigationAction::url): 162 * loader/PluginDocument.cpp: 163 (WebCore::PluginTokenizer::createDocumentStructure): 164 * loader/SubresourceLoader.cpp: 165 (WebCore::SubresourceLoader::load): 166 (WebCore::SubresourceLoader::create): 167 * loader/icon/IconLoader.cpp: 168 (WebCore::IconLoader::startLoading): 169 (WebCore::IconLoader::finishLoading): 170 * loader/loader.cpp: 171 (WebCore::Loader::servePendingRequests): 172 * loader/mac/LoaderNSURLExtras.m: 173 (urlOriginalData): 174 * page/Chrome.cpp: 175 (WebCore::Chrome::setToolTip): 176 * page/ContextMenuController.cpp: 177 (WebCore::ContextMenuController::contextMenuItemSelected): 178 * page/Frame.cpp: 179 (WebCore::Frame::setUserStyleSheetLocation): 180 * page/InspectorController.cpp: 181 (WebCore::InspectorResource::type): 182 (WebCore::addSourceToFrame): 183 (WebCore::InspectorController::addScriptResource): 184 (WebCore::InspectorController::updateScriptResourceRequest): 185 (WebCore::InspectorController::didCommitLoad): 186 * page/mac/WebCoreFrameBridge.mm: 187 (-[WebCoreFrameBridge getData:andResponse:forURL:]): 188 * platform/KURL.h: 189 (WebCore::KURL::string): 190 (WebCore::KURL::deprecatedString): 191 * platform/mac/ClipboardMac.mm: 192 (WebCore::ClipboardMac::getData): 193 * platform/mac/CookieJar.mm: 194 (WebCore::cookies): 195 (WebCore::setCookies): 196 * platform/mac/PasteboardMac.mm: 197 (WebCore::Pasteboard::writeURL): 198 (WebCore::fileWrapperForImage): 199 (WebCore::Pasteboard::writeImage): 200 (WebCore::Pasteboard::plainText): 201 * platform/network/ResourceHandle.cpp: 202 (WebCore::ResourceHandle::portAllowed): 203 * platform/network/ResourceRequestBase.cpp: 204 (WebCore::ResourceRequestBase::isNull): 205 * platform/network/cf/ResourceHandleCFNet.cpp: 206 (WebCore::willSendRequest): 207 (WebCore::didReceiveResponse): 208 (WebCore::didReceiveData): 209 (WebCore::didFinishLoading): 210 (WebCore::didFail): 211 (WebCore::didReceiveChallenge): 212 (WebCore::ResourceHandleInternal::~ResourceHandleInternal): 213 (WebCore::ResourceHandle::~ResourceHandle): 214 (WebCore::ResourceHandle::start): 215 * platform/win/ClipboardUtilitiesWin.cpp: 216 (WebCore::createGlobalData): 217 (WebCore::urlToMarkup): 218 * platform/win/ClipboardWin.cpp: 219 (WebCore::writeURL): 220 (WebCore::writeImageToDataObject): 221 (WebCore::ClipboardWin::writeURL): 222 (WebCore::ClipboardWin::writeRange): 223 * platform/win/PasteboardWin.cpp: 224 (WebCore::Pasteboard::writeSelection): 225 (WebCore::Pasteboard::writeURL): 226 * plugins/win/PluginDatabaseWin.cpp: 227 (WebCore::PluginDatabaseWin::findPlugin): 228 * plugins/win/PluginStreamWin.cpp: 229 (WebCore::PluginStreamWin::startStream): 230 (WebCore::PluginStreamWin::destroyStream): 231 * plugins/win/PluginViewWin.cpp: 232 (WebCore::scriptStringIfJavaScriptURL): 233 (WebCore::PluginViewWin::performRequest): 234 * svg/SVGImageLoader.cpp: 235 (WebCore::SVGImageLoader::updateFromElement): 236 * xml/XMLHttpRequest.cpp: 237 (WebCore::XMLHttpRequest::getResponseXML): 238 (WebCore::XMLHttpRequest::urlMatchesDocumentDomain): 239 * xml/XSLImportRule.cpp: 240 (WebCore::XSLImportRule::loadSheet): 241 * xml/XSLTProcessor.cpp: 242 (WebCore::XSLTProcessor::createDocumentFromSource): 243 (WebCore::xsltStylesheetPointer): 244 (WebCore::xmlDocPtrFromNode): 245 1 246 2007-12-11 Beth Dakin <bdakin@apple.com> 2 247 -
trunk/WebCore/WebCore.base.exp
r28626 r28639 613 613 __ZNK7WebCore14DocumentLoader19originalRequestCopyEv 614 614 __ZNK7WebCore14DocumentLoader21isLoadingMainResourceEv 615 __ZNK7WebCore14DocumentLoader3 URLEv615 __ZNK7WebCore14DocumentLoader3urlEv 616 616 __ZNK7WebCore14DocumentLoader5titleEv 617 617 __ZNK7WebCore14DocumentLoader8responseEv -
trunk/WebCore/bindings/js/kjs_events.cpp
r28468 r28639 301 301 List args; 302 302 303 UString sourceURL(frame->loader()->url(). url());303 UString sourceURL(frame->loader()->url().string()); 304 304 args.append(eventParameterName()); 305 305 args.append(jsString(m_code)); -
trunk/WebCore/bindings/js/kjs_navigator.cpp
r28468 r28639 196 196 case AppVersion: { 197 197 // Version is everything in the user agent string past the "Mozilla/" prefix. 198 const String userAgent = m_frame->loader()->userAgent(m_frame->document() ? m_frame->document()-> URL() : KURL());198 const String userAgent = m_frame->loader()->userAgent(m_frame->document() ? m_frame->document()->url() : KURL()); 199 199 return jsString(userAgent.substring(userAgent.find('/') + 1)); 200 200 } … … 210 210 return jsString(defaultLanguage()); 211 211 case UserAgent: 212 return jsString(m_frame->loader()->userAgent(m_frame->document() ? m_frame->document()-> URL() : KURL()));212 return jsString(m_frame->loader()->userAgent(m_frame->document() ? m_frame->document()->url() : KURL())); 213 213 case Platform: 214 214 return jsString(WEBCORE_NAVIGATOR_PLATFORM); -
trunk/WebCore/bindings/js/kjs_proxy.cpp
r28468 r28639 152 152 153 153 // FIXME: We can get rid of this (and eliminate compatMode entirely). 154 String userAgent = m_frame->loader()->userAgent(m_frame->document() ? m_frame->document()-> URL() : KURL());154 String userAgent = m_frame->loader()->userAgent(m_frame->document() ? m_frame->document()->url() : KURL()); 155 155 if (userAgent.find("Microsoft") >= 0 || userAgent.find("MSIE") >= 0) 156 156 m_globalObject->setCompatMode(IECompat); -
trunk/WebCore/bindings/js/kjs_window.cpp
r28592 r28639 685 685 if (!p->loader()->shouldAllowNavigation(impl()->frame())) 686 686 return; 687 DeprecatedString dstUrl = p->loader()->completeURL(DeprecatedString(value->toString(exec))).url();687 String dstUrl = p->loader()->completeURL(value->toString(exec)).string(); 688 688 if (!dstUrl.startsWith("javascript:", false) || allowsAccessFrom(exec)) { 689 689 bool userGesture = p->scriptProxy()->processingUserGesture(); … … 834 834 // FIXME: this error message should contain more specifics of why the same origin check has failed. 835 835 String message = String::format("Unsafe JavaScript attempt to access frame with URL %s from frame with URL %s. Domains, protocols and ports must match.\n", 836 targetDocument-> URL().utf8().data(), originDocument->URL().utf8().data());836 targetDocument->url().utf8().data(), originDocument->url().utf8().data()); 837 837 838 838 if (Interpreter::shouldPrintExceptions()) … … 1529 1529 if (!frame->loader()->shouldAllowNavigation(m_frame)) 1530 1530 return; 1531 url = frame->loader()->completeURL(str) .url();1531 url = frame->loader()->completeURL(str); 1532 1532 break; 1533 1533 } … … 1571 1571 1572 1572 Frame* activeFrame = Window::retrieveActive(exec)->impl()->frame(); 1573 if (!url. url().startsWith("javascript:", false) || sameDomainAccess) {1573 if (!url.deprecatedString().startsWith("javascript:", false) || sameDomainAccess) { 1574 1574 bool userGesture = activeFrame->scriptProxy()->processingUserGesture(); 1575 m_frame->loader()->scheduleLocationChange(url. url(), activeFrame->loader()->outgoingReferrer(), false, userGesture);1575 m_frame->loader()->scheduleLocationChange(url.string(), activeFrame->loader()->outgoingReferrer(), false, userGesture); 1576 1576 } 1577 1577 } … … 1594 1594 if (!str.startsWith("javascript:", false) || (window && window->allowsAccessFrom(exec))) { 1595 1595 bool userGesture = activeFrame->scriptProxy()->processingUserGesture(); 1596 frame->loader()->scheduleLocationChange(activeFrame->loader()->completeURL(str). url(), activeFrame->loader()->outgoingReferrer(), true, userGesture);1596 frame->loader()->scheduleLocationChange(activeFrame->loader()->completeURL(str).string(), activeFrame->loader()->outgoingReferrer(), true, userGesture); 1597 1597 } 1598 1598 } … … 1614 1614 return jsUndefined(); 1615 1615 1616 if (!frame->loader()->url(). url().startsWith("javascript:", false) || (window && window->allowsAccessFrom(exec))) {1617 bool userGesture = Window::retrieveActive(exec)->impl()->frame()->scriptProxy()->processingUserGesture();1618 frame->loader()->scheduleRefresh(userGesture);1616 if (!frame->loader()->url().deprecatedString().startsWith("javascript:", false) || (window && window->allowsAccessFrom(exec))) { 1617 bool userGesture = Window::retrieveActive(exec)->impl()->frame()->scriptProxy()->processingUserGesture(); 1618 frame->loader()->scheduleRefresh(userGesture); 1619 1619 } 1620 1620 return jsUndefined(); … … 1635 1635 return jsUndefined(); 1636 1636 const Window* window = Window::retrieveWindow(frame); 1637 DeprecatedString dstUrl = activeFrame->loader()->completeURL(DeprecatedString(args[0]->toString(exec))).url();1637 String dstUrl = activeFrame->loader()->completeURL(args[0]->toString(exec)).string(); 1638 1638 if (!dstUrl.startsWith("javascript:", false) || (window && window->allowsAccessFrom(exec))) { 1639 1639 bool userGesture = activeFrame->scriptProxy()->processingUserGesture(); -
trunk/WebCore/bindings/scripts/CodeGenerator.pm
r28318 r28639 1 1 # 2 # KDOMIDL parser2 # WebKit IDL parser 3 3 # 4 4 # Copyright (C) 2005 Nikolas Zimmermann <wildfox@kde.org> 5 5 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 6 # 7 # This file is part of the KDE project 6 # Copyright (C) 2007 Apple Inc. All rights reserved. 8 7 # 9 8 # This library is free software; you can redistribute it and/or … … 360 359 } 361 360 361 # Uppercase the first letter while respecting WebKit style guidelines. 362 # E.g., xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang. 363 sub WK_ucfirst 364 { 365 my ($object, $param) = @_; 366 my $ret = ucfirst($param); 367 $ret =~ s/Xml/XML/ if $ret =~ /^Xml[^a-z]/; 368 return $ret; 369 } 370 371 # Lowercase the first letter while respecting WebKit style guidelines. 372 # URL becomes url, but SetURL becomes setURL. 373 sub WK_lcfirst 374 { 375 my ($object, $param) = @_; 376 my $ret = lcfirst($param); 377 $ret =~ s/uRL/url/; 378 return $ret; 379 } 380 362 381 1; -
trunk/WebCore/bindings/scripts/CodeGeneratorCOM.pm
r27655 r28639 617 617 push(@getterImplementation, " return E_POINTER;\n\n"); 618 618 619 my $implementationGetter = "impl${implementationClassWithoutNamespace}()-> ${attributeName}(" . ($hasGetterException ? "ec" : ""). ")";619 my $implementationGetter = "impl${implementationClassWithoutNamespace}()->" . $codeGenerator->WK_lcfirst($attributeName) . "(" . ($hasGetterException ? "ec" : ""). ")"; 620 620 621 621 push(@getterImplementation, " WebCore::ExceptionCode ec = 0;\n") if $hasGetterException; … … 764 764 765 765 my $callSigBegin = " "; 766 my $callSigMiddle = "${implementationGetter}-> ${functionName}(" . join(", ", @parameterList) . ")";766 my $callSigMiddle = "${implementationGetter}->" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterList) . ")"; 767 767 my $callSigEnd = ";\n"; 768 768 -
trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm
r28570 r28639 82 82 } 83 83 84 # Uppercase the first letter, while respecting WebKit style guidelines.85 # E.g., xmlEncoding becomes XMLEncoding, but xmlllang becomes Xmllang.86 sub WK_ucfirst87 {88 my $param = shift;89 my $ret = ucfirst($param);90 $ret =~ s/Xml/XML/ if $ret =~ /^Xml[^a-z]/;91 return $ret;92 }93 94 84 # Params: 'domClass' struct 95 85 sub GenerateInterface … … 411 401 } 412 402 413 my $value = $ attribute->signature->type =~ /Constructor$/414 ? $attribute->signature->name . "ConstructorAttrNum"415 : WK_ucfirst($attribute->signature->name). "AttrNum";403 my $value = $codeGenerator->WK_ucfirst($attribute->signature->name) 404 . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "") 405 . "AttrNum"; 416 406 $value .= ", " if (($i < $numAttributes - 1) or (($i eq $numAttributes - 1) and (($numFunctions ne 0) or $dataNode->extendedAttributes->{"GenerateConstructor"}))); 417 407 push(@headerContent, $value); … … 432 422 foreach my $attribute (@{$dataNode->attributes}) { 433 423 if ($attribute->signature->extendedAttributes->{"Custom"}) { 434 push(@headerContent, " KJS::JSValue* " . $ attribute->signature->name. "(KJS::ExecState*) const;\n");424 push(@headerContent, " KJS::JSValue* " . $codeGenerator->WK_lcfirst($attribute->signature->name) . "(KJS::ExecState*) const;\n"); 435 425 if ($attribute->type !~ /^readonly/) { 436 push(@headerContent, " void set" . WK_ucfirst($attribute->signature->name) . "(KJS::ExecState*, KJS::JSValue*);\n");426 push(@headerContent, " void set" . $codeGenerator->WK_ucfirst($attribute->signature->name) . "(KJS::ExecState*, KJS::JSValue*);\n"); 437 427 } 438 428 } elsif ($attribute->signature->extendedAttributes->{"CustomGetter"}) { 439 push(@headerContent, " KJS::JSValue* " . $ attribute->signature->name. "(KJS::ExecState*) const;\n");429 push(@headerContent, " KJS::JSValue* " . $codeGenerator->WK_lcfirst($attribute->signature->name) . "(KJS::ExecState*) const;\n"); 440 430 } elsif ($attribute->signature->extendedAttributes->{"CustomSetter"}) { 441 431 if ($attribute->type !~ /^readonly/) { 442 push(@headerContent, " void set" . WK_ucfirst($attribute->signature->name) . "(KJS::ExecState*, KJS::JSValue*);\n");432 push(@headerContent, " void set" . $codeGenerator->WK_ucfirst($attribute->signature->name) . "(KJS::ExecState*, KJS::JSValue*);\n"); 443 433 } 444 434 } … … 454 444 foreach my $function (@{$dataNode->functions}) { 455 445 if ($function->signature->extendedAttributes->{"Custom"}) { 456 push(@headerContent, " KJS::JSValue* " . $ function->signature->name. "(KJS::ExecState*, const KJS::List&);\n");446 push(@headerContent, " KJS::JSValue* " . $codeGenerator->WK_lcfirst($function->signature->name) . "(KJS::ExecState*, const KJS::List&);\n"); 457 447 } 458 448 } … … 552 542 push(@headerContent,"// Functions\n\n"); 553 543 foreach my $function (@{$dataNode->functions}) { 554 push(@headerContent, prototypeFunctionFor($className, WK_ucfirst($function->signature->name)));544 push(@headerContent, prototypeFunctionFor($className, $codeGenerator->WK_ucfirst($function->signature->name))); 555 545 } 556 546 } … … 623 613 push(@hashKeys, $name); 624 614 625 my $value = $className . "::" . ($attribute->signature->type =~ /Constructor$/626 ? $attribute->signature->name . "ConstructorAttrNum"627 : WK_ucfirst($attribute->signature->name) . "AttrNum");615 my $value = $className . "::" . $codeGenerator->WK_ucfirst($attribute->signature->name) 616 . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "") 617 . "AttrNum"; 628 618 push(@hashValues, $value); 629 619 … … 715 705 push(@hashKeys, $name); 716 706 717 my $value = "&" . $className . "PrototypeFunction" . WK_ucfirst($name) . "::create";707 my $value = "&" . $className . "PrototypeFunction" . $codeGenerator->WK_ucfirst($name) . "::create"; 718 708 push(@hashValues, $value); 719 709 … … 908 898 909 899 foreach my $attribute (@{$dataNode->attributes}) { 910 my $ name = $attribute->signature->name;900 my $getterFunctionName = $codeGenerator->WK_lcfirst($attribute->signature->name); 911 901 912 902 my $implClassNameForValueConversion = ""; … … 915 905 } 916 906 917 if ($attribute->signature->type =~ /Constructor$/) { 918 push(@implContent, " case " . $name . "ConstructorAttrNum: {\n"); 919 } else { 920 push(@implContent, " case " . WK_ucfirst($name) . "AttrNum: {\n"); 921 } 907 push(@implContent, " case " . $codeGenerator->WK_ucfirst($attribute->signature->name) 908 . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "") 909 . "AttrNum: {\n"); 922 910 923 911 if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} && !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurity"}) { … … 927 915 928 916 if ($attribute->signature->extendedAttributes->{"Custom"} || $attribute->signature->extendedAttributes->{"CustomGetter"}) { 929 push(@implContent, " return $ name(exec);\n");917 push(@implContent, " return $getterFunctionName(exec);\n"); 930 918 } elsif ($attribute->signature->extendedAttributes->{"CheckNodeSecurity"}) { 931 919 $implIncludes{"kjs_dom.h"} = 1; 932 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n \n");933 push(@implContent, " return checkNodeSecurity(exec, imp->$ name()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$name()") . " : jsUndefined();\n");920 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n"); 921 push(@implContent, " return checkNodeSecurity(exec, imp->$getterFunctionName()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$getterFunctionName()") . " : jsUndefined();\n"); 934 922 } elsif ($attribute->signature->extendedAttributes->{"CheckFrameSecurity"}) { 935 923 $implIncludes{"Document.h"} = 1; 936 924 $implIncludes{"kjs_dom.h"} = 1; 937 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n \n");938 push(@implContent, " return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$ name()") . " : jsUndefined();\n");925 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n"); 926 push(@implContent, " return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$getterFunctionName()") . " : jsUndefined();\n"); 939 927 } elsif ($attribute->signature->type =~ /Constructor$/) { 940 928 my $constructorType = $codeGenerator->StripModule($attribute->signature->type); … … 943 931 } elsif (!@{$attribute->getterExceptions}) { 944 932 if ($podType) { 945 push(@implContent, " $podType imp(*impl());\n \n");933 push(@implContent, " $podType imp(*impl());\n"); 946 934 if ($podType eq "float") { # Special case for JSSVGNumber 947 935 push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp") . ";\n"); 948 936 } else { 949 push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$ name()") . ";\n");937 push(@implContent, " return " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$getterFunctionName()") . ";\n"); 950 938 } 951 939 } else { 952 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n \n");940 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n"); 953 941 my $type = $codeGenerator->StripModule($attribute->signature->type); 954 my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$name()"); 955 942 my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$getterFunctionName()"); 956 943 if ($codeGenerator->IsSVGAnimatedType($type)) { 957 944 push(@implContent, " RefPtr<$type> obj = $jsType;\n"); … … 965 952 966 953 if ($podType) { 967 push(@implContent, " $podType imp(*impl());\n \n");968 push(@implContent, " KJS::JSValue* result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$ name(ec)") . ";\n");954 push(@implContent, " $podType imp(*impl());\n"); 955 push(@implContent, " KJS::JSValue* result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$getterFunctionName(ec)") . ";\n"); 969 956 } else { 970 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n \n");971 push(@implContent, " KJS::JSValue* result = " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$ name(ec)") . ";\n");957 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n"); 958 push(@implContent, " KJS::JSValue* result = " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$getterFunctionName(ec)") . ";\n"); 972 959 } 973 960 … … 1018 1005 if ($attribute->type !~ /^readonly/) { 1019 1006 my $name = $attribute->signature->name; 1020 1021 if ($attribute->signature->type =~ /Constructor$/) { 1022 push(@implContent, " case " . $name ."ConstructorAttrNum: {\n"); 1023 } else { 1024 push(@implContent, " case " . WK_ucfirst($name) . "AttrNum: {\n"); 1025 } 1007 my $setterFunctionName = $codeGenerator->WK_ucfirst($name); 1008 1009 push(@implContent, " case " . $codeGenerator->WK_ucfirst($attribute->signature->name) 1010 . ($attribute->signature->type =~ /Constructor$/ ? "Constructor" : "") 1011 . "AttrNum: {\n"); 1026 1012 1027 1013 if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} && !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurity"}) { … … 1031 1017 1032 1018 if ($attribute->signature->extendedAttributes->{"Custom"} || $attribute->signature->extendedAttributes->{"CustomSetter"}) { 1033 push(@implContent, " set " . WK_ucfirst($name) . "(exec, value);\n");1019 push(@implContent, " set$setterFunctionName(exec, value);\n"); 1034 1020 } elsif ($attribute->signature->type =~ /Constructor$/) { 1035 1021 my $constructorType = $attribute->signature->type; … … 1042 1028 } else { 1043 1029 if ($podType) { 1044 push(@implContent, " $podType imp(*impl());\n \n");1030 push(@implContent, " $podType imp(*impl());\n"); 1045 1031 if ($podType eq "float") { # Special case for JSSVGNumber 1046 1032 push(@implContent, " imp = " . JSValueToNative($attribute->signature, "value") . ";\n"); 1047 1033 } else { 1048 push(@implContent, " imp.set " . WK_ucfirst($name) . "(" . JSValueToNative($attribute->signature, "value") . ");\n");1034 push(@implContent, " imp.set$setterFunctionName(" . JSValueToNative($attribute->signature, "value") . ");\n"); 1049 1035 } 1050 1036 push(@implContent, " m_impl->commitChange(exec, imp);\n"); 1051 1037 } else { 1052 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n \n");1038 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(impl());\n"); 1053 1039 push(@implContent, " ExceptionCode ec = 0;\n") if @{$attribute->setterExceptions}; 1054 push(@implContent, " imp->set " . WK_ucfirst($name) . "(" . JSValueToNative($attribute->signature, "value"));1040 push(@implContent, " imp->set$setterFunctionName(" . JSValueToNative($attribute->signature, "value")); 1055 1041 push(@implContent, ", ec") if @{$attribute->setterExceptions}; 1056 1042 push(@implContent, ");\n"); … … 1082 1068 if ($numFunctions > 0) { 1083 1069 foreach my $function (@{$dataNode->functions}) { 1084 my $functionClassName = $className . "PrototypeFunction" . WK_ucfirst($function->signature->name);1070 my $functionClassName = $className . "PrototypeFunction" . $codeGenerator->WK_ucfirst($function->signature->name); 1085 1071 push(@implContent, "JSValue* ${functionClassName}::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)\n"); 1086 1072 push(@implContent, "{\n"); 1087 1073 push(@implContent, " if (!thisObj->inherits(&${className}::info))\n"); 1088 push(@implContent, " return throwError(exec, TypeError);\n\n");1074 push(@implContent, " return throwError(exec, TypeError);\n"); 1089 1075 1090 1076 AddIncludesForType($function->signature->type); … … 1093 1079 1094 1080 if ($function->signature->extendedAttributes->{"Custom"}) { 1095 push(@implContent, " return castedThisObj->" . $ function->signature->name. "(exec, args);\n");1081 push(@implContent, " return castedThisObj->" . $codeGenerator->WK_lcfirst($function->signature->name) . "(exec, args);\n"); 1096 1082 } else { 1097 1083 if ($podType) { 1098 1084 push(@implContent, " JSSVGPODTypeWrapper<$podType>* wrapper = castedThisObj->impl();\n"); 1099 push(@implContent, " $podType imp(*wrapper);\n \n");1085 push(@implContent, " $podType imp(*wrapper);\n"); 1100 1086 } else { 1101 1087 push(@implContent, " $implClassName* imp = static_cast<$implClassName*>(castedThisObj->impl());\n"); … … 1120 1106 1121 1107 my $paramIndex = 0; 1122 my $functionString = "imp" . ($podType ? "." : "->") . $ function->signature->name. "(";1108 my $functionString = "imp" . ($podType ? "." : "->") . $codeGenerator->WK_lcfirst($function->signature->name) . "("; 1123 1109 1124 1110 my $hasOptionalArguments = 0; … … 1267 1253 1268 1254 if ($podType) { 1269 push(@implContent, $indent . "wrapper->commitChange(exec, imp);\n \n");1255 push(@implContent, $indent . "wrapper->commitChange(exec, imp);\n"); 1270 1256 push(@implContent, $indent . "if (castedThisObj->context())\n"); 1271 1257 push(@implContent, $indent . " castedThisObj->context()->notifyAttributeChange();\n"); … … 1278 1264 1279 1265 if ($podType) { 1280 push(@implContent, $indent . "wrapper->commitChange(exec, imp);\n \n");1266 push(@implContent, $indent . "wrapper->commitChange(exec, imp);\n"); 1281 1267 push(@implContent, $indent . "if (castedThisObj->context())\n"); 1282 1268 push(@implContent, $indent . " castedThisObj->context()->notifyAttributeChange();\n"); … … 1462 1448 $getter =~ s/\(\)//; 1463 1449 1464 my $setter = "set" . WK_ucfirst($getter);1450 my $setter = "set" . $codeGenerator->WK_ucfirst($getter); 1465 1451 1466 1452 if ($implClassNameForValueConversion eq "") { -
trunk/WebCore/bindings/scripts/CodeGeneratorObjC.pm
r27924 r28639 204 204 } 205 205 206 # Uppercase the first letter, while respecting WebKit style guidelines.207 # E.g., xmlEncoding becomes XMLEncoding, but xmllang becomes Xmllang.208 sub WK_ucfirst209 {210 my $param = shift;211 my $ret = ucfirst($param);212 $ret =~ s/Xml/XML/ if $ret =~ /^Xml[^a-z]/;213 return $ret;214 }215 216 206 sub ReadPublicInterfaces 217 207 { … … 1066 1056 my $getterSig = "- ($attributeType)$attributeInterfaceName\n"; 1067 1057 my $hasGetterException = @{$attribute->getterExceptions}; 1068 my $getterContentHead = "IMPL-> $attributeName(";1058 my $getterContentHead = "IMPL->" . $codeGenerator->WK_lcfirst($attributeName) . "("; 1069 1059 my $getterContentTail = ")"; 1070 1060 … … 1164 1154 my $hasSetterException = @{$attribute->setterExceptions}; 1165 1155 1166 $attributeName = "set" . WK_ucfirst($attributeName);1156 $attributeName = "set" . $codeGenerator->WK_ucfirst($attributeName); 1167 1157 my $setterName = "set" . ucfirst($attributeInterfaceName); 1168 1158 my $argName = "new" . ucfirst($attributeInterfaceName); … … 1296 1286 1297 1287 push(@parameterNames, "ec") if $raisesExceptions and !($svgMatrixRotateFromVector || $svgMatrixInverse); 1298 my $content = $caller . "->" . $ functionName. "(" . join(", ", @parameterNames) . ")";1288 my $content = $caller . "->" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterNames) . ")"; 1299 1289 1300 1290 if ($svgMatrixRotateFromVector) { -
trunk/WebCore/css/CSSImportRule.cpp
r25754 r28639 91 91 if (!parentSheet->href().isNull()) 92 92 // use parent styleheet's URL as the base URL 93 absHref = KURL(parentSheet->href().deprecatedString(), m_strHref.deprecatedString()). url();93 absHref = KURL(parentSheet->href().deprecatedString(), m_strHref.deprecatedString()).string(); 94 94 95 95 // Check for a cycle in our import chain. If we encounter a stylesheet -
trunk/WebCore/css/CSSParser.cpp
r27978 r28639 822 822 if (!uri.isEmpty()) { 823 823 list->append(new CSSCursorImageValue( 824 String(KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).url()),824 KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).string(), 825 825 hotspot, styleElement)); 826 826 } … … 885 885 if (!uri.isEmpty()) { 886 886 parsedValue = new CSSImageValue( 887 String(KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).url()),887 KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).string(), 888 888 styleElement); 889 889 valueList->next(); … … 1850 1850 String value = parseURL(domString(val->string)); 1851 1851 parsedValue = new CSSImageValue( 1852 String(KURL(styleElement->baseURL().deprecatedString(), value.deprecatedString()).url()), styleElement);1852 KURL(styleElement->baseURL().deprecatedString(), value.deprecatedString()).string(), styleElement); 1853 1853 } else if (val->unit == Value::Function) { 1854 1854 // attr(X) | counter(X [,Y]) | counters(X, Y, [,Z]) … … 1916 1916 String uri = parseURL(domString(valueList->current()->string)); 1917 1917 if (!uri.isEmpty()) 1918 value = new CSSImageValue( String(KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).url()),1918 value = new CSSImageValue(KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).string(), 1919 1919 styleElement); 1920 1920 return true; … … 2762 2762 if (val->unit == CSSPrimitiveValue::CSS_URI && !expectComma) { 2763 2763 String value = parseURL(domString(val->string)); 2764 parsedValue = new CSSFontFaceSrcValue( String(KURL(styleElement->baseURL().deprecatedString(), value.deprecatedString()).url()), false);2764 parsedValue = new CSSFontFaceSrcValue(KURL(styleElement->baseURL().deprecatedString(), value.deprecatedString()).string(), false); 2765 2765 uriValue = parsedValue; 2766 2766 allowFormat = true; … … 3217 3217 return false; 3218 3218 3219 context.commitImage(new CSSImageValue( String(KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).url()),3219 context.commitImage(new CSSImageValue(KURL(styleElement->baseURL().deprecatedString(), uri.deprecatedString()).string(), 3220 3220 styleElement)); 3221 3221 while ((val = valueList->next())) { … … 3779 3779 } 3780 3780 3781 CSSRule* CSSParser::createImportRule(const ParseString& URL, MediaList* media)3781 CSSRule* CSSParser::createImportRule(const ParseString& url, MediaList* media) 3782 3782 { 3783 3783 if (!media) … … 3787 3787 if (!styleElement->isCSSStyleSheet()) 3788 3788 return 0; 3789 CSSImportRule* rule = new CSSImportRule(styleElement, domString( URL), media);3789 CSSImportRule* rule = new CSSImportRule(styleElement, domString(url), media); 3790 3790 m_parsedStyleObjects.append(rule); 3791 3791 return rule; -
trunk/WebCore/css/CSSStyleSelector.cpp
r28536 r28639 324 324 u.setQuery(DeprecatedString::null); 325 325 u.setRef(DeprecatedString::null); 326 encodedurl.file = u. url();326 encodedurl.file = u.deprecatedString(); 327 327 int pos = encodedurl.file.findRev('/'); 328 328 encodedurl.path = encodedurl.file; … … 332 332 } 333 333 u.setPath(DeprecatedString::null); 334 encodedurl.host = u. url();334 encodedurl.host = u.deprecatedString(); 335 335 } 336 336 -
trunk/WebCore/dom/Document.cpp
r28626 r28639 1820 1820 if (frame && parseHTTPRefresh(content, true, delay, url)) { 1821 1821 if (url.isEmpty()) 1822 url = frame->loader()->url(). url();1822 url = frame->loader()->url().string(); 1823 1823 else 1824 1824 url = completeURL(url); … … 2561 2561 String Document::cookie() const 2562 2562 { 2563 return cookies( URL());2563 return cookies(url()); 2564 2564 } 2565 2565 2566 2566 void Document::setCookie(const String& value) 2567 2567 { 2568 setCookies( URL(), policyBaseURL().deprecatedString(), value);2568 setCookies(url(), policyBaseURL().deprecatedString(), value); 2569 2569 } 2570 2570 … … 2579 2579 { 2580 2580 if (m_domain.isEmpty()) // not set yet (we set it on demand to save time and space) 2581 m_domain = KURL( URL()).host(); // Initially set to the host2581 m_domain = KURL(url()).host(); // Initially set to the host 2582 2582 return m_domain; 2583 2583 } … … 2588 2588 // Initially set to the host 2589 2589 if (m_domain.isEmpty()) 2590 m_domain = KURL( URL()).host();2590 m_domain = KURL(url()).host(); 2591 2591 2592 2592 // Both NS and IE specify that changing the domain is only allowed when … … 2735 2735 } 2736 2736 2737 HTMLMapElement *Document::getImageMap(const String& URL) const2738 { 2739 if ( URL.isNull())2737 HTMLMapElement *Document::getImageMap(const String& url) const 2738 { 2739 if (url.isNull()) 2740 2740 return 0; 2741 int hashPos = URL.find('#');2742 String name = (hashPos < 0 ? URL : URL.substring(hashPos + 1)).impl();2741 int hashPos = url.find('#'); 2742 String name = (hashPos < 0 ? url : url.substring(hashPos + 1)).impl(); 2743 2743 AtomicString mapName = hMode == XHtml ? name : name.lower(); 2744 2744 return m_imageMapsByName.get(mapName.impl()); … … 2757 2757 } 2758 2758 2759 DeprecatedString Document::completeURL(const DeprecatedString& URL)2759 DeprecatedString Document::completeURL(const DeprecatedString& url) 2760 2760 { 2761 2761 // FIXME: This treats null URLs the same as empty URLs, unlike the String function below. … … 2763 2763 // If both the URL and base URL are empty, like they are for documents 2764 2764 // created using DOMImplementation::createDocument, just return the passed in URL. 2765 // (We do this because URL() returns "about:blank" for empty URLs.2765 // (We do this because url() returns "about:blank" for empty URLs. 2766 2766 if (m_url.isEmpty() && m_baseURL.isEmpty()) 2767 return URL;2767 return url; 2768 2768 if (!m_decoder) 2769 return KURL(baseURL(), URL).url();2770 return KURL(baseURL(), URL, m_decoder->encoding()).url();2771 } 2772 2773 String Document::completeURL(const String &URL)2769 return KURL(baseURL(), url).deprecatedString(); 2770 return KURL(baseURL(), url, m_decoder->encoding()).deprecatedString(); 2771 } 2772 2773 String Document::completeURL(const String& url) 2774 2774 { 2775 2775 // FIXME: This always returns null when passed a null URL, unlike the String function above. 2776 if ( URL.isNull())2777 return URL;2778 return completeURL( URL.deprecatedString());2776 if (url.isNull()) 2777 return url; 2778 return completeURL(url.deprecatedString()); 2779 2779 } 2780 2780 -
trunk/WebCore/dom/Document.h
r28626 r28639 362 362 bool wellFormed() const { return m_wellFormed; } 363 363 364 DeprecatedString URL() const { return m_url.isEmpty() ? "about:blank" : m_url; }364 DeprecatedString url() const { return m_url.isEmpty() ? "about:blank" : m_url; } 365 365 void setURL(const DeprecatedString& url); 366 366 367 DeprecatedString baseURL() const { return m_baseURL.isEmpty() ? URL() : m_baseURL; }367 DeprecatedString baseURL() const { return m_baseURL.isEmpty() ? url() : m_baseURL; } 368 368 void setBaseURL(const DeprecatedString& baseURL); 369 369 … … 577 577 void addImageMap(HTMLMapElement*); 578 578 void removeImageMap(HTMLMapElement*); 579 HTMLMapElement* getImageMap(const String& URL) const;579 HTMLMapElement* getImageMap(const String& url) const; 580 580 581 581 HTMLElement* body(); -
trunk/WebCore/dom/Element.cpp
r27701 r28639 564 564 565 565 if (!xmlbase.protocol().isEmpty()) 566 return xmlbase. url();566 return xmlbase.string(); 567 567 568 568 Node* parent = parentNode(); 569 569 if (parent) 570 return KURL(parent->baseURI().deprecatedString(), xmlbase. url()).url();571 572 return xmlbase. url();570 return KURL(parent->baseURI().deprecatedString(), xmlbase.deprecatedString()).string(); 571 572 return xmlbase.string(); 573 573 } 574 574 -
trunk/WebCore/dom/ProcessingInstruction.h
r27690 r28639 58 58 StyleSheet* sheet() const { return m_sheet.get(); } 59 59 bool checkStyleSheet(); 60 virtual void setCSSStyleSheet(const String& URL, const String& charset, const String& sheet);60 virtual void setCSSStyleSheet(const String& url, const String& charset, const String& sheet); 61 61 #if ENABLE(XSLT) 62 virtual void setXSLStyleSheet(const String& URL, const String& sheet);62 virtual void setXSLStyleSheet(const String& url, const String& sheet); 63 63 #endif 64 64 void setCSSStyleSheet(CSSStyleSheet*); -
trunk/WebCore/dom/StyledElement.cpp
r27617 r28639 294 294 } 295 295 296 void StyledElement::addCSSImageProperty(MappedAttribute* attr, int id, const String &URL)296 void StyledElement::addCSSImageProperty(MappedAttribute* attr, int id, const String& url) 297 297 { 298 298 if (!attr->decl()) createMappedDecl(attr); 299 attr->decl()->setImageProperty(id, URL, false);299 attr->decl()->setImageProperty(id, url, false); 300 300 } 301 301 -
trunk/WebCore/dom/StyledElement.h
r25754 r28639 50 50 void addCSSProperty(MappedAttribute* attr, int id, int value); 51 51 void addCSSStringProperty(MappedAttribute* attr, int id, const String &value, CSSPrimitiveValue::UnitTypes = CSSPrimitiveValue::CSS_STRING); 52 void addCSSImageProperty(MappedAttribute* attr, int id, const String &URL);52 void addCSSImageProperty(MappedAttribute*, int propertyID, const String& url); 53 53 void addCSSColor(MappedAttribute* attr, int id, const String &c); 54 54 void createMappedDecl(MappedAttribute* attr); -
trunk/WebCore/dom/XMLTokenizer.cpp
r28028 r28639 846 846 scriptCode += static_cast<CharacterData*>(child)->data(); 847 847 } 848 m_view->frame()->loader()->executeScript(m_doc-> URL(), m_scriptStartLine - 1, scriptCode);848 m_view->frame()->loader()->executeScript(m_doc->url(), m_scriptStartLine - 1, scriptCode); 849 849 } 850 850 … … 1275 1275 #if ENABLE(XSLT) 1276 1276 if (m_sawXSLTransform) { 1277 m_doc->setTransformSource(xmlDocPtrForString(m_doc->docLoader(), m_originalSourceForTransform, m_doc-> URL()));1277 m_doc->setTransformSource(xmlDocPtrForString(m_doc->docLoader(), m_originalSourceForTransform, m_doc->url())); 1278 1278 1279 1279 m_doc->setParsing(false); // Make the doc think it's done, so it will apply xsl sheets. … … 1918 1918 scriptCode += static_cast<CharacterData*>(child)->data(); 1919 1919 } 1920 m_view->frame()->loader()->executeScript(m_doc-> URL(), m_scriptStartLine - 1, scriptCode);1920 m_view->frame()->loader()->executeScript(m_doc->url(), m_scriptStartLine - 1, scriptCode); 1921 1921 } 1922 1922 m_requestingScript = false; -
trunk/WebCore/dom/XMLTokenizer.h
r28028 r28639 171 171 172 172 #if ENABLE(XSLT) 173 void* xmlDocPtrForString(DocLoader*, const String& source, const DeprecatedString& URL);173 void* xmlDocPtrForString(DocLoader*, const String& source, const DeprecatedString& url); 174 174 void setLoaderForLibXMLCallbacks(DocLoader*); 175 175 #endif -
trunk/WebCore/editing/Editor.cpp
r28631 r28639 938 938 Document* document = m_frame->document(); 939 939 if (HTMLImageElement* imageElement = imageElementFromImageDocument(document)) 940 Pasteboard::generalPasteboard()->writeImage(imageElement, document-> URL(), document->title());940 Pasteboard::generalPasteboard()->writeImage(imageElement, document->url(), document->title()); 941 941 else 942 942 Pasteboard::generalPasteboard()->writeSelection(selectedRange().get(), canSmartCopyOrDelete(), m_frame); -
trunk/WebCore/editing/markup.cpp
r27495 r28639 552 552 Attribute* attr = attrs->attributeItem(i); 553 553 if (e->isURLAttribute(attr)) { 554 String completedURL = KURL(baseURLAsKURL, attr->value().deprecatedString()). url();554 String completedURL = KURL(baseURLAsKURL, attr->value().deprecatedString()).string(); 555 555 changes.append(AttributeChange(e, attr->name(), completedURL)); 556 556 } -
trunk/WebCore/history/CachedPage.h
r28468 r28639 61 61 FrameView* view() const { return m_view.get(); } 62 62 Node* mousePressNode() const { return m_mousePressNode.get(); } 63 const KURL& URL() const { return m_URL; }63 const KURL& url() const { return m_URL; } 64 64 void restore(Page*); 65 65 -
trunk/WebCore/history/HistoryItem.cpp
r27776 r28639 75 75 76 76 HistoryItem::HistoryItem(const KURL& url, const String& title) 77 : m_urlString(url. url())78 , m_originalURLString(url. url())77 : m_urlString(url.string()) 78 , m_originalURLString(url.string()) 79 79 , m_title(title) 80 80 , m_lastVisitedTime(0) … … 87 87 88 88 HistoryItem::HistoryItem(const KURL& url, const String& target, const String& parent, const String& title) 89 : m_urlString(url. url())90 , m_originalURLString(url. url())89 : m_urlString(url.string()) 90 , m_originalURLString(url.string()) 91 91 , m_target(target) 92 92 , m_parent(parent) … … 210 210 { 211 211 pageCache()->remove(this); 212 setURLString(url. url());212 setURLString(url.string()); 213 213 clearDocumentState(); 214 214 } … … 389 389 { 390 390 // FIXME: We should find a better way to check if this is the current document. 391 return urlString() == doc-> URL();391 return urlString() == doc->url(); 392 392 } 393 393 -
trunk/WebCore/html/HTMLBaseElement.cpp
r25754 r28639 80 80 81 81 if (!m_href.isEmpty() && document()->frame()) 82 document()->setBaseURL(KURL(document()->frame()->loader()->url(), m_href.deprecatedString()). url());82 document()->setBaseURL(KURL(document()->frame()->loader()->url(), m_href.deprecatedString()).deprecatedString()); 83 83 84 84 if (!m_target.isEmpty()) -
trunk/WebCore/html/HTMLParser.cpp
r27951 r28639 1479 1479 message.replace("%tag2", tag2); 1480 1480 1481 page->chrome()->addMessageToConsole(HTMLMessageSource, isWarning(errorCode) ? WarningMessageLevel: ErrorMessageLevel, message, lineNumber, document-> URL());1482 } 1483 1484 } 1481 page->chrome()->addMessageToConsole(HTMLMessageSource, isWarning(errorCode) ? WarningMessageLevel: ErrorMessageLevel, message, lineNumber, document->url()); 1482 } 1483 1484 } -
trunk/WebCore/html/HTMLScriptElement.cpp
r28612 r28639 65 65 // we evaluate the script. 66 66 if (!m_createdByParser && inDocument() && firstChild()) 67 evaluateScript(document()-> URL(), text());67 evaluateScript(document()->url(), text()); 68 68 } 69 69 … … 138 138 String scriptString = text(); 139 139 if (!scriptString.isEmpty()) 140 evaluateScript(document()-> URL(), scriptString);140 evaluateScript(document()->url(), scriptString); 141 141 } 142 142 … … 246 246 } 247 247 248 void HTMLScriptElement::evaluateScript(const String& URL, const String& script)248 void HTMLScriptElement::evaluateScript(const String& url, const String& script) 249 249 { 250 250 if (m_evaluated) … … 259 259 if (proxy) { 260 260 m_evaluated = true; 261 proxy->evaluate( URL, 0, script);261 proxy->evaluate(url, 0, script); 262 262 Document::updateDocumentsRendering(); 263 263 } -
trunk/WebCore/html/HTMLScriptElement.h
r25754 r28639 1 1 /* 2 * This file is part of the DOM implementation for KDE.3 *4 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 5 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 7 5 * 8 6 * This library is free software; you can redistribute it and/or … … 22 20 * 23 21 */ 22 24 23 #ifndef HTMLScriptElement_h 25 24 #define HTMLScriptElement_h 26 25 26 #include "CachedResourceClient.h" 27 27 #include "HTMLElement.h" 28 #include "CachedResourceClient.h"29 28 30 29 namespace WebCore { … … 32 31 class CachedScript; 33 32 34 class HTMLScriptElement : public HTMLElement, public CachedResourceClient 35 { 33 class HTMLScriptElement : public HTMLElement, public CachedResourceClient { 36 34 public: 37 HTMLScriptElement(Document *doc);35 HTMLScriptElement(Document*); 38 36 ~HTMLScriptElement(); 39 37 … … 42 40 virtual bool checkDTD(const Node* newChild) { return newChild->isTextNode(); } 43 41 44 virtual void parseMappedAttribute(MappedAttribute *attr);42 virtual void parseMappedAttribute(MappedAttribute*); 45 43 virtual void insertedIntoDocument(); 46 44 virtual void removedFromDocument(); 47 virtual void notifyFinished(CachedResource *finishedObj);45 virtual void notifyFinished(CachedResource*); 48 46 49 47 virtual void childrenChanged(); 50 48 51 virtual bool isURLAttribute(Attribute *attr) const;49 virtual bool isURLAttribute(Attribute*) const; 52 50 53 51 void setCreatedByParser(bool createdByParser) { m_createdByParser = createdByParser; } … … 55 53 56 54 bool shouldExecuteAsJavaScript(); 57 void evaluateScript(const String &URL, const String &script);55 void evaluateScript(const String& url, const String& script); 58 56 59 57 String text() const; -
trunk/WebCore/html/HTMLTokenizer.cpp
r27886 r28639 506 506 return state; 507 507 m_executingScript++; 508 DeprecatedString url = scriptURL.isNull() ? m_doc->frame()->document()-> URL() : scriptURL;508 DeprecatedString url = scriptURL.isNull() ? m_doc->frame()->document()->url() : scriptURL; 509 509 510 510 SegmentedString *savedPrependingSrc = currentPrependingSrc; -
trunk/WebCore/loader/Cache.cpp
r26484 r28639 67 67 case CachedResource::ImageResource: 68 68 // User agent images need to null check the docloader. No other resources need to. 69 return new CachedImage(docLoader, url. url(), true /* for cache */);69 return new CachedImage(docLoader, url.string(), true /* for cache */); 70 70 case CachedResource::CSSStyleSheet: 71 return new CachedCSSStyleSheet(docLoader, url. url(), *charset, skipCanLoadCheck, sendResourceLoadCallbacks);71 return new CachedCSSStyleSheet(docLoader, url.string(), *charset, skipCanLoadCheck, sendResourceLoadCallbacks); 72 72 case CachedResource::Script: 73 return new CachedScript(docLoader, url. url(), *charset);73 return new CachedScript(docLoader, url.string(), *charset); 74 74 case CachedResource::FontResource: 75 return new CachedFont(docLoader, url. url());75 return new CachedFont(docLoader, url.string()); 76 76 #if ENABLE(XSLT) 77 77 case CachedResource::XSLStyleSheet: 78 return new CachedXSLStyleSheet(docLoader, url. url());78 return new CachedXSLStyleSheet(docLoader, url.string()); 79 79 #endif 80 80 #if ENABLE(XBL) 81 81 case CachedResource::XBLStyleSheet: 82 return new CachedXBLDocument(docLoader, url. url());82 return new CachedXBLDocument(docLoader, url.string()); 83 83 #endif 84 84 default: … … 97 97 98 98 // Look up the resource in our map. 99 CachedResource* resource = m_resources.get(url. url());99 CachedResource* resource = m_resources.get(url.string()); 100 100 101 101 if (resource) { … … 111 111 Document* doc = docLoader->doc(); 112 112 if(doc) 113 FrameLoader::reportLocalLoadFailed(doc->page(), url. url());113 FrameLoader::reportLocalLoadFailed(doc->page(), url.string()); 114 114 115 115 return 0; … … 121 121 ASSERT(resource->inCache()); 122 122 if (!disabled()) { 123 m_resources.set(url. url(), resource); // The size will be added in later once the resource is loaded and calls back to us with the new size.123 m_resources.set(url.string(), resource); // The size will be added in later once the resource is loaded and calls back to us with the new size. 124 124 125 125 // This will move the resource to the front of its LRU list and increase its access count. -
trunk/WebCore/loader/CachedCSSStyleSheet.cpp
r27937 r28639 93 93 CachedResourceClientWalker w(m_clients); 94 94 while (CachedResourceClient *c = w.next()) 95 c->setCSSStyleSheet(m_response.url(). url(), m_decoder->encoding().name(), m_sheet);95 c->setCSSStyleSheet(m_response.url().string(), m_decoder->encoding().name(), m_sheet); 96 96 97 97 #if USE(LOW_BANDWIDTH_DISPLAY) -
trunk/WebCore/loader/CachedResource.cpp
r25754 r28639 36 36 namespace WebCore { 37 37 38 CachedResource::CachedResource(const String& URL, Type type, bool forCache, bool sendResourceLoadCallbacks) 39 : m_lastDecodedAccessTime(0) 38 CachedResource::CachedResource(const String& url, Type type, bool forCache, bool sendResourceLoadCallbacks) 39 : m_url(url) 40 , m_lastDecodedAccessTime(0) 40 41 , m_sendResourceLoadCallbacks(sendResourceLoadCallbacks) 41 42 , m_inCache(forCache) 42 43 , m_docLoader(0) 43 44 { 44 m_url = URL;45 45 m_type = type; 46 46 m_status = Pending; -
trunk/WebCore/loader/CachedResource.h
r27937 r28639 63 63 New, // inserting new item 64 64 Pending, // only partially loaded 65 Cached // regular case65 Cached // regular case 66 66 }; 67 67 68 CachedResource(const String& URL, Type, bool forCache = true, bool sendResourceLoadCallbacks = false);68 CachedResource(const String& url, Type, bool forCache = true, bool sendResourceLoadCallbacks = false); 69 69 virtual ~CachedResource(); 70 70 -
trunk/WebCore/loader/CachedScript.h
r27937 r28639 38 38 class CachedScript : public CachedResource { 39 39 public: 40 CachedScript(DocLoader*, const String& URL, const String& charset);40 CachedScript(DocLoader*, const String& url, const String& charset); 41 41 virtual ~CachedScript(); 42 42 -
trunk/WebCore/loader/DocLoader.cpp
r26702 r28639 68 68 return; //Don't reload resources while pasting 69 69 if (m_cachePolicy == CachePolicyVerify) { 70 if (!m_reloadedURLs.contains(fullURL. url())) {71 CachedResource* existing = cache()->resourceForURL(fullURL. url());70 if (!m_reloadedURLs.contains(fullURL.string())) { 71 CachedResource* existing = cache()->resourceForURL(fullURL.string()); 72 72 if (existing && existing->isExpired()) { 73 73 cache()->remove(existing); 74 m_reloadedURLs.add(fullURL. url());74 m_reloadedURLs.add(fullURL.string()); 75 75 } 76 76 } 77 77 } else if ((m_cachePolicy == CachePolicyReload) || (m_cachePolicy == CachePolicyRefresh)) { 78 if (!m_reloadedURLs.contains(fullURL. url())) {79 CachedResource* existing = cache()->resourceForURL(fullURL. url());78 if (!m_reloadedURLs.contains(fullURL.string())) { 79 CachedResource* existing = cache()->resourceForURL(fullURL.string()); 80 80 if (existing) 81 81 cache()->remove(existing); 82 m_reloadedURLs.add(fullURL. url());82 m_reloadedURLs.add(fullURL.string()); 83 83 } 84 84 } … … 145 145 146 146 if (cache()->disabled()) { 147 HashMap<String, CachedResource*>::iterator it = m_docResources.find(fullURL. url());147 HashMap<String, CachedResource*>::iterator it = m_docResources.find(fullURL.string()); 148 148 149 149 if (it != m_docResources.end()) { -
trunk/WebCore/loader/DocumentLoader.cpp
r27379 r28639 190 190 } 191 191 192 const KURL& DocumentLoader:: URL() const192 const KURL& DocumentLoader::url() const 193 193 { 194 194 return request().url(); 195 195 } 196 196 197 void DocumentLoader::replaceRequestURLForAnchorScroll(const KURL& URL)198 { 199 m_originalRequestCopy.setURL( URL);200 m_request.setURL( URL);197 void DocumentLoader::replaceRequestURLForAnchorScroll(const KURL& url) 198 { 199 m_originalRequestCopy.setURL(url); 200 m_request.setURL(url); 201 201 } 202 202 … … 222 222 // Only send webView:didReceiveServerRedirectForProvisionalLoadForFrame: if URL changed. 223 223 // Also, don't send it when replacing unreachable URLs with alternate content. 224 if (!handlingUnreachableURL && oldURL .url() != req.url().url())224 if (!handlingUnreachableURL && oldURL != req.url()) 225 225 frameLoader()->didReceiveServerRedirectForProvisionalLoadForFrame(); 226 226 } … … 689 689 // FIXME: If this should really be caught, we should just ASSERT this doesn't happen; 690 690 // should it be caught by other parts of WebKit or other parts of the app? 691 LOG_ERROR("could not create WebResourceHandle for URL %s -- should be caught by policy handler level", m_request.url(). url().ascii());691 LOG_ERROR("could not create WebResourceHandle for URL %s -- should be caught by policy handler level", m_request.url().string().ascii().data()); 692 692 m_mainResourceLoader = 0; 693 693 return false; -
trunk/WebCore/loader/DocumentLoader.h
r27776 r28639 83 83 const SubstituteData& substituteData() const { return m_substituteData; } 84 84 85 const KURL& URL() const;85 const KURL& url() const; 86 86 const KURL& unreachableURL() const; 87 87 -
trunk/WebCore/loader/FrameLoader.cpp
r28626 r28639 115 115 struct FormSubmission { 116 116 const char* action; 117 String URL;117 String url; 118 118 RefPtr<FormData> data; 119 119 String target; … … 125 125 const String& ct, const String& b, PassRefPtr<Event> e) 126 126 : action(a) 127 , URL(u)127 , url(u) 128 128 , data(d) 129 129 , target(t) … … 139 139 Type type; 140 140 double delay; 141 String URL;141 String url; 142 142 String referrer; 143 143 int historySteps; … … 148 148 : type(redirection) 149 149 , delay(redirectDelay) 150 , URL(redirectURL)150 , url(redirectURL) 151 151 , historySteps(0) 152 152 , lockHistory(redirectLockHistory) … … 160 160 : type(locationChangeType) 161 161 , delay(0) 162 , URL(locationChangeURL)162 , url(locationChangeURL) 163 163 , referrer(locationChangeReferrer) 164 164 , historySteps(0) … … 368 368 } 369 369 370 void FrameLoader::changeLocation(const String& URL, const String& referrer, bool lockHistory, bool userGesture)371 { 372 changeLocation(completeURL( URL), referrer, lockHistory, userGesture);373 } 374 375 void FrameLoader::changeLocation(const KURL& URL, const String& referrer, bool lockHistory, bool userGesture)376 { 377 if ( URL.url().find("javascript:", 0, false) == 0) {378 String script = KURL::decode_string( URL.url().mid(strlen("javascript:")));370 void FrameLoader::changeLocation(const String& url, const String& referrer, bool lockHistory, bool userGesture) 371 { 372 changeLocation(completeURL(url), referrer, lockHistory, userGesture); 373 } 374 375 void FrameLoader::changeLocation(const KURL& url, const String& referrer, bool lockHistory, bool userGesture) 376 { 377 if (url.deprecatedString().find("javascript:", 0, false) == 0) { 378 String script = KURL::decode_string(url.deprecatedString().mid(strlen("javascript:"))); 379 379 JSValue* result = executeScript(script, userGesture); 380 380 String scriptResult; … … 389 389 ResourceRequestCachePolicy policy = (m_cachePolicy == CachePolicyReload) || (m_cachePolicy == CachePolicyRefresh) 390 390 ? ReloadIgnoringCacheData : UseProtocolCachePolicy; 391 ResourceRequest request( URL, referrer, policy);391 ResourceRequest request(url, referrer, policy); 392 392 393 393 urlSelected(request, "_self", 0, lockHistory, userGesture); … … 401 401 402 402 const KURL& url = request.url(); 403 if (url. url().startsWith("javascript:", false)) {404 executeScript(KURL::decode_string(url. url().mid(strlen("javascript:"))), true);403 if (url.deprecatedString().startsWith("javascript:", false)) { 404 executeScript(KURL::decode_string(url.deprecatedString().mid(strlen("javascript:"))), true); 405 405 return; 406 406 } … … 435 435 Frame* frame = ownerElement->contentFrame(); 436 436 if (frame) 437 frame->loader()->scheduleLocationChange(url. url(), m_outgoingReferrer, true, userGestureHint());437 frame->loader()->scheduleLocationChange(url.string(), m_outgoingReferrer, true, userGestureHint()); 438 438 else 439 439 frame = loadSubframe(ownerElement, url, frameName, m_outgoingReferrer); … … 461 461 462 462 if (!canLoad(url, referrer)) { 463 FrameLoader::reportLocalLoadFailed(m_frame->page(), url. url());463 FrameLoader::reportLocalLoadFailed(m_frame->page(), url.string()); 464 464 return 0; 465 465 } … … 501 501 OwnPtr<FormSubmission> form(m_deferredFormSubmission.release()); 502 502 if (form) 503 submitForm(form->action, form-> URL, form->data, form->target,503 submitForm(form->action, form->url, form->data, form->target, 504 504 form->contentType, form->boundary, form->event.get()); 505 505 } … … 516 516 return; 517 517 518 DeprecatedString urlString = u. url();518 DeprecatedString urlString = u.deprecatedString(); 519 519 if (urlString.startsWith("javascript:", false)) { 520 520 m_isExecutingJavaScriptFormAction = true; … … 732 732 // implicitly precedes document.write. 733 733 cancelRedirection(); 734 if (m_frame->document()-> URL() != "about:blank")735 m_URL = m_frame->document()-> URL();734 if (m_frame->document()->url() != "about:blank") 735 m_URL = m_frame->document()->url(); 736 736 } 737 737 738 738 void FrameLoader::replaceContentsWithScriptResult(const KURL& url) 739 739 { 740 JSValue* result = executeScript(KURL::decode_string(url. url().mid(strlen("javascript:"))));740 JSValue* result = executeScript(KURL::decode_string(url.deprecatedString().mid(strlen("javascript:")))); 741 741 String scriptResult; 742 742 if (!getString(result, scriptResult)) … … 749 749 JSValue* FrameLoader::executeScript(const String& script, bool forceUserGesture) 750 750 { 751 return executeScript(forceUserGesture ? String() : String(m_URL.url()), 0, script);752 } 753 754 JSValue* FrameLoader::executeScript(const String& URL, int baseLine, const String& script)751 return executeScript(forceUserGesture ? String() : m_URL.string(), 0, script); 752 } 753 754 JSValue* FrameLoader::executeScript(const String& url, int baseLine, const String& script) 755 755 { 756 756 KJSProxy* proxy = m_frame->scriptProxy(); … … 761 761 m_isRunningScript = true; 762 762 763 JSValue* result = proxy->evaluate( URL, baseLine, script);763 JSValue* result = proxy->evaluate(url, baseLine, script); 764 764 765 765 if (!wasRunningScript) { … … 852 852 853 853 double delay; 854 String URL;854 String url; 855 855 if (!m_documentLoader) 856 856 return; 857 if (!parseHTTPRefresh(m_documentLoader->response().httpHeaderField("Refresh"), false, delay, URL))858 return; 859 860 if ( URL.isEmpty())861 URL = m_URL.url();857 if (!parseHTTPRefresh(m_documentLoader->response().httpHeaderField("Refresh"), false, delay, url)) 858 return; 859 860 if (url.isEmpty()) 861 url = m_URL.string(); 862 862 else 863 URL = m_frame->document()->completeURL(URL);864 865 scheduleHTTPRedirection(delay, URL);863 url = m_frame->document()->completeURL(url); 864 865 scheduleHTTPRedirection(delay, url); 866 866 } 867 867 … … 898 898 ref.setPass(DeprecatedString()); 899 899 ref.setRef(DeprecatedString()); 900 m_outgoingReferrer = ref. url();900 m_outgoingReferrer = ref.string(); 901 901 m_URL = url; 902 902 KURL baseurl; … … 908 908 m_frame->setDocument(document); 909 909 910 document->setURL(m_URL. url());910 document->setURL(m_URL.deprecatedString()); 911 911 // We prefer m_baseURL over m_URL because m_URL changes when we are 912 912 // about to load a new page. 913 document->setBaseURL(baseurl. url());913 document->setBaseURL(baseurl.deprecatedString()); 914 914 if (m_decoder) 915 915 document->setDecoder(m_decoder.get()); … … 1066 1066 1067 1067 KURL url(iconURL()); 1068 String urlString(url. url());1068 String urlString(url.string()); 1069 1069 if (urlString.isEmpty()) 1070 1070 return; … … 1084 1084 LOG(IconDatabase, "Told not to load icon %s but icon data is not yet available - registering for notification and requesting load from disk", urlString.ascii().data()); 1085 1085 m_client->registerForIconNotification(); 1086 iconDatabase()->iconForPageURL(m_URL. url(), IntSize(0, 0));1087 iconDatabase()->iconForPageURL(originalRequestURL(). url(), IntSize(0, 0));1086 iconDatabase()->iconForPageURL(m_URL.string(), IntSize(0, 0)); 1087 iconDatabase()->iconForPageURL(originalRequestURL().string(), IntSize(0, 0)); 1088 1088 } else 1089 1089 m_client->dispatchDidReceiveIcon(); … … 1142 1142 { 1143 1143 ASSERT(iconDatabase()); 1144 LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon. url().ascii(), m_URL.url().ascii(), originalRequestURL().url().ascii());1145 iconDatabase()->setIconURLForPageURL(icon. url(), m_URL.url());1146 iconDatabase()->setIconURLForPageURL(icon. url(), originalRequestURL().url());1144 LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon.string().ascii().data(), m_URL.string().ascii().data(), originalRequestURL().string().ascii().data()); 1145 iconDatabase()->setIconURLForPageURL(icon.string(), m_URL.string()); 1146 iconDatabase()->setIconURLForPageURL(icon.string(), originalRequestURL().string()); 1147 1147 } 1148 1148 … … 1384 1384 ScheduledRedirection::Type type = duringLoad 1385 1385 ? ScheduledRedirection::locationChangeDuringLoad : ScheduledRedirection::locationChange; 1386 scheduleRedirection(new ScheduledRedirection(type, m_URL. url(), m_outgoingReferrer, true, wasUserGesture));1386 scheduleRedirection(new ScheduledRedirection(type, m_URL.string(), m_outgoingReferrer, true, wasUserGesture)); 1387 1387 m_cachePolicy = CachePolicyRefresh; 1388 1388 } … … 1464 1464 case ScheduledRedirection::locationChange: 1465 1465 case ScheduledRedirection::locationChangeDuringLoad: 1466 changeLocation(redirection-> URL, redirection->referrer,1466 changeLocation(redirection->url, redirection->referrer, 1467 1467 redirection->lockHistory, redirection->wasUserGesture); 1468 1468 return; … … 1622 1622 1623 1623 if (!canLoad(url, frame()->document())) { 1624 FrameLoader::reportLocalLoadFailed(m_frame->page(), url. url());1624 FrameLoader::reportLocalLoadFailed(m_frame->page(), url.string()); 1625 1625 return false; 1626 1626 } … … 1728 1728 } 1729 1729 1730 void FrameLoader::didNotOpenURL(const KURL& URL)1731 { 1732 if (m_submittedFormURL == URL)1730 void FrameLoader::didNotOpenURL(const KURL& url) 1731 { 1732 if (m_submittedFormURL == url) 1733 1733 m_submittedFormURL = KURL(); 1734 1734 } … … 1798 1798 setPolicyBaseURL(m_frame->tree()->parent()->document()->policyBaseURL()); 1799 1799 else 1800 setPolicyBaseURL(m_URL. url());1800 setPolicyBaseURL(m_URL.string()); 1801 1801 } 1802 1802 … … 1811 1811 // This does the same kind of work that FrameLoader::openURL does, except it relies on the fact 1812 1812 // that a higher level already checked that the URLs match and the scrolling is the right thing to do. 1813 void FrameLoader::scrollToAnchor(const KURL& URL)1814 { 1815 m_URL = URL;1813 void FrameLoader::scrollToAnchor(const KURL& url) 1814 { 1815 m_URL = url; 1816 1816 started(); 1817 1817 … … 1850 1850 case ScheduledRedirection::locationChange: 1851 1851 case ScheduledRedirection::locationChangeDuringLoad: 1852 clientRedirected(m_scheduledRedirection-> URL.deprecatedString(),1852 clientRedirected(m_scheduledRedirection->url.deprecatedString(), 1853 1853 m_scheduledRedirection->delay, 1854 1854 currentTime() + m_redirectionTimer.nextFireInterval(), … … 1931 1931 } 1932 1932 1933 void FrameLoader::load(const KURL& URL, Event* event)1934 { 1935 load(ResourceRequest( URL), false, true, event, 0, HashMap<String, String>());1933 void FrameLoader::load(const KURL& url, Event* event) 1934 { 1935 load(ResourceRequest(url), false, true, event, 0, HashMap<String, String>()); 1936 1936 } 1937 1937 … … 1949 1949 1950 1950 ASSERT(frame()->document()); 1951 if (url. url().startsWith("file:", false)) {1951 if (url.deprecatedString().startsWith("file:", false)) { 1952 1952 if (!canLoad(url, frame()->document()) && !canLoad(url, referrer)) { 1953 FrameLoader::reportLocalLoadFailed(m_frame->page(), url. url());1953 FrameLoader::reportLocalLoadFailed(m_frame->page(), url.string()); 1954 1954 return; 1955 1955 } … … 1987 1987 } 1988 1988 1989 void FrameLoader::load(const KURL& URL, const String& referrer, FrameLoadType newLoadType,1989 void FrameLoader::load(const KURL& newURL, const String& referrer, FrameLoadType newLoadType, 1990 1990 const String& frameName, Event* event, PassRefPtr<FormState> formState) 1991 1991 { 1992 1992 bool isFormSubmission = formState; 1993 1993 1994 ResourceRequest request( URL);1994 ResourceRequest request(newURL); 1995 1995 if (!referrer.isEmpty()) 1996 1996 request.setHTTPReferrer(referrer); … … 2001 2001 ASSERT(newLoadType != FrameLoadTypeSame); 2002 2002 2003 NavigationAction action( URL, newLoadType, isFormSubmission, event);2003 NavigationAction action(newURL, newLoadType, isFormSubmission, event); 2004 2004 2005 2005 if (!frameName.isEmpty()) { 2006 2006 if (Frame* targetFrame = m_frame->tree()->find(frameName)) 2007 targetFrame->loader()->load( URL, referrer, newLoadType, String(), event, formState);2007 targetFrame->loader()->load(newURL, referrer, newLoadType, String(), event, formState); 2008 2008 else 2009 2009 checkNewWindowPolicy(action, request, formState, frameName); … … 2013 2013 RefPtr<DocumentLoader> oldDocumentLoader = m_documentLoader; 2014 2014 2015 bool sameURL = shouldTreatURLAsSameAsCurrent( URL);2015 bool sameURL = shouldTreatURLAsSameAsCurrent(newURL); 2016 2016 2017 2017 // Make sure to do scroll to anchor processing even if the URL is … … 2021 2021 && newLoadType != FrameLoadTypeReload 2022 2022 && newLoadType != FrameLoadTypeSame 2023 && !shouldReload( URL, url())2023 && !shouldReload(newURL, url()) 2024 2024 // We don't want to just scroll if a link from within a 2025 2025 // frameset is trying to reload the frameset into _top. … … 2146 2146 bool FrameLoader::canLoad(const KURL& url, const String& referrer) 2147 2147 { 2148 if (!shouldTreatURLAsLocal(url. url()))2148 if (!shouldTreatURLAsLocal(url.string())) 2149 2149 return true; 2150 2150 … … 2154 2154 bool FrameLoader::canLoad(const KURL& url, const Document* doc) 2155 2155 { 2156 if (!shouldTreatURLAsLocal(url. url()))2156 if (!shouldTreatURLAsLocal(url.string())) 2157 2157 return true; 2158 2158 … … 2186 2186 return false; 2187 2187 2188 bool URLIsSecureURL = url. url().startsWith("https:", false);2188 bool URLIsSecureURL = url.deprecatedString().startsWith("https:", false); 2189 2189 2190 2190 return !URLIsSecureURL; … … 2362 2362 // FIXME: this error message should contain more specifics of why the navigation change is not allowed. 2363 2363 String message = String::format("Unsafe JavaScript attempt to initiate a navigation change for frame with URL %s from frame with URL %s.\n", 2364 targetDocument-> URL().utf8().data(), activeDocument->URL().utf8().data());2364 targetDocument->url().utf8().data(), activeDocument->url().utf8().data()); 2365 2365 2366 2366 if (KJS::Interpreter::shouldPrintExceptions()) … … 2553 2553 KURL url = pdl->substituteData().responseURL(); 2554 2554 if (url.isEmpty()) 2555 url = pdl-> URL();2555 url = pdl->url(); 2556 2556 if (url.isEmpty()) 2557 2557 url = pdl->responseURL(); … … 2681 2681 } 2682 2682 2683 void FrameLoader::clientRedirected(const KURL& URL, double seconds, double fireDate, bool lockHistory, bool isJavaScriptFormAction)2684 { 2685 m_client->dispatchWillPerformClientRedirect( URL, seconds, fireDate);2683 void FrameLoader::clientRedirected(const KURL& url, double seconds, double fireDate, bool lockHistory, bool isJavaScriptFormAction) 2684 { 2685 m_client->dispatchWillPerformClientRedirect(url, seconds, fireDate); 2686 2686 2687 2687 // Remember that we sent a redirect notification to the frame load delegate so that when we commit … … 2741 2741 } 2742 2742 2743 KURL URL = cachedPage.URL();2744 2745 if ( URL.protocol().startsWith("http") && !URL.host().isEmpty() && URL.path().isEmpty())2746 URL.setPath("/");2747 2748 m_URL = URL;2749 m_workingURL = URL;2743 KURL url = cachedPage.url(); 2744 2745 if (url.protocol().startsWith("http") && !url.host().isEmpty() && url.path().isEmpty()) 2746 url.setPath("/"); 2747 2748 m_URL = url; 2749 m_workingURL = url; 2750 2750 2751 2751 started(); … … 2760 2760 m_isComplete = false; 2761 2761 m_didCallImplicitClose = false; 2762 m_outgoingReferrer = URL.url();2762 m_outgoingReferrer = url.string(); 2763 2763 2764 2764 FrameView* view = cachedPage.view(); … … 2794 2794 m_client->dispatchDidLoadMainResource(dl.get()); 2795 2795 checkLoadComplete(); 2796 }2797 2798 // FIXME: Which one of these URL methods is right?2799 2800 KURL FrameLoader::url() const2801 {2802 return m_URL;2803 }2804 2805 KURL FrameLoader::URL() const2806 {2807 return activeDocumentLoader()->URL();2808 2796 } 2809 2797 … … 3163 3151 } 3164 3152 3165 void FrameLoader::didTellBridgeAboutLoad(const String& URL)3166 { 3167 m_urlsBridgeKnowsAbout.add( URL);3168 } 3169 3170 bool FrameLoader::haveToldBridgeAboutLoad(const String& URL)3171 { 3172 return m_urlsBridgeKnowsAbout.contains( URL);3153 void FrameLoader::didTellBridgeAboutLoad(const String& url) 3154 { 3155 m_urlsBridgeKnowsAbout.add(url); 3156 } 3157 3158 bool FrameLoader::haveToldBridgeAboutLoad(const String& url) 3159 { 3160 return m_urlsBridgeKnowsAbout.contains(url); 3173 3161 } 3174 3162 … … 3238 3226 } 3239 3227 3240 void FrameLoader::post(const KURL& URL, const String& referrer, const String& frameName, PassRefPtr<FormData> formData,3228 void FrameLoader::post(const KURL& url, const String& referrer, const String& frameName, PassRefPtr<FormData> formData, 3241 3229 const String& contentType, Event* event, HTMLFormElement* form, const HashMap<String, String>& formValues) 3242 3230 { … … 3247 3235 // FIXME: Where's the code that implements what the comment above says? 3248 3236 3249 ResourceRequest request( URL);3237 ResourceRequest request(url); 3250 3238 addExtraFieldsToRequest(request, true, true); 3251 3239 … … 3256 3244 request.setHTTPContentType(contentType); 3257 3245 3258 NavigationAction action( URL, FrameLoadTypeStandard, true, event);3246 NavigationAction action(url, FrameLoadTypeStandard, true, event); 3259 3247 3260 3248 RefPtr<FormState> formState; … … 3311 3299 if (error.isNull()) { 3312 3300 ASSERT(!newRequest.isNull()); 3313 didTellBridgeAboutLoad(newRequest.url(). url());3301 didTellBridgeAboutLoad(newRequest.url().string()); 3314 3302 ResourceHandle::loadResourceSynchronously(newRequest, error, response, data); 3315 3303 } … … 3413 3401 return; 3414 3402 3415 KURL URL= request.url();3416 3417 m_documentLoader->replaceRequestURLForAnchorScroll( URL);3418 if (!isRedirect && !shouldTreatURLAsSameAsCurrent( URL)) {3403 KURL url = request.url(); 3404 3405 m_documentLoader->replaceRequestURLForAnchorScroll(url); 3406 if (!isRedirect && !shouldTreatURLAsSameAsCurrent(url)) { 3419 3407 // NB: must happen after _setURL, since we add based on the current request. 3420 3408 // Must also happen before we openURL and displace the scroll position, since … … 3431 3419 } 3432 3420 3433 scrollToAnchor( URL);3421 scrollToAnchor(url); 3434 3422 3435 3423 if (!isRedirect) … … 3783 3771 } 3784 3772 3785 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& URL) const3773 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const 3786 3774 { 3787 3775 if (!m_currentHistoryItem) 3788 3776 return false; 3789 return URL == m_currentHistoryItem->url() || URL== m_currentHistoryItem->originalURL();3777 return url == m_currentHistoryItem->url() || url == m_currentHistoryItem->originalURL(); 3790 3778 } 3791 3779 … … 3810 3798 } 3811 3799 3812 LOG(History, "WebCoreHistory: Creating item for %s", url. url().ascii());3800 LOG(History, "WebCoreHistory: Creating item for %s", url.string().ascii().data()); 3813 3801 3814 3802 // Frames that have never successfully loaded any content … … 3823 3811 3824 3812 RefPtr<HistoryItem> item = new HistoryItem(url, m_frame->tree()->name(), m_frame->tree()->parent() ? m_frame->tree()->parent()->tree()->name() : "", docLoader ? docLoader->title() : ""); 3825 item->setOriginalURLString(originalURL. url());3813 item->setOriginalURLString(originalURL.string()); 3826 3814 3827 3815 // Save form state if this is a POST … … 3854 3842 3855 3843 RefPtr<HistoryItem> item = frameLoader->createHistoryItemTree(m_frame, doClip); 3856 LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", item.get(), documentLoader()-> URL().url().ascii());3844 LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", item.get(), documentLoader()->url().string().ascii().data()); 3857 3845 page->backForwardList()->addItem(item); 3858 3846 } … … 3977 3965 KURL currentURL; 3978 3966 if (documentLoader()) 3979 currentURL = documentLoader()-> URL();3967 currentURL = documentLoader()->url(); 3980 3968 RefPtr<FormData> formData = item->formData(); 3981 3969 … … 4031 4019 inPageCache = true; 4032 4020 } else { 4033 LOG(PageCache, "Not restoring page for %s from back/forward cache because cache entry has expired", m_provisionalHistoryItem->url(). url().ascii());4021 LOG(PageCache, "Not restoring page for %s from back/forward cache because cache entry has expired", m_provisionalHistoryItem->url().string().ascii().data()); 4034 4022 pageCache()->remove(item); 4035 4023 } … … 4096 4084 bool FrameLoader::urlsMatchItem(HistoryItem* item) const 4097 4085 { 4098 KURL currentURL = documentLoader()-> URL();4086 KURL currentURL = documentLoader()->url(); 4099 4087 4100 4088 if (!equalIgnoringRef(currentURL, item->url())) … … 4148 4136 KURL currentURL; 4149 4137 if (documentLoader()) 4150 currentURL = documentLoader()-> URL();4138 currentURL = documentLoader()->url(); 4151 4139 4152 4140 // Always reload the target frame of the item we're going to. This ensures that we will … … 4222 4210 void FrameLoader::updateHistoryForStandardLoad() 4223 4211 { 4224 LOG(History, "WebCoreHistory: Updating History for Standard Load in frame %s", documentLoader()-> URL().url().ascii());4212 LOG(History, "WebCoreHistory: Updating History for Standard Load in frame %s", documentLoader()->url().string().ascii().data()); 4225 4213 4226 4214 bool frameNavigationOnLoad = false; … … 4238 4226 addHistoryForCurrentLocation(); 4239 4227 } else if (documentLoader()->unreachableURL().isEmpty() && m_currentHistoryItem) { 4240 m_currentHistoryItem->setURL(documentLoader()-> URL());4228 m_currentHistoryItem->setURL(documentLoader()->url()); 4241 4229 m_currentHistoryItem->setFormInfoFromRequest(documentLoader()->request()); 4242 4230 } … … 4307 4295 addHistoryForCurrentLocation(); 4308 4296 if (m_currentHistoryItem) { 4309 m_currentHistoryItem->setURL(documentLoader()-> URL());4297 m_currentHistoryItem->setURL(documentLoader()->url()); 4310 4298 m_currentHistoryItem->setFormInfoFromRequest(documentLoader()->request()); 4311 4299 } -
trunk/WebCore/loader/FrameLoader.h
r28399 r28639 273 273 void setDefersLoading(bool); 274 274 275 void changeLocation(const String& URL, const String& referrer, bool lockHistory = true, bool userGesture = false);276 void changeLocation(const KURL& URL, const String& referrer, bool lockHistory = true, bool userGesture = false);275 void changeLocation(const String& url, const String& referrer, bool lockHistory = true, bool userGesture = false); 276 void changeLocation(const KURL&, const String& referrer, bool lockHistory = true, bool userGesture = false); 277 277 void urlSelected(const ResourceRequest&, const String& target, Event*, bool lockHistory, bool userGesture); 278 278 void urlSelected(const FrameLoadRequest&, Event*, bool lockHistory, bool userGesture); 279 279 280 bool requestFrame(HTMLFrameOwnerElement*, const String& URL, const AtomicString& frameName);281 Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL& URL, const String& name, const String& referrer);282 283 void submitForm(const char* action, const String& URL, PassRefPtr<FormData>, const String& target, const String& contentType, const String& boundary, Event*);280 bool requestFrame(HTMLFrameOwnerElement*, const String& url, const AtomicString& frameName); 281 Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer); 282 283 void submitForm(const char* action, const String& url, PassRefPtr<FormData>, const String& target, const String& contentType, const String& boundary, Event*); 284 284 void submitFormAgain(); 285 285 void submitForm(const FrameLoadRequest&, Event*); … … 299 299 300 300 bool isScheduledLocationChangePending() const { return m_scheduledRedirection && isLocationChange(*m_scheduledRedirection); } 301 void scheduleHTTPRedirection(double delay, const String& URL);302 void scheduleLocationChange(const String& URL, const String& referrer, bool lockHistory = true, bool userGesture = false);301 void scheduleHTTPRedirection(double delay, const String& url); 302 void scheduleLocationChange(const String& url, const String& referrer, bool lockHistory = true, bool userGesture = false); 303 303 void scheduleRefresh(bool userGesture = false); 304 304 void scheduleHistoryNavigation(int steps); … … 320 320 String encoding() const; 321 321 322 KJS::JSValue* executeScript(const String& URL, int baseLine, const String& script);322 KJS::JSValue* executeScript(const String& url, int baseLine, const String& script); 323 323 KJS::JSValue* executeScript(const String& script, bool forceUserGesture = false); 324 324 … … 358 358 void frameDetached(); 359 359 360 // FIXME: Which one of these URL methods is right? 361 KURL url() const; 362 KURL URL() const; 360 const KURL& url() const { return m_URL; } 363 361 364 362 void updateBaseURLForEmptyDocument(); … … 380 378 bool isComplete() const; 381 379 382 bool requestObject(RenderPart* frame, const String& URL, const AtomicString& frameName,380 bool requestObject(RenderPart* frame, const String& url, const AtomicString& frameName, 383 381 const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues); 384 382 385 KURL completeURL(const String& URL);386 387 void didTellBridgeAboutLoad(const String& URL);388 bool haveToldBridgeAboutLoad(const String& URL);383 KURL completeURL(const String& url); 384 385 void didTellBridgeAboutLoad(const String& url); 386 bool haveToldBridgeAboutLoad(const String& url); 389 387 390 388 KURL originalRequestURL() const; -
trunk/WebCore/loader/ImageDocument.cpp
r28304 r28639 170 170 imageElement->setAttribute(styleAttr, "-webkit-user-select: none"); 171 171 imageElement->setLoadManually(true); 172 imageElement->setSrc( URL());172 imageElement->setSrc(url()); 173 173 174 174 body->appendChild(imageElement, ec); -
trunk/WebCore/loader/MainResourceLoader.cpp
r25274 r28639 174 174 } 175 175 176 static bool shouldLoadAsEmptyDocument(const KURL& URL)177 { 178 return URL.isEmpty() || equalIgnoringCase(String(URL.protocol()), "about");176 static bool shouldLoadAsEmptyDocument(const KURL& url) 177 { 178 return url.isEmpty() || equalIgnoringCase(String(url.protocol()), "about"); 179 179 } 180 180 … … 296 296 void MainResourceLoader::didFinishLoading() 297 297 { 298 ASSERT(shouldLoadAsEmptyDocument(frameLoader()-> URL()) || !defersLoading());298 ASSERT(shouldLoadAsEmptyDocument(frameLoader()->activeDocumentLoader()->url()) || !defersLoading()); 299 299 300 300 // The additional processing can do anything including possibly removing the last -
trunk/WebCore/loader/NavigationAction.cpp
r17976 r28639 53 53 } 54 54 55 NavigationAction::NavigationAction(const KURL& URL, NavigationType type)56 : m_URL( URL)55 NavigationAction::NavigationAction(const KURL& url, NavigationType type) 56 : m_URL(url) 57 57 , m_type(type) 58 58 { 59 59 } 60 60 61 NavigationAction::NavigationAction(const KURL& URL, FrameLoadType frameLoadType,61 NavigationAction::NavigationAction(const KURL& url, FrameLoadType frameLoadType, 62 62 bool isFormSubmission) 63 : m_URL( URL)63 : m_URL(url) 64 64 , m_type(navigationType(frameLoadType, isFormSubmission, 0)) 65 65 { 66 66 } 67 67 68 NavigationAction::NavigationAction(const KURL& URL, NavigationType type, PassRefPtr<Event> event)69 : m_URL( URL)68 NavigationAction::NavigationAction(const KURL& url, NavigationType type, PassRefPtr<Event> event) 69 : m_URL(url) 70 70 , m_type(type) 71 71 , m_event(event) … … 73 73 } 74 74 75 NavigationAction::NavigationAction(const KURL& URL, FrameLoadType frameLoadType,75 NavigationAction::NavigationAction(const KURL& url, FrameLoadType frameLoadType, 76 76 bool isFormSubmission, PassRefPtr<Event> event) 77 : m_URL( URL)77 : m_URL(url) 78 78 , m_type(navigationType(frameLoadType, isFormSubmission, event)) 79 79 , m_event(event) -
trunk/WebCore/loader/NavigationAction.h
r18096 r28639 47 47 bool isEmpty() const { return m_URL.isEmpty(); } 48 48 49 KURL URL() const { return m_URL; }49 KURL url() const { return m_URL; } 50 50 NavigationType type() const { return m_type; } 51 51 const Event* event() const { return m_event.get(); } -
trunk/WebCore/loader/PluginDocument.cpp
r25540 r28639 87 87 88 88 m_embedElement->setAttribute(nameAttr, "plugin"); 89 m_embedElement->setSrc(m_doc-> URL());89 m_embedElement->setSrc(m_doc->url()); 90 90 m_embedElement->setType(m_doc->frame()->loader()->responseMIMEType()); 91 91 -
trunk/WebCore/loader/SubresourceLoader.cpp
r25274 r28639 78 78 bool SubresourceLoader::load(const ResourceRequest& r) 79 79 { 80 m_frame->loader()->didTellBridgeAboutLoad(r.url(). url());80 m_frame->loader()->didTellBridgeAboutLoad(r.url().string()); 81 81 82 82 return ResourceLoader::load(r); … … 97 97 && FrameLoader::restrictAccessToLocal() 98 98 && !FrameLoader::canLoad(request.url(), frame->document())) { 99 FrameLoader::reportLocalLoadFailed(frame->page(), request.url(). url());99 FrameLoader::reportLocalLoadFailed(frame->page(), request.url().string()); 100 100 return 0; 101 101 } -
trunk/WebCore/loader/icon/IconLoader.cpp
r25419 r28639 76 76 RefPtr<SubresourceLoader> loader = SubresourceLoader::create(m_frame, this, m_frame->loader()->iconURL()); 77 77 if (!loader) 78 LOG_ERROR("Failed to start load for icon at url %s", m_frame->loader()->iconURL(). url().ascii());78 LOG_ERROR("Failed to start load for icon at url %s", m_frame->loader()->iconURL().string().ascii().data()); 79 79 80 80 // Store the handle so we can cancel the load if stopLoading is called later. … … 139 139 void IconLoader::finishLoading(const KURL& iconURL, PassRefPtr<SharedBuffer> data) 140 140 { 141 142 141 // When an icon load results in a 404 we commit it to the database here and clear the loading state. 143 142 // But the SubresourceLoader continues pulling in data in the background for the 404 page if the server sends one. … … 148 147 149 148 if (!iconURL.isEmpty() && m_loadIsInProgress) { 150 iconDatabase()->setIconDataForIconURL(data, iconURL. url());151 LOG(IconDatabase, "IconLoader::finishLoading() - Committing iconURL %s to database", iconURL. url().ascii());149 iconDatabase()->setIconDataForIconURL(data, iconURL.string()); 150 LOG(IconDatabase, "IconLoader::finishLoading() - Committing iconURL %s to database", iconURL.string().ascii().data()); 152 151 m_frame->loader()->commitIconURLToIconDatabase(iconURL); 153 152 m_frame->loader()->client()->dispatchDidReceiveIcon(); -
trunk/WebCore/loader/loader.cpp
r25754 r28639 74 74 request.setHTTPAccept(req->cachedResource()->accept()); 75 75 76 KURL r = dl->doc()-> URL();76 KURL r = dl->doc()->url(); 77 77 if (r.protocol().startsWith("http") && r.path().isEmpty()) 78 78 r.setPath("/"); 79 request.setHTTPReferrer(r. url());79 request.setHTTPReferrer(r.string()); 80 80 DeprecatedString domain = r.host(); 81 81 if (dl->doc()->isHTMLDocument()) -
trunk/WebCore/loader/mac/LoaderNSURLExtras.m
r25240 r28639 99 99 100 100 NSURL *baseURL = (NSURL *)CFURLGetBaseURL((CFURLRef)url); 101 if (baseURL) { 102 NSURL *URL = urlWithDataRelativeToURL(data, baseURL); 103 return urlOriginalData(URL); 104 } else 105 return data; 101 if (baseURL) 102 return urlOriginalData(urlWithDataRelativeToURL(data, baseURL)); 103 return data; 106 104 } 107 105 -
trunk/WebCore/page/Chrome.cpp
r28192 r28639 328 328 if (toolTip.isEmpty()) 329 329 // FIXME: Need to pass this URL through userVisibleString once that's in WebCore 330 toolTip = result.absoluteLinkURL(). url();330 toolTip = result.absoluteLinkURL().string(); 331 331 } 332 332 -
trunk/WebCore/page/ContextMenuController.cpp
r27754 r28639 157 157 KURL url = frame->loader()->documentLoader()->unreachableURL(); 158 158 if (frame && url.isEmpty()) 159 url = frame->loader()->documentLoader()-> URL();159 url = frame->loader()->documentLoader()->url(); 160 160 openNewWindow(url, frame); 161 161 break; -
trunk/WebCore/page/Frame.cpp
r28626 r28639 297 297 d->m_userStyleSheetLoader = 0; 298 298 if (d->m_doc && d->m_doc->docLoader()) 299 d->m_userStyleSheetLoader = new UserStyleSheetLoader(d->m_doc, url. url());299 d->m_userStyleSheetLoader = new UserStyleSheetLoader(d->m_doc, url.string()); 300 300 } 301 301 -
trunk/WebCore/page/InspectorController.cpp
r28328 r28639 146 146 return Other; 147 147 148 CachedResource* cachedResource = doc->docLoader()->cachedResource(requestURL. url());148 CachedResource* cachedResource = doc->docLoader()->cachedResource(requestURL.string()); 149 149 if (!cachedResource) 150 150 return Other; … … 272 272 return undefined; 273 273 274 CachedResource* cachedResource = doc->docLoader()->cachedResource(resource->requestURL. url());274 CachedResource* cachedResource = doc->docLoader()->cachedResource(resource->requestURL.string()); 275 275 if (!cachedResource) 276 276 return undefined; … … 926 926 JSStringRelease(resourceString); 927 927 928 String urlString = resource->requestURL. url();928 String urlString = resource->requestURL.string(); 929 929 JSStringRef url = JSStringCreateWithCharacters(urlString.characters(), urlString.length()); 930 930 JSValueRef urlValue = JSValueMakeString(m_scriptContext, url); … … 1023 1023 return; 1024 1024 1025 String urlString = resource->requestURL. url();1025 String urlString = resource->requestURL.string(); 1026 1026 JSStringRef url = JSStringCreateWithCharacters(urlString.characters(), urlString.length()); 1027 1027 JSValueRef urlValue = JSValueMakeString(m_scriptContext, url); … … 1371 1371 // FIXME: Should look into asserting that m_mainResource->loader == loader here. 1372 1372 1373 m_client->inspectedURLChanged(loader-> URL().url());1373 m_client->inspectedURLChanged(loader->url().string()); 1374 1374 1375 1375 deleteAllValues(m_consoleMessages); -
trunk/WebCore/page/mac/WebCoreFrameBridge.mm
r28626 r28639 1202 1202 } 1203 1203 1204 - (BOOL)getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSString *) URL1204 - (BOOL)getData:(NSData **)data andResponse:(NSURLResponse **)response forURL:(NSString *)url 1205 1205 { 1206 1206 Document* doc = m_frame->document(); … … 1208 1208 return NO; 1209 1209 1210 CachedResource* resource = doc->docLoader()->cachedResource( URL);1210 CachedResource* resource = doc->docLoader()->cachedResource(url); 1211 1211 if (!resource) 1212 1212 return NO; -
trunk/WebCore/platform/KURL.h
r25769 r28639 28 28 29 29 #include "DeprecatedString.h" 30 #include "PlatformString.h" 30 31 #include <wtf/Platform.h> 31 32 … … 45 46 46 47 class KURL; 47 class String;48 48 class TextEncoding; 49 49 … … 66 66 KURL(CFURLRef); 67 67 #endif 68 bool isEmpty() const { return urlString.isEmpty(); } 68 69 bool isNull() const { return urlString.isNull(); } 70 bool isEmpty() const { return urlString.isEmpty(); } 71 69 72 bool hasPath() const; 70 73 71 DeprecatedString url() const { return urlString; } 74 String string() const { return urlString; } 75 const DeprecatedString& deprecatedString() const { return urlString; } 72 76 73 77 DeprecatedString protocol() const; -
trunk/WebCore/platform/mac/ClipboardMac.mm
r20258 r28639 167 167 if (type != "text/uri-list") 168 168 count = 1; 169 NSMutableString * URLs = [NSMutableString string];169 NSMutableString *urls = [NSMutableString string]; 170 170 unsigned i; 171 171 for (i = 0; i < count; i++) { 172 172 if (i > 0) { 173 [ URLs appendString:@"\n"];173 [urls appendString:@"\n"]; 174 174 } 175 175 NSString *string = [fileList objectAtIndex:i]; 176 176 if (![string isKindOfClass:[NSString class]]) 177 177 break; 178 NSURL * URL= [NSURL fileURLWithPath:string];179 [ URLs appendString:[URLabsoluteString]];178 NSURL *url = [NSURL fileURLWithPath:string]; 179 [urls appendString:[url absoluteString]]; 180 180 } 181 181 if (i == count) 182 cocoaValue = URLs;182 cocoaValue = urls; 183 183 } 184 184 } -
trunk/WebCore/platform/mac/CookieJar.mm
r28515 r28639 43 43 BEGIN_BLOCK_OBJC_EXCEPTIONS; 44 44 45 NSURL * URL = url.getNSURL();46 NSArray *cookiesForURL = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL: URL];45 NSURL *cookieURL = url.getNSURL(); 46 NSArray *cookiesForURL = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:cookieURL]; 47 47 48 48 // <rdar://problem/5632883> On 10.5, NSHTTPCookieStorage would happily store an empty cookie, which would be sent as "Cookie: =". … … 71 71 return; 72 72 73 NSURL * URL = url.getNSURL();73 NSURL *cookieURL = url.getNSURL(); 74 74 75 75 // <http://bugs.webkit.org/show_bug.cgi?id=6531>, <rdar://4409034> … … 77 77 String cookieString = cookieStr.contains('=') ? cookieStr : cookieStr + "="; 78 78 79 NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"] forURL: URL];80 [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:cookies forURL: URL mainDocumentURL:policyBaseURL.getNSURL()];79 NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[NSDictionary dictionaryWithObject:cookieString forKey:@"Set-Cookie"] forURL:cookieURL]; 80 [[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookies:cookies forURL:cookieURL mainDocumentURL:policyBaseURL.getNSURL()]; 81 81 82 82 END_BLOCK_OBJC_EXCEPTIONS; -
trunk/WebCore/platform/mac/PasteboardMac.mm
r25494 r28639 211 211 ASSERT(!url.isEmpty()); 212 212 213 NSURL * URL = url.getNSURL();214 NSString *userVisibleString = frame->editor()->client()->userVisibleString( URL);213 NSURL *cocoaURL = url.getNSURL(); 214 NSString *userVisibleString = frame->editor()->client()->userVisibleString(cocoaURL); 215 215 216 216 NSString *title = (NSString*)titleStr; 217 217 if ([title length] == 0) { 218 title = [[ URL path] lastPathComponent];218 title = [[cocoaURL path] lastPathComponent]; 219 219 if ([title length] == 0) 220 220 title = userVisibleString; … … 227 227 forType:WebURLsWithTitlesPboardType]; 228 228 if ([types containsObject:NSURLPboardType]) 229 [ URL writeToPasteboard:pasteboard];229 [cocoaURL writeToPasteboard:pasteboard]; 230 230 if ([types containsObject:WebURLPboardType]) 231 231 [pasteboard setString:userVisibleString forType:WebURLPboardType]; … … 241 241 } 242 242 243 static NSFileWrapper* fileWrapperForImage(CachedResource* resource, NSURL * URL)243 static NSFileWrapper* fileWrapperForImage(CachedResource* resource, NSURL *url) 244 244 { 245 245 SharedBuffer* coreData = resource->data(); … … 251 251 if (!coreMIMEType.isNull()) 252 252 MIMEType = coreMIMEType; 253 [wrapper setPreferredFilename:suggestedFilenameWithMIMEType( URL, MIMEType)];253 [wrapper setPreferredFilename:suggestedFilenameWithMIMEType(url, MIMEType)]; 254 254 return wrapper; 255 255 } … … 271 271 Frame* frame = node->document()->frame(); 272 272 273 NSURL * URL = url.getNSURL();274 ASSERT( URL);273 NSURL *cocoaURL = url.getNSURL(); 274 ASSERT(cocoaURL); 275 275 276 276 NSArray* types = writableTypesForImage(); 277 277 [m_pasteboard.get() declareTypes:types owner:nil]; 278 writeURL(m_pasteboard.get(), types, URL, nsStringNilIfEmpty(title), frame);278 writeURL(m_pasteboard.get(), types, cocoaURL, nsStringNilIfEmpty(title), frame); 279 279 280 280 ASSERT(node->renderer() && node->renderer()->isImage()); … … 290 290 ASSERT(MIMETypeRegistry::isSupportedImageResourceMIMEType(MIMEType)); 291 291 292 writeFileWrapperAsRTFDAttachment(fileWrapperForImage(cachedImage, URL));292 writeFileWrapperAsRTFDAttachment(fileWrapperForImage(cachedImage, cocoaURL)); 293 293 } 294 294 … … 325 325 326 326 327 NSURL *URL; 328 329 if ((URL = [NSURL URLFromPasteboard:m_pasteboard.get()])) { 327 if (NSURL *url = [NSURL URLFromPasteboard:m_pasteboard.get()]) { 330 328 // FIXME: using the editorClient to call into webkit, for now, since 331 // calling [URL _web_userVisibleString]from WebCore involves migrating a sizable web of329 // calling _web_userVisibleString from WebCore involves migrating a sizable web of 332 330 // helper code that should either be done in a separate patch or figured out in another way. 333 string = frame->editor()->client()->userVisibleString( URL);331 string = frame->editor()->client()->userVisibleString(url); 334 332 if ([string length] > 0) 335 333 return string; -
trunk/WebCore/platform/network/ResourceHandle.cpp
r25274 r28639 173 173 174 174 // Allow ports 21 and 22 for FTP URLs, as Mozilla does. 175 if ((port == 21 || port == 22) && request.url(). url().startsWith("ftp:", false))175 if ((port == 21 || port == 22) && request.url().deprecatedString().startsWith("ftp:", false)) 176 176 return true; 177 177 178 178 // Allow any port number in a file URL, since the port number is ignored. 179 if (request.url(). url().startsWith("file:", false))179 if (request.url().deprecatedString().startsWith("file:", false)) 180 180 return true; 181 181 -
trunk/WebCore/platform/network/ResourceRequestBase.cpp
r24434 r28639 46 46 updateResourceRequest(); 47 47 48 return m_url. url().isNull();48 return m_url.isNull(); 49 49 } 50 50 -
trunk/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r27865 r28639 32 32 #include "AuthenticationCF.h" 33 33 #include "AuthenticationChallenge.h" 34 #include "CString.h" 34 35 #include "DocLoader.h" 35 36 #include "Frame.h" … … 62 63 ResourceHandle* handle = (ResourceHandle*)clientInfo; 63 64 64 LOG(Network, "CFNet - willSendRequest(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url(). url().ascii());65 LOG(Network, "CFNet - willSendRequest(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url().string().utf8().data()); 65 66 66 67 ResourceRequest request(cfRequest); … … 78 79 ResourceHandle* handle = (ResourceHandle*)clientInfo; 79 80 80 LOG(Network, "CFNet - didReceiveResponse(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url(). url().ascii());81 LOG(Network, "CFNet - didReceiveResponse(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url().string().utf8().data()); 81 82 82 83 if (handle->client()) … … 90 91 CFIndex length = CFDataGetLength(data); 91 92 92 LOG(Network, "CFNet - didReceiveData(conn=%p, handle=%p, bytes=%d) (%s)", conn, handle, length, handle->request().url(). url().ascii());93 LOG(Network, "CFNet - didReceiveData(conn=%p, handle=%p, bytes=%d) (%s)", conn, handle, length, handle->request().url().string().utf8().data()); 93 94 94 95 if (handle->client()) … … 100 101 ResourceHandle* handle = (ResourceHandle*)clientInfo; 101 102 102 LOG(Network, "CFNet - didFinishLoading(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url(). url().ascii());103 LOG(Network, "CFNet - didFinishLoading(conn=%p, handle=%p) (%s)", conn, handle, handle->request().url().string().utf8().data()); 103 104 104 105 if (handle->client()) … … 110 111 ResourceHandle* handle = (ResourceHandle*)clientInfo; 111 112 112 LOG(Network, "CFNet - didFail(conn=%p, handle=%p, error = %p) (%s)", conn, handle, error, handle->request().url(). url().ascii());113 LOG(Network, "CFNet - didFail(conn=%p, handle=%p, error = %p) (%s)", conn, handle, error, handle->request().url().string().utf8().data()); 113 114 114 115 if (handle->client()) … … 140 141 ResourceHandle* handle = (ResourceHandle*)clientInfo; 141 142 ASSERT(handle); 142 LOG(Network, "CFNet - didReceiveChallenge(conn=%p, handle=%p (%s)", conn, handle, handle->request().url(). url().ascii());143 LOG(Network, "CFNet - didReceiveChallenge(conn=%p, handle=%p (%s)", conn, handle, handle->request().url().string().utf8().data()); 143 144 144 145 handle->didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, handle)); … … 163 164 { 164 165 if (m_connection) { 165 LOG(Network, "CFNet - Cancelling connection %p (%s)", m_connection, m_request.url(). url().ascii());166 LOG(Network, "CFNet - Cancelling connection %p (%s)", m_connection, m_request.url().string().utf8().data()); 166 167 CFURLConnectionCancel(m_connection.get()); 167 168 } … … 170 171 ResourceHandle::~ResourceHandle() 171 172 { 172 LOG(Network, "CFNet - Destroying job %p (%s)", this, d->m_request.url(). url().ascii());173 LOG(Network, "CFNet - Destroying job %p (%s)", this, d->m_request.url().string().utf8().data()); 173 174 } 174 175 … … 261 262 CFURLConnectionStart(d->m_connection.get()); 262 263 263 LOG(Network, "CFNet - Starting URL %s (handle=%p, conn=%p)", d->m_request.url(). url().ascii(), this, d->m_connection);264 LOG(Network, "CFNet - Starting URL %s (handle=%p, conn=%p)", d->m_request.url().string().utf8().data(), this, d->m_connection); 264 265 265 266 return true; -
trunk/WebCore/platform/win/ClipboardUtilitiesWin.cpp
r25941 r28639 108 108 HGLOBAL createGlobalData(const KURL& url, const String& title) 109 109 { 110 String mutableURL(url. url());110 String mutableURL(url.string()); 111 111 String mutableTitle(title); 112 112 SIZE_T size = mutableURL.length() + mutableTitle.length() + 2; // +1 for "\n" and +1 for null terminator … … 197 197 { 198 198 String markup("<a href=\""); 199 markup.append(url. url());199 markup.append(url.string()); 200 200 markup.append("\">"); 201 201 markup.append(title); -
trunk/WebCore/platform/win/ClipboardWin.cpp
r27619 r28639 445 445 446 446 if (withPlainText) { 447 medium.hGlobal = createGlobalData(url. url());447 medium.hGlobal = createGlobalData(url.string()); 448 448 if (medium.hGlobal && FAILED(data->SetData(plainTextWFormat(), &medium, TRUE))) 449 449 ::GlobalFree(medium.hGlobal); … … 643 643 return; 644 644 645 HGLOBAL imageFileDescriptor = createGlobalImageFileDescriptor(url. url(), element->getAttribute(altAttr), cachedImage);645 HGLOBAL imageFileDescriptor = createGlobalImageFileDescriptor(url.string(), element->getAttribute(altAttr), cachedImage); 646 646 if (!imageFileDescriptor) 647 647 return; … … 696 696 697 697 int estimatedSize = 0; 698 String url = kurl. url();698 String url = kurl.string(); 699 699 700 700 HGLOBAL urlFileDescriptor = createGlobalUrlFileDescriptor(url, titleStr, estimatedSize); … … 719 719 ExceptionCode ec = 0; 720 720 721 medium.hGlobal = createGlobalData(markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange), selectedRange->startContainer(ec)->document()-> URL()));721 medium.hGlobal = createGlobalData(markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange), selectedRange->startContainer(ec)->document()->url())); 722 722 if (medium.hGlobal && FAILED(m_writableDataObject->SetData(htmlFormat(), &medium, TRUE))) 723 723 ::GlobalFree(medium.hGlobal); -
trunk/WebCore/platform/win/PasteboardWin.cpp
r23986 r28639 117 117 if (::OpenClipboard(m_owner)) { 118 118 ExceptionCode ec = 0; 119 HGLOBAL cbData = createGlobalData(markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange), selectedRange->startContainer(ec)->document()-> URL()));119 HGLOBAL cbData = createGlobalData(markupToCF_HTML(createMarkup(selectedRange, 0, AnnotateForInterchange), selectedRange->startContainer(ec)->document()->url())); 120 120 if (!::SetClipboardData(HTMLClipboardFormat, cbData)) 121 121 ::GlobalFree(cbData); … … 175 175 // bare-bones CF_UNICODETEXT support 176 176 if (::OpenClipboard(m_owner)) { 177 HGLOBAL cbData = createGlobalData(url. url());177 HGLOBAL cbData = createGlobalData(url.string()); 178 178 if (!::SetClipboardData(CF_UNICODETEXT, cbData)) 179 179 ::GlobalFree(cbData); -
trunk/WebCore/plugins/win/PluginDatabaseWin.cpp
r27236 r28639 515 515 { 516 516 PluginPackageWin* plugin = pluginForMIMEType(mimeType); 517 String filename = url. url();517 String filename = url.string(); 518 518 519 519 if (!plugin) { -
trunk/WebCore/plugins/win/PluginStreamWin.cpp
r28421 r28639 130 130 // Some plugins (Flash) expect that javascript URLs are passed back decoded as this is the 131 131 // format used when requesting the URL. 132 if (responseURL. url().startsWith("javascript:", false))133 m_stream.url = _strdup(responseURL.decode_string(responseURL. url()).utf8());132 if (responseURL.string().startsWith("javascript:", false)) 133 m_stream.url = _strdup(responseURL.decode_string(responseURL.deprecatedString()).utf8()); 134 134 else 135 m_stream.url = _strdup(responseURL. url().utf8());135 m_stream.url = _strdup(responseURL.deprecatedString().utf8()); 136 136 137 137 CString mimeTypeStr = m_resourceResponse.mimeType().utf8(); … … 263 263 264 264 if (m_sendNotification) 265 m_pluginFuncs->urlnotify(m_instance, m_resourceRequest.url(). url().utf8(), m_reason, m_notifyData);265 m_pluginFuncs->urlnotify(m_instance, m_resourceRequest.url().deprecatedString().utf8(), m_reason, m_notifyData); 266 266 267 267 m_streamState = StreamStopped; -
trunk/WebCore/plugins/win/PluginViewWin.cpp
r28486 r28639 205 205 static String scriptStringIfJavaScriptURL(const KURL& url) 206 206 { 207 if (!url. url().startsWith("javascript:", false))207 if (!url.string().startsWith("javascript:", false)) 208 208 return String(); 209 209 210 210 // This returns an unescaped string 211 return KURL::decode_string(url. url().mid(11));211 return KURL::decode_string(url.deprecatedString().mid(11)); 212 212 } 213 213 … … 785 785 if (request->sendNotification()) { 786 786 KJS::JSLock::DropAllLocks dropAllLocks; 787 m_plugin->pluginFuncs()->urlnotify(m_instance, requestURL. url().utf8(), NPRES_DONE, request->notifyData());787 m_plugin->pluginFuncs()->urlnotify(m_instance, requestURL.deprecatedString().utf8(), NPRES_DONE, request->notifyData()); 788 788 } 789 789 } -
trunk/WebCore/svg/SVGImageLoader.cpp
r28258 r28639 52 52 CachedImage *newImage = 0; 53 53 if (!imageElement->href().isEmpty()) { 54 DeprecatedString uri = imageElement->baseURI().deprecatedString(); ;54 DeprecatedString uri = imageElement->baseURI().deprecatedString(); 55 55 if (!uri.isEmpty()) 56 uri = KURL(uri, imageElement->href().deprecatedString()). url();56 uri = KURL(uri, imageElement->href().deprecatedString()).deprecatedString(); 57 57 else 58 58 uri = imageElement->href().deprecatedString(); -
trunk/WebCore/xml/XMLHttpRequest.cpp
r28626 r28639 172 172 m_responseXML = m_doc->implementation()->createDocument(0); 173 173 m_responseXML->open(); 174 m_responseXML->setURL(m_url. url());174 m_responseXML->setURL(m_url.deprecatedString()); 175 175 // FIXME: set Last-Modified and cookies (currently, those are only available for HTMLDocuments). 176 176 m_responseXML->write(String(m_responseText)); … … 320 320 321 321 // but a remote document can only load from the same port on the server 322 KURL documentURL = m_doc-> URL();322 KURL documentURL = m_doc->url(); 323 323 if (documentURL.protocol().lower() == url.protocol().lower() 324 324 && documentURL.host().lower() == url.host().lower() -
trunk/WebCore/xml/XSLImportRule.cpp
r25754 r28639 89 89 if (!parentSheet->href().isNull()) 90 90 // use parent styleheet's URL as the base URL 91 absHref = KURL(parentSheet->href().deprecatedString(), m_strHref.deprecatedString()).url();91 absHref = KURL(parentSheet->href().deprecatedString(), m_strHref.deprecatedString()).string(); 92 92 93 93 // Check for a cycle in our import chain. If we encounter a stylesheet -
trunk/WebCore/xml/XSLTProcessor.cpp
r28014 r28639 256 256 result->open(); 257 257 if (sourceIsDocument) { 258 result->setURL(ownerDocument-> URL());258 result->setURL(ownerDocument->url()); 259 259 result->setBaseURL(ownerDocument->baseURL()); 260 260 } … … 294 294 { 295 295 if (!cachedStylesheet && stylesheetRootNode) { 296 cachedStylesheet = new XSLStyleSheet(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode, stylesheetRootNode->document()-> URL());296 cachedStylesheet = new XSLStyleSheet(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode, stylesheetRootNode->document()->url()); 297 297 cachedStylesheet->parseString(createMarkup(stylesheetRootNode)); 298 298 } … … 313 313 sourceDoc = (xmlDocPtr)ownerDocument->transformSource(); 314 314 if (!sourceDoc) { 315 sourceDoc = (xmlDocPtr)xmlDocPtrForString(ownerDocument->docLoader(), createMarkup(sourceNode), sourceIsDocument ? ownerDocument-> URL() : DeprecatedString());315 sourceDoc = (xmlDocPtr)xmlDocPtrForString(ownerDocument->docLoader(), createMarkup(sourceNode), sourceIsDocument ? ownerDocument->url() : DeprecatedString()); 316 316 shouldDelete = (sourceDoc != 0); 317 317 } -
trunk/WebKit/mac/ChangeLog
r28626 r28639 1 2007-12-11 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Scrub URL out of the tree in preparation for renaming KURL to URL. 6 7 * WebCoreSupport/WebFrameLoaderClient.mm: 8 (WebFrameLoaderClient::actionDictionary): 9 * WebView/WebDataSource.mm: 10 (-[WebDataSource _URL]): 11 * WebView/WebView.mm: 12 (-[WebView _dispatchDidReceiveIconFromWebFrame:]): 13 1 14 2007-12-11 Darin Adler <darin@apple.com> 2 15 -
trunk/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r28503 r28639 1122 1122 [NSNumber numberWithInt:mouseEvent->button()], WebActionButtonKey, 1123 1123 [NSNumber numberWithInt:modifierFlags], WebActionModifierFlagsKey, 1124 action. URL().getNSURL(), WebActionOriginalURLKey,1124 action.url().getNSURL(), WebActionOriginalURLKey, 1125 1125 nil]; 1126 1126 [element release]; … … 1130 1130 [NSNumber numberWithInt:action.type()], WebActionNavigationTypeKey, 1131 1131 [NSNumber numberWithInt:modifierFlags], WebActionModifierFlagsKey, 1132 action. URL().getNSURL(), WebActionOriginalURLKey,1132 action.url().getNSURL(), WebActionOriginalURLKey, 1133 1133 nil]; 1134 1134 } -
trunk/WebKit/mac/WebView/WebDataSource.mm
r26759 r28639 320 320 - (NSURL *)_URL 321 321 { 322 KURL URL = _private->loader-> URL();322 KURL URL = _private->loader->url(); 323 323 return URL.isEmpty() ? nil : URL.getNSURL(); 324 324 } -
trunk/WebKit/mac/WebView/WebView.mm
r28597 r28639 4040 4040 WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(self); 4041 4041 if (implementations->didReceiveIconForFrameFunc) { 4042 Image* image = iconDatabase()->iconForPageURL(core(webFrame)->loader()->url(). url(), IntSize(16, 16));4042 Image* image = iconDatabase()->iconForPageURL(core(webFrame)->loader()->url().string(), IntSize(16, 16)); 4043 4043 if (NSImage *icon = webGetNSImage(image, NSMakeSize(16, 16))) 4044 4044 CallFrameLoadDelegate(implementations->didReceiveIconForFrameFunc, self, @selector(webView:didReceiveIcon:forFrame:), icon, webFrame); -
trunk/WebKit/win/ChangeLog
r28633 r28639 1 2007-12-11 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 Scrub URL out of the tree in preparation for renaming KURL to URL. 6 7 * WebFrame.cpp: 8 (WebFrame::url): 9 (WebFrame::dispatchWillPerformClientRedirect): 10 (WebFrame::setTitle): 11 (WebFrame::updateGlobalHistoryForStandardLoad): 12 (WebFrame::updateGlobalHistoryForReload): 13 (WebFrame::cancelledError): 14 (WebFrame::blockedError): 15 (WebFrame::interruptForPolicyChangeError): 16 (WebFrame::createPlugin): 17 * WebView.cpp: 18 (WebView::notifyDidAddIcon): 19 1 20 2007-12-10 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/WebKit/win/MarshallingHelpers.cpp
r27625 r28639 48 48 BSTR MarshallingHelpers::KURLToBSTR(const KURL& url) 49 49 { 50 String urlString(url. url());50 String urlString(url.string()); 51 51 return SysAllocStringLen(urlString.characters(), urlString.length()); 52 52 } -
trunk/WebKit/win/WebActionPropertyBag.cpp
r23207 r28639 134 134 } else if (isEqual(pszPropName, WebActionOriginalURLKey)) { 135 135 V_VT(pVar) = VT_BSTR; 136 V_BSTR(pVar) = BString(m_action. URL().url()).release();136 V_BSTR(pVar) = BString(m_action.url().string()).release(); 137 137 return S_OK; 138 138 } else if (isEqual(pszPropName, WebActionModifierFlagsKey)) { -
trunk/WebKit/win/WebDataSource.cpp
r25415 r28639 246 246 { 247 247 KURL unreachableURL = m_loader->unreachableURL(); 248 BString urlString((LPOLESTR)unreachableURL. url().unicode(), unreachableURL.url().length());248 BString urlString((LPOLESTR)unreachableURL.deprecatedString().unicode(), unreachableURL.deprecatedString().length()); 249 249 250 250 *url = urlString.release(); -
trunk/WebKit/win/WebDownload.cpp
r28092 r28639 103 103 if (!m_download) { 104 104 ASSERT_NOT_REACHED(); 105 LOG_ERROR("WebDownload - Failed to create WebDownload from existing connection (%s)", request.url(). url().ascii());105 LOG_ERROR("WebDownload - Failed to create WebDownload from existing connection (%s)", request.url().deprecatedString().ascii()); 106 106 } else 107 LOG(Download, "WebDownload - Created WebDownload %p from existing connection (%s)", this, request.url(). url().ascii());107 LOG(Download, "WebDownload - Created WebDownload %p from existing connection (%s)", this, request.url().deprecatedString().ascii()); 108 108 109 109 // The CFURLDownload either starts successfully and retains the CFURLConnection, … … 131 131 CFURLDownloadScheduleDownloadWithRunLoop(m_download.get(), ResourceHandle::loaderRunLoop(), kCFRunLoopDefaultMode); 132 132 133 LOG(Download, "WebDownload - Initialized download of url %s in WebDownload %p", url. url().ascii(), this);133 LOG(Download, "WebDownload - Initialized download of url %s in WebDownload %p", url.deprecatedString().ascii(), this); 134 134 } 135 135 … … 233 233 CFURLDownloadScheduleDownloadWithRunLoop(m_download.get(), ResourceHandle::loaderRunLoop(), kCFRunLoopDefaultMode); 234 234 235 LOG(Download, "WebDownload - initWithRequest complete, started download of url %s", webRequest->resourceRequest().url(). url().ascii());235 LOG(Download, "WebDownload - initWithRequest complete, started download of url %s", webRequest->resourceRequest().url().deprecatedString().ascii()); 236 236 return S_OK; 237 237 } -
trunk/WebKit/win/WebDragClient.cpp
r26490 r28639 181 181 bool clipLabelString = false; 182 182 183 String urlString = url. url();183 String urlString = url.string(); 184 184 String label = inLabel; 185 185 if (label.isEmpty()) { -
trunk/WebKit/win/WebElementPropertyBag.cpp
r25231 r28639 145 145 return S_OK; 146 146 } else if (isEqual(WebElementImageURLKey, key)) 147 return convertStringToVariant(pVar, m_result->absoluteImageURL(). url());147 return convertStringToVariant(pVar, m_result->absoluteImageURL().string()); 148 148 else if (isEqual(WebElementIsSelectedKey, key)) { 149 149 V_VT(pVar) = VT_BOOL; … … 158 158 return convertStringToVariant(pVar, m_result->title()); 159 159 else if (isEqual(WebElementLinkURLKey, key)) 160 return convertStringToVariant(pVar, m_result->absoluteLinkURL(). url());160 return convertStringToVariant(pVar, m_result->absoluteLinkURL().string()); 161 161 else if (isEqual(WebElementLinkTargetFrameKey, key)) { 162 162 if (!m_result->targetFrame()) -
trunk/WebKit/win/WebFrame.cpp
r28503 r28639 763 763 return KURL(); 764 764 765 return coreFrame->loader()-> URL();765 return coreFrame->loader()->url(); 766 766 } 767 767 … … 1566 1566 COMPtr<IWebFrameLoadDelegate> frameLoadDelegate; 1567 1567 if (SUCCEEDED(d->webView->frameLoadDelegate(&frameLoadDelegate))) 1568 frameLoadDelegate->willPerformClientRedirectToURL(d->webView, BString(url. url()), delay, MarshallingHelpers::CFAbsoluteTimeToDATE(fireDate), this);1568 frameLoadDelegate->willPerformClientRedirectToURL(d->webView, BString(url.string()), delay, MarshallingHelpers::CFAbsoluteTimeToDATE(fireDate), this); 1569 1569 } 1570 1570 … … 1827 1827 if (history) { 1828 1828 COMPtr<IWebHistoryItem> item; 1829 if (SUCCEEDED(history->itemForURL(BString(url. url()), &item))) {1829 if (SUCCEEDED(history->itemForURL(BString(url.string()), &item))) { 1830 1830 COMPtr<IWebHistoryItemPrivate> itemPrivate; 1831 1831 if (SUCCEEDED(item->QueryInterface(IID_IWebHistoryItemPrivate, (void**)&itemPrivate))) … … 1854 1854 return; 1855 1855 1856 history->addItemForURL(BString(url. url()), 0);1856 history->addItemForURL(BString(url.string()), 0); 1857 1857 } 1858 1858 1859 1859 void WebFrame::updateGlobalHistoryForReload(const KURL& url) 1860 1860 { 1861 BString urlBStr(url. url());1861 BString urlBStr(url.string()); 1862 1862 1863 1863 COMPtr<WebHistory> history; … … 1930 1930 // FIXME: Need ChickenCat to include CFNetwork/CFURLError.h to get these values 1931 1931 // Alternatively, we could create our own error domain/codes. 1932 return ResourceError(String(WebURLErrorDomain), -999, request.url(). url(), String());1932 return ResourceError(String(WebURLErrorDomain), -999, request.url().string(), String()); 1933 1933 } 1934 1934 … … 1936 1936 { 1937 1937 // FIXME: Need to implement the String descriptions for errors in the WebKitErrorDomain and have them localized 1938 return ResourceError(String(WebKitErrorDomain), WebKitErrorCannotUseRestrictedPort, request.url(). url(), String());1938 return ResourceError(String(WebKitErrorDomain), WebKitErrorCannotUseRestrictedPort, request.url().string(), String()); 1939 1939 } 1940 1940 … … 1948 1948 { 1949 1949 // FIXME: Need to implement the String descriptions for errors in the WebKitErrorDomain and have them localized 1950 return ResourceError(String(WebKitErrorDomain), WebKitErrorFrameLoadInterruptedByPolicyChange, request.url(). url(), String());1950 return ResourceError(String(WebKitErrorDomain), WebKitErrorFrameLoadInterruptedByPolicyChange, request.url().string(), String()); 1951 1951 } 1952 1952 … … 2375 2375 } 2376 2376 2377 ResourceError resourceError(String(WebKitErrorDomain), errorCode, url. url(), String());2377 ResourceError resourceError(String(WebKitErrorDomain), errorCode, url.string(), String()); 2378 2378 COMPtr<IWebError> error(AdoptCOM, WebError::createInstance(resourceError, userInfoBag.get())); 2379 2379 -
trunk/WebKit/win/WebResource.cpp
r22935 r28639 127 127 } 128 128 129 *url = BString(String(m_url. url())).release();129 *url = BString(String(m_url.string())).release(); 130 130 return S_OK; 131 131 } -
trunk/WebKit/win/WebURLResponse.cpp
r28092 r28639 343 343 return E_INVALIDARG; 344 344 345 BString url(m_response.url(). url());345 BString url(m_response.url().string()); 346 346 *result = url.release(); 347 347 if (!m_response.url().isEmpty() && !*result) -
trunk/WebKit/win/WebView.cpp
r28633 r28639 2123 2123 String mainFrameURL; 2124 2124 if (m_mainFrame) 2125 mainFrameURL = m_mainFrame->url(). url();2125 mainFrameURL = m_mainFrame->url().string(); 2126 2126 2127 2127 if (!mainFrameURL.isEmpty() && mainFrameURL == String((CFStringRef)value))
Note: See TracChangeset
for help on using the changeset viewer.