mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 458167 patch 6: s/it's/its/ in comments within editor. r=ehsan
This commit is contained in:
parent
8b576f4d48
commit
93fb646e10
@ -3151,7 +3151,7 @@ nsEditor::GetNextNode(nsIDOMNode *aParentNode,
|
||||
|
||||
*aResultNode = nsnull;
|
||||
|
||||
// if aParentNode is a text node, use it's location instead
|
||||
// if aParentNode is a text node, use its location instead
|
||||
if (IsTextNode(aParentNode))
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
@ -4407,7 +4407,7 @@ nsEditor::DeleteSelectionAndPrepareToCreateNode(nsCOMPtr<nsIDOMNode> &parentSele
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> newSiblingNode;
|
||||
result = SplitNode(selectedNode, offsetOfSelectedNode, getter_AddRefs(newSiblingNode));
|
||||
// now get the node's offset in it's parent, and insert the new tag there
|
||||
// now get the node's offset in its parent, and insert the new tag there
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
result = GetChildOffset(selectedNode, parentSelectedNode, offsetOfNewNode);
|
||||
}
|
||||
@ -4774,7 +4774,7 @@ nsEditor::CreateTxnForDeleteInsertionPoint(nsIDOMRange *aRange,
|
||||
nsCOMPtr<nsIDOMNode> priorNode;
|
||||
result = GetPriorNode(node, true, address_of(priorNode));
|
||||
if ((NS_SUCCEEDED(result)) && priorNode)
|
||||
{ // there is a priorNode, so delete it's last child (if text content, delete the last char.)
|
||||
{ // there is a priorNode, so delete its last child (if text content, delete the last char.)
|
||||
// if it has no children, delete it
|
||||
nsCOMPtr<nsIDOMCharacterData> priorNodeAsText = do_QueryInterface(priorNode);
|
||||
if (priorNodeAsText)
|
||||
@ -4841,7 +4841,7 @@ nsEditor::CreateTxnForDeleteInsertionPoint(nsIDOMRange *aRange,
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // nextNode is not text, so tell it's parent to delete it
|
||||
{ // nextNode is not text, so tell its parent to delete it
|
||||
nsRefPtr<DeleteElementTxn> txn;
|
||||
result = CreateTxnForDeleteElement(nextNode, getter_AddRefs(txn));
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
|
@ -1198,7 +1198,7 @@ nsHTMLEditor::ParseCFHTML(nsCString & aCfhtml, PRUnichar **aStuffToPaste, PRUnic
|
||||
nsLinebreakConverter::eLinebreakAny,
|
||||
nsLinebreakConverter::eLinebreakContent,
|
||||
oldLengthInChars, &newLengthInChars);
|
||||
// it's ok for context to be empty. frag might be whole doc and contain all it's context.
|
||||
// it's ok for context to be empty. frag might be whole doc and contain all its context.
|
||||
|
||||
// we're done!
|
||||
return NS_OK;
|
||||
@ -2817,7 +2817,7 @@ nsHTMLEditor::ReplaceOrphanedStructure(bool aEnd,
|
||||
curNode, address_of(replaceNode));
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
||||
// if we found substructure, paste it instead of it's descendants
|
||||
// if we found substructure, paste it instead of its descendants
|
||||
if (replaceNode)
|
||||
{
|
||||
// postprocess list to remove any descendants of this node
|
||||
|
@ -817,7 +817,7 @@ nsHTMLEditRules::GetAlignment(bool *aMixed, nsIHTMLEditor::EAlignment *aAlign)
|
||||
nsCOMPtr<nsISupports> isupports;
|
||||
if (bCollapsed)
|
||||
{
|
||||
// if it is, we want to look at 'parent' and it's ancestors
|
||||
// if it is, we want to look at 'parent' and its ancestors
|
||||
// for divs with alignment on them
|
||||
nodeToExamine = parent;
|
||||
}
|
||||
@ -1109,7 +1109,7 @@ nsHTMLEditRules::GetParagraphState(bool *aMixed, nsAString &outFormat)
|
||||
else if (IsBlockNode(curNode))
|
||||
{
|
||||
// this is a div or some other non-format block.
|
||||
// we should ignore it. It's children were appended to this list
|
||||
// we should ignore it. Its children were appended to this list
|
||||
// by AppendInnerFormatNodes() call above. We will get needed
|
||||
// info when we examine them instead.
|
||||
continue;
|
||||
@ -2595,7 +2595,7 @@ nsHTMLEditRules::GetGoodSelPointForNode(nsIDOMNode *aNode, nsIEditor::EDirection
|
||||
* to the left element. If the elements are the same type and not nested within each other,
|
||||
* JoinNodesSmart is called (example, joining two list items together into one). If the elements
|
||||
* are not the same type, or one is a descendant of the other, we instead destroy the right block
|
||||
* placing it's children into leftblock. DTD containment rules are followed throughout.
|
||||
* placing its children into leftblock. DTD containment rules are followed throughout.
|
||||
* nsCOMPtr<nsIDOMNode> *aLeftBlock pointer to the left block
|
||||
* nsCOMPtr<nsIDOMNode> *aRightBlock pointer to the right block; will have contents moved to left block
|
||||
* bool *aCanceled return TRUE if we had to cancel operation
|
||||
@ -2845,7 +2845,7 @@ nsHTMLEditRules::MoveNodeSmart(nsIDOMNode *aSource, nsIDOMNode *aDest, PRInt32 *
|
||||
}
|
||||
else
|
||||
{
|
||||
// if it can't, move it's children, and then delete it.
|
||||
// if it can't, move its children, and then delete it.
|
||||
res = MoveContents(aSource, aDest, aOffset);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
res = mHTMLEditor->DeleteNode(aSource);
|
||||
@ -4872,7 +4872,7 @@ nsHTMLEditRules::AlignBlockContents(nsIDOMNode *aNode, const nsAString *alignTyp
|
||||
}
|
||||
else if ((firstChild==lastChild) && nsHTMLEditUtils::IsDiv(firstChild))
|
||||
{
|
||||
// the cell already has a div containing all of it's content: just
|
||||
// the cell already has a div containing all of its content: just
|
||||
// act on this div.
|
||||
nsCOMPtr<nsIDOMElement> divElem = do_QueryInterface(firstChild);
|
||||
if (useCSS) {
|
||||
@ -5223,7 +5223,7 @@ nsHTMLEditRules::ExpandSelectionForDeletion(nsISelection *aSelection)
|
||||
aSelection->Collapse(selStartNode, selStartOffset);
|
||||
|
||||
// expand selection endpoint only if we didnt pass a br,
|
||||
// or if we really needed to pass that br (ie, it's block is now
|
||||
// or if we really needed to pass that br (ie, its block is now
|
||||
// totally selected)
|
||||
bool doEndExpansion = true;
|
||||
if (firstBRParent)
|
||||
@ -6969,7 +6969,7 @@ nsHTMLEditRules::MakeBlockquote(nsCOMArray<nsIDOMNode>& arrayOfNodes)
|
||||
PRInt32 i;
|
||||
for (i=0; i<listCount; i++)
|
||||
{
|
||||
// get the node to act on, and it's location
|
||||
// get the node to act on, and its location
|
||||
curNode = arrayOfNodes[i];
|
||||
res = nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
@ -7045,7 +7045,7 @@ nsHTMLEditRules::RemoveBlockStyle(nsCOMArray<nsIDOMNode>& arrayOfNodes)
|
||||
PRInt32 i;
|
||||
for (i=0; i<listCount; i++)
|
||||
{
|
||||
// get the node to act on, and it's location
|
||||
// get the node to act on, and its location
|
||||
curNode = arrayOfNodes[i];
|
||||
res = nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
@ -7177,7 +7177,7 @@ nsHTMLEditRules::ApplyBlockStyle(nsCOMArray<nsIDOMNode>& arrayOfNodes, const nsA
|
||||
PRInt32 i;
|
||||
for (i=0; i<listCount; i++)
|
||||
{
|
||||
// get the node to act on, and it's location
|
||||
// get the node to act on, and its location
|
||||
curNode = arrayOfNodes[i];
|
||||
res = nsEditor::GetNodeLocation(curNode, address_of(curParent), &offset);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
@ -7980,11 +7980,11 @@ nsHTMLEditRules::RemoveEmptyNodes()
|
||||
// Since checking to see if a node is empty can be costly for nodes with many
|
||||
// descendants, there are some optimizations made. I rely on the fact that the
|
||||
// iterator is post-order: it will visit children of a node before visiting the
|
||||
// parent node. So if I find that a child node is not empty, I know that it's
|
||||
// parent node. So if I find that a child node is not empty, I know that its
|
||||
// parent is not empty without even checking. So I put the parent on a "skipList"
|
||||
// which is just a voidArray of nodes I can skip the empty check on. If I
|
||||
// encounter a node on the skiplist, i skip the processing for that node and replace
|
||||
// it's slot in the skiplist with that node's parent.
|
||||
// its slot in the skiplist with that node's parent.
|
||||
// An interseting idea is to go ahead and regard parent nodes that are NOT on the
|
||||
// skiplist as being empty (without even doing the IsEmptyNode check) on the theory
|
||||
// that if they weren't empty, we would have encountered a non-empty child earlier
|
||||
@ -8017,7 +8017,7 @@ nsHTMLEditRules::RemoveEmptyNodes()
|
||||
if (idx != skipList.NoIndex)
|
||||
{
|
||||
// this node is on our skip list. Skip processing for this node,
|
||||
// and replace it's value in the skip list with the value of it's parent
|
||||
// and replace its value in the skip list with the value of its parent
|
||||
skipList[idx] = parent;
|
||||
}
|
||||
else
|
||||
@ -8401,7 +8401,7 @@ nsHTMLEditRules::UpdateDocChangeRange(nsIDOMRange *aRange)
|
||||
// first make sure aRange is in the document. It might not be if
|
||||
// portions of our editting action involved manipulating nodes
|
||||
// prior to placing them in the document (e.g., populating a list item
|
||||
// before placing it in it's list)
|
||||
// before placing it in its list)
|
||||
nsCOMPtr<nsIDOMNode> startNode;
|
||||
res = aRange->GetStartContainer(getter_AddRefs(startNode));
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
@ -2040,7 +2040,7 @@ nsHTMLEditor::GetCSSBackgroundColorState(bool *aMixed, nsAString &aOutColor, boo
|
||||
else
|
||||
{
|
||||
// otherwise we want to look at the first editable node after
|
||||
// {parent,offset} and it's ancestors for divs with alignment on them
|
||||
// {parent,offset} and its ancestors for divs with alignment on them
|
||||
nodeToExamine = GetChildAt(parent, offset);
|
||||
//GetNextNode(parent, offset, true, address_of(nodeToExamine));
|
||||
}
|
||||
@ -3575,7 +3575,7 @@ nsHTMLEditor::ContentRemoved(nsIDocument *aDocument, nsIContent* aContainer,
|
||||
}
|
||||
|
||||
|
||||
/* This routine examines aNode and it's ancestors looking for any node which has the
|
||||
/* This routine examines aNode and its ancestors looking for any node which has the
|
||||
-moz-user-select: all style lit. Return the highest such ancestor. */
|
||||
already_AddRefed<nsIDOMNode>
|
||||
nsHTMLEditor::FindUserSelectAllNode(nsIDOMNode* aNode)
|
||||
@ -4124,7 +4124,7 @@ nsHTMLEditor::CollapseAdjacentTextNodes(nsIDOMRange *aInRange)
|
||||
nsIDOMNode *rightTextNode = textNodes[1];
|
||||
NS_ASSERTION(leftTextNode && rightTextNode,"left or rightTextNode null in CollapseAdjacentTextNodes");
|
||||
|
||||
// get the prev sibling of the right node, and see if it's leftTextNode
|
||||
// get the prev sibling of the right node, and see if its leftTextNode
|
||||
nsCOMPtr<nsIDOMNode> prevSibOfRightNode;
|
||||
result =
|
||||
rightTextNode->GetPreviousSibling(getter_AddRefs(prevSibOfRightNode));
|
||||
@ -4156,7 +4156,7 @@ nsHTMLEditor::SetSelectionAtDocumentStart(nsISelection *aSelection)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// RemoveBlockContainer: remove inNode, reparenting it's children into their
|
||||
// RemoveBlockContainer: remove inNode, reparenting its children into their
|
||||
// the parent of inNode. In addition, INSERT ANY BR's NEEDED
|
||||
// TO PRESERVE IDENTITY OF REMOVED BLOCK.
|
||||
//
|
||||
|
@ -481,7 +481,7 @@ nsHTMLEditor::SetInlinePropertyOnNode( nsIDOMNode *aNode,
|
||||
}
|
||||
else
|
||||
{
|
||||
// ok, chuck it in it's very own container
|
||||
// ok, chuck it in its very own container
|
||||
res = InsertContainerAbove(aNode, address_of(tmp), tag, aAttribute, aValue);
|
||||
}
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
@ -813,7 +813,7 @@ nsHTMLEditor::DeleteTableCell(PRInt32 aNumber)
|
||||
res = GetCellIndexes(cell, &startRowIndex, &startColIndex);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
|
||||
// The setCaret object will call SetSelectionAfterTableEdit in it's destructor
|
||||
// The setCaret object will call SetSelectionAfterTableEdit in its destructor
|
||||
nsSetSelectionAfterTableEdit setCaret(this, table, startRowIndex, startColIndex, ePreviousColumn, false);
|
||||
nsAutoTxnsConserveSelection dontChangeSelection(this);
|
||||
|
||||
@ -949,7 +949,7 @@ nsHTMLEditor::DeleteTableCell(PRInt32 aNumber)
|
||||
{
|
||||
// More than 1 cell in the row
|
||||
|
||||
// The setCaret object will call SetSelectionAfterTableEdit in it's destructor
|
||||
// The setCaret object will call SetSelectionAfterTableEdit in its destructor
|
||||
nsSetSelectionAfterTableEdit setCaret(this, table, startRowIndex, startColIndex, ePreviousColumn, false);
|
||||
nsAutoTxnsConserveSelection dontChangeSelection(this);
|
||||
|
||||
@ -2336,7 +2336,7 @@ nsHTMLEditor::JoinTableCells(bool aMergeNonContiguousContents)
|
||||
if( spanAboveMergedCell > 0 )
|
||||
{
|
||||
// Cell we merged started in a row above the target cell
|
||||
// Reduce rowspan to give room where target cell will extend it's colspan
|
||||
// Reduce rowspan to give room where target cell will extend its colspan
|
||||
res = SetRowSpan(cell2, spanAboveMergedCell);
|
||||
NS_ENSURE_SUCCESS(res, res);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ interface nsITransactionListener : nsISupports
|
||||
* @param aManager the transaction manager doing the transaction.
|
||||
* @param aTransaction the transaction being executed.
|
||||
* @result boolean value returned by listener which indicates
|
||||
* it's desire to interrupt normal control flow. Listeners should
|
||||
* its desire to interrupt normal control flow. Listeners should
|
||||
* return true if they want to interrupt normal control flow, without
|
||||
* throwing an error.
|
||||
*/
|
||||
@ -79,7 +79,7 @@ interface nsITransactionListener : nsISupports
|
||||
* @param aManager the transaction manager undoing the transaction.
|
||||
* @param aTransaction the transaction being undone.
|
||||
* @result boolean value returned by listener which indicates
|
||||
* it's desire to interrupt normal control flow. Listeners should
|
||||
* its desire to interrupt normal control flow. Listeners should
|
||||
* return true if they want to interrupt normal control flow, without
|
||||
* throwing an error. Note that listeners can also interrupt normal
|
||||
* control flow by throwing an nsresult that indicates an error.
|
||||
@ -104,7 +104,7 @@ interface nsITransactionListener : nsISupports
|
||||
* @param aManager the transaction manager redoing the transaction.
|
||||
* @param aTransaction the transaction being redone.
|
||||
* @result boolean value returned by listener which indicates
|
||||
* it's desire to interrupt normal control flow. Listeners should
|
||||
* its desire to interrupt normal control flow. Listeners should
|
||||
* return true if they want to interrupt normal control flow, without
|
||||
* throwing an error. Note that listeners can also interrupt normal
|
||||
* control flow by throwing an nsresult that indicates an error.
|
||||
@ -127,7 +127,7 @@ interface nsITransactionListener : nsISupports
|
||||
* Called before a transaction manager begins a batch.
|
||||
* @param aManager the transaction manager beginning a batch.
|
||||
* @result boolean value returned by listener which indicates
|
||||
* it's desire to interrupt normal control flow. Listeners should
|
||||
* its desire to interrupt normal control flow. Listeners should
|
||||
* return true if they want to interrupt normal control flow, without
|
||||
* throwing an error. Note that listeners can also interrupt normal
|
||||
* control flow by throwing an nsresult that indicates an error.
|
||||
@ -146,7 +146,7 @@ interface nsITransactionListener : nsISupports
|
||||
* Called before a transaction manager ends a batch.
|
||||
* @param aManager the transaction manager ending a batch.
|
||||
* @result boolean value returned by listener which indicates
|
||||
* it's desire to interrupt normal control flow. Listeners should
|
||||
* its desire to interrupt normal control flow. Listeners should
|
||||
* return true if they want to interrupt normal control flow, without
|
||||
* throwing an error. Note that listeners can also interrupt normal
|
||||
* control flow by throwing an nsresult that indicates an error.
|
||||
@ -169,7 +169,7 @@ interface nsITransactionListener : nsISupports
|
||||
* @param aTopTransaction the transaction at the top of the undo stack.
|
||||
* @param aTransactionToMerge the transaction to merge.
|
||||
* @result boolean value returned by listener which indicates
|
||||
* it's desire to interrupt normal control flow. Listeners should
|
||||
* its desire to interrupt normal control flow. Listeners should
|
||||
* return true if they want to interrupt normal control flow, without
|
||||
* throwing an error. Note that listeners can also interrupt normal
|
||||
* control flow by throwing an nsresult that indicates an error.
|
||||
|
@ -67,13 +67,13 @@ interface nsITransactionManager : nsISupports
|
||||
void doTransaction(in nsITransaction aTransaction);
|
||||
|
||||
/**
|
||||
* Pops the topmost transaction on the undo stack, calls it's
|
||||
* Pops the topmost transaction on the undo stack, calls its
|
||||
* undoTransaction() method, then pushes it on the redo stack.
|
||||
*/
|
||||
void undoTransaction();
|
||||
|
||||
/**
|
||||
* Pops the topmost transaction on the redo stack, calls it's
|
||||
* Pops the topmost transaction on the redo stack, calls its
|
||||
* redoTransaction() method, then pushes it on the undo stack.
|
||||
*/
|
||||
void redoTransaction();
|
||||
|
@ -770,7 +770,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
|
||||
// If we get here, we have an uncollapsed selection!
|
||||
// Look backwards through each range in the selection till you
|
||||
// find the first text node. If you find one, find the
|
||||
// beginning of it's text block, and make it the current
|
||||
// beginning of its text block, and make it the current
|
||||
// block.
|
||||
|
||||
result = selection->GetRangeCount(&rangeCount);
|
||||
@ -950,7 +950,7 @@ nsTextServicesDocument::LastSelectedBlock(TSDBlockSelectionStatus *aSelStatus,
|
||||
if (IsTextNode(content))
|
||||
{
|
||||
// We found a text node! Adjust the document's iterator to point
|
||||
// to the beginning of it's text block, then get the current selection.
|
||||
// to the beginning of its text block, then get the current selection.
|
||||
|
||||
result = mIterator->PositionAt(content);
|
||||
|
||||
@ -1229,7 +1229,7 @@ nsTextServicesDocument::DeleteSelection()
|
||||
// PrintOffsetTable();
|
||||
//**** KDEBUG ****
|
||||
|
||||
// If we have an mExtent, save off it's current set of
|
||||
// If we have an mExtent, save off its current set of
|
||||
// end points so we can compare them against mExtent's
|
||||
// set after the deletion of the content.
|
||||
|
||||
@ -1415,7 +1415,7 @@ nsTextServicesDocument::DeleteSelection()
|
||||
if (mIteratorStatus != nsTextServicesDocument::eIsDone)
|
||||
{
|
||||
// The old iterator is still pointing to something valid,
|
||||
// so get it's current node so we can restore it after we
|
||||
// so get its current node so we can restore it after we
|
||||
// create the new iterator!
|
||||
|
||||
curContent = do_QueryInterface(mIterator->GetCurrentNode());
|
||||
@ -1616,7 +1616,7 @@ nsTextServicesDocument::InsertText(const nsString *aText)
|
||||
{
|
||||
// We are inserting text at the end of the current offset entry.
|
||||
// Look at the next valid entry in the table. If it's an inserted
|
||||
// text entry, add to it's length and adjust it's node offset. If
|
||||
// text entry, add to its length and adjust its node offset. If
|
||||
// it isn't, add a new inserted text entry.
|
||||
|
||||
i = mSelStartIndex + 1;
|
||||
@ -1664,7 +1664,7 @@ nsTextServicesDocument::InsertText(const nsString *aText)
|
||||
}
|
||||
}
|
||||
|
||||
// We have a valid inserted text offset entry. Update it's
|
||||
// We have a valid inserted text offset entry. Update its
|
||||
// length, adjust the selection indexes, and make sure the
|
||||
// caret is properly placed!
|
||||
|
||||
@ -2676,7 +2676,7 @@ nsTextServicesDocument::GetCollapsedSelection(nsITextServicesDocument::TSDBlockS
|
||||
{
|
||||
// Good news, the caret is in a text node. Look
|
||||
// through the offset table for the entry that
|
||||
// matches it's parent and offset.
|
||||
// matches its parent and offset.
|
||||
|
||||
for (i = 0; i < tableCount; i++)
|
||||
{
|
||||
@ -2704,7 +2704,7 @@ nsTextServicesDocument::GetCollapsedSelection(nsITextServicesDocument::TSDBlockS
|
||||
// The caret is in our text block, but it's positioned in some
|
||||
// non-text node (ex. <b>). Create a range based on the start
|
||||
// and end of the text block, then create an iterator based on
|
||||
// this range, with it's initial position set to the closest
|
||||
// this range, with its initial position set to the closest
|
||||
// child of this non-text node. Then look for the closest text
|
||||
// node.
|
||||
|
||||
@ -3736,7 +3736,7 @@ nsTextServicesDocument::FindWordBounds(nsTArray<OffsetEntry*> *aOffsetTable,
|
||||
bool hasEntry = false;
|
||||
|
||||
// It's assumed that aNode is a text node. The first thing
|
||||
// we do is get it's index in the offset table so we can
|
||||
// we do is get its index in the offset table so we can
|
||||
// calculate the dom point's string offset.
|
||||
|
||||
nsresult result = NodeHasOffsetEntry(aOffsetTable, aNode, &hasEntry, &entryIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user