Index: Source/core/editing/VisibleUnits.cpp |
diff --git a/Source/core/editing/VisibleUnits.cpp b/Source/core/editing/VisibleUnits.cpp |
index 600242cd26b837263d61518265d3375ef641610c..1f39b48d9d9bc44bf89374b07bfa8b4bac500915 100644 |
--- a/Source/core/editing/VisibleUnits.cpp |
+++ b/Source/core/editing/VisibleUnits.cpp |
@@ -1110,11 +1110,12 @@ VisiblePosition startOfParagraph(const VisiblePosition& c, EditingBoundaryCrossi |
Position::AnchorType type = p.anchorType(); |
Node* n = startNode; |
+ bool startNodeIsEditable = startNode->rendererIsEditable(); |
while (n) { |
- if (boundaryCrossingRule == CannotCrossEditingBoundary && !Position::nodeIsUserSelectAll(n) && n->rendererIsEditable() != startNode->rendererIsEditable()) |
+ if (boundaryCrossingRule == CannotCrossEditingBoundary && !Position::nodeIsUserSelectAll(n) && n->rendererIsEditable() != startNodeIsEditable) |
break; |
if (boundaryCrossingRule == CanSkipOverEditingBoundary) { |
- while (n && n->rendererIsEditable() != startNode->rendererIsEditable()) |
+ while (n && n->rendererIsEditable() != startNodeIsEditable) |
n = NodeTraversal::previousPostOrder(*n, startBlock); |
if (!n || !n->isDescendantOf(highestRoot)) |
break; |
@@ -1187,11 +1188,12 @@ VisiblePosition endOfParagraph(const VisiblePosition &c, EditingBoundaryCrossing |
Position::AnchorType type = p.anchorType(); |
Node* n = startNode; |
+ bool startNodeIsEditable = startNode->rendererIsEditable(); |
while (n) { |
- if (boundaryCrossingRule == CannotCrossEditingBoundary && !Position::nodeIsUserSelectAll(n) && n->rendererIsEditable() != startNode->rendererIsEditable()) |
+ if (boundaryCrossingRule == CannotCrossEditingBoundary && !Position::nodeIsUserSelectAll(n) && n->rendererIsEditable() != startNodeIsEditable) |
break; |
if (boundaryCrossingRule == CanSkipOverEditingBoundary) { |
- while (n && n->rendererIsEditable() != startNode->rendererIsEditable()) |
+ while (n && n->rendererIsEditable() != startNodeIsEditable) |
n = NodeTraversal::next(*n, stayInsideBlock); |
if (!n || !n->isDescendantOf(highestRoot)) |
break; |