Timeline

02/13/08:

Fixes the editing/deleting/5729680.html failure. It succeeds when run by itself
but fails when run with other tests because FramePrivate's m_selectionGranularity
isn't reset when a Frame receives a new document. It was also uninitialized in
the constructor.

SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore.
SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from
CachedResourceClient itself, handling remote-image acquisation on its own.

SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself -
instead of storing the CachedImage in the CursorData class, as it's supposed to be.
Because of that several places in WebCore contain special SVG cursor handling - which
is unneeded.

DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(dumpDatabaseCallbacksCallback): Flag to control if the UIDelegate methods related to
databases are called
(clearAllDatabasesCallback): Allow a test to delete all databases
(setDatabaseQuotaCallback): Allow a test to set the quota new origins will get
(LayoutTestController::staticFunctions):

Rename PluginDatabase::createPluginView to PluginView::create, to make
the illogical dependency between the two, logical
Make PluginDatabase::findPlugin a public method
Update the includes in PluginView and PluginDatabase for the change

Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback

Layout tests will come shortly with a mess of DRT changes

platform/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
SecurityOrigin

Revised the system fallback font lookup logic to use MLang font linking
again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
for CJK characters, try linking based on a single code page at a time,
starting with the user's default code page (if it is one of the CJK
code pages) followed by the other CJK code pages in a prescribed order
that matches what Firefox does.

(WebCore::DatabaseTask::lockForSynchronousScheduling):
(WebCore::DatabaseTask::waitForSynchronousCompletion):
Fixed a potential race condition: if the task completed before we entered a wait, we'd never
wake up. There was an assertion guarding against this, but no actual guarantee that I could see.

storage/Database.h:
Changed m_transactionQueue to a MessageQueue.
Got rid of callback tracking - these can take care of themselves.
Got rid of a DatabaseThread member, as the Document can be asked for it.
Moved private static members and helpers out of the header.
Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.

storage/SQLTransaction.h:

storage/SQLTransaction.cpp: Added a lot of debug logging.
(WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
as it created a race condition. Everything seems to work better without it, although a real fix
would be to get rid of this variable - it's evil shared data that isn't even protected in any way.

In order to make the canvas implementation less platform dependent
(and thus reduce the current quagmire of ifdefs) we now use an
ImageBuffer to provide the backing buffer, an immediate consequence
of this is to remove multiple ifdefs in the construction of the
buffer. This patch allows us to further reduce the platform
dependencies in later patches.

Fixes for:
<rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
<rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it

Expose the native Object.prototype.toString implementation so that it can be used for cross-domain
toString calling.

Make the cross-domain security model more closely match Firefox by always returning the
native built-in functions when accessing functions cross-domain.

Fixes for:
<rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
<rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it

Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
function. This will help moving to a generated class in the future.
(WebCore::JSLocation::customGetOwnPropertySlot):

Implement the same model as described above for the Location object, always returning the
native built-in function cross-domain.

Clean up the code to make it clear that the custom functionality is only there for cross-domain
access.
(WebCore::JSLocation::put):
(WebCore::JSLocation::deleteProperty):
(WebCore::JSLocation::getPropertyNames):

Put common functionality related to cross-domain access here to serve as a central shared point.
This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
and JSLocation.cpp.

Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
than the index or shortcut name getters.

Cleanup function to make it more understandable and slightly more efficient.
(KJS::Window::allowsAccessFrom):

Add a new variant of this method that takes a reference to a String, which, on failure, will
contain the error message to print out. The caller can then pass this to printErrorMessage.
This allows for code to check allowsAccessFrom and act on the result without printing out the
error message. For convenience, a version with out the String parameter has been left which
prints out the message automatically.
(KJS::Window::printErrorMessage):

bindings/js/kjs_window.h:

LayoutTests:

Reviewed by Darin Adler.

Tests for:
<rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
<rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it

css/CSSMutableStyleDeclaration.cpp:
(WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
If you try to change the visibilty on a node with the class name tab_content,
instead it will use display:none.

page/Settings.cpp:
(WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
initialize m_fontRenderingMode! This seems like it was a bug before, but we
probably were getting lucky and always getting 0 on Windows, which is the
only place the setting matters.
(WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.

We no longer call Object.describe to format all the output of commands
enetered into the Console. The ConsolePanel object now has a set of
formatting functions that append a formatted representation of the
passed-in object to the passed-in container node.

Reviewed by Sam.

page/inspector/ConsolePanel.js:
(WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
_outputToNode to _format.
(WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
Object.type to get the type of the object, then call the appropriate
formatting function.
(WebInspector.ConsolePanel._formatvalue): Added.
(WebInspector.ConsolePanel._formatstring): Added. This function
contains the actual fix for the bug, since it doesn't truncate the
string no matter how long it is.
(WebInspector.ConsolePanel._formatregexp): Added.
(WebInspector.ConsolePanel._formatarray): Added. This is a bit more
functional than Object.describe for arrays, since it recursively
formats each item in the array. One advantage of this is that Nodes in
arrays will be linkified instead of just turning into "[Object
HTMLBodyElement]" or similar.
(WebInspector.ConsolePanel._formatnode): Added.
(WebInspector.ConsolePanel._formatobject): Added.
(WebInspector.ConsolePanel.

page/inspector/utilities.js:
(Object.type): Added. Code was pulled out of Object.describe and
reorganized slightly.
(Object.describe): Call Object.type. There should be no change in
behavior of this function.

fix a couple of directories that were using our JavaScript template/wrapper
system incorrectly

fast/dom/SelectorAPI/resources/TEMPLATE.html: Fixed relative paths.

fast/events/event-instanceof.html: Regenerating this file revealed that the path
to the stylesheet was wrong. Fixed by running the make-js-test-wrappers script.
Didn't affect the text-only results, but the test looked wrong in the browser.

02/09/08:

fix <rdar://problem/5725996> crash every time you open the Xcode documentation window

WebView/WebView.mm:
(-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Work around a bug in the
garbage collector's Objective C++ support by not initializing a static to an object
that needs to be marked when running under GC.

(1) Split the notion of being affected by positional rules into "forward" and "backward." The "forward"
selectors do not need to re-resolve during parsing, since children are appended on the end. Only the
"backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.

(2) Extend childrenChanged to specify whether the children were changed by the parser or not. This allows
Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
possible.

(3) Make sure all Elements now know whether or not their children are currently parsing. Backwards selectors
like last-child will always return false when children are still being parsed. When an Element finishes
parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.

(4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.

(5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.

(6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).