| Index: Source/core/editing/VisibleUnits.cpp
|
| diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp
|
| index 723a7c3e4acdb54e0924fd81f80c9d1b2d148f7e..ed06b271c355b8370642f2001afa7163acb97a5a 100644
|
| --- a/Source/core/editing/VisibleUnits.cpp
|
| +++ b/Source/core/editing/VisibleUnits.cpp
|
| @@ -39,6 +39,7 @@
|
| #include "core/editing/TextIterator.h"
|
| #include "core/editing/VisiblePosition.h"
|
| #include "core/editing/htmlediting.h"
|
| +#include "core/html/HTMLBRElement.h"
|
| #include "core/rendering/InlineTextBox.h"
|
| #include "core/rendering/RenderBlockFlow.h"
|
| #include "core/rendering/RenderObject.h"
|
| @@ -89,7 +90,7 @@ static Position previousRootInlineBoxCandidatePosition(Node* node, const Visible
|
| if (highestEditableRoot(firstPositionInOrBeforeNode(previousNode), editableType) != highestRoot)
|
| break;
|
|
|
| - Position pos = previousNode->hasTagName(brTag) ? positionBeforeNode(previousNode) :
|
| + Position pos = isHTMLBRElement(*previousNode) ? positionBeforeNode(previousNode) :
|
| createLegacyEditingPosition(previousNode, caretMaxOffset(previousNode));
|
|
|
| if (pos.isCandidate())
|
| @@ -813,7 +814,7 @@ static VisiblePosition endPositionForLine(const VisiblePosition& c, LineEndpoint
|
| }
|
|
|
| Position pos;
|
| - if (endNode->hasTagName(brTag))
|
| + if (isHTMLBRElement(*endNode))
|
| pos = positionBeforeNode(endNode);
|
| else if (endBox->isInlineTextBox() && endNode->isTextNode()) {
|
| InlineTextBox* endTextBox = toInlineTextBox(endBox);
|
|
|