Chromium Code Reviews| Index: Source/core/dom/RangeBoundaryPoint.h |
| diff --git a/Source/core/dom/RangeBoundaryPoint.h b/Source/core/dom/RangeBoundaryPoint.h |
| index 2652ceae03ceb0949021ad0824d051cb2f12c02d..6ce9ef9f06b12d0c1558ed92c54f24840f7620a1 100644 |
| --- a/Source/core/dom/RangeBoundaryPoint.h |
| +++ b/Source/core/dom/RangeBoundaryPoint.h |
| @@ -49,8 +49,8 @@ public: |
| void setOffset(int offset); |
| void setToBeforeChild(Node&); |
| - void setToStartOfNode(PassRefPtr<Node>); |
| - void setToEndOfNode(PassRefPtr<Node>); |
| + void setToStartOfNode(Node&); |
| + void setToEndOfNode(Node&); |
| void childBeforeWillBeRemoved(); |
| void invalidateOffset() const; |
| @@ -144,18 +144,16 @@ inline void RangeBoundaryPoint::setToBeforeChild(Node& child) |
| m_offsetInContainer = m_childBeforeBoundary ? invalidOffset : 0; |
| } |
| -inline void RangeBoundaryPoint::setToStartOfNode(PassRefPtr<Node> container) |
| +inline void RangeBoundaryPoint::setToStartOfNode(Node& container) |
| { |
| - ASSERT(container); |
| - m_containerNode = container; |
| + m_containerNode = RefPtr<Node>(container); |
|
adamk
2014/02/24 22:15:00
Nit: shouldn't these be PassRefPtr<Node>() to avoi
Inactive
2014/02/24 22:21:08
arg, you're right :) I have just checked the RefPt
Inactive
2014/02/24 22:36:13
Done.
|
| m_offsetInContainer = 0; |
| m_childBeforeBoundary = nullptr; |
| } |
| -inline void RangeBoundaryPoint::setToEndOfNode(PassRefPtr<Node> container) |
| +inline void RangeBoundaryPoint::setToEndOfNode(Node& container) |
| { |
| - ASSERT(container); |
| - m_containerNode = container; |
| + m_containerNode = RefPtr<Node>(container); |
| if (m_containerNode->offsetInCharacters()) { |
| m_offsetInContainer = m_containerNode->maxCharacterOffset(); |
| m_childBeforeBoundary = nullptr; |