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

Unified Diff: Source/core/editing/ApplyStyleCommand.cpp

Issue 332613003: Make RemoveFormat command to work with mixed editable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/remove-foramt-mixed-editable-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/editing/ApplyStyleCommand.cpp
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
index a5a5df35facd8abe3c7bc2829451f647d519217d..88cb5463c84f391daa9118b7de6ce80be1d1497d 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -1155,7 +1155,7 @@ void ApplyStyleCommand::removeInlineStyle(EditingStyle* style, const Position &s
if (s.deprecatedNode() == elem) {
// Since elem must have been fully selected, and it is at the start
// of the selection, it is clear we can set the new s offset to 0.
- ASSERT(s.anchorType() == Position::PositionIsBeforeAnchor || s.offsetInContainerNode() <= 0);
+ ASSERT(s.anchorType() == Position::PositionIsBeforeAnchor || s.anchorType() == Position::PositionIsBeforeChildren || s.offsetInContainerNode() <= 0);
Yuta Kitamura 2014/07/01 09:12:35 Who creates the position of type PositionIsBeforeC
yosin_UTC9 2014/07/02 03:30:36 In the attached test case, |firstPositionInOrBefor
Yuta Kitamura 2014/07/02 07:27:21 I don't understand your reasoning. This ASSERT is
yosin_UTC9 2014/07/02 08:04:03 The ASSERT and firstPositionInOrBeforeNode() is in
Yuta Kitamura 2014/07/03 05:11:29 Okay, I think this is an oversight from rniwa's ch
s = firstPositionInOrBeforeNode(next.get());
}
if (e.deprecatedNode() == elem) {
« no previous file with comments | « LayoutTests/editing/execCommand/remove-foramt-mixed-editable-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698