bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::hasCSSPropertyNamePrefix): Fixed a typo. The code was only
comparing the first character of the prefix to the first character
of the property name.

We now mark all links on a page as "changed" at the appropriate times.

WebCore.base.exp: Update since I made completeURL be a const member function.

css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
into locals. Also changed some static data members to file-scoped globals with
internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
(WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
(WebCore::parseUASheet): Tweak the comment.
(WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
use local variables instead of globals where possible.
(WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
it can store the link in a hash. Also changed it to have a return value instead
of having it modify a global variable. Added code to put the hash into a set so
we can tell later if this is one of the links that affects this page.
(WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
checkPseudoState.
(WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
(WebCore::CSSStyleSelector::styleForElement): Ditto.
(WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
(WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
the SVG style sheet to use a boolean global and put it right here in the function
since this is the only code that needs to know about it.
(WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
(WebCore::colorForCSSValue): Moved code inside the function that is not needed
anywhere else.
(WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
to checkPseudoState.
(WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
all links if there were any in the set.
(WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
links if the one that changed is in the set.

css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
didn't need to be public, and removed others that could be made into non-member
functions. Changed pseudoStyleRulesForElement to take a const String& instead of
a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
Got rid of unneeded friend declarations.

dom/Document.cpp:
(WebCore::Document::completeURL): Made const.
(WebCore::findSlashDotDotSlash): Moved here from PageGroup.
(WebCore::findSlashSlash): Ditto.
(WebCore::findSlashDotSlash): Ditto.
(WebCore::containsColonSlashSlash):
(WebCore::cleanPath): Ditto.
(WebCore::matchLetter): Ditto.
(WebCore::needsTrailingSlash): Ditto.
(WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
the poor-man's completeURL function. The idea of putting it here is that this
way it can be alongside the real completeURL function. Later we should figure out
a way to make this function share more code with the real thing and match behavior.

page/PageGroup.cpp:
(WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
The CSSStyleSelector now handles actually computing the hash, and it does so by
calling code in Document.
(WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
a bit more code. Added code that calls visitedStateChanged if a new link was added.
(WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
if any visited links are removed.

page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
definition here.

platform/text/StringHash.h:
(WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
the StringImpl::computeHash function, using the same technique for avoiding 0.
(WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
(WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.

rendering/RenderStyle.cpp:
(WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
of getting directly at a data member so the data member could be made private.

page/inspector/DocumentPanel.js:
(WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
we're being edited, since we want default editing behaviors to work.
(WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
before doing anything else.
(WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
lets you edit attributes.
(WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
Uses a scratch element to get the new attribute(s) parsed, then sets
the attribute(s) on the node in the inspected document.
(WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
(WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
representation of the node in the Inspector's DOM tree to reflect
the node's current state.

Serialize remaining dependent builds by adding dependencies.
Visual Studio per-vcproj parallelization doesn't add a lot of value
since so many of our builds are dependent - this just enforces that.
We do our parallelization via pdevenv, which works much better.

WebView/WebView.mm: Moved the keyboard mode code in here.
(-[WebView _close]): Remove observer from the distributed notification
center as well as the normal one.
(-[WebView _retrieveKeyboardUIModeFromPreferences:]): Added. Code moved
here from the bridge.
(-[WebView _keyboardUIMode]): Ditto.

Add WebInspector.startEditing, which takes the element to be edited, a
committedCallback, a cancelledCallback, and a context parameter. This
function takes care of setting up the element for editing, and calls
either the cancelledCallback or committedCallback when editing ends.

page/inspector/inspector.js:
(WebInspector.changeFocus): Changed a call to firstParentWithClassName
to firstParentOrSelfWithClassName so that if the focusable element
itself is the target it will be recognized. I don't know why this
change wasn't needed before this.
(WebInspector.isBeingEdited): Added.
(WebInspector.startEditing): Added.

html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
charset for correct decoding of script content.
(WebCore::HTMLScriptElement::insertedIntoDocument):
(WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
for the script (as much as can be determined prior to loading it).

html/HTMLScriptElement.h:

html/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
decoding of script content.

Make WebInspectorClient use WindowMessageBroadcaster instead of manual subclassing

Reviewed by Darin.

WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::WebInspectorClient): Removed
m_orignalWebViewWndProc member.
(WebInspectorClient::attachWindow): Register as a listener with
WindowMessageBroadcaster instead of subclassing.
(WebInspectorClient::detachWindow): Deregister as a listener with
WindowMessageBroadcaster instead of unsubclassing.
(WebInspectorClient::windowReceivedMessage): Renamed from
SubclassedWebViewWndProc. Also added a missing break statement after
the call to onWebViewWindowPosChanging.

WebNodeHighlight.cpp:
(WebNodeHighlight::onWebViewWindowPosChanged): Added. Listens for
changes to the WebView's size and resizes the highlight window to
match.
(WebNodeHighlight::onRootWindowPosChanged): Added. Listens for changes
to the WebView's root window's position and moves the highlight window
to match.
(WebNodeHighlight::windowReceivedMessage): Call
onWebViewWindowPosChanged/onRootWindowPosChanged as appropriate.

DerivedSources.make: Put the list of DOM classes into its own
variable, and generate the JavaScript bindings and Objective-C
bindings dependencies from that. Added some separators to make it
a little easier to see the sections of the file. Moved all the
Mac-specific rules (except for the SVG conditional part) down
to the bottom of the file in a separate section.

Bug 16516: canvas image patterns stop working with some transformations

Reviewed by Sam W.

Simple fix. We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
with CG. However any transforms involving FLT_MAX immediately get
consumed by the introduced floating point error. yStep had already been
clamped to a much smaller arbitrary value, and this patch makes us use
that clamp value for xStep as well.

DefaultDelegates/WebDefaultScriptDebugDelegate.m: Use NSUInteger in place of unsigned where required.

DefaultDelegates/WebDefaultUIDelegate.m: Ditto.

History/WebHistoryItem.mm: Ditto.

Misc/WebElementDictionary.mm: Ditto.

WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::objectContentType): Move variable declaration outside of if to avoid warning about the
variable being unused in 64-bit.

WebCoreSupport/WebInspectorClient.mm: Use NSUInteger in place of unsigned where required.

WebView/WebHTMLView.mm:
(-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Use CGFloat in place of float where required.
(-[WebTextCompleteController numberOfRowsInTableView:]): Use NSInteger in place of int where required.

platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
encoding names by manually registering windows-939-2000, and mapping all other related
encodings to it.

Fix for crash caused by FrameLoader incorrectly assuming it has
a RenderWidget

Reviewed by Ada

In some circumstances an application embedding a WebView may
choose to prevent a webview from loading a resource. If that
resource was requested by an <object> element then we may
fallback to different content which may not produce a RenderWidget.
Unfortunately FrameLoader::loadSubframe was assuming that if a
renderer was produced it would always be a RenderWidget, and arbitrarily
performed what could be an incorrect cast. This could then lead to
a crash.

html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
been called on a tainted canvas.
(WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
data, checks to see if the MIME type is supported. Unsupported MIME types and the null string (which is made
by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec. The actual
toDataURL logic is actually done in the ImageBuffer class.

platform/MIMETypeRegistry.h:
Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
MIME types the platform knows how to encode. Currently only implemented for CG and Qt.

platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::create):
(WebCore::ImageBuffer::getImageData):
(WebCore::ImageBuffer::putImageData):
(WebCore::ImageBuffer::toDataURL):
Converts the current context to a data: url of the specified MIME type. This method
unfortunately has to flip the context, resulting in less than optimal code.

platform/FileChooser.cpp:
(WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific.
Also start the refcount at 1.
(WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one.
(WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific.

platform/FileChooser.h: Removed m_controller, which was Macintosh-specific.

platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor,
since they are no longer platform-specific.

platform/qt/FileChooserQt.cpp: Ditto.

platform/win/FileChooserWin.cpp: Ditto.

platform/wx/TemporaryLinkStubs.cpp: Ditto.

platform/mac/FileChooserMac.mm:
(WebCore::FileChooser::openFileChooser): Call the chrome client instead of the
bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController
class and m_controller data member and move the cosntrutor/destructor to platform-
independent code.

WebKit/mac:

Reviewed by Adam.

eliminated WebCoreFrameBridge runOpenPanel

WebCoreSupport/WebChromeClient.h: Added runOpenPanel.

WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::runOpenPanel): Added.
(-[WebOpenPanelResultListener initWithChooser:]): Added. Used to wrap the
FileChooser so it can get a result from the UI delegate.
(-[WebOpenPanelResultListener dealloc]): Added.
(-[WebOpenPanelResultListener finalize]): Added.
(-[WebOpenPanelResultListener cancel]): Added.
(-[WebOpenPanelResultListener chooseFilename:]): Added.

This class is a singleton which allows one or more
JavaScriptDebugListeners to receive callbacks during JavaScript
execution.

Right now all listeners receive callbacks for all Pages in the
process. Eventually we will want to support listeners registering for
callbacks for specific Pages (e.g., the Inspector will want to listen
for execution in just the Page it's inspecting).

Pages notify the JavaScriptDebugServer when they are created so that
it can install itself as the Page's debugger.

Reviewed by Darin.

GNUMakefile.am: Added new files to project.

WebCore.pro: Ditto.

WebCore.vcproj/WebCore.vcproj: Ditto.

WebCore.xcodeproj/project.pbxproj: Ditto.

WebCoreSources.bkl: Ditto.

page/JavaScriptDebugListener.h: Added.

page/JavaScriptDebugServer.cpp: Added.
(WebCore::toFrame):
(WebCore::JavaScriptDebugServer::shared):
(WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
(WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
(WebCore::JavaScriptDebugServer::addListener): Registers as the
debugger for all Pages if we're adding our first listener.
(WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
debugger for all Pages if we're removing our last listner.
(WebCore::JavaScriptDebugServer::pageCreated): Registers as the
debugger for the newly created Page if we have any listeners.
(WebCore::dispatchDidParseSource): Helper function.
(WebCore::dispatchFailedToParseSource): Ditto.
(WebCore::JavaScriptDebugServer::sourceParsed): Call
dispatchDidParseSource or dispatchFailedToParseSource depending on
whether there was an error or not.
(WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
the passed-in JavaScriptExecutionCallback on each listener, guarding
against re-entry.
(WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
(WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
(WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
(WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.

page/JavaScriptDebugServer.h: Added.

page/Page.cpp:
(WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were
created so it can register as our debugger if needed.

WebKit/win:

Change WebScriptDebugServer to use WebCore::JavaScriptDebugServer

WebScriptDebugServer is now a JavaScriptDebugListener.

Reviewed by Darin.

WebScriptDebugServer.cpp:
(WebScriptDebugServer::WebScriptDebugServer): Removed initialization
of m_callingListeners member.
(WebScriptDebugServer::addListener): Register as a listener with
JavaScriptDebugServer if we've just added our first listener.
(WebScriptDebugServer::removeListener): Deregister as a listener with
JavaScriptDebugServer if we've just removed our last listener.
(WebScriptDebugServer::didParseSource): Added. Code came from the old
sourceParsed method. Removed m_callingListeners code because
JavaScriptDebugServer guards against re-entry for us.
(WebScriptDebugServer::failedToParseSource): Ditto.
(WebScriptDebugServer::didEnterCallFrame): Ditto for callEvent.
(WebScriptDebugServer::willExecuteStatement): Ditto for atStatement.
(WebScriptDebugServer::willLeaveCallFrame): Ditto for
willLeaveCallFrame.
(WebScriptDebugServer::exceptionWasRaised): Ditto for exception.

WebScriptDebugServer.h: Changed to inherit from
WebCore::JavaScriptDebugListener.

WebView.cpp:
(WebView::initWithFrame): Removed call to
WebScriptDebugServer::pageCreated. This is now handled by WebCore.

fix a theoretical problem with the visited-link hash table by avoiding collision
with the special "deleted" value

improve efficiency of with the visited-link hash table by not hashing twice

page/PageGroup.cpp:
(WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
value, since the hash table uses that for deleted hash table entries.
(WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
value with the HashSet.
(WebCore::PageGroup::addVisitedLink): Ditto.

page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
values. This assumes that the value is already a hash value, and doesn't try to
hash it again. Used this for m_visitedLinkHashes.

... but only if there is no overriding declaration of "eval" in scope.

All other invocations treat eval as a function that evaluates a
script in the context of its "this" object.

... but if its "this" object is not the global object it was
originally associated with, eval throws an exception.

Because only expressions of the form "eval(s)" have access to local
scope, the compiler can now statically determine whether a function
needs local scope to be dynamic.

kjs/nodes.h: Added FunctionCallEvalNode. It works just like
FuncationCallResolveNode, except it statically indicates that the node
may execute eval in the ES3 way.

kjs/nodes.cpp:

kjs/nodes2string.cpp:

tests/mozilla/expected.html: This patch happens to fix a Mozilla JS
test, but it's a bit of a pyrrhic victory. The test intends to test
Mozilla's generic API for calling eval on any object, but, in reality,
we only support calling eval on the global object.

LayoutTests:

Reviewed by Darin Adler.

Tests for <rdar://problem/5689093> Stricter (ES4) eval semantics

fast/js/eval-cross-window-expected.txt: Added.

fast/js/eval-cross-window.html: Added.

fast/js/eval-keyword-vs-function-expected.txt: Added.

fast/js/eval-keyword-vs-function.html: Added.

fast/js/eval-overriding-expected.txt: Added.

fast/js/eval-overriding.html: Added.

Tests to make sure not to regress security:

http/tests/security/resources/xss-eval2.html: Added.

http/tests/security/resources/xss-eval3.html: Added.

http/tests/security/xss-eval-expected.txt: Added.

http/tests/security/xss-eval.html: Added.

I removed these tests because we no longer match the behavior they
expected, and the new tests are more comprehensive:

page/PageGroup.cpp:
(WebCore::PageGroup::addVisitedLink): Do nothing and return early
if shouldTrackVisitedLinks is false.
(WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
so the next time a link is queried this will be populated from history.
(WebCore::PageGroup::setShouldTrackVisitedLinks): Added.

page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
for now, but it would be better if it was per-page-group instead.

WebKit/mac:

Reviewed by Mitz.

fix regression test failures from the visited-link change

History/WebHistory.mm:
(+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks
to turn off visited links if there is no history object. Also call
removeAllVisitedLinks so we can start over from scratch with the new history.

WebHistory.cpp:
(WebHistory::setOptionalSharedHistory): Call PageGroup::setShouldTrackVisitedLinks
to turn off visited links if there is no history object. Also call
removeAllVisitedLinks so we can start over from scratch with the new history.

html/HTMLDocument.cpp:
(WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused.
(WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames).

DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webViewFocus:]): Remove duplicate code that was also in LayoutTestController::setWindowIsKey
(-[UIDelegate webViewUnfocus:]): Added. In Safari, the default is to focus another window if there is one.
To easily test cases where the window is unfocused, I made this just call setWindowIsKey(false).

rendering/bidi.cpp:
(WebCore::checkMidpoints):
(WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the
midpoint after a hyphen always be a valid iterator, not allowing an
offset past the end of a text node. Changed the check for consecutive
soft hyphens to account for that.

LayoutTests:

Reviewed by Darin Adler.

test and updated results for <rdar://problem/5741981> 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage)

css/CSSStyleSelector.cpp: Updated includes.
(WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set
currentEncodedURL.
(WebCore::checkPseudoState): Moved most of the code inside a new
PageGroup::isLinkVisited function.
(WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using
references and only getting colors when needed.
(WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.

loader/FrameLoader.cpp:
(WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use
early exit idiom to be a little more readable.
(WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly
better efficiency.
(WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more
readable.
(WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back
in here and got rid of the helper function updateGlobalHistory, restoring the
logic before r30549. Also added a call to the new addVisitedLink function.
(WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call
addVisitedLink here.
(WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment.
(WebCore::FrameLoader::updateHistoryForReload): Removed call to
updateGlobalHistory; we can just go without updating global history or
visited links here, at least for now, since it's not clear that a reload
is a "history event".
(WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved
history code back where it was, and added the call to addVisitedLink, just
as in updateHistoryForStandardLoad above.

loader/FrameLoader.h: Removed updateGlobalHistory function.

page/Chrome.cpp:
(WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we
don't have to implement this for every port all at once.
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the
new PageGroup class.

page/ChromeClient.h: Added populateVisitedLinks function, used to fill the
visited links set from the global history at application startup time.

page/FrameTree.cpp:
(WebCore::FrameTree::find): Updated to use the new PageGroup class.

page/GlobalHistory.h: Removed.

page/win/GlobalHistoryWin.cpp: Removed.

page/mac/GlobalHistoryMac.mm: Removed.

platform/mac/WebCoreHistory.h: Removed.

platform/mac/WebCoreHistory.m: Removed.

platform/win/WebCoreHistory.cpp: Removed.

platform/win/WebCoreHistory.h: Removed.

page/Page.cpp:
(WebCore::Page::Page): Set m_group to 0.
(WebCore::Page::setGroupName): Set up m_group. If the page is not in any
group, set it to 0 for now to postpone the cost of creating a group.
(WebCore::Page::initGroup): Added. Sets m_group to point to a single-page
group; used when getting a group.
(WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks
on all page groups.

page/Page.h: Moved enums inside the WebCore namespace. Removed the
frameNamespace function and instead added the group and groupPtr functions.

page/PageGroup.cpp: Added. Contains all the visited code from the
CSSStyleSelector in the isVisitedLink function, but more efficient because
we don't allocate memory for the buffer.

History/WebHistory.mm: Moved WebHistoryPrivate inside this file.
(-[WebHistoryPrivate removeItemFromDateCaches:]): Removed the underscore from this
method name, since it's on a private object.
(-[WebHistoryPrivate removeItemForURLString:]): Added a call to the
PageGroup::removeAllVisitedLinks function if the last URL was removed.
(-[WebHistoryPrivate addItemToDateCaches:]): Removed the underscore from this
method name, since it's on a private object.
(-[WebHistoryPrivate removeAllItems]): Call PageGroup::removeAllVisitedLinks.
(-[WebHistoryPrivate ageLimitDate]): Removed the underscore from this
method name, since it's on a private object.
(-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
Ditto.
(-[WebHistoryPrivate saveHistoryGuts:URL:error:]): Ditto. Also changed this
to correctly return the error by using the newer version of writeToURL: and
removed the FIXME about that.
(-[WebHistoryPrivate addVisitedLinksToPageGroup:]): Added. Calls addVisitedLink
for every link in the history.
(-[WebHistory saveToURL:error:]): Removed the FIXME, since we do get the error now.
(-[WebHistory addItem:]): Moved into the WebPrivate category.
(-[WebHistory addItemForURL:]): Ditto.
(-[WebHistory _addItemForURL:title:]): Added. Used for the normal case where we
create an item and already know its title.
(-[WebHistory ageLimitDate]): Moved into the WebPrivate category.
(-[WebHistory containsItemForURLString:]): Ditto.
(-[WebHistory removeItem:]): Ditto.
(-[WebHistory setLastVisitedTimeInterval:forItem:]): Ditto.
(-[WebHistory _itemForURLString:]): Ditto.
(-[WebHistory _addVisitedLinksToPageGroup:]): Added. For use only inside WebKit.

History/WebHistoryInternal.h: Added.

History/WebHistoryItemInternal.h: Tweaked formatting and includes.

History/WebHistoryPrivate.h: Moved the WebHistoryPrivate class out of this header.
Also reorganized what was left behind.

WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks.

WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::populateVisitedLinks): Added a call to the new
-[WebHistory _addVisitedLinksToPageGroup:] method.

WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory): Changed code to use the new
-[WebHistory _addItemForURL:title:] method.

WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::populateVisitedLinks): Added a call to the new
WebHistory::addVisitedLinksToPageGroup function.

WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks.
Also fixed the webView function to be non-virtual.

WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::updateGlobalHistory): Changed to use the
new WebHistory::addItem function.
(WebFrameLoaderClient::webHistory): Changed to return a WebHistory*,
there's no reason to AddRef the result from this function.

WebCoreSupport/WebFrameLoaderClient.h: Ditto.

WebHistory.cpp: Removed IWebHistoryPrivate and _WebCoreHistoryProvider.
(WebHistory::QueryInterface): Removed IWebHistoryPrivate.
(sharedHistoryStorage): Added.
(WebHistory::sharedHistory): Added.
(WebHistory::optionalSharedHistory): Changed to use sharedHistory().
(WebHistory::setOptionalSharedHistory): Changed to require a WebHistory
object, not just an IWebHistory.
(WebHistory::removeAllItems): Call PageGroup::removeAllVisitedLinks.
(WebHistory::addItem): Changed parameter types since this is called with
arguments from WebCore -- at some point this could allow better efficiency.
(WebHistory::removeItemForURLString): Call PageGroup::removeAllVisitedLinks
if the last URL is being removed.
(addVisitedLinkToPageGroup): Added. Helper. Adds a single link to a group's
visited link set.
(WebHistory::addVisitedLinksToPageGroup): Added. Adds all links to a group's
visited link.

WebKit.xcodeproj/project.pbxproj: Remove
WebScriptDebugDelegatePrivate.h from the project.

WebKit/mac:

Remove WebScriptDebugger

Uses of WebScriptDebugger have been replaced with
WebCoreScriptDebuggerImp.

Reviewed by Kevin M.

WebView/WebFrame.mm:
(-[WebFramePrivate dealloc]): Use delete instead of release since
WebCoreScriptDebuggerImp is a C++ class.
(-[WebFrame _attachScriptDebugger]): Updated to use early returns and
WebCoreScriptDebuggerImp.
(-[WebFrame _detachScriptDebugger]): Ditto.

(WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Removed
now-unnecessary initialization of m_topCallFrame.
(WebCoreScriptDebuggerImp::callEvent): Replaced call to enterFrame:
with its implementation. The one difference between this
implementation and the old enterFrame: method is that we don't hand
our reference to m_topCallFrame to _initWithGlobalObject: -- that
method must now retain the passed-in WebScriptCallFrame manually.
(WebCoreScriptDebuggerImp::atStatement):
(WebCoreScriptDebuggerImp::returnEvent): Replaced call to leaveFrame
with its implementation.
(WebCoreScriptDebuggerImp::exception):