Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
HTMLElement.innerText setter should convert new lines to <br>
https://bugs.webkit.org/show_bug.cgi?id=228605 Reviewed by Sam Weinig. LayoutTests/imported/w3c: Rebaselined WPT tests that are now passing. Note that those were failing in WebKit but passing in Firefox and Chrome. * web-platform-tests/html/dom/elements/the-innertext-and-outertext-properties/innertext-setter-expected.txt: * web-platform-tests/html/dom/elements/the-innertext-idl-attribute/setter-expected.txt: * web-platform-tests/innerText/setter-expected.txt: Source/WebCore: HTMLElement.innerText setter should convert new lines to <br>: - https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute:dom-innertext-3 - https://html.spec.whatwg.org/multipage/dom.html#rendered-text-fragment Our innerText setter had some logic that was specific to form elements and specific render styles that wasn't part of the specification. It was causing us to not replace the new lines with <br> in some cases. I dropped this logic to align with Blink and Gecko, as those are passing the same WPT tests. No new tests, rebaselined existing tests. * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): LayoutTests: Rebaseline a few tests that changed output. * editing/pasteboard/smart-paste-paragraph-003-expected.txt: * platform/mac/editing/input/reveal-caret-of-multiline-input-expected.txt: * platform/mac/fast/forms/basic-textareas-quirks-expected.txt: * platform/mac/fast/forms/textarea-scroll-height-expected.txt: * platform/mac/fast/forms/textarea-scrollbar-expected.txt: * platform/mac/fast/forms/textarea-scrolled-type-expected.txt: * platform/mac/fast/forms/textarea-width-expected.txt: * platform/mac/fast/parser/open-comment-in-textarea-expected.txt: * platform/mac/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt: * platform/mac/http/tests/navigation/javascriptlink-frames-expected.txt: Canonical link: https://commits.webkit.org/240117@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
28 changed files
with
674 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.