WebCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2006 01:06:47 +0000 (01:06 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Nov 2006 01:06:47 +0000 (01:06 +0000)
commit71b47c560f8cbe93520c0fb87d4eae0a4c5beca4
treef988fdd2ab70af43e4dda0d6117d3aa20ce60424
parenta141c75918925c8736bdb801a20845546b9e2f6a
WebCore:

        Reviewed by Maciej.

        - converted more of the loader machinery to work with cross-platform
          data structures instead of Macintosh-specific ones

          converted most uses of NSURL to KURL and NSEvent to DOM Event in
          loader classes

          moved download function out of FrameLoader.h to avoid reference to
          NSURLConnection

          added DOM Event parameters to various functions so that the handlers
          can use the DOM Event instead of the global "current NSEvent";
          includes Frame::submitForm, HTMLFormElement::prepareSubmit,
          HTMLFormElement::submit, FrameLoader::load

          moved the setMainFrame call that hands ownership to the Page
          into one of the Frame constructors, and removed it from all
          the clients

          removed const from Event parameter to the urlSelected function
          (we rarely use const with DOM elements)

          removed some redundant includes and declarations from various
          header files

          removed NSURL parameter from userAgent function -- if we need it we
          can add it back, but converting from NSURL to KURL and back is
          inefficient enough that it's best to have it out for now (since it's
          been unused for years) -- if we add it back, we can choose an
          appropriate parameter type that's always inexpensive to pass

          did some basic cleanup in the IconLoader class, including removing
          an unnecessary loop that added icon data a byte at a time

          renamed safeLoad to load, since it's no different from the other
          FrameLoader load functions, safety-wise

          fixed some code that was trying to distinguish null frame name from
          empty string frame name -- both should be handled the same, but callers
          were doing it by checking for empty and turning it into null (in a way
          that was causing extra round trips between NSString and WebCore::String)

          corrected all uses of "get" and "post" to be uppercase "GET" and "POST"
          and got rid of case-insensitive compares of methods

        * WebCore.exp:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_navigator.cpp:
        (KJS::Navigator::getValueProperty):
        * bridge/mac/FrameMac.h:
        * bridge/mac/FrameMac.mm:
        (WebCore::FrameMac::submitForm):
        (WebCore::FrameMac::urlSelected):
        (WebCore::FrameMac::userAgent):
        * bridge/mac/FrameViewMac.mm:
        * bridge/mac/WebCoreAXObject.mm:
        (-[WebCoreAXObject rendererForView:]):
        * bridge/mac/WebCorePageBridge.h:
        * bridge/mac/WebCorePageBridge.mm:
        * bridge/mac/WebCoreSettings.mm:
        * bridge/win/FrameWin.cpp:
        (WebCore::FrameWin::urlSelected):
        (WebCore::FrameWin::submitForm):
        * bridge/win/FrameWin.h:
        * dom/MouseRelatedEvent.cpp:
        * dom/MouseRelatedEvent.h:
        * dom/UIEvent.cpp:
        (WebCore::UIEvent::~UIEvent):
        * dom/UIEvent.h:
        * dom/UIEventWithKeyState.h:
        * dom/XMLTokenizer.cpp:
        (WebCore::openFunc):
        * html/HTMLAnchorElement.cpp:
        (WebCore::HTMLAnchorElement::defaultEventHandler):
        * html/HTMLButtonElement.cpp:
        (WebCore::HTMLButtonElement::defaultEventHandler):
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submitClick):
        (WebCore::HTMLFormElement::prepareSubmit):
        (WebCore::HTMLFormElement::submit):
        * html/HTMLFormElement.h:
        * html/HTMLInputElement.cpp:
        (WebCore::HTMLInputElement::defaultEventHandler):
        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
        * loader/DocumentLoader.h:
        * loader/FrameLoader.h:
        * loader/FrameLoaderClient.h:
        * loader/NavigationAction.h:
        (WebCore::NavigationAction::event):
        * loader/icon/IconLoader.cpp:
        (WebCore::IconLoader::create):
        (WebCore::IconLoader::startLoading):
        (WebCore::IconLoader::didReceiveData):
        (WebCore::IconLoader::didFinishLoading):
        * loader/icon/IconLoader.h:
        * loader/loader.cpp:
        * loader/mac/DocumentLoaderMac.mm:
        (WebCore::DocumentLoader::URL):
        (WebCore::DocumentLoader::unreachableURL):
        (WebCore::DocumentLoader::replaceRequestURLForAnchorScroll):
        (WebCore::DocumentLoader::URLForHistory):
        * loader/mac/FrameLoaderMac.mm:
        (WebCore::FrameLoader::load):
        (WebCore::FrameLoader::willSendRequest):
        (WebCore::FrameLoader::clientRedirected):
        (WebCore::FrameLoader::shouldReload):
        (WebCore::FrameLoader::notifyIconChanged):
        (WebCore::FrameLoader::URL):
        (WebCore::FrameLoader::reloadAllowingStaleData):
        (WebCore::FrameLoader::reload):
        (WebCore::FrameLoader::didChangeTitle):
        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
        (WebCore::FrameLoader::post):
        (WebCore::FrameLoader::addExtraFieldsToRequest):
        (WebCore::FrameLoader::loadResourceSynchronously):
        * loader/mac/IconLoaderMac.mm:
        (WebCore::IconLoader::notifyIconChanged):
        * loader/mac/LoaderFunctionsMac.mm:
        * loader/mac/MainResourceLoaderMac.mm:
        (WebCore::shouldLoadAsEmptyDocument):
        (WebCore::MainResourceLoader::continueAfterContentPolicy):
        * loader/mac/NavigationActionMac.mm:
        (WebCore::navigationType):
        (WebCore::NavigationAction::NavigationAction):
        * loader/mac/ResourceLoaderMac.mm:
        * loader/mac/SubresourceLoaderMac.mm:
        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        (WebCore::Frame::urlSelected):
        (WebCore::Frame::submitFormAgain):
        (WebCore::Frame::submitForm):
        (WebCore::Frame::endIfNotLoading):
        (WebCore::Frame::hitTestResultAtPoint):
        * page/Frame.h:
        * page/FramePrivate.h:
        * platform/gdk/FrameGdk.cpp:
        (WebCore::FrameGdk::FrameGdk):
        (WebCore::FrameGdk::submitForm):
        (WebCore::FrameGdk::urlSelected):
        * platform/gdk/FrameGdk.h:
        * platform/mac/TextFieldMac.mm:
        * platform/network/HTTPHeaderMap.h:
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceHandleClient.h:
        * platform/network/ResourceHandleInternal.h:
        * platform/network/mac/ResourceHandleMac.mm:
        * platform/network/mac/ResourceResponseMac.h:
        * platform/network/mac/ResourceResponseMac.mm:
        (-[NSURLResponse WebCore]):
        * platform/network/win/ResourceHandleWin.cpp:
        * platform/qt/FrameQt.cpp:
        (WebCore::FrameQt::submitForm):
        (WebCore::FrameQt::urlSelected):
        * platform/qt/FrameQt.h:
        * rendering/RenderLineEdit.cpp:
        (WebCore::RenderLineEdit::returnPressed):
        * xml/XSLTProcessor.cpp:
        (WebCore::docLoaderFunc):
        * xml/xmlhttprequest.cpp:

WebKit:

        Reviewed by Maciej.

        - converted more of the loader machinery to work with cross-platform
          data structures instead of Macintosh-specific ones

          store the computed user agent string as a WebCore::String instead
          of an NSString to avoid overhead converting it every time we get it

        * COM/WebFrame.cpp:
        (WebFrame::initWithName):
        * ChangeLog:
        * Misc/WebElementDictionary.m:
        (-[WebElementDictionary _image]):
        (-[WebElementDictionary _targetWebFrame]):
        * WebCoreSupport/WebFrameLoaderClient.h:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
        (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
        (WebFrameLoaderClient::setTitle):
        (WebFrameLoaderClient::userAgent):
        (WebFrameLoaderClient::actionDictionary):
        * WebCoreSupport/WebPageBridge.mm:
        (WebCore::if):
        * WebView/WebDataSource.mm:
        (-[WebDataSource _URL]):
        (-[WebDataSource _URLForHistory]):
        (-[WebDataSource unreachableURL]):
        * WebView/WebHTMLView.m:
        (-[WebHTMLView elementAtPoint:allowShadowContent:]):
        * WebView/WebPDFView.mm:
        (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
        (-[WebPDFView _path]):
        * WebView/WebView.mm:
        (-[WebViewPrivate init]):
        (-[WebViewPrivate dealloc]):
        (-[WebViewPrivate finalize]):
        (-[WebView _preferencesChangedNotification:]):
        (-[WebView _cachedResponseForURL:]):
        (-[WebView setApplicationNameForUserAgent:]):
        (-[WebView setCustomUserAgent:]):
        (-[WebView customUserAgent]):
        (-[WebView userAgentForURL:]):
        (-[WebView _computeUserAgent]):
        (-[WebView WebCore::]):
        * WebView/WebViewInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
85 files changed:
WebCore/ChangeLog
WebCore/WebCore.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/kjs_navigator.cpp
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/bridge/mac/FrameViewMac.mm
WebCore/bridge/mac/WebCoreAXObject.mm
WebCore/bridge/mac/WebCorePageBridge.h
WebCore/bridge/mac/WebCorePageBridge.mm
WebCore/bridge/mac/WebCoreSettings.mm
WebCore/bridge/win/FrameWin.cpp
WebCore/bridge/win/FrameWin.h
WebCore/dom/MouseRelatedEvent.cpp
WebCore/dom/MouseRelatedEvent.h
WebCore/dom/UIEvent.cpp
WebCore/dom/UIEvent.h
WebCore/dom/UIEventWithKeyState.h
WebCore/dom/XMLTokenizer.cpp
WebCore/html/HTMLAnchorElement.cpp
WebCore/html/HTMLButtonElement.cpp
WebCore/html/HTMLFormElement.cpp
WebCore/html/HTMLFormElement.h
WebCore/html/HTMLInputElement.cpp
WebCore/html/HTMLSelectElement.cpp
WebCore/ksvg2/css/SVGCSSParser.cpp
WebCore/ksvg2/css/SVGCSSStyleSelector.cpp
WebCore/ksvg2/css/SVGRenderStyleDefs.cpp
WebCore/ksvg2/css/SVGRenderStyleDefs.h
WebCore/ksvg2/ksvg.h [deleted file]
WebCore/ksvg2/misc/KCanvasRenderingStyle.cpp
WebCore/ksvg2/svg/SVGDOMImplementation.cpp
WebCore/ksvg2/svg/SVGFEDiffuseLightingElement.cpp
WebCore/ksvg2/svg/SVGHelper.cpp
WebCore/ksvg2/svg/SVGMatrix.cpp
WebCore/ksvg2/svg/SVGPathSeg.h
WebCore/ksvg2/svg/SVGScriptElement.cpp
WebCore/ksvg2/svg/SVGStyledElement.cpp
WebCore/ksvg2/svg/SVGTransform.cpp
WebCore/loader/DocumentLoader.h
WebCore/loader/FrameLoader.h
WebCore/loader/FrameLoaderClient.h
WebCore/loader/NavigationAction.h
WebCore/loader/icon/IconLoader.cpp
WebCore/loader/icon/IconLoader.h
WebCore/loader/loader.cpp
WebCore/loader/mac/DocumentLoaderMac.mm
WebCore/loader/mac/FrameLoaderMac.mm
WebCore/loader/mac/IconLoaderMac.mm
WebCore/loader/mac/LoaderFunctionsMac.mm
WebCore/loader/mac/MainResourceLoaderMac.mm
WebCore/loader/mac/NavigationActionMac.mm
WebCore/loader/mac/ResourceLoaderMac.mm
WebCore/loader/mac/SubresourceLoaderMac.mm
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FramePrivate.h
WebCore/platform/gdk/FrameGdk.cpp
WebCore/platform/gdk/FrameGdk.h
WebCore/platform/mac/TextFieldMac.mm
WebCore/platform/network/HTTPHeaderMap.h
WebCore/platform/network/ResourceHandle.h
WebCore/platform/network/ResourceHandleClient.h
WebCore/platform/network/ResourceHandleInternal.h
WebCore/platform/network/mac/ResourceHandleMac.mm
WebCore/platform/network/mac/ResourceResponseMac.h
WebCore/platform/network/mac/ResourceResponseMac.mm
WebCore/platform/network/win/ResourceHandleWin.cpp
WebCore/platform/qt/FrameQt.cpp
WebCore/platform/qt/FrameQt.h
WebCore/rendering/RenderLineEdit.cpp
WebCore/rendering/RenderSVGImage.cpp
WebCore/xml/XSLTProcessor.cpp
WebCore/xml/xmlhttprequest.cpp
WebKit/COM/WebFrame.cpp
WebKit/ChangeLog
WebKit/Misc/WebElementDictionary.m
WebKit/WebCoreSupport/WebFrameLoaderClient.h
WebKit/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/WebCoreSupport/WebPageBridge.mm
WebKit/WebView/WebDataSource.mm
WebKit/WebView/WebHTMLView.m
WebKit/WebView/WebPDFView.mm
WebKit/WebView/WebView.mm
WebKit/WebView/WebViewInternal.h