Changeset 89079 in webkit
- Timestamp:
- Jun 16, 2011 4:15:10 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89076 r89079 1 2011-06-16 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 FrameLoader doesn't need completeURL or baseURL 6 https://bugs.webkit.org/show_bug.cgi?id=62818 7 8 No functional change, thus no tests. 9 10 * html/HTMLPlugInImageElement.cpp: 11 (WebCore::HTMLPlugInImageElement::isImageType): 12 (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin): 13 * inspector/InspectorPageAgent.cpp: 14 (WebCore::InspectorPageAgent::open): 15 * loader/FrameLoader.cpp: 16 * loader/FrameLoader.h: 17 * loader/NavigationScheduler.cpp: 18 (WebCore::NavigationScheduler::scheduleLocationChange): 19 * page/History.cpp: 20 (WebCore::History::urlForState): 21 1 22 2011-06-16 Dawit Alemayehu <adawit@kde.org> 2 23 -
trunk/Source/WebCore/WebCore.exp.in
r89044 r89079 160 160 __ZN7WebCore11FileChooser11chooseFilesERKN3WTF6VectorINS1_6StringELm0EEE 161 161 __ZN7WebCore11FileChooserD1Ev 162 __ZN7WebCore11FrameLoader11completeURLERKN3WTF6StringE163 162 __ZN7WebCore11FrameLoader11loadArchiveEN3WTF10PassRefPtrINS_7ArchiveEEE 164 163 __ZN7WebCore11FrameLoader11shouldCloseEv -
trunk/Source/WebCore/bindings/generic/GenericBinding.h
r74449 r89079 32 32 #define GenericBinding_h 33 33 34 #include "Document.h" 34 35 #include "Frame.h" 35 36 #include "FrameLoader.h" … … 59 60 if (!frame) 60 61 return KURL(); 61 return frame-> loader()->completeURL(relativeURL);62 return frame->document()->completeURL(relativeURL); 62 63 } 63 64 -
trunk/Source/WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp
r84764 r89079 50 50 if (!frame) 51 51 return jsUndefined(); 52 const KURL& url = frame-> loader()->completeURL(exec->argument(0).toString(exec));52 const KURL& url = frame->document()->completeURL(exec->argument(0).toString(exec)); 53 53 54 54 ExceptionCode ec = 0; … … 63 63 if (!frame) 64 64 return jsUndefined(); 65 const KURL& url = frame-> loader()->completeURL(exec->argument(0).toString(exec));66 65 const KURL& url = frame->document()->completeURL(exec->argument(0).toString(exec)); 66 67 67 ExceptionCode ec = 0; 68 68 impl()->add(url, ec); … … 76 76 if (!frame) 77 77 return jsUndefined(); 78 const KURL& url = frame-> loader()->completeURL(exec->argument(0).toString(exec));79 78 const KURL& url = frame->document()->completeURL(exec->argument(0).toString(exec)); 79 80 80 ExceptionCode ec = 0; 81 81 impl()->remove(url, ec); -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r88570 r89079 60 60 61 61 if (Frame* frame = document()->frame()) { 62 KURL completedURL = frame->loader()->completeURL(m_url);62 KURL completedURL = document()->completeURL(m_url); 63 63 return frame->loader()->client()->objectContentType(completedURL, m_serviceType, shouldPreferPlugInsForImages()) == ObjectContentImage; 64 64 } … … 96 96 ASSERT(document()); 97 97 ASSERT(document()->frame()); 98 KURL completedURL; 99 if (!url.isEmpty()) 100 completedURL = document()->completeURL(url); 101 98 102 FrameLoader* frameLoader = document()->frame()->loader(); 99 103 ASSERT(frameLoader); 100 KURL completedURL;101 if (!url.isEmpty())102 completedURL = frameLoader->completeURL(url);103 104 104 if (frameLoader->client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin) 105 105 return true; -
trunk/Source/WebCore/inspector/InspectorPageAgent.cpp
r88940 r89079 318 318 319 319 UserGestureIndicator indicator(DefinitelyProcessingUserGesture); 320 frame->loader()->changeLocation(mainFrame->document()->securityOrigin(), frame->loader()->completeURL(url), "", false, false); 320 // FIXME: Why does one use mainFrame and the other frame? 321 frame->loader()->changeLocation(mainFrame->document()->securityOrigin(), frame->document()->completeURL(url), "", false, false); 321 322 } 322 323 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r88792 r89079 789 789 } 790 790 791 KURL FrameLoader::baseURL() const792 {793 ASSERT(m_frame->document());794 return m_frame->document()->baseURL();795 }796 797 KURL FrameLoader::completeURL(const String& url)798 {799 ASSERT(m_frame->document());800 return m_frame->document()->completeURL(url);801 }802 803 791 void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer, Frame* childFrame) 804 792 { -
trunk/Source/WebCore/loader/FrameLoader.h
r88682 r89079 220 220 void willSetEncoding(); 221 221 222 KURL baseURL() const;223 224 222 void handledOnloadEvents(); 225 223 String userAgent(const KURL&) const; … … 260 258 261 259 bool isComplete() const; 262 263 KURL completeURL(const String& url);264 260 265 261 void cancelAndClear(); -
trunk/Source/WebCore/loader/NavigationScheduler.cpp
r86013 r89079 336 336 337 337 FrameLoader* loader = m_frame->loader(); 338 338 339 339 // If the URL we're going to navigate to is the same as the current one, except for the 340 340 // fragment part, we don't need to schedule the location change. 341 341 KURL parsedURL(ParsedURLString, url); 342 342 if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(m_frame->document()->url(), parsedURL)) { 343 loader->changeLocation(securityOrigin, loader->completeURL(url), referrer, lockHistory, lockBackForwardList);343 loader->changeLocation(securityOrigin, m_frame->document()->completeURL(url), referrer, lockHistory, lockBackForwardList); 344 344 return; 345 345 } -
trunk/Source/WebCore/page/History.cpp
r86325 r89079 110 110 KURL History::urlForState(const String& urlString) 111 111 { 112 KURL baseURL = m_frame-> loader()->baseURL();112 KURL baseURL = m_frame->document()->baseURL(); 113 113 if (urlString.isEmpty()) 114 114 return baseURL; 115 115 116 116 return KURL(baseURL, urlString); 117 117 } -
trunk/Source/WebCore/plugins/PluginView.cpp
r84371 r89079 830 830 , m_isStarted(false) 831 831 , m_url(url) 832 , m_baseURL(m_parentFrame-> loader()->completeURL(m_parentFrame->document()->baseURL().string()))832 , m_baseURL(m_parentFrame->document()->baseURL()) // FIXME: No need for this member variable! 833 833 , m_status(PluginStatusLoadedSuccessfully) 834 834 , m_requestTimer(this, &PluginView::requestTimerFired) -
trunk/Source/WebKit/chromium/src/WebPasswordFormData.cpp
r58382 r89079 151 151 { 152 152 RefPtr<HTMLFormElement> form = webForm.operator PassRefPtr<HTMLFormElement>(); 153 154 Frame* frame = form->document()->frame();155 if (!frame)156 return;157 158 153 PasswordFormFields fields; 159 154 findPasswordFormFields(form.get(), &fields); … … 166 161 if (action.isNull()) 167 162 action = ""; // missing 'action' attribute implies current URL 168 KURL fullAction = f rame->loader()->completeURL(action);163 KURL fullAction = form->document()->completeURL(action); 169 164 if (!fullAction.isValid()) 170 165 return; -
trunk/Source/WebKit/chromium/src/WebSearchableFormData.cpp
r88030 r89079 71 71 bool IsHTTPFormSubmit(const HTMLFormElement* form) 72 72 { 73 // FIXME: This function is insane. This is an overly complicated way to get this information. 73 74 String action(form->action()); 74 return form->document()->frame()->loader()->completeURL(action.isNull() ? "" : action).protocol() == "http"; 75 // The isNull() check is trying to avoid completeURL returning KURL() when passed a null string. 76 return form->document()->completeURL(action.isNull() ? "" : action).protocolIs("http"); 75 77 } 76 78 … … 237 239 { 238 240 RefPtr<HTMLFormElement> formElement = form.operator PassRefPtr<HTMLFormElement>(); 239 const Frame* frame = formElement->document()->frame();240 if (!frame)241 return;242 243 241 HTMLInputElement* inputElement = selectedInputElement.operator PassRefPtr<HTMLInputElement>().get(); 244 242 … … 288 286 289 287 String action(formElement->action()); 290 KURL url(f rame->loader()->completeURL(action.isNull() ? "" : action));288 KURL url(formElement->document()->completeURL(action.isNull() ? "" : action)); 291 289 RefPtr<FormData> formData = FormData::create(encodedString); 292 290 url.setQuery(formData->flattenToString()); -
trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
r86414 r89079 955 955 return CString(); 956 956 957 KURL absoluteURL = targetFrame-> loader()->completeURL(relativeURLString);957 KURL absoluteURL = targetFrame->document()->completeURL(relativeURLString); 958 958 return absoluteURL.string().utf8(); 959 959 }
Note: See TracChangeset
for help on using the changeset viewer.