Optimize Element::getAttributeNode() by replacing String with AtomicString
https://bugs.webkit.org/show_bug.cgi?id=90274

Reviewed by Adam Barth.

Based on the observation described in this ChangeLog
(http://trac.webkit.org/changeset/121439), this patch optimizes
the performance of Element::getAttributeNode() by replacing String
with AtomicString.

Performance test: https://bugs.webkit.org/attachment.cgi?id=150147

getAttributeNode (Chromium/Linux):
375.20ms => 310.80ms

getAttributeNodeNS (Chromium/Linux):
684.40ms => 539.00ms

* dom/Element.cpp:
(WebCore::Element::getAttributeNode):
(WebCore::Element::getAttributeNodeNS):
* dom/Element.h:
(Element):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124972 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: PrettyPatchTest.test_pretty_diff_encodings has been failing on Chromium Windows
https://bugs.webkit.org/show_bug.cgi?id=93192

Unreviewed, build fix.

Disabling the test for now as PrettyPatch is just broken on win32.

* Scripts/webkitpy/common/prettypatch_unittest.py:
(test_pretty_diff_encodings):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test storage/indexeddb/intversion-omit-parameter.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=92952

Reviewed by Tony Chang.

Source/WebCore:

Account for events being propagated from the back-end to front-end after
front-end context is stopped (i.e. document is being destroyed). The IDBRequest
lifecycle was tightened up in http://trac.webkit.org/changeset/123275 with more
asserts but the stopped state wasn't accounted for.

Test: [chromium] webkit_unit_tests --gtest_filter='IDBRequestTest.EventsAfterStopping'

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::abort):
(WebCore::IDBRequest::onError):
(WebCore::IDBRequest::onSuccess):
(WebCore::IDBRequest::onSuccessWithContinuation):

Source/WebKit/chromium:

Added test to exercise WebCore::IDBRequest event callbacks after
the script context has stopped and ensure no asserts are hit.

* WebKit.gypi:
* tests/IDBRequestTest.cpp: Added.
(WebCore):
(WebCore::TEST):

LayoutTests:

Remove expectation now that flakiness should be resolved.

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't re-use the same EventDispatcher instance to dispatch events.
https://bugs.webkit.org/show_bug.cgi?id=93322

Reviewed by Dimitri Glazkov.

It is potentially dangerous to call
EventDispatcher::dispatchEvent(PassRefPtr<Event>) twice for the
same EventDispatcher instance.  Some member functions in
EventDispatcher assume that dispatchEvent(PassRefPtr<Event>) is
never called more than once in its life cycle.

For example, EventDispatcher::ensureEventAncestor never
recalculates ancestors of node even when
dispatchEvent(PassRefPtr<Event)) is called again with a different
event parameter.

A 'dblclick' event violates this rule. A 'dblclick' dispatching
reuses the same dispatcher instance.  So stop re-using the same
dispatcher and add ASSERT to make sure dispatchEvent() is never
called more than once.

No new tests, no change in functionality.

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::EventDispatcher):
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventDispatcher.h:
(EventDispatcher):
* dom/MouseEvent.cpp:
(WebCore::MouseEventDispatchMediator::dispatchEvent):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124975 268f45cc-cd09-0410-ab3c-d52691b4dbfc