Index: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
diff --git a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
index f76a22b37cb8f1d9ffce213a976438a412427ee2..dd38e71754a4795618a2827c87fc129a0188a246 100644 |
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp |
@@ -32,6 +32,7 @@ |
#include "core/dom/NodeTraversal.h" |
#include "core/dom/Range.h" |
#include "core/dom/Text.h" |
+#include "core/editing/VisibleUnits.h" |
#include "core/editing/iterators/TextIterator.h" |
#include "core/editing/markers/RenderedDocumentMarker.h" |
#include "core/frame/FrameView.h" |
@@ -213,10 +214,8 @@ static void updateMarkerRenderedRect(const Node& node, |
range->setEnd(&const_cast<Node&>(node), marker.endOffset(), |
IGNORE_EXCEPTION_FOR_TESTING); |
} |
- if (!exceptionState.hadException()) { |
- // TODO(yosin): Once we have a |EphemeralRange| version of |boundingBox()|, |
- // we should use it instead of |Range| version. |
- marker.setRenderedRect(LayoutRect(range->boundingBox())); |
+ if (!exceptionState.hadException() && range->isConnected()) { |
+ marker.setRenderedRect(LayoutRect(boundingBox(EphemeralRange(range)))); |
yosin_UTC9
2017/03/30 01:23:17
Note: Intention of this TODO is using |EphemeralRa
|
} else { |
marker.nullifyRenderedRect(); |
} |