Bug 1720809 - part 1: Make `insertParagraphSeparator` command handler in `HTMLEditor` insert a linefeed character instead of `<br>` element in same condition as Blink/WebKit r=m_kato

Blink and WebKit inserts linefeed character for `insertParagraphSeparator`
command if:
* the insertion point's block parent is an editing host
* the editing host's outside display is "inline"
* the editing host's white space style preformats linefeed characters

For web-compat, we should do this in these conditions.

Depends on D124562

Differential Revision: https://phabricator.services.mozilla.com/D124731
This commit is contained in:
Masayuki Nakano 2021-09-10 21:45:47 +00:00
Родитель a7f6392b0f
Коммит 2640b6cdc9
5 изменённых файлов: 207 добавлений и 177 удалений

Просмотреть файл

@ -1444,47 +1444,72 @@ EditActionResult HTMLEditor::InsertParagraphSeparatorAsSubAction() {
: nullptr;
ParagraphSeparator separator = GetDefaultParagraphSeparator();
bool insertBRElement;
bool insertLineBreak;
// If there is no block parent in the editing host, i.e., the editing host
// itself is also a non-block element, we should insert a <br> element.
// itself is also a non-block element, we should insert a line break.
if (!editableBlockElement) {
// XXX Chromium checks if the CSS box of the editing host is a block.
insertBRElement = true;
insertLineBreak = true;
}
// If the editable block element is not splittable, e.g., it's an editing
// host, and the default paragraph separator is <br> or the element cannot
// contain a <p> element, we should insert a <br> element.
else if (!HTMLEditUtils::IsSplittableNode(*editableBlockElement)) {
insertBRElement =
insertLineBreak =
separator == ParagraphSeparator::br ||
!HTMLEditUtils::CanElementContainParagraph(*editableBlockElement);
!HTMLEditUtils::CanElementContainParagraph(*editingHost) ||
(HTMLEditUtils::IsDisplayOutsideInline(*editingHost) &&
EditorUtils::IsNewLinePreformatted(
atStartOfSelection.IsInContentNode()
? *atStartOfSelection.ContainerAsContent()
: static_cast<nsIContent&>(*editingHost)));
}
// If the nearest block parent is a single-line container declared in
// the execCommand spec and not the editing host, we should separate the
// block even if the default paragraph separator is <br> element.
else if (HTMLEditUtils::IsSingleLineContainer(*editableBlockElement)) {
insertBRElement = false;
insertLineBreak = false;
}
// Otherwise, unless there is no block ancestor which can contain <p>
// element, we shouldn't insert a <br> element here.
// element, we shouldn't insert a line break here.
else {
insertBRElement = true;
insertLineBreak = true;
for (const Element* editableBlockAncestor = editableBlockElement;
editableBlockAncestor && insertBRElement;
editableBlockAncestor && insertLineBreak;
editableBlockAncestor = HTMLEditUtils::GetAncestorElement(
*editableBlockAncestor,
HTMLEditUtils::ClosestEditableBlockElement)) {
insertBRElement =
insertLineBreak =
!HTMLEditUtils::CanElementContainParagraph(*editableBlockAncestor);
}
}
// If we cannot insert a <p>/<div> element at the selection, we should insert
// a <br> element instead.
if (insertBRElement) {
nsresult rv = InsertBRElement(atStartOfSelection);
// a <br> element or a linefeed instead.
if (insertLineBreak) {
// For backward compatibility, we should not insert a linefeed if
// paragraph separator is set to "br" which is Gecko-specific command.
if (separator != ParagraphSeparator::br &&
// If and only if the nearest block is the editing host or its parent,
(!editableBlockElement || editableBlockElement == editingHost) &&
// and if the outside display value of the editing host is inline,
HTMLEditUtils::IsDisplayOutsideInline(*editingHost) &&
// and new line character is preformatted, we should insert a linefeed.
EditorUtils::IsNewLinePreformatted(
atStartOfSelection.IsInContentNode()
? *atStartOfSelection.ContainerAsContent()
: static_cast<nsIContent&>(*editingHost))) {
nsresult rv = HandleInsertLinefeed(atStartOfSelection, *editingHost);
if (NS_FAILED(rv)) {
NS_WARNING("HTMLEditor::HandleInsertLinefeed() failed");
return EditActionIgnored(rv);
}
return EditActionHandled();
}
nsresult rv = HandleInsertBRElement(atStartOfSelection, *editingHost);
if (NS_FAILED(rv)) {
NS_WARNING("HTMLEditor::InsertBRElement() failed");
NS_WARNING("HTMLEditor::HandleInsertBRElement() failed");
return EditActionIgnored(rv);
}
return EditActionHandled();
@ -1529,9 +1554,9 @@ EditActionResult HTMLEditor::InsertParagraphSeparatorAsSubAction() {
}
if (NS_WARN_IF(!HTMLEditUtils::IsSplittableNode(*editableBlockElement))) {
// Didn't create a new block for some reason, fall back to <br>
nsresult rv = InsertBRElement(atStartOfSelection);
nsresult rv = HandleInsertBRElement(atStartOfSelection, *editingHost);
if (NS_FAILED(rv)) {
NS_WARNING("HTMLEditor::InsertBRElement() failed");
NS_WARNING("HTMLEditor::HandleInsertBRElement() failed");
return EditActionIgnored(rv);
}
return EditActionHandled();
@ -1629,15 +1654,16 @@ EditActionResult HTMLEditor::InsertParagraphSeparatorAsSubAction() {
}
// If nobody handles this edit action, let's insert new <br> at the selection.
rv = InsertBRElement(atStartOfSelection);
rv = HandleInsertBRElement(atStartOfSelection, *editingHost);
if (NS_FAILED(rv)) {
NS_WARNING("HTMLEditor::InsertBRElement() failed");
NS_WARNING("HTMLEditor::HandleInsertBRElement() failed");
return EditActionIgnored(rv);
}
return EditActionHandled();
}
nsresult HTMLEditor::InsertBRElement(const EditorDOMPoint& aPointToBreak) {
nsresult HTMLEditor::HandleInsertBRElement(const EditorDOMPoint& aPointToBreak,
Element& aEditingHost) {
MOZ_ASSERT(IsEditActionDataAvailable());
if (NS_WARN_IF(!aPointToBreak.IsSet())) {
@ -1646,8 +1672,6 @@ nsresult HTMLEditor::InsertBRElement(const EditorDOMPoint& aPointToBreak) {
bool brElementIsAfterBlock = false, brElementIsBeforeBlock = false;
RefPtr<Element> editingHost = GetActiveEditingHost();
// First, insert a <br> element.
RefPtr<Element> brElement;
if (IsInPlaintextMode()) {
@ -1661,7 +1685,7 @@ nsresult HTMLEditor::InsertBRElement(const EditorDOMPoint& aPointToBreak) {
brElement = resultOfInsertingBRElement.unwrap().forget();
} else {
EditorDOMPoint pointToBreak(aPointToBreak);
WSRunScanner wsRunScanner(editingHost, pointToBreak);
WSRunScanner wsRunScanner(&aEditingHost, pointToBreak);
WSScanResult backwardScanResult =
wsRunScanner.ScanPreviousVisibleNodeOrBlockBoundaryFrom(pointToBreak);
if (backwardScanResult.Failed()) {
@ -1735,7 +1759,7 @@ nsresult HTMLEditor::InsertBRElement(const EditorDOMPoint& aPointToBreak) {
NS_WARNING_ASSERTION(advanced,
"Failed to advance offset after the new <br> element");
WSScanResult forwardScanFromAfterBRElementResult =
WSRunScanner::ScanNextVisibleNodeOrBlockBoundary(editingHost,
WSRunScanner::ScanNextVisibleNodeOrBlockBoundary(&aEditingHost,
afterBRElement);
if (forwardScanFromAfterBRElementResult.Failed()) {
NS_WARNING("WSRunScanner::ScanNextVisibleNodeOrBlockBoundary() failed");
@ -1785,6 +1809,129 @@ nsresult HTMLEditor::InsertBRElement(const EditorDOMPoint& aPointToBreak) {
return rv;
}
nsresult HTMLEditor::HandleInsertLinefeed(const EditorDOMPoint& aPointToBreak,
Element& aEditingHost) {
MOZ_ASSERT(IsEditActionDataAvailable());
if (NS_WARN_IF(!aPointToBreak.IsSet())) {
return NS_ERROR_INVALID_ARG;
}
// TODO: The following code is duplicated from `HandleInsertText`. They
// should be merged when we fix bug 92921.
RefPtr<const nsRange> caretRange =
nsRange::Create(aPointToBreak.ToRawRangeBoundary(),
aPointToBreak.ToRawRangeBoundary(), IgnoreErrors());
if (NS_WARN_IF(!caretRange)) {
return NS_ERROR_FAILURE;
}
nsresult rv = CreateStyleForInsertText(*caretRange);
if (NS_FAILED(rv)) {
NS_WARNING("HTMLEditor::CreateStyleForInsertText() failed");
return rv;
}
caretRange = SelectionRef().GetRangeAt(0);
if (NS_WARN_IF(!caretRange)) {
return NS_ERROR_EDITOR_UNEXPECTED_DOM_TREE;
}
EditorDOMPoint pointToInsert(caretRange->StartRef());
if (NS_WARN_IF(!pointToInsert.IsSet()) ||
NS_WARN_IF(!pointToInsert.IsInContentNode())) {
return NS_ERROR_EDITOR_UNEXPECTED_DOM_TREE;
}
MOZ_ASSERT(pointToInsert.IsSetAndValid());
MOZ_ASSERT_IF(
!pointToInsert.IsInTextNode(),
HTMLEditUtils::CanNodeContain(*pointToInsert.ContainerAsContent(),
*nsGkAtoms::textTagName));
RefPtr<Document> document = GetDocument();
MOZ_ASSERT(document);
if (NS_WARN_IF(!document)) {
return NS_ERROR_FAILURE;
}
AutoRestore<bool> disableListener(
EditSubActionDataRef().mAdjustChangedRangeFromListener);
EditSubActionDataRef().mAdjustChangedRangeFromListener = false;
AutoTransactionsConserveSelection dontChangeMySelection(*this);
EditorRawDOMPoint caretAfterInsert;
{
AutoTrackDOMPoint trackingInsertingPosition(RangeUpdaterRef(),
&pointToInsert);
nsresult rv = InsertTextWithTransaction(*document, u"\n"_ns, pointToInsert,
&caretAfterInsert);
if (NS_FAILED(rv)) {
NS_WARNING("HTMLEditor::InsertTextWithTransaction() failed");
return rv;
}
}
// Insert a padding <br> element at the end of the block element if there is
// no content between the inserted linefeed and the following block boundary
// to make sure that the last line is visible.
// XXX Blink/WebKit inserts another linefeed character in this case. However,
// for doing it, we need more work, e.g., updating serializer, deleting
// unnecessary padding <br> element at modifying the last line.
if (caretAfterInsert.IsInContentNode() &&
caretAfterInsert.IsEndOfContainer()) {
WSRunScanner wsScannerAtCaret(&aEditingHost, caretAfterInsert);
if (wsScannerAtCaret.StartsFromPreformattedLineBreak() &&
wsScannerAtCaret.EndsByBlockBoundary() &&
HTMLEditUtils::CanNodeContain(*wsScannerAtCaret.GetEndReasonContent(),
*nsGkAtoms::br)) {
EditorDOMPoint newCaretPosition(caretAfterInsert);
{
AutoTrackDOMPoint trackingInsertedPosition(RangeUpdaterRef(),
&pointToInsert);
AutoTrackDOMPoint trackingNewCaretPosition(RangeUpdaterRef(),
&newCaretPosition);
Result<RefPtr<Element>, nsresult> resultOfInsertingBRElement =
InsertBRElementWithTransaction(newCaretPosition,
nsIEditor::ePrevious);
if (resultOfInsertingBRElement.isErr()) {
NS_WARNING("HTMLEditor::InsertBRElementWithTransaction() failed");
return resultOfInsertingBRElement.unwrapErr();
}
MOZ_ASSERT(resultOfInsertingBRElement.inspect());
}
caretAfterInsert = newCaretPosition;
}
}
IgnoredErrorResult ignoredError;
SelectionRef().SetInterlinePosition(false, ignoredError);
NS_WARNING_ASSERTION(!ignoredError.Failed(),
"Failed to unset interline position, but ignored");
// manually update the doc changed range so that AfterEdit will clean up
// the correct portion of the document.
if (!caretAfterInsert.IsSet()) {
if (NS_FAILED(TopLevelEditSubActionDataRef().mChangedRange->CollapseTo(
pointToInsert))) {
NS_WARNING("nsRange::CollapseTo() failed");
return NS_ERROR_FAILURE;
}
}
if (NS_FAILED(TopLevelEditSubActionDataRef().mChangedRange->SetStartAndEnd(
pointToInsert.ToRawRangeBoundary(),
caretAfterInsert.ToRawRangeBoundary()))) {
NS_WARNING("nsRange::SetStartAndEnd() failed");
return NS_ERROR_FAILURE;
}
rv = CollapseSelectionTo(caretAfterInsert);
if (NS_FAILED(rv)) {
NS_WARNING("HTMLEditor::CollapseSelectionTo() failed");
return rv;
}
return NS_OK;
}
EditActionResult HTMLEditor::SplitMailCiteElements(
const EditorDOMPoint& aPointToSplit) {
MOZ_ASSERT(IsEditActionDataAvailable());

Просмотреть файл

@ -22,11 +22,12 @@
#include "nsAString.h" // for nsAString::IsEmpty
#include "nsAtom.h" // for nsAtom
#include "nsCaseTreatment.h"
#include "nsCOMPtr.h" // for nsCOMPtr, operator==, etc.
#include "nsDebug.h" // for NS_ASSERTION, etc.
#include "nsElementTable.h" // for nsHTMLElement
#include "nsError.h" // for NS_SUCCEEDED
#include "nsGkAtoms.h" // for nsGkAtoms, nsGkAtoms::a, etc.
#include "nsCOMPtr.h" // for nsCOMPtr, operator==, etc.
#include "nsComputedDOMStyle.h" // for nsComputedDOMStyle
#include "nsDebug.h" // for NS_ASSERTION, etc.
#include "nsElementTable.h" // for nsHTMLElement
#include "nsError.h" // for NS_SUCCEEDED
#include "nsGkAtoms.h" // for nsGkAtoms, nsGkAtoms::a, etc.
#include "nsHTMLTags.h"
#include "nsLiteralString.h" // for NS_LITERAL_STRING
#include "nsNameSpaceManager.h" // for kNameSpaceID_None
@ -158,6 +159,16 @@ bool HTMLEditUtils::IsInlineStyle(nsINode* aNode) {
nsGkAtoms::sup, nsGkAtoms::font);
}
bool HTMLEditUtils::IsDisplayOutsideInline(const Element& aElement) {
RefPtr<ComputedStyle> elementStyle =
nsComputedDOMStyle::GetComputedStyleNoFlush(&aElement);
if (!elementStyle) {
return false;
}
return elementStyle->StyleDisplay()->DisplayOutside() ==
StyleDisplayOutside::Inline;
}
bool HTMLEditUtils::IsRemovableInlineStyleElement(Element& aElement) {
if (!aElement.IsHTMLElement()) {
return false;

Просмотреть файл

@ -151,6 +151,13 @@ class HTMLEditUtils final {
}
static bool IsInlineStyle(nsINode* aNode);
/**
* IsDisplayOutsideInline() returns true if display-outside value is
* "inside". This does NOT flush the layout.
*/
static bool IsDisplayOutsideInline(const Element& aElement);
/**
* IsRemovableInlineStyleElement() returns true if aElement is an inline
* element and can be removed or split to in order to modifying inline

Просмотреть файл

@ -1126,18 +1126,27 @@ class HTMLEditor final : public EditorBase,
SplitMailCiteElements(const EditorDOMPoint& aPointToSplit);
/**
* InsertBRElement() inserts a <br> element into aInsertToBreak.
* HandleInsertBRElement() inserts a <br> element into aInsertToBreak.
* This may split container elements at the point and/or may move following
* <br> element to immediately after the new <br> element if necessary.
* XXX This method name is too generic and unclear whether such complicated
* things will be done automatically or not.
* XXX This modifies Selection, but should return CreateElementResult instead.
*
* @param aInsertToBreak The point where new <br> element will be
* inserted before.
* @param aEditingHost Current active editing host.
*/
[[nodiscard]] MOZ_CAN_RUN_SCRIPT nsresult
InsertBRElement(const EditorDOMPoint& aInsertToBreak);
[[nodiscard]] MOZ_CAN_RUN_SCRIPT nsresult HandleInsertBRElement(
const EditorDOMPoint& aInsertToBreak, Element& aEditingHost);
/**
* HandleInsertLinefeed() inserts a linefeed character into aInsertToBreak.
*
* @param aInsertToBreak The point where new linefeed character will be
* inserted before.
* @param aEditingHost Current active editing host.
*/
[[nodiscard]] MOZ_CAN_RUN_SCRIPT nsresult HandleInsertLinefeed(
const EditorDOMPoint& aInsertToBreak, Element& aEditingHost);
/**
* SplitParentInlineElementsAtRangeEdges() splits parent inline nodes at both

Просмотреть файл

@ -1,19 +1,7 @@
[insertparagraph-with-white-space-style.tentative.html?white-space=pre-line&command=insertParagraph]
[<div contenteditable style="white-space:pre-line; display:inline">abc[\]</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline">[\]abc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline">a[\]bc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline">abc[\]</div> (defaultparagraphseparator: div) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline"><b>abc[\]</b></div> (defaultparagraphseparator: div) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline; white-space:pre-line">abc[\]</div></div> (defaultparagraphseparator: div)]
expected: FAIL
@ -32,21 +20,9 @@
[<div contenteditable><p style="display:inline; white-space:pre-line">a[\]bc</p></div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">abc[\]</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">[\]abc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">a[\]bc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">abc[\]</div> (defaultparagraphseparator: div) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block"><b>abc[\]</b></div> (defaultparagraphseparator: div) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline-block; white-space:pre-line">abc[\]</div></div> (defaultparagraphseparator: div)]
expected: FAIL
@ -65,21 +41,9 @@
[<div contenteditable><p style="display:inline-block; white-space:pre-line">a[\]bc</p></div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline">abc[\]</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline">[\]abc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline">a[\]bc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline">abc[\]</div> (defaultparagraphseparator: p) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline"><b>abc[\]</b></div> (defaultparagraphseparator: p) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline; white-space:pre-line">abc[\]</div></div> (defaultparagraphseparator: p)]
expected: FAIL
@ -98,21 +62,9 @@
[<div contenteditable><p style="display:inline; white-space:pre-line">a[\]bc</p></div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">abc[\]</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">[\]abc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">a[\]bc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block">abc[\]</div> (defaultparagraphseparator: p) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-line; display:inline-block"><b>abc[\]</b></div> (defaultparagraphseparator: p) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline-block; white-space:pre-line">abc[\]</div></div> (defaultparagraphseparator: p)]
expected: FAIL
@ -133,21 +85,9 @@
[insertparagraph-with-white-space-style.tentative.html?white-space=pre&command=insertParagraph]
[<div contenteditable style="white-space:pre; display:inline">abc[\]</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline">[\]abc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline">a[\]bc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline">abc[\]</div> (defaultparagraphseparator: div) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline"><b>abc[\]</b></div> (defaultparagraphseparator: div) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline; white-space:pre">abc[\]</div></div> (defaultparagraphseparator: div)]
expected: FAIL
@ -166,21 +106,9 @@
[<div contenteditable><p style="display:inline; white-space:pre">a[\]bc</p></div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">abc[\]</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">[\]abc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">a[\]bc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">abc[\]</div> (defaultparagraphseparator: div) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block"><b>abc[\]</b></div> (defaultparagraphseparator: div) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline-block; white-space:pre">abc[\]</div></div> (defaultparagraphseparator: div)]
expected: FAIL
@ -199,21 +127,9 @@
[<div contenteditable><p style="display:inline-block; white-space:pre">a[\]bc</p></div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline">abc[\]</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline">[\]abc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline">a[\]bc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline">abc[\]</div> (defaultparagraphseparator: p) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline"><b>abc[\]</b></div> (defaultparagraphseparator: p) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline; white-space:pre">abc[\]</div></div> (defaultparagraphseparator: p)]
expected: FAIL
@ -232,21 +148,9 @@
[<div contenteditable><p style="display:inline; white-space:pre">a[\]bc</p></div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">abc[\]</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">[\]abc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">a[\]bc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block">abc[\]</div> (defaultparagraphseparator: p) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre; display:inline-block"><b>abc[\]</b></div> (defaultparagraphseparator: p) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline-block; white-space:pre">abc[\]</div></div> (defaultparagraphseparator: p)]
expected: FAIL
@ -267,21 +171,9 @@
[insertparagraph-with-white-space-style.tentative.html?white-space=pre-wrap&command=insertParagraph]
[<div contenteditable style="white-space:pre-wrap; display:inline">abc[\]</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline">[\]abc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline">a[\]bc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline">abc[\]</div> (defaultparagraphseparator: div) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline"><b>abc[\]</b></div> (defaultparagraphseparator: div) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline; white-space:pre-wrap">abc[\]</div></div> (defaultparagraphseparator: div)]
expected: FAIL
@ -300,21 +192,9 @@
[<div contenteditable><p style="display:inline; white-space:pre-wrap">a[\]bc</p></div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">abc[\]</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">[\]abc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">a[\]bc</div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">abc[\]</div> (defaultparagraphseparator: div) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block"><b>abc[\]</b></div> (defaultparagraphseparator: div) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline-block; white-space:pre-wrap">abc[\]</div></div> (defaultparagraphseparator: div)]
expected: FAIL
@ -333,21 +213,9 @@
[<div contenteditable><p style="display:inline-block; white-space:pre-wrap">a[\]bc</p></div> (defaultparagraphseparator: div)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline">abc[\]</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline">[\]abc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline">a[\]bc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline">abc[\]</div> (defaultparagraphseparator: p) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline"><b>abc[\]</b></div> (defaultparagraphseparator: p) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline; white-space:pre-wrap">abc[\]</div></div> (defaultparagraphseparator: p)]
expected: FAIL
@ -366,21 +234,9 @@
[<div contenteditable><p style="display:inline; white-space:pre-wrap">a[\]bc</p></div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">abc[\]</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">[\]abc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">a[\]bc</div> (defaultparagraphseparator: p)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block">abc[\]</div> (defaultparagraphseparator: p) (preserving temporary inline style test)]
expected: FAIL
[<div contenteditable style="white-space:pre-wrap; display:inline-block"><b>abc[\]</b></div> (defaultparagraphseparator: p) (preserving inline style test)]
expected: FAIL
[<div contenteditable><div style="display:inline-block; white-space:pre-wrap">abc[\]</div></div> (defaultparagraphseparator: p)]
expected: FAIL