Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Unified Diff: third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp

Issue 2776103002: Make RenderedRectsForMarkers() to ignore disconnected nodes. (Closed)
Patch Set: upload test file Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..0d3cb339d625724deb79ac63f05ac0e259e39f3b 100644
--- a/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
+++ b/third_party/WebKit/Source/core/editing/markers/DocumentMarkerController.cpp
@@ -213,10 +213,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(EphemeralRange(range).boundingBox()));
} else {
marker.nullifyRenderedRect();
}

Powered by Google App Engine
This is Rietveld 408576698