EventDispatchBehavior is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=122483

Reviewed by Andreas Kling.

Removed EventDispatchBehavior and changed the return type of determineDispatchBehavior to bool.
Also renamed it to shouldEventCrossShadowBoundary to reflect the semantics more clear.

* dom/EventRetargeter.cpp:
(WebCore::shouldEventCrossShadowBoundary):
(WebCore::EventRetargeter::calculateEventPath):
* dom/EventRetargeter.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Layout Test mathml/very-large-stretchy-operators.html is failing
https://bugs.webkit.org/show_bug.cgi?id=122490

* platform/mac/TestExpectations: Skipped the test. It's faiing with a timeout and
taking up to 80 seconds.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webaudio/javascriptaudionode-upmix2-8channel-input.html is flaky on Mac WK2
https://bugs.webkit.org/show_bug.cgi?id=120148

* platform/mac-wk2/TestExpectations: Updated expectations to cover debug assertions,
and that this is not limited to Lion.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webaudio/javascriptaudionode-upmix2-8channel-input.html is flaky on Mac WK2
https://bugs.webkit.org/show_bug.cgi?id=120148

* platform/mac-wk2/TestExpectations: Removed a duplicate expectation that I overlooked
at first. Note that having separate expectations for Debug and Release doesn't
appear to work.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change NetscapePluginInstanceProxy::m_replies to use unique_ptr instead of deleteAllValues
https://bugs.webkit.org/show_bug.cgi?id=122492

Reviewed by Andreas Kling.

* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::instantiatePlugin): Use auto so this works with
unique_ptr instead of auto_ptr.
* Plugins/Hosted/NetscapePluginHostProxy.mm:
(WKPCGetScriptableNPObjectReply): Use make_unique instead of using new directly.
(WKPCBooleanReply): Ditto.
(WKPCBooleanAndDataReply): Ditto.
(WKPCInstantiatePluginReply): Ditto.
* Plugins/Hosted/NetscapePluginInstanceProxy.h: Changed m_replies to map to unique_ptr
instead of to a raw pointer.
(WebKit::NetscapePluginInstanceProxy::setCurrentReply): Changed to take a unique_ptr
instead of a raw pointer since this takes ownership of the pointer.
(WebKit::NetscapePluginInstanceProxy::waitForReply): Changed to return a unique_ptr
instead of a auto_ptr because that's better. Use unique_ptr inside the function
too to avoid the need for an explicit delete.
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy): Removed the call to
deleteAllValues.
(WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Removed unneeded initialization
of a local variable that was already set in all code paths.
(WebKit::NetscapePluginInstanceProxy::wheelEvent): Use auto so this works with unique_ptr
instead of auto_ptr.
(WebKit::NetscapePluginInstanceProxy::print): Ditto.
(WebKit::NetscapePluginInstanceProxy::snapshot): Ditto. Ditto.
(WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): Changed to return
a unique_ptr. Also removed an unneeded assertion.
(WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Use auto so this works
with unique_ptr instead of auto_ptr.

* Plugins/Hosted/ProxyInstance.h: Changed return type of waitForReply to unique_ptr.

* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::invoke): Use auto so this works with unique_ptr instead of auto_ptr.
(WebKit::ProxyInstance::supportsInvokeDefaultMethod): Ditto.
(WebKit::ProxyInstance::supportsConstruct): Ditto.
(WebKit::ProxyInstance::getPropertyNames): Ditto.
(WebKit::ProxyInstance::methodNamed): Ditto.
(WebKit::ProxyInstance::fieldNamed): Ditto.
(WebKit::ProxyInstance::fieldValue): Ditto.
(WebKit::ProxyInstance::setFieldValue): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove use of deleteAllValues in NPRemoteObjectMap::pluginDestroyed
https://bugs.webkit.org/show_bug.cgi?id=122496

Reviewed by Andreas Kling.

* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::registerNPObject): Don't call release when putting objects
into the map.
(WebKit::NPRemoteObjectMap::pluginDestroyed): Instead of making an array of receivers
and deleting them all, remove all of the receivers from the map, which will take care
of deleting them. Also change the other loop to use a similar coding style.

* Shared/Plugins/NPRemoteObjectMap.h: Change the value type of m_registeredNPObjects
to be unique_ptr instead of a raw pointer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] media/video-src-blob.html
https://bugs.webkit.org/show_bug.cgi?id=102586

Reviewed by Martin Robinson.

Source/WebCore:

Add support for loading videos using blob URLs.

Fixes media/video-src-blob.html.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart): Use BufferData buffering policy for blob
URLs.
(webKitWebSrcGetProtocols): Add blob to the list of supported
protocols.
(webKitWebSrcSetUri): Consider blob URLs as valid.

LayoutTests:

* platform/gtk/TestExpectations: Unskip
media/video-src-blob.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSSRegions] Move autosize and autowidth tests into fast/regions/auto-size
https://bugs.webkit.org/show_bug.cgi?id=122493

Reviewed by Andreas Kling.

Simple move, changed paths in 2 tests.

* fast/regions/auto-size/autosize-abspos-anchoredregion-expected.txt: Renamed from LayoutTests/fast/regions/autosize-abspos-anchoredregion-expected.txt.
* fast/regions/auto-size/autosize-abspos-anchoredregion-vertlr-expected.txt: Renamed from LayoutTests/fast/regions/autosize-abspos-anchoredregion-vertlr-expected.txt.
* fast/regions/auto-size/autosize-abspos-anchoredregion-vertlr.html: Renamed from LayoutTests/fast/regions/autosize-abspos-anchoredregion-vertlr.html.
* fast/regions/auto-size/autosize-abspos-anchoredregion.html: Renamed from LayoutTests/fast/regions/autosize-abspos-anchoredregion.html.
* fast/regions/auto-size/autosize-region-container-resize-expected.html: Renamed from LayoutTests/fast/regions/autosize-region-container-resize-expected.html.
* fast/regions/auto-size/autosize-region-container-resize.html: Renamed from LayoutTests/fast/regions/autosize-region-container-resize.html.
* fast/regions/auto-size/autosize-region-window-resize-expected.html: Renamed from LayoutTests/fast/regions/autosize-region-window-resize-expected.html.
* fast/regions/auto-size/autosize-region-window-resize.html: Renamed from LayoutTests/fast/regions/autosize-region-window-resize.html.
* fast/regions/auto-size/autowidth-abspos-expected.html: Renamed from LayoutTests/fast/regions/autowidth-abspos-expected.html.
* fast/regions/auto-size/autowidth-abspos-regionchain-expected.html: Renamed from LayoutTests/fast/regions/autowidth-abspos-regionchain-expected.html.
* fast/regions/auto-size/autowidth-abspos-regionchain.html: Renamed from LayoutTests/fast/regions/autowidth-abspos-regionchain.html.
* fast/regions/auto-size/autowidth-abspos.html: Renamed from LayoutTests/fast/regions/autowidth-abspos.html.
* fast/regions/auto-size/autowidth-attachedinvalidregion-expected.txt: Renamed from LayoutTests/fast/regions/autowidth-attachedinvalidregion-expected.txt.
* fast/regions/auto-size/autowidth-attachedinvalidregion.html: Renamed from LayoutTests/fast/regions/autowidth-attachedinvalidregion.html.
* fast/regions/auto-size/autowidth-float-expected.html: Renamed from LayoutTests/fast/regions/autowidth-float-expected.html.
* fast/regions/auto-size/autowidth-float.html: Renamed from LayoutTests/fast/regions/autowidth-float.html.
* fast/regions/auto-size/autowidth-inlineblock-expected.html: Renamed from LayoutTests/fast/regions/autowidth-inlineblock-expected.html.
* fast/regions/auto-size/autowidth-inlineblock.html: Renamed from LayoutTests/fast/regions/autowidth-inlineblock.html.
* fast/regions/auto-size/autowidth-nonreplaced-abspos-expected.html: Renamed from LayoutTests/fast/regions/autowidth-nonreplaced-abspos-expected.html.
* fast/regions/auto-size/autowidth-nonreplaced-abspos.html: Renamed from LayoutTests/fast/regions/autowidth-nonreplaced-abspos.html.
* fast/regions/auto-size/autowidth-nonreplacedblock-normalflow-expected.html: Renamed from LayoutTests/fast/regions/autowidth-nonreplacedblock-normalflow-expected.html.
* fast/regions/auto-size/autowidth-nonreplacedblock-normalflow.html: Renamed from LayoutTests/fast/regions/autowidth-nonreplacedblock-normalflow.html.
* fast/regions/auto-size/autowidth-normalflow-expected.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-expected.html.
* fast/regions/auto-size/autowidth-normalflow-maxwidth-expected.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-maxwidth-expected.html.
* fast/regions/auto-size/autowidth-normalflow-maxwidth.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-maxwidth.html.
* fast/regions/auto-size/autowidth-normalflow-minmaxwidth-expected.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-minmaxwidth-expected.html.
* fast/regions/auto-size/autowidth-normalflow-minmaxwidth.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-minmaxwidth.html.
* fast/regions/auto-size/autowidth-normalflow-minwidth-expected.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-minwidth-expected.html.
* fast/regions/auto-size/autowidth-normalflow-minwidth.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-minwidth.html.
* fast/regions/auto-size/autowidth-normalflow-vertrl-expected.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-vertrl-expected.html.
* fast/regions/auto-size/autowidth-normalflow-vertrl.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow-vertrl.html.
* fast/regions/auto-size/autowidth-normalflow.html: Renamed from LayoutTests/fast/regions/autowidth-normalflow.html.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore fails to build
https://bugs.webkit.org/show_bug.cgi?id=122440

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-08
Reviewed by Darin Adler.

Compilation fails in debug due to 'comparison of unsigned expression >= 0 is
always true'.

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::positionForCallFrame): Removed the offending ASSERTS.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
context-menu-suggestions-multiword-selection.html and context-menu-suggestions-subword-selection.html are flaky after r156901
https://bugs.webkit.org/show_bug.cgi?id=122414

Reviewed by Ryosuke Niwa.

On Mac, first call of 'initSpellTest' from spelling/resources/util.js
often fails while checking spelling marker.
Use shouldBecomeDifferent instead of calling timers in the tests.
It should have been done at r156137 when shouldBecomeEqual/Different
was used in asynchronous spell checking tests.

* editing/spelling/resources/util.js:
Use shouldBecomeDifferent instead of timers.

* editing/spelling/context-menu-suggestions-multiword-selection-expected.txt:
* editing/spelling/context-menu-suggestions-subword-selection-expected.txt:
* editing/spelling/spelling-changed-text-expected.txt:
* editing/spelling/spelling-double-clicked-word-expected.txt:
* editing/spelling/spelling-exactly-selected-multiple-words-expected.txt:
* editing/spelling/spelling-exactly-selected-word-expected.txt:
* editing/spelling/spelling-should-select-multiple-words-expected.txt:
* editing/spelling/spelling-with-punctuation-selection-expected.txt:
* editing/spelling/spelling-with-whitespace-selection-expected.txt:
Rebaseline the tests which include util.js due to
shouldBecomeDifferent outputs more logs.

* platform/mac/TestExpectations:
Now context-menu-suggestions-multiword-selection.html and
context-menu-suggestions-subword-selection.html are passing for Mac.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Name for tables are now properly showing
up when exposing information for the parent of a table's cell.

* platform/gtk/accessibility/table-cells-expected.txt: Updated.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Expose state of aria-invalid as ATK_STATE_INVALID_ENTRY
https://bugs.webkit.org/show_bug.cgi?id=122104

Reviewed by Chris Fleizach.

Source/WebCore:

Map invalid state of an AccessibilityObject to the proper AtkState.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject): Add the mapping.

Tools:

Updated stringAttributeValue to double check that the exposure of
aria-invalid as a state is consistent with its exposure as a text
attribute as well, when it applies (implementations of AtkText).

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::stringAttributeValue): Add double check.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::stringAttributeValue): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get MediaStreamCenterGStreamer compiling again
https://bugs.webkit.org/show_bug.cgi?id=122482

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-10-08
Reviewed by Eric Carlson.

r157068 was including a nonexistent header

No new tests needed.

* platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use toCSSFooValue() instead of using static_cast<const CSSFooValue*>
https://bugs.webkit.org/show_bug.cgi?id=122491

Reviewed by Andreas Kling.

static_cast<const CSSFooValue*> wasn't cleanup. So, we need to use toCSSFooValue() for it.
To use toCSSValue() will help to detect bad type-cast.

Besides static_cast<const WebKitCSSFooValue*> helper functions need to be added to support this use.

No new tests, no behavior change.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyMatches):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
* css/CSSValue.cpp:
(WebCore::CSSValue::isImplicitInitialValue):
(WebCore::CSSValue::addSubresourceStyleURLs):
(WebCore::CSSValue::hasFailedOrCanceledSubresources):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::serializeResolvingVariables):
(WebCore::CSSValue::cloneForCSSOM):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::PropertyReference::cssName):
* css/WebKitCSSSVGDocumentValue.h:
(WebCore::toWebKitCSSSVGDocumentValue):
* css/WebKitCSSTransformValue.h:
(WebCore::toWebKitCSSTransformValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed EFL gardening

Unskip tests that are already passing.

* platform/efl-wk1/TestExpectations: Mark unskipped test as failing for WK1.
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Rollout of r156536. ~5% regression in inline layout performance.

Source/WebCore:

* rendering/LineWidth.cpp:
* rendering/LineWidth.h:
(WebCore::LineWidth::addUncommittedWidth):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineBreaker::nextSegmentBreak):

LayoutTests:

* fast/css/unexpected-word-wrapping-with-non-empty-spans-expected.html: Removed.
* fast/css/unexpected-word-wrapping-with-non-empty-spans.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Eliminate use of deleteAllValues in ProxyInstance
https://bugs.webkit.org/show_bug.cgi?id=122499

Reviewed by Anders Carlsson.

* Plugins/Hosted/ProxyInstance.h: Use unique_ptr for map values in m_fields and m_methods.

* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::~ProxyInstance): Removed calls to deleteAllValues.
(WebKit::ProxyInstance::methodNamed): Use make_unique and get to deal with map entries
that are unique_ptr. Also fixed a bug where this would do an expensive no-op if the map
already had an entry with a null in it. We would call the plug-in, but eventually
isNewEntry would be false so we would return null.
(WebKit::ProxyInstance::fieldNamed): Use make_unique and get to deal with map entries
that are unique_ptr.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Re-enable MathML for release builds
https://bugs.webkit.org/show_bug.cgi?id=122361

Patch by Martin Robinson <mrobinson@igalia.com> on 2013-10-08
Reviewed by Darin Adler.

* Source/autotools/SetupWebKitFeatures.m4: Enable MathML for release builds.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r157090.
http://trac.webkit.org/changeset/157090
https://bugs.webkit.org/show_bug.cgi?id=122504

Caused crashes in many plug-in tests (Requested by ap on
#webkit).

* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::registerNPObject):
(WebKit::NPRemoteObjectMap::pluginDestroyed):
* Shared/Plugins/NPRemoteObjectMap.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] enable v4l2 plugin
https://bugs.webkit.org/show_bug.cgi?id=122503

Reviewed by Martin Robinson.

* gtk/jhbuild.modules: Enable the plugin, it now builds fine since
we updated our GStreamer version to 1.0.8.

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