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

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: 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
Index: Source/core/dom/Position.cpp
diff --git a/Source/core/dom/Position.cpp b/Source/core/dom/Position.cpp
index 9527031845c8f97d0286f92dffeb88f81c7adb39..71499a0276695279437bc9fcd131249752baca18 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 element are movings so we should assume the element's position
leviw_travelin_and_unemployed 2014/02/14 04:57:46 I'd change this to something like "Marquee element
yoichio 2014/02/19 08:00:30 Done.
+ // is always distinct from the node's one.
+ 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();
}

Powered by Google App Engine
This is Rietveld 408576698