Skip to content

Commit

Permalink
Bug 1377989 - part5: Rename mStartParent of nsRange and similar membe…
Browse files Browse the repository at this point in the history
…rs of similar objects to mStartContainer r=smaug

MozReview-Commit-ID: 5QJahMKnKEJ

--HG--
extra : rebase_source : 0b4aee62fcd70574b3dc44e05392b2a8d6ff6ee5
  • Loading branch information
masayuki-nakano committed Jul 11, 2017
1 parent e54f65d commit 4ff0c23
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 164 deletions.
7 changes: 4 additions & 3 deletions dom/base/SelectionChangeListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace mozilla::dom;
SelectionChangeListener::RawRangeData::RawRangeData(const nsRange* aRange)
{
mozilla::ErrorResult rv;
mStartParent = aRange->GetStartContainer(rv);
mStartContainer = aRange->GetStartContainer(rv);
rv.SuppressException();
mEndParent = aRange->GetEndContainer(rv);
rv.SuppressException();
Expand All @@ -35,7 +35,7 @@ bool
SelectionChangeListener::RawRangeData::Equals(const nsRange* aRange)
{
mozilla::ErrorResult rv;
bool eq = mStartParent == aRange->GetStartContainer(rv);
bool eq = mStartContainer == aRange->GetStartContainer(rv);
rv.SuppressException();
eq = eq && mEndParent == aRange->GetEndContainer(rv);
rv.SuppressException();
Expand All @@ -52,7 +52,8 @@ ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback,
const char* aName,
uint32_t aFlags = 0)
{
ImplCycleCollectionTraverse(aCallback, aField.mStartParent, "mStartParent", aFlags);
ImplCycleCollectionTraverse(aCallback, aField.mStartContainer,
"mStartContainer", aFlags);
ImplCycleCollectionTraverse(aCallback, aField.mEndParent, "mEndParent", aFlags);
}

Expand Down
2 changes: 1 addition & 1 deletion dom/base/SelectionChangeListener.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SelectionChangeListener final : public nsISelectionListener
// could potentially break the comparison logic. In reality, this is extremely
// unlikely to occur (potentially impossible), but these nsCOMPtrs are safer.
// They are never dereferenced.
nsCOMPtr<nsINode> mStartParent;
nsCOMPtr<nsINode> mStartContainer;
nsCOMPtr<nsINode> mEndParent;

// XXX These are int32_ts on nsRange, but uint32_ts in the return value
Expand Down
Loading

0 comments on commit 4ff0c23

Please sign in to comment.