[iOS] Add iOS-specific tests and consolidate iOS-specific accessibility tests
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jan 2015 22:14:09 +0000 (22:14 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jan 2015 22:14:09 +0000 (22:14 +0000)
Copied iOS-specific tests from directory LayoutTests/platform/ios-sim-deprecated/iphone
to LayoutTests/platform/ios-simulator/ios and fixed references to external JavaScript
scripts and external style sheets. Moved iOS-specific tests in directories LayoutTests/platform/ios-sim/accessibility
and LayoutTests/platform/ios-simulator/ios-accessibility into LayoutTests/platform/ios-simulator/ios/accessibility.

I will remove directory LayoutTests/platform/ios-sim-deprecated, including
LayoutTests/platform/ios-sim-deprecated/iphone, in a subsequent commit.

* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt.
* platform/ios-simulator/ios/accessibility/press-fires-touch-events.html: Renamed from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html.
* platform/ios-simulator/ios/accessibility/set-value-expected.txt: Copied from LayoutTests/platform/ios-sim/accessibility/set-value-expected.txt.
* platform/ios-simulator/ios/accessibility/set-value.html: Renamed from LayoutTests/platform/ios-sim/accessibility/set-value.html.
* platform/ios-simulator/ios/compositing/overlap-page-scale-expected.txt: Added.
[...]

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

253 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator-wk2/TestExpectations
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt [moved from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt with 100% similarity]
LayoutTests/platform/ios-simulator/ios/accessibility/press-fires-touch-events.html [moved from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html with 88% similarity]
LayoutTests/platform/ios-simulator/ios/accessibility/set-value-expected.txt [moved from LayoutTests/platform/ios-sim/accessibility/set-value-expected.txt with 100% similarity]
LayoutTests/platform/ios-simulator/ios/accessibility/set-value.html [moved from LayoutTests/platform/ios-sim/accessibility/set-value.html with 84% similarity]
LayoutTests/platform/ios-simulator/ios/compositing/overlap-page-scale-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/compositing/overlap-page-scale.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/css/construct-WebKitCSSMatrix-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/css/construct-WebKitCSSMatrix.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/css/construct-WebKitPoint-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/css/construct-WebKitPoint.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/css/resources/TEMPLATE.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/css/resources/construct-WebKitCSSMatrix.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/css/resources/construct-WebKitPoint.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/borders/thin-lozenge-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/borders/thin-lozenge.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/canvas/image_subSampling_scale-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/canvas/image_subSampling_scale.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/canvas/resources/image_subSampling_scale.jpg [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/document-elementFromPoint-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/document-elementFromPoint.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/element-client-rects-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/element-client-rects.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-quirks-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-quirks.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/page-offsets-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/page-offsets.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/range-client-rects-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/range-client-rects.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/resources/helpers.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/TEMPLATE.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/element-client-rects.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/inner-window-sizes.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/mouse-event-zoomed.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/mouse-event.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/page-offsets.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/range-client-rects.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/touch-event-zoomed.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/touch-event.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/css/script-tests/TEMPLATE.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/css/script-tests/webkit-overflow-scrolling-parsing.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/css/webkit-overflow-scrolling-parsing-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/css/webkit-overflow-scrolling-parsing.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/document-create-touch-list-ios-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/document-create-touch-list-ios.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/gesture-event-basic-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/gesture-event-basic.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/input-touch-target.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/inserted-fragment-touch-target-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/inserted-fragment-touch-target.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/misc-touch-helpers.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/moved-touch-target-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/moved-touch-target.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/multi-touch-some-without-handlers.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/ontouchstart-active-selector.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-fragment-touch-target-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-fragment-touch-target.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-touch-target-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-touch-target.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/TEMPLATE.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/document-create-touch-list-ios.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/input-touch-target.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/multi-touch-some-without-handlers.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/text-node-touch-target.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/textarea-touch-target.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/touch-event-frames.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/touch-event-pageXY.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/zoomed-touch-event-pageXY.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/text-node-touch-target.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/textarea-touch-target.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-frames-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-frames.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-pageXY-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-pageXY.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/zoomed-touch-event-pageXY-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/events/touch/zoomed-touch-event-pageXY.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/absolute-over-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/absolute-over-fixed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/auto-position-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/auto-position-fixed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/fixed-in-transform-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/fixed-in-transform.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/four-bars-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/four-bars.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/frame-with-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/frame-with-fixed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/overlay-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/overlay-fixed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/fixed/resources/subframe.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/flexbox/vertical-box-form-controls-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/flexbox/vertical-box-form-controls.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-attribute-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-attribute.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/borderless-input-gradient-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/borderless-input-gradient.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/date-input-decorations-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/date-input-decorations.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/form-controls-on-backgrounds-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/form-controls-on-backgrounds.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-container-touches-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-container-touches.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-readonly-and-disabled.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-touches-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-touches.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/short-slider-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/forms/short-slider.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/history/resources/page-cache-helper.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/TEMPLATE.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/page-cache-geolocation.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/js/clearTimeout-crash-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/js/clearTimeout-crash.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/loader/subresource-willSendRequest-null-prevents-load-event-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/loader/subresource-willSendRequest-null-prevents-load-event.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/media/media-no-src-attribute-parsing-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/media/media-no-src-attribute-parsing.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/media/video-inline-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/media/video-inline.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/parser/block-nesting-cap-iphone-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/parser/block-nesting-cap-iphone.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/parser/resources/block-nesting-cap.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/apple-logo-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/apple-logo.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/combining-enclosing-keycap-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/combining-enclosing-keycap.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/resources/phone-disabled.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/resources/phone.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/emoji-complextext-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/emoji-complextext.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/emoji-text-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/emoji-text.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/line-breaking-with-kerning-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/line-breaking-with-kerning.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/mid-word-break-before-combining-mark-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/mid-word-break-before-combining-mark.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/opticalFont-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/opticalFont.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithWeight-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/opticalFontWithWeight.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/textStylesWithSizes-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/textStylesWithSizes.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/underline-scaling-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fast/text/underline-scaling.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/absolute-inside-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/absolute-inside-fixed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixed-back-forward-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixed-back-forward.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixed-position-out-of-view-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixed-position-out-of-view-negative-zindex-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixed-position-out-of-view-negative-zindex.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixed-position-out-of-view.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-canvas-assertion-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-canvas-assertion.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-remove-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-remove.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-toggle-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-toggle.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-unload-cached-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-unload-cached.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-unload-uncached-crash-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/fixpos-unload-uncached-crash.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/four-bars-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/four-bars.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/nested-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/nested-fixed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/percentage-inside-fixed-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/percentage-inside-fixed.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/resources/fixpos-unload-final.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/fixed/resources/jump-back.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/getComputedStyle-text-decoration-letterpress-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/getComputedStyle-text-decoration-letterpress.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/limits/no-image-limit-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/limits/no-image-limit.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/limits/resources/image.png [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/resources/getComputedStyle-text-decoration-letterpress.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/clipping-ancestor-with-accelerated-scrolling-ancestor-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/clipping-ancestor-with-accelerated-scrolling-ancestor.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/iframe-inside-overflow-clipping-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/iframe-inside-overflow-clipping.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-clip-with-accelerated-scrolling-ancestor-expected.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-clip-with-accelerated-scrolling-ancestor.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-div-scrolling-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-div-scrolling.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-inherited-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-inherited.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-touch-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scroll-touch.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-size-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-size.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/remove-overflow-crash-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/remove-overflow-crash.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/resources/jump-back.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/script-tests/TEMPLATE.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/script-tests/overflow-div-scrolling.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scroll-event-from-scrollTo-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scroll-event-from-scrollTo.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward-after-pageshow-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward-after-pageshow.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scroll-events-back-forward.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scrollTo-at-page-load-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scrollTo-at-page-load.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scrollbar-hiding-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scrollbar-hiding.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scrolling-content-clip-to-viewport-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/scrolling-content-clip-to-viewport.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/table-cell-touch-scrolling-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/table-cell-touch-scrolling.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/textarea-scroll-touch-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/textarea-scroll-touch.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/touch-scroll-back-forward-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/touch-scroll-back-forward.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/touch-stacking-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/scrolling/touch-stacking.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/storage/domstorage/5mb-quota-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/storage/domstorage/5mb-quota.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/construct-Touch-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/construct-Touch.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/construct-TouchList-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/construct-TouchList.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/resources/TEMPLATE.html [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/resources/construct-Touch.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/resources/construct-TouchList.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/resources/touch-handler-on-window.js [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/touch-handler-on-window-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/touch-handler-on-window.html [new file with mode: 0644]

index 4027f32..2df172f 100644 (file)
@@ -1,3 +1,24 @@
+2015-01-09  Daniel Bates  <dabates@apple.com>
+
+        [iOS] Add iOS-specific tests and consolidate iOS-specific accessibility tests
+
+        Copied iOS-specific tests from directory LayoutTests/platform/ios-sim-deprecated/iphone
+        to LayoutTests/platform/ios-simulator/ios and fixed references to external JavaScript
+        scripts and external style sheets. Moved iOS-specific tests in directories LayoutTests/platform/ios-sim/accessibility
+        and LayoutTests/platform/ios-simulator/ios-accessibility into LayoutTests/platform/ios-simulator/ios/accessibility.
+
+        I will remove directory LayoutTests/platform/ios-sim-deprecated, including
+        LayoutTests/platform/ios-sim-deprecated/iphone, in a subsequent commit.
+
+        * platform/ios-simulator-wk2/TestExpectations:
+        * platform/ios-simulator/TestExpectations:
+        * platform/ios-simulator/ios/accessibility/press-fires-touch-events-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events-expected.txt.
+        * platform/ios-simulator/ios/accessibility/press-fires-touch-events.html: Renamed from LayoutTests/platform/ios-simulator/ios-accessibility/press-fires-touch-events.html.
+        * platform/ios-simulator/ios/accessibility/set-value-expected.txt: Copied from LayoutTests/platform/ios-sim/accessibility/set-value-expected.txt.
+        * platform/ios-simulator/ios/accessibility/set-value.html: Renamed from LayoutTests/platform/ios-sim/accessibility/set-value.html.
+        * platform/ios-simulator/ios/compositing/overlap-page-scale-expected.txt: Added.
+        [...]
+
 2015-01-09  Andreas Kling  <akling@apple.com>
 
         Mark css3/background/background-repeat-space-content.html as ImgaeOnlyFailure
index 208af25..6311f24 100644 (file)
@@ -1919,6 +1919,70 @@ editing/unsupported-content/table-delete-002.html [ Failure Pass ]
 editing/unsupported-content/table-type-after.html [ Failure Pass ]
 editing/unsupported-content/table-type-before.html [ Failure Pass ]
 
+# iOS-specific tests that fail:
+platform/ios-simulator/ios/compositing/overlap-page-scale.html [ Failure ]
+platform/ios-simulator/ios/fast/fixed/absolute-over-fixed.html [ Failure ]
+platform/ios-simulator/ios/fast/fixed/fixed-in-transform.html [ Failure ]
+platform/ios-simulator/ios/fast/fixed/four-bars.html [ Failure ]
+platform/ios-simulator/ios/fast/fixed/frame-with-fixed.html [ Failure ]
+platform/ios-simulator/ios/fast/fixed/overlay-fixed.html [ Failure ]
+platform/ios-simulator/ios/fast/forms/borderless-input-gradient.html [ Failure ]
+platform/ios-simulator/ios/fast/forms/date-input-decorations.html [ Failure ]
+platform/ios-simulator/ios/fast/forms/form-controls-on-backgrounds.html [ Failure ]
+platform/ios-simulator/ios/fast/text/emoji-complextext.html [ Failure ]
+platform/ios-simulator/ios/fast/text/emoji-text.html [ Failure ]
+platform/ios-simulator/ios/fast/text/line-breaking-with-kerning.html [ Failure ]
+platform/ios-simulator/ios/fast/text/mid-word-break-before-combining-mark.html [ Failure ]
+platform/ios-simulator/ios/fast/text/opticalFont.html [ Failure ]
+platform/ios-simulator/ios/fast/text/opticalFontWithTextStyle.html [ Failure ]
+platform/ios-simulator/ios/fast/text/opticalFontWithWeight.html [ Failure ]
+platform/ios-simulator/ios/fast/text/textStylesWithSizes.html [ Failure ]
+platform/ios-simulator/ios/fixed/absolute-inside-fixed.html [ Failure ]
+platform/ios-simulator/ios/fixed/four-bars.html [ Failure ]
+platform/ios-simulator/ios/fixed/nested-fixed.html [ Failure ]
+platform/ios-simulator/ios/fixed/percentage-inside-fixed.html [ Failure ]
+platform/ios-simulator/ios/scrolling/clipping-ancestor-with-accelerated-scrolling-ancestor.html [ Failure ]
+platform/ios-simulator/ios/scrolling/overflow-scroll-touch.html [ Failure ]
+platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip-size.html [ Failure ]
+platform/ios-simulator/ios/scrolling/overflow-scrolling-ancestor-clip.html [ Failure ]
+platform/ios-simulator/ios/scrolling/scrollbar-hiding.html [ Failure ]
+platform/ios-simulator/ios/scrolling/scrolling-content-clip-to-viewport.html [ Failure ]
+platform/ios-simulator/ios/scrolling/textarea-scroll-touch.html [ Failure ]
+platform/ios-simulator/ios/scrolling/touch-stacking.html [ Failure ]
+platform/ios-simulator/ios/storage/domstorage/5mb-quota-expected.txt [ Failure ]
+
+# iOS-specific tests that time out:
+platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed.html
+platform/ios-simulator/ios/fast/coordinates/mouse-event.html
+
+# iOS-specific tests that time out in WebKitTestRunner due to missing DRT-specific functionality:
+platform/ios-simulator/ios/accessibility
+platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed.html
+platform/ios-simulator/ios/fast/coordinates/touch-event.html
+platform/ios-simulator/ios/fast/events/touch/input-touch-target.html
+platform/ios-simulator/ios/fast/events/touch/inserted-fragment-touch-target.html
+platform/ios-simulator/ios/fast/events/touch/moved-touch-target.html
+platform/ios-simulator/ios/fast/events/touch/multi-touch-some-without-handlers.html
+platform/ios-simulator/ios/fast/events/touch/ontouchstart-active-selector.html
+platform/ios-simulator/ios/fast/events/touch/removed-fragment-touch-target.html
+platform/ios-simulator/ios/fast/events/touch/removed-touch-target.html
+platform/ios-simulator/ios/fast/events/touch/text-node-touch-target.html
+platform/ios-simulator/ios/fast/events/touch/textarea-touch-target.html
+platform/ios-simulator/ios/fast/events/touch/touch-event-frames.html
+platform/ios-simulator/ios/fast/events/touch/touch-event-pageXY.html
+platform/ios-simulator/ios/fast/events/touch/zoomed-touch-event-pageXY.html
+platform/ios-simulator/ios/fast/forms/range-input-container-touches.html
+platform/ios-simulator/ios/fast/forms/range-input-readonly-and-disabled.html
+platform/ios-simulator/ios/fast/forms/range-input-touches.html
+platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html
+platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled.html
+platform/ios-simulator/ios/fast/text/data-detectors/phone.html
+
+# iOS tests that assert:
+platform/ios-simulator/ios/fast/text/combining-enclosing-keycap.html
+platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html
+platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html
+
 # Flaky tests:
 compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html [ Failure Pass ]
 compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html [ Failure Pass ]
index 2421948..b9b633c 100644 (file)
@@ -2526,12 +2526,6 @@ fast/dom/location-new-window-no-crash.html
 fast/events/message-port-inactive-document.html
 
 ###
-# Temporarily skip all others tests
-# We'll un-skip each directory as we land updated/new expected results
-##
-platform
-
-###
 # Mark as passing specific tests in folders that were skipped temporarily above.
 ##
 webkit.org/b/138970 fast/css/line-height-text-autosizing.html [ Pass ]
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../../../resources/js-test-pre.js"></script>
 <script>
 var successfullyParsed = false;
 if (window.testRunner)
@@ -40,7 +40,7 @@ function touchStart(event) {
     successfullyParsed = true;
 </script>
 
-<script src="../../../resources/js-test-post.js"></script>
+<script src="../../../../resources/js-test-post.js"></script>
 
 </body>
 </html>
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src="../../../resources/js-test-pre.js"></script>
+<script src="../../../../resources/js-test-pre.js"></script>
 <script>
 var successfullyParsed = false;
 </script>
@@ -28,7 +28,7 @@ var successfullyParsed = false;
     successfullyParsed = true;
 </script>
 
-<script src="../../../resources/js-test-post.js"></script>
+<script src="../../../../resources/js-test-post.js"></script>
 </body>
 </html>
 
diff --git a/LayoutTests/platform/ios-simulator/ios/compositing/overlap-page-scale-expected.txt b/LayoutTests/platform/ios-simulator/ios/compositing/overlap-page-scale-expected.txt
new file mode 100644 (file)
index 0000000..f611455
--- /dev/null
@@ -0,0 +1,32 @@
+(GraphicsLayer
+  (bounds 1021.00 779.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 1021.00 779.00)
+      (children 2
+        (GraphicsLayer
+          (position 9.00 9.00)
+          (bounds 900.00 729.00)
+          (children 1
+            (GraphicsLayer
+              (position 50.00 614.00)
+              (bounds 800.00 140.00)
+            )
+          )
+        )
+        (GraphicsLayer
+          (position 9.00 9.00)
+          (bounds 900.00 729.00)
+          (children 1
+            (GraphicsLayer
+              (position 0.00 629.00)
+              (bounds 800.00 100.00)
+              (contentsOpaque 1)
+            )
+          )
+        )
+      )
+    )
+  )
+)
+
diff --git a/LayoutTests/platform/ios-simulator/ios/compositing/overlap-page-scale.html b/LayoutTests/platform/ios-simulator/ios/compositing/overlap-page-scale.html
new file mode 100644 (file)
index 0000000..1038950
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+  <meta name="viewport" content="initial-scale=0.783673465, minimum-scale=0.783673465, maximum-scale=0.783673465">
+  <style type="text/css" media="screen">
+    #main {
+      width: 900px;
+      overflow: hidden;
+      border: 1px solid black;
+    }
+    
+    #hero {
+      position: relative;
+      width: 800px;
+      height: 754px;
+      margin: 0 auto;
+      background-color: #DDD;
+    }
+    
+    .bottom-shadow {
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      height: 140px;
+      width: 800px;
+      background-color: rgba(255, 255, 255, 0.5);
+      -webkit-transform: translateZ(0);
+    }
+    
+    .content {
+      position: relative;
+      width: 800px;
+      height: 100px;
+      margin-top: -125px;
+      background-color: gray;
+    }
+    
+  </style>
+  <script type="text/javascript" charset="utf-8">
+    if (window.testRunner) {
+      testRunner.dumpAsText();
+      // testRunner.waitUntilDone();
+    }
+    function dumpLayers()
+    {
+      if (window.testRunner)
+        document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
+    }
+    window.addEventListener('load', dumpLayers, false);
+  </script>
+</head>
+<body>
+
+  <div id="main">
+    <header id="hero">
+      <div class="bottom-shadow"></div>
+    </header>
+    <div class="content"></div>
+  </div>
+<pre id="layers">Layers go here in DRT</pre>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitCSSMatrix-expected.txt b/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitCSSMatrix-expected.txt
new file mode 100644 (file)
index 0000000..9748103
--- /dev/null
@@ -0,0 +1,12 @@
+Test constructor for WebKitCSSMatrix. <rdar://problem/6481690>
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix) is 'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'
+PASS WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix(new WebKitCSSMatrix)) is 'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'
+PASS WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix('matrix3d(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000)')) is 'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitCSSMatrix.html b/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitCSSMatrix.html
new file mode 100644 (file)
index 0000000..89ffb56
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+}
+</script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/construct-WebKitCSSMatrix.js"></script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitPoint-expected.txt b/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitPoint-expected.txt
new file mode 100644 (file)
index 0000000..4cfe03d
--- /dev/null
@@ -0,0 +1,13 @@
+Test constructor for WebKitPoint. <rdar://problem/6481690>
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS WebKitPoint.prototype.toString.call(new WebKitPoint) is '[object WebKitPoint]'
+PASS WebKitPoint.prototype.toString.call(new WebKitPoint(0)) is '[object WebKitPoint]'
+PASS WebKitPoint.prototype.toString.call(new WebKitPoint(1, 1)) is '[object WebKitPoint]'
+PASS WebKitPoint.prototype.toString.call(new WebKitPoint(1, 2, 3)) is '[object WebKitPoint]'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitPoint.html b/LayoutTests/platform/ios-simulator/ios/css/construct-WebKitPoint.html
new file mode 100644 (file)
index 0000000..411d861
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+}
+</script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/construct-WebKitPoint.js"></script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/css/resources/TEMPLATE.html b/LayoutTests/platform/ios-simulator/ios/css/resources/TEMPLATE.html
new file mode 100644 (file)
index 0000000..a1e8051
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../resources/js-test-pre.js"></script>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+}
+</script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+<script src="../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/css/resources/construct-WebKitCSSMatrix.js b/LayoutTests/platform/ios-simulator/ios/css/resources/construct-WebKitCSSMatrix.js
new file mode 100644 (file)
index 0000000..915a982
--- /dev/null
@@ -0,0 +1,14 @@
+description(
+'Test constructor for WebKitCSSMatrix.  &lt;<a href="rdar://problem/6481690">rdar://problem/6481690</a>&gt;'
+);
+
+shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix)",
+         "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
+
+shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix(new WebKitCSSMatrix))",
+         "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
+
+shouldBe("WebKitCSSMatrix.prototype.toString.call(new WebKitCSSMatrix('matrix3d(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000)'))",
+         "'matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)'");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/css/resources/construct-WebKitPoint.js b/LayoutTests/platform/ios-simulator/ios/css/resources/construct-WebKitPoint.js
new file mode 100644 (file)
index 0000000..e2ade10
--- /dev/null
@@ -0,0 +1,10 @@
+description(
+'Test constructor for WebKitPoint.  &lt;<a href="rdar://problem/6481690">rdar://problem/6481690</a>&gt;'
+);
+
+shouldBe("WebKitPoint.prototype.toString.call(new WebKitPoint)", "'[object WebKitPoint]'");
+shouldBe("WebKitPoint.prototype.toString.call(new WebKitPoint(0))", "'[object WebKitPoint]'");
+shouldBe("WebKitPoint.prototype.toString.call(new WebKitPoint(1, 1))", "'[object WebKitPoint]'");
+shouldBe("WebKitPoint.prototype.toString.call(new WebKitPoint(1, 2, 3))", "'[object WebKitPoint]'");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/borders/thin-lozenge-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/borders/thin-lozenge-expected.txt
new file mode 100644 (file)
index 0000000..2c63e4a
--- /dev/null
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x8
+  RenderBlock {HTML} at (0,0) size 800x8
+    RenderBody {BODY} at (8,8) size 784x0
+layer at (8,8) size 11x12
+  RenderBlock (positioned) {DIV} at (0,0) size 11x12 [bgcolor=#0000007F] [border: (1px solid #FFFFFF7F) none (1px solid #FFFFFF7F)]
+layer at (8,8) size 1x12
+  RenderBlock (positioned) {DIV} at (0,0) size 1x12 [bgcolor=#0000007F] [border: (1px solid #FFFFFF7F) none (1px solid #FFFFFF7F) none]
+layer at (8,8) size 11x12
+  RenderBlock (positioned) {DIV} at (0,0) size 11x12 [bgcolor=#0000007F] [border: (1px solid #FFFFFF7F) none]
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/borders/thin-lozenge.html b/LayoutTests/platform/ios-simulator/ios/fast/borders/thin-lozenge.html
new file mode 100644 (file)
index 0000000..c1e85fe
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html>
+
+  <head>
+    <meta name="viewport" content="initial-scale=1.0">
+
+    <style type="text/css">
+      .scroll-indicator {
+        -webkit-transform: translate(0, 0);
+      }
+
+      .scroll-indicator > div {
+        position: absolute;
+        top: 0;
+        left: 0;
+        -webkit-transform: translate(0, 0);
+        -webkit-transform-origin: left top;
+      }
+
+      .scroll-indicator > div {
+        width: 10px;
+        height: 10px;
+        background-color: rgba(0,0,0,0.5);
+        border: 1px solid rgba(255,255,255,0.5);
+      }
+
+      /* left cap */
+      .scroll-indicator > div:nth-of-type(1) {
+        -webkit-border-top-left-radius: 5px;
+        -webkit-border-bottom-left-radius: 5px;
+        border-right-width: 0;
+      }
+
+      /* middle cap */
+      .scroll-indicator > div:nth-of-type(2) {
+        width: 1px;
+        -webkit-transform: translateX(11px) scaleX(100);
+        border-left-width: 0;
+        border-right-width: 0;
+      }
+
+      /* right cap */
+      .scroll-indicator > div:nth-of-type(3) {
+        -webkit-transform: translateX(111px);
+        -webkit-border-top-right-radius: 5px;
+        -webkit-border-bottom-right-radius: 5px;
+        border-left-width: 0;
+      }
+      
+    </style>
+
+  </head>
+
+  <body>
+
+    <div class="scroll-indicator">
+      <div></div>
+      <div></div>
+      <div></div>
+    </div>
+
+  </body>
+
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/canvas/image_subSampling_scale-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/canvas/image_subSampling_scale-expected.txt
new file mode 100644 (file)
index 0000000..1ddb7bf
--- /dev/null
@@ -0,0 +1,2 @@
+ PASS getPixel(62,62) is [0,0,0,255]
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/canvas/image_subSampling_scale.html b/LayoutTests/platform/ios-simulator/ios/fast/canvas/image_subSampling_scale.html
new file mode 100644 (file)
index 0000000..ecd0a33
--- /dev/null
@@ -0,0 +1,55 @@
+<html>
+<head>
+<meta name="viewport" content="width=980 initial-scale=0.5">
+
+<script src="../../../../../resources/js-test-pre.js"></script>
+
+<script>
+function dataToArray(data) {
+    var result = new Array(data.length)
+    for (var i = 0; i < data.length; i++)
+        result[i] = data[i];
+    return result;
+}
+
+function getPixel(x, y) {
+    var canvas = document.getElementById("cc");
+    var context = canvas.getContext('2d');
+    var data = context.getImageData(x,y,1,1);
+    if (!data) // getImageData failed, which should never happen
+        return [-1,-1,-1,-1];
+    return dataToArray(data.data);
+}
+
+function pixelShouldBe(x, y, colour) {
+    shouldBe("getPixel(" + [x, y] +")", "["+colour+"]");
+}
+
+var draw = function() {
+  var ctx = document.getElementById('cc').getContext('2d');
+  var timg = new Image()
+  timg.onload = function() {
+    ctx.setFillColor(1, 1, 1, 1);
+    ctx.fillRect(0,0,256,256);
+    ctx.drawImage(timg, 0,0, 128, 128, 0, 0, 63, 63);
+    ctx.drawImage(timg, 0,0, 128, 128, 128, 0, 65,65);
+
+    pixelShouldBe(62, 62, [0, 0, 0, 255]);
+
+    // finish test
+    if (window.testRunner) {
+        testRunner.notifyDone();
+    }
+  };
+  timg.src = "./resources/image_subSampling_scale.jpg";
+ };
+</script>
+</head>
+<body>
+<canvas id="cc" width="256" height="128"></canvas>
+<div id="console"></div>
+<script>
+draw();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/canvas/resources/image_subSampling_scale.jpg b/LayoutTests/platform/ios-simulator/ios/fast/canvas/resources/image_subSampling_scale.jpg
new file mode 100644 (file)
index 0000000..35f4a01
Binary files /dev/null and b/LayoutTests/platform/ios-simulator/ios/fast/canvas/resources/image_subSampling_scale.jpg differ
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/document-elementFromPoint-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/document-elementFromPoint-expected.txt
new file mode 100644 (file)
index 0000000..ac37fce
--- /dev/null
@@ -0,0 +1,18 @@
+Absolute
+Relative
+Fixed
+x      x
+Table Content
+In Columns
+Transformed
+In RTL overflow
+PASS: event at (109, 57) hit absolute at offset (29, 32)
+PASS: event at (161, 13) hit relative at offset (31, 28)
+PASS: event at (40, 297) hit table-content at offset (15, 18)
+PASS: event at (122, 407) hit transformed at offset (18, 15)
+PASS: event at (573, 480) hit inside-overflow at offset (2, 9)
+FAIL: event at (707, 174) expected to hit in-columns at (88, 13) but hit at (87, 13)
+FAIL: event at (241, 67) expected to hit fixed at (41, 17) but hit relative at (111, 82)
+FAIL: event at (244, 102) expected to hit fixed at (44, 52) but hit relative at (114, 117)
+FAIL: event at (388, 88) expected to hit fixed at (188, 38) but hit filler at (408, 188)
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/document-elementFromPoint.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/document-elementFromPoint.html
new file mode 100644 (file)
index 0000000..3f5cabd
--- /dev/null
@@ -0,0 +1,292 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1">
+<style>
+* {
+    margin: 0;
+    padding: 0;
+}
+
+body {
+    height: 2048px;
+    width: 2048px;
+    cursor: crosshair; /* Debugging */
+}
+
+.box {
+    width: 200px;
+    height: 100px;
+    border: 10px solid gray;
+}
+
+.line {
+    width:150px;
+    height:20px;
+    background: gray;
+}
+
+.target {
+    background: lightGreen !important; /* Elements we click on are green */
+}
+
+#absolute {
+    position: absolute;
+    left: 100px;
+    top: 125px;
+}
+
+#relative {
+    position: relative;
+    left: 40px;
+    top: -50px;
+}
+
+#fixed {
+    position: fixed;
+    top: 50px;
+    left: 200px;
+    height: 50px;
+}
+
+#filler {
+    position: absolute;
+    top: 0;
+    width: 100%;
+    height: 100%;
+}
+
+table {
+    margin-top: 300px;
+    margin-left: 40px;
+    width: 400px;
+}
+
+th { height: 30px; }
+
+#table-content {
+    position: relative;
+    border: 10px solid gray;
+}
+
+#columns {
+    position: absolute;
+    width: 400px;
+    height: 200px;
+    top: 220px;
+    left: 500px;
+    border: 1px solid black;
+    -webkit-column-count: 3;
+}
+
+.column-line {
+    width: 100px;
+    height: 20px;
+    background: gray;
+}
+
+#transformed {
+    position: absolute;
+    top: 470px;
+    height: 120px;
+    width: 200px;
+    -webkit-transform: translate(100px, 50px) rotate(20deg);
+}
+
+#overflow {
+    overflow: hidden; /* No scrollbars */
+    position: absolute;
+    width: 300px;
+    height: 200px;
+    top: 450px;
+    left: 470px;
+    border: 1px solid black;
+    direction: rtl;
+}
+
+#overflow-contents {
+    height: 500px;
+    width: 120%;
+}
+
+#inside-overflow {
+    height: 550px;
+    width: 50%;
+}
+
+#results {
+    position: absolute;
+    left: 30px;
+    top: 750px;
+}
+
+#mouse-position {
+    position: absolute;
+    left: 30px;
+    top: 670px;
+    color: gray;
+}
+</style>
+</head>
+<body>
+    
+<!--
+  This test is modeled after <LayoutTests/fast/events/offsetX-offsetY.html>,
+  but it is designed to not depend on inline text content to position the
+  targets on which we click. iOS was failing that test due to text run
+  and line-height differences.
+-->
+
+<!-- Filler, to force scrolling -->
+<div id="filler"></div>
+
+<!-- Absolute, Relative, and Fixed position -->
+<div id="absolute" class="box target">
+    <span style="position:absolute;left:0;top:0">Absolute</span>
+    <div id="relative" class="box target">Relative</div>
+    <div id="fixed" class="box target">Fixed</div>
+</div>
+
+<!-- Table -->
+<table id="table" border="2" cellpadding="3" cellpadding="2">
+    <tr><th>x</th><th>x</th></tr>
+    <tr>
+        <td><div id="table-content" class="line target">Table Content</div></td>
+        <td>
+            <div class="line"></div><div class="line"></div>
+            <div class="line"></div><div class="line"></div>
+            <div class="line"></div><div class="line"></div>
+        </td>
+    </tr>
+</table>
+
+<!-- Columns -->
+<div id="columns">
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div id="in-columns" class="column-line target">In Columns</div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+    <div class="column-line"></div><div class="column-line"></div>
+</div>
+
+<!-- Transformed -->
+<div id="transformed" class="box target">Transformed</div>
+
+<!-- Overflowed Content -->
+<div id="overflow">
+    <div id="overflow-contents">
+        <div class="line"></div><div class="line"></div><div class="line"></div>
+        <div class="line"></div><div class="line"></div><div class="line"></div>
+        <div class="line"></div><div class="line"></div><div class="line"></div>
+        <div id="inside-overflow" class="target">In RTL overflow</div>
+        <div class="line"></div><div class="line"></div><div class="line"></div>
+    </div>
+</div>
+
+<!-- Debugging -->
+<div id="results"></div>
+<div id="mouse-position"></div>
+
+<script>
+// Debug mode.
+if (!window.testRunner) {
+    document.body.onmousemove = function(e) {
+        var resultBox = document.getElementById('mouse-position');
+        var offsets = 'element id: ' + e.target.id + '<br> clientX: ' + e.clientX + ' clientY: ' + e.clientY + '<br>';
+        offsets += 'offsetX: ' + e.offsetX + ' offsetY: ' + e.offsetY;
+        resultBox.innerHTML = offsets;
+    }
+    document.body.ontouchstart = function(e) {
+        var touch = e.touches[0];
+        var resultBox = document.getElementById('mouse-position');
+        var clientRect = e.target.getBoundingClientRect();
+        var offsets = 'element id: ' + e.target.id + '<br>';
+        offsets += 'clientX: ' + touch.clientX + ' clientY: ' + touch.clientY + '<br>';
+        offsets += '~offsetX: ' + (clientRect.left - touch.clientX) + ' ~offsetY: ' + (clientRect.top - touch.clientY);
+        resultBox.innerHTML = offsets;
+        // Do not prevent default, so we can scroll.
+    }
+}
+
+function log(s) {
+    var resultsDiv = document.getElementById('results');
+    resultsDiv.innerHTML += s + '<br>';
+}
+
+function dispatchEvent(clientX, clientY, expectedElementID, expectedOffsetX, expectedOffsetY) {
+    var e = document.createEvent("MouseEvent");
+    e.initMouseEvent("click", true, true, window, 1, 1, 1, clientX, clientY, false, false, false, false, 0, document);
+    e.expectedElementID = expectedElementID;
+    e.expectedOffsetX = expectedOffsetX;
+    e.expectedOffsetY = expectedOffsetY;
+    var target = document.elementFromPoint(e.clientX, e.clientY);
+    target.dispatchEvent(e);   
+}
+
+function clicked(event) {
+    var element = event.target;
+    var result;
+    if (element.id === event.expectedElementID && event.offsetX === event.expectedOffsetX && event.offsetY === event.expectedOffsetY) {
+        result = 'PASS:';
+        result += ' event at (' + event.clientX + ', ' + event.clientY + ')';
+        result += ' hit ' + element.id;
+        result += ' at offset (' + event.offsetX + ', ' + event.offsetY + ')';
+    } else {
+        result = 'FAIL:';
+        result += ' event at (' + event.clientX + ', ' + event.clientY + ')';
+        result += ' expected to hit ' + event.expectedElementID;
+        result += ' at (' + event.expectedOffsetX + ', ' + event.expectedOffsetY + ')';
+        result += ' but hit ' + element.id + ' at (' + event.offsetX + ', ' + event.offsetY + ')';
+    }
+    log(result);
+}
+
+if (window.testRunner) {
+    window.testRunner.dumpAsText();
+    window.testRunner.waitUntilDone();
+}
+
+// Start the test.
+document.body.addEventListener('click', clicked, false);
+window.addEventListener('load', function() {
+    setTimeout(function() {
+        // Scroll body and inner overflow box.
+        window.scrollTo(20, 100);
+        var overflowContent = document.getElementById('overflow');
+        overflowContent.scrollLeft = 80;
+        overflowContent.scrollTop = 60;
+        setTimeout(function() {
+            // Dispatch events.
+            dispatchEvent(109, 57, 'absolute', 29, 32);
+            dispatchEvent(161, 13, 'relative', 31, 28);
+            dispatchEvent(40, 297, 'table-content', 15, 18);
+            dispatchEvent(122, 407, 'transformed', 18, 15);
+            dispatchEvent(573, 480, 'inside-overflow', 2, 9);
+            dispatchEvent(707, 174, 'in-columns', 88, 13);
+
+            // FIXME: Fixed position content not getting hit correctly.
+            // NOTE: This is flakey, but works when user driven in MobileSafari
+            // in the simulator if not the first page load.
+            // <rdar://problem/9520772> document.elementFromPoint sometimes fails with fixed position content
+            dispatchEvent(241, 67, 'fixed', 41, 17);
+            dispatchEvent(244, 102, 'fixed', 44, 52);
+            dispatchEvent(388, 88, 'fixed', 188, 38);
+
+            // End asynchronous test.
+            if (window.testRunner)
+                window.testRunner.notifyDone();
+        }, 0);
+    }, 0);
+}, false);
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/element-client-rects-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/element-client-rects-expected.txt
new file mode 100644 (file)
index 0000000..a6685eb
--- /dev/null
@@ -0,0 +1,33 @@
+This tests Element.getBoundingClientRects and getClientRects positions when unscaled, scaled, and panned.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+unscaled
+PASS clientRect.left is 100
+PASS clientRect.right is 200
+PASS clientRect.top is 100
+PASS clientRect.bottom is 200
+PASS clientRect.width is 100
+PASS clientRect.height is 100
+PASS clientRect.left is 100
+PASS clientRect.right is 200
+PASS clientRect.top is 100
+PASS clientRect.bottom is 200
+PASS clientRect.width is 100
+PASS clientRect.height is 100
+
+scaled and panned
+PASS clientRect.left is 90
+PASS clientRect.right is 190
+PASS clientRect.top is 90
+PASS clientRect.bottom is 190
+PASS clientRect.width is 100
+PASS clientRect.height is 100
+PASS clientRect.left is 90
+PASS clientRect.right is 190
+PASS clientRect.top is 90
+PASS clientRect.bottom is 190
+PASS clientRect.width is 100
+PASS clientRect.height is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/element-client-rects.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/element-client-rects.html
new file mode 100644 (file)
index 0000000..c670dd0
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/element-client-rects.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-expected.txt
new file mode 100644 (file)
index 0000000..6f4dfa3
--- /dev/null
@@ -0,0 +1,17 @@
+This tests "scroll" offsets when unscaled, scaled, and panned.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+unscaled
+PASS window.innerWidth is 800
+PASS window.innerHeight is 600
+PASS document.documentElement.clientWidth is 800
+PASS document.documentElement.clientHeight is 600
+
+scaled and panned
+PASS window.innerWidth is 400
+PASS window.innerHeight is 300
+PASS document.documentElement.clientWidth is 400
+PASS document.documentElement.clientHeight is 300
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-quirks-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-quirks-expected.txt
new file mode 100644 (file)
index 0000000..9431957
--- /dev/null
@@ -0,0 +1,17 @@
+This tests "scroll" offsets when unscaled, scaled, and panned.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+unscaled
+PASS window.innerWidth is 800
+PASS window.innerHeight is 600
+PASS document.body.clientWidth is 800
+PASS document.body.clientHeight is 600
+
+scaled and panned
+PASS window.innerWidth is 400
+PASS window.innerHeight is 300
+PASS document.body.clientWidth is 400
+PASS document.body.clientHeight is 300
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-quirks.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes-quirks.html
new file mode 100644 (file)
index 0000000..ba34da8
--- /dev/null
@@ -0,0 +1,37 @@
+<!--
+  This document is intended to be in quirks mode, and differ from the TEMPLATE.html.
+-->
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script>
+description('This tests "scroll" offsets when unscaled, scaled, and panned.');
+
+const scale = 2;
+const panX = 10;
+const panY = 10;
+
+debug('unscaled');
+setExpectedWindowSize(800, 600);
+verifyWindowSizeQuirks();
+
+debug('');
+debug('scaled and panned');
+setInitialScaleAndPanBy(scale, panX, panY);
+setExpectedWindowSize(800/scale, 600/scale);
+verifyWindowSizeQuirks();
+
+var successfullyParsed = true;
+endTest();
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/inner-window-sizes.html
new file mode 100644 (file)
index 0000000..8f64497
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/inner-window-sizes.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-expected.txt
new file mode 100644 (file)
index 0000000..0fe24d1
--- /dev/null
@@ -0,0 +1,21 @@
+This tests mouse event coordinates unscaled.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+mousedown
+PASS eventOrTouch.pageX is 125
+PASS eventOrTouch.pageY is 175
+PASS eventOrTouch.clientX is 125
+PASS eventOrTouch.clientY is 175
+mouseup
+PASS eventOrTouch.pageX is 175
+PASS eventOrTouch.pageY is 125
+PASS eventOrTouch.clientX is 175
+PASS eventOrTouch.clientY is 125
+click
+PASS eventOrTouch.pageX is 175
+PASS eventOrTouch.pageY is 125
+PASS eventOrTouch.clientX is 175
+PASS eventOrTouch.clientY is 125
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed-expected.txt
new file mode 100644 (file)
index 0000000..a4777c3
--- /dev/null
@@ -0,0 +1,21 @@
+This tests mouse event coordinates at scale 2 and scrolled slightly.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+mousedown
+PASS eventOrTouch.pageX is 135
+PASS eventOrTouch.pageY is 185
+PASS eventOrTouch.clientX is 125
+PASS eventOrTouch.clientY is 175
+mouseup
+PASS eventOrTouch.pageX is 185
+PASS eventOrTouch.pageY is 135
+PASS eventOrTouch.clientX is 175
+PASS eventOrTouch.clientY is 125
+click
+PASS eventOrTouch.pageX is 185
+PASS eventOrTouch.pageY is 135
+PASS eventOrTouch.clientX is 175
+PASS eventOrTouch.clientY is 125
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event-zoomed.html
new file mode 100644 (file)
index 0000000..7943a28
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/mouse-event-zoomed.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/mouse-event.html
new file mode 100644 (file)
index 0000000..e2492c6
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/mouse-event.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/page-offsets-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/page-offsets-expected.txt
new file mode 100644 (file)
index 0000000..8983034
--- /dev/null
@@ -0,0 +1,21 @@
+This tests "scroll" offsets when unscaled, scaled, and panned.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+unscaled
+PASS window.scrollX is 0
+PASS window.pageXOffset is 0
+PASS document.body.scrollLeft is 0
+PASS window.scrollY is 0
+PASS window.pageYOffset is 0
+PASS document.body.scrollTop is 0
+
+scaled and panned
+PASS window.scrollX is 10
+PASS window.pageXOffset is 10
+PASS document.body.scrollLeft is 10
+PASS window.scrollY is 10
+PASS window.pageYOffset is 10
+PASS document.body.scrollTop is 10
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/page-offsets.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/page-offsets.html
new file mode 100644 (file)
index 0000000..0d76f08
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/page-offsets.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/range-client-rects-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/range-client-rects-expected.txt
new file mode 100644 (file)
index 0000000..31bb7b4
--- /dev/null
@@ -0,0 +1,46 @@
+This tests Range.getBoundingClientRects and getClientRects positions when unscaled, scaled, and panned.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS range.getClientRects().length is 2
+unscaled
+PASS clientRect.left is 0
+PASS clientRect.right is 1500
+PASS clientRect.top is 0
+PASS clientRect.bottom is 1500
+PASS clientRect.width is 1500
+PASS clientRect.height is 1500
+PASS clientRect.left is 0
+PASS clientRect.right is 1500
+PASS clientRect.top is 0
+PASS clientRect.bottom is 1500
+PASS clientRect.width is 1500
+PASS clientRect.height is 1500
+PASS clientRect.left is 100
+PASS clientRect.right is 200
+PASS clientRect.top is 100
+PASS clientRect.bottom is 200
+PASS clientRect.width is 100
+PASS clientRect.height is 100
+
+scaled and panned
+PASS clientRect.left is -10
+PASS clientRect.right is 1490
+PASS clientRect.top is -10
+PASS clientRect.bottom is 1490
+PASS clientRect.width is 1500
+PASS clientRect.height is 1500
+PASS clientRect.left is -10
+PASS clientRect.right is 1490
+PASS clientRect.top is -10
+PASS clientRect.bottom is 1490
+PASS clientRect.width is 1500
+PASS clientRect.height is 1500
+PASS clientRect.left is 90
+PASS clientRect.right is 190
+PASS clientRect.top is 90
+PASS clientRect.bottom is 190
+PASS clientRect.width is 100
+PASS clientRect.height is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/range-client-rects.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/range-client-rects.html
new file mode 100644 (file)
index 0000000..82a9db1
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/range-client-rects.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/resources/helpers.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/resources/helpers.js
new file mode 100644 (file)
index 0000000..cdd75b9
--- /dev/null
@@ -0,0 +1,110 @@
+// To verify event / touch coordinates.
+
+var expectedPageX, expectedPageY, expectedClientX, expectedClientY;
+function setExpectedValues(pageX, pageY, clientX, clientY) {
+    expectedPageX = pageX;
+    expectedPageY = pageY;
+    expectedClientX = clientX;
+    expectedClientY = clientY;
+}
+
+var eventOrTouch;
+function verifyCoordinates(o) {
+    eventOrTouch = o;
+    shouldBe('eventOrTouch.pageX', expectedPageX.toString());
+    shouldBe('eventOrTouch.pageY', expectedPageY.toString());
+    shouldBe('eventOrTouch.clientX', expectedClientX.toString());
+    shouldBe('eventOrTouch.clientY', expectedClientY.toString());
+}
+
+// To verify client rect positions.
+
+var expectedLeft, expectedRight, expectedTop, expectedBottom, expectedWidth, expectedHeight;
+function setExpectedClientRectValues(left, right, top, bottom, width, height) {
+    expectedLeft = left;
+    expectedRight = right;
+    expectedTop = top;
+    expectedBottom = bottom;
+    expectedWidth = width;
+    expectedHeight = width;
+}
+
+var clientRect;
+function verifyClientRect(o) {
+    clientRect = o;
+    shouldBe('clientRect.left', expectedLeft.toString());
+    shouldBe('clientRect.right', expectedRight.toString());
+    shouldBe('clientRect.top', expectedTop.toString());
+    shouldBe('clientRect.bottom', expectedBottom.toString());
+    shouldBe('clientRect.width', expectedWidth.toString());
+    shouldBe('clientRect.height', expectedHeight.toString());
+}
+
+// To verify page scroll offsets.
+
+var expectedScrollX, expectedScrollY;
+function setExpectedScrollOffsets(x, y) {
+    expectedScrollX = x;
+    expectedScrollY = y;
+}
+
+function verifyScrollOffsets() {
+    shouldBe('window.scrollX', expectedScrollX.toString());
+    shouldBe('window.pageXOffset', expectedScrollX.toString());
+    shouldBe('document.body.scrollLeft', expectedScrollX.toString());
+    shouldBe('window.scrollY', expectedScrollY.toString());
+    shouldBe('window.pageYOffset', expectedScrollY.toString());
+    shouldBe('document.body.scrollTop', expectedScrollY.toString());
+}
+
+// To verify visible window sizes.
+
+var expectedWindowWidth, expectedWindowHeight
+function setExpectedWindowSize(width, height) {
+    expectedWindowWidth = width;
+    expectedWindowHeight = height;
+}
+
+// From Element.cpp:
+//   - When in strict mode, clientWidth/Height for the document element should return the width/height of the containing frame.
+//   - When in quirks mode, clientWidth/Height for the body element should return the width/height of the containing frame.
+
+function verifyWindowSize() {
+    shouldBe('window.innerWidth', expectedWindowWidth.toString());
+    shouldBe('window.innerHeight', expectedWindowHeight.toString());
+    shouldBe('document.documentElement.clientWidth', expectedWindowWidth.toString());
+    shouldBe('document.documentElement.clientHeight', expectedWindowHeight.toString());
+}
+
+function verifyWindowSizeQuirks() {
+    shouldBe('window.innerWidth', expectedWindowWidth.toString());
+    shouldBe('window.innerHeight', expectedWindowHeight.toString());
+    shouldBe('document.body.clientWidth', expectedWindowWidth.toString());
+    shouldBe('document.body.clientHeight', expectedWindowHeight.toString());
+}
+
+// Asynchronous tests. (Viewport scaling, Touch events, etc).
+
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+function endTest() {
+    if (window.testRunner) {
+        successfullyParsed = true;
+        isSuccessfullyParsed();
+        testRunner.notifyDone();
+    }
+}
+
+// Zoom and pan the page.
+
+function setInitialScaleAndPanBy(zoomScale, panX, panY) {
+    // Scale with: <meta name="viewport" content="initial-scale=2">.
+    var meta = document.createElement('meta');
+    meta.setAttribute('name', 'viewport');
+    meta.setAttribute('content', 'initial-scale=' + zoomScale);
+    document.head.appendChild(meta);
+
+    // Scrolling is Panning with a "porthole".
+    window.scrollBy(panX, panY);
+}
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/TEMPLATE.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/TEMPLATE.html
new file mode 100644 (file)
index 0000000..e2705d3
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/element-client-rects.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/element-client-rects.js
new file mode 100644 (file)
index 0000000..fc59e95
--- /dev/null
@@ -0,0 +1,22 @@
+description("This tests Element.getBoundingClientRects and getClientRects positions when unscaled, scaled, and panned.");
+
+const scale = 2;
+const panX = 10;
+const panY = 10;
+
+var box = document.getElementById('box');
+
+debug('unscaled');
+setExpectedClientRectValues(100, 200, 100, 200, 100, 100);
+verifyClientRect(box.getBoundingClientRect());
+verifyClientRect(box.getClientRects()[0]);
+
+debug('');
+debug('scaled and panned');
+setInitialScaleAndPanBy(scale, panX, panY);
+setExpectedClientRectValues(100-panX, 200-panX, 100-panY, 200-panY, 100, 100);
+verifyClientRect(box.getBoundingClientRect());
+verifyClientRect(box.getClientRects()[0]);
+
+var successfullyParsed = true;
+endTest();
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/inner-window-sizes.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/inner-window-sizes.js
new file mode 100644 (file)
index 0000000..c5ca289
--- /dev/null
@@ -0,0 +1,18 @@
+description('This tests "scroll" offsets when unscaled, scaled, and panned.');
+
+const scale = 2;
+const panX = 10;
+const panY = 10;
+
+debug('unscaled');
+setExpectedWindowSize(800, 600);
+verifyWindowSize();
+
+debug('');
+debug('scaled and panned');
+setInitialScaleAndPanBy(scale, panX, panY);
+setExpectedWindowSize(800/scale, 600/scale);
+verifyWindowSize();
+
+var successfullyParsed = true;
+endTest();
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/mouse-event-zoomed.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/mouse-event-zoomed.js
new file mode 100644 (file)
index 0000000..5831b62
--- /dev/null
@@ -0,0 +1,29 @@
+description("This tests mouse event coordinates at scale 2 and scrolled slightly.");
+
+var box = document.getElementById('box');
+box.onmousedown = function(event) { debug('mousedown'); verifyCoordinates(event); }
+box.onmouseup = function(event) { debug('mouseup'); verifyCoordinates(event); }
+box.onclick = function(event) { debug('click'); verifyCoordinates(event); endTest(); }
+
+const scale = 2;
+const panX = 10;
+const panY = 10;
+
+function sendMouseSequence() {
+    if (!window.eventSender) {
+         debug("This test requires DumpRenderTree to send mouse events.");
+         return;
+    }
+
+    setExpectedValues(125+panX, 175+panY, 125, 175);
+    eventSender.mouseMoveTo(125*scale, 175*scale);
+    eventSender.mouseDown();
+    setExpectedValues(175+panX, 125+panY, 175, 125);
+    eventSender.mouseMoveTo(175*scale, 125*scale);
+    eventSender.mouseUp();
+}
+
+setInitialScaleAndPanBy(scale, panX, panY);
+sendMouseSequence();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/mouse-event.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/mouse-event.js
new file mode 100644 (file)
index 0000000..ff52039
--- /dev/null
@@ -0,0 +1,24 @@
+description("This tests mouse event coordinates unscaled.");
+
+var box = document.getElementById('box');
+box.onmousedown = function(event) { debug('mousedown'); verifyCoordinates(event); }
+box.onmouseup = function(event) { debug('mouseup'); verifyCoordinates(event); }
+box.onclick = function(event) { debug('click'); verifyCoordinates(event); endTest(); }
+
+function sendMouseSequence() {
+    if (!window.eventSender) {
+         debug("This test requires DumpRenderTree to send mouse events.");
+         return;
+    }
+
+    setExpectedValues(125, 175, 125, 175);
+    eventSender.mouseMoveTo(125, 175);
+    eventSender.mouseDown();
+    setExpectedValues(175, 125, 175, 125);
+    eventSender.mouseMoveTo(175, 125);
+    eventSender.mouseUp();
+}
+
+sendMouseSequence();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/page-offsets.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/page-offsets.js
new file mode 100644 (file)
index 0000000..230dd3a
--- /dev/null
@@ -0,0 +1,18 @@
+description('This tests "scroll" offsets when unscaled, scaled, and panned.');
+
+const scale = 2;
+const panX = 10;
+const panY = 10;
+
+debug('unscaled');
+setExpectedScrollOffsets(0, 0);
+verifyScrollOffsets();
+
+debug('');
+debug('scaled and panned');
+setInitialScaleAndPanBy(scale, panX, panY);
+setExpectedScrollOffsets(panX, panY);
+verifyScrollOffsets();
+
+var successfullyParsed = true;
+endTest();
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/range-client-rects.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/range-client-rects.js
new file mode 100644 (file)
index 0000000..0f66038
--- /dev/null
@@ -0,0 +1,42 @@
+description("This tests Range.getBoundingClientRects and getClientRects positions when unscaled, scaled, and panned.");
+
+const scale = 2;
+const panX = 10;
+const panY = 10;
+
+var box = document.getElementById('box');
+function setDisplayOnDescriptionAndConsole(display) {
+    document.getElementById('description').style.display = display;
+    document.getElementById('console').style.display = display;
+}
+
+setDisplayOnDescriptionAndConsole('none');
+
+// Selection includes the 100x100 "box" and 1500x1500 "filler" divs.
+// The entire Range's bounds are the filler's, since the "box" is
+// positioned absolutely inside it. The first client rect of the
+// Range is the box.
+document.execCommand("SelectAll");
+var range = window.getSelection().getRangeAt(0);
+shouldBe('range.getClientRects().length', '2');
+
+debug('unscaled');
+setExpectedClientRectValues(0, 1500, 0, 1500, 1500, 1500);
+verifyClientRect(range.getBoundingClientRect());
+verifyClientRect(range.getClientRects()[1]);
+setExpectedClientRectValues(100, 200, 100, 200, 100, 100);
+verifyClientRect(range.getClientRects()[0]);
+
+debug('');
+debug('scaled and panned');
+setInitialScaleAndPanBy(scale, panX, panY);
+setExpectedClientRectValues(0-panX, 1500-panX, 0-panY, 1500-panY, 1500, 1500);
+verifyClientRect(range.getBoundingClientRect());
+verifyClientRect(range.getClientRects()[1]);
+setExpectedClientRectValues(100-panX, 200-panX, 100-panY, 200-panY, 100, 100);
+verifyClientRect(range.getClientRects()[0]);
+
+setDisplayOnDescriptionAndConsole('block');
+
+var successfullyParsed = true;
+endTest();
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/touch-event-zoomed.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/touch-event-zoomed.js
new file mode 100644 (file)
index 0000000..894d1da
--- /dev/null
@@ -0,0 +1,34 @@
+description("This tests touch event coordinates at scale 2 and scrolled slightly.");
+
+var box = document.getElementById('box');
+box.ontouchstart = function(event) { debug('touchstart'); verifyCoordinates(event.touches[0]); }
+box.ontouchmove = function(event) { debug('touchmove'); verifyCoordinates(event.touches[0]); }
+box.ontouchend = function(event) { debug('touchend - no touch to check'); endTest(); }
+
+const scale = 2;
+const panX = 10;
+const panY = 10;
+const FIRST_FINGER = 0;
+
+function sendTouchSequence() {
+    if (!window.eventSender) {
+        debug("This test requires DumpRenderTree to send touch events.");
+        return;
+    }
+
+    setExpectedValues(125+panX, 175+panY, 125, 175);
+    eventSender.addTouchPoint(125*scale, 175*scale);
+    eventSender.touchStart();
+
+    setExpectedValues(175+panX, 125+panY, 175, 125);
+    eventSender.updateTouchPoint(FIRST_FINGER, 175*scale, 125*scale);
+    eventSender.touchMove();
+
+    eventSender.releaseTouchPoint(FIRST_FINGER);
+    eventSender.touchEnd(); // The test will end with this release.
+}
+
+setInitialScaleAndPanBy(scale, panX, panY);
+sendTouchSequence();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/touch-event.js b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/script-tests/touch-event.js
new file mode 100644 (file)
index 0000000..eac3d4e
--- /dev/null
@@ -0,0 +1,29 @@
+description("This tests touch event coordinates unscaled.");
+
+var box = document.getElementById('box');
+box.ontouchstart = function(event) { debug('touchstart'); verifyCoordinates(event.touches[0]); }
+box.ontouchmove = function(event) { debug('touchmove'); verifyCoordinates(event.touches[0]); }
+box.ontouchend = function(event) { debug('touchend - no touch to check'); endTest(); }
+
+const FIRST_FINGER = 0;
+function sendTouchSequence() {
+    if (!window.eventSender) {
+        debug("This test requires DumpRenderTree to send touch events.");
+        return;
+    }
+
+    setExpectedValues(125, 175, 125, 175);
+    eventSender.addTouchPoint(125, 175);
+    eventSender.touchStart();
+
+    setExpectedValues(175, 125, 175, 125);
+    eventSender.updateTouchPoint(FIRST_FINGER, 175, 125);
+    eventSender.touchMove();
+
+    eventSender.releaseTouchPoint(FIRST_FINGER);
+    eventSender.touchEnd(); // The test will end with this release.
+}
+
+sendTouchSequence();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-expected.txt
new file mode 100644 (file)
index 0000000..5de4796
--- /dev/null
@@ -0,0 +1,17 @@
+This tests touch event coordinates unscaled.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+touchstart
+PASS eventOrTouch.pageX is 125
+PASS eventOrTouch.pageY is 175
+PASS eventOrTouch.clientX is 125
+PASS eventOrTouch.clientY is 175
+touchmove
+PASS eventOrTouch.pageX is 175
+PASS eventOrTouch.pageY is 125
+PASS eventOrTouch.clientX is 175
+PASS eventOrTouch.clientY is 125
+touchend - no touch to check
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed-expected.txt
new file mode 100644 (file)
index 0000000..81a5c1c
--- /dev/null
@@ -0,0 +1,17 @@
+This tests touch event coordinates at scale 2 and scrolled slightly.
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+touchstart
+PASS eventOrTouch.pageX is 135
+PASS eventOrTouch.pageY is 185
+PASS eventOrTouch.clientX is 125
+PASS eventOrTouch.clientY is 175
+touchmove
+PASS eventOrTouch.pageX is 185
+PASS eventOrTouch.pageY is 135
+PASS eventOrTouch.clientX is 175
+PASS eventOrTouch.clientY is 125
+touchend - no touch to check
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event-zoomed.html
new file mode 100644 (file)
index 0000000..6ae2d09
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/touch-event-zoomed.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event.html b/LayoutTests/platform/ios-simulator/ios/fast/coordinates/touch-event.html
new file mode 100644 (file)
index 0000000..f08a430
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<script src="resources/helpers.js"></script>
+<style>* { margin: 0; padding: 0; }</style>
+</head>
+<body>
+<div id="box" style="background:blue;width:100px;height:100px;position:absolute;top:100px;left:100px"></div>
+<p id="description"></p>
+<div id="console"></div>
+<!-- Filler to allow scrolling -->
+<div style="width:1500px;height:1500px;"></div>
+<script src="script-tests/touch-event.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/css/script-tests/TEMPLATE.html b/LayoutTests/platform/ios-simulator/ios/fast/css/script-tests/TEMPLATE.html
new file mode 100644 (file)
index 0000000..2fd09a5
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+<script src="../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/css/script-tests/webkit-overflow-scrolling-parsing.js b/LayoutTests/platform/ios-simulator/ios/fast/css/script-tests/webkit-overflow-scrolling-parsing.js
new file mode 100644 (file)
index 0000000..a29e22e
--- /dev/null
@@ -0,0 +1,18 @@
+description("This tests checks parsing of the '-webkit-overflow-scrolling' property.");
+
+function test(declaration, property)
+{
+    var div = document.createElement("div");
+    div.setAttribute("style", declaration);
+    document.body.appendChild(div);
+    
+    var result = div.style.getPropertyValue(property);
+    document.body.removeChild(div);
+    return result;
+}
+
+shouldBe('test("-webkit-overflow-scrolling: auto", "-webkit-overflow-scrolling")', '"auto"');
+shouldBe('test("-webkit-overflow-scrolling: banana", "-webkit-overflow-scrolling")', 'null');
+shouldBe('test("-webkit-overflow-scrolling: touch", "-webkit-overflow-scrolling")', '"touch"');
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/css/webkit-overflow-scrolling-parsing-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/css/webkit-overflow-scrolling-parsing-expected.txt
new file mode 100644 (file)
index 0000000..d825507
--- /dev/null
@@ -0,0 +1,12 @@
+This tests checks parsing of the '-webkit-overflow-scrolling' property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("-webkit-overflow-scrolling: auto", "-webkit-overflow-scrolling") is "auto"
+PASS test("-webkit-overflow-scrolling: banana", "-webkit-overflow-scrolling") is null
+PASS test("-webkit-overflow-scrolling: touch", "-webkit-overflow-scrolling") is "touch"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/css/webkit-overflow-scrolling-parsing.html b/LayoutTests/platform/ios-simulator/ios/fast/css/webkit-overflow-scrolling-parsing.html
new file mode 100644 (file)
index 0000000..3d99967
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/webkit-overflow-scrolling-parsing.js"></script>
+<script src="../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/document-create-touch-list-ios-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/document-create-touch-list-ios-expected.txt
new file mode 100644 (file)
index 0000000..4a2f272
--- /dev/null
@@ -0,0 +1,18 @@
+This tests support for the document.createTouchList and window.TouchEvent APIs.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS 'TouchEvent' in window is true
+PASS window.propertyIsEnumerable('TouchEvent') is false
+PASS new TouchEvent() threw exception TypeError: TouchEventConstructor is not a constructor (evaluating 'new TouchEvent()').
+PASS "createTouchList" in document is true
+PASS touchList is non-null.
+PASS touchList.length is 0
+PASS touchList.item(0) is null
+PASS touchList.item(1) is null
+FAIL An exception was thrown: Type error
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/document-create-touch-list-ios.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/document-create-touch-list-ios.html
new file mode 100644 (file)
index 0000000..62d0a33
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/document-create-touch-list-ios.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/gesture-event-basic-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/gesture-event-basic-expected.txt
new file mode 100644 (file)
index 0000000..a8c11fb
--- /dev/null
@@ -0,0 +1,64 @@
+This tests initializing GestureEvents
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+FAIL !('GestureEvent' in window) should be true. Was false.
+
+EVENT: gesturestart
+PASS event.type is type
+PASS event.bubbles is canBubble
+PASS event.cancelable is cancelable
+PASS event.view is view
+PASS event.detail is detail
+PASS event.ctrlKey is ctrlKey
+PASS event.altKey is altKey
+PASS event.shiftKey is shiftKey
+PASS event.metaKey is metaKey
+PASS event.target is target
+PASS event.scale is scale
+PASS event.rotation is rotation
+PASS event.screenX is undefined
+PASS event.screenY is undefined
+PASS event.clientX is undefined
+PASS event.clientY is undefined
+
+EVENT: gesturechange
+PASS event.type is type
+PASS event.bubbles is canBubble
+PASS event.cancelable is cancelable
+PASS event.view is view
+PASS event.detail is detail
+PASS event.ctrlKey is ctrlKey
+PASS event.altKey is altKey
+PASS event.shiftKey is shiftKey
+PASS event.metaKey is metaKey
+PASS event.target is target
+PASS event.scale is scale
+PASS event.rotation is rotation
+PASS event.screenX is undefined
+PASS event.screenY is undefined
+PASS event.clientX is undefined
+PASS event.clientY is undefined
+
+EVENT: gestureend
+PASS event.type is type
+PASS event.bubbles is canBubble
+PASS event.cancelable is cancelable
+PASS event.view is view
+PASS event.detail is detail
+PASS event.ctrlKey is ctrlKey
+PASS event.altKey is altKey
+PASS event.shiftKey is shiftKey
+PASS event.metaKey is metaKey
+PASS event.target is target
+PASS event.scale is scale
+PASS event.rotation is rotation
+PASS event.screenX is undefined
+PASS event.screenY is undefined
+PASS event.clientX is undefined
+PASS event.clientY is undefined
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/gesture-event-basic.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/gesture-event-basic.html
new file mode 100644 (file)
index 0000000..f5f53e6
--- /dev/null
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+
+description("This tests initializing GestureEvents");
+
+// To use GestureEvents use createEvent and initGestureEvent.
+// NOTE: iOS Does not expose GestureEvent.
+shouldBeTrue("!('GestureEvent' in window)");
+
+// Global properties for events.
+var type; // Assigned before checking.
+var canBubble = false;
+var cancelable = true;
+var view = window;
+var detail = 1;
+var screenX = 2;
+var screenY = 3;
+var clientX = 4;
+var clientY = 5;
+var ctrlKey = false;
+var altKey = true;
+var shiftKey = false;
+var metaKey = true;
+var target = document.body;
+var scale = 1.5;
+var rotation = 10.5;
+
+function createGestureEvent(type) {
+    var event = document.createEvent("GestureEvent");
+    event.initGestureEvent(type,
+        canBubble, cancelable, view, detail,
+        screenX, screenY, clientX, clientY,
+        ctrlKey, altKey, shiftKey, metaKey,
+        target, scale, rotation);
+    return event;
+}
+
+function validateGestureEvent(t, event) {
+    debug("");
+    debug("EVENT: " + t);
+    type = t;
+
+    // Check exposed properties against values that were set.
+    shouldBe("event.type", "type");
+    shouldBe("event.bubbles", "canBubble");
+    shouldBe("event.cancelable", "cancelable");
+    shouldBe("event.view", "view");
+    shouldBe("event.detail", "detail");
+    shouldBe("event.ctrlKey", "ctrlKey");
+    shouldBe("event.altKey", "altKey");
+    shouldBe("event.shiftKey", "shiftKey");
+    shouldBe("event.metaKey", "metaKey");
+    shouldBe("event.target", "target");
+    shouldBe("event.scale", "scale");
+    shouldBe("event.rotation", "rotation");
+
+    // Properties that aren't exposed but were in init.
+    shouldBe("event.screenX", "undefined");
+    shouldBe("event.screenY", "undefined");
+    shouldBe("event.clientX", "undefined");
+    shouldBe("event.clientY", "undefined");
+}
+
+target.addEventListener("gesturestart", function(event) { validateGestureEvent("gesturestart", event); }, false);
+target.addEventListener("gesturechange", function(event) { validateGestureEvent("gesturechange", event); }, false);
+target.addEventListener("gestureend", function(event) { validateGestureEvent("gestureend", event); }, false);
+
+try {
+    var e;
+    e = createGestureEvent("gesturestart");
+    target.dispatchEvent(e);
+    e = createGestureEvent("gesturechange");
+    target.dispatchEvent(e);    
+    e = createGestureEvent("gestureend");
+    target.dispatchEvent(e);
+} catch (e) {
+    testFailed("An exception was thrown: " + e.message);
+}
+
+</script>    
+<script src="../../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/input-touch-target.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/input-touch-target.html
new file mode 100644 (file)
index 0000000..7f6c3a9
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/input-touch-target.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/inserted-fragment-touch-target-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/inserted-fragment-touch-target-expected.txt
new file mode 100644 (file)
index 0000000..2b73a00
--- /dev/null
@@ -0,0 +1,5 @@
+This is the touch target.
+Should see a single touch at 20,20
+[TouchEvent X: 20 Y: 20]
+PASSED
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/inserted-fragment-touch-target.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/inserted-fragment-touch-target.html
new file mode 100644 (file)
index 0000000..e709598
--- /dev/null
@@ -0,0 +1,77 @@
+<!doctype html>
+<html>
+<head>
+  <title>Inserted Fragment Touch Target</title>
+  <style>
+  body {
+      margin: 0;
+      padding: 0;
+  }
+
+  .container {
+      position: absolute;
+      top: 10px;
+      left: 10px;
+      width: 50px;
+      height: 50px;
+      border: 1px solid green;
+  }
+
+  .target {
+      width: 40px;
+      height: 40px;
+      background-color: red;
+  }
+
+  #results {
+    position: absolute;
+    top: 100px;
+  }
+  </style>
+  <script src="misc-touch-helpers.js"></script>
+  <script>
+
+    // While this isn't a particularly nice approach to the solution,
+    // it is a direct copy from the original bug report.
+    function createElementsFromString(input) {
+        var div = document.createElement("div");
+        div.innerHTML = input;
+        var children = div.children;
+        var fragment = document.createDocumentFragment();
+        for (var i = 0, length = children.length; i < length; i++) {
+            fragment.appendChild(children[0])
+        }
+        return fragment.firstChild;
+    }
+
+    function targetTouched(event) {
+        logTouch(event);
+        debug("PASSED");
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }
+
+    function init() {
+        var target = createElementsFromString("<div class='target'>This is the <strong>touch target</strong>.</div>");
+        target.addEventListener("touchstart", targetTouched, false);
+        var container = document.querySelector(".container");
+        container.appendChild(target);
+        debug("Should see a single touch at 20,20");
+        tapSoon(20, 20);
+    }
+
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+
+    window.addEventListener("load", init, false);
+</script>
+</head>
+<body>
+  <div class="container">
+  </div>
+  <div id="results">
+  </div>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/misc-touch-helpers.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/misc-touch-helpers.js
new file mode 100644 (file)
index 0000000..862bcb3
--- /dev/null
@@ -0,0 +1,25 @@
+function tap(x, y) {
+    if (!window.eventSender)
+        return;
+
+    eventSender.addTouchPoint(x, y);
+    eventSender.touchStart();
+    eventSender.releaseTouchPoint(0);
+    eventSender.touchEnd();
+}
+
+function tapSoon(x, y) {
+    setTimeout(function () {
+        tap(x, y);
+    }, 10);
+}
+
+function logTouch(event) {
+    debug("[TouchEvent X: " + event.touches[0].pageX + " Y: " + event.touches[0].pageY + "]");
+}
+
+function debug(msg) {
+    var results = document.getElementById("results");
+    results.innerHTML += msg + "<br>";
+}
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/moved-touch-target-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/moved-touch-target-expected.txt
new file mode 100644 (file)
index 0000000..499e135
--- /dev/null
@@ -0,0 +1,6 @@
+Should see two touches. The first should be at 20,20
+[TouchEvent X: 20 Y: 20]
+Now move the element from one parent to another. Second touch should be at 110,20
+[TouchEvent X: 110 Y: 20]
+PASSED
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/moved-touch-target.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/moved-touch-target.html
new file mode 100644 (file)
index 0000000..842e5e1
--- /dev/null
@@ -0,0 +1,86 @@
+<!doctype html>
+<html>
+<head>
+  <title>Moved Touch Target</title>
+  <style>
+  body {
+      margin: 0;
+      padding: 0;
+  }
+
+  .container1 {
+      position: absolute;
+      top: 10px;
+      left: 10px;
+      width: 50px;
+      height: 50px;
+      border: 1px solid green;
+  }
+
+  .container2 {
+      position: absolute;
+      top: 10px;
+      left: 100px;
+      width: 50px;
+      height: 50px;
+      border: 1px solid blue;
+  }
+
+  .target {
+      width: 40px;
+      height: 40px;
+      background-color: red;
+  }
+
+  #results {
+    position: absolute;
+    top: 100px;
+  }
+  </style>
+  <script src="misc-touch-helpers.js"></script>
+  <script>
+
+    var expectedTouches = 2;
+
+    function targetTouched(event) {
+        logTouch(event);
+        expectedTouches--;
+        if (expectedTouches) {
+            debug("Now move the element from one parent to another. Second touch should be at 110,20");
+            var target = document.querySelector(".target");
+            var container2 = document.querySelector(".container2");
+            container2.appendChild(target);
+            tapSoon(110, 20);
+        } else {
+            debug("PASSED");
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
+    }
+
+    function init() {
+        var target = document.querySelector(".target");
+        target.addEventListener("touchstart", targetTouched, false);
+        debug("Should see two touches. The first should be at 20,20");
+        tapSoon(20, 20);
+    }
+
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+
+    window.addEventListener("load", init, false);
+</script>
+</head>
+<body>
+  <div class="container1">
+    <div class="target">
+    </div>
+  </div>
+  <div class="container2">
+  </div>
+  <div id="results">
+  </div>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/multi-touch-some-without-handlers.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/multi-touch-some-without-handlers.html
new file mode 100644 (file)
index 0000000..b0d9e6f
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/multi-touch-some-without-handlers.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/ontouchstart-active-selector.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/ontouchstart-active-selector.html
new file mode 100644 (file)
index 0000000..94a8768
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<style>
+    #touchMe {
+        background-color: blue;
+        width: 200px;
+        height: 200px;
+        top: 0;
+        left: 0;
+    }
+    #touchMe:active {
+        background-color: red;
+    }
+</style>
+</head>
+<body>
+<div id="touchMe" ontouchstart=""></div>
+<script>
+
+description("This tests the :active selector on touchable elements");
+
+if (!window.eventSender)
+    debug("This test will FAIL outside of DRT, but you can test it manually by touching the blue square below. If it turns red when touched, the test is a PASS.");
+
+touchMe = document.getElementById("touchMe");
+
+shouldBe("getComputedStyle(touchMe).backgroundColor", "'rgb(0, 0, 255)'");
+
+if (window.eventSender) {
+    eventSender.clearTouchPoints();
+    eventSender.addTouchPoint(touchMe.offsetLeft + 10, touchMe.offsetTop + 10);
+    eventSender.touchStart();
+}
+
+shouldBe("getComputedStyle(touchMe).backgroundColor", "'rgb(255, 0, 0)'");
+
+if (window.eventSender) {
+    eventSender.clearTouchPoints();
+    eventSender.touchEnd();
+}
+
+shouldBe("getComputedStyle(touchMe).backgroundColor", "'rgb(0, 0, 255)'");
+
+</script>    
+<script src="../../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-fragment-touch-target-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-fragment-touch-target-expected.txt
new file mode 100644 (file)
index 0000000..c2c8b2b
--- /dev/null
@@ -0,0 +1,5 @@
+Should see a single touch at 20,20
+[TouchEvent X: 20 Y: 20]
+Now remove the element from its parent and attempt to touch it again. This touch should not register.
+PASSED. We did not see a second touch.
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-fragment-touch-target.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-fragment-touch-target.html
new file mode 100644 (file)
index 0000000..21ab9aa
--- /dev/null
@@ -0,0 +1,93 @@
+<!doctype html>
+<html>
+<head>
+  <title>Removed Document Fragment Touch Target</title>
+  <style>
+  body {
+      margin: 0;
+      padding: 0;
+  }
+
+  .container {
+      position: absolute;
+      top: 10px;
+      left: 10px;
+      width: 50px;
+      height: 50px;
+      border: 1px solid green;
+  }
+
+  .target {
+      width: 40px;
+      height: 40px;
+      background-color: red;
+  }
+
+  #results {
+    position: absolute;
+    top: 100px;
+  }
+  </style>
+  <script src="misc-touch-helpers.js"></script>
+  <script>
+
+    var seenTouch = false;
+
+    // While this isn't a particularly nice approach to the solution,
+    // it is a direct copy from the original bug report.
+    function createElementsFromString(input) {
+        var div = document.createElement("div");
+        div.innerHTML = input;
+        var children = div.children;
+        var fragment = document.createDocumentFragment();
+        for (var i = 0, length = children.length; i < length; i++) {
+            fragment.appendChild(children[0])
+        }
+        return fragment.firstChild;
+    }
+
+    function targetTouched(event) {
+        logTouch(event);
+        if (!seenTouch) {
+            seenTouch = true;
+            debug("Now remove the element from its parent and attempt to touch it again. This touch should not register.");
+            var target = document.querySelector(".target");
+            target.parentNode.removeChild(target);
+            tapSoon(20, 20);
+            // Wait 50ms to see if the touch was registered. If it was, then we'll be exiting below.
+            setTimeout(function () {
+                debug("PASSED. We did not see a second touch.");
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 50);
+        } else {
+            debug("FAILED. We saw a second touch.");
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
+    }
+
+    function init() {
+        var target = createElementsFromString("<div class='target'>This is the <strong>touch target</strong>.</div>");
+        target.addEventListener("touchstart", targetTouched, false);
+        var container = document.querySelector(".container");
+        container.appendChild(target);
+        debug("Should see a single touch at 20,20");
+        tapSoon(20, 20);
+    }
+
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+
+    window.addEventListener("load", init, false);
+</script>
+</head>
+<body>
+  <div class="container">
+  </div>
+  <div id="results">
+  </div>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-touch-target-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-touch-target-expected.txt
new file mode 100644 (file)
index 0000000..a701554
--- /dev/null
@@ -0,0 +1,5 @@
+Should see only one touch at 20,20
+[TouchEvent X: 20 Y: 20]
+Now remove the element from its parent and attempt to touch it again. This touch should not register.
+PASSED. We did not see a second touch.
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-touch-target.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/removed-touch-target.html
new file mode 100644 (file)
index 0000000..3bf8ca7
--- /dev/null
@@ -0,0 +1,80 @@
+<!doctype html>
+<html>
+<head>
+  <title>Remove a Touch Target</title>
+  <style>
+  body {
+      margin: 0;
+      padding: 0;
+  }
+
+  .container {
+      position: absolute;
+      top: 10px;
+      left: 10px;
+      width: 50px;
+      height: 50px;
+      border: 1px solid green;
+  }
+
+  .target {
+      width: 40px;
+      height: 40px;
+      background-color: red;
+  }
+
+  #results {
+    position: absolute;
+    top: 100px;
+  }
+  </style>
+  <script src="misc-touch-helpers.js"></script>
+  <script>
+
+    var seenTouch = false;
+
+    function targetTouched(event) {
+        logTouch(event);
+        if (!seenTouch) {
+            seenTouch = true;
+            debug("Now remove the element from its parent and attempt to touch it again. This touch should not register.");
+            var target = document.querySelector(".target");
+            target.parentNode.removeChild(target);
+            tapSoon(20, 20);
+            // Wait 50ms to see if the touch was registered. If it was, then we'll be exiting below.
+            setTimeout(function () {
+                debug("PASSED. We did not see a second touch.");
+                if (window.testRunner)
+                    testRunner.notifyDone();
+            }, 50);
+        } else {
+            debug("FAILED. We saw a second touch.");
+            if (window.testRunner)
+                testRunner.notifyDone();
+        }
+    }
+
+    function init() {
+        var target = document.querySelector(".target");
+        target.addEventListener("touchstart", targetTouched, false);
+        debug("Should see only one touch at 20,20");
+        tapSoon(20, 20);
+    }
+
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+    }
+
+    window.addEventListener("load", init, false);
+</script>
+</head>
+<body>
+  <div class="container">
+    <div class="target">
+    </div>
+  </div>
+  <div id="results">
+  </div>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/TEMPLATE.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/TEMPLATE.html
new file mode 100644 (file)
index 0000000..3306f47
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/document-create-touch-list-ios.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/document-create-touch-list-ios.js
new file mode 100644 (file)
index 0000000..6f66450
--- /dev/null
@@ -0,0 +1,49 @@
+description("This tests support for the document.createTouchList and window.TouchEvent APIs.");
+
+// To use TouchEvents use createEvent and initTouchEvent.
+shouldBeTrue("'TouchEvent' in window");
+shouldBeFalse("window.propertyIsEnumerable('TouchEvent')");
+shouldThrow('new TouchEvent()');
+
+shouldBeTrue('"createTouchList" in document');
+
+// Test createTouchList with no arguments.
+var touchList = document.createTouchList();
+shouldBeNonNull("touchList");
+shouldBe("touchList.length", "0");
+shouldBeNull("touchList.item(0)");
+shouldBeNull("touchList.item(1)");
+
+// Test createTouchList with Touch objects as arguments.
+try {
+    var t = document.createTouch(window, document.body, 12341, 60, 65, 100, 105);
+    var t2 = document.createTouch(window, document.body, 12342, 50, 55, 115, 120);
+    var tl = document.createTouchList(t, t2);
+
+    var evt = document.createEvent("TouchEvent");
+    evt.initTouchEvent(tl, tl, tl, "touchstart", window, 0, 0, 0, 0, true, false, false, false);
+
+    document.body.addEventListener("touchstart", function handleTouchStart(ev) {
+        ts = ev;
+        shouldBe("ts.touches.length", "2");
+        shouldBe("ts.touches[0].identifier", "12341");
+        shouldBe("ts.touches[0].clientX", "60");
+        shouldBe("ts.touches[1].screenY", "120");
+        shouldBe("ts.ctrlKey", "true");
+    });
+
+    document.body.dispatchEvent(evt);
+} catch(e) {
+    testFailed("An exception was thrown: " + e.message);
+}
+
+// Test createTouchList with invalid arguments which throws exceptions.
+try {
+    var tl = document.createTouchList(1, 2);
+} catch(e) {
+    testFailed("An exception was thrown: " + e.message);
+}
+
+successfullyParsed = true;
+isSuccessfullyParsed();
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/input-touch-target.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/input-touch-target.js
new file mode 100644 (file)
index 0000000..2db66a4
--- /dev/null
@@ -0,0 +1,32 @@
+var target = document.createElement('input');
+target.setAttribute('type', 'text');
+target.id = "target";
+target.setAttribute('style', "position: absolute; top: 0; left: 0; font-size: 24px;");
+
+document.body.insertBefore(target, document.getElementById('console'));
+
+function touchStartHandler()
+{
+    shouldBeEqualToString('event.type', 'touchstart');
+    shouldBeEqualToString('event.touches[0].target.id', target.id);
+    shouldBeEqualToString('event.touches[0].target.nodeName', 'INPUT');
+
+    successfullyParsed = true;
+    isSuccessfullyParsed();
+}
+
+target.addEventListener("touchstart", touchStartHandler, false);
+
+description("Tests that input elements can receive touch events.");
+
+if (window.eventSender) {
+    eventSender.clearTouchPoints();
+    eventSender.addTouchPoint(10, 10);
+    eventSender.touchStart();
+    eventSender.touchEnd();
+} else
+    debug('This test requires DRT.');
+
+document.body.removeChild(target);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/multi-touch-some-without-handlers.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/multi-touch-some-without-handlers.js
new file mode 100644 (file)
index 0000000..a484dd6
--- /dev/null
@@ -0,0 +1,120 @@
+var div = document.createElement("div");
+div.id = "touchtarget";
+div.style.width = "100px";
+div.style.height = "100px";
+div.style.backgroundColor = "blue";
+
+var lastEvent = null;
+var touchEventsReceived = 0;
+var EXPECTED_TOUCH_EVENTS_TOTAL = 3;
+
+function touchEventCallback() {
+    if (window.eventSender) {
+        lastEvent = event;
+        verifyTouch(touchEventsReceived++);
+    } else {
+        debug(event.type);
+    }
+
+    if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) {
+        // If we've got here, we can safely say we were successfully parsed :) We need to
+        // call the isSucccessfullyParsed function to output the correct TEST COMPLETE
+        // footer message.
+        successfullyParsed = true;
+        isSuccessfullyParsed();
+        testRunner.notifyDone();
+    }
+}
+
+div.addEventListener("touchstart", touchEventCallback, false);
+div.addEventListener("touchmove", touchEventCallback, false);
+div.addEventListener("touchend", touchEventCallback, false);
+document.body.insertBefore(div, document.body.firstChild);
+
+function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount)
+{
+    shouldBeEqualToString("lastEvent.type", type);
+    shouldBe("lastEvent.touches.length", totalTouchCount.toString());
+    shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString());
+    shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString());
+}
+
+function verifyTouchPoint(list, point, x, y, id)
+{
+    shouldBe("lastEvent." + list + "[" + point + "].pageX", x.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].pageY", y.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].clientX", x.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].clientY", y.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].identifier", id.toString());
+}
+
+function verifyTouch(which) {
+    switch (which) {
+        case 0:
+            verifyTouchEvent("touchstart", 2, 1, 1);
+            verifyTouchPoint("touches", 0, 10, 10, 0);
+            verifyTouchPoint("touches", 1, 200, 200, 1);
+            verifyTouchPoint("changedTouches", 0, 10, 10, 0);
+            verifyTouchPoint("targetTouches", 0, 10, 10, 0);
+            break;
+
+        case 1:
+            verifyTouchEvent("touchmove", 2, 1, 1);
+            verifyTouchPoint("touches", 0, 20, 30, 0);
+            verifyTouchPoint("touches", 1, 200, 200, 1);
+            verifyTouchPoint("changedTouches", 0, 20, 30, 0);
+            break;
+
+        // At this point touch 2 moved but no event was triggered
+        // on the target, since no touch in the target changed.
+
+        case 2:
+            verifyTouchEvent("touchend", 1, 1, 0);
+            verifyTouchPoint("touches", 0, 150, 150, 1);
+            verifyTouchPoint("changedTouches", 0, 20, 30, 0);
+            break;
+
+        default: testFailed("Wrong number of touch events! (" + which + ")");
+    }
+}
+
+function multiTouchSequence()
+{
+    debug("multi touch sequence");
+
+    debug("");
+    debug("Two touchpoints, 1 in the target, 1 on the body without a target");
+    eventSender.addTouchPoint(10, 10);
+    eventSender.addTouchPoint(200, 200)
+    eventSender.touchStart(); // Begin, Begin.
+
+    debug("");
+    debug("First touchpoint moved");
+    eventSender.markAllTouchesAsStationary();
+    eventSender.updateTouchPoint(0, 20, 30);
+    eventSender.touchMove(); // Moved, Stationary.
+
+    debug("");
+    debug("Second touchpoint moved");
+    eventSender.markAllTouchesAsStationary();
+    eventSender.updateTouchPoint(1, 150, 150);
+    eventSender.touchMove(); // Stationary, Moved.
+
+    debug("");
+    debug("First touchpoint is released");
+    eventSender.markAllTouchesAsStationary();
+    eventSender.releaseTouchPoint(0);
+    eventSender.touchEnd(); // Ended, Stationary.
+}
+
+if (window.eventSender) {
+    description("This tests multi touch event support where one of the touches has no touch event handler.");
+
+    lastEvent = null;
+    eventSender.clearTouchPoints();
+    multiTouchSequence();
+} else {
+    debug("This test requires DumpRenderTree.")
+}
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/text-node-touch-target.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/text-node-touch-target.js
new file mode 100644 (file)
index 0000000..7d081a3
--- /dev/null
@@ -0,0 +1,31 @@
+var targetDiv = document.createElement("div");
+targetDiv.id = "targetDiv";
+targetDiv.setAttribute('style', "position: absolute; top: 0; left: 0; background-color: blue; font-size: 24px;");
+targetDiv.innerText = 'This is some text';
+
+document.body.insertBefore(targetDiv, document.getElementById('console'));
+
+function touchStartHandler()
+{
+    shouldBeEqualToString('event.type', 'touchstart');
+    shouldBeEqualToString('event.touches[0].target.id', targetDiv.id);
+    shouldBeEqualToString('event.touches[0].target.nodeName', 'DIV');
+
+    successfullyParsed = true;
+    isSuccessfullyParsed();
+}
+
+targetDiv.addEventListener("touchstart", touchStartHandler, false);
+
+description("Tests that the event target for a touch on a text node is the parent element, not the text node.");
+
+if (window.eventSender) {
+    eventSender.clearTouchPoints();
+    eventSender.addTouchPoint(10, 10);
+    eventSender.touchStart();
+    eventSender.touchEnd();
+} else
+    debug('This test requires DRT.');
+
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/textarea-touch-target.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/textarea-touch-target.js
new file mode 100644 (file)
index 0000000..c584273
--- /dev/null
@@ -0,0 +1,31 @@
+var target = document.createElement('textarea');
+target.id = "target";
+target.setAttribute('style', "position: absolute; top: 0; left: 0; font-size: 24px;");
+
+document.body.insertBefore(target, document.getElementById('console'));
+
+function touchStartHandler()
+{
+    shouldBeEqualToString('event.type', 'touchstart');
+    shouldBeEqualToString('event.touches[0].target.id', target.id);
+    shouldBeEqualToString('event.touches[0].target.nodeName', 'TEXTAREA');
+
+    successfullyParsed = true;
+    isSuccessfullyParsed();
+}
+
+target.addEventListener("touchstart", touchStartHandler, false);
+
+description("Tests that input elements can receive touch events.");
+
+if (window.eventSender) {
+    eventSender.clearTouchPoints();
+    eventSender.addTouchPoint(10, 10);
+    eventSender.touchStart();
+    eventSender.touchEnd();
+} else
+    debug('This test requires DRT.');
+
+document.body.removeChild(target);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/touch-event-frames.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/touch-event-frames.js
new file mode 100644 (file)
index 0000000..37bfae7
--- /dev/null
@@ -0,0 +1,121 @@
+var iframe = document.createElement("iframe");
+iframe.style.border = '1px solid black';
+iframe.style.position = 'absolute';
+iframe.style.left = '9px';
+iframe.style.top = '9px'; // with 1px border, puts the iframe at 10,10
+
+document.body.insertBefore(iframe, document.body.firstChild);
+
+var iframeDoc = iframe.contentDocument;
+var div = iframeDoc.createElement("div");
+div.id = "touchtarget";
+div.style.width = "100px";
+div.style.height = "100px";
+div.style.backgroundColor = "blue";
+
+document.getElementById('console').style.marginTop = '170px';
+
+var lastEvent = null;
+var touchEventsReceived = 0;
+var EXPECTED_TOUCH_EVENTS_TOTAL = 2;
+
+function touchEventCallback(event) {
+    if (window.eventSender) {
+        lastEvent = event;
+        verifyTouch(touchEventsReceived++);
+    } else {
+        debug(event.type);
+    }
+
+    if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) {
+        // If we've got here, we can safely say we were successfully parsed :) We need to
+        // call the isSucccessfullyParsed function to output the correct TEST COMPLETE
+        // footer message.
+        successfullyParsed = true;
+        isSuccessfullyParsed();
+        testRunner.notifyDone();
+    }
+}
+
+function mouseEventCallback(event)
+{
+  lastEvent = event;
+  debug('Mouse event: ' + event.type);
+  shouldBe("lastEvent.pageX", "12");
+  shouldBe("lastEvent.pageY", "15");
+
+  shouldBe("lastEvent.screenX", "22");
+  shouldBe("lastEvent.screenY", "25");
+
+  shouldBe("lastEvent.clientX", "12");
+  shouldBe("lastEvent.clientY", "15");
+}
+
+div.addEventListener("mousedown", mouseEventCallback, false);
+div.addEventListener("touchstart", touchEventCallback, false);
+div.addEventListener("touchmove", touchEventCallback, false);
+div.addEventListener("touchend", touchEventCallback, false);
+iframeDoc.body.style.margin = '0';
+iframeDoc.body.appendChild(div);
+
+function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount)
+{
+    shouldBeEqualToString("lastEvent.type", type);
+    shouldBe("lastEvent.touches.length", totalTouchCount.toString());
+    shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString());
+    shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString());
+}
+
+function verifyTouch(which) {
+    switch (which) {
+        case 0:
+           verifyTouchEvent("touchstart", 1, 1, 1);
+           shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget");
+
+           shouldBe("lastEvent.touches[0].pageX", '12');
+           shouldBe("lastEvent.touches[0].pageY", '15');
+
+           shouldBe("lastEvent.touches[0].clientX", '12');
+           shouldBe("lastEvent.touches[0].clientY", '15');
+
+           shouldBe("lastEvent.touches[0].screenX", '22');
+           shouldBe("lastEvent.touches[0].screenY", '25');
+
+           shouldBe("lastEvent.pageX", '12');
+           shouldBe("lastEvent.pageY", '15');
+        break;
+        case 1:
+            verifyTouchEvent("touchend", 0, 1, 0);
+        break;
+
+        default: testFailed("Wrong number of touch events! (" + which + ")");
+    }
+}
+
+function sendTouchSequence()
+{
+    eventSender.mouseMoveTo(22, 25);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+
+    eventSender.addTouchPoint(22, 25);
+    eventSender.touchStart();
+
+    eventSender.releaseTouchPoint(0);
+    eventSender.touchEnd();
+}
+
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+if (window.eventSender) {
+    description("This tests pageX and pageY coordinates on touch events and touches.");
+
+    lastEvent = null;
+    sendTouchSequence();
+
+} else {
+    debug("This test requires DumpRenderTree.  Tap on the blue rect to log.")
+}
+
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/touch-event-pageXY.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/touch-event-pageXY.js
new file mode 100644 (file)
index 0000000..3e624a2
--- /dev/null
@@ -0,0 +1,121 @@
+var div = document.createElement("div");
+div.id = "touchtarget";
+div.style.width = "100px";
+div.style.height = "100px";
+div.style.backgroundColor = "blue";
+
+var lastEvent = null;
+var touchEventsReceived = 0;
+var EXPECTED_TOUCH_EVENTS_TOTAL = 4;
+
+function touchEventCallback() {
+    if (window.eventSender) {
+        lastEvent = event;
+        verifyTouch(touchEventsReceived++);
+    } else {
+        debug(event.type);
+    }
+
+    if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) {
+        // If we've got here, we can safely say we were successfully parsed :) We need to
+        // call the isSucccessfullyParsed function to output the correct TEST COMPLETE
+        // footer message.
+        successfullyParsed = true;
+        isSuccessfullyParsed();
+        testRunner.notifyDone();
+    }
+}
+
+div.addEventListener("touchstart", touchEventCallback, false);
+div.addEventListener("touchmove", touchEventCallback, false);
+div.addEventListener("touchend", touchEventCallback, false);
+document.body.insertBefore(div, document.body.firstChild);
+
+function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount)
+{
+    shouldBeEqualToString("lastEvent.type", type);
+    shouldBe("lastEvent.touches.length", totalTouchCount.toString());
+    shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString());
+    shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString());
+}
+
+function verifyTouchPoint(list, point, x, y, id)
+{
+    shouldBe("lastEvent." + list + "[" + point + "].pageX", x.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].pageY", y.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].clientX", x.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].clientY", y.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].identifier", id.toString());
+}
+
+function verifyTouch(which) {
+    switch (which) {
+        case 0:
+           verifyTouchEvent("touchstart", 1, 1, 1);
+           shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget");
+
+           verifyTouchPoint("touches", 0, 8, 12, 0);
+           verifyTouchPoint("changedTouches", 0, 8, 12, 0);
+           verifyTouchPoint("targetTouches", 0, 8, 12, 0);
+
+           shouldBe("lastEvent.pageX", '8');
+           shouldBe("lastEvent.pageY", '12');
+        break;
+        case 1:
+           verifyTouchEvent("touchmove", 1, 1, 1);
+           verifyTouchPoint("touches", 0, 10, 15, 0);
+
+           shouldBe("lastEvent.pageX", '10');
+           shouldBe("lastEvent.pageY", '15');
+        break;
+        case 2:
+           verifyTouchEvent("touchstart", 2, 1, 2);
+           verifyTouchPoint("touches", 0, 10, 15, 0);
+           verifyTouchPoint("touches", 1, 40, 45, 1);
+
+           shouldBe("lastEvent.pageX", '25');
+           shouldBe("lastEvent.pageY", '30');
+        break;
+        case 3:
+            verifyTouchEvent("touchend", 1, 1, 1);
+
+            shouldBe("lastEvent.pageX", '40');
+            shouldBe("lastEvent.pageY", '45');
+        break;
+
+        default: testFailed("Wrong number of touch events! (" + which + ")");
+    }
+}
+
+function sendTouchSequence()
+{
+    eventSender.addTouchPoint(8, 12);
+    eventSender.touchStart();
+
+    debug('move');
+    eventSender.updateTouchPoint(0, 10, 15);
+    eventSender.touchMove();
+
+    debug('add second touch');
+    eventSender.addTouchPoint(40, 45);
+    eventSender.touchStart();
+
+    debug('end');
+    eventSender.releaseTouchPoint(0);
+    eventSender.touchEnd();
+}
+
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+if (window.eventSender) {
+    description("This tests pageX and pageY coordinates on touch events and touches.");
+
+    lastEvent = null;
+    sendTouchSequence();
+
+} else {
+    debug("This test requires DumpRenderTree.  Tap on the blue rect to log.")
+}
+
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/zoomed-touch-event-pageXY.js b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/script-tests/zoomed-touch-event-pageXY.js
new file mode 100644 (file)
index 0000000..9b2f18e
--- /dev/null
@@ -0,0 +1,122 @@
+var div = document.createElement("div");
+div.id = "touchtarget";
+div.style.width = "100px";
+div.style.height = "100px";
+div.style.backgroundColor = "blue";
+
+var lastEvent = null;
+var touchEventsReceived = 0;
+var EXPECTED_TOUCH_EVENTS_TOTAL = 4;
+
+function touchEventCallback() {
+    if (window.eventSender) {
+        lastEvent = event;
+        verifyTouch(touchEventsReceived++);
+    } else {
+        debug(event.type);
+    }
+
+    if (window.testRunner && touchEventsReceived == EXPECTED_TOUCH_EVENTS_TOTAL) {
+        // If we've got here, we can safely say we were successfully parsed :) We need to
+        // call the isSucccessfullyParsed function to output the correct TEST COMPLETE
+        // footer message.
+        successfullyParsed = true;
+        isSuccessfullyParsed();
+        testRunner.notifyDone();
+    }
+}
+
+div.addEventListener("touchstart", touchEventCallback, false);
+div.addEventListener("touchmove", touchEventCallback, false);
+div.addEventListener("touchend", touchEventCallback, false);
+document.body.insertBefore(div, document.body.firstChild);
+
+function verifyTouchEvent(type, totalTouchCount, changedTouchCount, targetTouchCount)
+{
+    shouldBeEqualToString("lastEvent.type", type);
+    shouldBe("lastEvent.touches.length", totalTouchCount.toString());
+    shouldBe("lastEvent.changedTouches.length", changedTouchCount.toString());
+    shouldBe("lastEvent.targetTouches.length", targetTouchCount.toString());
+}
+
+function verifyTouchPoint(list, point, x, y, id)
+{
+    shouldBe("lastEvent." + list + "[" + point + "].pageX", x.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].pageY", y.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].clientX", x.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].clientY", y.toString());
+    shouldBe("lastEvent." + list + "[" + point + "].identifier", id.toString());
+}
+
+function verifyTouch(which) {
+    switch (which) {
+        case 0:
+           verifyTouchEvent("touchstart", 1, 1, 1);
+           shouldBeEqualToString("lastEvent.touches[0].target.id", "touchtarget");
+
+           verifyTouchPoint("touches", 0, 8, 12, 0);
+           verifyTouchPoint("changedTouches", 0, 8, 12, 0);
+           verifyTouchPoint("targetTouches", 0, 8, 12, 0);
+
+           shouldBe("lastEvent.pageX", '8');
+           shouldBe("lastEvent.pageY", '12');
+        break;
+        case 1:
+           verifyTouchEvent("touchmove", 1, 1, 1);
+           verifyTouchPoint("touches", 0, 10, 15, 0);
+
+           shouldBe("lastEvent.pageX", '10');
+           shouldBe("lastEvent.pageY", '15');
+        break;
+        case 2:
+           verifyTouchEvent("touchstart", 2, 1, 2);
+           verifyTouchPoint("touches", 0, 10, 15, 0);
+           verifyTouchPoint("touches", 1, 40, 45, 1);
+
+           shouldBe("lastEvent.pageX", '25');
+           shouldBe("lastEvent.pageY", '30');
+        break;
+        case 3:
+            verifyTouchEvent("touchend", 1, 1, 1);
+
+            shouldBe("lastEvent.pageX", '40');
+            shouldBe("lastEvent.pageY", '45');
+        break;
+
+        default: testFailed("Wrong number of touch events! (" + which + ")");
+    }
+}
+
+function sendTouchSequence()
+{
+    eventSender.addTouchPoint(8*2, 12*2);
+    eventSender.touchStart();
+
+    debug('move');
+    eventSender.updateTouchPoint(0, 10*2, 15*2);
+    eventSender.touchMove();
+
+    debug('add second touch');
+    eventSender.addTouchPoint(40*2, 45*2);
+    eventSender.touchStart();
+
+    debug('end');
+    eventSender.releaseTouchPoint(0);
+    eventSender.touchEnd();
+}
+
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+if (window.eventSender) {
+    description("This tests pageX and pageY coordinates on touch events and touches when zoomed to 2x scale.");
+
+    // Give some time for the viewport scale to set in.
+    setTimeout(function() {
+        lastEvent = null;
+        sendTouchSequence();
+    }, 100);
+
+} else {
+    debug("This test requires DumpRenderTree.  Tap on the blue rect to log.")
+}
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/text-node-touch-target.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/text-node-touch-target.html
new file mode 100644 (file)
index 0000000..0c1993c
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/text-node-touch-target.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/textarea-touch-target.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/textarea-touch-target.html
new file mode 100644 (file)
index 0000000..aa417a4
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/textarea-touch-target.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-frames-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-frames-expected.txt
new file mode 100644 (file)
index 0000000..b5c19ff
--- /dev/null
@@ -0,0 +1,34 @@
+
+This tests pageX and pageY coordinates on touch events and touches.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Mouse event: mousedown
+PASS lastEvent.pageX is 12
+PASS lastEvent.pageY is 15
+PASS lastEvent.screenX is 22
+PASS lastEvent.screenY is 25
+PASS lastEvent.clientX is 12
+PASS lastEvent.clientY is 15
+PASS lastEvent.type is "touchstart"
+PASS lastEvent.touches.length is 1
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.touches[0].target.id is "touchtarget"
+PASS lastEvent.touches[0].pageX is 12
+PASS lastEvent.touches[0].pageY is 15
+PASS lastEvent.touches[0].clientX is 12
+PASS lastEvent.touches[0].clientY is 15
+PASS lastEvent.touches[0].screenX is 22
+PASS lastEvent.touches[0].screenY is 25
+PASS lastEvent.pageX is 12
+PASS lastEvent.pageY is 15
+PASS lastEvent.type is "touchend"
+PASS lastEvent.touches.length is 0
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 0
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-frames.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-frames.html
new file mode 100644 (file)
index 0000000..3c01d40
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/touch-event-frames.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-pageXY-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-pageXY-expected.txt
new file mode 100644 (file)
index 0000000..64f457a
--- /dev/null
@@ -0,0 +1,67 @@
+This tests pageX and pageY coordinates on touch events and touches.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS lastEvent.type is "touchstart"
+PASS lastEvent.touches.length is 1
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.touches[0].target.id is "touchtarget"
+PASS lastEvent.touches[0].pageX is 8
+PASS lastEvent.touches[0].pageY is 12
+PASS lastEvent.touches[0].clientX is 8
+PASS lastEvent.touches[0].clientY is 12
+PASS lastEvent.touches[0].identifier is 0
+PASS lastEvent.changedTouches[0].pageX is 8
+PASS lastEvent.changedTouches[0].pageY is 12
+PASS lastEvent.changedTouches[0].clientX is 8
+PASS lastEvent.changedTouches[0].clientY is 12
+PASS lastEvent.changedTouches[0].identifier is 0
+PASS lastEvent.targetTouches[0].pageX is 8
+PASS lastEvent.targetTouches[0].pageY is 12
+PASS lastEvent.targetTouches[0].clientX is 8
+PASS lastEvent.targetTouches[0].clientY is 12
+PASS lastEvent.targetTouches[0].identifier is 0
+PASS lastEvent.pageX is 8
+PASS lastEvent.pageY is 12
+move
+PASS lastEvent.type is "touchmove"
+PASS lastEvent.touches.length is 1
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.touches[0].pageX is 10
+PASS lastEvent.touches[0].pageY is 15
+PASS lastEvent.touches[0].clientX is 10
+PASS lastEvent.touches[0].clientY is 15
+PASS lastEvent.touches[0].identifier is 0
+PASS lastEvent.pageX is 10
+PASS lastEvent.pageY is 15
+add second touch
+PASS lastEvent.type is "touchstart"
+PASS lastEvent.touches.length is 2
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 2
+PASS lastEvent.touches[0].pageX is 10
+PASS lastEvent.touches[0].pageY is 15
+PASS lastEvent.touches[0].clientX is 10
+PASS lastEvent.touches[0].clientY is 15
+PASS lastEvent.touches[0].identifier is 0
+PASS lastEvent.touches[1].pageX is 40
+PASS lastEvent.touches[1].pageY is 45
+PASS lastEvent.touches[1].clientX is 40
+PASS lastEvent.touches[1].clientY is 45
+PASS lastEvent.touches[1].identifier is 1
+PASS lastEvent.pageX is 25
+PASS lastEvent.pageY is 30
+end
+PASS lastEvent.type is "touchend"
+PASS lastEvent.touches.length is 1
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.pageX is 40
+PASS lastEvent.pageY is 45
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-pageXY.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/touch-event-pageXY.html
new file mode 100644 (file)
index 0000000..638b2b7
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/touch-event-pageXY.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/zoomed-touch-event-pageXY-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/zoomed-touch-event-pageXY-expected.txt
new file mode 100644 (file)
index 0000000..287f4ab
--- /dev/null
@@ -0,0 +1,67 @@
+This tests pageX and pageY coordinates on touch events and touches when zoomed to 2x scale.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS lastEvent.type is "touchstart"
+PASS lastEvent.touches.length is 1
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.touches[0].target.id is "touchtarget"
+PASS lastEvent.touches[0].pageX is 8
+PASS lastEvent.touches[0].pageY is 12
+PASS lastEvent.touches[0].clientX is 8
+PASS lastEvent.touches[0].clientY is 12
+PASS lastEvent.touches[0].identifier is 0
+PASS lastEvent.changedTouches[0].pageX is 8
+PASS lastEvent.changedTouches[0].pageY is 12
+PASS lastEvent.changedTouches[0].clientX is 8
+PASS lastEvent.changedTouches[0].clientY is 12
+PASS lastEvent.changedTouches[0].identifier is 0
+PASS lastEvent.targetTouches[0].pageX is 8
+PASS lastEvent.targetTouches[0].pageY is 12
+PASS lastEvent.targetTouches[0].clientX is 8
+PASS lastEvent.targetTouches[0].clientY is 12
+PASS lastEvent.targetTouches[0].identifier is 0
+PASS lastEvent.pageX is 8
+PASS lastEvent.pageY is 12
+move
+PASS lastEvent.type is "touchmove"
+PASS lastEvent.touches.length is 1
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.touches[0].pageX is 10
+PASS lastEvent.touches[0].pageY is 15
+PASS lastEvent.touches[0].clientX is 10
+PASS lastEvent.touches[0].clientY is 15
+PASS lastEvent.touches[0].identifier is 0
+PASS lastEvent.pageX is 10
+PASS lastEvent.pageY is 15
+add second touch
+PASS lastEvent.type is "touchstart"
+PASS lastEvent.touches.length is 2
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 2
+PASS lastEvent.touches[0].pageX is 10
+PASS lastEvent.touches[0].pageY is 15
+PASS lastEvent.touches[0].clientX is 10
+PASS lastEvent.touches[0].clientY is 15
+PASS lastEvent.touches[0].identifier is 0
+PASS lastEvent.touches[1].pageX is 40
+PASS lastEvent.touches[1].pageY is 45
+PASS lastEvent.touches[1].clientX is 40
+PASS lastEvent.touches[1].clientY is 45
+PASS lastEvent.touches[1].identifier is 1
+PASS lastEvent.pageX is 25
+PASS lastEvent.pageY is 30
+end
+PASS lastEvent.type is "touchend"
+PASS lastEvent.touches.length is 1
+PASS lastEvent.changedTouches.length is 1
+PASS lastEvent.targetTouches.length is 1
+PASS lastEvent.pageX is 40
+PASS lastEvent.pageY is 45
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/events/touch/zoomed-touch-event-pageXY.html b/LayoutTests/platform/ios-simulator/ios/fast/events/touch/zoomed-touch-event-pageXY.html
new file mode 100644 (file)
index 0000000..27cad93
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<meta name="viewport" content="initial-scale=2">
+<script src="../../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/zoomed-touch-event-pageXY.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/absolute-over-fixed-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/fixed/absolute-over-fixed-expected.txt
new file mode 100644 (file)
index 0000000..2cf2b0f
--- /dev/null
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x2676
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x2676
+  RenderBlock {HTML} at (0,0) size 800x2676
+    RenderBody {BODY} at (8,8) size 784x2660
+      RenderBlock {DIV} at (5,0) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,205) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,410) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,615) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,820) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1025) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1230) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1435) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1640) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1845) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2050) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2255) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2460) size 774x200 [bgcolor=#C0C0C0]
+layer at (100,60) size 304x304
+  RenderBlock (positioned) {DIV} at (100,60) size 304x304 [bgcolor=#008000CC] [border: (2px solid #000000)]
+    RenderText {#text} at (2,2) size 96x19
+      text run at (2,2) width 96: "Take a survey!"
+layer at (50,250) size 204x204
+  RenderBlock (positioned) {DIV} at (50,250) size 204x204 [bgcolor=#008080CC] [border: (2px solid #000000)]
+    RenderText {#text} at (2,2) size 180x19
+      text run at (2,2) width 180: "This should go over the top."
+scrolled to 0,200
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/absolute-over-fixed.html b/LayoutTests/platform/ios-simulator/ios/fast/fixed/absolute-over-fixed.html
new file mode 100644 (file)
index 0000000..031768e
--- /dev/null
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css" media="screen">
+      .content {
+        background-color: silver;
+        height: 200px;
+        margin: 5px;
+      }
+      .fixed {
+        position: fixed;
+        width: 300px;
+        height: 300px;
+        top: 50px;
+        left: 0;
+        margin: 10px 100px;
+        background-color: rgba(0, 128, 0, 0.8);
+        border: 2px solid black;
+      }
+
+      .absolute {
+        position: absolute;
+        width: 200px;
+        height: 200px;
+        top: 250px;
+        left: 50px;
+        background-color: rgba(0, 128, 128, 0.8);
+        border: 2px solid black;
+      }
+    </style>
+    <script type="text/javascript" charset="utf-8">
+      if (window.testRunner)
+        testRunner.waitUntilDone();
+      function doTest()
+      {
+        window.setTimeout(function() {
+          window.scrollTo(50, 200);
+          if (window.testRunner)
+            testRunner.notifyDone();
+        }, 0);
+      }
+      window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+  <div class="fixed">
+    Take a survey!
+  </div>
+  
+  <div class="absolute">
+    This should go over the top.
+  </div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/auto-position-fixed-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/fixed/auto-position-fixed-expected.txt
new file mode 100644 (file)
index 0000000..324df6d
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 1013x2061
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x2061
+  RenderBlock {HTML} at (0,0) size 800x2061
+    RenderBody {BODY} at (8,8) size 784x2045
+      RenderBlock {DIV} at (5,0) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,410) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,615) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,820) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1025) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1230) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1435) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1640) size 1000x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1845) size 1000x200 [bgcolor=#C0C0C0]
+layer at (13,218) size 400x200
+  RenderBlock (positioned) {DIV} at (13,218) size 400x200 [bgcolor=#008000CC]
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/auto-position-fixed.html b/LayoutTests/platform/ios-simulator/ios/fast/fixed/auto-position-fixed.html
new file mode 100644 (file)
index 0000000..3140dc2
--- /dev/null
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css">
+      .content {
+        background-color: silver;
+        height: 200px;
+        width: 1000px;
+        margin: 5px;
+      }
+      
+      .fixed {
+        position: fixed;
+        width: 50%;
+        background-color: rgba(0, 128, 0, 0.8);
+      }
+    </style>
+</head>
+<body>
+
+<div class="content"></div>
+<div class="fixed content"></div>
+<div class="content" style="margin-top: 210px"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/fixed-in-transform-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/fixed/fixed-in-transform-expected.txt
new file mode 100644 (file)
index 0000000..a3a9e49
--- /dev/null
@@ -0,0 +1,25 @@
+layer at (0,0) size 800x2885
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x2885
+  RenderBlock {HTML} at (0,0) size 800x2885
+    RenderBody {BODY} at (8,8) size 784x2869
+      RenderBlock {DIV} at (5,209) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,414) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,619) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,824) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1029) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1234) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1439) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1644) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1849) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2054) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2259) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2464) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2669) size 774x200 [bgcolor=#C0C0C0]
+layer at (8,8) size 204x204
+  RenderBlock {DIV} at (0,0) size 204x204 [border: (2px solid #000000)]
+layer at (20,30) size 304x304
+  RenderBlock (positioned) {DIV} at (12,22) size 304x304 [bgcolor=#008000CC] [border: (2px solid #000000)]
+    RenderText {#text} at (2,2) size 96x19
+      text run at (2,2) width 96: "Take a survey!"
+scrolled to 0,200
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/fixed-in-transform.html b/LayoutTests/platform/ios-simulator/ios/fast/fixed/fixed-in-transform.html
new file mode 100644 (file)
index 0000000..4eff1a5
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css" media="screen">
+      .content {
+        background-color: silver;
+        height: 200px;
+        margin: 5px;
+      }
+      
+      .fixed {
+        position: fixed;
+        width: 300px;
+        height: 300px;
+        top: 20px;
+        left: 10px;
+        background-color: rgba(0, 128, 0, 0.8);
+        border: 2px solid black;
+      }
+      
+      .transformed {
+        height: 200px;
+        width: 200px;
+        -webkit-transform: rotate(45deg);
+        border: 2px solid black;
+      }
+    </style>
+    <script type="text/javascript" charset="utf-8">
+      if (window.testRunner)
+        testRunner.waitUntilDone();
+      function doTest()
+      {
+        window.setTimeout(function() {
+          window.scrollTo(50, 200);
+          if (window.testRunner)
+            testRunner.notifyDone();
+        }, 0);
+      }
+      window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+  <div class="transformed">
+    <div class="fixed">
+      Take a survey!
+    </div>
+  </div>
+
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/four-bars-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/fixed/four-bars-expected.txt
new file mode 100644 (file)
index 0000000..b406edd
--- /dev/null
@@ -0,0 +1,35 @@
+layer at (0,0) size 800x2676
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x2676
+  RenderBlock {HTML} at (0,0) size 800x2676
+    RenderBody {BODY} at (8,8) size 784x2660
+      RenderBlock {DIV} at (5,0) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,205) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,410) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,615) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,820) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1025) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1230) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1435) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1640) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1845) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2050) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2255) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2460) size 774x200 [bgcolor=#C0C0C0]
+layer at (10,10) size 772x54
+  RenderBlock (positioned) {DIV} at (10,10) size 772x54 [bgcolor=#008000CC] [border: (2px solid #000000)]
+    RenderText {#text} at (2,2) size 120x19
+      text run at (2,2) width 120: "This is the top bar."
+layer at (20,210) size 154x304
+  RenderBlock (positioned) {DIV} at (20,210) size 154x304 [bgcolor=#008000CC] [border: (2px solid #000000)]
+    RenderText {#text} at (2,2) size 121x19
+      text run at (2,2) width 121: "This is the left bar."
+layer at (626,210) size 154x304
+  RenderBlock (positioned) {DIV} at (626,210) size 154x304 [bgcolor=#008000CC] [border: (2px solid #000000)]
+    RenderText {#text} at (2,2) size 130x19
+      text run at (2,2) width 130: "This is the right bar."
+layer at (10,526) size 772x54
+  RenderBlock (positioned) {DIV} at (10,526) size 772x54 [bgcolor=#008000CC] [border: (2px solid #000000)]
+    RenderText {#text} at (2,2) size 145x19
+      text run at (2,2) width 145: "This is the bottom bar."
+scrolled to 0,200
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/four-bars.html b/LayoutTests/platform/ios-simulator/ios/fast/fixed/four-bars.html
new file mode 100644 (file)
index 0000000..0b9bd7a
--- /dev/null
@@ -0,0 +1,92 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css" media="screen">
+      .content {
+        background-color: silver;
+        height: 200px;
+        margin: 5px;
+      }
+      
+      .fixed {
+        position: fixed;
+        top: 0;
+        left: 0;
+        margin: 10px;
+        height: 50px;
+        background-color: rgba(0, 128, 0, 0.8);
+        border: 2px solid black;
+        -webkit-box-shadow: 0 0 20px black;
+      }
+      
+      .top, .bottom {
+        width: 96%;
+      }
+
+      .left {
+        top: 200px;
+        left: 10px;
+        width: 150px;
+        height: 300px;
+      }
+
+      .right {
+        top: 200px;
+        left: auto;
+        right: 10px;
+        width: 150px;
+        height: 300px;
+      }
+      
+      .bottom {
+        top: auto;
+        bottom: 10px;
+      }
+    </style>
+    <script type="text/javascript" charset="utf-8">
+      if (window.testRunner)
+        testRunner.waitUntilDone();
+      function doTest()
+      {
+        window.setTimeout(function() {
+          window.scrollTo(50, 200);
+          if (window.testRunner)
+            testRunner.notifyDone();
+        }, 0);
+      }
+      window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+  <div class="content"></div>
+
+
+<div class="fixed top">
+  This is the top bar.
+</div>
+<div class="fixed left">
+  This is the left bar.
+</div>
+<div class="fixed right">
+  This is the right bar.
+</div>
+<div class="fixed bottom">
+  This is the bottom bar.
+</div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/frame-with-fixed-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/fixed/frame-with-fixed-expected.txt
new file mode 100644 (file)
index 0000000..407fb28
--- /dev/null
@@ -0,0 +1,36 @@
+layer at (0,0) size 800x2225
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x2225
+  RenderBlock {HTML} at (0,0) size 800x2225
+    RenderBody {BODY} at (8,8) size 784x2209
+      RenderBlock (anonymous) at (0,0) size 784x159
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (5,164) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,369) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,574) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,779) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,984) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1189) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1394) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1599) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1804) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,2009) size 774x200 [bgcolor=#C0C0C0]
+layer at (8,8) size 304x154
+  RenderPartObject {IFRAME} at (0,0) size 304x154 [border: (2px inset #000000)]
+    layer at (0,0) size 300x831
+      RenderView at (0,0) size 300x150
+    layer at (0,0) size 300x831
+      RenderBlock {HTML} at (0,0) size 300x831
+        RenderBody {BODY} at (8,8) size 284x815
+          RenderBlock {DIV} at (5,0) size 274x200 [bgcolor=#C0C0C0]
+          RenderBlock {DIV} at (5,205) size 274x200 [bgcolor=#C0C0C0]
+          RenderBlock {DIV} at (5,410) size 274x200 [bgcolor=#C0C0C0]
+          RenderBlock {DIV} at (5,615) size 274x200 [bgcolor=#C0C0C0]
+    layer at (5,5) size 290x140
+      RenderBlock (positioned) {DIV} at (5,5) size 290x140 [bgcolor=#000000CC]
+        RenderBlock {DIV} at (29,100) size 232x500 [bgcolor=#FFFFFF]
+          RenderText {#text} at (0,0) size 57x19
+            text run at (0,0) width 57: "Contents"
+layer at (100,60) size 304x304
+  RenderBlock (positioned) {DIV} at (100,60) size 304x304 [bgcolor=#008000CC] [border: (2px solid #000000)]
+scrolled to 0,200
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/frame-with-fixed.html b/LayoutTests/platform/ios-simulator/ios/fast/fixed/frame-with-fixed.html
new file mode 100644 (file)
index 0000000..540a50c
--- /dev/null
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css" media="screen">
+      .content {
+        background-color: silver;
+        height: 200px;
+        margin: 5px;
+      }
+      
+      .fixed {
+        position: fixed;
+        width: 300px;
+        height: 300px;
+        top: 50px;
+        left: 0;
+        margin: 10px 100px;
+        background-color: rgba(0, 128, 0, 0.8);
+        border: 2px solid black;
+      }
+      
+    </style>
+    <script type="text/javascript" charset="utf-8">
+      if (window.testRunner)
+        testRunner.waitUntilDone();
+      function doTest()
+      {
+        window.setTimeout(function() {
+          window.scrollTo(50, 200);
+          if (window.testRunner) {
+            testRunner.notifyDone();
+          }
+        }, 0);
+      }
+      window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+<div class="fixed"></div>
+
+<iframe src="resources/subframe.html"></iframe>
+
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/overlay-fixed-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/fixed/overlay-fixed-expected.txt
new file mode 100644 (file)
index 0000000..f96e328
--- /dev/null
@@ -0,0 +1,21 @@
+layer at (0,0) size 800x2061
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x2061
+  RenderBlock {HTML} at (0,0) size 800x2061
+    RenderBody {BODY} at (8,8) size 784x2045
+      RenderBlock {DIV} at (5,0) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,205) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,410) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,615) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,820) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1025) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1230) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1435) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1640) size 774x200 [bgcolor=#C0C0C0]
+      RenderBlock {DIV} at (5,1845) size 774x200 [bgcolor=#C0C0C0]
+layer at (5,5) size 790x590
+  RenderBlock (positioned) {DIV} at (5,5) size 790x590 [bgcolor=#000000CC]
+    RenderBlock {DIV} at (79,100) size 632x500 [bgcolor=#FFFFFF]
+      RenderText {#text} at (0,0) size 57x19
+        text run at (0,0) width 57: "Contents"
+scrolled to 0,200
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/overlay-fixed.html b/LayoutTests/platform/ios-simulator/ios/fast/fixed/overlay-fixed.html
new file mode 100644 (file)
index 0000000..9f9a1f5
--- /dev/null
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css" media="screen">
+      .content {
+        background-color: silver;
+        height: 200px;
+        margin: 5px;
+      }
+
+      .fixed {
+        position: fixed;
+        top: 0;
+        left: 0;
+        bottom: 0;
+        right: 0;
+        margin: 5px;
+        background-color: rgba(0, 0, 0, 0.8);
+      }
+      
+      .fixed > .contents {
+        background-color: white;
+        width: 80%;
+        height: 500px;
+        margin: 100px auto;
+      }
+    </style>
+    <script type="text/javascript" charset="utf-8">
+      if (window.testRunner)
+        testRunner.waitUntilDone();
+      function doTest()
+      {
+        window.setTimeout(function() {
+          window.scrollTo(50, 200);
+          if (window.testRunner) {
+            testRunner.notifyDone();
+          }
+        }, 0);
+      }
+      window.addEventListener('load', doTest, false);
+    </script>
+</head>
+<body>
+
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+<div class="content"></div>
+
+<div class="fixed">
+  <div class="contents">
+    Contents
+  </div>
+</div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/fixed/resources/subframe.html b/LayoutTests/platform/ios-simulator/ios/fast/fixed/resources/subframe.html
new file mode 100644 (file)
index 0000000..96cf234
--- /dev/null
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+    <style type="text/css">
+      .content {
+        background-color: silver;
+        height: 200px;
+        margin: 5px;
+      }
+
+      .fixed {
+        position: fixed;
+        top: 0;
+        left: 0;
+        bottom: 0;
+        right: 0;
+        margin: 5px;
+        background-color: rgba(0, 0, 0, 0.8);
+      }
+      
+      .fixed > .contents {
+        background-color: white;
+        width: 80%;
+        height: 500px;
+        margin: 100px auto;
+      }
+    </style>
+</head>
+<body>
+
+  <div class="content"></div>
+  <div class="content"></div>
+
+  <div class="fixed">
+    <div class="contents">
+      Contents
+    </div>
+  </div>
+
+  <div class="content"></div>
+  <div class="content"></div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/flexbox/vertical-box-form-controls-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/flexbox/vertical-box-form-controls-expected.txt
new file mode 100644 (file)
index 0000000..cf1e79b
--- /dev/null
@@ -0,0 +1,25 @@
+
+
+
+
+Check if form controls in vertical flex box will stretch horizontally when rendered as box as opposed to inline-box. If you see any red, then the test has failed. iOS has extra requirements for buttons to be styled; they must either have a transparent background, or a background image.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Button
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+Text input
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+Textarea
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+Submit
+PASS element.offsetHeight is 100
+PASS element.offsetWidth is 100
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/flexbox/vertical-box-form-controls.html b/LayoutTests/platform/ios-simulator/ios/fast/flexbox/vertical-box-form-controls.html
new file mode 100644 (file)
index 0000000..adcaf50
--- /dev/null
@@ -0,0 +1,80 @@
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<style>
+div.box {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+}
+
+div.outer {
+  width: 100px;
+  height: 100px;
+  background-color: red;
+  box-orient: vertical;
+  -moz-box-orient: vertical;
+  -webkit-box-orient: vertical;
+}
+
+.inner {
+  display: -webkit-box;
+  display: -moz-box;
+  display: box;
+  box-align: stretch;
+  -moz-box-align: stretch;
+  -webkit-box-align: stretch;
+  margin: 0;
+  border: 0;
+  padding: 0;
+  height: 100px;
+  /* datauri for a 1x1 green pixel. */
+  background: url(data:image/gif;charset=binary;base64,R0lGODlhAQABAIAAAABxAAAAACH5BAQAAAAALAAAAAABAAEAAAICRAEAOw==);
+}
+</style>
+</head>
+<body>
+<div class="box outer">
+<button class="inner" type="submit" id="button"></button>
+</div>
+<div class="box outer">
+<input class="inner" type="text" value="" id="inputText">
+</div>
+<div class="box outer">
+<textarea class="inner" id="textarea"></textarea>
+</div>
+<div class="box outer">
+<input class="inner" type="submit" value="" id="submit">
+</div>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+description("Check if form controls in vertical flex box will stretch horizontally when rendered as box as opposed to inline-box. If you see any red, then the test has failed. iOS has extra requirements for buttons to be styled; they must either have a transparent background, or a background image.");
+
+var element = null;
+
+debug("Button");
+element = document.getElementById("button");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+debug("Text input");
+element = document.getElementById("inputText");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+debug("Textarea");
+element = document.getElementById("textarea");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+debug("Submit");
+element = document.getElementById("submit");
+shouldBe("element.offsetHeight", "100");
+shouldBe("element.offsetWidth", "100");
+
+successfullyParsed = true;
+</script>
+<script src="../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-attribute-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-attribute-expected.txt
new file mode 100644 (file)
index 0000000..6ffab7b
--- /dev/null
@@ -0,0 +1,120 @@
+Test the "autocapitalize" attribute values and fallback values.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Testing inputs outside of a form.
+PASS i1.autocapitalize is ""
+PASS i1.getAttribute('autocapitalize') is null
+PASS i2.autocapitalize is ""
+PASS i2.getAttribute('autocapitalize') is ""
+PASS i3.autocapitalize is "sentences"
+PASS i3.getAttribute('autocapitalize') is "on"
+PASS i4.autocapitalize is "none"
+PASS i4.getAttribute('autocapitalize') is "off"
+PASS i5.autocapitalize is "none"
+PASS i5.getAttribute('autocapitalize') is "none"
+PASS i6.autocapitalize is "words"
+PASS i6.getAttribute('autocapitalize') is "words"
+PASS i7.autocapitalize is "sentences"
+PASS i7.getAttribute('autocapitalize') is "sentences"
+PASS i8.autocapitalize is "characters"
+PASS i8.getAttribute('autocapitalize') is "characters"
+PASS i9.autocapitalize is "sentences"
+PASS i9.getAttribute('autocapitalize') is "unknown"
+PASS i10.autocapitalize is "words"
+PASS i10.getAttribute('autocapitalize') is "wOrDs"
+
+Testing forms.
+PASS form1.autocapitalize is ""
+PASS form1.getAttribute('autocapitalize') is null
+PASS form2.autocapitalize is ""
+PASS form2.getAttribute('autocapitalize') is ""
+PASS form3.autocapitalize is "sentences"
+PASS form3.getAttribute('autocapitalize') is "on"
+PASS form4.autocapitalize is "words"
+PASS form4.getAttribute('autocapitalize') is "wOrDs"
+PASS form5.autocapitalize is "characters"
+PASS form5.getAttribute('autocapitalize') is "characters"
+
+Testing inputs inside of a form with a default of "characters".
+PASS j1.autocapitalize is "characters"
+PASS j1.getAttribute('autocapitalize') is null
+PASS j2.autocapitalize is "characters"
+PASS j2.getAttribute('autocapitalize') is ""
+PASS j3.autocapitalize is "sentences"
+PASS j3.getAttribute('autocapitalize') is "on"
+PASS j4.autocapitalize is "none"
+PASS j4.getAttribute('autocapitalize') is "off"
+PASS j5.autocapitalize is "none"
+PASS j5.getAttribute('autocapitalize') is "none"
+PASS j6.autocapitalize is "words"
+PASS j6.getAttribute('autocapitalize') is "words"
+PASS j7.autocapitalize is "sentences"
+PASS j7.getAttribute('autocapitalize') is "sentences"
+PASS j8.autocapitalize is "characters"
+PASS j8.getAttribute('autocapitalize') is "characters"
+PASS j9.autocapitalize is "sentences"
+PASS j9.getAttribute('autocapitalize') is "unknown"
+PASS j10.autocapitalize is "words"
+PASS j10.getAttribute('autocapitalize') is "wOrDs"
+
+Testing inputs inside of a form with no default.
+PASS x1.autocapitalize is ""
+PASS x1.getAttribute('autocapitalize') is null
+PASS x2.autocapitalize is ""
+PASS x2.getAttribute('autocapitalize') is ""
+
+Testing textareas outside of a form.
+PASS text_i1.autocapitalize is ""
+PASS text_i1.getAttribute('autocapitalize') is null
+PASS text_i2.autocapitalize is ""
+PASS text_i2.getAttribute('autocapitalize') is ""
+PASS text_i3.autocapitalize is "sentences"
+PASS text_i3.getAttribute('autocapitalize') is "on"
+PASS text_i4.autocapitalize is "none"
+PASS text_i4.getAttribute('autocapitalize') is "off"
+PASS text_i5.autocapitalize is "none"
+PASS text_i5.getAttribute('autocapitalize') is "none"
+PASS text_i6.autocapitalize is "words"
+PASS text_i6.getAttribute('autocapitalize') is "words"
+PASS text_i7.autocapitalize is "sentences"
+PASS text_i7.getAttribute('autocapitalize') is "sentences"
+PASS text_i8.autocapitalize is "characters"
+PASS text_i8.getAttribute('autocapitalize') is "characters"
+PASS text_i9.autocapitalize is "sentences"
+PASS text_i9.getAttribute('autocapitalize') is "unknown"
+PASS text_i10.autocapitalize is "words"
+PASS text_i10.getAttribute('autocapitalize') is "wOrDs"
+
+Testing textareas inside of a form with a default of "characters".
+PASS text_j1.autocapitalize is "characters"
+PASS text_j1.getAttribute('autocapitalize') is null
+PASS text_j2.autocapitalize is "characters"
+PASS text_j2.getAttribute('autocapitalize') is ""
+PASS text_j3.autocapitalize is "sentences"
+PASS text_j3.getAttribute('autocapitalize') is "on"
+PASS text_j4.autocapitalize is "none"
+PASS text_j4.getAttribute('autocapitalize') is "off"
+PASS text_j5.autocapitalize is "none"
+PASS text_j5.getAttribute('autocapitalize') is "none"
+PASS text_j6.autocapitalize is "words"
+PASS text_j6.getAttribute('autocapitalize') is "words"
+PASS text_j7.autocapitalize is "sentences"
+PASS text_j7.getAttribute('autocapitalize') is "sentences"
+PASS text_j8.autocapitalize is "characters"
+PASS text_j8.getAttribute('autocapitalize') is "characters"
+PASS text_j9.autocapitalize is "sentences"
+PASS text_j9.getAttribute('autocapitalize') is "unknown"
+PASS text_j10.autocapitalize is "words"
+PASS text_j10.getAttribute('autocapitalize') is "wOrDs"
+
+Testing textareas inside of a form with no default.
+PASS text_x1.autocapitalize is ""
+PASS text_x1.getAttribute('autocapitalize') is null
+PASS text_x2.autocapitalize is ""
+PASS text_x2.getAttribute('autocapitalize') is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-attribute.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-attribute.html
new file mode 100644 (file)
index 0000000..a2bc575
--- /dev/null
@@ -0,0 +1,189 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<div style="display:none">
+    <input id="i1">
+    <input id="i2" autocapitalize="">
+    <input id="i3" autocapitalize="on">
+    <input id="i4" autocapitalize="off">
+    <input id="i5" autocapitalize="none">
+    <input id="i6" autocapitalize="words">
+    <input id="i7" autocapitalize="sentences">
+    <input id="i8" autocapitalize="characters">
+    <input id="i9" autocapitalize="unknown">
+    <input id="i10" autocapitalize="wOrDs">
+
+    <textarea id="text_i1"></textarea>
+    <textarea id="text_i2" autocapitalize=""></textarea>
+    <textarea id="text_i3" autocapitalize="on"></textarea>
+    <textarea id="text_i4" autocapitalize="off"></textarea>
+    <textarea id="text_i5" autocapitalize="none"></textarea>
+    <textarea id="text_i6" autocapitalize="words"></textarea>
+    <textarea id="text_i7" autocapitalize="sentences"></textarea>
+    <textarea id="text_i8" autocapitalize="characters"></textarea>
+    <textarea id="text_i9" autocapitalize="unknown"></textarea>
+    <textarea id="text_i10" autocapitalize="wOrDs"></textarea>
+
+    <form id="form1">
+        <input id="x1">
+        <input id="x2" autocapitalize="">
+        <textarea id="text_x1"></textarea>
+        <textarea id="text_x2" autocapitalize=""></textarea>
+    </form>
+    <form id="form2" autocapitalize=""></form>
+    <form id="form3" autocapitalize="on"></form>
+    <form id="form4" autocapitalize="wOrDs"></form>
+    <form id="form5" autocapitalize="characters">
+        <input id="j1">
+        <input id="j2" autocapitalize="">
+        <input id="j3" autocapitalize="on">
+        <input id="j4" autocapitalize="off">
+        <input id="j5" autocapitalize="none">
+        <input id="j6" autocapitalize="words">
+        <input id="j7" autocapitalize="sentences">
+        <input id="j8" autocapitalize="characters">
+        <input id="j9" autocapitalize="unknown">
+        <input id="j10" autocapitalize="wOrDs">
+        <textarea id="text_j1"></textarea>
+        <textarea id="text_j2" autocapitalize=""></textarea>
+        <textarea id="text_j3" autocapitalize="on"></textarea>
+        <textarea id="text_j4" autocapitalize="off"></textarea>
+        <textarea id="text_j5" autocapitalize="none"></textarea>
+        <textarea id="text_j6" autocapitalize="words"></textarea>
+        <textarea id="text_j7" autocapitalize="sentences"></textarea>
+        <textarea id="text_j8" autocapitalize="characters"></textarea>
+        <textarea id="text_j9" autocapitalize="unknown"></textarea>
+        <textarea id="text_j10" autocapitalize="wOrDs"></textarea>
+    </form>
+</div>
+<script>
+description('Test the "autocapitalize" attribute values and fallback values.');
+
+debug('Testing inputs outside of a form.');
+shouldBe("i1.autocapitalize", '""');
+shouldBe("i1.getAttribute('autocapitalize')", 'null');
+shouldBe("i2.autocapitalize", '""');
+shouldBe("i2.getAttribute('autocapitalize')", '""');
+shouldBe("i3.autocapitalize", '"sentences"'); // on => "sentences".
+shouldBe("i3.getAttribute('autocapitalize')", '"on"');
+shouldBe("i4.autocapitalize", '"none"'); // off => "none".
+shouldBe("i4.getAttribute('autocapitalize')", '"off"');
+shouldBe("i5.autocapitalize", '"none"');
+shouldBe("i5.getAttribute('autocapitalize')", '"none"');
+shouldBe("i6.autocapitalize", '"words"');
+shouldBe("i6.getAttribute('autocapitalize')", '"words"');
+shouldBe("i7.autocapitalize", '"sentences"');
+shouldBe("i7.getAttribute('autocapitalize')", '"sentences"');
+shouldBe("i8.autocapitalize", '"characters"');
+shouldBe("i8.getAttribute('autocapitalize')", '"characters"');
+shouldBe("i9.autocapitalize", '"sentences"'); // Unknown value falls back to sentences.
+shouldBe("i9.getAttribute('autocapitalize')", '"unknown"');
+shouldBe("i10.autocapitalize", '"words"');
+shouldBe("i10.getAttribute('autocapitalize')", '"wOrDs"');
+
+debug('');
+debug('Testing forms.');
+shouldBe("form1.autocapitalize", '""');
+shouldBe("form1.getAttribute('autocapitalize')", 'null');
+shouldBe("form2.autocapitalize", '""');
+shouldBe("form2.getAttribute('autocapitalize')", '""');
+shouldBe("form3.autocapitalize", '"sentences"'); // on => "sentences".
+shouldBe("form3.getAttribute('autocapitalize')", '"on"');
+shouldBe("form4.autocapitalize", '"words"');
+shouldBe("form4.getAttribute('autocapitalize')", '"wOrDs"');
+shouldBe("form5.autocapitalize", '"characters"');
+shouldBe("form5.getAttribute('autocapitalize')", '"characters"');
+
+debug('');
+debug('Testing inputs inside of a form with a default of "characters".');
+shouldBe("j1.autocapitalize", '"characters"'); // Fallback to form, which is "characters".
+shouldBe("j1.getAttribute('autocapitalize')", 'null');
+shouldBe("j2.autocapitalize", '"characters"'); // Fallback to form, which is "characters".
+shouldBe("j2.getAttribute('autocapitalize')", '""');
+shouldBe("j3.autocapitalize", '"sentences"'); // on => "sentences".
+shouldBe("j3.getAttribute('autocapitalize')", '"on"');
+shouldBe("j4.autocapitalize", '"none"'); // off => "none".
+shouldBe("j4.getAttribute('autocapitalize')", '"off"');
+shouldBe("j5.autocapitalize", '"none"');
+shouldBe("j5.getAttribute('autocapitalize')", '"none"');
+shouldBe("j6.autocapitalize", '"words"');
+shouldBe("j6.getAttribute('autocapitalize')", '"words"');
+shouldBe("j7.autocapitalize", '"sentences"');
+shouldBe("j7.getAttribute('autocapitalize')", '"sentences"');
+shouldBe("j8.autocapitalize", '"characters"');
+shouldBe("j8.getAttribute('autocapitalize')", '"characters"');
+shouldBe("j9.autocapitalize", '"sentences"'); // Unknown value falls back to sentences.
+shouldBe("j9.getAttribute('autocapitalize')", '"unknown"');
+shouldBe("j10.autocapitalize", '"words"');
+shouldBe("j10.getAttribute('autocapitalize')", '"wOrDs"');
+
+debug('');
+debug('Testing inputs inside of a form with no default.');
+shouldBe("x1.autocapitalize", '""'); // Fallback to form, which is default.
+shouldBe("x1.getAttribute('autocapitalize')", 'null');
+shouldBe("x2.autocapitalize", '""'); // Fallback to form, which is default.
+shouldBe("x2.getAttribute('autocapitalize')", '""');
+
+debug('');
+debug('Testing textareas outside of a form.');
+shouldBe("text_i1.autocapitalize", '""');
+shouldBe("text_i1.getAttribute('autocapitalize')", 'null');
+shouldBe("text_i2.autocapitalize", '""');
+shouldBe("text_i2.getAttribute('autocapitalize')", '""');
+shouldBe("text_i3.autocapitalize", '"sentences"'); // on => "sentences".
+shouldBe("text_i3.getAttribute('autocapitalize')", '"on"');
+shouldBe("text_i4.autocapitalize", '"none"'); // off => "none".
+shouldBe("text_i4.getAttribute('autocapitalize')", '"off"');
+shouldBe("text_i5.autocapitalize", '"none"');
+shouldBe("text_i5.getAttribute('autocapitalize')", '"none"');
+shouldBe("text_i6.autocapitalize", '"words"');
+shouldBe("text_i6.getAttribute('autocapitalize')", '"words"');
+shouldBe("text_i7.autocapitalize", '"sentences"');
+shouldBe("text_i7.getAttribute('autocapitalize')", '"sentences"');
+shouldBe("text_i8.autocapitalize", '"characters"');
+shouldBe("text_i8.getAttribute('autocapitalize')", '"characters"');
+shouldBe("text_i9.autocapitalize", '"sentences"'); // Unknown value falls back to sentences.
+shouldBe("text_i9.getAttribute('autocapitalize')", '"unknown"');
+shouldBe("text_i10.autocapitalize", '"words"');
+shouldBe("text_i10.getAttribute('autocapitalize')", '"wOrDs"');
+
+debug('');
+debug('Testing textareas inside of a form with a default of "characters".');
+shouldBe("text_j1.autocapitalize", '"characters"'); // Fallback to form, which is "characters".
+shouldBe("text_j1.getAttribute('autocapitalize')", 'null');
+shouldBe("text_j2.autocapitalize", '"characters"'); // Fallback to form, which is "characters".
+shouldBe("text_j2.getAttribute('autocapitalize')", '""');
+shouldBe("text_j3.autocapitalize", '"sentences"'); // on => "sentences".
+shouldBe("text_j3.getAttribute('autocapitalize')", '"on"');
+shouldBe("text_j4.autocapitalize", '"none"'); // off => "none".
+shouldBe("text_j4.getAttribute('autocapitalize')", '"off"');
+shouldBe("text_j5.autocapitalize", '"none"');
+shouldBe("text_j5.getAttribute('autocapitalize')", '"none"');
+shouldBe("text_j6.autocapitalize", '"words"');
+shouldBe("text_j6.getAttribute('autocapitalize')", '"words"');
+shouldBe("text_j7.autocapitalize", '"sentences"');
+shouldBe("text_j7.getAttribute('autocapitalize')", '"sentences"');
+shouldBe("text_j8.autocapitalize", '"characters"');
+shouldBe("text_j8.getAttribute('autocapitalize')", '"characters"');
+shouldBe("text_j9.autocapitalize", '"sentences"'); // Unknown value falls back to sentences.
+shouldBe("text_j9.getAttribute('autocapitalize')", '"unknown"');
+shouldBe("text_j10.autocapitalize", '"words"');
+shouldBe("text_j10.getAttribute('autocapitalize')", '"wOrDs"');
+
+debug('');
+debug('Testing textareas inside of a form with no default.');
+shouldBe("text_x1.autocapitalize", '""'); // Fallback to form, which is default.
+shouldBe("text_x1.getAttribute('autocapitalize')", 'null');
+shouldBe("text_x2.autocapitalize", '""'); // Fallback to form, which is default.
+shouldBe("text_x2.getAttribute('autocapitalize')", '""');
+
+var successfullyParsed = true;
+</script>
+<script src="../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/borderless-input-gradient-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/forms/borderless-input-gradient-expected.txt
new file mode 100644 (file)
index 0000000..a10defa
--- /dev/null
@@ -0,0 +1,85 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderTextControl {INPUT} at (2,2) size 136x22 [bgcolor=#008000] [border: (1px solid #4C4C4C)]
+      RenderBR {BR} at (139,16) size 1x0
+      RenderTextControl {INPUT} at (2,27) size 134x20 [bgcolor=#008000]
+      RenderBR {BR} at (137,40) size 1x0
+      RenderTextControl {INPUT} at (2,50) size 134x20 [bgcolor=#008000]
+      RenderBR {BR} at (137,63) size 1x0
+      RenderTextControl {INPUT} at (2,73) size 136x21 [bgcolor=#008000] [border: none (1px solid #4C4C4C)]
+      RenderBR {BR} at (139,86) size 1x0
+      RenderTextControl {INPUT} at (2,97) size 136x22 [bgcolor=#008000] [border: (1px solid #00000000) (1px solid #4C4C4C)]
+      RenderBR {BR} at (139,111) size 1x0
+      RenderTextControl {INPUT} at (2,122) size 136x22 [bgcolor=#008000] [border: (1px solid #4C4C4C)]
+        RenderFlexibleBox {DIV} at (6,3) size 123x15
+          RenderBlock {DIV} at (0,7) size 0x0
+          RenderBlock {DIV} at (0,0) size 123x14
+          RenderBlock {DIV} at (122,7) size 1x0
+      RenderBR {BR} at (139,136) size 1x0
+      RenderTextControl {INPUT} at (2,147) size 134x20 [bgcolor=#008000]
+        RenderFlexibleBox {DIV} at (5,2) size 123x15
+          RenderBlock {DIV} at (0,7) size 0x0
+          RenderBlock {DIV} at (0,0) size 123x14
+          RenderBlock {DIV} at (122,7) size 1x0
+      RenderBR {BR} at (137,160) size 1x0
+      RenderTextControl {INPUT} at (2,170) size 134x20 [bgcolor=#008000]
+        RenderFlexibleBox {DIV} at (5,2) size 123x15
+          RenderBlock {DIV} at (0,7) size 0x0
+          RenderBlock {DIV} at (0,0) size 123x14
+          RenderBlock {DIV} at (122,7) size 1x0
+      RenderBR {BR} at (137,183) size 1x0
+      RenderTextControl {INPUT} at (2,193) size 136x21 [bgcolor=#008000] [border: none (1px solid #4C4C4C)]
+        RenderFlexibleBox {DIV} at (6,2) size 123x15
+          RenderBlock {DIV} at (0,7) size 0x0
+          RenderBlock {DIV} at (0,0) size 123x14
+          RenderBlock {DIV} at (122,7) size 1x0
+      RenderBR {BR} at (139,206) size 1x0
+      RenderTextControl {INPUT} at (2,217) size 136x22 [bgcolor=#008000] [border: (1px solid #00000000) (1px solid #4C4C4C)]
+        RenderFlexibleBox {DIV} at (6,3) size 123x15
+          RenderBlock {DIV} at (0,7) size 0x0
+          RenderBlock {DIV} at (0,0) size 123x14
+          RenderBlock {DIV} at (122,7) size 1x0
+      RenderBR {BR} at (139,231) size 1x0
+      RenderBR {BR} at (154,278) size 0x0
+      RenderBR {BR} at (152,314) size 0x0
+      RenderBR {BR} at (152,350) size 0x0
+      RenderBR {BR} at (154,387) size 0x0
+      RenderBR {BR} at (154,425) size 0x0
+layer at (17,13) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (16,37) size 122x14
+  RenderBlock {DIV} at (5,2) size 123x15
+layer at (16,60) size 122x14
+  RenderBlock {DIV} at (5,2) size 123x15
+layer at (17,83) size 122x14
+  RenderBlock {DIV} at (6,2) size 123x15
+layer at (17,108) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (17,133) size 122x14
+  RenderBlock {DIV} at (0,0) size 123x14
+layer at (16,157) size 122x14
+  RenderBlock {DIV} at (0,0) size 123x14
+layer at (16,180) size 122x14
+  RenderBlock {DIV} at (0,0) size 123x14
+layer at (17,203) size 122x14
+  RenderBlock {DIV} at (0,0) size 123x14
+layer at (17,228) size 122x14
+  RenderBlock {DIV} at (0,0) size 123x14
+layer at (10,250) size 150x34 clip at (11,251) size 148x32
+  RenderTextControl {TEXTAREA} at (2,242) size 150x34 [bgcolor=#008000] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (3,3) size 144x14
+layer at (10,288) size 148x32
+  RenderTextControl {TEXTAREA} at (2,280) size 148x32 [bgcolor=#008000]
+    RenderBlock {DIV} at (2,2) size 144x14
+layer at (10,324) size 148x32
+  RenderTextControl {TEXTAREA} at (2,316) size 148x32 [bgcolor=#008000]
+    RenderBlock {DIV} at (2,2) size 144x14
+layer at (10,360) size 150x33 clip at (11,360) size 148x32
+  RenderTextControl {TEXTAREA} at (2,352) size 150x33 [bgcolor=#008000] [border: none (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (3,2) size 144x14
+layer at (10,397) size 150x34 clip at (11,398) size 148x32
+  RenderTextControl {TEXTAREA} at (2,389) size 150x34 [bgcolor=#008000] [border: (1px solid #00000000) (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (3,3) size 144x14
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/borderless-input-gradient.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/borderless-input-gradient.html
new file mode 100644 (file)
index 0000000..5038bea
--- /dev/null
@@ -0,0 +1,29 @@
+<!--
+  Each set consists of a regular field, with its normal
+  border and styling, followed by a top borderless or
+  transparent border versions of the same field. On iOS
+  we expect these fields to not draw their theme'd gradient.
+-->
+
+<style>
+input, textarea { background: green; }
+</style>
+
+<input><br>
+<input style="border:none;"><br>
+<input style="border:0;"><br>
+<input style="border-top-width:0;"><br>
+<input style="border-top-color:transparent;"><br>
+
+
+<input type="search"><br>
+<input type="search" style="border:none;"><br>
+<input type="search" style="border:0;"><br>
+<input type="search" style="border-top-width:0;"><br>
+<input type="search" style="border-top-color:transparent;"><br>
+
+<textarea></textarea><br>
+<textarea style="border:none;"></textarea><br>
+<textarea style="border:0;"></textarea><br>
+<textarea style="border-top-width:0;"></textarea><br>
+<textarea style="border-top-color:transparent;"></textarea><br>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/date-input-decorations-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/forms/date-input-decorations-expected.txt
new file mode 100644 (file)
index 0000000..81dff3e
--- /dev/null
@@ -0,0 +1,92 @@
+CONSOLE MESSAGE: line 61: InvalidStateError: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x595
+  RenderBlock {HTML} at (0,0) size 800x595
+    RenderBody {BODY} at (8,8) size 784x579
+      RenderBlock {FORM} at (0,0) size 784x579
+        RenderBlock {DIV} at (0,0) size 784x155
+          RenderBR {BR} at (101,2) size 0x19
+          RenderTextControl {INPUT} at (2,28) size 136x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+          RenderBR {BR} at (139,27) size 1x19
+          RenderBR {BR} at (154,51) size 0x19
+          RenderBR {BR} at (116,79) size 0x19
+          RenderBR {BR} at (82,107) size 0x19
+          RenderBlock {INPUT} at (2,141) size 13x8 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+            RenderBlock {DIV} at (6,3) size 1x1
+          RenderBR {BR} at (17,135) size 0x19
+        RenderBlock (anonymous) at (0,155) size 784x20
+          RenderBR {BR} at (0,0) size 0x19
+        RenderBlock {DIV} at (0,175) size 784x157
+          RenderBR {BR} at (212,0) size 0x19
+          RenderTextControl {INPUT} at (0,30) size 213x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+          RenderBR {BR} at (213,29) size 0x19
+          RenderBR {BR} at (212,53) size 0x19
+          RenderBR {BR} at (212,81) size 0x19
+          RenderBR {BR} at (212,109) size 0x19
+          RenderBlock {INPUT} at (0,143) size 213x8 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+            RenderBlock {DIV} at (6,3) size 201x1
+          RenderBR {BR} at (213,137) size 0x19
+        RenderBlock (anonymous) at (0,332) size 784x20
+          RenderBR {BR} at (0,0) size 0x19
+        RenderBlock {DIV} at (0,352) size 784x183
+          RenderBR {BR} at (236,1) size 0x19
+          RenderTextControl {INPUT} at (2,35) size 237x28 [color=#008000] [bgcolor=#FFFFFF] [border: (1px solid #008000)]
+          RenderBR {BR} at (241,38) size 0x19
+          RenderBR {BR} at (397,65) size 0x19
+          RenderBR {BR} at (277,98) size 0x19
+          RenderBR {BR} at (174,131) size 0x19
+          RenderBlock {INPUT} at (2,167) size 17x10 [color=#008000] [bgcolor=#FFFFFF] [border: (1px solid #008000)]
+            RenderBlock {DIV} at (8,4) size 1x0
+          RenderBR {BR} at (21,163) size 0x19
+        RenderBlock (anonymous) at (0,535) size 784x44
+          RenderBR {BR} at (0,0) size 0x19
+          RenderButton {INPUT} at (2,22) size 59x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (12,3) size 35x14
+              RenderText at (0,0) size 35x14
+                text run at (0,0) width 35: "Submit"
+          RenderText {#text} at (0,0) size 0x0
+layer at (10,10) size 97x22 clip at (11,11) size 95x20
+  RenderFlexibleBox {INPUT} at (2,2) size 97x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,4) size 63x14
+      RenderText {#text} at (0,0) size 63x14
+        text run at (0,0) width 63: "Apr 27, 2011"
+layer at (17,39) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (10,63) size 150x22 clip at (11,64) size 148x20
+  RenderFlexibleBox {INPUT} at (2,55) size 150x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,11) size 0x0
+layer at (10,91) size 112x22 clip at (11,92) size 110x20
+  RenderFlexibleBox {INPUT} at (2,83) size 112x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,11) size 0x0
+layer at (10,119) size 78x22 clip at (11,120) size 76x20
+  RenderFlexibleBox {INPUT} at (2,111) size 78x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,11) size 0x0
+layer at (8,187) size 212x22 clip at (9,188) size 210x20
+  RenderFlexibleBox {INPUT} at (0,4) size 212x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,11) size 0x0
+layer at (15,216) size 200x14
+  RenderBlock {DIV} at (6,3) size 201x15
+layer at (8,240) size 212x22 clip at (9,241) size 210x20
+  RenderFlexibleBox {INPUT} at (0,57) size 212x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,11) size 0x0
+layer at (8,268) size 212x22 clip at (9,269) size 210x20
+  RenderFlexibleBox {INPUT} at (0,85) size 212x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,11) size 0x0
+layer at (8,296) size 212x22 clip at (9,297) size 210x20
+  RenderFlexibleBox {INPUT} at (0,113) size 212x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (6,11) size 0x0
+layer at (10,362) size 232x29 clip at (11,363) size 230x27
+  RenderFlexibleBox {INPUT} at (2,2) size 232x29 [color=#008000] [bgcolor=#FFFFFF] [border: (1px solid #008000)]
+    RenderBlock {DIV} at (8,14) size 0x1
+layer at (19,399) size 220x18
+  RenderBlock {DIV} at (8,4) size 221x18
+layer at (10,426) size 393x29 clip at (11,427) size 391x27
+  RenderFlexibleBox {INPUT} at (2,66) size 393x29 [color=#008000] [bgcolor=#FFFFFF] [border: (1px solid #008000)]
+    RenderBlock {DIV} at (8,14) size 0x1
+layer at (10,459) size 273x29 clip at (11,460) size 271x27
+  RenderFlexibleBox {INPUT} at (2,99) size 273x29 [color=#008000] [bgcolor=#FFFFFF] [border: (1px solid #008000)]
+    RenderBlock {DIV} at (8,14) size 0x1
+layer at (10,492) size 170x29 clip at (11,493) size 168x27
+  RenderFlexibleBox {INPUT} at (2,132) size 170x29 [color=#008000] [bgcolor=#FFFFFF] [border: (1px solid #008000)]
+    RenderBlock {DIV} at (8,14) size 0x1
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/date-input-decorations.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/date-input-decorations.html
new file mode 100644 (file)
index 0000000..7d25642
--- /dev/null
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Date Input Test</title>
+    <style>
+    .fixed-width input {
+        width: 200px;
+    }
+    .flavored input {
+        letter-spacing: 8px;
+        border-color: green;
+        color: green;
+        font-size: 15px;
+        font-family: georgia, serif;
+        font-weight: bold;
+    }
+    </style>
+</head>
+<body>
+    <form method="get" action="#">
+        <div class="regular">
+            <input type="date"><br>
+            <input type="datetime"><br>
+            <input type="datetime-local"><br>
+            <input type="month"><br>
+            <input type="time"><br>
+            <input type="week"><br>
+        </div>
+        <br>
+        <div class="fixed-width">
+            <input type="date"><br>
+            <input type="datetime"><br>
+            <input type="datetime-local"><br>
+            <input type="month"><br>
+            <input type="time"><br>
+            <input type="week"><br>
+        </div>
+        <br>
+        <div class="flavored">
+            <input type="date"><br>
+            <input type="datetime"><br>
+            <input type="datetime-local"><br>
+            <input type="month"><br>
+            <input type="time"><br>
+            <input type="week"><br>
+        </div>
+        <br>
+        <input type="submit" value="Submit">
+    </form>
+    <script>
+    // Tue Apr 26 2011 18:56:20 GMT-0700 (PDT) which is Wed Apr 27 2011 01:56:20 GMT.
+    var date = new Date(1303869380391);
+    var dateAsNumber = +date;
+    var inputs = document.getElementsByTagName('input');
+    for (var i=0, len=inputs.length; i<len; ++i) {
+        var input = inputs[i];
+        if (input.type === "submit")
+            continue;
+        input.name = i;
+        if ("valueAsNumber" in input && input.type !== "month")
+            input.valueAsNumber = dateAsNumber;
+        else if ("valueAsDate" in input)
+            input.valueAsDate = date;
+    }
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/form-controls-on-backgrounds-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/forms/form-controls-on-backgrounds-expected.txt
new file mode 100644 (file)
index 0000000..a37e75b
--- /dev/null
@@ -0,0 +1,191 @@
+layer at (0,0) size 820x825
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x825
+  RenderBlock {HTML} at (0,0) size 800x825
+    RenderBody {BODY} at (0,0) size 800x825
+      RenderBlock {DIV} at (0,0) size 820x275
+        RenderBlock {DIV} at (10,10) size 800x25
+          RenderText {#text} at (0,1) size 34x19
+            text run at (0,1) width 34: "Text:"
+          RenderTextControl {INPUT} at (35,2) size 137x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+        RenderBlock {DIV} at (10,35) size 800x25
+          RenderText {#text} at (0,1) size 66x19
+            text run at (0,1) width 66: "Password:"
+          RenderTextControl {INPUT} at (67,2) size 137x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+        RenderBlock {DIV} at (10,60) size 800x24
+          RenderButton {INPUT} at (2,2) size 59x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (12,3) size 35x14
+              RenderText at (0,0) size 35x14
+                text run at (0,0) width 35: "Submit"
+          RenderText {#text} at (62,1) size 5x19
+            text run at (62,1) width 5: " "
+          RenderButton {BUTTON} at (68,2) size 67x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (12,3) size 43x14
+              RenderText {#text} at (0,0) size 43x14
+                text run at (0,0) width 43: "Click Me"
+        RenderBlock {DIV} at (10,84) size 800x86
+          RenderText {#text} at (0,0) size 55x19
+            text run at (0,0) width 55: "Buttons:"
+          RenderBR {BR} at (54,0) size 1x19
+          RenderBlock {INPUT} at (2,23) size 16x16 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,22) size 65x19
+            text run at (20,22) width 65: "Check me"
+          RenderBR {BR} at (84,22) size 1x19
+          RenderBlock {INPUT} at (2,45) size 16x16 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,44) size 66x19
+            text run at (20,44) width 66: "Floor wax"
+          RenderBR {BR} at (85,44) size 1x19
+          RenderBlock {INPUT} at (2,67) size 16x16 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,66) size 101x19
+            text run at (20,66) width 101: "Dessert topping"
+        RenderBlock {DIV} at (10,170) size 800x24
+          RenderText {#text} at (0,1) size 40x19
+            text run at (0,1) width 40: "Lists: "
+          RenderMenuList {SELECT} at (41,2) size 87x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (6,3) size 74x14
+              RenderText at (0,0) size 54x14
+                text run at (0,0) width 54: "Strawberry"
+          RenderText {#text} at (129,1) size 5x19
+            text run at (129,1) width 5: " "
+          RenderMenuList {SELECT} at (135,2) size 87x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (6,3) size 74x14
+              RenderText at (0,0) size 0x14
+                text run at (0,0) width 0: " "
+          RenderText {#text} at (0,0) size 0x0
+        RenderBlock {DIV} at (10,194) size 800x71
+          RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,275) size 820x275 [color=#FFFFFF] [bgcolor=#000000]
+        RenderBlock {DIV} at (10,10) size 800x25
+          RenderText {#text} at (0,1) size 34x19
+            text run at (0,1) width 34: "Text:"
+          RenderTextControl {INPUT} at (35,2) size 137x22 [color=#000000] [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+        RenderBlock {DIV} at (10,35) size 800x25
+          RenderText {#text} at (0,1) size 66x19
+            text run at (0,1) width 66: "Password:"
+          RenderTextControl {INPUT} at (67,2) size 137x22 [color=#000000] [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+        RenderBlock {DIV} at (10,60) size 800x24
+          RenderButton {INPUT} at (2,2) size 59x20 [color=#000000] [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (12,3) size 35x14
+              RenderText at (0,0) size 35x14
+                text run at (0,0) width 35: "Submit"
+          RenderText {#text} at (62,1) size 5x19
+            text run at (62,1) width 5: " "
+          RenderButton {BUTTON} at (68,2) size 67x20 [color=#000000] [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (12,3) size 43x14
+              RenderText {#text} at (0,0) size 43x14
+                text run at (0,0) width 43: "Click Me"
+        RenderBlock {DIV} at (10,84) size 800x86
+          RenderText {#text} at (0,0) size 55x19
+            text run at (0,0) width 55: "Buttons:"
+          RenderBR {BR} at (54,0) size 1x19
+          RenderBlock {INPUT} at (2,23) size 16x16 [color=#000000] [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,22) size 65x19
+            text run at (20,22) width 65: "Check me"
+          RenderBR {BR} at (84,22) size 1x19
+          RenderBlock {INPUT} at (2,45) size 16x16 [color=#000000] [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,44) size 66x19
+            text run at (20,44) width 66: "Floor wax"
+          RenderBR {BR} at (85,44) size 1x19
+          RenderBlock {INPUT} at (2,67) size 16x16 [color=#000000] [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,66) size 101x19
+            text run at (20,66) width 101: "Dessert topping"
+        RenderBlock {DIV} at (10,170) size 800x24
+          RenderText {#text} at (0,1) size 40x19
+            text run at (0,1) width 40: "Lists: "
+          RenderMenuList {SELECT} at (41,2) size 87x20 [color=#000000] [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (6,3) size 74x14
+              RenderText at (0,0) size 54x14
+                text run at (0,0) width 54: "Strawberry"
+          RenderText {#text} at (129,1) size 5x19
+            text run at (129,1) width 5: " "
+          RenderMenuList {SELECT} at (135,2) size 87x20 [color=#000000] [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (6,3) size 74x14
+              RenderText at (0,0) size 0x14
+                text run at (0,0) width 0: " "
+          RenderText {#text} at (0,0) size 0x0
+        RenderBlock {DIV} at (10,194) size 800x71
+          RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,550) size 820x275 [bgcolor=#808080]
+        RenderBlock {DIV} at (10,10) size 800x25
+          RenderText {#text} at (0,1) size 34x19
+            text run at (0,1) width 34: "Text:"
+          RenderTextControl {INPUT} at (35,2) size 137x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+        RenderBlock {DIV} at (10,35) size 800x25
+          RenderText {#text} at (0,1) size 66x19
+            text run at (0,1) width 66: "Password:"
+          RenderTextControl {INPUT} at (67,2) size 137x22 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+        RenderBlock {DIV} at (10,60) size 800x24
+          RenderButton {INPUT} at (2,2) size 59x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (12,3) size 35x14
+              RenderText at (0,0) size 35x14
+                text run at (0,0) width 35: "Submit"
+          RenderText {#text} at (62,1) size 5x19
+            text run at (62,1) width 5: " "
+          RenderButton {BUTTON} at (68,2) size 67x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (12,3) size 43x14
+              RenderText {#text} at (0,0) size 43x14
+                text run at (0,0) width 43: "Click Me"
+        RenderBlock {DIV} at (10,84) size 800x86
+          RenderText {#text} at (0,0) size 55x19
+            text run at (0,0) width 55: "Buttons:"
+          RenderBR {BR} at (54,0) size 1x19
+          RenderBlock {INPUT} at (2,23) size 16x16 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,22) size 65x19
+            text run at (20,22) width 65: "Check me"
+          RenderBR {BR} at (84,22) size 1x19
+          RenderBlock {INPUT} at (2,45) size 16x16 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,44) size 66x19
+            text run at (20,44) width 66: "Floor wax"
+          RenderBR {BR} at (85,44) size 1x19
+          RenderBlock {INPUT} at (2,67) size 16x16 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+          RenderText {#text} at (20,66) size 101x19
+            text run at (20,66) width 101: "Dessert topping"
+        RenderBlock {DIV} at (10,170) size 800x24
+          RenderText {#text} at (0,1) size 40x19
+            text run at (0,1) width 40: "Lists: "
+          RenderMenuList {SELECT} at (41,2) size 87x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (6,3) size 74x14
+              RenderText at (0,0) size 54x14
+                text run at (0,0) width 54: "Strawberry"
+          RenderText {#text} at (129,1) size 5x19
+            text run at (129,1) width 5: " "
+          RenderMenuList {SELECT} at (135,2) size 87x20 [bgcolor=#FFFFFF02] [border: (1px solid #4C4C4C)]
+            RenderBlock (anonymous) at (6,3) size 74x14
+              RenderText at (0,0) size 0x14
+                text run at (0,0) width 0: " "
+          RenderText {#text} at (0,0) size 0x0
+        RenderBlock {DIV} at (10,194) size 800x71
+          RenderText {#text} at (0,0) size 0x0
+layer at (52,15) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (84,40) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (12,196) size 272x62 clip at (13,197) size 270x60
+  RenderTextControl {TEXTAREA} at (2,2) size 272x62 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (3,3) size 266x28
+      RenderText {#text} at (3,0) size 44x28
+        text run at (3,0) width 44: "Textarea"
+        text run at (46,0) width 1: " "
+        text run at (3,14) width 19: "      "
+layer at (52,290) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (84,315) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (12,471) size 272x62 clip at (13,472) size 270x60
+  RenderTextControl {TEXTAREA} at (2,2) size 272x62 [color=#000000] [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (3,3) size 266x28
+      RenderText {#text} at (3,0) size 44x28
+        text run at (3,0) width 44: "Textarea"
+        text run at (46,0) width 1: " "
+        text run at (3,14) width 19: "      "
+layer at (52,565) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (84,590) size 122x14
+  RenderBlock {DIV} at (6,3) size 123x15
+layer at (12,746) size 272x62 clip at (13,747) size 270x60
+  RenderTextControl {TEXTAREA} at (2,2) size 272x62 [bgcolor=#FFFFFF] [border: (1px solid #4C4C4C)]
+    RenderBlock {DIV} at (3,3) size 266x28
+      RenderText {#text} at (3,0) size 44x28
+        text run at (3,0) width 44: "Textarea"
+        text run at (46,0) width 1: " "
+        text run at (3,14) width 19: "      "
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/form-controls-on-backgrounds.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/form-controls-on-backgrounds.html
new file mode 100644 (file)
index 0000000..61a15c7
--- /dev/null
@@ -0,0 +1,153 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <style type="text/css">
+    body {
+      margin: 0;
+    }
+    .wrapper {
+      display: block;
+      width: 100%;
+      padding: 10px;
+    }
+    
+    .black {
+      background-color: black;
+      color: white;
+    }
+
+    .gray {
+      background-color: gray;
+    }
+  </style>
+
+</head>
+<body>
+
+  <div class="white wrapper">
+    <div>Text:<input type="text"></input></div>
+    <div>Password:<input type="password"></input></div>
+    <div><input type="submit"></input> <button>Click Me</button></div>
+
+    <div>Buttons:<br>
+    <input type="checkbox">Check me</input><br>
+    <input type="radio" name="foo">Floor wax</input><br>
+    <input type="radio" name="foo">Dessert topping</input>
+    </div>
+
+    <div>Lists:
+
+    <select>
+        <option>Strawberry</option>
+        <option>Banana</option>
+        <option>Chocolate</option>
+        <option>Mint</option>
+        <option>Lemon</option>
+        <option>Orange</option>
+        <option>Cinnamon</option>
+    </select>
+
+    <select size="5">
+        <option>Strawberry</option>
+        <option>Banana</option>
+        <option>Chocolate</option>
+        <option>Mint</option>
+        <option>Lemon</option>
+        <option>Orange</option>
+        <option>Cinnamon</option>
+    </select>
+    </div>
+
+    <div>
+      <textarea cols="40" rows="4">
+Textarea
+      </textarea>
+    </div>
+  </div>
+
+  <div class="black wrapper">
+    <div>Text:<input type="text"></input></div>
+    <div>Password:<input type="password"></input></div>
+    <div><input type="submit"></input> <button>Click Me</button></div>
+
+    <div>Buttons:<br>
+    <input type="checkbox">Check me</input><br>
+    <input type="radio" name="foo">Floor wax</input><br>
+    <input type="radio" name="foo">Dessert topping</input>
+    </div>
+
+    <div>Lists:
+
+    <select>
+        <option>Strawberry</option>
+        <option>Banana</option>
+        <option>Chocolate</option>
+        <option>Mint</option>
+        <option>Lemon</option>
+        <option>Orange</option>
+        <option>Cinnamon</option>
+    </select>
+
+    <select size="5">
+        <option>Strawberry</option>
+        <option>Banana</option>
+        <option>Chocolate</option>
+        <option>Mint</option>
+        <option>Lemon</option>
+        <option>Orange</option>
+        <option>Cinnamon</option>
+    </select>
+    </div>
+
+    <div>
+      <textarea cols="40" rows="4">
+Textarea
+      </textarea>
+    </div>
+  </div>
+
+  <div class="gray wrapper">
+    <div>Text:<input type="text"></input></div>
+    <div>Password:<input type="password"></input></div>
+    <div><input type="submit"></input> <button>Click Me</button></div>
+
+    <div>Buttons:<br>
+    <input type="checkbox">Check me</input><br>
+    <input type="radio" name="foo">Floor wax</input><br>
+    <input type="radio" name="foo">Dessert topping</input>
+    </div>
+
+    <div>Lists:
+
+    <select>
+        <option>Strawberry</option>
+        <option>Banana</option>
+        <option>Chocolate</option>
+        <option>Mint</option>
+        <option>Lemon</option>
+        <option>Orange</option>
+        <option>Cinnamon</option>
+    </select>
+
+    <select size="5">
+        <option>Strawberry</option>
+        <option>Banana</option>
+        <option>Chocolate</option>
+        <option>Mint</option>
+        <option>Lemon</option>
+        <option>Orange</option>
+        <option>Cinnamon</option>
+    </select>
+    </div>
+
+    <div>
+      <textarea cols="40" rows="4">
+Textarea
+      </textarea>
+    </div>
+  </div>
+
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-container-touches-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-container-touches-expected.txt
new file mode 100644 (file)
index 0000000..67c965f
--- /dev/null
@@ -0,0 +1,16 @@
+
+This tests touch events not on the slider thumb but on the slider are ignored by the thumb.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+First finger down on the slider's track.
+PASS #container touchstart
+Move that finger around. It should not do anything.
+Release the first finger.
+PASS #container touchend
+PASS sliderThumbMoved is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-container-touches.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-container-touches.html
new file mode 100644 (file)
index 0000000..f61756e
--- /dev/null
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+<style>
+input[type="range"] {
+  -webkit-appearance: none;
+  height: 100px;
+  width: 500px;
+  background: black;
+}
+
+input[type="range"]::-webkit-slider-thumb {
+  -webkit-appearance: none;
+  background: blue;
+  width: 100px;
+  height: 100px;
+}
+</style>
+</head>
+<body>
+<div id="container"><input id="slider" type="range"></div>
+<p id="description"></p>
+<div id="console"></div>
+<script>
+var sliderThumbMoved = false;
+
+var container = document.getElementById("container");
+container.addEventListener("touchstart", function(event) {
+    testPassed("#container touchstart");
+}, false);
+container.addEventListener("touchend", function(event) {
+    testPassed("#container touchend");
+    endTest();
+}, false);
+
+var slider = document.getElementById("slider");
+slider.addEventListener("input", function(event) {
+    sliderThumbMoved = true;
+    testFailed("Slider Thumb should not have moved.");
+}, false);
+
+function endTest() {
+    if (window.testRunner) {
+        // We need to call the isSucccessfullyParsed function to output the correct TEST COMPLETE footer message.
+        shouldBeFalse("sliderThumbMoved");
+        successfullyParsed = true;
+        isSuccessfullyParsed();
+        testRunner.notifyDone();
+    }
+}
+
+
+const aGoodY = 70;
+const FIRST_FINGER = 1;
+
+function sendTouchSequence()
+{
+    // iOS <input type="range"> uses identifier 0 as the "NoIdentifier".
+    // So swallow touch point 0 and ignore it from now on. Currently
+    // a 0 identifier cannot happen on iOS.
+    eventSender.addTouchPoint(0, 0);
+
+    debug("First finger down on the slider's track.");
+    eventSender.addTouchPoint(100, aGoodY);
+    eventSender.touchStart();
+
+    debug("Move that finger around. It should not do anything.");
+    eventSender.updateTouchPoint(FIRST_FINGER, 50, aGoodY - 10); // Left a bit.
+    eventSender.touchMove();
+    eventSender.updateTouchPoint(FIRST_FINGER, 270, aGoodY); // On the thumb.
+    eventSender.touchMove();
+    eventSender.updateTouchPoint(FIRST_FINGER, 400, aGoodY); // Right a bit
+    eventSender.touchMove();
+
+    debug("Release the first finger.");
+    eventSender.releaseTouchPoint(FIRST_FINGER);
+    eventSender.touchEnd(); // The test will end with this release.
+}
+
+
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+if (window.eventSender) {
+    description("This tests touch events not on the slider thumb but on the slider are ignored by the thumb.");
+    sendTouchSequence();
+} else {
+    debug("This test requires DumpRenderTree to send touch events.")
+}
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-readonly-and-disabled.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-readonly-and-disabled.html
new file mode 100644 (file)
index 0000000..4ad333f
--- /dev/null
@@ -0,0 +1,164 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+<style>
+input[type="range"] {
+  -webkit-appearance: none;
+  width: 500px; height: 20px;
+  background: black;
+  margin-top: 100px;
+}
+
+input[type="range"]::-webkit-slider-thumb {
+  -webkit-appearance: none;
+  background: blue;
+  width: 200px;
+  height: 200px;
+}
+</style>
+</head>
+<body>
+<input id="slider" type="range" min="0" max="100" value="50">
+<p id="description"></p>
+<div id="console"></div>
+<script>
+// Globals used by test evals.
+var changeEventCount = 0;
+var lastChangeEventCount = 0;
+var slider = document.getElementById("slider");
+slider.addEventListener("input", function(event) {
+    changeEventCount++;
+}, false);
+
+
+// Slider coordinates used throughout.
+const centerY = slider.offsetTop + slider.offsetHeight / 2;
+const centerX = slider.offsetLeft + slider.offsetWidth / 2;
+const leftEdgeX = slider.offsetLeft + 1;
+const rightEdgeX = slider.offsetLeft + slider.offsetWidth - 1;
+
+
+// Test configurations.
+var currentConfiguration = -1;
+const testConfigurations = [
+    { readOnly: false, disabled: false, name: "Normal"   },
+    { readOnly: true,  disabled: false, name: "Readonly" },
+    { readOnly: false, disabled: true,  name: "Disabled" },
+    { readOnly: true,  disabled: true,  name: "Readonly and Disabled" },
+];
+
+
+// Run the test!
+if (window.eventSender) {
+    description("This tests touch events on readonly and disabled sliders.");
+
+    if (window.testRunner)
+        testRunner.waitUntilDone();
+
+    // iOS <input type="range"> uses identifier 0 as the "NoIdentifier".
+    // So swallow touch point 0 and ignore it from now on. Currently
+    // a 0 identifier cannot happen on iOS.
+    eventSender.addTouchPoint(0, 0);
+
+    runAllTestConfigurations();
+} else
+    debug("This test requires DumpRenderTree to send touch events.")
+
+
+// Test runners.
+
+function runAllTestConfigurations() {
+    for (var i=0, len=testConfigurations.length; i<len; ++i)
+        runTestConfiguration(testConfigurations[i]);
+
+    debug("");
+    successfullyParsed = true;
+    isSuccessfullyParsed();
+    testRunner.notifyDone();
+}
+
+function runTestConfiguration(configuration) {
+    var displayName = '(&lt;input type="range"';
+    if (configuration.readOnly)
+        displayName += ' readonly';
+    if (configuration.disabled)
+        displayName += ' disabled';
+    displayName += '&gt;)';
+
+    const touchIdentifier = 1;
+    function startDrag() { eventSender.addTouchPoint(centerX, centerY); eventSender.touchStart(); }
+    function stopDrag() { eventSender.releaseTouchPoint(touchIdentifier); eventSender.touchEnd(); }
+    function dragToLeftEdge()  { eventSender.updateTouchPoint(touchIdentifier, leftEdgeX, centerY); eventSender.touchMove(); }
+    function dragToRightEdge() { eventSender.updateTouchPoint(touchIdentifier, rightEdgeX, centerY); eventSender.touchMove(); }
+    function dragSequence(sequence) { startDrag(); sequence(); stopDrag(); }
+
+
+    debug("");
+    debug("-------------------");
+    debug("Test Configuration: " + configuration.name + " - " + displayName);
+    debug("-------------------");
+
+    debug("");
+    debug('- Reset slider to non-readonly and non-disabled to make sure it works.');
+    slider.readOnly = false;
+    slider.disabled = false;
+    slider.valueAsNumber = 50;
+    shouldBe('slider.value', '"50"');
+
+    debug("- Test drag sequence where readonly / disabled state may change during drag.");
+    dragSequence(function() {
+        // Drag from center, to right edge, to left edge.
+        lastChangeEventCount = changeEventCount;
+        dragToRightEdge();
+        shouldBe('slider.value', '"100"');
+        shouldBeGreaterThanOrEqual('changeEventCount', 'lastChangeEventCount + 1');
+        lastChangeEventCount = changeEventCount;
+        dragToLeftEdge();
+        shouldBe('slider.value', '"0"');
+        shouldBeGreaterThanOrEqual('changeEventCount', 'lastChangeEventCount + 1');
+
+        // While still dragging, toggle readonly / disabled.
+        debug("(toggled state to configuration)");
+        slider.readOnly = configuration.readOnly;
+        slider.disabled = configuration.disabled;
+
+        // Attempt to drag to right edge. Should not change for disabled / readonly fields.
+        lastChangeEventCount = changeEventCount;
+        dragToRightEdge();
+        if (slider.readOnly || slider.disabled) {
+            shouldBe('slider.value', '"0"');
+            shouldBe('lastChangeEventCount', 'changeEventCount');
+        } else {
+            shouldBe('slider.value', '"100"');
+            shouldBeGreaterThanOrEqual('changeEventCount', 'lastChangeEventCount + 1');
+        }
+    });
+
+    debug("- Reset value to middle for second sequence.");
+    slider.valueAsNumber = 50;
+    shouldBe('slider.value', '"50"');
+
+    debug("- Test drag sequence where readonly / disabled state is already set.");
+    dragSequence(function() {
+        // Drag from center, to right edge.
+        lastChangeEventCount = changeEventCount;
+        dragToRightEdge();
+        if (slider.readOnly || slider.disabled) {
+            shouldBe('slider.value', '"50"');
+            shouldBe('lastChangeEventCount', 'changeEventCount');
+        } else {
+            shouldBe('slider.value', '"100"');
+            shouldBeGreaterThanOrEqual('changeEventCount', 'lastChangeEventCount + 1');
+        }
+    });
+}
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-touches-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-touches-expected.txt
new file mode 100644 (file)
index 0000000..f68478d
--- /dev/null
@@ -0,0 +1,26 @@
+
+This tests touch events on a slider.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+First finger down on the slider's thumb.
+Move that finger to the slider's left edge.
+EXPECT SLIDER THUMB MOVE AND VALUE UPDATE
+PASS slider thumb moved
+PASS value changed
+Add a second finger on the slider's thumb.
+Move that second finger. It should not do anything.
+Move the first finger.
+EXPECT SLIDER THUMB MOVE AND VALUE UPDATE
+PASS slider thumb moved
+PASS value changed
+Release that second finger on the slider's thumb. It should not do anything.
+Move the first finger.
+EXPECT SLIDER THUMB MOVE AND VALUE UPDATE
+PASS slider thumb moved
+PASS value changed
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-touches.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/range-input-touches.html
new file mode 100644 (file)
index 0000000..16f1943
--- /dev/null
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+<!--
+  Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks
+  should be written in an asynchronous fashion so they can be run on mobile platforms like Android.
+  This template will generate an asynchronous style test by using the js-test-post-function script.
+  You will need to invoke isSuccessfullyParsed() in your test script when the test completes.
+-->
+<style>
+input[type="range"] {
+  -webkit-appearance: none;
+  width: 500px; height: 20px;
+  background: black;
+  margin-top: 100px;
+}
+
+input[type="range"]::-webkit-slider-thumb {
+  -webkit-appearance: none;
+  background: blue;
+  width: 200px;
+  height: 200px;
+}
+</style>
+</head>
+<body>
+<input id="slider" type="range">
+<p id="description"></p>
+<div id="console"></div>
+<script>
+var sliderMovesCount = 0;
+var EXPECTED_SLIDER_MOVES = 3;
+
+var slider = document.getElementById("slider");
+var lastSliderValue = slider.value;
+slider.addEventListener("input", inputEventCallback, false);
+function inputEventCallback() {
+    testPassed("slider thumb moved");
+    sliderMovesCount++
+
+    // Ensure the value actually changed. For good measure.
+    if (lastSliderValue === slider.value)
+        testFailed("input event triggered but the value didn't change.");
+    else {
+        testPassed("value changed");
+        lastSliderValue = slider.value;
+    }
+
+    if (window.testRunner && sliderMovesCount === EXPECTED_SLIDER_MOVES) {
+        // If we've got here, we can safely say we were successfully parsed :) We need to
+        // call the isSucccessfullyParsed function to output the correct TEST COMPLETE
+        // footer message.
+        successfullyParsed = true;
+        isSuccessfullyParsed();
+        testRunner.notifyDone();
+    }
+}
+
+const aGoodY = 120;
+const FIRST_FINGER = 1;
+const SECOND_FINGER = 2;
+
+function sendTouchSequence()
+{
+    // iOS <input type="range"> uses identifier 0 as the "NoIdentifier".
+    // So swallow touch point 0 and ignore it from now on. Currently
+    // a 0 identifier cannot happen on iOS.
+    eventSender.addTouchPoint(0, 0);
+
+    debug("First finger down on the slider's thumb.");
+    eventSender.addTouchPoint(250, aGoodY);
+    eventSender.touchStart();
+
+    debug("Move that finger to the slider's left edge.");
+    debug("EXPECT SLIDER THUMB MOVE AND VALUE UPDATE");
+    eventSender.updateTouchPoint(FIRST_FINGER, 10, aGoodY);
+    eventSender.touchMove();
+
+    debug("Add a second finger on the slider's thumb.");
+    eventSender.addTouchPoint(20, aGoodY);
+    eventSender.touchStart();
+
+    debug("Move that second finger. It should not do anything.");
+    eventSender.updateTouchPoint(SECOND_FINGER, 50, aGoodY + 5);
+    eventSender.touchMove();
+    eventSender.updateTouchPoint(SECOND_FINGER, 400, aGoodY);
+    eventSender.touchMove();
+    eventSender.updateTouchPoint(SECOND_FINGER, 50, aGoodY);
+    eventSender.touchMove();
+
+    debug("Move the first finger.");
+    debug("EXPECT SLIDER THUMB MOVE AND VALUE UPDATE");
+    eventSender.updateTouchPoint(FIRST_FINGER, 250, aGoodY);
+    eventSender.touchMove();
+
+    debug("Release that second finger on the slider's thumb. It should not do anything.");
+    eventSender.releaseTouchPoint(SECOND_FINGER);
+    eventSender.touchEnd();
+
+    debug("Move the first finger.");
+    debug("EXPECT SLIDER THUMB MOVE AND VALUE UPDATE");
+    eventSender.updateTouchPoint(FIRST_FINGER, 10, aGoodY);
+    eventSender.touchMove(); // The test will end with this move.
+}
+
+if (window.testRunner)
+    testRunner.waitUntilDone();
+
+if (window.eventSender) {
+    description("This tests touch events on a slider.");
+
+    lastEvent = null;
+    sendTouchSequence();
+} else {
+    debug("This test requires DumpRenderTree to send touch events.")
+}
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/short-slider-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/forms/short-slider-expected.txt
new file mode 100644 (file)
index 0000000..8ac3420
--- /dev/null
@@ -0,0 +1,47 @@
+
+Check that a short slider does not crash MobileSafari.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS No crash.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/forms/short-slider.html b/LayoutTests/platform/ios-simulator/ios/fast/forms/short-slider.html
new file mode 100644 (file)
index 0000000..6bc1c75
--- /dev/null
@@ -0,0 +1,43 @@
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<input id="x" type="file">
+<p id="description"></p>
+<div id="console"></div>
+
+<!-- Various short heights. -->
+<input type="range" style="width:3px; height:0px"><br><br>
+<input type="range" style="width:3px; height:1px"><br><br>
+<input type="range" style="width:3px; height:2px"><br><br>
+<input type="range" style="width:3px; height:3px"><br><br>
+<input type="range" style="width:3px; height:4px"><br><br>
+<input type="range" style="width:3px; height:5px"><br><br>
+
+<!-- Various short widths. -->
+<input type="range" style="width:0px; height:3px"><br><br>
+<input type="range" style="width:1px; height:3px"><br><br>
+<input type="range" style="width:2px; height:3px"><br><br>
+<input type="range" style="width:3px; height:3px"><br><br>
+<input type="range" style="width:4px; height:3px"><br><br>
+<input type="range" style="width:5px; height:3px"><br><br>
+
+<!-- Some edge cases. -->
+<input type="range" style="width:0px; height:0px"><br><br>
+
+<!-- Sizes that would actually draw the track. -->
+<input type="range" style="width:100px; height:0px"><br><br>
+<input type="range" style="width:100px; height:1px"><br><br>
+<input type="range" style="width:100px; height:2px"><br><br>
+<input type="range" style="width:100px; height:3px"><br><br>
+<input type="range" style="width:100px; height:4px"><br><br>
+
+<script>
+description("Check that a short slider does not crash MobileSafari.");
+testPassed("No crash.");
+successfullyParsed = true;
+</script>
+<script src="../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation-expected.txt
new file mode 100644 (file)
index 0000000..5a47b0c
--- /dev/null
@@ -0,0 +1,11 @@
+Tests that a page that makes use of simple geolocation can use the page cache.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+[object Geolocation]
+pageshow - not from cache
+pagehide - entering cache
+pageshow - from cache
+PASS - Page did enter and was restored from the page cache
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation.html b/LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation.html
new file mode 100644 (file)
index 0000000..7dc5a5b
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/page-cache-geolocation.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/history/resources/page-cache-helper.html b/LayoutTests/platform/ios-simulator/ios/fast/history/resources/page-cache-helper.html
new file mode 100644 (file)
index 0000000..3a0f771
--- /dev/null
@@ -0,0 +1,9 @@
+This page should go back. If a test outputs the contents of this
+page, then the test page failed to enter the page cache.
+<script>
+  window.addEventListener("load", function() {
+    setTimeout(function() {
+      history.back();
+    }, 0);
+  }, false);
+</script>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/TEMPLATE.html b/LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/TEMPLATE.html
new file mode 100644 (file)
index 0000000..46f460e
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="YOUR_JS_FILE_HERE"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/page-cache-geolocation.js b/LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/page-cache-geolocation.js
new file mode 100644 (file)
index 0000000..6a6c39e
--- /dev/null
@@ -0,0 +1,40 @@
+description('Tests that a page that makes use of simple geolocation can use the page cache.');
+
+window.addEventListener("pageshow", function(event) {
+    debug("pageshow - " + (event.persisted ? "" : "not ") + "from cache");
+    if (event.persisted) {
+        debug("PASS - Page did enter and was restored from the page cache");
+        finishJSTest();
+        window.testRunner.notifyDone();
+    }
+}, false);
+
+window.addEventListener("pagehide", function(event) {
+    debug("pagehide - " + (event.persisted ? "" : "not ") + "entering cache");
+    if (!event.persisted) {
+        debug("FAIL - Page did not enter the page cache.");
+        finishJSTest();
+        window.testRunner.notifyDone();
+    }
+}, false);
+
+window.addEventListener('load', function() {
+
+    // Enable the PageCache and make this an async test.
+    if (window.testRunner) {
+        window.testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
+        window.testRunner.waitUntilDone();
+    }
+
+    // Access geolocation. It is enough to create the geolocation object.
+    debug(navigator.geolocation);
+
+    // Force a back navigation back to this page.
+    setTimeout(function() {
+        window.location.href = "resources/page-cache-helper.html";
+    }, 0);
+
+}, false);
+
+var successfullyParsed = true;
+var jsTestIsAsync = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable-expected.txt
new file mode 100644 (file)
index 0000000..c1dcecc
--- /dev/null
@@ -0,0 +1,2 @@
+
+SUCCESS
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html b/LayoutTests/platform/ios-simulator/ios/fast/html/textarea-auto-sizing-disable.html
new file mode 100644 (file)
index 0000000..e12a0f9
--- /dev/null
@@ -0,0 +1,55 @@
+<html>
+<head>
+    <title>TextArea auto-sizing test</title>
+    <script type="text/javascript">
+        
+        if (window.testRunner)
+            window.testRunner.waitUntilDone();
+                
+        function doTest() 
+        {
+            if (!window.testRunner)
+                return;
+
+            if (!window.eventSender)
+                return;
+
+            // Enable autosizing
+            testRunner.setTextAutosizingEnabled(true);
+            
+            var obj = document.getElementById('test');
+            var oldHeight = obj.offsetHeight;
+            
+            eventSender.mouseMoveTo(obj.offsetLeft+10, obj.offsetTop+20);
+            eventSender.mouseDown();
+            eventSender.mouseUp();
+        
+            eventSender.keyDown("\n")
+            eventSender.keyDown('A');
+            eventSender.keyDown('B');
+            eventSender.keyDown('\n');
+            
+            // Textarea heigth shouldn't change after we add new lines.
+            document.getElementById("result").innerHTML= obj.offsetHeight == oldHeight ? 'SUCCESS' : 'FAIL';
+            
+            testRunner.dumpAsText();
+            testRunner.notifyDone();
+        }
+    </script>
+</head>
+
+<body onload="doTest()">
+<textarea id="test" rows="12" style="width:100%">
+    a
+    b
+    c
+    d
+    e
+    f
+    g
+    h
+    i
+</textarea>
+<div id="result"></div>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/js/clearTimeout-crash-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/js/clearTimeout-crash-expected.txt
new file mode 100644 (file)
index 0000000..3dd2ed8
--- /dev/null
@@ -0,0 +1,3 @@
+<rdar://problem/6628098> Assertion failure calling clearTimeout() with zero or a negative number
+
+PASS
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/js/clearTimeout-crash.html b/LayoutTests/platform/ios-simulator/ios/fast/js/clearTimeout-crash.html
new file mode 100644 (file)
index 0000000..384d797
--- /dev/null
@@ -0,0 +1,18 @@
+<html>
+<head>
+<script>
+if (window.testRunner) {
+    testRunner.dumpAsText();
+}
+</script>
+</head>
+<body>
+<p>&lt;<a href="rdar://problem/6628098">rdar://problem/6628098</a>&gt; Assertion failure calling clearTimeout() with zero or a negative number</p>
+<p>PASS</p>
+<script>
+clearTimeout(-1);
+clearTimeout(0);
+clearTimeout(1);
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/loader/subresource-willSendRequest-null-prevents-load-event-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/loader/subresource-willSendRequest-null-prevents-load-event-expected.txt
new file mode 100644 (file)
index 0000000..f03f055
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 12: PASS
+Ensure that a subresource load that is cancelled by a willSendRequest() delegate does not prevent the load event from firing. On success, 'PASS' will be logged to the console.
+
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/loader/subresource-willSendRequest-null-prevents-load-event.html b/LayoutTests/platform/ios-simulator/ios/fast/loader/subresource-willSendRequest-null-prevents-load-event.html
new file mode 100644 (file)
index 0000000..fd26c61
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.waitUntilDone();
+        testRunner.setWillSendRequestReturnsNull(true);
+    }
+
+    window.addEventListener("load", function(event) {
+        console.log("PASS");
+        if (window.testRunner)
+            testRunner.notifyDone();
+    }, false);
+</script>
+</head>
+<body>
+<p>Ensure that a subresource load that is cancelled by a willSendRequest() delegate does not prevent the load event from firing. On success, 'PASS' will be logged to the console.</p>
+<img src="non-existant.jpg">
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/media/media-no-src-attribute-parsing-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/media/media-no-src-attribute-parsing-expected.txt
new file mode 100644 (file)
index 0000000..75693cb
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 13: PASS
+Test that attributes on media elements are parsed even when the media isn't playable. This test uses the class attribute as a proxy for correct attribute parsing. On success, you should see 'PASS' logged to the console.
+
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/media/media-no-src-attribute-parsing.html b/LayoutTests/platform/ios-simulator/ios/fast/media/media-no-src-attribute-parsing.html
new file mode 100644 (file)
index 0000000..15fcd31
--- /dev/null
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+    </script>
+</head>
+<body>
+    <p>Test that attributes on media elements are parsed even when the media isn't playable. This test uses the class attribute as a proxy for correct attribute parsing. On success, you should see 'PASS' logged to the console.</p>
+    <video class="foo"></video>
+    <script>
+        console.log(document.getElementsByClassName("foo").length ? "PASS" : "FAIL");
+    </script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline-expected.txt
new file mode 100644 (file)
index 0000000..9aca25e
--- /dev/null
@@ -0,0 +1,4 @@
+Testing iOS-specific media query for inline video. When run inside MobileSafari on iPhone, the query should evaluate as false (and the test will indicate that it has failed). In all other places, including the test framework and DRT, the query should evaluate as true.
+
+FAIL: "(-webkit-video-playable-inline)" evaluates to false
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline.html b/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline.html
new file mode 100644 (file)
index 0000000..e81d5e9
--- /dev/null
@@ -0,0 +1,37 @@
+<html>
+<head>
+    <title>Test iOS-specific media query for inline video</title>
+    <meta name="viewport" content="width=device-width">
+    <script>
+        if (window.testRunner)
+            testRunner.dumpAsText();
+  
+        function log(m) {
+            var results = document.getElementById('results');
+            results.innerHTML += m + '<br>';
+        }
+  
+        function testQuery(query, expected) {
+            var isTrue = window.styleMedia.matchMedium(query);
+
+            var message = '\"' + query + '\" evaluates to ' + (isTrue ? 'true' : 'false');
+            message = ((isTrue == expected) ? 'PASS: ' : 'FAIL: ') + message;
+            log(message);
+        }
+  
+        function runTests() {
+            testQuery('(-webkit-video-playable-inline)', true);
+        }
+    </script>
+</head>
+<body onload="runTests()">
+    <p>
+        Testing iOS-specific media query for inline video.
+        When run inside MobileSafari on iPhone, the query should evaluate
+        as false (and the test will indicate that it has failed).
+        In all other places, including the test framework and DRT, the
+        query should evaluate as true.
+    </p>
+    <div id="results"></div>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/parser/block-nesting-cap-iphone-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/parser/block-nesting-cap-iphone-expected.txt
new file mode 100644 (file)
index 0000000..0db7ec0
--- /dev/null
@@ -0,0 +1,12 @@
+Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 768.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+FAIL d768.parentNode === d766 should be true. Was false.
+FAIL d768.parentNode === d766 should be true. Was false.
+PASS d768.previousSibling === d767 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/parser/block-nesting-cap-iphone.html b/LayoutTests/platform/ios-simulator/ios/fast/parser/block-nesting-cap-iphone.html
new file mode 100644 (file)
index 0000000..ad019fc
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="resources/block-nesting-cap.js"></script>
+<script src="../../../../../resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/parser/resources/block-nesting-cap.js b/LayoutTests/platform/ios-simulator/ios/fast/parser/resources/block-nesting-cap.js
new file mode 100644 (file)
index 0000000..5ec90a7
--- /dev/null
@@ -0,0 +1,19 @@
+description('Test that the HTML parser does not allow the nesting depth of "block-level" elements to exceed 768.');
+
+var depth = 772;
+var markup = "";
+var i;
+for (i = 0; i < depth; ++i)
+    markup += "<div id='d" + i + "'>";
+var doc = document.implementation.createHTMLDocument();
+doc.body.innerHTML = markup;
+
+var d766 = doc.getElementById("d766");
+var d767 = doc.getElementById("d767");
+var d768 = doc.getElementById("d768");
+
+shouldBe("d768.parentNode === d766", "true");
+shouldBe("d768.parentNode === d766", "true");
+shouldBe("d768.previousSibling === d767", "true");
+
+var successfullyParsed = true;
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/apple-logo-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/apple-logo-expected.txt
new file mode 100644 (file)
index 0000000..db27156
--- /dev/null
@@ -0,0 +1,59 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderInline {SPAN} at (0,0) size 13x19
+        RenderText {#text} at (0,5) size 13x19
+          text run at (0,5) width 13: "\x{F8FF}"
+      RenderText {#text} at (12,5) size 5x19
+        text run at (12,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 17x23
+        RenderText {#text} at (16,2) size 17x23
+          text run at (16,2) width 17: "\x{F8FF}"
+      RenderText {#text} at (32,5) size 5x19
+        text run at (32,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 14x19
+        RenderText {#text} at (36,5) size 14x19
+          text run at (36,5) width 14: "\x{F8FF}"
+      RenderText {#text} at (49,5) size 5x19
+        text run at (49,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 16x23
+        RenderText {#text} at (53,2) size 16x23
+          text run at (53,2) width 16: "\x{F8FF}"
+      RenderText {#text} at (68,5) size 5x19
+        text run at (68,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 17x23
+        RenderText {#text} at (72,2) size 17x23
+          text run at (72,2) width 17: "\x{F8FF}"
+      RenderText {#text} at (88,5) size 5x19
+        text run at (88,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 17x23
+        RenderText {#text} at (92,2) size 17x23
+          text run at (92,2) width 17: "\x{F8FF}"
+      RenderText {#text} at (108,5) size 5x19
+        text run at (108,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 17x23
+        RenderText {#text} at (112,2) size 17x23
+          text run at (112,2) width 17: "\x{F8FF}"
+      RenderText {#text} at (128,5) size 5x19
+        text run at (128,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 13x20
+        RenderText {#text} at (132,4) size 13x20
+          text run at (132,4) width 13: "\x{F8FF}"
+      RenderText {#text} at (144,5) size 5x19
+        text run at (144,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 17x25
+        RenderText {#text} at (148,0) size 17x25
+          text run at (148,0) width 17: "\x{F8FF}"
+      RenderText {#text} at (164,5) size 5x19
+        text run at (164,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 17x25
+        RenderText {#text} at (168,0) size 17x25
+          text run at (168,0) width 17: "\x{F8FF}"
+      RenderText {#text} at (184,5) size 5x19
+        text run at (184,5) width 5: " "
+      RenderInline {SPAN} at (0,0) size 17x25
+        RenderText {#text} at (188,0) size 17x25
+          text run at (188,0) width 17: "\x{F8FF}"
+      RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/apple-logo.html b/LayoutTests/platform/ios-simulator/ios/fast/text/apple-logo.html
new file mode 100644 (file)
index 0000000..5be62f3
--- /dev/null
@@ -0,0 +1,13 @@
+<title>Apples!!!!!!!!</title>
+<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
+<span></span>
+<span style="font-size: 20px;"></span>
+<span style="font-family: 'Times New Roman';"></span>
+<span style="font-size: 20px; font-family: 'Times New Roman'; font-weight: 300;"></span>
+<span style="font-size: 20px; font: -apple-system-body; font-family: 'Times New Roman';"></span>
+<span style="font-size: 20px; font: -apple-system-body; font-family: 'Times New Roman'; font-style: italic;"></span>
+<span style="font: -apple-system-body; font-size: 20px; font-family: 'Times New Roman';"></span>
+<span style="font-family: -apple-system-font;"></span>
+<span style="font-size: 20px; font-family: -apple-system-font;"></span>
+<span style="font-size: 20px; font-family: -apple-system-font; font-weight: bold"></span>
+<span style="font-size: 20px; font-family: -apple-system-font; font-style: italic"></span>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/combining-enclosing-keycap-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/combining-enclosing-keycap-expected.txt
new file mode 100644 (file)
index 0000000..5a54f71
--- /dev/null
@@ -0,0 +1,38 @@
+layer at (0,0) size 320x617
+  RenderView at (0,0) size 320x240
+layer at (0,0) size 320x617
+  RenderBlock {HTML} at (0,0) size 320x617
+    RenderBody {BODY} at (8,8) size 304x601
+      RenderBlock {P} at (0,0) size 304x24
+        RenderText {#text} at (0,0) size 273x23
+          text run at (0,0) width 273: "\x{20E3}0\x{20E3}1\x{20E3}2\x{20E3}3\x{20E3}4\x{20E3}5\x{20E3}6\x{20E3}7\x{20E3}8\x{20E3}9\x{20E3}#\x{20E3}\x{20E3}"
+      RenderBlock {P} at (0,44) size 304x24
+        RenderText {#text} at (0,0) size 64x23
+          text run at (0,0) width 64: "abc\x{20E3}def"
+      RenderBlock {P} at (0,88) size 304x24
+        RenderText {#text} at (0,0) size 78x23
+          text run at (0,0) width 78: "ab#\x{20E3}def\x{20E3}"
+      RenderBlock {P} at (0,132) size 304x29
+        RenderText {#text} at (0,16) size 85x12
+          text run at (0,16) width 85: "ab#\x{20E3}def\x{20E3}"
+      RenderBlock {P} at (0,181) size 304x24
+        RenderText {#text} at (0,12) size 78x12
+          text run at (0,12) width 78: "ab#\x{20E3}def\x{20E3}"
+      RenderBlock {P} at (0,225) size 304x24
+        RenderText {#text} at (0,0) size 78x23
+          text run at (0,0) width 78: "ab#\x{20E3}def\x{20E3}"
+      RenderBlock {P} at (0,269) size 304x24
+        RenderText {#text} at (0,0) size 52x23
+          text run at (0,0) width 52: "\x{D83C}\x{DD97}b#\x{20E3}"
+      RenderBlock {P} at (0,313) size 304x24
+        RenderText {#text} at (0,0) size 54x23
+          text run at (0,0) width 54: "\x{D83C}\x{DD97}b#\x{20E3}"
+      RenderBlock {P} at (0,357) size 304x24
+        RenderText {#text} at (0,0) size 47x23
+          text run at (0,0) width 47: "\x{D83C}\x{DD97}b#\x{20E3}"
+      RenderBlock {P} at (20,401) size 24x100
+        RenderText {#text} at (0,0) size 23x52
+          text run at (0,0) width 52: "\x{D83C}\x{DD97}b#\x{20E3}"
+      RenderBlock {P} at (20,501) size 28x100
+        RenderText {#text} at (8,0) size 12x54
+          text run at (8,0) width 54: "\x{D83C}\x{DD97}b#\x{20E3}"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/combining-enclosing-keycap.html b/LayoutTests/platform/ios-simulator/ios/fast/text/combining-enclosing-keycap.html
new file mode 100644 (file)
index 0000000..f17bcdd
--- /dev/null
@@ -0,0 +1,36 @@
+<meta name=viewport content="width=device-width">
+<body style="font-size: 20px;">
+    <p>
+        &#x20e3;0&#x20e3;1&#x20e3;2&#x20e3;3&#x20e3;4&#x20e3;5&#x20e3;6&#x20e3;7&#x20e3;8&#x20e3;9&#x20e3;#&#x20e3;&#x20e3;
+    </p>
+    <p>
+        abc&#x20e3;def
+    </p>
+    <p>
+        ab#&#x20e3;def&#x20e3;
+    </p>
+    <p style="font-family: -webkit-pictograph;">
+        ab#&#x20e3;def&#x20e3;
+    </p>
+    <p style="font-family: -webkit-pictograph, serif;">
+        ab#&#x20e3;def&#x20e3;
+    </p>
+    <p style="font-family: serif, -webkit-pictograph;">
+        ab#&#x20e3;def&#x20e3;
+    </p>
+    <p style="font-style: italic;">
+        &#x1f197;b#&#x20e3;
+    </p>
+    <p style="font-weight: bold;">
+        &#x1f197;b#&#x20e3;
+    </p>
+    <p style="font-variant: small-caps;">
+        &#x1f197;b#&#x20e3;
+    </p>
+    <p style="-webkit-writing-mode: vertical-rl; height: 5em;">
+        &#x1f197;b#&#x20e3;
+    </p>
+    <p style="-webkit-writing-mode: vertical-rl; font-family: -webkit-pictograph; height: 5em;">
+        &#x1f197;b#&#x20e3;
+    </p>
+</body>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled-expected.txt
new file mode 100644 (file)
index 0000000..dfc338e
--- /dev/null
@@ -0,0 +1,43 @@
+<rdar://problem/8909578> Reintegrate iOS telephone parsing with new HTML5 parser
+
+disabled phone number detection:
+| "
+    "
+| <iframe>
+|   src="resources/phone-disabled.html"
+|   "
+    "
+| "
+
+
+"
+
+FRAME 0:
+| <head>
+|   "
+    "
+|   <title>
+|     "Phone Numbers in MobileSafari"
+|   "
+    "
+|   <meta>
+|     content="telephone=no"
+|     name="format-detection"
+|   "
+"
+| "
+"
+| <body>
+|   "
+"
+|   <p>
+|     "
+    This is a phone number, but it should NOT be linkified because the the meta tag format-detection forbids it:"
+|     <br>
+|     "
+1-866-MY-APPLE
+"
+|   "
+
+
+"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled.html b/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-disabled.html
new file mode 100644 (file)
index 0000000..1c6ba1a
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html>
+<head>
+    <title>Phone Numbers in MobileSafari</title>
+    <script src="../../../../../../resources/dump-as-markup.js"></script>
+    <script type="text/javascript">
+        if (window.testRunner) {
+            Markup.waitUntilDone();
+            testRunner.setTelephoneNumberParsingEnabled(true);
+        }
+
+        window.addEventListener('load', function() {
+            if (!window.testRunner)
+                return;
+
+            Markup.description('<rdar://problem/8909578> Reintegrate iOS telephone parsing with new HTML5 parser');
+            Markup.dump('body', 'disabled phone number detection');
+            testRunner.setTelephoneNumberParsingEnabled(false);
+
+            Markup.notifyDone();
+        }, false);
+    </script>
+</head>
+<body id="body">
+    <iframe src="resources/phone-disabled.html">
+    </iframe>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone-expected.txt
new file mode 100644 (file)
index 0000000..7093236
--- /dev/null
@@ -0,0 +1,127 @@
+<rdar://problem/8909578> Reintegrate iOS telephone parsing with new HTML5 parser
+
+phone number detection:
+| "
+    "
+| <iframe>
+|   src="resources/phone.html"
+|   "
+    "
+| "
+
+
+"
+
+FRAME 0:
+| <head>
+|   "
+    "
+|   <title>
+|     "Phone Numbers in MobileSafari"
+|   "
+"
+| "
+"
+| <body>
+|   "
+"
+|   <p>
+|     "
+    These phone numbers should be linkified:"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:1-866-MY-APPLE"
+|       "1-866-MY-APPLE"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:(312) 961 - 0509"
+|       "(312) 961 - 0509"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:01 42 84 90 00"
+|       "01 42 84 90 00"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:+33 (0)1 42 84 90 00"
+|       "+33 (0)1 42 84 90 00"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:(+33) 1 53 05 15 00"
+|       "(+33) 1 53 05 15 00"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:(0)1 55 54 45 45"
+|       "(0)1 55 54 45 45"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:010-1-800-MY-APPLE"
+|       "010-1-800-MY-APPLE"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:604 736 7331"
+|       "604 736 7331"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:08035384990"
+|       "08035384990"
+|     "に"
+|     <br>
+|     "
+"
+|     <a>
+|       href="tel:00447782326380"
+|       "00447782326380"
+|     "
+"
+|   "
+"
+|   <p>
+|     "This is a phone number, but it should not be linkified because it's inside a "
+|   <pre>
+|     "pre"
+|   " tag: "
+|   <br>
+|   "
+    "
+|   <pre>
+|     "1-866-MY-APPLE"
+|   "
+"
+|   <p>
+|   "
+"
+|   <p>
+|     "
+    These are not phone numbers, so they should not get linkified:"
+|     <br>
+|     "
+KSY-24339-985"
+|     <br>
+|     "
+in 1.158970 seconds "
+|     <br>
+|     "
+rdar://1234567
+"
+|   "
+
+
+"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone.html b/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/phone.html
new file mode 100644 (file)
index 0000000..0862406
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html>
+<head>
+    <title>Phone Numbers in MobileSafari</title>
+    <script src="../../../../../../resources/dump-as-markup.js"></script>
+    <script type="text/javascript">
+        if (window.testRunner) {
+            Markup.waitUntilDone();
+            testRunner.setTelephoneNumberParsingEnabled(true);
+        }
+
+        window.addEventListener('load', function() {
+            if (!window.testRunner)
+                return;
+
+            Markup.description('<rdar://problem/8909578> Reintegrate iOS telephone parsing with new HTML5 parser');
+            Markup.dump('body', 'phone number detection');
+            testRunner.setTelephoneNumberParsingEnabled(false);
+
+            Markup.notifyDone();
+        }, false);
+    </script>
+</head>
+<body id="body">
+    <iframe src="resources/phone.html">
+    </iframe>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/resources/phone-disabled.html b/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/resources/phone-disabled.html
new file mode 100644 (file)
index 0000000..f273707
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html>
+<head>
+    <title>Phone Numbers in MobileSafari</title>
+    <meta name="format-detection" content="telephone=no" />
+</head>
+<body>
+<p>
+    This is a phone number, but it should NOT be linkified because the the meta tag format-detection forbids it:<br />
+1-866-MY-APPLE
+</p>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/resources/phone.html b/LayoutTests/platform/ios-simulator/ios/fast/text/data-detectors/resources/phone.html
new file mode 100644 (file)
index 0000000..0368391
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html>
+<head>
+    <title>Phone Numbers in MobileSafari</title>
+</head>
+<body>
+<p>
+    These phone numbers should be linkified:<br />
+1-866-MY-APPLE<br/>
+(312) 961 - 0509<br/>
+01 42 84 90 00<br/>
++33 (0)1 42 84 90 00<br/>
+(+33) 1 53 05 15 00<br/>
+(0)1 55 54 45 45<br/>
+010-1-800-MY-APPLE<br/>
+604 736 7331<br />
+08035384990に<br />
+00447782326380
+</p>
+<p>This is a phone number, but it should not be linkified because it's inside a <pre>pre</pre> tag: <br />
+    <pre>1-866-MY-APPLE</pre>
+</p>
+<p>
+    These are not phone numbers, so they should not get linkified:<br />
+KSY-24339-985<br/>
+in 1.158970 seconds <br/>
+rdar://1234567
+</p>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-complextext-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-complextext-expected.txt
new file mode 100644 (file)
index 0000000..b69afa8
--- /dev/null
@@ -0,0 +1,41 @@
+layer at (0,0) size 376x542
+  RenderView at (0,0) size 320x240
+layer at (0,0) size 320x542
+  RenderBlock {HTML} at (0,0) size 320x542
+    RenderBody {BODY} at (8,16) size 304x518
+      RenderBlock {P} at (0,0) size 304x80
+        RenderText {#text} at (0,0) size 277x79
+          text run at (0,0) width 263: "Test checks to make sure emoji icons are"
+          text run at (0,20) width 277: "displayed when placed along with complex"
+          text run at (0,40) width 206: "texts like Thai and Devanagari -"
+          text run at (0,60) width 175: "<rdar://problem/7266253>."
+      RenderBlock {P} at (0,96) size 304x25
+        RenderText {#text} at (0,1) size 137x19
+          text run at (0,1) width 137: "\x{907}\x{92E}\x{94B}\x{91C}\x{940}\x{E227}\x{924}\x{947}\x{938}\x{94D}\x{924}"
+      RenderBlock {P} at (0,121) size 304x24
+        RenderText {#text} at (0,4) size 94x19
+          text run at (0,4) width 94: "\x{E0E}\x{E17}\x{E19}\x{E48}\x{E23}\x{E105}\x{E18}\x{E33}\x{E2B}\x{E30}"
+      RenderBlock {P} at (0,145) size 304x28
+        RenderText {#text} at (0,1) size 152x21
+          text run at (0,1) width 152: "\x{907}\x{92E}\x{94B}\x{91C}\x{940}\x{E101}\x{924}\x{947}\x{938}\x{94D}\x{924}"
+      RenderBlock {P} at (0,173) size 304x27
+        RenderText {#text} at (0,4) size 103x21
+          text run at (0,4) width 103: "\x{E0E}\x{E17}\x{E19}\x{E48}\x{E23}\x{E110}\x{E18}\x{E33}\x{E2B}\x{E30}"
+      RenderBlock {P} at (0,200) size 304x38
+        RenderText {#text} at (0,3) size 195x28
+          text run at (0,3) width 195: "\x{907}\x{92E}\x{94B}\x{91C}\x{940}\x{E109}\x{924}\x{947}\x{938}\x{94D}\x{924}"
+      RenderBlock {P} at (0,238) size 304x34
+        RenderText {#text} at (0,5) size 130x28
+          text run at (0,5) width 130: "\x{E0E}\x{E17}\x{E19}\x{E48}\x{E23}\x{E220}\x{E18}\x{E33}\x{E2B}\x{E30}"
+      RenderBlock {P} at (0,272) size 304x55
+        RenderText {#text} at (0,3) size 282x41
+          text run at (0,3) width 282: "\x{907}\x{92E}\x{94B}\x{91C}\x{940}\x{E215}\x{924}\x{947}\x{938}\x{94D}\x{924}"
+      RenderBlock {P} at (0,327) size 304x51
+        RenderText {#text} at (0,7) size 184x41
+          text run at (0,7) width 184: "\x{E0E}\x{E17}\x{E19}\x{E48}\x{E23}\x{E122}\x{E18}\x{E33}\x{E2B}\x{E30}"
+      RenderBlock {P} at (0,378) size 304x73
+        RenderText {#text} at (0,5) size 369x54
+          text run at (0,5) width 369: "\x{907}\x{92E}\x{94B}\x{91C}\x{940}\x{E22F}\x{924}\x{947}\x{938}\x{94D}\x{924}"
+      RenderBlock {P} at (0,451) size 304x67
+        RenderText {#text} at (0,11) size 239x54
+          text run at (0,11) width 239: "\x{E0E}\x{E17}\x{E19}\x{E48}\x{E23}\x{E231}\x{E18}\x{E33}\x{E2B}\x{E30}"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-complextext.html b/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-complextext.html
new file mode 100644 (file)
index 0000000..ef7ebe2
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+<meta name="viewport" content="width=device-width" />
+  <style type="text/css">
+    p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; }
+    p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 18px; }
+    p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 24px; }
+    p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 36px; }
+    p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 48px; }
+  </style>
+</head>
+<body>
+<p>
+Test checks to make sure emoji icons are displayed when placed along with complex texts like Thai and Devanagari - &lt;rdar://problem/7266253&gt;.
+
+<p class="p1">&#x907;&#x92E;&#x94B;&#x91C;&#x940;&#xE227;&#x924;&#x947;&#x938;&#x94D;&#x924;</p>
+<p class="p1">&#xE0E;&#xE17;&#xE19;&#xE48;&#xE23;&#xE105;&#xE18;&#xE33;&#xE2B;&#xE30;</p>
+<p class="p2">&#x907;&#x92E;&#x94B;&#x91C;&#x940;&#xE101;&#x924;&#x947;&#x938;&#x94D;&#x924;</p>
+<p class="p2">&#xE0E;&#xE17;&#xE19;&#xE48;&#xE23;&#xE110;&#xE18;&#xE33;&#xE2B;&#xE30;</p>
+<p class="p3">&#x907;&#x92E;&#x94B;&#x91C;&#x940;&#xE109;&#x924;&#x947;&#x938;&#x94D;&#x924;</p>
+<p class="p3">&#xE0E;&#xE17;&#xE19;&#xE48;&#xE23;&#xE220;&#xE18;&#xE33;&#xE2B;&#xE30;</p>
+<p class="p4">&#x907;&#x92E;&#x94B;&#x91C;&#x940;&#xE215;&#x924;&#x947;&#x938;&#x94D;&#x924;</p>
+<p class="p4">&#xE0E;&#xE17;&#xE19;&#xE48;&#xE23;&#xE122;&#xE18;&#xE33;&#xE2B;&#xE30;</p>
+<p class="p5">&#x907;&#x92E;&#x94B;&#x91C;&#x940;&#xE22F;&#x924;&#x947;&#x938;&#x94D;&#x924;</p>
+<p class="p5">&#xE0E;&#xE17;&#xE19;&#xE48;&#xE23;&#xE231;&#xE18;&#xE33;&#xE2B;&#xE30;</p>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-text-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-text-expected.txt
new file mode 100644 (file)
index 0000000..e012d3e
--- /dev/null
@@ -0,0 +1,35 @@
+layer at (0,0) size 320x360
+  RenderView at (0,0) size 320x240
+layer at (0,0) size 320x360
+  RenderBlock {HTML} at (0,0) size 320x360
+    RenderBody {BODY} at (8,8) size 304x344
+      RenderBlock {P} at (0,0) size 304x20
+        RenderText {#text} at (0,0) size 98x19
+          text run at (0,0) width 98: "This is a\x{E227}test"
+      RenderBlock {P} at (0,20) size 304x20
+        RenderText {#text} at (0,0) size 98x19
+          text run at (0,0) width 98: "This is a\x{E105}test"
+      RenderBlock {P} at (0,40) size 304x22
+        RenderText {#text} at (0,0) size 107x21
+          text run at (0,0) width 107: "This is a\x{E101}test"
+      RenderBlock {P} at (0,62) size 304x22
+        RenderText {#text} at (0,0) size 107x21
+          text run at (0,0) width 107: "This is a\x{E110}test"
+      RenderBlock {P} at (0,84) size 304x30
+        RenderText {#text} at (0,1) size 136x28
+          text run at (0,1) width 136: "This is a\x{E109}test"
+      RenderBlock {P} at (0,114) size 304x30
+        RenderText {#text} at (0,1) size 136x28
+          text run at (0,1) width 136: "This is a\x{E220}test"
+      RenderBlock {P} at (0,144) size 304x43
+        RenderText {#text} at (0,1) size 193x41
+          text run at (0,1) width 193: "This is a\x{E215}test"
+      RenderBlock {P} at (0,187) size 304x43
+        RenderText {#text} at (0,1) size 193x41
+          text run at (0,1) width 193: "This is a\x{E122}test"
+      RenderBlock {P} at (0,230) size 304x57
+        RenderText {#text} at (0,1) size 251x54
+          text run at (0,1) width 251: "This is a\x{E22F}test"
+      RenderBlock {P} at (0,287) size 304x57
+        RenderText {#text} at (0,1) size 251x54
+          text run at (0,1) width 251: "This is a\x{E231}test"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-text.html b/LayoutTests/platform/ios-simulator/ios/fast/text/emoji-text.html
new file mode 100644 (file)
index 0000000..e6e79f6
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <meta http-equiv="Content-Style-Type" content="text/css">
+<meta name="viewport" content="width=device-width" />
+  <style type="text/css">
+    p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; }
+    p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 18px; }
+    p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 24px; }
+    p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 36px; }
+    p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; font-size: 48px; }
+  </style>
+</head>
+<body>
+<p class="p1">This is a&#xE227;test</p>
+<p class="p1">This is a&#xE105;test</p>
+<p class="p2">This is a&#xE101;test</p>
+<p class="p2">This is a&#xE110;test</p>
+<p class="p3">This is a&#xE109;test</p>
+<p class="p3">This is a&#xE220;test</p>
+<p class="p4">This is a&#xE215;test</p>
+<p class="p4">This is a&#xE122;test</p>
+<p class="p5">This is a&#xE22F;test</p>
+<p class="p5">This is a&#xE231;test</p>
+</body>
+</html>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/line-breaking-with-kerning-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/line-breaking-with-kerning-expected.txt
new file mode 100644 (file)
index 0000000..dd6bd1c
--- /dev/null
@@ -0,0 +1,46 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x582
+      RenderBlock {P} at (0,0) size 784x40
+        RenderText {#text} at (0,0) size 55x19
+          text run at (0,0) width 55: "Test for "
+        RenderInline {I} at (0,0) size 776x39
+          RenderInline {A} at (0,0) size 312x19 [color=#0000EE]
+            RenderText {#text} at (54,0) size 312x19
+              text run at (54,0) width 312: "https://bugs.webkit.org/show_bug.cgi?id=32794"
+          RenderText {#text} at (365,0) size 776x39
+            text run at (365,0) width 5: " "
+            text run at (369,0) width 407: "With text-rendering: optimizelegibility, sometimes lines run too"
+            text run at (0,20) width 29: "long"
+        RenderText {#text} at (28,20) size 5x19
+          text run at (28,20) width 5: "."
+      RenderBlock {P} at (0,56) size 784x20
+        RenderText {#text} at (0,0) size 583x19
+          text run at (0,0) width 430: "Text should not overflow any of these boxes. The terminal of the f "
+          text run at (429,0) width 154: "may overlap the border."
+      RenderBlock {DIV} at (0,92) size 247x44 [border: (3px solid #0000FF)]
+        RenderText {#text} at (3,3) size 241x38
+          text run at (3,3) width 241: "maintenance of the balance of power"
+          text run at (3,22) width 13: "in"
+      RenderBlock {DIV} at (0,146) size 247x44 [border: (3px solid #FF0000)]
+        RenderText {#text} at (3,3) size 241x38
+          text run at (3,3) width 241: "maintenance of the balance of"
+          text run at (3,22) width 57: "power in"
+      RenderBlock {DIV} at (0,200) size 247x44 [border: (3px solid #0000FF)]
+        RenderText {#text} at (3,3) size 238x38
+          text run at (3,3) width 238: "maintenance of the balance of power"
+          text run at (3,22) width 13: "in"
+      RenderBlock {DIV} at (0,254) size 247x44 [border: (3px solid #FF0000)]
+        RenderText {#text} at (3,3) size 196x38
+          text run at (3,3) width 196: "maintenance of the balance of"
+          text run at (3,22) width 57: "power in"
+      RenderBlock {DIV} at (0,308) size 247x44 [border: (3px solid #0000FF)]
+        RenderText {#text} at (3,3) size 238x38
+          text run at (3,3) width 238: "f f f f f f f f f f f f f f f f f f f f f f f f f f f f f"
+          text run at (3,22) width 13: "f f"
+      RenderBlock {DIV} at (0,362) size 247x44 [border: (3px solid #FF0000)]
+        RenderText {#text} at (3,3) size 239x38
+          text run at (3,3) width 239: "f f f f f f f f f f f f f f f f f f f f f f f"
+          text run at (3,22) width 79: "f f f f f f f f"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/line-breaking-with-kerning.html b/LayoutTests/platform/ios-simulator/ios/fast/text/line-breaking-with-kerning.html
new file mode 100644 (file)
index 0000000..575f6f4
--- /dev/null
@@ -0,0 +1,26 @@
+<style>
+    div {
+        font-family: baskerville;
+        width: 241px;
+        border: solid blue;
+        margin: 10px 0;
+    }
+    div.optimizelegibility {
+        text-rendering: optimizelegibility;
+        border-color: red;
+    }
+</style>
+<p>
+    Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=32794">https://bugs.webkit.org/show_bug.cgi?id=32794</a>
+    With text-rendering: optimizelegibility, sometimes lines run too long</i>.
+</p>
+<p>
+    Text should not overflow any of these boxes. The terminal of the f
+    may overlap the border.
+</p>
+<div style="text-align: justify;">maintenance of the balance of power in</div>
+<div class="optimizelegibility" style="text-align: justify;">maintenance of the balance of power in</div>
+<div>maintenance of the balance of power in</div>
+<div class="optimizelegibility">maintenance of the balance of power in</div>
+<div>f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f</div>
+<div class="optimizelegibility">f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f</div>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/mid-word-break-before-combining-mark-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/mid-word-break-before-combining-mark-expected.txt
new file mode 100644 (file)
index 0000000..6212d48
--- /dev/null
@@ -0,0 +1,9 @@
+layer at (0,0) size 320x240
+  RenderView at (0,0) size 320x240
+layer at (0,0) size 320x240
+  RenderBlock {HTML} at (0,0) size 320x240
+    RenderBody {BODY} at (8,8) size 304x224
+      RenderBlock {DIV} at (0,0) size 100x48
+        RenderText {#text} at (0,0) size 84x47
+          text run at (0,0) width 84: "0\x{20E3}1\x{20E3}2\x{20E3}3\x{20E3}"
+          text run at (0,24) width 84: "4\x{20E3}5\x{20E3}6\x{20E3}7\x{20E3}"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/mid-word-break-before-combining-mark.html b/LayoutTests/platform/ios-simulator/ios/fast/text/mid-word-break-before-combining-mark.html
new file mode 100644 (file)
index 0000000..08ea22b
--- /dev/null
@@ -0,0 +1,4 @@
+<meta name=viewport content="width=device-width">
+<div style="font-size: 20px; width: 100px; outline: solid blue; word-break: break-all;">
+    0&#x20e3;1&#x20e3;2&#x20e3;3&#x20e3;4&#x20e3;5&#x20e3;6&#x20e3;7&#x20e3;
+</div>
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFont-expected.txt b/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFont-expected.txt
new file mode 100644 (file)
index 0000000..6c8ddfb
--- /dev/null
@@ -0,0 +1,60 @@
+layer at (0,0) size 800x1349
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x1349
+  RenderBlock {HTML} at (0,0) size 800x1349
+    RenderBody {BODY} at (8,8) size 784x1333
+      RenderBlock {DIV} at (0,0) size 784x29
+        RenderText {#text} at (0,0) size 395x29
+          text run at (0,0) width 395: "This is a test for -webkit-system-font"
+      RenderBlock {DIV} at (0,29) size 784x58
+        RenderText {#text} at (0,0) size 744x58
+          text run at (0,0) width 744: "This is a test for -apple-system-font. It should be the same as the line"
+          text run at (0,29) width 73: "above."
+      RenderBlock {DIV} at (0,87) size 784x74
+        RenderText {#text} at (0,0) size 710x74
+          text run at (0,0) width 710: "This is a test for -webkit-system-font, using the 'font'"
+          text run at (0,37) width 114: "property"
+      RenderBlock {DIV} at (0,161) size 784x74
+        RenderText {#text} at (0,0) size 696x74
+          text run at (0,0) width 696: "This is a test for -apple-system-font, using the 'font'"
+          text run at (0,37) width 114: "property"
+      RenderBlock {DIV} at (0,235) size 784x29
+        RenderInline {B} at (0,0) size 548x29
+          RenderText {#text} at (0,0) size 548x29
+            text run at (0,0) width 548: "This is a test for -webkit-system-font in bold form"
+      RenderBlock {DIV} at (0,264) size 784x29
+        RenderInline {I} at (0,0) size 528x29
+          RenderText {#text} at (0,0) size 528x29
+            text run at (0,0) width 528: "This is a test for -webkit-system-font in italic form"
+      RenderBlock {DIV} at (0,293) size 784x37
+        RenderText {#text} at (0,0) size 663x37
+          text run at (0,0) width 663: "This is a test for -webkit-system-font at size 30px"
+      RenderBlock {DIV} at (0,330) size 784x88
+        RenderText {#text} at (0,0) size 705x88
+          text run at (0,0) width 705: "This is a test for -webkit-system-font at size"
+          text run at (0,44) width 81: "36px"
+      RenderBlock {DIV} at (0,418) size 784x102
+        RenderText {#text} at (0,0) size 738x102
+          text run at (0,0) width 738: "This is a test for -webkit-system-font at"
+          text run at (0,51) width 179: "size 42px"
+      RenderBlock {DIV} at (0,520) size 784x116
+        RenderText {#text} at (0,0) size 705x116
+          text run at (0,0) width 705: "This is a test for -webkit-system-"
+          text run at (0,58) width 355: "font at size 48px"
+      RenderBlock {DIV} at (0,636) size 784x132
+        RenderText {#text} at (0,0) size 600x132
+          text run at (0,0) width 600: "This is a test for -webkit-"
+          text run at (0,66) width 594: "system-font at size 54px"
+      RenderBlock {DIV} at (0,768) size 784x146
+        RenderText {#text} at (0,0) size 666x146
+          text run at (0,0) width 666: "This is a test for -webkit-"
+          text run at (0,73) width 659: "system-font at size 60px"
+      RenderBlock {DIV} at (0,914) size 784x158
+        RenderText {#text} at (0,0) size 733x158
+          text run at (0,0) width 733: "This is a test for -webkit-"
+          text run at (0,79) width 725: "system-font at size 66px"
+      RenderBlock {DIV} at (0,1072) size 784x261
+        RenderText {#text} at (0,0) size 706x261
+          text run at (0,0) width 559: "This is a test for -"
+          text run at (0,87) width 706: "webkit-system-font at"
+          text run at (0,174) width 306: "size 72px"
diff --git a/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFont.html b/LayoutTests/platform/ios-simulator/ios/fast/text/opticalFont.html
new file mode 100644 (file)
index 0000000..45dfb61
--- /dev/null
@@ -0,0 +1,16 @@
+<body>
+    <div style="font-family: -webkit-system-font; font-size: 24px">This is a test&nbs