gecko-dev/editor/libeditor
Masayuki Nakano 43a805714a Bug 1930277 - Make nsHTMLCopyEncoder::RangeNodeContext::IncludeInContext not treat inline editing host as an contextual inline element r=edgar,dom-core
It treats some inline elements as contextual elements.  Then, they will be
preserved in copied HTML fragment.  However, if an inline element is an editing
host, we don't want to contain it to the copied fragment because pasting it
causes duplicating same style into same editing host.  So, if the style includes
relative style like `font-size: 2em`, it will cause bigger text than the
surrounding text.  Additionally, the inline editing host usually has a border
but we don't want to make it appear in editable text.

Unfortunately, with this change, we stop copying the text style specified to
the inline editing host.  However, this is same behavior as when the editing
host is a block element like `<div>`.  Note that pasted text will be merged into
the inline editing host style.  Therefore, if and only if the destination has
different style from the editing host, the result might be different from the
expected one by the user.  However, this is a long standing issue, see
bug 1428046, for example.

Differential Revision: https://phabricator.services.mozilla.com/D228623
2024-11-20 04:35:32 +00:00
..
crashtests Bug 1914513 - Add a pref to disable mutation events, r=masayuki 2024-09-02 13:29:57 +00:00
tests Bug 1930277 - Make nsHTMLCopyEncoder::RangeNodeContext::IncludeInContext not treat inline editing host as an contextual inline element r=edgar,dom-core 2024-11-20 04:35:32 +00:00
AutoRangeArray.cpp Bug 1930050 - Make AutoRangeArray check the container type r=m_kato 2024-11-13 08:17:03 +00:00
AutoRangeArray.h
AutoSelectionRestorer.cpp Bug 1149826 - Part 1. Add eContentCommandReplaceText. r=masayuki 2024-07-26 06:38:52 +00:00
AutoSelectionRestorer.h Bug 1149826 - Part 1. Add eContentCommandReplaceText. r=masayuki 2024-07-26 06:38:52 +00:00
ChangeAttributeTransaction.cpp
ChangeAttributeTransaction.h
ChangeStyleTransaction.cpp
ChangeStyleTransaction.h
CompositionTransaction.cpp Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang 2024-10-28 08:21:19 +00:00
CompositionTransaction.h
CSSEditUtils.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato 2024-07-17 11:15:31 +00:00
CSSEditUtils.h
DeleteContentTransactionBase.cpp
DeleteContentTransactionBase.h
DeleteMultipleRangesTransaction.cpp
DeleteMultipleRangesTransaction.h
DeleteNodeTransaction.cpp
DeleteNodeTransaction.h
DeleteRangeTransaction.cpp
DeleteRangeTransaction.h
DeleteTextTransaction.cpp
DeleteTextTransaction.h
EditAction.h
EditAggregateTransaction.cpp
EditAggregateTransaction.h
EditorBase.cpp Bug 1388910 - Remove -moz-user-modify property. r=dshin 2024-11-19 19:35:35 +00:00
EditorBase.h Bug 1809713 - Use ClipboardType in editor. r=masayuki 2024-07-29 11:52:33 +00:00
EditorCommands.cpp Backed out 2 changesets (bug 1862256) for causing mochitests failures in test_native_key_bindings_mac.html. CLOSED TREE 2024-11-07 14:31:58 +02:00
EditorCommands.h Backed out 2 changesets (bug 1862256) for causing mochitests failures in test_native_key_bindings_mac.html. CLOSED TREE 2024-11-07 14:31:58 +02:00
EditorController.cpp Backed out 2 changesets (bug 1862256) for causing mochitests failures in test_native_key_bindings_mac.html. CLOSED TREE 2024-11-07 14:31:58 +02:00
EditorController.h
EditorDOMPoint.h Bug 1930050 - Make AutoRangeArray check the container type r=m_kato 2024-11-13 08:17:03 +00:00
EditorEventListener.cpp Bug 1909577 - Make some nsFocusManager::GetFocusedElement() users use its static version instead r=emilio,credential-management-reviewers,issammani 2024-07-25 00:33:58 +00:00
EditorEventListener.h Bug 1675847 - part 2: Rename some methods which handle "MouseClick" r=smaug 2024-06-14 00:18:46 +00:00
EditorForwards.h Bug 1149826 - Part 1. Add eContentCommandReplaceText. r=masayuki 2024-07-26 06:38:52 +00:00
EditorUtils.cpp Bug 1930564 - Make MoveNodeResult inherit EditActionResult r=m_kato 2024-11-14 00:56:52 +00:00
EditorUtils.h Bug 1930564 - Make MoveNodeResult inherit EditActionResult r=m_kato 2024-11-14 00:56:52 +00:00
EditTransactionBase.cpp
EditTransactionBase.h
HTMLAbsPositionEditor.cpp Bug 1929626 - Remove more uses/includes of nsAlgorithm.h r=emilio,win-reviewers,gstoll 2024-11-07 11:09:40 +00:00
HTMLAnonymousNodeEditor.cpp Bug 1914321 - Build view transition pseudo-element tree. r=view-transitions-reviewers,boris 2024-11-14 10:17:52 +00:00
HTMLEditHelpers.cpp
HTMLEditHelpers.h Bug 1930564 - Make MoveNodeResult inherit EditActionResult r=m_kato 2024-11-14 00:56:52 +00:00
HTMLEditor.cpp Bug 1920718 - Annotate all global variable with runtime initialization attributes r=glandium,application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh,geckoview-reviewers,win-reviewers,gstoll,m_kato 2024-10-30 11:05:24 +00:00
HTMLEditor.h Bug 1923251 - Backout almost all of D225038 except WPT part 2024-10-23 18:07:53 +00:00
HTMLEditorCommands.cpp Bug 1923250 - Make HTMLEditor::InsertElementAtSelectionAsAction split ancestor inline elements r=m_kato 2024-10-11 22:46:28 +00:00
HTMLEditorController.cpp
HTMLEditorController.h
HTMLEditorDataTransfer.cpp Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang 2024-10-28 08:21:19 +00:00
HTMLEditorDeleteHandler.cpp Bug 1923251 - Backout D226092 and D225039 except WPT part 2024-10-23 18:07:53 +00:00
HTMLEditorDocumentCommands.cpp
HTMLEditorEventListener.cpp Bug 1675847 - part 2: Rename some methods which handle "MouseClick" r=smaug 2024-06-14 00:18:46 +00:00
HTMLEditorEventListener.h Bug 1675847 - part 2: Rename some methods which handle "MouseClick" r=smaug 2024-06-14 00:18:46 +00:00
HTMLEditorInlines.h
HTMLEditorNestedClasses.h Bug 1906559 - Make AutoInlineStyleSetter::OnHandled() never set point in aContent if it's not a container r=m_kato 2024-08-19 00:35:33 +00:00
HTMLEditorObjectResizer.cpp Bug 1929626 - Remove more uses/includes of nsAlgorithm.h r=emilio,win-reviewers,gstoll 2024-11-07 11:09:40 +00:00
HTMLEditorState.cpp Bug 1929626 - Remove more uses/includes of nsAlgorithm.h r=emilio,win-reviewers,gstoll 2024-11-07 11:09:40 +00:00
HTMLEditSubActionHandler.cpp Bug 1929626 - Remove more uses/includes of nsAlgorithm.h r=emilio,win-reviewers,gstoll 2024-11-07 11:09:40 +00:00
HTMLEditUtils.cpp Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang 2024-10-28 08:21:19 +00:00
HTMLEditUtils.h Bug 1923251 - Backout almost all of D225038 except WPT part 2024-10-23 18:07:53 +00:00
HTMLInlineTableEditor.cpp Bug 1920647 - part 1: Make HTMLEditor won't show Gecko specific editing UI in contenteditable=plaintext-only r=m_kato 2024-10-01 04:21:54 +00:00
HTMLStyleEditor.cpp Bug 1920622 - Make the style setter public methods of HTMLEditor stop handling their jobs if the editing host is plaintext-only r=m_kato 2024-09-30 21:35:42 +00:00
HTMLTableEditor.cpp Bug 1929626 - Remove more uses/includes of nsAlgorithm.h r=emilio,win-reviewers,gstoll 2024-11-07 11:09:40 +00:00
InsertNodeTransaction.cpp
InsertNodeTransaction.h
InsertTextTransaction.cpp
InsertTextTransaction.h
InternetCiter.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato 2024-07-17 11:15:31 +00:00
InternetCiter.h
JoinNodesTransaction.cpp
JoinNodesTransaction.h
ManualNAC.h
MoveNodeTransaction.cpp
MoveNodeTransaction.h
moz.build Bug 1149826 - Part 1. Add eContentCommandReplaceText. r=masayuki 2024-07-26 06:38:52 +00:00
PendingStyles.cpp
PendingStyles.h
PlaceholderTransaction.cpp
PlaceholderTransaction.h
ReplaceTextTransaction.cpp
ReplaceTextTransaction.h
SelectionState.cpp
SelectionState.h
SplitNodeTransaction.cpp
SplitNodeTransaction.h
TextEditor.cpp Bug 1809713 - Use ClipboardType in editor. r=masayuki 2024-07-29 11:52:33 +00:00
TextEditor.h Bug 1809713 - Use ClipboardType in editor. r=masayuki 2024-07-29 11:52:33 +00:00
TextEditorDataTransfer.cpp Bug 1809713 - Use ClipboardType in editor. r=masayuki 2024-07-29 11:52:33 +00:00
TextEditSubActionHandler.cpp Bug 1923251 - Backout almost all of D225038 except WPT part 2024-10-23 18:07:53 +00:00
WSRunObject.cpp Bug 1923251 - Backout D226092 and D225039 except WPT part 2024-10-23 18:07:53 +00:00
WSRunObject.h Bug 1923251 - Backout D226092 and D225039 except WPT part 2024-10-23 18:07:53 +00:00