Issue #2106 - Clean-up: Un-prefix -moz-user-select in Comments

This commit is contained in:
Andy 2025-07-07 10:46:13 -07:00 • committed by roytam1
commit b11affbdf3
7 changed files with 15 additions and 15 deletions

View file

@ -139,7 +139,7 @@ public:
/** /**
* Mark this range as being generated or not. * Mark this range as being generated or not.
* Currently it is used for marking ranges that are created when splitting up * Currently it is used for marking ranges that are created when splitting up
* a range to exclude a -moz-user-select:none region. * a range to exclude a user-select:none region.
* @see Selection::AddItem * @see Selection::AddItem
* @see ExcludeNonSelectableNodes * @see ExcludeNonSelectableNodes
*/ */
@ -354,13 +354,13 @@ public:
bool aClampToEdge, bool aFlushLayout); bool aClampToEdge, bool aFlushLayout);
/** /**
* Scan this range for -moz-user-select:none nodes and split it up into * Scan this range for user-select:none nodes and split it up into
* multiple ranges to exclude those nodes. The resulting ranges are put * multiple ranges to exclude those nodes. The resulting ranges are put
* in aOutRanges. If no -moz-user-select:none node is found in the range * in aOutRanges. If no user-select:none node is found in the range
* then |this| is unmodified and is the only range in aOutRanges. * then |this| is unmodified and is the only range in aOutRanges.
* Otherwise, |this| will be modified so that it ends before the first * Otherwise, |this| will be modified so that it ends before the first
* -moz-user-select:none node and additional ranges may also be created. * user-select:none node and additional ranges may also be created.
* If all nodes in the range are -moz-user-select:none then aOutRanges * If all nodes in the range are user-select:none then aOutRanges
* will be empty. * will be empty.
* @param aOutRanges the resulting set of ranges * @param aOutRanges the resulting set of ranges
*/ */

View file

@ -1,7 +1,7 @@
<!DOCTYPE> <!DOCTYPE>
<html> <html>
<head> <head>
<title>-moz-user-select selection tests</title> <title>user-select selection tests</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script> <script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script> <script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
@ -249,7 +249,7 @@ function test()
// ================== shift+click tests ================= // ================== shift+click tests =================
// ====================================================== // ======================================================
// test extending a selection that starts in a -moz-user-select:none node // test extending a selection that starts in a user-select:none node
clear(); clear();
e = document.getElementById('test2'); e = document.getElementById('test2');
init([[0,0,0,1]], e); init([[0,0,0,1]], e);
@ -261,7 +261,7 @@ function test()
checkRanges([[-1,1,1,10]], e); checkRanges([[-1,1,1,10]], e);
doneTest(e); doneTest(e);
// test extending a selection that end in a -moz-user-select:none node // test extending a selection that end in a user-select:none node
clear(); clear();
e = document.getElementById('test3'); e = document.getElementById('test3');
init([[1,0,1,1]], e); init([[1,0,1,1]], e);

View file

@ -233,7 +233,7 @@ TextEditor::InsertFromDrop(nsIDOMEvent* aDropEvent)
// Only the HTMLEditor::FindUserSelectAllNode returns a node. // Only the HTMLEditor::FindUserSelectAllNode returns a node.
nsCOMPtr<nsIDOMNode> userSelectNode = FindUserSelectAllNode(newSelectionParent); nsCOMPtr<nsIDOMNode> userSelectNode = FindUserSelectAllNode(newSelectionParent);
if (userSelectNode) { if (userSelectNode) {
// The drop is happening over a "-moz-user-select: all" // The drop is happening over a "user-select: all"
// subtree so make sure the content we insert goes before // subtree so make sure the content we insert goes before
// the root of the subtree. // the root of the subtree.
// //

View file

@ -44,7 +44,7 @@ interface nsIContentFilter : nsISupports
* approximation since the editor may need to adjust it if it deletes * approximation since the editor may need to adjust it if it deletes
* the selection as part of the event and later determines that insertion * the selection as part of the event and later determines that insertion
* point is an empty container which should also be removed (or in other * point is an empty container which should also be removed (or in other
* scenarios such as -moz-user-select:none). * scenarios such as user-select:none).
* *
* In some scenarios the selection will be deleted. If callers choose * In some scenarios the selection will be deleted. If callers choose
* to adjust the insertion point, they should be careful that the insertion * to adjust the insertion point, they should be careful that the insertion

View file

@ -123,7 +123,7 @@ public:
nsTArray<RangeData>* aOutput); nsTArray<RangeData>* aOutput);
/** /**
* AddItem adds aRange to this Selection. If mUserInitiated is true, * AddItem adds aRange to this Selection. If mUserInitiated is true,
* then aRange is first scanned for -moz-user-select:none nodes and split up * then aRange is first scanned for user-select:none nodes and split up
* into multiple ranges to exclude those before adding the resulting ranges * into multiple ranges to exclude those before adding the resulting ranges
* to this Selection. * to this Selection.
*/ */
@ -425,7 +425,7 @@ private:
SelectionType mSelectionType; SelectionType mSelectionType;
/** /**
* True if the current selection operation was initiated by user action. * True if the current selection operation was initiated by user action.
* It determines whether we exclude -moz-user-select:none nodes or not, * It determines whether we exclude user-select:none nodes or not,
* as well as whether selectstart events will be fired. * as well as whether selectstart events will be fired.
*/ */
bool mUserInitiated; bool mUserInitiated;

View file

@ -3443,7 +3443,7 @@ nsFrame::HandlePress(nsPresContext* aPresContext,
{ {
// A single node is selected and we aren't extending an existing // A single node is selected and we aren't extending an existing
// selection, which means the user clicked directly on an object (either // selection, which means the user clicked directly on an object (either
// -moz-user-select: all or a non-text node without children). // user-select: all or a non-text node without children).
// Therefore, disable selection extension during mouse moves. // Therefore, disable selection extension during mouse moves.
// XXX This is a bit hacky; shouldn't editor be able to deal with this? // XXX This is a bit hacky; shouldn't editor be able to deal with this?
fc->SetDragState(false); fc->SetDragState(false);
@ -4251,7 +4251,7 @@ nsIFrame::ContentOffsets nsIFrame::GetContentOffsetsFromPoint(nsPoint aPoint,
adjustedFrame = AdjustFrameForSelectionStyles(this); adjustedFrame = AdjustFrameForSelectionStyles(this);
// -moz-user-select: all needs special handling, because clicking on it // user-select: all needs special handling, because clicking on it
// should lead to the whole frame being selected // should lead to the whole frame being selected
if (adjustedFrame && adjustedFrame->StyleUIReset()->mUserSelect == if (adjustedFrame && adjustedFrame->StyleUIReset()->mUserSelect ==
StyleUserSelect::All) { StyleUserSelect::All) {

View file

@ -14,7 +14,7 @@
} }
*|*:read-only > :read-write { *|*:read-only > :read-write {
/* override the above -moz-user-select: all rule. */ /* override the above user-select: all rule. */
user-select: -moz-text; user-select: -moz-text;
} }