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

Unified Diff: Source/core/dom/Position.cpp

Issue 165933002: Fix the crash bug about selecting a marquee element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update Created 6 years, 10 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
« no previous file with comments | « LayoutTests/editing/execCommand/selectAll-including-marquee-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Position.cpp
diff --git a/Source/core/dom/Position.cpp b/Source/core/dom/Position.cpp
index 91832edc39b792473d96ebd2990dda61b96dbd7f..84444522498032e9a79a62c611eded9c4dd64b0f 100644
--- a/Source/core/dom/Position.cpp
+++ b/Source/core/dom/Position.cpp
@@ -547,6 +547,11 @@ static bool endsOfNodeAreVisuallyDistinctPositions(Node* node)
if (node->hasTagName(tableTag))
return false;
+ // A Marquee elements are moving so we should assume their ends are always
+ // visibily distinct.
+ if (node->hasTagName(marqueeTag))
+ return true;
+
// There is a VisiblePosition inside an empty inline-block container.
return node->renderer()->isReplaced() && canHaveChildrenForEditing(node) && toRenderBox(node->renderer())->height() != 0 && !node->firstChild();
}
« no previous file with comments | « LayoutTests/editing/execCommand/selectAll-including-marquee-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698