Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".

As the comment in FeatureDefines.xcconfig notes, the list of feature defines
needs to be kept in sync across the various files. The default values also
need to be kept in sync between these files and build-webkit.

Top-level test drivers for running the Chromium port of run-webkit-tests
and being able to rebaseline test results from the test bots. The
files in the Scripts directory are simply wrappers around the files
in webkitpy/layout_tests for convenience.

Check in the first part of the Chromium Python port of the
run-webkit-tests test driver. The files under
layout_tests/layout_layout constitute most of the implementation;
they can be roughly divided into code that parses the
"test_expectations.txt" file that describes how we expect tests to
pass or fail, platform-specific hooks for the different Chromium
ports (in platform_utils*), code for parsing the output of the
tests and generating results files and HTML and JSON for the
dashboards, auxiliary scripts for starting and stopping HTTP and
Web Socket servers, and then one of the actual driver files
(test_shell_thread). Code for actually parsing test output for
failures and the top-level driver scripts will follow shortly.

scripts to start and stop apache. Note that the apache file
generates a conf file dynamically, and we should switch to
using the same static conf file that the regular run-webkit-tests
uses, and we can also use the same httpd2.pem file.

Add a preference in WebKit (that defaults to false), for whether or not
we should show the custom cursors during drag and drop. However, this is
currently only used on Windows, and only used to hide the "drop not allowed"
icon inside the WebView is the preference is set to true.

We probably shouldn't be deferring loads below modal dialogs and alerts, because that's not
what being modal means. But making such a change for general Web content would require fixes
in other parts of code, which I'm not ready to implement right now, so making it application
specific.

WebCore:

page/Page.cpp: (WebCore::Page::setDefersLoading): Do nothing if load deferring is not
enabled in page settings.

page/Geolocation.cpp:
(WebCore::Geolocation::startRequest): Pass notifier instead of options to startUpdating.
(WebCore::Geolocation::setIsAllowed): Add the observer or notify of error for deferred startUpdating.
(WebCore::Geolocation::startUpdating): Pass notifier instead of options, since we may need to call it if we fail to get user consent.
Defer adding the observer if we don't yet have user consent, since this could kick off
server-based wifi Geolocation requests.

(AccessibilityRenderObject::document):
Null check m_renderer. This is the bug fix; the other changes in the
patch are for the test.

accessibility/win/AXObjectCacheWin.cpp:

(WebCore::AXObjectCache::postPlatformNotification):
Map AXValueChanged to EVENT_OBJECT_VALUECHANGED, so we'll post a
notification when AXValueChanged is posted. Receiving an event of this
type tells us that the test passed.

WebKit/win:

AccessibleBase.cpp:

(AccessibleBase::QueryService):
If an unrecognized service ID is passed, return early. Otherwise, return
the result of QueryInterface.
(AccessibleBase::QueryInterface):
Add static_casts. Check for new UUIDs.
(AccessibleBase::isSameObject):
Query the object for AccessibleBase. Return whether the pointers or the
wrapped objects match.

AccessibleBase.h:

Give the class a UUID so we can query for it in isSameObject(). Inherit
from IAccessibleComparable; inherit from IServiceProvider so clients can
use QueryService to query for a custom interface.

Interfaces/AccessibleComparable.idl: Added. Declares a function that

can be called to compare to accessible objects.

Interfaces/WebKit.idl:

Include the new IDL.

WebKit.vcproj/Interfaces.vcproj:

Add the new IDL to the project.

WebKitTools:

DumpRenderTree/AccessibilityController.h:

Declare new functions. Add new members to store the event hook and the
mapping of accessibility elements to their JS callbacks.

(AccessibilityController::AccessibilityController):
Initialize the event hook.
(AccessibilityController::~AccessibilityController):
Remove the event hook. Unprotect all of the JS functions that are stored
in the map.
(logEventProc):
Clean-up a variable.
(stringEvent):
Return a string description of the MSAA event code.
(notificationListenerProc):
Get the accessible object from the event, and query it for IAccessible.
Call the AccessibilityController's notificationReceived().
(comparableObject):
Use QueryService to obtain the IAccessibleComparable for the
IServiceProvider.
(AccessibilityController::notificationReceived):
Iterate the map of objects that have registered for notification
callbacks. Query each for IServiceProvider, then use comparableObject()
to get an IAccessibleComparable. If we find an object matching the
notified object, call its callback, passing the event that was received.
(AccessibilityController::addNotificationListener):
If we have not created the event hook, create it. Protect the JS
callback function object, and add the object and its callback to our
map.

DumpRenderTree/win/AccessibilityUIElementWin.cpp:

(AccessibilityUIElement::addNotificationListener):
Call through to the AccessibilityController's addNotificationListener().

DumpRenderTree/win/DumpRenderTreeWin.h:

Add an extern declaration for the shared FrameLoadDelegate extern, so we
can access it from AccessibilityController.

Add a function on the ChromeClient that WebCore can use to inform the platform when it needs touch events. This way the platform can optimise by not forwarding the events if they are not required.

No new tests as the only implementation is specific to Android.

dom/Document.cpp:
(WebCore::Document::detach): Check if this is the top level document and if so, stop forwarding touch events.
(WebCore::Document::addListenerTypeIfNeeded): Inform the ChromeClient it should start forwarding touch events and guard touch event code properly.

history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore): If the document uses touch events, inform the ChromeClient to start forwarding them.
(WebCore::CachedFrame::CachedFrame): If the document uses touch events, inform the ChromeClient to stop forwarding them, as the document is being put into the page cache.

PainterOpenVG provides painter state management that works
on a single (EGL) context, and apart from painter state
implements a single drawing operation (for now), drawRect().

It is a generic painter class that cooperates with
SurfaceOpenVG to enable robust surface/context switching
(given that EGL doesn't notify us if somebody switches
the surface/context behind our backs), and provides
painting operations close to OpenVG's way of working
that GraphicsContext, Path, Image, Font and other WebKit
platform classes can use to draw on.

Initial code for state management and OpenVG scissoring by
Eli Fidler <​efidler@rim.com>. VGRect/VGMatrix and the bulk
of the transformations code by Adam Treat <​atreat@rim.com>.
Preliminary drawFocusRing() implementation by Yong Li <​yoli@rim.com>.

[wx] Build fix for MSW, use ThreadingWin.cpp as the Windows pthreads implementation
implements pthread_t in a way that makes it impossible to check its validity,
which is needed by ThreadingPthreads.cpp.

Added handling of 'CanBeConstructed' and 'OmitConstructor' and a new extended attribute
CustomConstructor'.

Deleted implementation .cpp files for corresponding 'CanBeConstructed'
extended attributes. These are now generated via CodeGeneratorV8.pm
Treating 'OmitConstructor' and 'CustomConstructor' to be the same in
CodeGeneratorJS.pm
Cleaned idls that had 'CustomConstructor' and 'OmitConstructor' together, and
same with CustomConstructor and CanBeConstructed.

Android.v8bindings.mk:

WebCore.gypi: Removed deps for classes being generated.

bindings/scripts/CodeGeneratorJS.pm: OmitConstructor and CustomConstructor have the same behavior in generator.

bindings/scripts/CodeGeneratorV8.pm: Generating the callbacks for constructors.

bindings/v8/custom/V8XPathEvaluatorConstructor.cpp: Deleted the file. Implementation now being generated.

bindings/v8/custom/V8XSLTProcessorCustom.cpp: Deleted the file. Implementation now being generated.
(WebCore::V8XSLTProcessor::constructorCallback): Deleted the file. Implementation now being generated.

The performance of the plain text paste is now linear.
We treat as a special case, a fragment that has been
created from plain text. Finding VisiblePositions and
applying style is greatly simplified, given the nature of
the fragment.

editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::doApply):

editing/markup.cpp:

(WebCore::isPlainTextMarkup):

editing/markup.h:

WebKit/mac:

Mail is ignoring the fragment created from plain text or HTML that is
passed to the delegate function, that creates a new one.
This fix avoids creating the fragment twice.

platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
(WebCore::mediaPlayerPrivateSourceChangedCallback):
When using an appropiate GStreamer HTTP source element, pass
the cookies for the media URI to it. This fixes playback of
the YouTube HTML5 videos.

A class must now specify the number of slots it needs at construction time
rather than later on with a transition. This makes many things simpler,
we no longer need to need an additional transition on object creation to
add the anonymous slots, and we remove the need for a number of transition
type checks.

Google translate takes a base URL as a parameter, causing a false
positive in the XSS filter. This patch removes the false positive by
allowing direct injections into the href property of the base tag.

notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::NotificationCenter):
(WebCore::NotificationCenter::checkPermission):
Pass the full URL and document from the requesting context when calling
NotificationPresenter::checkPermission().

When the scroll position changes, and we're using overlap to decide what gets composited,
then we need to re-evaluate what gets compositing when scrolling in case fixed postion elements
overlap composited elements (e.g. video).

Test: compositing/geometry/video-fixed-scrolling.html

page/FrameView.cpp:
(WebCore::FrameView::updateCompositingLayers):
(WebCore::FrameView::scrollPositionChanged): Annotate the calls to updateCompositingLayers()
with the type of change that occurred.

rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers): For scroll changes, check
for hierarchy update if m_compositingConsultsOverlap is true, and do
a geometry update. For other changes, always check for hierarchy updates.

Fix for user stylesheet bugs where they get parsed using the wrong compatibility mode. This was a regression
caused from Safari 3 -> 4 by the Acid3 fixes to create a real DOCTYPE in the DOM.

Reviewed by Darin Adler.

This patch makes style selector creation lazy, so that the selector isn't built unless someone asks for it.

In order to avoid creating the style selector before the compatibility mode has been determined, document
style is now created without having a dependence on an instantiated style selector. The creation of the style
is now done as a static method on CSSStyleSelector called styleForDocument, and a couple of font-related
functions have been made static as well so that they can be used by this method.

The WebCore::String::utf8 method will use the generic WebCore::TextCodec
and then call the encode method on it. In QtWebKit this class is implemented
around the QTextCodec class. Instead of going the generic codec way we treat
the WebCore::String as a QString (no copying) and then use the built-in
QString::toUtf8 to do the conversion.

The pageX/pageY co-ordinates of a touch event should be relative to the containing frame, not the main frame. This change implements that and also updates the existing touch-inside-iframe test to also examine the page co-ordinates.

dom/Touch.cpp:

(WebCore::Touch::Touch): Remove dead code.

dom/Touch.h: Remove dead code.

page/EventHandler.cpp:

(WebCore::EventHandler::handleTouchEvent): Rename framePoint to pagePoint, as it seems a clearer name. Also adjust the pagePoint to be relative to the touch target element's containing frame rather than the main frame.

Add DATE type support to rangeUnderflow(), rangeOverflow(),
minimum(), and maximum() of HTMLInputElement.
In order to unify parsing code for value, min, and max strings,
introduce parseToDouble() function and it is called by
valueAsDate() and valueAsNumber() too.

Make ScriptValue deserialisation support the provision of a specific global
object to use when creating new objects. This then allows us to make
MessageEvent.data and PopStateEvent.state deserialize in the correct
context.

Revert r45496 -- once we've got a glyph array, it is too late to normalize
because we could have had multiple codepoints combine into one glyph. The
Uniscribe code it mentions it's duplicating uses the log cluster map to fix
this.

Instead, we just normalize the input text if it contains any non-ascii-space
whitespace.

This fixes fast/text/international/hindi-whitespace, which currently has an
incorrect baseline containing a square box glyph.

It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
is just its value, it is very unlikely that any observable problem is reproducible.

This extends hash table consistency checks to check that pointers are referencing allocated
memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).

wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
with those yet.

wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().

wtf/HashTable.h:
(WTF::HashTable::internalCheckTableConsistency):
(WTF::HashTable::internalCheckTableConsistencyExceptSize):
(WTF::HashTable::checkTableConsistencyExceptSize):
Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
(WTF::::add): Updated for checkTableConsistency renaming.
(WTF::::addPassingHashCode): Ditto.
(WTF::::removeAndInvalidate): Ditto.
(WTF::::remove): Ditto.
(WTF::::rehash): Ditto.
(WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
function returns true for tables with m_table == 0.
(WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
we could do the same for values.

wtf/HashTraits.h:
(WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
to add checks. Currently, the only override is for pointer hashes.

Replace HistoryItem's Document pointer with a DocumentSequenceNumber.
During session history traversal, if the current HistoryItem and the
target HistoryItem have the same DocumentSequenceNumber, then it means
that the current Document should remain.

NOTE: To support Chromium's serialization of HistoryItems, I generate
DocumentSequenceNumbers that are unique across application launches.
DocumentSequenceNumbers are generated using a counter initialized with
the time of day.

Implement a version of the RenderImage animated scaling optimisation
for background images. Due to the possibility of arbitrary transforms
being applied to containing elements we explicitly check the current
CTM of the context for scaling or rotation.

Connected between SocketStreamHandle and QTcpSocket/QSslSocket
to enable support for websockets.
Proxy authentication is not yet supported.
SSL certificate errors are ignored while this is under development.

Instead of relying on Object.prototype.toString result use JSObject::isActivationObject
to check if a scope node is a JSActivation. Object.prototype.toString for JSActivation
will call JSActivation::toThisObject whose result depends on the current call stack.

Fix a crash when trying to indent a block element that was contained
in a list. This was happening because enclosingBlock() in
htmlediting.cpp can return the current the same Node when a block
element (like an <hr> or a <table>) is passed in. This causes
the indent command to think that it is not in a list item.

Work around this by checking to see if enclosingBlock returned the
same Node.

Fix a crash when trying to indent a block element that was contained
in a list. This was happening because enclosingBlock() in
htmlediting.cpp can return the current the same Node when a block
element (like an <hr> or a <table>) is passed in. This causes
the indent command to think that it is not in a list item.

Work around this by checking to see if enclosingBlock returned the
same Node.

Cache media duration and fix didEnd() in case of reverse
playback. When EOS was reached but in case of reverse playback the
position is not always 0. So to not confuse the HTMLMediaElement
we synchronize position and duration values.

01/26/10:

Unreviewed. Made a minor typo when I added the test case fast/css/button-height.html
to the GTK Skipped file. In changeset 53900, I added test "fast/css/button-height.htm"
to the GTK Skipped file instead of "fast/css/button-height.html". See bug #33936
for more details.

win/tools/vsprops/common.vsprops: Disable warning C4180 (qualifier applied to function
type has no meaning; ignored). This is a known bug - MSVC tries to compile a wrong
specialization sometimes - but it's not instantiated, so it's harmless.

Unreviewed. Updated expected failing results for table-percent-height.html
to reflect one pixel difference between the results generated by the Qt bot
and my machine. Added failing test fast/css/button-height.html to GTK Skipped
file as we need to look into this. See bug #33936 for more details.

It is very difficult to catch stale pointers that are HashMap keys - since a pointer's hash
is just its value, it is very unlikely that any observable problem is reproducible.

This extends hash table consistency checks to check that pointers are referencing allocated
memory blocks, and makes it possible to invoke the checks explicitly (it is not feasible
to enable CHECK_HASHTABLE_CONSISTENCY by default, because that affects performance too much).

wtf/HashMap.h: (WTF::::checkConsistency): Call through to HashTable implementation. We can
add similar calls to HashSet and HashCountedSet, but I haven't seen hard to debug problems
with those yet.

wtf/HashSet.h: (WTF::::remove): The version of checkTableConsistency that's guarded by
CHECK_HASHTABLE_CONSISTENCY is now called internalCheckTableConsistency().

wtf/HashTable.h:
(WTF::HashTable::internalCheckTableConsistency):
(WTF::HashTable::internalCheckTableConsistencyExceptSize):
(WTF::HashTable::checkTableConsistencyExceptSize):
Expose checkTableConsistency() even if CHECK_HASHTABLE_CONSISTENCY is off.
(WTF::::add): Updated for checkTableConsistency renaming.
(WTF::::addPassingHashCode): Ditto.
(WTF::::removeAndInvalidate): Ditto.
(WTF::::remove): Ditto.
(WTF::::rehash): Ditto.
(WTF::::checkTableConsistency): The assertion for !shouldExpand() was not correct - this
function returns true for tables with m_table == 0.
(WTF::::checkTableConsistencyExceptSize): Call checkValueConsistency for key. Potentially,
we could do the same for values.

wtf/HashTraits.h:
(WTF::GenericHashTraits::checkValueConsistency): An empty function that can be overridden
to add checks. Currently, the only override is for pointer hashes.

[Qt] Fixes an issue where the height of <button>- and
<input type="button">- elements are fixed to the height of the
button label font plus padding. That is, the CSS height property
is being ignored.

Instead, we should honor the user-specified height, if appropriate
for the platform and context. Notice, the Mac ports do not honor the
height for <input type="button"> elements unless a border and/or
background is also specified.

Moves the try/catch for OSError exceptions in Executive.run_command
to Credentials.read_credentials() so that the unit test
webkitpy.scm_unittest.SCMClassTests.test_error_handlers can
assert that Executive.run_command throws an OSError exception.

Scripts/webkitpy/credentials.py:

Scripts/webkitpy/executive.py: Moved try/catch for OSError to
method Credentials.read_credentials().

Scripts/webkitpy/executive_unittest.py: Removed tests that no longer
apply: test_run_command_with_bad_command_check_return_code and
test_run_command_with_bad_command_check_calls_error_handler. Added new
test to assert that run_command throws OSError exceptions.

html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::valueAsNumber):
According to the specification, we should return NaN for invalid values.
(WebCore::HTMLInputElement::setValueAsNumber):
According to the specification, throws NOT_SUPPORTED_ERR for Infinitiy or NaN,
and throws INVALID_STATE_ERR for unsupported types.
(WebCore::HTMLInputElement::formStringToDouble):
According to the step 14 of Real Number in the specification, we
should round -0 to 0.

Remove listbox-deselect-scroll.html and listbox-selectio-2.html
from Skipped. We improved their portability and Windows DRT now
havs modifiers parameter of eventSender.mouseDown() and
eventSender.mouseUp().

Add support for functional name modifiers; "addSelectionKey" and
"rangeSelectionKey", and modifiers parameter to eventSender.mouseDown()
and eventSender.mouseUp().
This change is similar to r53498 for Mac.

DumpRenderTree/win/EventSender.cpp:
(buildModifierFlags): New function to set MK_CONTROL or MK_SHIFT to WPARAM.
(mouseDownCallback): Call buidlModifiersFlags().
(mouseUpCallback): ditto.
(keyDownCallback): Add support for "addSelectionkey" and "rangeSelectionKey".

Shrink WebCore library size to 75% (measured in debug builds) and reduce SVG memory usage to <25%.
Adding Oliver testcase as manual-tests/svg-node-count-vs-scroll.xhtml, which creates an arbitary number of
rects (50.000 <rect> elements added to the DOM by default) - memory usage down to 111M from 503M (RPRVT).
The SVG DOM side is almost fine, still some optimizations possible, that will be implemented soon - next
target is the SVG render tree, there are plenty of possibilities to reduce memory usage there.

Redesign the way we store animated properties in the individual SVG*Element files. Short story: In order
to support SVG DOM through the bindings (e.g. JS) we need to associate SVGAnimatedProperty objects with
the SVGElement object that created it - we used to store this pointer directly in the SVGAnimatedProperty.
This means, every SVGAnimatedProperty stored in a SVGRectElement, stored a pointer to the SVGRectElement, resulting
in excessive memory usage. This is now properly implemented, without wasting tons of memory. Unfortunately this
requires touching all SVG*Element files.

Detailed list of changes:

Remove template bloat by not specializing class templates for each attributeName/tagName combination. Instead
SVGAnimatedProperty is a non-specialized template class now, only depending on the AnimatedType (ie. SVGLength for SVGAnimatedLength)
-> This heavily reduces the generated code, thus shrinking WebCore size. I hope we can build windows again without SVGAllInOne.cpp

Remove "exportStrings" / "exportString" handling from make_names.pl - SVG defined string literals for each QualifiedName,
in order to use template specialization based on "const char*" parameters. All that bloat is gone, so there's no need for it anymore.

Redesign SVGAnimatedProperty so it does not need any back-pointers to the SVGElement that created it

Don't actually store the XML DOM attribute name associated with a SVG DOM property in SVGAnimatedProperty, move the associatedAttributeName()
function inside the macro declaration and just return the passed macro parameter DOMAttribute there, storing is inefficient and useless.

Remove SynchronizablePropertyController, which was living in SVGElement as member variable, keeping a HashMap<AttributeName, SVGAnimatedProperty>.
It was needed before to lookup a SVGAnimatedProperty for a XML DOM attribute, in order to synchronize SVG <-> XML dom properties/attributes.
Instead just add a "synchronizeProperty(const QualifiedName&)" method to all SVG*Element classes. As each SVG*Element class knows about its
animated properties it can just ask them to synchronize themselves - no need for any dynamic lookups anymore.

Remove SynchronizableTypeWrapper which added more complexity for the sake of SVG <-> XML DOM synchronization, all replaced by synchronizeProperty.

Pass around any POD objects as const references, instead of copying them for no reason.

Clean up SVGAnimatedProperty, splitting up into SVGAnimatedProperty/PropertySynchronizer/PropertyTraits.

Enhance externalRepresentation() to output additional information about layers when certain flags are passed.
The new flags allow you to show all layers (not just those that would paint), to the structure of the z-order
and normal flow lists, and to show which layers are composited.

WebCore.base.exp: The signature of externalRepresentation() changed.

platform/text/TextStream.h: Add operator<<(void*)

platform/text/TextStream.cpp: Implement operator<<(void*)

rendering/RenderLayer.h:

rendering/RenderLayer.cpp:
(showLayerTree): New method outside the WebCore namespace, for ease of calling from gdb.

rendering/RenderTreeAsText.h: New behavior flags for externalRepresentation().

rendering/RenderTreeAsText.cpp:
(WebCore::write): Output compositing information if requested. Also clean up some -1/1 magic
numbers with an enum.
(WebCore::writeLayers): If requested, show layer nesting via the z-order and normal flow lists.
(WebCore::externalRepresentation): New arguments

Achieved by setting a flag on iframe element when it is a target of document.adoptNode(node) operation.
The flag prevents unload/load cycle and is reset once element is attached to a new document.
If iframe is adopted but not actually inserted into the tree, it gets unloaded by async timer
once JS yields, to avoid having active content in non-attached iframe.

Test: fast/frames/iframe-reparenting.html

dom/Document.cpp:

(WebCore::Document::adoptNode): If the adopted node is iframe, set a remainsAliveOnRemovalFromTree on it.

html/HTMLFrameElementBase.h:

html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
(WebCore::HTMLFrameElementBase::attach): Skip actual loading of the frame if it has remainsAliveOnRemovalFromTree flag. Reset the flag.
(WebCore::HTMLFrameElementBase::willRemove): Skip unloading the frame if it has remainsAliveOnRemovalFromTree flag set.
(WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree): Set the flag, start the async timer to check if the frame was actually attached.
(WebCore::HTMLFrameElementBase::checkAttachedTimerFired):

html/HTMLFrameOwnerElement.h:

(WebCore::HTMLFrameOwnerElement::willRemove): Move from private to protected, since it is conditionally called in HTMLFrameElementBase::willRemove now.

enclosingList() and previousListItem() were DOM-based, but in order to work with anonymous
list items, they need to work with rthe render tree.

rendering/RenderListItem.cpp:

(WebCore::isList): Factored out.
(WebCore::enclosingList): Added this variant that takes a RenderObject.
(WebCore::previousListItem): Changed to travers the render tree.
(WebCore::RenderListItem::calcValue): Use the RenderObject version of enclosingList()
(WebCore::RenderListItem::setExplicitValue): Added an assertion.
(WebCore::RenderListItem::clearExplicitValue): Ditto.

Added bounds checks in RenderMenuList to make sure we are
not making an out of bounds check in a vector once an option
element has been deleted. If we are out of bounds, we fall back to
a default value and return early, and in the case of itemStyle, we use a
previous option's style, if it is available.

manual-tests/select-delete-item.html: Added.

rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::itemText): If out of bounds check, return early.
(WebCore::RenderMenuList::itemToolTip): Ditto.
(WebCore::RenderMenuList::itemIsEnabled): Ditto.
(WebCore::RenderMenuList::itemStyle): If out of bounds check, try using the 0th index

option style, then fall back to the select's style if that option doesn't exist.

Replace HistoryItem's Document pointer with a DocumentSequenceNumber.
During session history traversal, if the current HistoryItem and the
target HistoryItem have the same DocumentSequenceNumber, then it means
that the current Document should remain.

NOTE: To support Chromium's serialization of HistoryItems, I generate
DocumentSequenceNumbers that are unique across application launches.
DocumentSequenceNumbers are generated using a counter initialized with
the time of day.

In r52152 a patch was landed to convert a null QString
to an empty WebCore::String in case the prompt was accepted
but the default implementation returned the null QString.

The patch tried to avoid assign to result twice and
was not checking the QString if it is null but the default
value. This lead to always returning an empty string on
successful prompts. Fix it by checking the variable 'x'
for isNull.

The manual test case used didn't cover the case of non
empty input, replace it with an automatic test case that
should cover all cases.

Add Qt specific result for this test that differs from the cross-platform
result in only one character: In htmlcontent.html the href attribute value
is ​http://www.cnn.com, which somehow becomes ​http://www.cnn.com/ in the cross
platform result. With the Qt xml parser that attribute is somehow preserved
and so our result does not have the trailing slash.

This meat of the patch I just posted is very simple. It's just making events
asynchronous, not posting them to the frame that generated them, passing a null
for the key when issuing a clear storage event, and making the events
non-cancelable/non-bubbleable...all of which are clearly stated in the spec.

The asynchronous and not posting to the frame that generated them forced me to
re-write all the layout tests that dealt with storage events. There's a lot of
code there, but I tried to be fairly careful to ensure that test coverage did
not shrink in any area.

This meat of the patch I just posted is very simple. It's just making events
asynchronous, not posting them to the frame that generated them, passing a null
for the key when issuing a clear storage event, and making the events
non-cancelable/non-bubbleable...all of which are clearly stated in the spec.

The asynchronous and not posting to the frame that generated them forced me to
re-write all the layout tests that dealt with storage events. There's a lot of
code there, but I tried to be fairly careful to ensure that test coverage did
not shrink in any area.

Instead of unconditionally allowing lines to break after a question mark, which was intended
to mimic Internet Explorer, apply the Unicode line breaking behavior after a question mark,
with one exception in the ASCII range to match IE, namely not allowing a line break between
a question mark and a vertical line.

rendering/break_lines.cpp:

(WebCore::shouldBreakAfter): Added a next character parameter. Changed to consult a table
for the question mark case in order to keep it fast and not require a text break iterator in
the ASCII case.
(WebCore::nextBreakablePosition): Pass the next character to shouldBreakAfter.

Fix Chromium Linux tests: the pthread functions on Linux produce segfault if they receive 0 thread handle.
After r53714, we can have 0 thread handles passed to pthread_join and pthread_detach if corresponding threads
were already terminated and their threadMap entries cleared.
Add a 0 check.

html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::insertedIntoTree): Remove incorrect
assertions added in the previous patch - it's mot true that m_for is always a parent; table
parsing can reparent the image element, but m_form still needs to be set.

html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::~HTMLImageElement): This is called during GC - not a good time
to make observable changes to DOM.
(WebCore::HTMLImageElement::insertedIntoTree): This is the right place to do any work that
depends on connectedness to some ancestor. We still allow for m_form to be set via constructor,
which happens during parsing.
(WebCore::HTMLImageElement::removedFromTree): Ditto.

html/HTMLImageElement.h: Added removedFromTree/insertedIntoTree, moved removedFromDocument
and insertedIntoDocument to private section, as they shouldn't be called directly.

Getting the style from the painter's paint device is a hack that breaks when
the paint device's style is different than the style that is used when
calculating the metries earlier when there is no painter available.