gecko-dev/editor/libeditor
Masayuki Nakano db70f10b72 Bug 1803044 - part 9: Make the style editor use existing inline element in the CSS mode as far as possible r=m_kato
The other browsers use any inline elements to set CSS property for applying
an inline style.  However, Gecko limits it to a `<span>` which does not have
any attributes.  The other browsers' design is better for saving number of
elements and runtime cost of inserting new element (moving all children to the
new element and inserting it to the original position).  Therefore, it's nicer
to follow the other browses.  Then, we can avoid new WPT failures at aligning
other behaviors to the other browsers.

With doing that, removing style code requires complicated changes because
`RemoveStyleInside` assumes that one element has one style, but after taking
the compatible behavior, one element can have multiple styles including the
style represented by the element itself.

Note that the new expected failures are caused by bug 1183844. Gecko returns
closest ancestor element's background color for
`queryCommandValue("backColor")`.  Therefore, it returns "transparent" of the
inner `<span>` element.

Differential Revision: https://phabricator.services.mozilla.com/D164004
2022-12-13 03:37:38 +00:00
..
crashtests Bug 1792502 - Correct the emulation in crashtests for bug 1789967 r=m_kato 2022-10-02 00:03:36 +00:00
tests Bug 1803044 - part 9: Make the style editor use existing inline element in the CSS mode as far as possible r=m_kato 2022-12-13 03:37:38 +00:00
AutoRangeArray.cpp Bug 1793694 - part 3: Move definitions of `JoinNodesDirection` and `SplitNodeDirection` into a new exposed header file r=m_kato 2022-10-12 02:44:18 +00:00
AutoRangeArray.h Bug 1775381 - Move `AutoRangeArray` from `EditorUtils.h` to its own header and cpp file r=m_kato 2022-08-04 05:39:16 +00:00
CSSEditUtils.cpp Bug 1803044 - part 2: Improve `HTMLEditUtils::ElementHasAttributeExcept` r=m_kato 2022-12-13 01:09:43 +00:00
CSSEditUtils.h Bug 1801028 - part 18: Make `CSSEditUtils::GenerateCSSDeclarationsFromHTMLStyle` take `EditorElementStyle` r=m_kato 2022-11-25 12:57:26 +00:00
ChangeAttributeTransaction.cpp
ChangeAttributeTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
ChangeStyleTransaction.cpp Bug 1802831 - Make `AutoInlineStyleSetter` align setting `text-decoration` style behavior in the CSS mode to the other browsers r=m_kato 2022-12-02 22:50:56 +00:00
ChangeStyleTransaction.h Bug 1802831 - Make `AutoInlineStyleSetter` align setting `text-decoration` style behavior in the CSS mode to the other browsers r=m_kato 2022-12-02 22:50:56 +00:00
CompositionTransaction.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of `EditorDOMPointBase` templated r=m_kato 2022-08-09 01:43:24 +00:00
CompositionTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
DeleteNodeTransaction.cpp
DeleteNodeTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
DeleteRangeTransaction.cpp Bug 1800043: Fixed condition to determine end of selected string. r=masayuki 2022-11-11 13:04:54 +00:00
DeleteRangeTransaction.h Bug 1797026 - Make `DeleteRangeTransaction::DoTransaction` extend the range to delete to contain parent nodes which will be empty r=m_kato 2022-10-28 11:07:37 +00:00
DeleteTextTransaction.cpp Bug 1764684 - part 2: Make editor use methods of `EditorBase` to collapse `Selection` r=m_kato 2022-04-20 14:36:52 +00:00
DeleteTextTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
EditAction.h Bug 1770877 - part 21: Get rid of `HTMLEditor::SplitInlinesAndCollectEditTargetNodes` r=m_kato 2022-06-21 01:07:10 +00:00
EditAggregateTransaction.cpp
EditAggregateTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
EditTransactionBase.cpp Bug 1794811, part 1 - Include nsISupports.h instead of nsISupportsBase.h. r=necko-reviewers,nika,valentin 2022-10-17 16:09:22 +00:00
EditTransactionBase.h Bug 1766355 - part 1: Add `MoveNodeTransaction` to handle delete node and insert node in a transaction class instance r=m_kato 2022-05-20 08:28:08 +00:00
EditorBase.cpp Bug 1803044 - part 3: Make `EditorBase::RemoveAttributeWithTransaction` stop creating transaction if the element does not have the removing attribute r=m_kato 2022-12-13 01:17:11 +00:00
EditorBase.h Bug 1803044 - part 3: Make `EditorBase::RemoveAttributeWithTransaction` stop creating transaction if the element does not have the removing attribute r=m_kato 2022-12-13 01:17:11 +00:00
EditorCommands.cpp
EditorCommands.h Bug 1784192 - part 1: Change `PropItem::tag` to `nsStaticAtom*` r=m_kato 2022-08-26 03:10:30 +00:00
EditorController.cpp
EditorController.h
EditorDOMPoint.h Bug 1793873 - Make `HTMLEditor::DoSplitNode` stop assuming that joining nodes are in same parent r=m_kato 2022-10-14 02:49:13 +00:00
EditorEventListener.cpp Bug 1793694 - part 6: Stop exposting `EditorUtils.h` r=m_kato 2022-10-12 02:44:20 +00:00
EditorEventListener.h Bug 1770874 - part 6: Move most part of `EditorEventListener::Blur` into `EditorBase` r=m_kato 2022-05-27 04:02:30 +00:00
EditorForwards.h Bug 1801028 - part 14: Make `CSSEditUtils::SetCSSEquivalentToHTMLStyle(With|Without)Transaction` take `EditorElementStyle` r=m_kato 2022-11-25 09:04:35 +00:00
EditorUtils.cpp Bug 1793694 - part 5: Move `EditorUtils::MaskString` to `TextEditor` r=m_kato 2022-10-12 02:44:19 +00:00
EditorUtils.h Bug 1793865 - Make `HTMLEditor::HandleOutdentAtSelectionInternal` not return caret point suggestion r=m_kato 2022-10-18 06:48:45 +00:00
HTMLAbsPositionEditor.cpp Bug 1801028 - part 14: Make `CSSEditUtils::SetCSSEquivalentToHTMLStyle(With|Without)Transaction` take `EditorElementStyle` r=m_kato 2022-11-25 09:04:35 +00:00
HTMLAnonymousNodeEditor.cpp Bug 1793485: Fixed memory issue in `NodeWillBeDestroyed()` for `MultiMutationObserver` classes. r=smaug 2022-10-13 14:26:07 +00:00
HTMLEditHelpers.cpp Bug 1803044 - part 9: Make the style editor use existing inline element in the CSS mode as far as possible r=m_kato 2022-12-13 03:37:38 +00:00
HTMLEditHelpers.h Bug 1803044 - part 9: Make the style editor use existing inline element in the CSS mode as far as possible r=m_kato 2022-12-13 03:37:38 +00:00
HTMLEditSubActionHandler.cpp Bug 1803044 - part 3: Make `EditorBase::RemoveAttributeWithTransaction` stop creating transaction if the element does not have the removing attribute r=m_kato 2022-12-13 01:17:11 +00:00
HTMLEditUtils.cpp Bug 1803044 - part 2: Improve `HTMLEditUtils::ElementHasAttributeExcept` r=m_kato 2022-12-13 01:09:43 +00:00
HTMLEditUtils.h Bug 1803044 - part 2: Improve `HTMLEditUtils::ElementHasAttributeExcept` r=m_kato 2022-12-13 01:09:43 +00:00
HTMLEditor.cpp Bug 1803044 - part 4: Make `HTMLEditor::SetAttributeOrEquivalent` insert a white-space only when old value is empty r=m_kato 2022-12-13 01:48:51 +00:00
HTMLEditor.h Bug 1802402 - Group the inline style setter methods into stack only class r=m_kato 2022-11-28 11:13:02 +00:00
HTMLEditorCommands.cpp Bug 1784192 - part 1: Change `PropItem::tag` to `nsStaticAtom*` r=m_kato 2022-08-26 03:10:30 +00:00
HTMLEditorController.cpp
HTMLEditorController.h
HTMLEditorDataTransfer.cpp Bug 1801028 - part 4: Make `HTMLEditor::ClearStyleAt` take `EditorInlineStyle` r=m_kato 2022-11-25 02:15:51 +00:00
HTMLEditorDeleteHandler.cpp Bug 1699256 - Make `AutoEmptyBlockAncestorDeleter::GetNewCaretPosition` always return a valid point if succeeded r=m_kato 2022-10-21 05:59:34 +00:00
HTMLEditorDocumentCommands.cpp
HTMLEditorEventListener.cpp
HTMLEditorEventListener.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
HTMLEditorInlines.h Bug 1795061 - Stop exposing `JoinSplitNodeDirection.h` r=m_kato 2022-10-19 06:40:30 +00:00
HTMLEditorNestedClasses.h Bug 1803044 - part 9: Make the style editor use existing inline element in the CSS mode as far as possible r=m_kato 2022-12-13 03:37:38 +00:00
HTMLEditorObjectResizer.cpp Bug 1803044 - part 3: Make `EditorBase::RemoveAttributeWithTransaction` stop creating transaction if the element does not have the removing attribute r=m_kato 2022-12-13 01:17:11 +00:00
HTMLEditorState.cpp Bug 1801028 - part 17: Make `CSSEditUtils::IsCSSEditableProperty` take `EditorElementStyle` r=m_kato 2022-11-25 09:29:07 +00:00
HTMLInlineTableEditor.cpp Bug 1771448 - part 4: Rename `HTMLEditor::GetActiveEditingHost` to `ComputeEditingHost` r=m_kato 2022-05-31 03:41:01 +00:00
HTMLStyleEditor.cpp Bug 1803044 - part 9: Make the style editor use existing inline element in the CSS mode as far as possible r=m_kato 2022-12-13 03:37:38 +00:00
HTMLTableEditor.cpp Bug 1793694 - part 2: Move some protected inline method definitions of `HTMLEditor` to non-exposed header r=m_kato 2022-10-12 02:44:18 +00:00
InsertNodeTransaction.cpp Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika 2022-09-28 15:17:46 +00:00
InsertNodeTransaction.h Bug 1762115 - part 2: Make `InsertNodeTransaction::DoTransaction()` stop touching `Selection` directly r=m_kato 2022-05-02 23:17:18 +00:00
InsertTextTransaction.cpp Bug 1783402 - part 3: Make result of unsafe getter methods of `EditorDOMPointBase` templated r=m_kato 2022-08-09 01:43:24 +00:00
InsertTextTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
InternetCiter.cpp
InternetCiter.h
JoinNodesTransaction.cpp Bug 1795061 - Stop exposing `JoinSplitNodeDirection.h` r=m_kato 2022-10-19 06:40:30 +00:00
JoinNodesTransaction.h Bug 1774114 - Make `HTMLEditor` and its helper classes get split/join node direction dynamically r=m_kato 2022-07-01 02:02:03 +00:00
JoinSplitNodeDirection.h Bug 1795061 - Stop exposing `JoinSplitNodeDirection.h` r=m_kato 2022-10-19 06:40:30 +00:00
ManualNAC.h
MoveNodeTransaction.cpp Bug 1789344 - Make `SelectionState::DidMoveNode` track DOM points having pointed the moved content correctly r=m_kato 2022-09-12 23:53:37 +00:00
MoveNodeTransaction.h Bug 1766355 - part 4: Make `HTMLEditor::MoveNodeWithTransaction` and `HTMLEditor::MoveNodeToEndWithTransaction` return `MoveNodeResult` r=m_kato 2022-05-20 08:28:09 +00:00
PendingStyles.cpp Bug 1801028 - part 8: Make `HTMLEditor::SetInlinePropertyOnNode` and `HTMLEditor::SetInlinePropertyOnNodeImpl` take `EditorInlineStyleAndValue` r=m_kato 2022-11-25 05:20:49 +00:00
PendingStyles.h Bug 1801028 - part 11: Make `CSSEditUtils::Is(Computed|Specified)CSSEquivalentToHTMLInlineStyleSet` take `EditorInlineStyle` r=m_kato 2022-11-25 06:43:51 +00:00
PlaceholderTransaction.cpp Bug 1766956 - part 2: Make `PlaceholderTransaction::Merge` return `false` if the caret points of merging transactions are in different root nodes r=m_kato 2022-05-09 04:55:42 +00:00
PlaceholderTransaction.h Bug 1766956 - part 1: Make `PlaceholderTransaction::StartSelectionEquals` call `SelectionState::Equals` only when both selection caches store caret positions r=m_kato 2022-05-09 04:55:42 +00:00
ReplaceTextTransaction.cpp Bug 1764684 - part 2: Make editor use methods of `EditorBase` to collapse `Selection` r=m_kato 2022-04-20 14:36:52 +00:00
ReplaceTextTransaction.h Bug 1764866 - Add "mozilla/EditorForwards.h" r=m_kato 2022-04-20 14:46:16 +00:00
SelectionState.cpp Bug 1793873 - Make `HTMLEditor::DoSplitNode` stop assuming that joining nodes are in same parent r=m_kato 2022-10-14 02:49:13 +00:00
SelectionState.h Bug 1793873 - Make `HTMLEditor::DoSplitNode` stop assuming that joining nodes are in same parent r=m_kato 2022-10-14 02:49:13 +00:00
SplitNodeTransaction.cpp Bug 1795061 - Stop exposing `JoinSplitNodeDirection.h` r=m_kato 2022-10-19 06:40:30 +00:00
SplitNodeTransaction.h Bug 1792642 - Make `SplitNodeResult` treated as ok type of `Result` r=m_kato 2022-10-04 07:28:10 +00:00
TextEditSubActionHandler.cpp Bug 1794811, part 1 - Include nsISupports.h instead of nsISupportsBase.h. r=necko-reviewers,nika,valentin 2022-10-17 16:09:22 +00:00
TextEditor.cpp Bug 1793694 - part 5: Move `EditorUtils::MaskString` to `TextEditor` r=m_kato 2022-10-12 02:44:19 +00:00
TextEditor.h Bug 1793694 - part 5: Move `EditorUtils::MaskString` to `TextEditor` r=m_kato 2022-10-12 02:44:19 +00:00
TextEditorDataTransfer.cpp Bug 1793694 - part 6: Stop exposting `EditorUtils.h` r=m_kato 2022-10-12 02:44:20 +00:00
WSRunObject.cpp Bug 1801028 - part 14: Make `CSSEditUtils::SetCSSEquivalentToHTMLStyle(With|Without)Transaction` take `EditorElementStyle` r=m_kato 2022-11-25 09:04:35 +00:00
WSRunObject.h Bug 1791501 - Use `EditActionResult` as ok type of `mozilla::Result` r=m_kato 2022-09-28 07:21:37 +00:00
moz.build Bug 1795061 - Stop exposing `JoinSplitNodeDirection.h` r=m_kato 2022-10-19 06:40:30 +00:00