WebEditorClient.cpp:
(WebEditorClient::shouldBeginEditing):
(WebEditorClient::shouldEndEditing):
(WebEditorClient::shouldApplyStyle):
Change these to return true. Eventually they will call the editing delegate.

The removed anchor element needs to stick around temporarily, in the same way
that the typing style hangs off the caret until the user moves it. Also text
insertion around anchors didn't match TextEdit.

editing/EditCommand.cpp:
(WebCore::EditCommand::apply): Clear the removed anchor after any top level
editing command that doesn't preserve the typing style (matches TextEdit).

editing/Editor.cpp:
(WebCore::Editor::appliedEditing): Added a fixme: we shouldn't call
setSelection with a message telling it to clear the typing style
(and the saved anchor) here. Save/restore the saved anchor because of this.

editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::prepareForTextInsertion): Insert the saved anchor
if one exists.

editing/SelectionController.cpp:
(WebCore::SelectionController::setSelection): Clear the removed anchor whenever
we make a selection change that clears the typing style.
(WebCore::SelectionController::nodeWillBeRemoved): Removed an old outdated FIXME.

editing/htmlediting.cpp:
(WebCore::positionAvoidingSpecialElementBoundary): Cleaned up and
made some changes to match TextEdit's behavior. First, insert content
inside the anchor when the caret is after it, unless the caret is at the
end of the document, or if the caret is before it and at the start of a
paragraph.

Added an execCommand method to Editor. The idea is that this should replace the CommandByName object. Get rid of
the alterCurrentSelection method in the bridge. WebKit can just call execCommand directly.

loader/icon/IconLoader.cpp:
(WebCore::IconLoader::didFailWithError): Clear the buffer so half-an-image isn't commited to the DB
on error. Also, as a loader re-factoring sanity check, added an assertion
(WebCore::IconLoader::didFinishLoading): If an icon loader resulted in an error-response, the icon
is already committed to the DB. Skip doing that step twice.

Pulled MIME type handling out of WebFrameBridge and added
a general C++ class to store/query MIME info
Added an Obj-C bridge to provide WebKit with access to the
MimeTypeRegistry for non-Obj-C++ classes.

rename String::sprintf and DeprecatedString::sprintf to ...::format to avoid needlessly tweaking a search
for insecure functions. Neither of these has risk of buffer overruns since they calculate the buffer size
for you and use vsnprintf.

Note that this will still crash on Debug builds because it will hit
an assertion failure in editing. (One of the reasons there is no
layout test along with this fix.) There is definitely some editing
wackiness happening. See ​http://bugs.webkit.org/show_bug.cgi?
id=10144 for updates on the assertion failure bug.

rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::childRemoved): It is possible for a
prevRootBox and its prevRootBox to share a lineBreakObj. So instead
of just clearing the lineBreakObj of the prevRootBox, cycle through
all prevRootBoxs with the same lineBreakObj.

bridge/mac/FrameMac.h: Removed unneeded includes. Moved some functions
that were misplaced into the appropriate sections.

bridge/mac/FrameMac.mm:
(WebCore::selectorForKeyEvent): Changed to use a DOM event instead of
a PlatformKeyboardEvent.
(WebCore::FrameMac::nextKeyViewInFrame): Changed to use currentKeyboardEvent()
and pass event into next/previousFocusNode.
(WebCore::FrameMac::currentKeyboardEvent): Added. Creates a DOM event from
the AppKit current event, if it's a keyboard event. Really just a hack that's
needed to preserve some code we can remove once we deal with the last NSView-
based form control.
(WebCore::isKeyboardOptionTab): Added.
(WebCore::FrameMac::tabsToLinks): Added event parameter, used to check if the
option (alt) key is down.
(WebCore::FrameMac::tabsToAllControls): Ditto.
(WebCore::FrameMac::keyEvent): Changed call to prepareForUserAction() to just
call resetMultipleFormSubmissionProtection() explicitly instead.
(WebCore::FrameMac::mouseDown): Ditto.

platform/mac/WebCoreTextField.mm: Removed the non-search field code.
(-[WebCoreTextFieldController controlTextDidChange:]): Removed the
call to FrameMac::handleKeyboardOptionTabInView, which is no longer
needed since the default handler in HTMLInputElement takes care of
option-tab.

DumpRenderTree/DumpRenderTree.m: (main): Explicitly turn "tab to links"
mode off. I think we need to do this because WebPreferences saves things
for us automatically. It would be good to turn that off for DumpRenderTree,
but for now lets handle this like the other preferences (set it explicitly
each time).

<rdar://problem/4713280> Would like to get an array of bounding rects rather than just the union of them for a DOMRange
<rdar://problem/4804317> Would like SPI to get bounding box for a DOM range without having to change the selection

Added lineBoxRects and boundingBox to Range and DOMRange. These methods correspond to the DOMNode methods.

Added test to cover bug ​http://bugs.webkit.org/show_bug.cgi?id=11450
-Confirm there is no assert when nuking a frame with an active XMLHttpRequest load
-Confirm the correct state-change notifications for the request are dispatched

loader/FrameLoader.cpp:
(WebCore::FrameLoader::createWindow): Use m_outgoingReferrer instead of outgoingReferrer()
inside the FrameLoader class.
(WebCore::FrameLoader::requestFrame): Use less DeprecatedString.
(WebCore::FrameLoader::clear): Stop the redirection timer.
(WebCore::FrameLoader::receivedFirstData): Added an early return instead of nesting the
entire function in an if statement. Use less DeprecatedString.
(WebCore::FrameLoader::scheduleLocationChange): Fix backwards ? : operator.
(WebCore::FrameLoader::scheduleRefresh): Ditto.
(WebCore::FrameLoader::urlSelected): Use m_outgoingReferrer instead of outgoingReferrer()
inside the FrameLoader class.

11/07/06:

Another go at fix for <rdar://problem/4820814> A crash occurs at
WebCore::HitTestResult::spellingToolTip() when mousing down on
iframe at www.macsurfer.com

The fix from yesterday caused a layout test regression which
exposed an existing bug. The existing bug was that we allowed text
nodes to stay in the head tag, but other browsers move them to the
body. The previous fix also caused a performance regression, which
was seemingly easy to fix by moving the new clause in
HTMLParser::handleError() to be below the HTMLElement case.

html/HTMLDocument.cpp:
(WebCore::HTMLDocument::childAllowed): Don't allow comment nodes to
be the child of the document.

html/HTMLHeadElement.cpp:
(WebCore::HTMLHeadElement::childAllowed): Do not allow non-
whitespace text nodes to be children of the head.

None of Screen's responsibilities require up-calls to WebKit or delegates,
so WebCore can handle it all.

Moved Screen back from page/ to platform/ because it's a platform
abstraction again.

Merged scaling and flipping functions into 'toUserSpace' and 'toDeviceSpace',
since the two were always used together.

Changed pixel depth queries to query the deepest screen. Darin mentioned
that it might have been a feature, not a bug, to use the main/menubar screen
regardless of the screen you were on. For scaling and flipping that's not
the case, but for querying pixel depth I think it is. You want to know
about the highest pixel depth your content may display on.

fix <rdar://problem/4752069> 9A274: World of Warcraft Launcher
crashes on launch in WebCore::ResourceLoader::start

No layout test, because this depends on cached icons, although there's
perhaps a way to write a test for it with some further ingenuity.

loader/icon/IconLoader.h: Make IconLoader inherit from Noncopyable
to make explicit the fact that it can't be successfully copied.
Remove notifyIconChanged function and put the contents in the caller.
This eliminates the need for IconLoaderMac.mm. Added finishedLoading
and clearLoadingState functions to share code. Removed m_url, since the
resource handle already stores the URL. Renamed m_resourceLoader to
m_handle to reflect the class's name change. Removed the 4096-byte
inline buffer from m_data, since the malloc savings is not sufficient
to offset the additional memory use. Removed m_httpStatusCode because
we can instead cancel the load when we get a status code that reflects
failure. Added m_loadIsInProgress boolean because we need to detect
loads that complete during the ResourceHandle::create function call.

loader/icon/IconLoader.cpp:
(WebCore::IconLoader::IconLoader): Initialize m_loadIsInProgress.
Don't initialize m_httpStatusCode.
(WebCore::IconLoader::~IconLoader): Updated for name change.
(WebCore::IconLoader::startLoading): Added code to use the
m_loadIsInProgress flag to detect if the load completed while inside
the ResourceHandle::create function. Removed code to set m_url.
(WebCore::IconLoader::stopLoading): Call clearLoadingState to share
more code.
(WebCore::IconLoader::didReceiveResponse): Kill the ResourceHandle
and finish loading if the HTTP status code indicates failure.
(WebCore::IconLoader::didReceiveData): Removed assertion that checks
the ResourceHandle, since we can't do that any more.
(WebCore::IconLoader::didFinishLoading): Changed to call finishLoading
so we can share code with the new didReceiveResponse code path.
(WebCore::IconLoader::finishLoading): Moved code here from the
didFinishLoading callback. Pass a URL when calling
commitIconURLToIconDatabase. Call notifyIconChanged directly here
instead of using a separate function. Call clearLoadingState to
share more code with stopLoading.
(WebCore::IconLoader::clearLoadingState): Added.