| Index: third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp b/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp
|
| index 624a66267d6c0b6620ffdfc98e00facc41445f91..8c940442c29d26afca3f2996d415d09a743b7d37 100644
|
| --- a/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/VisibleUnitsLine.cpp
|
| @@ -102,12 +102,11 @@ Node* NextLeafWithSameEditability(
|
| if (!node)
|
| return nullptr;
|
|
|
| - bool editable = HasEditableStyle(*node, editable_type);
|
| - node = NextAtomicLeafNode(*node);
|
| - while (node) {
|
| - if (editable == HasEditableStyle(*node, editable_type))
|
| - return node;
|
| - node = NextAtomicLeafNode(*node);
|
| + const bool editable = HasEditableStyle(*node, editable_type);
|
| + for (Node* runner = NextAtomicLeafNode(*node); runner;
|
| + runner = NextAtomicLeafNode(*runner)) {
|
| + if (editable == HasEditableStyle(*runner, editable_type))
|
| + return runner;
|
| }
|
| return nullptr;
|
| }
|
|
|