haikuwebkit/LayoutTests/fast/dynamic
Chris Dumez dc33e39753 Relax "parent must be an HTMLElement" restriction in outerHTML setter
https://bugs.webkit.org/show_bug.cgi?id=226808

Reviewed by Ryosuke Niwa.

Source/WebCore:

Made the following change to our outerHTML setter for better compatibility and to better
match the specification [1]:
- Stop throwing an exception when the parent is not an HTML element. This new behavior matches
  the specification, Blink and Gecko behavior.

I did not fully align us with the specification because we are mostly aligned with Blink at
the moment. In particular:
- The specification says the outerHTML setter should be a no-op when the parent is null.
  Firefox matches the specification but WebKit & Blink throw a NoModificationAllowedError.
- The specification says we should allow setting outerHTML if the parent is a DocumentFragment.
  Firefox allows this but WebKit & Blink throw a NoModificationAllowedError.
- WebKit & Blink have some Text node merging logic that is not present in the specification
  and which Gecko doesn't implement.

[1] https://w3c.github.io/DOM-Parsing/#dom-element-outerhtml

Test: fast/dom/set-outer-html-special-cases.html

* dom/Element.cpp:
(WebCore::Element::setOuterHTML):

LayoutTests:

* fast/dom/set-outer-html-special-cases-expected.txt: Added.
* fast/dom/set-outer-html-special-cases.html: Added.
Add layout test coverage

* fast/dynamic/outerHTML-no-element-expected.txt:
Rebaseline test due to different exception message.

* platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-003-expected.txt:
* platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/css-styling/padding-border-margin/margin-003-expected.txt:
Rebaseline WPT test. This is actually a progression because we're no longer throwing. However, the test is still failing
later on.


Canonical link: https://commits.webkit.org/238774@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-13 19:16:48 +00:00
..
resources
001-expected.txt
001.html
002.html
004.html
005-expected.txt
005.html
006.html
007.html
008.html
009.html
010.html
011.html
012.html
013.html
014.html
015.html
5872671-expected.txt
5872671.html
ancestor-to-absolute-expected.txt Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=56909 2011-03-25 21:57:07 +00:00
ancestor-to-absolute.html
anchor-lock.html
anonymous-block-layer-lost-expected.txt
anonymous-block-layer-lost.html
anonymous-block-orphaned-lines.html
checkbox-selection-crash-expected.txt
checkbox-selection-crash.html Selection API: Update some more tests so they don't accidentally rely on flaws in WebKit's old implementation 2020-09-20 02:51:28 +00:00
containing-block-change.html
continuation-detach-crash-expected.txt Regression(r131539): Heap-use-after-free in WebCore::RenderBlock::willBeDestroyed 2013-02-11 21:11:11 +00:00
continuation-detach-crash.html
crash-generated-counter-expected.txt
crash-generated-counter.html
crash-generated-image-expected.txt
crash-generated-image.html
crash-generated-quote-expected.txt
crash-generated-quote.html
crash-generated-text-expected.txt
crash-generated-text.html
crash-paint-no-documentElement-renderer-expected.txt
crash-paint-no-documentElement-renderer.html Migrate 97 *-disabled tests to use TestExpectations 2017-01-29 07:30:39 +00:00
crash-subtree-layout-when-auto-size-enabled-expected.txt Crash when subtree layout is set on FrameView while auto size mode is enabled. 2015-11-08 00:50:44 +00:00
crash-subtree-layout-when-auto-size-enabled.html
create-renderer-for-whitespace-only-text.html
dirty-float-in-clean-line-expected.png
dirty-float-in-clean-line-expected.txt Source/WebCore: <rdar://problem/8733254> Float disappears after incremental layout 2011-03-10 01:56:27 +00:00
dirty-float-in-clean-line.html
empty-absolute-innerhtml-transcoding-text-expected.html getComputedStyle().width wrong after text changed 2013-06-26 19:39:02 +00:00
empty-absolute-innerhtml-transcoding-text.html getComputedStyle().width wrong after text changed 2013-06-26 19:39:02 +00:00
first-letter-after-list-marker-expected.png
first-letter-after-list-marker-expected.txt Source/WebCore: 2017-11-02 08:05:36 +00:00
first-letter-after-list-marker.html
first-letter-display-change-expected.png
first-letter-display-change.html
float-at-line-break-expected.png
float-at-line-break-expected.txt
float-at-line-break.html
float-from-empty-line-expected.png
float-from-empty-line-expected.txt
float-from-empty-line.html
float-in-trailing-whitespace-after-last-line-break-2-expected.png
float-in-trailing-whitespace-after-last-line-break-2-expected.txt
float-in-trailing-whitespace-after-last-line-break-2.html
float-in-trailing-whitespace-after-last-line-break.html
float-moved-downwards-for-pagination-expected.html
float-moved-downwards-for-pagination.html
float-no-longer-overhanging-expected.txt Unreviewed optimize-baselines for mac and win. 2013-04-25 02:44:19 +00:00
float-no-longer-overhanging.html
float-remove-above-line-2-expected.txt
float-remove-above-line-2.html
float-remove-above-line-expected.txt
float-remove-above-line.html
float-withdrawal-2-expected.txt Unreviewed optimize-baselines for mac and win. 2013-04-25 02:44:19 +00:00
float-withdrawal-2.html
float-withdrawal.html
floating-to-positioned-2-expected.txt
floating-to-positioned-2.html
floating-to-positioned-expected.txt
floating-to-positioned.html
genContentDestroyChildren.html
hover-before-position-after-style-change-expected.txt
hover-before-position-after-style-change.html
hover-before-position-after-style-change2-expected.txt
hover-before-position-after-style-change2.html Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encoding, events, eventsource, and exclusions tests 2012-06-20 03:28:42 +00:00
hover-style-recalc-crash-expected.txt
hover-style-recalc-crash.html
hovered-detach-expected.txt
hovered-detach.html
inline-to-block-crash-expected.txt Remove unnecessary sibling text renderers after attach 2013-09-07 18:25:46 +00:00
inline-to-block-crash.html
insert-before-table-part-in-continuation.html
insertAdjacentElement-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
insertAdjacentElement.html
insertAdjacentHTML-allowed-parents-expected.txt
insertAdjacentHTML-allowed-parents.html [Testing] Rename test header commands to match names in WebPreferences*.yaml 2020-10-13 17:16:15 +00:00
insertAdjacentHTML-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
insertAdjacentHTML.html
insertAdjacentText-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
insertAdjacentText.html
jQuery-animation-crash-expected.txt
jQuery-animation-crash.html
layer-hit-test-crash.html
layer-no-longer-paginated-expected.txt
layer-no-longer-paginated.html
link-href-change.html
mail-autosize-viewport-unit-expected.txt
mail-autosize-viewport-unit.html
mail-autosize-with-iframe-expected.txt REGRESSION (r244434) Dispatch intrinsicContentsSizeChanged on the main frame only 2021-05-27 13:27:56 +00:00
mail-autosize-with-iframe.html REGRESSION (r244434) Dispatch intrinsicContentsSizeChanged on the main frame only 2021-05-27 13:27:56 +00:00
move-node-with-selection.html
noninlinebadness.html
outerHTML-doc.html
outerHTML-img.html
outerHTML-no-element-expected.txt Relax "parent must be an HTMLElement" restriction in outerHTML setter 2021-06-13 19:16:48 +00:00
outerHTML-no-element.html
paused-event-dispatch-expected.txt
paused-event-dispatch.html
position-absolute-to-fixed-crash-expected.txt WebCore: Fix <rdar://problem/7094146> Reproducible crash at 2009-10-12 23:49:46 +00:00
position-absolute-to-fixed-crash.html
position-change-layout-expected.txt
position-change-layout.html
position-fixed-to-absolute-with-positioned-child-crash-expected.txt
position-fixed-to-absolute-with-positioned-child-crash.html
positioned-movement-with-positioned-children.html
recursive-layout-expected.txt
recursive-layout.html
remove-invisible-node-inside-selection-expected.html
remove-invisible-node-inside-selection.html REGRESSION (r164133): Selection doesn't paint when scrolling some pages 2014-04-26 21:28:20 +00:00
remove-node-inside-selection-expected.html
remove-node-inside-selection.html
selection-gets-cleared-when-part-of-it-gets-removed-expected.html
selection-gets-cleared-when-part-of-it-gets-removed.html REGRESSION(r164133): Selection disappears after scrolling on nytimes.com 2014-07-29 01:45:54 +00:00
selection-highlight-adjust.html
size-to-content-autosize-with-percent-document-height-expected.txt Regression (r264960): [mac-wk1] fast/dynamic/size-to-content-autosize-with-percent-document-height.html is consistently failing 2020-07-28 21:07:56 +00:00
size-to-content-autosize-with-percent-document-height.html Regression (r264960): [mac-wk1] fast/dynamic/size-to-content-autosize-with-percent-document-height.html is consistently failing 2020-07-28 21:07:56 +00:00
size-to-content-autosize-with-viewport-units-expected.txt
size-to-content-autosize-with-viewport-units.html
staticY-expected.txt
staticY-marking-parents-regression.html
staticY.html
style-access-late-stylesheet-load-expected.txt
style-access-late-stylesheet-load.html
subtree-boundary-percent-height-expected.txt [chromium] Unreviewed gardening. 2012-03-08 19:18:17 +00:00
subtree-boundary-percent-height.html
subtree-common-root-expected.txt
subtree-common-root.html
subtree-no-common-root-static-y-expected.txt [chromium] Unreviewed gardening. 2012-03-08 19:18:17 +00:00
subtree-no-common-root-static-y.html
subtree-parent-static-y-expected.txt
subtree-parent-static-y.html
subtree-table-cell-height-expected.txt [chromium] Unreviewed gardening. 2012-03-08 19:18:17 +00:00
subtree-table-cell-height.html
subtree-unrooted-expected.txt
subtree-unrooted.html
text-combine.html
unicode-bidi-expected.png
unicode-bidi-expected.txt
unicode-bidi.html
view-overflow.html
window-resize-scrollbars-test.html
window-scrollbars-test.html