Notify nodes removal to Range/Selection after dispatching blur and mutation event
https://bugs.webkit.org/show_bug.cgi?id=123880

Reviewed by Andreas Kling.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/b60576a0560d14f8757e58d55d37b7cefa48a6ac

In willRemoveChildren in ContainerNode.cpp, call Document::nodeChildrenWillBeRemoved after instead of
before dispatching mutation events because we need to update ranges created by those mutation event
listeners. willRemoveChild was fixed in r115686.

Tests: editing/selection/selection-change-in-blur-event-by-remove-children.html
       editing/selection/selection-change-in-mutation-event-by-remove-children.html
       fast/dom/Range/range-created-during-remove-children.html

* dom/ContainerNode.cpp:
(WebCore::willRemoveChildren):

LayoutTests:

* editing/selection/selection-change-in-blur-event-by-remove-children-expected.txt: Added.
* editing/selection/selection-change-in-blur-event-by-remove-children.html: Added.
* editing/selection/selection-change-in-mutation-event-by-remove-children-expected.txt: Added.
* editing/selection/selection-change-in-mutation-event-by-remove-children.html: Added.
* fast/dom/Range/range-created-during-remove-children-expected.txt: Added.
* fast/dom/Range/range-created-during-remove-children.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Tests failing after r158195

* platform/gtk/TestExpectations: Added failure expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] accessibility/tabindex-elements-are-accessible.html is failing
https://bugs.webkit.org/show_bug.cgi?id=123884

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-06
Reviewed by Mario Sanchez Prada.

Added new accessibility expectation file. ATK represents paragraph's role as a ATK_ROLE_PARAGRAPH.

* platform/efl/TestExpectations: Test is no longer failing.
* platform/efl/accessibility/tabindex-elements-are-accessible-expected.txt: Added.
* platform/gtk/accessibility/tabindex-elements-are-accessible-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Implement tables-related attributesOf*() functions for AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118969

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-06
Reviewed by Mario Sanchez Prada.

Added missing implementation of attributesOfColumnHeaders, attributesOfRowHeaders, attributesOfVisibleCells.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::attributesOfChildren):
(AccessibilityUIElement::attributesOfColumnHeaders):
(AccessibilityUIElement::attributesOfRowHeaders):
(AccessibilityUIElement::attributesOfVisibleCells):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributesOfChildren):
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
(WTR::AccessibilityUIElement::attributesOfRowHeaders):
(WTR::AccessibilityUIElement::attributesOfVisibleCells):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Audio and Video attachments are not output to VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=123479

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Video and audio elements don't appear as distinct objects in the AX hierarchy,
nor are they treated as replaceable objects when emitting the text. We should
treat these characters like attachments, for one. On the Mac platform, we should
also identify them with special subroles.

Tests: platform/mac/accessibility/media-emits-object-replacement.html
       platform/mac/accessibility/media-role-descriptions.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isGenericFocusableElement):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):

LayoutTests:

Making media elements int replaced elements has the unfortunate side-effect
of causing a new line to be inserted into any test using a <video> or <audio> tag.

* compositing/video/video-poster-expected.txt:
* compositing/video/video-reflection-expected.txt:
* compositing/visibility/visibility-simple-video-layer-expected.txt:
* fast/css/first-letter-block-form-controls-crash-expected.txt:
* fast/css/relative-position-replaced-in-table-display-crash-expected.txt:
* fast/forms/access-key-for-all-elements-expected.txt:
* fast/forms/form-associated-element-crash3-expected.txt:
* fast/multicol/renderer-positioned-assert-crash-expected.txt:
* fast/regions/full-screen-video-from-region-expected.txt:
* fast/runin/nonblock-runin-expected.txt:
* fast/spatial-navigation/snav-media-elements-expected.txt:
* fullscreen/full-screen-crash-offsetLeft-expected.txt:
* fullscreen/full-screen-no-style-sharing-expected.txt:
* fullscreen/full-screen-stacking-context-expected.txt:
* fullscreen/video-controls-drag-expected.txt:
* fullscreen/video-controls-timeline-expected.txt:
* fullscreen/video-cursor-auto-hide-expected.txt:
* fullscreen/video-specified-size-expected.txt:
* http/tests/appcache/video-expected.txt:
* http/tests/media/pdf-served-as-pdf-expected.txt:
* http/tests/media/reload-after-dialog-expected.txt:
* http/tests/media/text-served-as-text-expected.txt:
* http/tests/media/video-accept-encoding-expected.txt:
* http/tests/media/video-buffered-range-contains-currentTime-expected.txt:
* http/tests/media/video-cross-site-expected.txt:
* http/tests/media/video-error-abort-expected.txt:
* http/tests/media/video-load-suspend-expected.txt:
* http/tests/media/video-play-progress-expected.txt:
* http/tests/media/video-play-stall-before-meta-data-expected.txt:
* http/tests/media/video-preload-expected.txt:
* http/tests/media/video-redirect-expected.txt:
* http/tests/media/video-referer-expected.txt:
* http/tests/media/video-served-as-text-expected.txt:
* http/tests/media/video-throttled-load-metadata-expected.txt:
* http/tests/misc/empty-urls-expected.txt:
* http/tests/security/contentSecurityPolicy/media-src-allowed-expected.txt:
* http/tests/security/contentSecurityPolicy/media-src-blocked-expected.txt:
* http/tests/security/local-video-poster-from-remote-expected.txt:
* http/tests/security/local-video-source-from-remote-expected.txt:
* http/tests/security/local-video-src-from-remote-expected.txt:
* http/tests/security/text-track-crossorigin-expected.txt:
* media/W3C/audio/events/event_canplay-expected.txt:
* media/W3C/audio/events/event_canplay_manual-expected.txt:
* media/W3C/audio/events/event_canplaythrough-expected.txt:
* media/W3C/audio/events/event_canplaythrough_manual-expected.txt:
* media/W3C/audio/events/event_loadeddata-expected.txt:
* media/W3C/audio/events/event_loadeddata_manual-expected.txt:
* media/W3C/audio/events/event_loadedmetadata-expected.txt:
* media/W3C/audio/events/event_loadedmetadata_manual-expected.txt:
* media/W3C/audio/events/event_loadstart-expected.txt:
* media/W3C/audio/events/event_loadstart_manual-expected.txt:
* media/W3C/audio/events/event_order_canplay_canplaythrough-expected.txt:
* media/W3C/audio/events/event_order_canplay_playing-expected.txt:
* media/W3C/audio/events/event_order_loadedmetadata_loadeddata-expected.txt:
* media/W3C/audio/events/event_order_loadstart_progress-expected.txt:
* media/W3C/audio/events/event_pause_manual-expected.txt:
* media/W3C/audio/events/event_play-expected.txt:
* media/W3C/audio/events/event_play_manual-expected.txt:
* media/W3C/audio/events/event_playing-expected.txt:
* media/W3C/audio/events/event_playing_manual-expected.txt:
* media/W3C/audio/events/event_progress-expected.txt:
* media/W3C/audio/events/event_progress_manual-expected.txt:
* media/W3C/audio/events/event_timeupdate-expected.txt:
* media/W3C/audio/events/event_timeupdate_manual-expected.txt:
* media/W3C/audio/networkState/networkState_during_loadstart-expected.txt:
* media/W3C/audio/paused/paused_false_during_play-expected.txt:
* media/W3C/audio/paused/paused_true_during_pause-expected.txt:
* media/W3C/audio/readyState/readyState_during_canplay-expected.txt:
* media/W3C/audio/readyState/readyState_during_canplaythrough-expected.txt:
* media/W3C/audio/readyState/readyState_during_loadeddata-expected.txt:
* media/W3C/audio/readyState/readyState_during_loadedmetadata-expected.txt:
* media/W3C/audio/readyState/readyState_during_playing-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_2-expected.txt:
* media/W3C/video/canPlayType/canPlayType_application_octet_stream_with_codecs_3-expected.txt:
* media/W3C/video/canPlayType/canPlayType_bogus_type-expected.txt:
* media/W3C/video/canPlayType/canPlayType_codecs_order_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_method_exists-expected.txt:
* media/W3C/video/canPlayType/canPlayType_supported_but_no_codecs_parameter_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_two_implies_one_1-expected.txt:
* media/W3C/video/canPlayType/canPlayType_two_implies_one_2-expected.txt:
* media/W3C/video/currentSrc/currentSrc_empty_if_no_src-expected.txt:
* media/W3C/video/currentSrc/currentSrc_property_exists-expected.txt:
* media/W3C/video/error/error_null-expected.txt:
* media/W3C/video/error/error_onerror_called_on_bogus_source-expected.txt:
* media/W3C/video/error/error_property_exists-expected.txt:
* media/W3C/video/events/event_canplay-expected.txt:
* media/W3C/video/events/event_canplay_manual-expected.txt:
* media/W3C/video/events/event_canplaythrough-expected.txt:
* media/W3C/video/events/event_canplaythrough_manual-expected.txt:
* media/W3C/video/events/event_loadeddata-expected.txt:
* media/W3C/video/events/event_loadeddata_manual-expected.txt:
* media/W3C/video/events/event_loadedmetadata-expected.txt:
* media/W3C/video/events/event_loadedmetadata_manual-expected.txt:
* media/W3C/video/events/event_loadstart-expected.txt:
* media/W3C/video/events/event_loadstart_manual-expected.txt:
* media/W3C/video/events/event_order_canplay_canplaythrough-expected.txt:
* media/W3C/video/events/event_order_canplay_playing-expected.txt:
* media/W3C/video/events/event_order_loadedmetadata_loadeddata-expected.txt:
* media/W3C/video/events/event_order_loadstart_progress-expected.txt:
* media/W3C/video/events/event_pause_manual-expected.txt:
* media/W3C/video/events/event_play-expected.txt:
* media/W3C/video/events/event_play_manual-expected.txt:
* media/W3C/video/events/event_playing-expected.txt:
* media/W3C/video/events/event_playing_manual-expected.txt:
* media/W3C/video/events/event_progress-expected.txt:
* media/W3C/video/events/event_progress_manual-expected.txt:
* media/W3C/video/events/event_timeupdate-expected.txt:
* media/W3C/video/events/event_timeupdate_manual-expected.txt:
* media/W3C/video/networkState/networkState_during_loadstart-expected.txt:
* media/W3C/video/networkState/networkState_during_progress-expected.txt:
* media/W3C/video/networkState/networkState_initial-expected.txt:
* media/W3C/video/networkState/networkState_property_exists-expected.txt:
* media/W3C/video/paused/paused_false_during_play-expected.txt:
* media/W3C/video/paused/paused_true_during_pause-expected.txt:
* media/W3C/video/preload/preload_property_exists-expected.txt:
* media/W3C/video/preload/preload_reflects_auto_value-expected.txt:
* media/W3C/video/preload/preload_reflects_bogus_value-expected.txt:
* media/W3C/video/preload/preload_reflects_empty-expected.txt:
* media/W3C/video/preload/preload_reflects_metadata-expected.txt:
* media/W3C/video/preload/preload_reflects_no_value-expected.txt:
* media/W3C/video/preload/preload_reflects_none-expected.txt:
* media/W3C/video/preload/preload_reflects_none_autoplay-expected.txt:
* media/W3C/video/readyState/readyState_during_canplay-expected.txt:
* media/W3C/video/readyState/readyState_during_canplaythrough-expected.txt:
* media/W3C/video/readyState/readyState_during_loadeddata-expected.txt:
* media/W3C/video/readyState/readyState_during_loadedmetadata-expected.txt:
* media/W3C/video/readyState/readyState_during_playing-expected.txt:
* media/W3C/video/readyState/readyState_initial-expected.txt:
* media/W3C/video/readyState/readyState_property_exists-expected.txt:
* media/W3C/video/src/src_reflects_attribute_not_source_elements-expected.txt:
* media/W3C/video/src/src_reflects_no_value-expected.txt:
* media/W3C/video/src/src_removal_does_not_trigger_loadstart-expected.txt:
* media/audio-mpeg-supported-expected.txt:
* media/audio-mpeg4-supported-expected.txt:
* media/audio-only-video-intrinsic-size-expected.txt:
* media/auto-play-in-sandbox-with-allow-scripts-expected.txt:
* media/before-load-member-access-expected.txt:
* media/broken-video-expected.txt:
* media/constructors-expected.txt:
* media/controls-css-overload-expected.txt:
* media/controls-drag-timebar-expected.txt:
* media/controls-layout-direction-expected.txt:
* media/controls-right-click-on-timebar-expected.txt:
* media/csp-blocks-video-expected.txt:
* media/event-attributes-expected.txt:
* media/media-blocked-by-beforeload-expected.txt:
* media/media-blocked-by-willsendrequest-expected.txt:
* media/media-can-play-mpeg-audio-expected.txt:
* media/media-can-play-mpeg4-video-expected.txt:
* media/media-can-play-octet-stream-expected.txt:
* media/media-can-play-type-expected.txt:
* media/media-can-play-wav-audio-expected.txt:
* media/media-captions-expected.txt:
* media/media-captions-no-controls-expected.txt:
* media/media-controller-expected.txt:
* media/media-controller-playback-expected.txt:
* media/media-controller-playbackrate-expected.txt:
* media/media-controller-time-clamp-expected.txt:
* media/media-controller-time-constant-expected.txt:
* media/media-controller-time-expected.txt:
* media/media-controller-timeupdate-expected.txt:
* media/media-controller-unpause-expected.txt:
* media/media-controls-invalid-url-expected.txt:
* media/media-ended-expected.txt:
* media/media-extension-with-fragment-expected.txt:
* media/media-fragments/TC0001-expected.txt:
* media/media-fragments/TC0002-expected.txt:
* media/media-fragments/TC0003-expected.txt:
* media/media-fragments/TC0004-expected.txt:
* media/media-fragments/TC0005-expected.txt:
* media/media-fragments/TC0006-expected.txt:
* media/media-fragments/TC0009-expected.txt:
* media/media-fragments/TC0011-expected.txt:
* media/media-fragments/TC0012-expected.txt:
* media/media-fragments/TC0014-expected.txt:
* media/media-fragments/TC0015-expected.txt:
* media/media-fragments/TC0017-expected.txt:
* media/media-fragments/TC0024-expected.txt:
* media/media-fragments/TC0027-expected.txt:
* media/media-fragments/TC0028-expected.txt:
* media/media-fragments/TC0029-expected.txt:
* media/media-fragments/TC0030-expected.txt:
* media/media-fragments/TC0031-expected.txt:
* media/media-fragments/TC0032-expected.txt:
* media/media-fragments/TC0033-expected.txt:
* media/media-fragments/TC0034-expected.txt:
* media/media-fragments/TC0035-expected.txt:
* media/media-fragments/TC0036-expected.txt:
* media/media-fragments/TC0037-expected.txt:
* media/media-fragments/TC0038-expected.txt:
* media/media-fragments/TC0039-expected.txt:
* media/media-fragments/TC0044-expected.txt:
* media/media-fragments/TC0051-expected.txt:
* media/media-fragments/TC0052-expected.txt:
* media/media-fragments/TC0053-expected.txt:
* media/media-fragments/TC0054-expected.txt:
* media/media-fragments/TC0055-expected.txt:
* media/media-fragments/TC0058-expected.txt:
* media/media-fragments/TC0059-expected.txt:
* media/media-fragments/TC0061-expected.txt:
* media/media-fragments/TC0062-expected.txt:
* media/media-fragments/TC0063-expected.txt:
* media/media-fragments/TC0064-expected.txt:
* media/media-fragments/TC0065-expected.txt:
* media/media-fragments/TC0066-expected.txt:
* media/media-fragments/TC0067-expected.txt:
* media/media-fragments/TC0068-expected.txt:
* media/media-fragments/TC0069-expected.txt:
* media/media-fragments/TC0070-expected.txt:
* media/media-fragments/TC0071-expected.txt:
* media/media-fragments/TC0072-expected.txt:
* media/media-fragments/TC0073-expected.txt:
* media/media-fragments/TC0074-expected.txt:
* media/media-fragments/TC0075-expected.txt:
* media/media-fragments/TC0076-expected.txt:
* media/media-fragments/TC0077-expected.txt:
* media/media-fragments/TC0078-expected.txt:
* media/media-fragments/TC0079-expected.txt:
* media/media-fragments/TC0080-expected.txt:
* media/media-fragments/TC0081-expected.txt:
* media/media-fragments/TC0082-expected.txt:
* media/media-fragments/TC0083-expected.txt:
* media/media-fragments/TC0084-expected.txt:
* media/media-fragments/TC0085-expected.txt:
* media/media-fragments/TC0086-expected.txt:
* media/media-fragments/TC0087-expected.txt:
* media/media-fragments/TC0088-expected.txt:
* media/media-fragments/TC0089-expected.txt:
* media/media-fragments/TC0090-expected.txt:
* media/media-fragments/TC0091-expected.txt:
* media/media-fragments/TC0092-expected.txt:
* media/media-fragments/TC0093-expected.txt:
* media/media-fragments/TC0094-expected.txt:
* media/media-fullscreen-inline-expected.txt:
* media/media-preload-no-delay-loadevent-expected.txt:
* media/no-autoplay-with-user-gesture-requirement-expected.txt:
* media/nodesFromRect-shadowContent-expected.txt:
* media/restore-from-page-cache-expected.txt:
* media/sources-fallback-codecs-expected.txt:
* media/track/add-and-remove-track-expected.txt:
* media/track/audio-track-expected.txt:
* media/track/opera/interfaces/TextTrack/addCue-expected.txt:
* media/track/opera/interfaces/TextTrack/removeCue-expected.txt:
* media/track/opera/interfaces/TextTrackCue/align-expected.txt:
* media/track/opera/interfaces/TextTrackCue/endTime-expected.txt:
* media/track/opera/interfaces/TextTrackCue/id-expected.txt:
* media/track/opera/interfaces/TextTrackCue/pauseOnExit-expected.txt:
* media/track/opera/interfaces/TextTrackCue/startTime-expected.txt:
* media/track/opera/interfaces/TextTrackCue/track-expected.txt:
* media/track/opera/interfaces/TextTrackCueList/getCueById-expected.txt:
* media/track/opera/interfaces/TextTrackCueList/length-expected.txt:
* media/track/text-track-cue-is-reachable-expected.txt:
* media/track/text-track-is-reachable-expected.txt:
* media/track/track-active-cues-expected.txt:
* media/track/track-add-remove-cue-expected.txt:
* media/track/track-add-track-expected.txt:
* media/track/track-addtrack-kind-expected.txt:
* media/track/track-automatic-subtitles-expected.txt:
* media/track/track-css-all-cues-expected.txt:
* media/track/track-css-cue-lifetime-expected.txt:
* media/track/track-css-matching-default-expected.txt:
* media/track/track-css-matching-expected.txt:
* media/track/track-css-matching-lang-expected.txt:
* media/track/track-css-matching-timestamps-expected.txt:
* media/track/track-css-property-whitelist-expected.txt:
* media/track/track-css-user-override-expected.txt:
* media/track/track-cue-container-rendering-position-expected.txt:
* media/track/track-cue-empty-text-crash-expected.txt:
* media/track/track-cue-inline-assertion-crash-expected.txt:
* media/track/track-cue-mutable-expected.txt:
* media/track/track-cue-mutable-fragment-expected.txt:
* media/track/track-cue-negative-timestamp-expected.txt:
* media/track/track-cue-nothing-to-render-expected.txt:
* media/track/track-cue-overlap-snap-to-lines-not-set-expected.txt:
* media/track/track-cue-rendering-empty-cue-crash-expected.txt:
* media/track/track-cue-rendering-expected.txt:
* media/track/track-cue-rendering-on-resize-expected.txt:
* media/track/track-cue-rendering-rtl-expected.txt:
* media/track/track-cue-rendering-snap-to-lines-not-set-expected.txt:
* media/track/track-cue-rendering-tree-is-removed-properly-expected.txt:
* media/track/track-cue-rendering-with-padding-expected.txt:
* media/track/track-cues-cuechange-expected.txt:
* media/track/track-cues-enter-exit-expected.txt:
* media/track/track-cues-missed-expected.txt:
* media/track/track-cues-pause-on-exit-expected.txt:
* media/track/track-cues-seeking-expected.txt:
* media/track/track-cues-sorted-before-dispatch-expected.txt:
* media/track/track-default-attribute-expected.txt:
* media/track/track-disabled-addcue-expected.txt:
* media/track/track-disabled-expected.txt:
* media/track/track-element-load-event-expected.txt:
* media/track/track-in-band-cues-added-once-expected.txt:
* media/track/track-in-band-duplicate-tracks-when-source-changes-expected.txt:
* media/track/track-in-band-expected.txt:
* media/track/track-in-band-legacy-api-expected.txt:
* media/track/track-in-band-style-expected.txt:
* media/track/track-kind-expected.txt:
* media/track/track-large-timestamp-expected.txt:
* media/track/track-legacyapi-with-automatic-mode-expected.txt:
* media/track/track-load-from-element-readyState-expected.txt:
* media/track/track-load-from-src-readyState-expected.txt:
* media/track/track-long-captions-file-expected.txt:
* media/track/track-mode-disabled-crash-expected.txt:
* media/track/track-mode-expected.txt:
* media/track/track-mode-not-changed-by-new-track-expected.txt:
* media/track/track-mode-triggers-loading-expected.txt:
* media/track/track-remove-active-cue-crash-expected.txt:
* media/track/track-remove-by-setting-innerHTML-expected.txt:
* media/track/track-remove-quickly-expected.txt:
* media/track/track-text-track-cue-list-expected.txt:
* media/track/track-texttracks-expected.txt:
* media/track/track-webvtt-tc000-empty-expected.txt:
* media/track/track-webvtt-tc001-utf8-expected.txt:
* media/track/track-webvtt-tc002-bom-expected.txt:
* media/track/track-webvtt-tc003-newlines-expected.txt:
* media/track/track-webvtt-tc004-magic-header-expected.txt:
* media/track/track-webvtt-tc005-header-comment-expected.txt:
* media/track/track-webvtt-tc006-cue-identifiers-expected.txt:
* media/track/track-webvtt-tc007-cue-no-id-expected.txt:
* media/track/track-webvtt-tc008-timings-no-hours-expected.txt:
* media/track/track-webvtt-tc009-timings-hour-expected.txt:
* media/track/track-webvtt-tc010-no-timings-expected.txt:
* media/track/track-webvtt-tc011-blank-lines-expected.txt:
* media/track/track-webvtt-tc013-settings-expected.txt:
* media/track/track-webvtt-tc014-alignment-expected.txt:
* media/track/track-webvtt-tc015-positioning-expected.txt:
* media/track/track-webvtt-tc016-align-positioning-expected.txt:
* media/track/track-webvtt-tc017-line-position-expected.txt:
* media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
* media/track/track-webvtt-tc019-cue-size-expected.txt:
* media/track/track-webvtt-tc020-cue-size-align-expected.txt:
* media/track/track-webvtt-tc021-valign-expected.txt:
* media/track/track-webvtt-tc022-entities-expected.txt:
* media/track/track-webvtt-tc023-markup-expected.txt:
* media/track/track-webvtt-tc024-timestamp-expected.txt:
* media/track/track-webvtt-tc025-class-markup-expected.txt:
* media/track/track-webvtt-tc026-voice-expected.txt:
* media/track/track-webvtt-tc027-empty-cue-expected.txt:
* media/track/track-webvtt-tc028-unsupported-markup-expected.txt:
* media/track/track-word-breaking-expected.txt:
* media/track/tracklist-is-reachable-expected.txt:
* media/track/video-track-expected.txt:
* media/unsupported-rtsp-expected.txt:
* media/unsupported-tracks-expected.txt:
* media/video-append-source-expected.txt:
* media/video-autoplay-expected.txt:
* media/video-beforeload-remove-source-expected.txt:
* media/video-buffered-expected.txt:
* media/video-canvas-drawing-expected.txt:
* media/video-canvas-drawing-output-expected.txt:
* media/video-controls-captions-trackmenu-hide-on-click-outside-expected.txt:
* media/video-controls-captions-trackmenu-includes-enabled-track-expected.txt:
* media/video-controls-expected.txt:
* media/video-controls-transformed-expected.txt:
* media/video-controls-with-mutation-event-handler-expected.txt:
* media/video-controls-zoomed-expected.txt:
* media/video-currentTime-delay-expected.txt:
* media/video-currentTime-expected.txt:
* media/video-currentTime-set-expected.txt:
* media/video-currentTime-set2-expected.txt:
* media/video-delay-load-event-expected.txt:
* media/video-display-aspect-ratio-expected.txt:
* media/video-dom-autoplay-expected.txt:
* media/video-dom-preload-expected.txt:
* media/video-dom-src-expected.txt:
* media/video-duration-known-after-eos-expected.txt:
* media/video-error-does-not-exist-expected.txt:
* media/video-load-networkState-expected.txt:
* media/video-load-preload-metadata-expected.txt:
* media/video-load-preload-none-expected.txt:
* media/video-load-readyState-expected.txt:
* media/video-load-require-user-gesture-expected.txt:
* media/video-loop-expected.txt:
* media/video-mouse-focus-expected.txt:
* media/video-muted-expected.txt:
* media/video-no-autoplay-expected.txt:
* media/video-pause-empty-events-expected.txt:
* media/video-pause-immediately-expected.txt:
* media/video-play-empty-events-expected.txt:
* media/video-play-pause-events-expected.txt:
* media/video-play-pause-exception-expected.txt:
* media/video-play-require-user-gesture-expected.txt:
* media/video-playbackrate-expected.txt:
* media/video-played-collapse-expected.txt:
* media/video-played-ranges-1-expected.txt:
* media/video-played-reset-expected.txt:
* media/video-plays-past-end-of-test-expected.txt:
* media/video-poster-blocked-by-willsendrequest-expected.txt:
* media/video-poster-delayed-expected.txt:
* media/video-poster-expected.txt:
* media/video-poster-scale-expected.txt:
* media/video-preload-expected.txt:
* media/video-replaces-poster-expected.txt:
* media/video-reverse-play-duration-expected.txt:
* media/video-seek-after-end-expected.txt:
* media/video-seek-by-small-increment-expected.txt:
* media/video-seek-multiple-expected.txt:
* media/video-seek-no-src-exception-expected.txt:
* media/video-seek-past-end-playing-expected.txt:
* media/video-seekable-expected.txt:
* media/video-seeking-expected.txt:
* media/video-set-rate-from-pause-expected.txt:
* media/video-single-valid-source-expected.txt:
* media/video-size-expected.txt:
* media/video-source-error-expected.txt:
* media/video-source-error-no-candidate-expected.txt:
* media/video-source-expected.txt:
* media/video-source-inserted-expected.txt:
* media/video-source-load-expected.txt:
* media/video-source-none-supported-expected.txt:
* media/video-source-type-expected.txt:
* media/video-src-blob-expected.txt:
* media/video-src-change-expected.txt:
* media/video-src-empty-expected.txt:
* media/video-src-expected.txt:
* media/video-src-invalid-poster-expected.txt:
* media/video-src-invalid-remove-expected.txt:
* media/video-src-none-expected.txt:
* media/video-src-plus-source-expected.txt:
* media/video-src-remove-expected.txt:
* media/video-src-set-expected.txt:
* media/video-src-source-expected.txt:
* media/video-timeupdate-during-playback-expected.txt:
* media/video-timeupdate-reverse-play-expected.txt:
* media/video-volume-expected.txt:
* media/video-width-height-expected.txt:
* platform/mac/accessibility/media-element-expected.txt:
* platform/mac/accessibility/media-emits-object-replacement-expected.txt: Added.
* platform/mac/accessibility/media-emits-object-replacement.html: Added.
* platform/mac/accessibility/media-role-descriptions-expected.txt: Added.
* platform/mac/accessibility/media-role-descriptions.html: Added.
* platform/mac/compositing/video/video-object-fit-expected.txt:
* platform/mac/fullscreen/video-controls-override-expected.txt:
* platform/mac/media/media-can-play-wav-audio-expected.txt:
* platform/mac/media/media-can-play-webm-expected.txt:
* platform/mac/media/video-seek-past-end-paused-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Grid Layout] Add support for named grid areas
https://bugs.webkit.org/show_bug.cgi?id=120045

Reviewed by Andreas Kling.

From Blink r155555, r155850 and r155889 by <jchaffraix@chromium.org>

Source/WebCore:

Added support for named grid areas. Basically a named grid area is
now a valid grid position. The shorthand parsing of grid-area was
split from the grid-{row|column} as the rules for expanding are
slightly different.

Unknown grid area names are treated as 'auto' as per the
specification. This means that for those cases we need to trigger
the auto-placement algorithm.

Tests: fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html
       fast/css-grid-layout/grid-item-named-grid-area-resolution.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridPosition):
(WebCore::gridMissingGridPositionValue):
(WebCore::CSSParser::parseGridItemPositionShorthand):
(WebCore::CSSParser::parseGridAreaShorthand):
(WebCore::CSSParser::parseSingleGridAreaLonghand):
* css/CSSParser.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustGridItemPosition):
(WebCore::createGridPosition):
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::isNamedGridArea):
(WebCore::GridPosition::setNamedGridArea):
(WebCore::GridPosition::namedGridLine):

LayoutTests:

Added a couple of new tests to check that both known and unknown
named grid areas are properly handled.

Also extended some of the existing tests to use named grid areas
as any other possible grid position.

* fast/css-grid-layout/grid-item-area-get-set-expected.txt:
* fast/css-grid-layout/grid-item-area-get-set.html:
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement-expected.txt: Added.
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html: Added.
* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution-expected.txt: Added.
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html: Added.
* fast/css-grid-layout/grid-item-start-before-get-set-expected.txt:
* fast/css-grid-layout/grid-item-start-before-get-set.html:
* fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Playing many sounds with HTML5 Audio makes WebKit unresponsive
https://bugs.webkit.org/show_bug.cgi?id=116145

Reviewed by Eric Carlson.

Cache as much information as possible from AVPlayerItem to eliminate unneccesary
calls into AVFoundation.

Add WillChange/DidChange functions to handle the results of KVO notifications
from AVPlayerItem and AVPlayer:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformPlay):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformPause):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatusDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackLikelyToKeepUpDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferEmptyDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playbackBufferFullDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasEnabledAudioDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::presentationSizeDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::rateDidChange):
(WebCore::itemKVOProperties):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

Instruct the HTMLMediaElement to cache the currentTime value for 5 seconds:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime):

Add and initialize member variables to hold these cached values:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):

Add a new Notification type which can take (and call) a Function object:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
(WebCore::MediaPlayerPrivateAVFoundation::Notification::function):

Implement queries in terms of the cached values of AVPlayerItem and AVPlayer
properties:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
(WebCore::MediaPlayerPrivateAVFoundationObjC::rate):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
(WebCore::MediaPlayerPrivateAVFoundationObjC::totalBytes):
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks):
(WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):

Invalidate the cached currentTime before calling scheduleTimeUpdate so that the
correct movieTime is saved in m_clockTimeAtLastUpdateEvent:
* html/HTMLMediaElement.cpp:
(HTMLMediaElement::setReadyState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed 32-bit Mac build fix; use an explicit FloatSize -> IntSize conversion function.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix, style() return type is now a reference.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FTL should support StringCharCodeAt
https://bugs.webkit.org/show_bug.cgi?id=123854

Reviewed by Sam Weinig.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileStringCharCodeAt):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unrevewied Windows build fix after r158736; add InlineElementBox.cpp to the RenderingAllInOne.cpp file.

* rendering/RenderingAllInOne.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add ENABLE(TEXT_SELECTION)
https://bugs.webkit.org/show_bug.cgi?id=123827

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add compile-time guard, ENABLE(TEXT_SELECTION), to enable or
disable selection painting in WebCore (enabled by default).

On iOS we disable WebCore selection painting and have UIKit
paint the selection.

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintSelection): Only paint selection when
TEXT_SELECTION is enabled.
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
For now, add a ENABLE(TEXT_SELECTION)-guard around an assertion. Added
a FIXME comment to investigate the callers and either move the assertion
to the appropriate callers or structure the code such that we can remove
the assertion.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintSelection): Only paint selection when
TEXT_SELECTION is enabled.
* rendering/TextPaintStyle.cpp:
(WebCore::computeTextSelectionPaintStyle): Only compute the selection
paint style when TEXT_SELECTION is enabled. Otherwise, return a paint
style identical to the text paint style. Also, substitute nullptr for 0.

Source/WTF:

Enable selection painting by default on all ports except iOS.

* wtf/FeatureDefines.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change ctiTrampoline into a thunk
https://bugs.webkit.org/show_bug.cgi?id=123844

Reviewed by Filip Pizlo.

Converted ctiTrampoline and ctiOpThrowNotCaught into thunks named callToJavaScript
and returnFromJavaScript.  Cleaned up and in some cases removed JITStubsXXX.h files
after removing ctiTrampoline and ctiOpThrowNotCaught.  Added callJavaScriptJITFunction
to VM that is a function pointer to the callToJavaScript thunk.

* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* jit/JITCode.cpp:
(JSC::JITCode::execute):
* jit/JITExceptions.cpp:
(JSC::genericUnwind):
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARM64.h: Removed.
* jit/JITStubsARMv7.h:
* jit/JITStubsMIPS.h: Removed.
* jit/JITStubsMSVC64.asm:
* jit/JITStubsSH4.h: Removed.
* jit/JITStubsX86.h:
* jit/JITStubsX86_64.h:
* jit/JSInterfaceJIT.h:
* jit/ThunkGenerators.cpp:
(JSC::returnFromJavaScript):
(JSC::callToJavaScript):
* jit/ThunkGenerators.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening; Fix expected results for video-seek-with-negative-playback.html,
and modify the test to conform to media test style.

* media/video-seek-with-negative-playback-expected.txt:
* media/video-seek-with-negative-playback.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] History delegate
https://bugs.webkit.org/show_bug.cgi?id=123837

Reviewed by Sam Weinig.

* Shared/Cocoa/APIObject.mm:
(WebKit::APIObject::newObject): Allocate a WKNavigationData if the object is a
WebNavigationData.

* Shared/Cocoa/WKNSString.h:
(WebKit::wrapper): Added. Returns a WebString’s wrapper as an NSString.

* Shared/Cocoa/WKNSURL.h:
(WebKit::wrapper): Added. Returns a WebURL’s wrapper as an NSURL.

* UIProcess/API/C/WKNavigationData.cpp: Renamed.
* UIProcess/API/C/WKNavigationData.h: Renamed.
* UIProcess/API/C/WKNavigationDataRef.cpp: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.cpp.
* UIProcess/API/C/WKNavigationDataRef.h: Copied from Source/WebKit2/UIProcess/API/C/WKNavigationData.h.

* UIProcess/API/mac/WKBrowsingContextController.h: Declared historyDelegate property.

* UIProcess/API/mac/WKProcessGroup.mm:
(didNavigateWithNavigationData): Added history client callback that calls the browsing
context’s history delegate.
(didPerformClientRedirect): Ditto.
(didPerformServerRedirect): Ditto.
(didUpdateHistoryTitle): Ditto.
(setUpHistoryClient): Added.
(-[WKProcessGroup initWithInjectedBundleURL:]): Added call to setUpHistoryClient.
(-[WKProcessGroup dealloc]): Clear the history client.

* UIProcess/Cocoa/WKBrowsingContextHistoryDelegate.h: Added.

* UIProcess/Cocoa/WKNavigationData.h: Added.
* UIProcess/Cocoa/WKNavigationData.mm: Added.
(-[WKNavigationData dealloc]): Calls the WebNavigationData destructor.
(-[WKNavigationData title]): Added.
(-[WKNavigationData originalRequest]): Added.
(-[WKNavigationData destinationURL]): Added.
(-[WKNavigationData _apiObject]): Returns the wrapped WebNavigationData.
* UIProcess/Cocoa/WKNavigationDataInternal.h: Added.
(WebKit::wrapper): Added. Returns a WebNavigationData’s wrapper as a WKNavigationData.
* WebKit2.xcodeproj/project.pbxproj: Updated for renames and additions.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Providing new table related accessibility expectations after r158742
https://bugs.webkit.org/show_bug.cgi?id=123893

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-06
Reviewed by Chris Fleizach.

New baselines after added missing implementation in r158742.

* platform/efl-wk1/TestExpectations: Tests are no longer failing.
* platform/efl-wk2/TestExpectations: Tests are no longer failing.
* platform/efl-wk2/accessibility/table-attributes-expected.txt: Added.
* platform/efl-wk2/accessibility/table-sections-expected.txt: Added.
* platform/efl/accessibility/table-attributes-expected.txt: Added.
* platform/efl/accessibility/table-sections-expected.txt: Added.
* platform/gtk-wk2/accessibility/table-attributes-expected.txt: Added.
* platform/gtk-wk2/accessibility/table-sections-expected.txt: Added.
* platform/gtk/TestExpectations: Tests are no longer failing.
* platform/gtk/accessibility/table-attributes-expected.txt: Added.
* platform/gtk/accessibility/table-sections-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening. Media elements wrongly exposed after r158743.

* platform/gtk/TestExpectations: Added failure expectations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Promoted WKBrowsingContextHistoryDelegate.h to private.

Rubber-stamped by Sam Weinig.

* WebKit2.xcodeproj/project.pbxproj:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] accessibility/title-ui-element-correctness.html fails
https://bugs.webkit.org/show_bug.cgi?id=99825

Reviewed by Mario Sanchez Prada.

Source/WebCore:

When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
is added, adding proper label element as a relation. When the document structure
has been changed and a different label should be linked as a relation, current ATK
implementation adds it as a next target on relation's target list, while
WTR/DumpRenderTree implementation takes only first one into account.
This patch adds a new function removing current relations before adding new ones.

Covered by existing tests.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(removeAtkRelationFromRelationSetByType):
(setAtkRelationSetFromCoreObject):

LayoutTests:

Remove failure test expectation for the test fixed by this patch.

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move array position caching out from HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=123895

Reviewed by Darin Adler.

This caching complicates the logic but is used by a single subclass
(HTMLFormControlsCollection) only. The subclass can do the caching itself.

* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::create):
(WebCore::HTMLCollection::item):
(WebCore::HTMLCollection::elementBeforeOrAfterCachedElement):
(WebCore::HTMLCollection::firstElement):
        
    Renamed from traverseFirstElement.

(WebCore::HTMLCollection::traverseForwardToOffset):
(WebCore::HTMLCollection::invalidateCache):
        
    Make cache invalidation virtual so we can clear HTMLTableRowsCollection index cache.

(WebCore::HTMLCollection::namedItem):
(WebCore::HTMLCollection::updateNameCache):
        
    Use traverseForwardToOffset instead traverseNextElement. This allows removal of traverseNextElement.

* html/HTMLCollection.h:
(WebCore::HTMLCollection::usesCustomForwardOnlyTraversal):
        
    Renamed the enum and the accessor to be more informative.

(WebCore::HTMLCollection::setCachedElement):
(WebCore::HTMLCollection::customElementAfter):
        
    Renamed from virtualItemAfter.

* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::findFormAssociatedElement):
(WebCore::HTMLFormControlsCollection::customElementAfter):
        
    Move the array position caching logic here.

(WebCore::HTMLFormControlsCollection::invalidateCache):
* html/HTMLFormControlsCollection.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
(WebCore::HTMLTableRowsCollection::customElementAfter):
* html/HTMLTableRowsCollection.h:



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