Commit 7c9aa2d4 authored by darin's avatar darin

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: http://svn.webkit.org/repository/webkit/trunk@17597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a0d698eb
2006-11-04 Darin Adler <darin@apple.com>
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:
2006-11-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Adele.
......@@ -130,10 +130,13 @@ _WebCoreSetShouldUseFontSmoothing
_WebCoreShouldUseFontSmoothing
_WebCoreTextFloatWidth
__Z26ReportBlockedObjCExceptionP11NSException
__ZN7WebCore10EventNames10clickEventE
__ZN7WebCore10EventNames12keydownEventE
__ZN7WebCore10MouseEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowEiiiiibbbbtPNS_15EventTargetNodeEPNS_9ClipboardEb
__ZN7WebCore10StringImplD1Ev
__ZN7WebCore11FrameLoader11stopLoadingEP7NSError
__ZN7WebCore11FrameLoader11stopLoadingEv
__ZN7WebCore11FrameLoader12shouldReloadEP5NSURLS2_
__ZN7WebCore11FrameLoader12shouldReloadERKNS_4KURLES3_
__ZN7WebCore11FrameLoader14detachChildrenEv
__ZN7WebCore11FrameLoader16detachFromParentEv
__ZN7WebCore11FrameLoader19requestFromDelegateEP12NSURLRequestRP11objc_objectRP7NSError
......@@ -148,12 +151,12 @@ __ZN7WebCore11FrameLoader29sendRemainingDelegateMessagesEP11objc_objectP13NSURLR
__ZN7WebCore11FrameLoader4loadEP12NSURLRequest
__ZN7WebCore11FrameLoader4loadEP12NSURLRequestRKNS_16NavigationActionENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE
__ZN7WebCore11FrameLoader4loadEP12NSURLRequestRKNS_6StringE
__ZN7WebCore11FrameLoader4loadEP5NSURLRKNS_6StringENS_13FrameLoadTypeES5_P7NSEventPNS_7ElementERKN3WTF7HashMapIS3_S3_NSB_7StrHashIS3_EENSB_10HashTraitsIS3_EESG_EE
__ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderE
__ZN7WebCore11FrameLoader4loadEPNS_14DocumentLoaderENS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE
__ZN7WebCore11FrameLoader4loadERKNS_4KURLEPNS_5EventE
__ZN7WebCore11FrameLoader4loadERKNS_4KURLERKNS_6StringENS_13FrameLoadTypeES6_PNS_5EventEPNS_7ElementERKN3WTF7HashMapIS4_S4_NSC_7StrHashIS4_EENSC_10HashTraitsIS4_EESH_EE
__ZN7WebCore11FrameLoader6reloadEv
__ZN7WebCore11FrameLoader7canLoadEP5NSURLRKNS_6StringERb
__ZN7WebCore11FrameLoader8safeLoadEP5NSURL
__ZN7WebCore11FrameLoader9setClientEPNS_17FrameLoaderClientE
__ZN7WebCore11RenderLayer18gAlignCenterAlwaysE
__ZN7WebCore11selectRangeEPNS_19SelectionControllerEPNS_5RangeENS_9EAffinityEb
......@@ -162,12 +165,13 @@ __ZN7WebCore13HitTestResultC1ERKNS_8IntPointE
__ZN7WebCore13HitTestResultC1ERKS0_
__ZN7WebCore13HitTestResultD1Ev
__ZN7WebCore13HitTestResultaSERKS0_
__ZN7WebCore13KeyboardEventC1ERKNS_12AtomicStringEbbPNS_9DOMWindowERKNS_6StringEjbbbbb
__ZN7WebCore14DocumentLoader12setCommittedEb
__ZN7WebCore14DocumentLoader13attachToFrameEv
__ZN7WebCore14DocumentLoader15detachFromFrameEv
__ZN7WebCore14DocumentLoader19prepareForLoadStartEv
__ZN7WebCore14DocumentLoader19setOverrideEncodingERKNS_6StringE
__ZN7WebCore14DocumentLoader32replaceRequestURLForAnchorScrollEP5NSURL
__ZN7WebCore14DocumentLoader32replaceRequestURLForAnchorScrollERKNS_4KURLE
__ZN7WebCore14DocumentLoader7requestEv
__ZN7WebCore14DocumentLoaderC2EP12NSURLRequest
__ZN7WebCore14DocumentLoaderD2Ev
......@@ -188,6 +192,7 @@ __ZN7WebCore16NavigationActionC1Ev
__ZN7WebCore17FrameLoaderClientD2Ev
__ZN7WebCore19SelectionController5clearEv
__ZN7WebCore19SelectionController9selectAllEv
__ZN7WebCore21PlatformKeyboardEventC1EP7NSEventb
__ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
__ZN7WebCore26NetscapePlugInStreamLoader6createEPNS_5FrameEP11objc_object
__ZN7WebCore4KURLC1EP5NSURL
......@@ -293,10 +298,10 @@ __ZNK7WebCore12AtomicString16deprecatedStringEv
__ZNK7WebCore12RenderObject25backslashAsCurrencySymbolEv
__ZNK7WebCore13HitTestResult10isSelectedEv
__ZNK7WebCore13HitTestResult11boundingBoxEv
__ZNK7WebCore13HitTestResult15spellingToolTipEv
__ZNK7WebCore13HitTestResult11targetFrameEv
__ZNK7WebCore13HitTestResult11textContentEv
__ZNK7WebCore13HitTestResult15absoluteLinkURLEv
__ZNK7WebCore13HitTestResult15spellingToolTipEv
__ZNK7WebCore13HitTestResult16absoluteImageURLEv
__ZNK7WebCore13HitTestResult16altDisplayStringEv
__ZNK7WebCore13HitTestResult18titleDisplayStringEv
......
......@@ -531,20 +531,20 @@
85031B3F0A44EFC700F992E0 /* ClipboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B290A44EFC700F992E0 /* ClipboardEvent.cpp */; };
85031B400A44EFC700F992E0 /* ClipboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2A0A44EFC700F992E0 /* ClipboardEvent.h */; };
85031B410A44EFC700F992E0 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B2B0A44EFC700F992E0 /* Event.cpp */; };
85031B420A44EFC700F992E0 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2C0A44EFC700F992E0 /* Event.h */; };
85031B420A44EFC700F992E0 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2C0A44EFC700F992E0 /* Event.h */; settings = {ATTRIBUTES = (Private, ); }; };
85031B430A44EFC700F992E0 /* KeyboardEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B2D0A44EFC700F992E0 /* KeyboardEvent.cpp */; };
85031B440A44EFC700F992E0 /* KeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2E0A44EFC700F992E0 /* KeyboardEvent.h */; };
85031B440A44EFC700F992E0 /* KeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B2E0A44EFC700F992E0 /* KeyboardEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
85031B450A44EFC700F992E0 /* MouseEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B2F0A44EFC700F992E0 /* MouseEvent.cpp */; };
85031B460A44EFC700F992E0 /* MouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B300A44EFC700F992E0 /* MouseEvent.h */; };
85031B460A44EFC700F992E0 /* MouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B300A44EFC700F992E0 /* MouseEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
85031B470A44EFC700F992E0 /* MouseRelatedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B310A44EFC700F992E0 /* MouseRelatedEvent.cpp */; };
85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B320A44EFC700F992E0 /* MouseRelatedEvent.h */; };
85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B320A44EFC700F992E0 /* MouseRelatedEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B330A44EFC700F992E0 /* MutationEvent.cpp */; };
85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B340A44EFC700F992E0 /* MutationEvent.h */; };
85031B4B0A44EFC700F992E0 /* RegisteredEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B350A44EFC700F992E0 /* RegisteredEventListener.cpp */; };
85031B4C0A44EFC700F992E0 /* RegisteredEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B360A44EFC700F992E0 /* RegisteredEventListener.h */; };
85031B4D0A44EFC700F992E0 /* UIEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B370A44EFC700F992E0 /* UIEvent.cpp */; };
85031B4E0A44EFC700F992E0 /* UIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B380A44EFC700F992E0 /* UIEvent.h */; };
85031B4F0A44EFC700F992E0 /* UIEventWithKeyState.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B390A44EFC700F992E0 /* UIEventWithKeyState.h */; };
85031B4E0A44EFC700F992E0 /* UIEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B380A44EFC700F992E0 /* UIEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
85031B4F0A44EFC700F992E0 /* UIEventWithKeyState.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B390A44EFC700F992E0 /* UIEventWithKeyState.h */; settings = {ATTRIBUTES = (Private, ); }; };
85031B500A44EFC700F992E0 /* WheelEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 85031B3A0A44EFC700F992E0 /* WheelEvent.cpp */; };
85031B510A44EFC700F992E0 /* WheelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85031B3B0A44EFC700F992E0 /* WheelEvent.h */; };
85032DD70AA8C9BE007D3B7D /* DOMCSSCharsetRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 85032DC30AA8C9BE007D3B7D /* DOMCSSCharsetRule.h */; };
......@@ -1436,7 +1436,7 @@
935C475F09AC4CAE00A6AAB4 /* HistoryMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935C475E09AC4CAE00A6AAB4 /* HistoryMac.mm */; };
935C476109AC4CD100A6AAB4 /* Length.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476009AC4CD100A6AAB4 /* Length.h */; settings = {ATTRIBUTES = (Private, ); }; };
935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */; };
935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */; };
935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
935C476909AC4D4300A6AAB4 /* PlatformMouseEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476709AC4D4300A6AAB4 /* PlatformMouseEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
935C476B09AC4D4F00A6AAB4 /* PlatformWheelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476A09AC4D4F00A6AAB4 /* PlatformWheelEvent.h */; };
935C476D09AC4D6300A6AAB4 /* FoundationExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476C09AC4D6300A6AAB4 /* FoundationExtras.h */; };
......@@ -1466,7 +1466,7 @@
9392F1500AD1862300691BD4 /* CounterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9392F14F0AD1862300691BD4 /* CounterNode.cpp */; };
9392F1520AD1862B00691BD4 /* CounterListItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 9392F1510AD1862B00691BD4 /* CounterListItem.h */; };
939885C308B7E3D100E707C4 /* EventNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 939885C108B7E3D100E707C4 /* EventNames.cpp */; };
939885C408B7E3D100E707C4 /* EventNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 939885C208B7E3D100E707C4 /* EventNames.h */; };
939885C408B7E3D100E707C4 /* EventNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 939885C208B7E3D100E707C4 /* EventNames.h */; settings = {ATTRIBUTES = (Private, ); }; };
93A1EAA00A5634C9006960A0 /* ImageDocumentMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93A1EA9F0A5634C9006960A0 /* ImageDocumentMac.mm */; };
93A1EAA80A563508006960A0 /* ImageDocumentMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 93A1EAA70A563508006960A0 /* ImageDocumentMac.h */; };
93AC8DE10A955FAC00239794 /* TextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 93AC8DE00A955FAC00239794 /* TextStyle.h */; };
......@@ -2114,7 +2114,6 @@
A88AD50A095248F0001DD196 /* SVGViewElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F8EA089701F400BA5114 /* SVGViewElement.h */; };
A88AD50B095248F0001DD196 /* SVGZoomAndPan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F8EB089701F400BA5114 /* SVGZoomAndPan.cpp */; };
A88AD50C095248F0001DD196 /* SVGZoomAndPan.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F8EC089701F400BA5114 /* SVGZoomAndPan.h */; };
A88AD50D095248F0001DD196 /* ksvg.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F8ED089701F400BA5114 /* ksvg.h */; };
A88AD52F09524B92001DD196 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A85D7A2F0879EBA9006A9172 /* QuartzCore.framework */; };
A88AD5AA09525131001DD196 /* SVGCSSStyleSelector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F6FB089701F100BA5114 /* SVGCSSStyleSelector.cpp */; };
A8C4A7FD09D563270003AC8D /* StyledElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A7EB09D563270003AC8D /* StyledElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -4911,7 +4910,6 @@
A8C0F8EA089701F400BA5114 /* SVGViewElement.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGViewElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F8EB089701F400BA5114 /* SVGZoomAndPan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGZoomAndPan.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F8EC089701F400BA5114 /* SVGZoomAndPan.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGZoomAndPan.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F8ED089701F400BA5114 /* ksvg.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = ksvg.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB54089701F700BA5114 /* KRenderingDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KRenderingDevice.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB55089701F700BA5114 /* KRenderingDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KRenderingDevice.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0FB5B089701F700BA5114 /* KRenderingPaintServer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KRenderingPaintServer.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
......@@ -7785,7 +7783,6 @@
A8C0F7F1089701F300BA5114 /* events */,
A8C0F6EA089701F100BA5114 /* misc */,
A8C0F7FC089701F300BA5114 /* svg */,
A8C0F8ED089701F400BA5114 /* ksvg.h */,
);
path = ksvg2;
sourceTree = "<group>";
......@@ -9302,7 +9299,6 @@
A88AD508095248F0001DD196 /* SVGUseElement.h in Headers */,
A88AD50A095248F0001DD196 /* SVGViewElement.h in Headers */,
A88AD50C095248F0001DD196 /* SVGZoomAndPan.h in Headers */,
A88AD50D095248F0001DD196 /* ksvg.h in Headers */,
6552E7AA096AA11B0006F248 /* WebCoreFrameNamespaces.h in Headers */,
A81655E5096BC13900601058 /* SVGMaskElement.h in Headers */,
A81369CA097374F600D74463 /* HTMLIsIndexElement.h in Headers */,
......@@ -161,17 +161,18 @@ bool Navigator::getOwnPropertySlot(ExecState *exec, const Identifier& propertyNa
return getStaticPropertySlot<NavigatorFunc, Navigator, JSObject>(exec, &NavigatorTable, this, propertyName, slot);
}
JSValue *Navigator::getValueProperty(ExecState *exec, int token) const
JSValue* Navigator::getValueProperty(ExecState* exec, int token) const
{
String userAgent = m_frame->userAgent();
switch (token) {
case AppCodeName:
return jsString("Mozilla");
case AppName:
return jsString("Netscape");
case AppVersion:
// We assume the string is something like Mozilla/version (properties)
case AppVersion: {
// Version is everything in the user agent string past the "Mozilla/" prefix.
const String userAgent = m_frame->userAgent();
return jsString(userAgent.substring(userAgent.find('/') + 1));
}
case Product:
return jsString("Gecko");
case ProductSub:
......@@ -183,7 +184,7 @@ JSValue *Navigator::getValueProperty(ExecState *exec, int token) const
case Language:
return jsString(defaultLanguage());
case UserAgent:
return jsString(userAgent);
return jsString(m_frame->userAgent());
case Platform:
return jsString(WEBCORE_NAVIGATOR_PLATFORM);
case _Plugins:
......
......@@ -97,9 +97,9 @@ public:
~FrameMac();
// FIXME: Merge these and move them into FrameLoader.
virtual void urlSelected(const FrameLoadRequest&, const Event* triggeringEvent);
virtual void urlSelected(const FrameLoadRequest&, Event*);
virtual Frame* createFrame(const KURL&, const String& name, Element* ownerElement, const String& referrer);
virtual void submitForm(const FrameLoadRequest&);
virtual void submitForm(const FrameLoadRequest&, Event*);
virtual Plugin* createPlugin(Element*, const KURL&,
const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType);
......
......@@ -36,7 +36,6 @@
#import "ClipboardMac.h"
#import "Cursor.h"
#import "DOMInternal.h"
#import "DOMWindow.h"
#import "DocumentLoader.h"
#import "Event.h"
#import "EventNames.h"
......@@ -188,7 +187,7 @@ FrameMac::~FrameMac()
#pragma mark BEGIN LOADING FUNCTIONS
void FrameMac::submitForm(const FrameLoadRequest& request)
void FrameMac::submitForm(const FrameLoadRequest& request, Event* event)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
......@@ -216,7 +215,7 @@ void FrameMac::submitForm(const FrameLoadRequest& request)
d->m_submittedFormURL = request.resourceRequest().url();
}
loader()->load(request, true, _currentEvent,
loader()->load(request, true, event,
d->m_formAboutToBeSubmitted.get(), d->m_formValuesAboutToBeSubmitted);
clearRecordedFormValues();
......@@ -224,14 +223,14 @@ void FrameMac::submitForm(const FrameLoadRequest& request)
END_BLOCK_OBJC_EXCEPTIONS;
}
void FrameMac::urlSelected(const FrameLoadRequest& request, const Event* /*triggeringEvent*/)
void FrameMac::urlSelected(const FrameLoadRequest& request, Event* event)
{
FrameLoadRequest copy = request;
if (copy.resourceRequest().httpReferrer().isEmpty())
copy.resourceRequest().setHTTPReferrer(referrer());
// FIXME: How do we know that userGesture is always true?
loader()->load(copy, true, _currentEvent, 0, HashMap<String, String>());
loader()->load(copy, true, event, 0, HashMap<String, String>());
}
Frame* FrameMac::createFrame(const KURL& url, const String& name, Element* ownerElement, const String& referrer)
......@@ -806,7 +805,7 @@ void FrameMac::stopRedirectionTimer()
String FrameMac::userAgent() const
{
return loader()->client()->userAgent(url().getNSURL());
return loader()->client()->userAgent();
}
String FrameMac::mimeTypeForFileName(const String& fileName) const
......
......@@ -26,8 +26,8 @@
#import "config.h"
#import "FrameView.h"
#import "Document.h"
#import "BlockExceptions.h"
#import "Document.h"
#import "FrameMac.h"
#import "MouseEventWithHitTestResults.h"
#import "PlatformScrollBar.h"
......
......@@ -2317,7 +2317,7 @@ static VisiblePosition endOfStyleRange (const VisiblePosition visiblePos)
return NSAccessibilityUnignoredAncestor(obj->document()->axObjectCache()->get(obj));
}
- (RenderObject*) rendererForView:(NSView*)view
- (RenderObject*)rendererForView:(NSView*)view
{
// check for WebCore NSView that lets us find its widget
Frame* frame = m_renderer->document()->frame();
......
......@@ -51,8 +51,6 @@ class WebCoreFrameBridge;
- (id)initWithChromeClient:(PassRefPtr<WebCore::ChromeClient>)chromeClient;
- (void)close;
- (void)setMainFrame:(WebCoreFrameBridge *)mainFrame;
- (WebCoreFrameBridge *)mainFrame;
- (void)setGroupName:(NSString *)groupName;
......
......@@ -79,12 +79,6 @@ static void initializeLoggingChannelsIfNecessary()
return self;
}
- (void)setMainFrame:(WebCoreFrameBridge *)mainFrame
{
if (_page)
_page->setMainFrame(adoptRef([mainFrame _frame]));
}
- (void)dealloc
{
ASSERT(_closed);
......
......@@ -27,9 +27,8 @@
#import "config.h"
#import "WebCoreSettings.h"
#import "Settings.h"
#import "Page.h"
#import "WebCoreFrameBridge.h"
#import "Settings.h"
using namespace WebCore;
......
......@@ -62,13 +62,13 @@ FrameWin::~FrameWin()
clearRecordedFormValues();
}
void FrameWin::urlSelected(const FrameLoadRequest& request, const Event* /*triggeringEvent*/)
void FrameWin::urlSelected(const FrameLoadRequest& request, Event* /*triggeringEvent*/)
{
if (m_client)
m_client->openURL(request.resourceRequest().url().url(), request.lockHistory());
}
void FrameWin::submitForm(const FrameLoadRequest& request)
void FrameWin::submitForm(const FrameLoadRequest& request, Event*)
{
// FIXME: this is a hack inherited from FrameMac, and should be pushed into Frame
const ResourceRequest& resourceRequest = request.resourceRequest();
......
......@@ -49,8 +49,8 @@ public:
~FrameWin();
virtual void createNewWindow(const FrameLoadRequest&, const WindowFeatures&, Frame*& part);
virtual void submitForm(const FrameLoadRequest&);
virtual void urlSelected(const FrameLoadRequest&, const Event* triggeringEvent);
virtual void submitForm(const FrameLoadRequest&, Event*);
virtual void urlSelected(const FrameLoadRequest&, Event*);
virtual void setTitle(const String&);
virtual void setStatusBarText(const String&);
......
......@@ -25,7 +25,7 @@
#include "config.h"
#include "MouseRelatedEvent.h"
#include "AtomicString.h"
#include "DOMWindow.h"
#include "Document.h"
#include "Frame.h"
#include "Node.h"
......
......@@ -26,14 +26,10 @@
#ifndef MouseRelatedEvent_h
#define MouseRelatedEvent_h
#include "AtomicString.h"
#include "DOMWindow.h"
#include "UIEventWithKeyState.h"
namespace WebCore {
typedef DOMWindow AbstractView;
// Internal only: Helper class for what's common between mouse and wheel events.
class MouseRelatedEvent : public UIEventWithKeyState {
public:
......
......@@ -21,10 +21,11 @@
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "UIEvent.h"
#include "AtomicString.h"
#include "DOMWindow.h"
namespace WebCore {
......@@ -40,6 +41,10 @@ UIEvent::UIEvent(const AtomicString& eventType, bool canBubbleArg, bool cancelab
{
}
UIEvent::~UIEvent()
{
}
void UIEvent::initUIEvent(const AtomicString& typeArg, bool canBubbleArg, bool cancelableArg, AbstractView* viewArg, int detailArg)
{
if (dispatched())
......
......@@ -26,18 +26,19 @@
#ifndef UIEvent_h
#define UIEvent_h
#include "AtomicString.h"
#include "DOMWindow.h"
#include "Event.h"
namespace WebCore {
class DOMWindow;
typedef DOMWindow AbstractView;
class UIEvent : public Event {
public:
UIEvent();
UIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail);
virtual ~UIEvent();
void initUIEvent(const AtomicString& type, bool canBubble, bool cancelable, AbstractView* view, int detail);
......
......@@ -26,14 +26,10 @@
#ifndef UIEventWithKeyState_h
#define UIEventWithKeyState_h
#include "AtomicString.h"
#include "DOMWindow.h"
#include "UIEvent.h"
namespace WebCore {
typedef DOMWindow AbstractView;
class UIEventWithKeyState : public UIEvent {
public:
UIEventWithKeyState()
......
......@@ -42,6 +42,7 @@
#include "LoaderFunctions.h"
#include "ProcessingInstruction.h"
#include "ResourceHandle.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
......@@ -458,10 +459,8 @@ static void* openFunc(const char* uri)
if (!globalDocLoader || !shouldAllowExternalLoad(uri))
return &globalDescriptor;
KURL kurl(uri);
ResourceRequest request(kurl);
ResourceResponse response;
Vector<char> data = ServeSynchronousRequest(cache()->loader(), globalDocLoader, request, response);
Vector<char> data = ServeSynchronousRequest(cache()->loader(), globalDocLoader, KURL(uri), response);
return new OffsetBuffer(data);
}
......
......@@ -115,7 +115,7 @@ bool HTMLAnchorElement::isKeyboardFocusable() const
return document()->frame()->tabsToLinks();
}
void HTMLAnchorElement::defaultEventHandler(Event *evt)
void HTMLAnchorElement::defaultEventHandler(Event* evt)
{
// React on clicks and on keypresses.
// Don't make this KEYUP_EVENT again, it makes khtml follow links it shouldn't,
......@@ -140,7 +140,7 @@ void HTMLAnchorElement::defaultEventHandler(Event *evt)
if (document()->frame() && document()->frame()->settings())
editableLinkBehavior = document()->frame()->settings()->editableLinkBehavior();
switch(editableLinkBehavior) {
switch (editableLinkBehavior) {
// Always follow the link (Safari 2.0 behavior)
default:
case Settings::EditableLinkDefaultBehavior:
......
......@@ -88,7 +88,7 @@ void HTMLButtonElement::defaultEventHandler(Event *evt)
if (m_type != BUTTON && (evt->type() == DOMActivateEvent) && !disabled()) {
if (form() && m_type == SUBMIT) {
m_activeSubmit = true;
form()->prepareSubmit();
form()->prepareSubmit(evt);
m_activeSubmit = false; // in case we were canceled
}
if (form() && m_type == RESET)
......
......@@ -124,7 +124,7 @@ Node* HTMLFormElement::item(unsigned index)
return elements()->item(index);
}
void HTMLFormElement::submitClick()
void HTMLFormElement::submitClick(Event* event)
{
bool submitFound = false;
for (unsigned i = 0; i < formElements.size(); ++i) {
......@@ -138,7 +138,7 @@ void HTMLFormElement::submitClick()
}
}
if (!submitFound) // submit the form without a submit or image input
prepareSubmit();
prepareSubmit(event);
}
static DeprecatedCString encodeCString(const CString& cstr)
......@@ -305,9 +305,9 @@ void HTMLFormElement::setBoundary( const String& bound )
m_boundary = bound;
}
bool HTMLFormElement::prepareSubmit()
bool HTMLFormElement::prepareSubmit(Event* event)
{
Frame *frame = document()->frame();
Frame* frame = document()->frame();
if (m_insubmit || !frame)
return m_insubmit;
......@@ -320,19 +320,24 @@ bool HTMLFormElement::prepareSubmit()
m_insubmit = false;
if (m_doingsubmit)
submit(true);
submit(event, true);