WebSpeech: crash at WebCore::SpeechSynthesis::speak
https://bugs.webkit.org/show_bug.cgi?id=113937

Reviewed by Tim Horton.

Source/WebCore:

Protect against the case when invalid data is passed in.

Test: platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html

* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::speak):
* Modules/speech/SpeechSynthesisUtterance.cpp:
(WebCore::SpeechSynthesisUtterance::setVoice):

LayoutTests:

* platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance-expected.txt: Added.
* platform/mac/fast/speechsynthesis/speech-synthesis-crash-on-bad-utterance.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebSpeech: event.elapsedTime is always 1364484608
https://bugs.webkit.org/show_bug.cgi?id=114045

Reviewed by Tim Horton.

Source/WebCore:

We were calculating elapsed time incorrectly.

Test: platform/mac/fast/speechsynthesis/speech-synthesis-elapsed-time.html

* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::fireEvent):

LayoutTests:

* platform/mac/fast/speechsynthesis/speech-synthesis-elapsed-time-expected.txt: Added.
* platform/mac/fast/speechsynthesis/speech-synthesis-elapsed-time.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Make SVG Group containers accessible elements
https://bugs.webkit.org/show_bug.cgi?id=113939

Reviewed by Simon Fraser.

Source/WebCore: 

SVG group containers are currently not exposed in the AX tree. 
When an SVG element has a <title> child, that is not being used for the AX label.
When hit-testing, from Accessibility, SVG groups are never returned.

All these issues are fixed for Mac and iOS.
There are two tests because right now iOS skips all the top-level accessibility tests
due to fundamental architectural differences.

Tests: accessibility/svg-group-element-with-title.html
       platform/iphone-simulator/accessibility/svg-group-element-with-title.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::accessibilityDescription):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper isSVGGroupElement]):
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
* rendering/HitTestRequest.h:
    Add a new option, AccessibilityHitTest, that will allow us to override normal behavior.
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::nodeAtFloatPoint):
   Allow a SVG group to be the node at a point, for accessibility hit tests.

Tools: 

Implement axController.elementAtPoint for iOS.
Implement a correct version of clickPoint for iOS.

* DumpRenderTree/ios/AccessibilityControllerIOS.mm:
(AccessibilityController::elementAtPoint):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::clickPointX):
(AccessibilityUIElement::clickPointY):

LayoutTests: 

* accessibility/svg-group-element-with-title-expected.txt: Added.
* accessibility/svg-group-element-with-title.html: Added.
* platform/iphone-simulator/accessibility/svg-group-element-with-title-expected.txt: Added.
* platform/iphone-simulator/accessibility/svg-group-element-with-title.html: Added.



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