+2006-10-27 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by John & Adam.
+
+ - assorted speedups to fix perf regression from fixing correctness regression
+
+ * WebCore.exp: exported new methods.
+ * WebCore.xcodeproj/project.pbxproj: Added CachedResourceMac.mm
+ * bridge/mac/WebCoreFrameBridge.h:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ * loader/CachedResource.cpp: Removed now obsolete getCFURL.
+ * loader/CachedResource.h:
+ * loader/mac/CachedResourceMac.mm: Added.
+ (WebCore::CachedResource::getNSURLRequest): New method; the NSURLRequest is
+ now cached in the CachedObject.
+ * loader/mac/FrameLoader.h:
+ * loader/mac/FrameLoader.mm:
+ (WebCore::FrameLoader::loadedResourceFromMemoryCache): New method - lets
+ the WebKit side do faster dispatch for clients that implement the fast path delegate.
+ * loader/mac/LoaderFunctionsMac.mm:
+ (WebCore::CheckCacheObjectStatus): Instead of calling several FrameLoader methods,
+ just call loadedResourceFromMemoryCache.
+ * loader/mac/WebFrameLoaderClient.h:
+
2006-10-27 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej.
(WebCore::enclosingDeletableElement):
(WebCore::DeleteButtonController::respondToChangedSelection):
+2006-10-27 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Anders
+
+ * WebCore.exp:
+ exported symbol for FrameMac->advanceToNextSpelling()
+
+ * bridge/mac/WebCoreFrameBridge.h:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ removed advanceToNextMisspelling callers. Clients in WebKit must now call FrameMac directly.
+
+2006-10-27 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by harrison
+
+ <http://bugs.webkit.org/show_bug.cgi?id=11423>
+ REGRESSION: First newline missing from textarea's value
+
+ The regression is that foo, return, bar in a textarea serializes as 'foobar'.
+
+ Before my change in r17223, return (an InsertLineBreak) would insert a '\n'
+ (the line break) then a br to prevent the '\n' from collapsing, since the
+ insertion is being done at the end of a block (the textarea's shadow div). Then,
+ inserting "bar" would displace the br, and "foo\nbar" would serialize as "foo\nbar".
+ After my change in r17223, InsertLineBreak would insert a br then a '\n' (reversed
+ the order). Then inserting "bar" would displace the '\n' and "foo"<br>"bar" would
+ serialize as "foobar" because when serializing RenderTextControl intentionally asks
+ textContent to not convert brs to newlines. It seems to think that the only brs in
+ the shadow div will be placeholders or collapsed.
+
+ We could remove this assumption, but, for consistancy's sake, I changed InsertLineBreak
+ to insert two '\n's when at the end of a block in white-space:pre text. This alone
+ would have fixed the bug, but introduced a new one, because foo, return, bar would
+ produce "foo\nbar\n" which would serialize as "foo\nbar\n" (even though the second
+ '\n' is collapsed, because of 9661). So, then I changed placeholder displacement to
+ displace a '\n' if it's acting as a placeholder. A "placeholder" is now defined as
+ a br or '\n' that will collapse (become superfluous) when content is inserted just
+ before it.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::removePlaceholderAt): Renamed. Remove
+ a br or '\n' if content inserted just before it will cause it to collapse.
+ * editing/CompositeEditCommand.h:
+ * editing/InsertLineBreakCommand.cpp:
+ (WebCore::InsertLineBreakCommand::doApply): Insert the same type of node
+ to prevent a collapse as was used for the line break. Fixed comments.
+ * editing/InsertTextCommand.cpp:
+ (WebCore::InsertTextCommand::input): Call the renamed function.
+
+2006-10-27 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Brady.
+
+ Fixed semantic inaccuracy in String::operator NSString *(), where a NULL
+ String became an empty NSString *, instead of nil. This will become important
+ as we start using this conversion more.
+
+ Added work-around for AppKit crash that semantic accuracy revealed.
+
+ No testcase because I don't think there's a way to reflect this change
+ in a webpage yet.
+
+ * platform/PlatformString.h:
+ (WebCore::String::operator NSString*):
+ * platform/mac/TextFieldMac.mm:
+ (-[NSSearchFieldCell _addStringToRecentSearches:]):
+
+2006-10-27 David Harrison <harrison@apple.com>
+
+ Reviewed by Maciej,
+
+ <rdar://problem/4003820> Expose blockquotes in AXAttributedStringForTextMarkerRange
+
+ * bridge/mac/WebCoreAXObject.mm:
+ (blockquoteLevel):
+ Calculate and return the blockquote level of the element.
+
+ (AXAttributeStringSetBlockquoteLevel):
+ Add, if non-zero, or clear the block quote level attribute.
+
+ (AXAttributedStringAppendText):
+ Send AXAttributeStringSetBlockquoteLevel.
+
+2006-10-27 Darin Adler <darin@apple.com>
+
+ - fix one error in the Qt build
+
+ * platform/qt/GraphicsContextQt.cpp:
+ (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
+ Updated.
+
+2006-10-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ * WebCore.exp: Export more symbols needed by WebKit.
+
+2006-10-26 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by the Baroness Esmeralda Von Scratch N' Purr XIV.
+
+ Fixed layout test crash. Oops.
+
+ * loader/mac/WebDocumentLoader.mm:
+ (WebCore::canonicalizedTitle):
+
+2006-10-26 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Brady
+
+ - fixed <rdar://problem/4806064> Repro crash in FrameMac::loadRequest following iTunes music store link from salon.com
+
+ This restores some of the nil-handling that was implicit before some of the code was converted from
+ Objective-C to C++.
+
+ * bridge/mac/FrameMac.mm:
+ (WebCore::FrameMac::loadRequest):
+ handle nil FrameMac
+
+ * bridge/mac/WebCoreFrameBridge.mm:
+ (-[WebCoreFrameBridge canTargetLoadInFrame:]):
+ handle nil Frame
+
+2006-10-26 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin, Maciej.
+
+ Removed many uses of NSString *.
+ Moved a few methods from WebCoreFrameBridge to FrameLoader, replacing
+ stringByCollapsingNonPrintingCharacters with a c++ equivalent.
+
+ PLT says no performance regression.
+
+ * WebCore.exp:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ (-[WebCoreFrameBridge receivedData:textEncodingName:]):
+ * loader/mac/FrameLoader.h:
+ * loader/mac/FrameLoader.mm:
+ (WebCore::FrameLoader::setupForReplaceByMIMEType):
+ (WebCore::FrameLoader::load):
+ (WebCore::FrameLoader::canShowMIMEType):
+ (WebCore::FrameLoader::representationExistsForURLScheme):
+ (WebCore::FrameLoader::generatedMIMETypeForURLScheme):
+ (WebCore::FrameLoader::checkContentPolicy):
+ (WebCore::FrameLoader::reloadAllowingStaleData):
+ (WebCore::FrameLoader::invalidatePendingPolicyDecision):
+ (WebCore::FrameLoader::checkNewWindowPolicy):
+ (WebCore::FrameLoader::continueAfterNewWindowPolicy):
+ (WebCore::FrameLoader::transitionToCommitted):
+ (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
+ (WebCore::FrameLoader::post):
+ * loader/mac/WebDocumentLoader.h:
+ * loader/mac/WebDocumentLoader.mm:
+ (WebCore::DocumentLoader::doesProgressiveLoad):
+ (WebCore::DocumentLoader::setupForReplaceByMIMEType):
+ (WebCore::DocumentLoader::title):
+ (WebCore::DocumentLoader::setOverrideEncoding):
+ (WebCore::DocumentLoader::overrideEncoding):
+ (WebCore::DocumentLoader::setTitle):
+ * loader/mac/WebFrameLoaderClient.h:
+ * loader/mac/WebMainResourceLoader.mm:
+ (WebCore::MainResourceLoader::continueAfterContentPolicy):
+
+2006-10-26 Timothy Hatcher <timothy@apple.com>
+
+ Reviewed by Adam.
+
+ <rdar://problem/4796941> Table deletion outline is misplaced at nytimes.com
+
+ The main table at nytimes.com has a fixed width of 874px, but the table ends
+ up overflowing to 963px. We now use overflowWidth() and overflowHeight() to correct
+ this. The other bug was a missing top and left of 0px on the container element,
+ causing the deletion UI to sometimes be offset below the table.
+
+ Now check for the element's renderer at the beginning of show() and
+ return early if it is null.
+
+ * editing/DeleteButtonController.cpp:
+ (WebCore::DeleteButtonController::updateOutlineStyle):
+ (WebCore::DeleteButtonController::show):
+
+2006-10-26 Anders Carlsson <acarlsson@apple.com>
+
+ Build fix.
+
+ * html/CanvasRenderingContext2D.cpp:
+ Include MathExtras.h
+
+2006-10-26 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Anders.
+
+ Some changes to support new grammar checking code in WebKit.
+
+ * WebCore.exp:
+ added mangled symbol for Document->removeMarkers() so I can call it from WebKit
+
+ * WebCore.xcodeproj/project.pbxproj:
+ Made Document.h and DocumentMarker.h private so I can include them from WebKit.
+ Made HTMLCollection.h private because Document.h uses it.
+
+ * bridge/mac/WebCoreFrameBridge.h:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ removed unmarkAllMisspellings(); WebKit now calls through to the Document directly
+
+2006-10-26 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Brady.
+
+ Add reverseFind to String and use it instead of findRev.
+ Use CString instead of DeprecatedCString in one place.
+
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::formData):
+ * ksvg2/svg/SVGURIReference.cpp:
+ (WebCore::SVGURIReference::getTarget):
+ * loader/Decoder.cpp:
+ (WebCore::Decoder::checkForCSSCharset):
+ * platform/PlatformString.h:
+ (WebCore::String::reverseFind):
+ * platform/StringImpl.cpp:
+ (WebCore::StringImpl::reverseFind):
+ * platform/StringImpl.h:
+
+2006-10-26 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Darin
+
+ More plumbing for grammar checking. Still no grammars is checked.
+
+ * dom/DocumentMarker.h:
+ (WebCore::DocumentMarker::):
+ added Grammar to enum of marker types; removed explicit enum values; removed unnecessary "enum"
+
+ * platform/GraphicsContext.h:
+ renamed method drawLineForMisspelling to drawLineForMisspellingOrBadGrammar;
+ now takes a bool parameter for whether it represents bad grammar or a misspelling
+
+ * platform/mac/GraphicsContextMac.mm:
+ (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
+ Renamed from drawLineForMisspelling; uses green dot instead of red dot for grammar case. Changed
+ an existing "assert" to "ASSERT".
+
+ * rendering/InlineTextBox.h:
+ renamed function paintSpellingMarker to paintSpellingOrGrammarMarker;
+
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
+ Renamed from paintSpellingMarker; now takes a bool parameter for whether it represents
+ bad grammar or a misspelling
+ (WebCore::InlineTextBox::paintAllMarkersOfType):
+ now handles markers of type Grammar
+
+=== Safari-521.29 ===
+
+2006-10-26 Sam Weinig <sam.weinig@gmail.com>
+
+ Reviewed by Mitz.
+
+ Fix for http://bugs.webkit.org/show_bug.cgi?id=11424
+ Cleanup rendering code
+
+ - Assorted code cleanup.
+
+ * rendering/AutoTableLayout.cpp:
+ * rendering/AutoTableLayout.h:
+ (WebCore::AutoTableLayout::totalPercent):
+ * rendering/CounterListItem.h:
+ * rendering/CounterNode.cpp:
+ * rendering/CounterNode.h:
+ (WebCore::CounterNode::~CounterNode):
+ (WebCore::CounterNode::isReset):
+ * rendering/CounterResetNode.cpp:
+ * rendering/CounterResetNode.h:
+ * rendering/DataRef.h:
+ (WebCore::DataRef::DataRef):
+ * rendering/DeprecatedRenderSelect.h:
+ * rendering/DeprecatedSlider.cpp:
+ * rendering/DeprecatedSlider.h:
+ * rendering/EllipsisBox.cpp:
+ * rendering/EllipsisBox.h:
+ (WebCore::EllipsisBox::EllipsisBox):
+ * rendering/FixedTableLayout.cpp:
+ * rendering/FixedTableLayout.h:
+ * rendering/GapRects.h:
+ * rendering/InlineBox.cpp:
+ * rendering/InlineBox.h:
+ (WebCore::InlineBox::InlineBox):
+ (WebCore::InlineBox::setConstructed):
+ (WebCore::InlineBox::clearTruncation):
+ (WebCore::InlineBox::markDirty):
+ * rendering/InlineFlowBox.cpp:
+ * rendering/InlineFlowBox.h:
+ (WebCore::InlineFlowBox::InlineFlowBox):
+ (WebCore::InlineFlowBox::setConstructed):
+ (WebCore::InlineFlowBox::setEdges):
+ (WebCore::InlineFlowBox::setVerticalOverflowPositions):
+ (WebCore::InlineFlowBox::setVerticalSelectionPositions):
+ * rendering/InlineRunBox.h:
+ (WebCore::InlineRunBox::paintBackgroundAndBorder):
+ (WebCore::InlineRunBox::paintDecorations):
+ * rendering/InlineTextBox.cpp:
+ * rendering/InlineTextBox.h:
+ (WebCore::InlineTextBox::InlineTextBox):
+ (WebCore::InlineTextBox::end):
+ (WebCore::InlineTextBox::textObject):
+ * rendering/Length.h:
+ (WebCore::Length::Length):
+ * rendering/ListMarkerBox.cpp:
+ * rendering/ListMarkerBox.h:
+ * rendering/RenderPartObject.h:
+ * rendering/RootInlineBox.cpp:
+ * rendering/RootInlineBox.h:
+ * rendering/SVGInlineFlowBox.cpp:
+ * rendering/SVGInlineFlowBox.h:
+ (WebCore::SVGInlineFlowBox::SVGInlineFlowBox):
+ * rendering/SVGRootInlineBox.cpp:
+ * rendering/SVGRootInlineBox.h:
+ (WebCore::SVGRootInlineBox::SVGRootInlineBox):
+ * rendering/TableLayout.h:
+ (WebCore::TableLayout::TableLayout):
+ (WebCore::TableLayout::~TableLayout):
+ * rendering/bidi.h:
+ (WebCore::BidiStatus::BidiStatus):
+ (WebCore::BidiRun::BidiRun):
+ * rendering/break_lines.h:
+
+2006-10-26 Justin Garcia <justin.garcia@apple.com>
+
+ Reviewed by john
+
+ <http://bugs.webkit.org/show_bug.cgi?id=11329>
+ Gmail Editor: Can't remove styling applied to selection after clicking "Remove Formatting" toolbar icon.
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::removeFormattingAndStyle): Moved from JSEditor.
+ Wrapped the plain text fragment in a style span with the document
+ default style so that it will appear unstyled regardless of where
+ it is inserted. Could have also inserted the plain text fragment
+ and then applied the document default style to it, but there is not
+ yet any redundant style prevention in ApplyStyleCommand, so this
+ is cleaner.
+ * editing/Editor.h:
+ * editing/JSEditor.cpp:
+
+2006-10-26 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Anders.
+ Fixes <rdar://problem/4800518> -- needed to update existing
+ canvas path elements when transforms are performed on the
+ context.
+
+ * html/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::scale):
+ (WebCore::CanvasRenderingContext2D::rotate):
+ (WebCore::CanvasRenderingContext2D::translate):
+
+2006-10-26 Nikolas Zimmermann <zimmermann@kde.org>
+
+ Reviewed by Darin.
+
+ Fix Qt/Linux build.
+
+ * platform/network/qt/ResourceLoaderManager.cpp:
+ (WebCore::ResourceLoaderManager::slotData):
+ (WebCore::ResourceLoaderManager::slotMimetype):
+ (WebCore::ResourceLoaderManager::remove):
+ (WebCore::ResourceLoaderManager::add):
+ * platform/network/qt/ResourceLoaderQt.cpp:
+ (WebCore::ResourceLoader::receivedResponse):
+ * platform/qt/FrameQtClient.cpp:
+ (WebCore::FrameQtClientDefault::openURL):
+ * platform/qt/LoaderFunctionsQt.cpp:
+ (WebCore::ServeSynchronousRequest):
+
+2006-10-26 Adam Roben <aroben@apple.com>
+
+ Reviewed by Adele.
+
+ Fix: <rdar://problem/3951815> add "type-to-select" feature for list
+ boxes (<select> elements)
+
+ This also adds type-ahead find for closed menulists (popups).
+
+ * WebCore.xcodeproj/project.pbxproj: Version wars.
+ * html/HTMLSelectElement.h: Add new instance variables for type-ahead
+ find.
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::HTMLSelectElement): Initialize new
+ instance variables.
+ (WebCore::HTMLSelectElement::defaultEventHandler): Perform type-ahead
+ find on printable character presses.
+ (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Remove
+ redundant check that the listIndex has changed (setSelectedIndex does
+ this for us), and fix indentation.
+ (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Change an if
+ to an else-if.
+ (WebCore::stripLeadingWhiteSpace): Helper function for typeAheadFind()
+ to strip leading whitespace (including non-breaking spaces) from a
+ string.
+ (WebCore::HTMLSelectElement::typeAheadFind): New method to perform
+ type-ahead find.
+ * platform/PopupMenu.h: Added new updateFromElement() method to be
+ called from RenderMenuList::updateFromElement().
+ * platform/mac/PopupMenuMac.mm:
+ (WebCore::PopupMenu::updateFromElement): While we are using
+ NSPopUpButtonCell for our popups, this method can stay empty.
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::updateFromElement): Scroll to reveal the first
+ selected element.
+ * rendering/RenderMenuList.cpp:
+ (WebCore::RenderMenuList::updateFromElement): Tell the popup to update
+ if it's visible.
+
+2006-10-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=11360
+ editing/pasteboard/copy-paste-bidi intermittently fails due to disappearance of anonymous RenderBlock
+
+ * editing/ReplaceSelectionCommand.cpp:
+ (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
+ Use two vectors instead of a hash map: more efficient, deterministic. There was no
+ reason to use a hash table.
+
+2006-10-26 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Anders.
+
+ - .5% speed improvement by avoiding excess CFURLRef allocation
+
+ * loader/CachedResource.cpp:
+ (WebCore::CachedResource::getCFURL): New method. For Mac only (for now), cache the CFURL
+ here for later reuse.
+ * loader/CachedResource.h:
+ * loader/mac/LoaderFunctionsMac.mm:
+ (WebCore::CheckCacheObjectStatus): Use the cached CFURL, don't make a whole new one.
+
+2006-10-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - removed 55 methods from WebCoreFrameBridge
+ - changed callers to use Frame directly instead
+ - put FrameLoaderTypes.h types into the WebCore namespace
+ - first steps to get FrameLoader.h ready for cross-platform duty
+
+ * WebCore.exp:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bridge/mac/BrowserExtensionMac.mm:
+ (WebCore::BrowserExtensionMac::createNewWindow):
+ * bridge/mac/FrameMac.h:
+ * bridge/mac/FrameMac.mm:
+ (WebCore::FrameMac::loadRequest):
+ (WebCore::FrameMac::startRedirectionTimer):
+ (WebCore::FrameMac::stopRedirectionTimer):
+ (WebCore::FrameMac::passSubframeEventToSubframe):
+ (WebCore::FrameMac::handledOnloadEvents):
+ (WebCore::FrameMac::isLoadTypeReload):
+ * bridge/mac/WebCoreFrameBridge.h:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ (-[WebCoreFrameBridge executionContextForView:]):
+ (updateRenderingForBindings):
+ (-[WebCoreFrameBridge canTargetLoadInFrame:]):
+ (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]):
+ (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
+ (-[WebCoreFrameBridge installInFrame:]):
+ (-[WebCoreFrameBridge numPendingOrLoadingRequests]):
+ (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
+ (-[WebCoreFrameBridge baseWritingDirectionForSelectionStart]):
+ (-[WebCoreFrameBridge dragOperationForDraggingInfo:]):
+ (stringByCollapsingNonPrintingCharacters):
+ (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:]):
+ (-[WebCoreFrameBridge startLoadingResource:withMethod:URL:customHeaders:postData:]):
+ (-[WebCoreFrameBridge syncLoadResourceWithMethod:URL:customHeaders:postData:finalURL:responseHeaders:statusCode:]):
+ * loader/FrameLoaderTypes.h:
+ * loader/mac/FrameLoader.h:
+ * loader/mac/FrameLoader.mm:
+ (WebCore::FrameLoader::FrameLoader):
+ (WebCore::FrameLoader::setupForReplace):
+ (WebCore::FrameLoader::load):
+ (WebCore::FrameLoader::activeDocumentLoader):
+ (WebCore::FrameLoader::state):
+ (WebCore::FrameLoader::setState):
+ (WebCore::FrameLoader::clearProvisionalLoad):
+ (WebCore::FrameLoader::markLoadComplete):
+ (WebCore::FrameLoader::commitProvisionalLoad):
+ (WebCore::FrameLoader::receivedMainResourceError):
+ (WebCore::FrameLoader::handleFallbackContent):
+ (WebCore::FrameLoader::isLoadingMainFrame):
+ (WebCore::FrameLoader::continueAfterNewWindowPolicy):
+ (WebCore::FrameLoader::continueAfterNavigationPolicy):
+ (WebCore::FrameLoader::continueAfterWillSubmitForm):
+ (WebCore::FrameLoader::continueLoadRequestAfterNavigationPolicy):
+ (WebCore::FrameLoader::transitionToCommitted):
+ (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+ (WebCore::FrameLoader::continueLoadRequestAfterNewWindowPolicy):
+ (-[WebCoreFrameLoaderAsDelegate continueAfterNewWindowPolicy:]):
+ (-[WebCoreFrameLoaderAsDelegate continueAfterNavigationPolicy:]):
+ (-[WebCoreFrameLoaderAsDelegate continueAfterWillSubmitForm:]):
+ * loader/mac/ImageDocumentMac.mm:
+ (WebCore::finishImageLoad):
+ * loader/mac/WebDocumentLoader.mm:
+ (WebCore::DocumentLoader::isLoadingInAPISense):
+ * loader/mac/WebMainResourceLoader.h:
+ * loader/mac/WebMainResourceLoader.mm:
+ (WebCore::MainResourceLoader::continueAfterContentPolicy):
+ (-[WebCoreMainResourceLoaderAsPolicyDelegate continueAfterContentPolicy:]):
+ * loader/mac/WebSubresourceLoader.mm:
+ (-[WebCoreSubresourceHandle initWithLoader:]):
+ * platform/mac/ListBoxMac.mm:
+ (-[WebCoreTableView keyDown:]):
+ (-[WebCoreTableView keyUp:]):
+ * platform/mac/WebCoreTextField.mm:
+ (-[WebCoreTextFieldController textView:shouldHandleEvent:]):
+
+2006-10-25 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Darin.
+
+ Printing fixes
+
+ * page/Frame.cpp:
+ (WebCore::Frame::adjustPageHeight):
+ * page/Frame.h:
+ (WebCore::Frame::setupRootForPrinting):
+ (WebCore::Frame::computePageRects):
+
+2006-10-25 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Geoff.
+
+ <rdar://problem/4799088>
+ REGRESSION: Translation widget fails to convert data and reports a "Data unavailable" error.
+
+ * loader/mac/WebSubresourceLoader.h:
+ * loader/mac/WebSubresourceLoader.mm:
+ (-[WebCoreSubresourceHandle initWithLoader:]):
+ Set the HTTP method before the HTTP body.
+
+2006-10-25 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Adam.
+
+ Renamed WebFrameLoader to FrameLoader, to match class name.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bridge/mac/FrameMac.mm:
+ * bridge/mac/WebCoreFrameBridge.mm:
+ * loader/mac/FrameLoader.mm: Added.
+ * loader/mac/IconLoaderMac.mm:
+ * loader/mac/WebDocumentLoader.mm:
+ * loader/mac/WebFrameLoader.h: Removed.
+ * loader/mac/WebFrameLoader.mm: Removed.
+ * loader/mac/WebLoader.mm:
+ * loader/mac/WebMainResourceLoader.mm:
+ * loader/mac/WebNetscapePlugInStreamLoader.mm:
+ * loader/mac/WebSubresourceLoader.mm:
+
+2006-10-25 Darin Adler <darin@apple.com>
+
+ - fix full builds
+
+ * WebCore.xcodeproj/project.pbxproj: Mark bridge/mac/WebCoreResourceLoader.h as private.
+
+2006-10-25 David Smith <catfish.man@gmail.com>
+
+ Reviewed by Mitz.
+
+ Fixed REGRESSION (r17280): Repro crash when clicking a link with target="_blank"
+ http://bugs.webkit.org/show_bug.cgi?id=11411
+
+ * bridge/mac/WebCoreFrameBridge.mm:
+ (-[WebCoreFrameBridge canTargetLoadInFrame:]): Check that the target has a frame before using it.
+
+2006-10-25 Maciej Stachowiak <mjs@apple.com>
+
+ Rubber stamped by Mitz.
+
+ - moved some files that are essentially part of the ResourceLoader implementation to platform/network/mac
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bridge/mac/WebCoreResourceLoader.h: Moved to platform/network/mac.
+ * bridge/mac/WebCoreResourceLoaderImp.h: Moved to platform/network/mac.
+ * bridge/mac/WebCoreResourceLoaderImp.mm: Moved to platform/network/mac.
+
+2006-10-25 Maciej Stachowiak <mjs@apple.com>
+
+ Rubber stamped by Mark.
+
+ - remove no longer existing symbol that was breaking linking
+
+ * WebCore.exp:
+
+2006-10-25 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Mitz.
+
+ - fixed "REGRESSION: Activity window doesn't always list all files until refresh"
+ http://bugs.webkit.org/show_bug.cgi?id=11212
+
+ I couldn't figure out how to write a test case.
+
+ * bindings/js/kjs_window.cpp:
+ (KJS::Window::clear): Avoid crashing if already detached.
+ * bridge/mac/FrameMac.h:
+ * bridge/mac/FrameMac.mm:
+ (WebCore::FrameMac::clear): Change prototype to make this a proper
+ overload for Frame::clear once again(!).
+
2006-10-27 John Sullivan <sullivan@apple.com>
Reviewed by Kevin Decker
__ZN7WebCore11FrameLoader16detachFromParentEv
__ZN7WebCore11FrameLoader17actionInformationENS_13FrameLoadTypeEbP7NSEventP5NSURL
__ZN7WebCore11FrameLoader17actionInformationENS_14NavigationTypeEP7NSEventP5NSURL
+__ZN7WebCore11FrameLoader19requestFromDelegateEP12NSURLRequestRP11objc_objectRP7NSError
__ZN7WebCore11FrameLoader21addPlugInStreamLoaderEPNS_17WebResourceLoaderE
__ZN7WebCore11FrameLoader21commitProvisionalLoadEP12NSDictionary
__ZN7WebCore11FrameLoader22defersCallbacksChangedEv
__ZN7WebCore11FrameLoader23timeOfLastCompletedLoadEv
__ZN7WebCore11FrameLoader24removePlugInStreamLoaderEPNS_17WebResourceLoaderE
__ZN7WebCore11FrameLoader25provisionalDocumentLoaderEv
+__ZN7WebCore11FrameLoader29sendRemainingDelegateMessagesEP11objc_objectP13NSURLResponsejP7NSError
__ZN7WebCore11FrameLoader4loadEP12NSURLRequest
__ZN7WebCore11FrameLoader4loadEP12NSURLRequestP12NSDictionaryNS_13FrameLoadTypeEN3WTF10PassRefPtrINS_9FormStateEEE
__ZN7WebCore11FrameLoader4loadEP12NSURLRequestRKNS_6StringE
6522BCDF09C9DAA800C9BA7A /* ResourceRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 6522BCDE09C9DAA800C9BA7A /* ResourceRequest.h */; settings = {ATTRIBUTES = (Private, ); }; };
654EC611097778F500DAB52C /* WebCoreFrameBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */; settings = {ATTRIBUTES = (Private, ); }; };
654EC612097778F500DAB52C /* WebCoreFrameBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */; };
+ 654F68880AF1B7C50065BDD6 /* CachedResourceMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 654F68870AF1B7C50065BDD6 /* CachedResourceMac.mm */; };
6550B69D099DF0270090D781 /* CDATASection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B693099DF0270090D781 /* CDATASection.cpp */; };
6550B69E099DF0270090D781 /* CDATASection.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B694099DF0270090D781 /* CDATASection.h */; };
6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6550B695099DF0270090D781 /* CharacterData.cpp */; };
6548E24809E1E04D00AF8020 /* Document.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Document.idl; sourceTree = "<group>"; };
654EC60F097778F500DAB52C /* WebCoreFrameBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebCoreFrameBridge.h; sourceTree = "<group>"; };
654EC610097778F500DAB52C /* WebCoreFrameBridge.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFrameBridge.mm; sourceTree = "<group>"; };
+ 654F68870AF1B7C50065BDD6 /* CachedResourceMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = CachedResourceMac.mm; sourceTree = "<group>"; };
6550B693099DF0270090D781 /* CDATASection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CDATASection.cpp; sourceTree = "<group>"; };
6550B694099DF0270090D781 /* CDATASection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CDATASection.h; sourceTree = "<group>"; };
6550B695099DF0270090D781 /* CharacterData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CharacterData.cpp; sourceTree = "<group>"; };
isa = PBXGroup;
children = (
93A1EAA70A563508006960A0 /* ImageDocumentMac.h */,
+ 654F68870AF1B7C50065BDD6 /* CachedResourceMac.mm */,
93A1EA9F0A5634C9006960A0 /* ImageDocumentMac.mm */,
F587850302DE375901EA4122 /* LoaderFunctionsMac.mm */,
51A1D2C50AB69120000D732C /* IconLoaderMac.mm */,
853CA9E80AEEC608002372DC /* SVGRootInlineBox.cpp in Sources */,
853CA9EC0AEEC63C002372DC /* RenderForeignObject.cpp in Sources */,
853CA9F00AEEC657002372DC /* RenderPath.cpp in Sources */,
+ 654F68880AF1B7C50065BDD6 /* CachedResourceMac.mm in Sources */,
655A81BC0AEF67D4000975F0 /* WebCoreResourceLoaderImp.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@interface WebCoreFrameBridge : NSObject
{
+@public
WebCoreFrameMac* m_frame;
BOOL _shouldCreateRenderers;
- (NSURL*)originalRequestURL;
- (void)frameDetached;
- (void)receivedData:(NSData *)data textEncodingName:(NSString *)textEncodingName;
-- (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data;
- (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalNSURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode;
@end
[self addData:data];
}
-- (void)objectLoadedFromCacheWithURL:(NSURL *)URL response:(NSURLResponse *)response data:(NSData *)data
-{
- if (!m_frame)
- return;
-
- // FIXME: If the WebKit client changes or cancels the request, WebCore does not respect this and continues the load.
- NSURLRequest *request = [[NSURLRequest alloc] initWithURL:URL];
- NSError *error;
- id identifier;
- m_frame->loader()->requestFromDelegate(request, identifier, error);
- m_frame->loader()->sendRemainingDelegateMessages(identifier, response, [data length], error);
- [request release];
-}
-
- (NSData *)syncLoadResourceWithMethod:(NSString *)method URL:(NSURL *)URL customHeaders:(NSDictionary *)requestHeaders postData:(NSArray *)postData finalURL:(NSURL **)finalURL responseHeaders:(NSDictionary **)responseHeaderDict statusCode:(int *)statusCode
{
// Since this is a subresource, we can load any URL (we ignore the return value).
}
}
-#if PLATFORM(MAC)
-CFURLRef CachedResource::getCFURL()
-{
- if (!m_cfURL) {
- m_cfURL = KURL(url().deprecatedString()).createCFURL();
- CFRelease(m_cfURL.get());
- }
-
- return m_cfURL.get();
-}
-#endif
-
}
#if PLATFORM(MAC)
#include "RetainPtr.h"
+
+#ifdef __OBJC__
+@class NSURLRequest;
+#else
+class NSURLRequest;
#endif
+#endif // PLATFORM(MAC)
+
namespace WebCore {
class Cache;
void setAccept(const String& accept) { m_accept = accept; }
#if PLATFORM(MAC)
- CFURLRef getCFURL();
+ NSURLRequest* getNSURLRequest();
#endif
protected:
Request* m_request;
#if PLATFORM(MAC)
- RetainPtr<CFURLRef> m_cfURL;
+ RetainPtr<NSURLRequest> m_nsURLRequest;
#endif
PlatformResponse m_response;
--- /dev/null
+/*
+ Copyright (C) 2006 Apple Computer, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ This class provides all functionality needed for loading images, style sheets and html
+ pages from the web. It has a memory cache for these objects.
+*/
+
+#import "config.h"
+#import "CachedResource.h"
+
+#import <Foundation/Foundation.h>
+#import "KURL.h"
+
+namespace WebCore {
+
+NSURLRequest* CachedResource::getNSURLRequest()
+{
+ if (!m_nsURLRequest) {
+ m_nsURLRequest = [[NSURLRequest alloc] initWithURL:KURL(url().deprecatedString()).getNSURL()];
+ [m_nsURLRequest.get() release];
+ }
+
+ return m_nsURLRequest.get();
+}
+
+} // namespace WebCore
void sendRemainingDelegateMessages(id identifier, NSURLResponse *, unsigned length, NSError *);
NSURLRequest *requestFromDelegate(NSURLRequest *, id& identifier, NSError *& error);
void post(NSURL *, const String& referrer, const String& target, NSArray *postData, const String& contentType, NSEvent *, Element* form, NSDictionary *formValues);
+ void loadedResourceFromMemoryCache(NSURLRequest *request, NSURLResponse *response, int length);
void checkLoadComplete();
void detachFromParent();
return newRequest;
}
+void FrameLoader::loadedResourceFromMemoryCache(NSURLRequest *request, NSURLResponse *response, int length)
+{
+ if (m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), request, response, length))
+ return;
+
+ id identifier;
+ NSError *error;
+ requestFromDelegate(request, identifier, error);
+ sendRemainingDelegateMessages(identifier, response, length, error);
+}
+
void FrameLoader::post(NSURL *URL, const String& referrer, const String& target, NSArray *postData,
const String& contentType, NSEvent *event, Element* form, NSDictionary *formValues)
{
#import "FrameMac.h"
#import "FormData.h"
#import "FormDataMac.h"
+#import "FrameLoader.h"
#import "WebCoreResourceLoaderImp.h"
#import "Logging.h"
#import "Request.h"
// Notify the caller that we "loaded".
FrameMac *frame = static_cast<FrameMac *>(loader->frame());
- if (frame && !frame->haveToldBridgeAboutLoad(cachedObject->url())) {
- WebCoreFrameBridge *bridge = frame->bridge();
+ if (!frame || frame->haveToldBridgeAboutLoad(cachedObject->url()))
+ return;
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
- [bridge objectLoadedFromCacheWithURL:(NSURL *)cachedObject->getCFURL()
- response:(NSURLResponse *)cachedObject->response()
- data:(NSData *)cachedObject->allData()];
- END_BLOCK_OBJC_EXCEPTIONS;
-
- frame->didTellBridgeAboutLoad(cachedObject->url());
- }
+ NSURLRequest *request = cachedObject->getNSURLRequest();
+ NSURLResponse *response = cachedObject->response();
+ NSData *data = cachedObject->allData();
+
+ // FIXME: If the WebKit client changes or cancels the request, WebCore does not respect this and continues the load.
+ frame->loader()->loadedResourceFromMemoryCache(request, response, [data length]);
+
+ frame->didTellBridgeAboutLoad(cachedObject->url());
}
bool IsResponseURLEqualToURL(PlatformResponse response, const String& m_url)
virtual void dispatchDidReceiveContentLength(DocumentLoader*, id identifier, int lengthReceived) = 0;
virtual void dispatchDidFinishLoading(DocumentLoader*, id identifier) = 0;
virtual void dispatchDidFailLoading(DocumentLoader*, id identifier, NSError *) = 0;
+ virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, NSURLRequest *, NSURLResponse *, int length) = 0;
virtual void dispatchDidHandleOnloadEvents() = 0;
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
+2006-10-27 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by John & Adam.
+
+ - various performance improvements for resource delegate dispatch.
+
+ - avoid any ObjC messaging when fetching the WebView
+ - avoid ObjC calls to WebView to get resource load delegate and impl cache
+ - cache actual method pointers, not just the fact that the method is present
+ - added a new SPI resource load delegate method which allows clients to get
+ just one message in case of synchronously loading from memory cache; if this
+ is implemented you don't get the normal delegate calls in that case.
+ - various other minor tweaks
+
+ * WebCoreSupport/WebFrameBridge.h:
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (getWebView):
+ (WebFrameLoaderClient::hasBackForwardList):
+ (WebFrameLoaderClient::resetBackForwardList):
+ (WebFrameLoaderClient::privateBrowsingEnabled):
+ (WebFrameLoaderClient::updateHistoryForStandardLoad):
+ (WebFrameLoaderClient::resetAfterLoadError):
+ (WebFrameLoaderClient::download):
+ (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
+ (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
+ (WebFrameLoaderClient::dispatchWillSendRequest):
+ (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidReceiveResponse):
+ (WebFrameLoaderClient::dispatchDidReceiveContentLength):
+ (WebFrameLoaderClient::dispatchDidFinishLoading):
+ (WebFrameLoaderClient::dispatchDidFailLoading):
+ (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
+ (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
+ (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
+ (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
+ (WebFrameLoaderClient::dispatchWillClose):
+ (WebFrameLoaderClient::dispatchDidReceiveIcon):
+ (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidReceiveTitle):
+ (WebFrameLoaderClient::dispatchDidCommitLoad):
+ (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidFailLoad):
+ (WebFrameLoaderClient::dispatchDidFinishLoad):
+ (WebFrameLoaderClient::dispatchDidFirstLayout):
+ (WebFrameLoaderClient::dispatchCreatePage):
+ (WebFrameLoaderClient::dispatchShow):
+ (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
+ (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
+ (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
+ (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
+ (WebFrameLoaderClient::dispatchWillSubmitForm):
+ (WebFrameLoaderClient::dispatchDidLoadMainResource):
+ (WebFrameLoaderClient::progressStarted):
+ (WebFrameLoaderClient::progressCompleted):
+ (WebFrameLoaderClient::incrementProgress):
+ (WebFrameLoaderClient::completeProgress):
+ (WebFrameLoaderClient::setMainFrameDocumentReady):
+ (WebFrameLoaderClient::startDownload):
+ (WebFrameLoaderClient::willChangeTitle):
+ (WebFrameLoaderClient::didChangeTitle):
+ (WebFrameLoaderClient::mainFrameURL):
+ (WebFrameLoaderClient::frameLoadCompleted):
+ * WebCoreSupport/WebPageBridge.h:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebView/WebFrame.mm:
+ (frame):
+ (core):
+ (kit):
+ (getWebView):
+ (-[WebFrame _addBackForwardItemClippedAtTarget:]):
+ (-[WebFrame _canCachePage]):
+ (-[WebFrame _purgePageCache]):
+ (-[WebFrame _loadItem:withLoadType:]):
+ (-[WebFrame _goToItem:withLoadType:]):
+ (-[WebFrame _updateBackground]):
+ (-[WebFrame _clearSelectionInOtherFrames]):
+ (-[WebFrame _isMainFrame]):
+ (-[WebFrame webView]):
+ * WebView/WebResourceLoadDelegatePrivate.h: Added.
+ * WebView/WebView.mm:
+ (-[WebView _cacheResourceLoadDelegateImplementations]):
+ (WebViewGetResourceLoadDelegate):
+ (WebViewGetResourceLoadDelegateImplementations):
+ * WebView/WebViewInternal.h:
+ * WebView/WebViewPrivate.h:
+
+2006-10-27 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Anders
+
+ - fixed http://bugs.webkit.org/show_bug.cgi?id=11439
+ REGRESSION: Another page loading crash
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _createItem:]):
+ Handle nil documentLoader the way we did before ObjC->C++ changes
+
+2006-10-27 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Anders
+
+ * WebView/WebHTMLView.m:
+ (-[NSArray checkSpelling:]):
+ call advanceToNextMisspelling directly on FrameMac, bypassing bridge
+ (-[NSArray showGuessPanel:]):
+ ditto
+
+2006-10-27 Darin Adler <darin@apple.com>
+
+ - build fix
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: Corrected header file name.
+
+2006-10-27 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - moved methods that are there just to be called by the frame loader client into the client
+ in an attempt to get back some of the speed we lost yesterday
+
+ * DefaultDelegates/WebDefaultResourceLoadDelegate.m:
+ (-[WebDefaultResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]):
+ (-[WebDefaultResourceLoadDelegate webView:resource:didCancelAuthenticationChallenge:fromDataSource:]):
+ * WebCoreSupport/WebFrameLoaderClient.h:
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (dataSource):
+ (decisionListener):
+ (WebFrameLoaderClient::WebFrameLoaderClient):
+ (WebFrameLoaderClient::hasWebView):
+ (WebFrameLoaderClient::hasFrameView):
+ (WebFrameLoaderClient::hasBackForwardList):
+ (WebFrameLoaderClient::resetBackForwardList):
+ (WebFrameLoaderClient::provisionalItemIsTarget):
+ (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
+ (WebFrameLoaderClient::invalidateCurrentItemPageCache):
+ (WebFrameLoaderClient::privateBrowsingEnabled):
+ (WebFrameLoaderClient::makeDocumentView):
+ (WebFrameLoaderClient::makeRepresentation):
+ (WebFrameLoaderClient::setDocumentViewFromPageCache):
+ (WebFrameLoaderClient::forceLayout):
+ (WebFrameLoaderClient::forceLayoutForNonHTML):
+ (WebFrameLoaderClient::updateHistoryForCommit):
+ (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
+ (WebFrameLoaderClient::updateHistoryForReload):
+ (WebFrameLoaderClient::updateHistoryForStandardLoad):
+ (WebFrameLoaderClient::updateHistoryForInternalLoad):
+ (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
+ (WebFrameLoaderClient::setCopiesOnScroll):
+ (WebFrameLoaderClient::tokenForLoadErrorReset):
+ (WebFrameLoaderClient::resetAfterLoadError):
+ (WebFrameLoaderClient::doNotResetAfterLoadError):
+ (WebFrameLoaderClient::detachedFromParent1):
+ (WebFrameLoaderClient::detachedFromParent2):
+ (WebFrameLoaderClient::detachedFromParent3):
+ (WebFrameLoaderClient::detachedFromParent4):
+ (WebFrameLoaderClient::loadedFromPageCache):
+ (WebFrameLoaderClient::download):
+ (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
+ (WebFrameLoaderClient::dispatchWillSendRequest):
+ (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidReceiveResponse):
+ (WebFrameLoaderClient::dispatchDidReceiveContentLength):
+ (WebFrameLoaderClient::dispatchDidFinishLoading):
+ (WebFrameLoaderClient::dispatchDidFailLoading):
+ (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
+ (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
+ (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
+ (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
+ (WebFrameLoaderClient::dispatchWillClose):
+ (WebFrameLoaderClient::dispatchDidReceiveIcon):
+ (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidReceiveTitle):
+ (WebFrameLoaderClient::dispatchDidCommitLoad):
+ (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidFailLoad):
+ (WebFrameLoaderClient::dispatchDidFinishLoad):
+ (WebFrameLoaderClient::dispatchDidFirstLayout):
+ (WebFrameLoaderClient::dispatchCreatePage):
+ (WebFrameLoaderClient::dispatchShow):
+ (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
+ (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
+ (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
+ (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
+ (WebFrameLoaderClient::dispatchWillSubmitForm):
+ (WebFrameLoaderClient::dispatchDidLoadMainResource):
+ (WebFrameLoaderClient::clearLoadingFromPageCache):
+ (WebFrameLoaderClient::isLoadingFromPageCache):
+ (WebFrameLoaderClient::revertToProvisionalState):
+ (WebFrameLoaderClient::setMainDocumentError):
+ (WebFrameLoaderClient::clearUnarchivingState):
+ (WebFrameLoaderClient::progressStarted):
+ (WebFrameLoaderClient::progressCompleted):
+ (WebFrameLoaderClient::incrementProgress):
+ (WebFrameLoaderClient::completeProgress):
+ (WebFrameLoaderClient::setMainFrameDocumentReady):
+ (WebFrameLoaderClient::startDownload):
+ (WebFrameLoaderClient::willChangeTitle):
+ (WebFrameLoaderClient::didChangeTitle):
+ (WebFrameLoaderClient::committedLoad):
+ (WebFrameLoaderClient::finishedLoading):
+ (WebFrameLoaderClient::finalSetupForReplace):
+ (WebFrameLoaderClient::cancelledError):
+ (WebFrameLoaderClient::cannotShowURLError):
+ (WebFrameLoaderClient::interruptForPolicyChangeError):
+ (WebFrameLoaderClient::cannotShowMIMETypeError):
+ (WebFrameLoaderClient::fileDoesNotExistError):
+ (WebFrameLoaderClient::shouldFallBack):
+ (WebFrameLoaderClient::mainFrameURL):
+ (WebFrameLoaderClient::setDefersCallbacks):
+ (WebFrameLoaderClient::willUseArchive):
+ (WebFrameLoaderClient::isArchiveLoadPending):
+ (WebFrameLoaderClient::cancelPendingArchiveLoad):
+ (WebFrameLoaderClient::clearArchivedResources):
+ (WebFrameLoaderClient::canHandleRequest):
+ (WebFrameLoaderClient::canShowMIMEType):
+ (WebFrameLoaderClient::representationExistsForURLScheme):
+ (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
+ (WebFrameLoaderClient::elementForEvent):
+ (WebFrameLoaderClient::createPolicyDecider):
+ (WebFrameLoaderClient::frameLoadCompleted):
+ (WebFrameLoaderClient::restoreScrollPositionAndViewState):
+ (WebFrameLoaderClient::provisionalLoadStarted):
+ (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
+ (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
+ (WebFrameLoaderClient::didFinishLoad):
+ (WebFrameLoaderClient::prepareForDataSourceReplacement):
+ (WebFrameLoaderClient::createDocumentLoader):
+ (WebFrameLoaderClient::setTitle):
+ (WebFrameLoaderClient::canUseArchivedResource):
+ (WebFrameLoaderClient::deliverArchivedResourcesAfterDelay):
+ (WebFrameLoaderClient::deliverArchivedResources):
+ (WebFrameLoaderClient::createPageCache):
+ * WebView/WebFrame.mm:
+ (-[NSView setWebFrame:]):
+ (-[WebFrame _createItem:]):
+ (-[WebFrame _loadItem:withLoadType:]):
+ (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
+ (-[WebFrame _loadURL:referrer:intoChild:]):
+ (-[WebFrame _saveScrollPositionAndViewStateToItem:]):
+ (-[WebFrame _hasSelection]):
+ (-[WebFrame _clearSelection]):
+ (-[WebFrame _setProvisionalItem:]):
+ (-[WebFrame _setPreviousItem:]):
+ (-[WebFrame _setCurrentItem:]):
+ (-[WebFrame loadArchive:]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLView.m:
+ (-[WebHTMLView _topHTMLView]):
+ * WebView/WebHTMLViewPrivate.h:
+
+2006-10-26 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Darin, Maciej.
+
+ Removed many uses of NSString * from WebCore.
+
+ Changed a few files to ObjC++ for compatiblity with new WebCore methods
+ taking WebCore::Strings as arguments.
+
+ Added a static_cast to make the c++ compiler happy.
+
+2006-10-26 John Sullivan <sullivan@apple.com>
+
+ Reviewed by Anders
+
+ * WebView/WebFrame.mm:
+ now includes <WebCore/Document.h> and <WebCore/DocumentMarker.h>
+ (-[WebFrame _unmarkAllBadGrammar]):
+ filled in guts
+ (-[WebFrame _unmarkAllMisspellings]):
+ rewrote to call Document directly, bypassing bridge
+
+2006-10-26 John Sullivan <sullivan@apple.com>
+
+ * English.lproj/WebViewEditingContextMenu.nib/info.nib:
+ * English.lproj/WebViewEditingContextMenu.nib/objects.nib:
+
+ Changed "Spelling" to "Spelling and Grammar" in context menu for post-Tiger.
+
+=== Safari-521.29 ===
+
+2006-10-26 John Sullivan <sullivan@apple.com>
+
+ No review, just two localized string changes.
+
+ * WebView/WebHTMLView.m:
+ (-[NSArray validateUserInterfaceItem:]):
+ changed "Show/Hide Spelling" to "Show/Hide Spelling and Grammar" post-Tiger to match framework change
+
+ * English.lproj/Localizable.strings:
+ updated for these changes
+
+2006-10-25 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - removed 55 methods from WebCoreFrameBridge
+ - changed callers to use Frame directly instead
+ - put FrameLoaderTypes.h types into the WebCore namespace
+ - first steps to get FrameLoader.h ready for cross-platform duty
+
+ * DefaultDelegates/WebDefaultContextMenuDelegate.m:
+ (-[WebDefaultUIDelegate openNewWindowWithURL:element:]):
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView requestWithURLCString:]):
+ (-[WebBaseNetscapePluginView loadPluginRequest:]):
+ (-[WebBaseNetscapePluginView getVariable:value:]):
+ * Plugins/WebNetscapePluginEmbeddedView.m:
+ (-[WebNetscapePluginEmbeddedView didStart]):
+ * Plugins/WebNetscapePluginStream.mm:
+ * Plugins/WebPluginContainerCheck.m:
+ (-[WebPluginContainerCheck _continueWithPolicy:]):
+ (-[WebPluginContainerCheck _isForbiddenFileLoad]):
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::shouldDeleteRange):
+ (WebEditorClient::shouldShowDeleteInterface):
+ * WebCoreSupport/WebFrameBridge.mm:
+ (-[WebFrameBridge webView]):
+ (-[WebFrameBridge finishInitializingWithFrameName:view:]):
+ (-[WebFrameBridge createWindowWithURL:]):
+ (-[WebFrameBridge viewForPluginWithURL:attributeNames:attributeValues:MIMEType:DOMElement:loadManually:]):
+ (-[WebFrameBridge windowObjectCleared]):
+ (-[WebFrameBridge createModalDialogWithURL:]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::dispatchCreatePage):
+ (WebFrameLoaderClient::dispatchWillSubmitForm):
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebView/WebArchiver.m:
+ (+[WebArchiver archiveSelectionInFrame:]):
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource _documentFragmentWithImageResource:]):
+ (-[WebDataSource _imageElementWithImageResource:]):
+ * WebView/WebEditingDelegatePrivate.h:
+ * WebView/WebFrame.mm:
+ (core):
+ (kit):
+ (-[WebFrame _createItemTreeWithTargetFrame:clippedAtTarget:]):
+ (-[WebFrame _canCachePage]):
+ (-[WebFrame _childFramesMatchItem:]):
+ (-[WebFrame _URLsMatchItem:]):
+ (-[WebFrame _loadItem:withLoadType:]):
+ (-[WebFrame _recursiveGoToItem:fromItem:withLoadType:]):
+ (-[WebFrame _viewWillMoveToHostWindow:]):
+ (-[WebFrame _viewDidMoveToHostWindow]):
+ (-[WebFrame _addChild:]):
+ (-[WebFrame _saveDocumentAndScrollState]):
+ (-[WebFrame _numPendingOrLoadingRequests:]):
+ (-[WebFrame _reloadForPluginChanges]):
+ (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
+ (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
+ (-[WebFrame _initWithWebFrameView:webView:coreFrame:]):
+ (-[WebFrame _documentViews]):
+ (-[WebFrame _updateBackground]):
+ (-[WebFrame _unmarkAllMisspellings]):
+ (-[WebFrame _hasSelection]):
+ (-[WebFrame _atMostOneFrameHasSelection]):
+ (-[WebFrame _findFrameWithSelection]):
+ (-[WebFrame _frameLoader]):
+ (-[WebFrame _isDescendantOfFrame:]):
+ (-[WebFrame _setShouldCreateRenderers:]):
+ (-[WebFrame _bodyBackgroundColor]):
+ (-[WebFrame init]):
+ (-[WebFrame initWithName:webFrameView:webView:]):
+ (-[WebFrame dealloc]):
+ (-[WebFrame finalize]):
+ (-[WebFrame name]):
+ (-[WebFrame webView]):
+ (-[WebFrame DOMDocument]):
+ (-[WebFrame frameElement]):
+ (-[WebFrame findFrameNamed:]):
+ (-[WebFrame parentFrame]):
+ (-[WebFrame childFrames]):
+ (-[WebFrame _invalidateCurrentItemPageCache]):
+ (-[WebFrame _dispatchCreateWebViewWithRequest:]):
+ (-[WebFrame _dispatchSourceFrame:willSubmitForm:withValues:submissionDecider:]):
+ (-[WebFrame _prepareForDataSourceReplacement]):
+ (-[WebFrame _provisionalLoadStarted]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLRepresentation.m:
+ (-[WebHTMLRepresentation DOMDocument]):
+ (-[WebHTMLRepresentation attributedText]):
+ * WebView/WebHTMLView.m:
+ (-[WebHTMLView _documentRange]):
+ (-[WebHTMLView _documentFragmentWithPaths:]):
+ (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
+ (-[WebHTMLView _selectedRange]):
+ (-[WebHTMLView _updateMouseoverWithEvent:]):
+ (-[WebHTMLView _canEditRichly]):
+ (-[WebHTMLView _hasSelection]):
+ (-[WebHTMLView _hasSelectionOrInsertionPoint]):
+ (-[WebHTMLView _hasInsertionPoint]):
+ (-[WebHTMLView _isEditable]):
+ (-[WebHTMLView _isSelectionInPasswordField]):
+ (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+ (-[WebHTMLView _selectionDraggingImage]):
+ (-[WebHTMLView _canIncreaseSelectionListLevel]):
+ (-[WebHTMLView _canDecreaseSelectionListLevel]):
+ (-[WebHTMLView _updateActiveState]):
+ (-[NSArray readSelectionFromPasteboard:]):
+ (-[NSArray validateUserInterfaceItem:]):
+ (-[NSArray maintainsInactiveSelection]):
+ (-[NSArray menuForEvent:]):
+ (-[NSArray scrollWheel:]):
+ (-[NSArray acceptsFirstMouse:]):
+ (-[NSArray shouldDelayWindowOrderingForEvent:]):
+ (-[NSArray mouseDown:]):
+ (-[NSArray mouseDragged:]):
+ (-[NSArray mouseUp:]):
+ (-[NSArray keyDown:]):
+ (-[NSArray keyUp:]):
+ (-[NSArray centerSelectionInVisibleArea:]):
+ (-[NSArray _selectionStartFontAttributesAsRTF]):
+ (-[NSArray _emptyStyle]):
+ (-[NSArray performKeyEquivalent:]):
+ (-[NSArray indent:]):
+ (-[NSArray outdent:]):
+ (-[WebHTMLView cut:]):
+ (-[WebHTMLView paste:]):
+ (-[WebHTMLView _selectRangeInMarkedText:]):
+ (-[WebTextCompleteController doCompletion]):
+ (-[WebHTMLView selectionRect]):
+ (-[WebHTMLView selectionImageForcingWhiteText:]):
+ (-[WebHTMLView selectionImageRect]):
+ (-[WebHTMLView attributedString]):
+ (-[WebHTMLView _isMoveDrag]):
+ (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]):
+ * WebView/WebPolicyDelegate.mm:
+ (-[WebPolicyDecisionListener _usePolicy:]):
+ (-[WebPolicyDecisionListener use]):
+ (-[WebPolicyDecisionListener ignore]):
+ (-[WebPolicyDecisionListener download]):
+ (-[WebPolicyDecisionListener continue]):
+ * WebView/WebScriptDebugDelegate.m:
+ (-[WebScriptCallFrame _initWithFrame:initWithWebFrame:]):
+ (-[WebScriptCallFrame globalObject]):
+ * WebView/WebView.mm:
+ (-[WebView _attachScriptDebuggerToAllFrames]):
+ (-[WebView _detachScriptDebuggerFromAllFrames]):
+ (-[WebView windowScriptObject]):
+ (incrementFrame):
+ (-[WebView searchFor:direction:caseSensitive:wrap:]):
+ (-[WebView writeSelectionWithPasteboardTypes:toPasteboard:]):
+ (-[WebView removeDragCaret]):
+ (-[WebView setScriptDebugDelegate:]):
+ (-[WebView scriptDebugDelegate]):
+ (-[WebView shouldClose]):
+ (-[WebView selectedDOMRange]):
+ (-[WebView styleDeclarationWithText:]):
+
+2006-10-25 Geoffrey Garen <ggaren@apple.com>
+
+ Reviewed by Adam.
+
+ Renamed WebFrameLoader to FrameLoader, to match class name.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginStream.mm:
+ * Plugins/WebPluginController.mm:
+ * WebCoreSupport/WebFrameBridge.mm:
+ * WebView/WebDataSource.mm:
+ * WebView/WebFrame.mm:
+ * WebView/WebPDFView.mm:
+ * WebView/WebPolicyDelegate.mm:
+ * WebView/WebView.mm:
+
+2006-10-25 Mark Rowe <bdash@webkit.org>
+
+ Reviewed by Anders.
+
+ Build fix for the Buildbot.
+
+ * WebView/WebHTMLView.m:
+ (-[NSArray _addToStyle:fontA:fontB:]): Explicit cast.
+
+2006-10-25 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Anders.
+
+ <rdar://problem/4785575> REGRESSION: form resubmission warning occurs twice, then Safari crashes in autorelease pool
+ <rdar://problem/4799383> REGRESSION: Crash occurs when dismissing the "Would you like to save this password" sheet
+
+ * WebView/WebPolicyDeciderMac.m:
+ (-[WebPolicyDeciderMac dealloc]): release the listener, don't dealloc it
+
+2006-10-24 Anders Carlsson <acarlsson@apple.com>
+
+ Reviewed by Darin.
+
+ * WebKitPrefix.h:
+ Include FastMalloc.h from C++ code.
+
+2006-10-24 Darin Adler <darin@apple.com>
+
+ Reviewed by Anders.
+
+ - converted WebFrameLoaderClient to C++
+ - renamed frame->frameLoader() function to frame->loader()
+ - renamed [bridge impl] to [bridge _frame]
+ - removed some bridge methods
+
+ * Plugins/WebNetscapePluginStream.mm:
+ * WebCoreSupport/WebEditorClient.mm:
+ * WebCoreSupport/WebFrameLoaderClient.h: Added.
+ (WebFrameLoaderClient::webFrame):
+ * WebCoreSupport/WebFrameLoaderClient.mm: Added.
+ (WebFrameLoaderClient::detachFrameLoader):
+ (WebFrameLoaderClient::hasWebView):
+ (WebFrameLoaderClient::hasFrameView):
+ (WebFrameLoaderClient::hasBackForwardList):
+ (WebFrameLoaderClient::resetBackForwardList):
+ (WebFrameLoaderClient::provisionalItemIsTarget):
+ (WebFrameLoaderClient::loadProvisionalItemFromPageCache):
+ (WebFrameLoaderClient::invalidateCurrentItemPageCache):
+ (WebFrameLoaderClient::privateBrowsingEnabled):
+ (WebFrameLoaderClient::makeDocumentView):
+ (WebFrameLoaderClient::makeRepresentation):
+ (WebFrameLoaderClient::setDocumentViewFromPageCache):
+ (WebFrameLoaderClient::forceLayout):
+ (WebFrameLoaderClient::forceLayoutForNonHTML):
+ (WebFrameLoaderClient::updateHistoryForCommit):
+ (WebFrameLoaderClient::updateHistoryForBackForwardNavigation):
+ (WebFrameLoaderClient::updateHistoryForReload):
+ (WebFrameLoaderClient::updateHistoryForStandardLoad):
+ (WebFrameLoaderClient::updateHistoryForInternalLoad):
+ (WebFrameLoaderClient::updateHistoryAfterClientRedirect):
+ (WebFrameLoaderClient::setCopiesOnScroll):
+ (WebFrameLoaderClient::tokenForLoadErrorReset):
+ (WebFrameLoaderClient::resetAfterLoadError):
+ (WebFrameLoaderClient::doNotResetAfterLoadError):
+ (WebFrameLoaderClient::detachedFromParent1):
+ (WebFrameLoaderClient::detachedFromParent2):
+ (WebFrameLoaderClient::detachedFromParent3):
+ (WebFrameLoaderClient::detachedFromParent4):
+ (WebFrameLoaderClient::loadedFromPageCache):
+ (WebFrameLoaderClient::download):
+ (WebFrameLoaderClient::dispatchIdentifierForInitialRequest):
+ (WebFrameLoaderClient::dispatchWillSendRequest):
+ (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
+ (WebFrameLoaderClient::dispatchDidReceiveResponse):
+ (WebFrameLoaderClient::dispatchDidReceiveContentLength):
+ (WebFrameLoaderClient::dispatchDidFinishLoading):
+ (WebFrameLoaderClient::dispatchDidFailLoading):
+ (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
+ (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
+ (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
+ (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
+ (WebFrameLoaderClient::dispatchWillClose):
+ (WebFrameLoaderClient::dispatchDidReceiveIcon):
+ (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidReceiveTitle):
+ (WebFrameLoaderClient::dispatchDidCommitLoad):
+ (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
+ (WebFrameLoaderClient::dispatchDidFailLoad):
+ (WebFrameLoaderClient::dispatchDidFinishLoad):
+ (WebFrameLoaderClient::dispatchDidFirstLayout):
+ (WebFrameLoaderClient::dispatchCreatePage):
+ (WebFrameLoaderClient::dispatchShow):
+ (WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
+ (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
+ (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
+ (WebFrameLoaderClient::dispatchUnableToImplementPolicy):
+ (WebFrameLoaderClient::dispatchWillSubmitForm):
+ (WebFrameLoaderClient::dispatchDidLoadMainResource):
+ (WebFrameLoaderClient::clearLoadingFromPageCache):
+ (WebFrameLoaderClient::isLoadingFromPageCache):
+ (WebFrameLoaderClient::revertToProvisionalState):
+ (WebFrameLoaderClient::setMainDocumentError):
+ (WebFrameLoaderClient::clearUnarchivingState):
+ (WebFrameLoaderClient::progressStarted):
+ (WebFrameLoaderClient::progressCompleted):
+ (WebFrameLoaderClient::incrementProgress):
+ (WebFrameLoaderClient::completeProgress):
+ (WebFrameLoaderClient::setMainFrameDocumentReady):
+ (WebFrameLoaderClient::startDownload):
+ (WebFrameLoaderClient::willChangeTitle):
+ (WebFrameLoaderClient::didChangeTitle):
+ (WebFrameLoaderClient::committedLoad):
+ (WebFrameLoaderClient::finishedLoading):
+ (WebFrameLoaderClient::finalSetupForReplace):
+ (WebFrameLoaderClient::cancelledError):
+ (WebFrameLoaderClient::cannotShowURLError):
+ (WebFrameLoaderClient::interruptForPolicyChangeError):
+ (WebFrameLoaderClient::cannotShowMIMETypeError):
+ (WebFrameLoaderClient::fileDoesNotExistError):
+ (WebFrameLoaderClient::shouldFallBack):
+ (WebFrameLoaderClient::mainFrameURL):
+ (WebFrameLoaderClient::setDefersCallbacks):
+ (WebFrameLoaderClient::willUseArchive):
+ (WebFrameLoaderClient::isArchiveLoadPending):
+ (WebFrameLoaderClient::cancelPendingArchiveLoad):
+ (WebFrameLoaderClient::clearArchivedResources):
+ (WebFrameLoaderClient::canHandleRequest):
+ (WebFrameLoaderClient::canShowMIMEType):
+ (WebFrameLoaderClient::representationExistsForURLScheme):
+ (WebFrameLoaderClient::generatedMIMETypeForURLScheme):
+ (WebFrameLoaderClient::elementForEvent):
+ (WebFrameLoaderClient::createPolicyDecider):
+ (WebFrameLoaderClient::frameLoadCompleted):
+ (WebFrameLoaderClient::restoreScrollPositionAndViewState):
+ (WebFrameLoaderClient::provisionalLoadStarted):
+ (WebFrameLoaderClient::shouldTreatURLAsSameAsCurrent):
+ (WebFrameLoaderClient::addHistoryItemForFragmentScroll):
+ (WebFrameLoaderClient::didFinishLoad):
+ (WebFrameLoaderClient::prepareForDataSourceReplacement):
+ (WebFrameLoaderClient::createDocumentLoader):
+ (WebFrameLoaderClient::setTitle):
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebView/WebDataSource.mm:
+ (-[WebDataSource webFrame]):
+ * WebView/WebFrame.mm:
+ (frame):
+ (-[WebFrame _loadItem:withLoadType:]):
+ (-[WebFrame _reloadForPluginChanges]):
+ (-[WebFrame _initWithWebFrameView:webView:bridge:]):
+ (-[WebFrame _frameLoader]):
+ (-[WebFrame provisionalDataSource]):
+ (-[WebFrame dataSource]):
+ (-[WebFrame parentFrame]):
+ (-[WebFrame _provisionalLoadStarted]):
+ * WebView/WebFrameInternal.h:
+ * WebView/WebHTMLRepresentation.m:
+ (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
+ * WebView/WebHTMLView.m:
+ (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
+ (-[NSArray validateUserInterfaceItem:]):
+ (-[NSArray scrollWheel:]):
+ (-[NSArray acceptsFirstMouse:]):
+ (-[NSArray shouldDelayWindowOrderingForEvent:]):
+ (-[NSArray _selectionStartFontAttributesAsRTF]):
+ (-[NSArray changeBaseWritingDirection:]):
+ (-[NSArray indent:]):
+ (-[NSArray outdent:]):
+ (-[WebHTMLView copy:]):
+ (-[WebHTMLView cut:]):
+ (-[WebHTMLView paste:]):
+ * WebView/WebView.mm:
+ (-[WebView _dashboardRegions]):
+ (-[WebView setProhibitsMainFrameScrolling:]):
+ (-[WebView _setInViewSourceMode:]):
+ (-[WebView _inViewSourceMode]):
+ (-[WebView setEditable:]):
+
2006-10-27 Geoffrey Garen <ggaren@apple.com>
Reviewed by Maciej.
@interface WebFrameBridge : WebCoreFrameBridge <WebCoreFrameBridge>
{
+@public
WebFrame *_frame;
WebCoreKeyboardUIMode _keyboardUIMode;
virtual void revertToProvisionalState(WebCore::DocumentLoader*);
virtual void setMainDocumentError(WebCore::DocumentLoader*, NSError *);
virtual void clearUnarchivingState(WebCore::DocumentLoader*);
+ virtual bool dispatchDidLoadResourceFromMemoryCache(WebCore::DocumentLoader*, NSURLRequest *, NSURLResponse *, int length);
virtual void progressStarted();
virtual void progressCompleted();
#import "WebKitErrorsPrivate.h"
#import "WebKitNSStringExtras.h"
#import "WebNSURLExtras.h"
+#import "WebPageBridge.h"
#import "WebPanelAuthenticationHandler.h"
#import "WebPolicyDeciderMac.h"
#import "WebPolicyDelegatePrivate.h"
#import "WebPreferences.h"
-#import "WebResourcePrivate.h"
#import "WebResourceLoadDelegate.h"
+#import "WebResourcePrivate.h"
#import "WebScriptDebugServerPrivate.h"
#import "WebUIDelegate.h"
#import "WebViewInternal.h"
#import <WebCore/FrameLoader.h>
+#import <WebCore/FrameLoaderTypes.h>
#import <WebCore/FrameMac.h>
#import <WebCore/FrameTree.h>
+#import <WebCore/Page.h>
#import <WebCore/PlatformString.h>
#import <WebCore/WebCoreFrameBridge.h>
#import <WebCore/WebDataProtocol.h>
#import <WebCore/WebDocumentLoader.h>
#import <WebCore/WebLoader.h>
+#import <WebKit/DOMElement.h>
+#import <WebKit/WebDefaultResourceLoadDelegate.h>
+#import <WebKit/WebDocumentLoaderMac.h>
+#import <WebKit/WebResourceLoadDelegate.h>
+#import <WebKit/WebViewInternal.h>
#import <WebKitSystemInterface.h>
#import <wtf/PassRefPtr.h>
using namespace WebCore;
+static inline WebView* getWebView(DocumentLoader* loader)
+{
+ return ((WebPageBridge *)loader->frameLoader()->frame()->page()->bridge())->_webView;
+}
+
+static inline WebView *getWebView(WebFrame *webFrame)
+{
+ Frame* coreFrame = core(webFrame);
+ return coreFrame ? ((WebPageBridge *)coreFrame->page()->bridge())->_webView : nil;
+}
+
static inline WebDataSource *dataSource(DocumentLoader* loader)
{
return loader ? static_cast<WebDocumentLoaderMac*>(loader)->dataSource() : nil;
bool WebFrameLoaderClient::hasBackForwardList() const
{
- return [[m_webFrame.get() webView] backForwardList] != nil;
+ return [getWebView(m_webFrame.get()) backForwardList] != nil;
}
void WebFrameLoaderClient::resetBackForwardList()
{
// Note this doesn't verify the current load type as a b/f operation because it is called from
// a subframe in the case of a delegate bailing out of the nav before it even gets to provisional state.
- WebFrame *mainFrame = [[m_webFrame.get() webView] mainFrame];
+ WebFrame *mainFrame = [getWebView(m_webFrame.get()) mainFrame];
WebHistoryItem *resetItem = mainFrame->_private->currentItem;
if (resetItem)
- [[[m_webFrame.get() webView] backForwardList] goToItem:resetItem];
+ [[getWebView(m_webFrame.get()) backForwardList] goToItem:resetItem];
}
bool WebFrameLoaderClient::provisionalItemIsTarget() const
bool WebFrameLoaderClient::privateBrowsingEnabled() const
{
- return [[[m_webFrame.get() webView] preferences] privateBrowsingEnabled];
+ return [[getWebView(m_webFrame.get()) preferences] privateBrowsingEnabled];
}
void WebFrameLoaderClient::makeDocumentView()
if (![dataSource _documentLoader]->isClientRedirect()) {
NSURL *URL = [dataSource _URLForHistory];
if (URL && ![URL _web_isEmpty]) {
- ASSERT([m_webFrame.get() webView]);
- if (![[[m_webFrame.get() webView] preferences] privateBrowsingEnabled]) {
+ ASSERT(getWebView(m_webFrame.get()));
+ if (![[getWebView(m_webFrame.get()) preferences] privateBrowsingEnabled]) {
WebHistoryItem *entry = [[WebHistory optionalSharedHistory] addItemForURL:URL];
if ([dataSource pageTitle])
[entry setTitle:[dataSource pageTitle]];
WebHistoryItem *item = (WebHistoryItem *)token;
if (!item)
return;
- [[[m_webFrame.get() webView] backForwardList] goToItem:item];
+ [[getWebView(m_webFrame.get()) backForwardList] goToItem:item];
[item release];
}
[WebDownload _downloadWithLoadingConnection:connection
request:request
response:response
- delegate:[[m_webFrame.get() webView] downloadDelegate]
+ delegate:[getWebView(m_webFrame.get()) downloadDelegate]
proxy:proxy];
}
+bool WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache(DocumentLoader* loader, NSURLRequest *request, NSURLResponse *response, int length)
+{
+ WebView *webView = getWebView(loader);
+ id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView);
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
+
+ if (!implementations.delegateImplementsDidLoadResourceFromMemoryCache)
+ return false;
+
+ implementations.didLoadResourceFromMemoryCacheFunc(resourceLoadDelegate, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:), webView, request, response, length, dataSource(loader));
+ return true;
+}
+
id WebFrameLoaderClient::dispatchIdentifierForInitialRequest(DocumentLoader* loader, NSURLRequest *request)
{
- WebView *webView = [m_webFrame.get() webView];
- id resourceLoadDelegate = [webView resourceLoadDelegate];
-
- if ([webView _resourceLoadDelegateImplementations].delegateImplementsIdentifierForRequest)
- return [resourceLoadDelegate webView:webView identifierForInitialRequest:request fromDataSource:dataSource(loader)];
+ WebView *webView = getWebView(loader);
+ id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView);
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
+
+ if (implementations.delegateImplementsIdentifierForRequest)
+ return implementations.identifierForRequestFunc(resourceLoadDelegate, @selector(webView:identifierForInitialRequest:fromDataSource:), webView, request, dataSource(loader));
+
return [[[NSObject alloc] init] autorelease];
}
NSURLRequest *WebFrameLoaderClient::dispatchWillSendRequest(DocumentLoader* loader, id identifier,
NSURLRequest *request, NSURLResponse *redirectResponse)
{
- WebView *webView = [m_webFrame.get() webView];
- id resourceLoadDelegate = [webView resourceLoadDelegate];
+ WebView *webView = getWebView(loader);
+ id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView);
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- if ([webView _resourceLoadDelegateImplementations].delegateImplementsWillSendRequest)
- return [resourceLoadDelegate webView:webView resource:identifier willSendRequest:request redirectResponse:redirectResponse fromDataSource:dataSource(loader)];
+ if (implementations.delegateImplementsWillSendRequest)
+ return implementations.willSendRequestFunc(resourceLoadDelegate, @selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:), webView, identifier, request, redirectResponse, dataSource(loader));
return request;
}
void WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge(DocumentLoader* loader, id identifier,
NSURLAuthenticationChallenge *challenge)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
id resourceLoadDelegate = [webView resourceLoadDelegate];
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidReceiveAuthenticationChallenge) {
+ if (implementations.delegateImplementsDidReceiveAuthenticationChallenge) {
[resourceLoadDelegate webView:webView resource:identifier didReceiveAuthenticationChallenge:challenge fromDataSource:dataSource(loader)];
return;
}
void WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge(DocumentLoader* loader, id identifier,
NSURLAuthenticationChallenge *challenge)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
id resourceLoadDelegate = [webView resourceLoadDelegate];
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidCancelAuthenticationChallenge) {
+ if (implementations.delegateImplementsDidCancelAuthenticationChallenge) {
[resourceLoadDelegate webView:webView resource:identifier didCancelAuthenticationChallenge:challenge fromDataSource:dataSource(loader)];
return;
}
void WebFrameLoaderClient::dispatchDidReceiveResponse(DocumentLoader* loader, id identifier, NSURLResponse *response)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(loader);
+ id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView);
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidReceiveResponse)
- [[webView resourceLoadDelegate] webView:webView resource:identifier didReceiveResponse:response fromDataSource:dataSource(loader)];
+ if (implementations.delegateImplementsDidReceiveResponse)
+ implementations.didReceiveResponseFunc(resourceLoadDelegate, @selector(webView:resource:didReceiveResponse:fromDataSource:), webView, identifier, response, dataSource(loader));
}
void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader* loader, id identifier, int lengthReceived)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(loader);
+ id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView);
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidReceiveContentLength)
- [[webView resourceLoadDelegate] webView:webView resource:identifier didReceiveContentLength:(WebNSUInteger)lengthReceived fromDataSource:dataSource(loader)];
+ if (implementations.delegateImplementsDidReceiveContentLength)
+ implementations.didReceiveContentLengthFunc(resourceLoadDelegate, @selector(webView:resource:didReceiveContentLength:fromDataSource:), webView, identifier, (WebNSUInteger)lengthReceived, dataSource(loader));
}
void WebFrameLoaderClient::dispatchDidFinishLoading(DocumentLoader* loader, id identifier)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(loader);
+ id resourceLoadDelegate = WebViewGetResourceLoadDelegate(webView);
+ WebResourceDelegateImplementationCache implementations = WebViewGetResourceLoadDelegateImplementations(webView);
- if ([webView _resourceLoadDelegateImplementations].delegateImplementsDidFinishLoadingFromDataSource)
- [[webView resourceLoadDelegate] webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource(loader)];
+ if (implementations.delegateImplementsDidFinishLoadingFromDataSource)
+ implementations.didFinishLoadingFromDataSourceFunc(resourceLoadDelegate, @selector(webView:resource:didFinishLoadingFromDataSource:), webView, identifier, dataSource(loader));
}
void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader, id identifier, NSError *error)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _resourceLoadDelegateForwarder] webView:webView resource:identifier didFailLoadingWithError:error fromDataSource:dataSource(loader)];
}
void WebFrameLoaderClient::dispatchDidHandleOnloadEvents()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView didHandleOnloadEventsForFrame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView
didReceiveServerRedirectForProvisionalLoadForFrame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchDidCancelClientRedirect()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView didCancelClientRedirectForFrame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchWillPerformClientRedirect(NSURL *URL, NSTimeInterval delay, NSDate *fireDate)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView
willPerformClientRedirectToURL:URL
delay:delay
void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView didChangeLocationWithinPageForFrame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchWillClose()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView willCloseFrame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchDidReceiveIcon(NSImage *icon)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
ASSERT([m_webFrame.get() _isMainFrame]);
[webView _willChangeValueForKey:_WebMainFrameIconKey];
[[webView _frameLoadDelegateForwarder] webView:webView didReceiveIcon:icon forFrame:m_webFrame.get()];
void WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[webView _didStartProvisionalLoadForFrame:m_webFrame.get()];
[[webView _frameLoadDelegateForwarder] webView:webView didStartProvisionalLoadForFrame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView didReceiveTitle:title forFrame:m_webFrame.get()];
}
// Tell the client we've committed this URL.
ASSERT([m_webFrame->_private->webFrameView documentView] != nil);
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[webView _didCommitLoadForFrame:m_webFrame.get()];
[[webView _frameLoadDelegateForwarder] webView:webView didCommitLoadForFrame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchDidFailProvisionalLoad(NSError *error)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[webView _didFailProvisionalLoadWithError:error forFrame:m_webFrame.get()];
[[webView _frameLoadDelegateForwarder] webView:webView didFailProvisionalLoadWithError:error forFrame:m_webFrame.get()];
[m_webFrame->_private->internalLoadDelegate webFrame:m_webFrame.get() didFinishLoadWithError:error];
void WebFrameLoaderClient::dispatchDidFailLoad(NSError *error)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[webView _didFailLoadWithError:error forFrame:m_webFrame.get()];
[[webView _frameLoadDelegateForwarder] webView:webView didFailLoadWithError:error forFrame:m_webFrame.get()];
[m_webFrame->_private->internalLoadDelegate webFrame:m_webFrame.get() didFinishLoadWithError:error];
void WebFrameLoaderClient::dispatchDidFinishLoad()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[webView _didFinishLoadForFrame:m_webFrame.get()];
[[webView _frameLoadDelegateForwarder] webView:webView didFinishLoadForFrame:m_webFrame.get()];
[m_webFrame->_private->internalLoadDelegate webFrame:m_webFrame.get() didFinishLoadWithError:nil];
void WebFrameLoaderClient::dispatchDidFirstLayout()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _frameLoadDelegateForwarder] webView:webView didFirstLayoutInFrame:m_webFrame.get()];
}
Frame* WebFrameLoaderClient::dispatchCreatePage(NSURLRequest *request)
{
- WebView *currentWebView = [m_webFrame.get() webView];
+ WebView *currentWebView = getWebView(m_webFrame.get());
id wd = [currentWebView UIDelegate];
if ([wd respondsToSelector:@selector(webView:createWebViewWithRequest:)])
return core([[wd webView:currentWebView createWebViewWithRequest:request] mainFrame]);
void WebFrameLoaderClient::dispatchShow()
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _UIDelegateForwarder] webViewShow:webView];
}
void WebFrameLoaderClient::dispatchDecidePolicyForMIMEType(WebPolicyDecider *decider, const String& MIMEType, NSURLRequest *request)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _policyDelegateForwarder] webView:webView decidePolicyForMIMEType:MIMEType request:request frame:m_webFrame.get() decisionListener:decisionListener(decider)];
}
void WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(WebPolicyDecider *decider, NSDictionary *action, NSURLRequest *request, const String& frameName)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _policyDelegateForwarder] webView:webView
decidePolicyForNewWindowAction:action
request:request
void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction(WebPolicyDecider *decider, NSDictionary *action,
NSURLRequest *request)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _policyDelegateForwarder] webView:webView
decidePolicyForNavigationAction:action
request:request
void WebFrameLoaderClient::dispatchUnableToImplementPolicy(NSError *error)
{
- WebView *webView = [m_webFrame.get() webView];
+ WebView *webView = getWebView(m_webFrame.get());
[[webView _policyDelegateForwarder] webView:webView unableToImplementPolicyWithError:error frame:m_webFrame.get()];
}
void WebFrameLoaderClient::dispatchWillSubmitForm(WebPolicyDecider *decider, Frame* sourceFrame,
Element* form, NSDictionary *values)
{
- [[[m_webFrame.get() webView] _formDelegate] frame:m_webFrame.get() sourceFrame:kit(sourceFrame) willSubmitForm:kit(form) withValues:values submissionListener:decisionListener(decider)];
+ [[getWebView(m_webFrame.get()) _formDelegate] frame:m_webFrame.get() sourceFrame:kit(sourceFrame) willSubmitForm:kit(form) withValues:values submissionListener:decisionListener(decider)];
}
void WebFrameLoaderClient::dispatchDidLoadMainResource(DocumentLoader* loader)
{
if ([WebScriptDebugServer listenerCount])
- [[WebScriptDebugServer sharedScriptDebugServer] webView:[m_webFrame.get() webView]
+ [[WebScriptDebugServer sharedScriptDebugServer] webView:getWebView(m_webFrame.get())
didLoadMainResourceForDataSource:dataSource(loader)];
}
void WebFrameLoaderClient::progressStarted()
{
- [[m_webFrame.get() webView] _progressStarted:m_webFrame.get()];
+ [getWebView(m_webFrame.get()) _progressStarted:m_webFrame.get()];
}
void WebFrameLoaderClient::progressCompleted()
{
- [[m_webFrame.get() webView] _progressCompleted:m_webFrame.get()];
+ [getWebView(m_webFrame.get()) _progressCompleted:m_webFrame.get()];
}
void WebFrameLoaderClient::incrementProgress(id identifier, NSURLResponse *response)
{
- [[m_webFrame.get() webView] _incrementProgressForIdentifier:identifier response:response];
+ [getWebView(m_webFrame.get()) _incrementProgressForIdentifier:identifier response:response];
}
void WebFrameLoaderClient::incrementProgress(id identifier, NSData *data)
{
- [[m_webFrame.get() webView] _incrementProgressForIdentifier:identifier data:data];
+ [getWebView(m_webFrame.get()) _incrementProgressForIdentifier:identifier data:data];
}
void WebFrameLoaderClient::completeProgress(id identifier)
{
- [[m_webFrame.get() webView] _completeProgressForIdentifier:identifier];
+ [getWebView(m_webFrame.get()) _completeProgressForIdentifier:identifier];
}
void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready)
{
- [[m_webFrame.get() webView] setMainFrameDocumentReady:ready];
+ [getWebView(m_webFrame.get()) setMainFrameDocumentReady:ready];
}
void WebFrameLoaderClient::startDownload(NSURLRequest *request)
{
// FIXME: Should download full request.
- [[m_webFrame.get() webView] _downloadURL:[request URL]];
+ [getWebView(m_webFrame.get()) _downloadURL:[request URL]];
}
void WebFrameLoaderClient::willChangeTitle(DocumentLoader* loader)
{
// FIXME: Should do this only in main frame case, right?
- [[m_webFrame.get() webView] _willChangeValueForKey:_WebMainFrameTitleKey];
+ [getWebView(m_webFrame.get()) _willChangeValueForKey:_WebMainFrameTitleKey];
}
void WebFrameLoaderClient::didChangeTitle(DocumentLoader* loader)
{
// FIXME: Should do this only in main frame case, right?
- [[m_webFrame.get() webView] _didChangeValueForKey:_WebMainFrameTitleKey];
+ [getWebView(m_webFrame.get()) _didChangeValueForKey:_WebMainFrameTitleKey];
}
void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, NSData *data)
NSURL *WebFrameLoaderClient::mainFrameURL()
{
- return [[[[m_webFrame.get() webView] mainFrame] dataSource] _URL];
+ return [[[getWebView(m_webFrame.get()) mainFrame] dataSource] _URL];
}
void WebFrameLoaderClient::setDefersCallbacks(bool defers)
// Even if already complete, we might have set a previous item on a frame that
// didn't do any data loading on the past transaction. Make sure to clear these out.
NSScrollView *sv = [m_webFrame->_private->webFrameView _scrollView];
- if ([[m_webFrame.get() webView] drawsBackground])
+ if ([getWebView(m_webFrame.get()) drawsBackground])
[sv setDrawsBackground:YES];
[m_webFrame.get() _setPreviousItem:nil];
}
@interface WebPageBridge : WebCorePageBridge <WebCorePageBridge>
{
+@public
WebView *_webView;
}
65488DA2084FBCCB00831AD0 /* WebNSDictionaryExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 65488DA0084FBCCB00831AD0 /* WebNSDictionaryExtras.m */; };
6550B7C7099EFAE90090D781 /* WebArchiver.h in Headers */ = {isa = PBXBuildFile; fileRef = 6550B7C5099EFAE90090D781 /* WebArchiver.h */; };
6550B7C8099EFAE90090D781 /* WebArchiver.m in Sources */ = {isa = PBXBuildFile; fileRef = 6550B7C6099EFAE90090D781 /* WebArchiver.m */; };
+ 656D333E0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
658A40960A14853B005E6987 /* WebDataSourceInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 658A40950A14853B005E6987 /* WebDataSourceInternal.h */; };
658BA6FC0ADB39DE00AEB387 /* WebPolicyDeciderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 658BA6FA0ADB39DE00AEB387 /* WebPolicyDeciderMac.h */; };
658BA6FD0ADB39DE00AEB387 /* WebPolicyDeciderMac.m in Sources */ = {isa = PBXBuildFile; fileRef = 658BA6FB0ADB39DE00AEB387 /* WebPolicyDeciderMac.m */; };
65488DA0084FBCCB00831AD0 /* WebNSDictionaryExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSDictionaryExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
6550B7C5099EFAE90090D781 /* WebArchiver.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebArchiver.h; sourceTree = "<group>"; };
6550B7C6099EFAE90090D781 /* WebArchiver.m */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 30; path = WebArchiver.m; sourceTree = "<group>"; };
+ 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebResourceLoadDelegatePrivate.h; sourceTree = "<group>"; };
6578F5DE045F817400000128 /* WebDownload.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDownload.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
6578F5DF045F817400000128 /* WebDownload.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDownload.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65836F5E07EE425900682F95 /* WebPluginContainerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginContainerPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
9C7CABBB0190A37C0ECA16EA /* WebView */ = {
isa = PBXGroup;
children = (
+ 656D333D0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h */,
F52CA6BD02DF9D0F018635CA /* HTML */,
51E94C0706C02CA300A9B09E /* PDF */,
8373435A0624EE0D00F3B289 /* WebArchive.h */,
1C8CB07A0AE9830C00B1F6E9 /* WebEditingDelegatePrivate.h in Headers */,
4BF99F900AE050BC00815C2B /* WebEditorClient.h in Headers */,
1CA57D620AED6A470009BDD0 /* WebGraphicsExtras.h in Headers */,
+ 656D333E0AF21AE900212169 /* WebResourceLoadDelegatePrivate.h in Headers */,
931633EB0AEDFF930062B92D /* WebFrameLoaderClient.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
#import "WebKitStatisticsPrivate.h"
#import "WebNSURLExtras.h"
#import "WebNSURLRequestExtras.h"
+#import "WebPageBridge.h"
+#import "WebPolicyDelegatePrivate.h"
+#import "WebNetscapePluginEmbeddedView.h"
+#import "WebNullPluginView.h"
+#import "WebPlugin.h"
+#import "WebPluginController.h"
+#import "WebPolicyDeciderMac.h"
#import "WebPolicyDelegatePrivate.h"
#import "WebPreferencesPrivate.h"
#import "WebScriptDebugDelegatePrivate.h"
@end
-static inline WebFrame *frame(WebCoreFrameBridge *bridge)
-{
- return [(WebFrameBridge *)bridge webFrame];
-}
-
-FrameMac* core(WebFrame *frame)
-{
- return [[frame _bridge] _frame];
-}
-
-WebFrame *kit(Frame* frame)
-{
- return frame ? [(WebFrameBridge *)Mac(frame)->bridge() webFrame] : nil;
-}
-
Element* core(DOMElement *element)
{
return [element _element];
@implementation WebFrame (WebInternal)
+
+static inline WebFrame *frame(WebCoreFrameBridge *bridge)
+{
+ return ((WebFrameBridge *)bridge)->_frame;
+}
+
+FrameMac* core(WebFrame *frame)
+{
+ if (!frame)
+ return 0;
+
+ return frame->_private->bridge->m_frame;
+}
+
+WebFrame *kit(Frame* frame)
+{
+ return frame ? ((WebFrameBridge *)Mac(frame)->bridge())->_frame : nil;
+}
+
+static inline WebView *getWebView(WebFrame *webFrame)
+{
+ Frame* coreFrame = core(webFrame);
+ return coreFrame ? ((WebPageBridge *)coreFrame->page()->bridge())->_webView : nil;
+}
+
- (NSURLRequest *)_webDataRequestForData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)URL unreachableURL:(NSURL *)unreachableURL
{
NSURL *fakeURL = [NSURL _web_uniqueWebDataURL];
- (void)_addBackForwardItemClippedAtTarget:(BOOL)doClip
{
if ([[self dataSource] _URLForHistory] != nil) {
- WebHistoryItem *bfItem = [[[self webView] mainFrame] _createItemTreeWithTargetFrame:self clippedAtTarget:doClip];
+ WebHistoryItem *bfItem = [[getWebView(self) mainFrame] _createItemTreeWithTargetFrame:self clippedAtTarget:doClip];
LOG (BackForward, "for frame %@, adding item %@\n", [self name], bfItem);
- [[[self webView] backForwardList] addItem:bfItem];
+ [[getWebView(self) backForwardList] addItem:bfItem];
}
}
- (BOOL)_canCachePage
{
- return [[[self webView] backForwardList] _usesPageCache] && core(self)->canCachePage();
+ return [[getWebView(self) backForwardList] _usesPageCache] && core(self)->canCachePage();
}
- (void)_purgePageCache
{
// This method implements the rule for purging the page cache.
- unsigned sizeLimit = [[[self webView] backForwardList] pageCacheSize];
+ unsigned sizeLimit = [[getWebView(self) backForwardList] pageCacheSize];
unsigned pagesCached = 0;
- WebBackForwardList *backForwardList = [[self webView] backForwardList];
+ WebBackForwardList *backForwardList = [getWebView(self) backForwardList];
NSArray *backList = [backForwardList backListWithLimit: 999999];
WebHistoryItem *oldestNonSnapbackItem = nil;
// be necessary if we do the better fix described above.
[self _frameLoader]->documentLoader()->replaceRequestURLForAnchorScroll(itemURL);
- [[[self webView] _frameLoadDelegateForwarder] webView:[self webView]
+ [[getWebView(self) _frameLoadDelegateForwarder] webView:getWebView(self)
didChangeLocationWithinPageForFrame:self];
[_private->internalLoadDelegate webFrame:self didFinishLoadWithError:nil];
} else {
NSDictionary *pageCache = [item pageCache];
NSDate *cacheDate = [pageCache objectForKey: WebPageCacheEntryDateKey];
NSTimeInterval delta = [[NSDate date] timeIntervalSinceDate: cacheDate];
- if (delta <= [[[self webView] preferences] _backForwardCacheExpirationInterval]) {
+ if (delta <= [[getWebView(self) preferences] _backForwardCacheExpirationInterval]) {
newDataSource = [pageCache objectForKey: WebPageCacheDataSourceKey];
[self _frameLoader]->load([newDataSource _documentLoader], loadType, 0);
inPageCache = YES;
} else {
- LOG (PageCache, "Not restoring page from back/forward cache because cache entry has expired, %@ (%3.5f > %3.5f seconds)\n", [_private->provisionalItem URL], delta, [[[self webView] preferences] _backForwardCacheExpirationInterval]);
+ LOG (PageCache, "Not restoring page from back/forward cache because cache entry has expired, %@ (%3.5f > %3.5f seconds)\n", [_private->provisionalItem URL], delta, [[getWebView(self) preferences] _backForwardCacheExpirationInterval]);
[item setHasPageCache: NO];
}
}
// <rdar://problem/3951283> can view pages from the back/forward cache that should be disallowed by Parental Controls
// Ultimately, history item navigations should go through the policy delegate. That's covered in:
// <rdar://problem/3979539> back/forward cache navigations should consult policy delegate
- if ([[[self webView] _policyDelegateForwarder] webView:[self webView] shouldGoToHistoryItem:item]) {
- WebBackForwardList *backForwardList = [[self webView] backForwardList];
+ if ([[getWebView(self) _policyDelegateForwarder] webView:getWebView(self) shouldGoToHistoryItem:item]) {
+ WebBackForwardList *backForwardList = [getWebView(self) backForwardList];
WebHistoryItem *currItem = [backForwardList currentItem];
// Set the BF cursor before commit, which lets the user quickly click back/forward again.
// - plus, it only makes sense for the top level of the operation through the frametree,
- (void)_updateBackground
{
- BOOL drawsBackground = [[self webView] drawsBackground];
- NSColor *backgroundColor = [[self webView] backgroundColor];
+ BOOL drawsBackground = [getWebView(self) drawsBackground];
+ NSColor *backgroundColor = [getWebView(self) backgroundColor];
Frame* coreFrame = core(self);
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
// We rely on WebDocumentSelection protocol implementors to call this method when they become first
// responder. It would be nicer to just notice first responder changes here instead, but there's no
// notification sent when the first responder changes in general (Radar 2573089).
- WebFrame *frameWithSelection = [[[self webView] mainFrame] _findFrameWithSelection];
+ WebFrame *frameWithSelection = [[getWebView(self) mainFrame] _findFrameWithSelection];
if (frameWithSelection != self)
[frameWithSelection _clearSelection];
// While we're in the general area of selection and frames, check that there is only one now.
- ASSERT([[[self webView] mainFrame] _atMostOneFrameHasSelection]);
+ ASSERT([[getWebView(self) mainFrame] _atMostOneFrameHasSelection]);
}
- (void)_addPlugInView:(NSView *)plugInView
- (BOOL)_isMainFrame
{
- return self == [[self webView] mainFrame];
+ Frame* coreFrame = core(self);
+ if (!coreFrame)
+ return NO;
+ return coreFrame == coreFrame->page()->mainFrame() ;
}
- (void)_addInspector:(WebInspector *)inspector
- (WebView *)webView
{
- Frame* coreFrame = core(self);
- return coreFrame ? [coreFrame->page()->bridge() webView] : nil;
+ return getWebView(self);
}
- (DOMDocument *)DOMDocument
--- /dev/null
+/*
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSInteger int
+#else
+#define WebNSInteger NSInteger
+#endif
+
+@class WebView;
+@class WebDataSource;
+@class NSURLAuthenticationChallenge;
+@class NSURLResponse;
+@class NSURLRequest;
+
+@interface NSObject (WebResourceLoadDelegatePrivate)
+
+- (void)webView:(WebView *)webView didLoadResourceFromMemoryCache:(NSURLRequest *)request response:(NSURLResponse *)response length:(WebNSInteger)length fromDataSource:(WebDataSource *)dataSource;
+
+@end
+
+#undef WebNSInteger
{
WebResourceDelegateImplementationCache *cache = &_private->resourceLoadDelegateImplementations;
id delegate = [self resourceLoadDelegate];
+ Class delegateClass = [delegate class];
cache->delegateImplementsDidCancelAuthenticationChallenge = [delegate respondsToSelector:@selector(webView:resource:didCancelAuthenticationChallenge:fromDataSource:)];
cache->delegateImplementsDidReceiveAuthenticationChallenge = [delegate respondsToSelector:@selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:)];
cache->delegateImplementsDidReceiveResponse = [delegate respondsToSelector:@selector(webView:resource:didReceiveResponse:fromDataSource:)];
cache->delegateImplementsWillSendRequest = [delegate respondsToSelector:@selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:)];
cache->delegateImplementsIdentifierForRequest = [delegate respondsToSelector:@selector(webView:identifierForInitialRequest:fromDataSource:)];
+ cache->delegateImplementsDidLoadResourceFromMemoryCache = [delegate respondsToSelector:@selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:)];
+
+ if (cache->delegateImplementsDidCancelAuthenticationChallenge)
+ cache->didCancelAuthenticationChallengeFunc = (WebDidCancelAuthenticationChallengeFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:))->method_imp;
+ if (cache->delegateImplementsDidReceiveAuthenticationChallenge)
+ cache->didReceiveAuthenticationChallengeFunc = (WebDidReceiveAuthenticationChallengeFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveAuthenticationChallenge:fromDataSource:))->method_imp;
+ if (cache->delegateImplementsDidFinishLoadingFromDataSource)
+ cache->didFinishLoadingFromDataSourceFunc = (WebDidFinishLoadingFromDataSourceFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didFinishLoadingFromDataSource:))->method_imp;
+ if (cache->delegateImplementsDidReceiveContentLength)
+ cache->didReceiveContentLengthFunc = (WebDidReceiveContentLengthFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveContentLength:fromDataSource:))->method_imp;
+ if (cache->delegateImplementsDidReceiveResponse)
+ cache->didReceiveResponseFunc = (WebDidReceiveResponseFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:didReceiveResponse:fromDataSource:))->method_imp;
+ if (cache->delegateImplementsWillSendRequest)
+ cache->willSendRequestFunc = (WebWillSendRequestFunc)class_getInstanceMethod(delegateClass, @selector(webView:resource:willSendRequest:redirectResponse:fromDataSource:))->method_imp;
+ if (cache->delegateImplementsIdentifierForRequest)
+ cache->identifierForRequestFunc = (WebIdentifierForRequestFunc)class_getInstanceMethod(delegateClass, @selector(webView:identifierForInitialRequest:fromDataSource:))->method_imp;
+ if (cache->delegateImplementsDidLoadResourceFromMemoryCache)
+ cache->didLoadResourceFromMemoryCacheFunc = (WebDidLoadResourceFromMemoryCacheFunc)class_getInstanceMethod(delegateClass, @selector(webView:didLoadResourceFromMemoryCache:response:length:fromDataSource:))->method_imp;
}
-- (WebResourceDelegateImplementationCache)_resourceLoadDelegateImplementations
+id WebViewGetResourceLoadDelegate(WebView *webView)
{
- return _private->resourceLoadDelegateImplementations;
+ return webView->_private->resourceProgressDelegate;
+}
+
+WebResourceDelegateImplementationCache WebViewGetResourceLoadDelegateImplementations(WebView *webView)
+{
+ return webView->_private->resourceLoadDelegateImplementations;
}
- _policyDelegateForwarder
return _private->resourceProgressDelegate;
}
-
- (void)setDownloadDelegate: delegate
{
_private->downloadDelegate = delegate;
- (WebPageBridge *)_pageBridge;
@end
+id WebViewGetResourceLoadDelegate(WebView *webView);
+WebResourceDelegateImplementationCache WebViewGetResourceLoadDelegateImplementations(WebView *webView);
+
@interface WebView (WebViewMiscInternal)
- (BOOL)defersCallbacks;
- (void)setDefersCallbacks:(BOOL)defers;
- (void)_setInitiatedDrag:(BOOL)initiatedDrag;
- (id)_UIDelegateForwarder;
- (id)_resourceLoadDelegateForwarder;
-- (WebResourceDelegateImplementationCache)_resourceLoadDelegateImplementations;
- (id)_frameLoadDelegateForwarder;
- (id)_editingDelegateForwarder;
- (id)_policyDelegateForwarder;
#import <WebKit/WebView.h>
#import <WebKit/WebFramePrivate.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
+#define WebNSInteger int
+#else
+#define WebNSInteger NSInteger
+#endif
+
@class NSError;
@class WebFrame;
@class WebPreferences;
@protocol WebFormDelegate;
+
+
+typedef void (*WebDidCancelAuthenticationChallengeFunc)(id, SEL, WebView *, id, NSURLAuthenticationChallenge *, WebDataSource *);
+typedef void (*WebDidReceiveAuthenticationChallengeFunc)(id, SEL, WebView *, id, NSURLAuthenticationChallenge *, WebDataSource *);
+typedef id (*WebIdentifierForRequestFunc)(id, SEL, WebView *, NSURLRequest *, WebDataSource *);
+typedef NSURLRequest *(*WebWillSendRequestFunc)(id, SEL, WebView *, id, NSURLRequest *, NSURLResponse *, WebDataSource *);
+typedef void (*WebDidReceiveResponseFunc)(id, SEL, WebView *, id, NSURLResponse *, WebDataSource *);
+typedef void (*WebDidReceiveContentLengthFunc)(id, SEL, WebView *, id, WebNSInteger, WebDataSource *);
+typedef void (*WebDidFinishLoadingFromDataSourceFunc)(id, SEL, WebView *, id, WebDataSource *);
+typedef void (*WebDidLoadResourceFromMemoryCacheFunc)(id, SEL, WebView *, NSURLRequest *, NSURLResponse *, WebNSInteger, WebDataSource *);
+
typedef struct _WebResourceDelegateImplementationCache {
uint delegateImplementsDidCancelAuthenticationChallenge:1;
uint delegateImplementsDidReceiveAuthenticationChallenge:1;
uint delegateImplementsDidFinishLoadingFromDataSource:1;
uint delegateImplementsWillSendRequest:1;
uint delegateImplementsIdentifierForRequest:1;
+ uint delegateImplementsDidLoadResourceFromMemoryCache:1;
+
+ WebDidCancelAuthenticationChallengeFunc didCancelAuthenticationChallengeFunc;
+ WebDidReceiveAuthenticationChallengeFunc didReceiveAuthenticationChallengeFunc;
+ WebIdentifierForRequestFunc identifierForRequestFunc;
+ WebWillSendRequestFunc willSendRequestFunc;
+ WebDidReceiveResponseFunc didReceiveResponseFunc;
+ WebDidReceiveContentLengthFunc didReceiveContentLengthFunc;
+ WebDidFinishLoadingFromDataSourceFunc didFinishLoadingFromDataSourceFunc;
+ WebDidLoadResourceFromMemoryCacheFunc didLoadResourceFromMemoryCacheFunc;
} WebResourceDelegateImplementationCache;
extern NSString *_WebCanGoBackKey;
// Addresses 4192534. Private API for now.
- (void)webView:(WebView *)sender didHandleOnloadEventsForFrame:(WebFrame *)frame;
@end
+
+#undef WebNSInteger