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

Issue 332613003: Make RemoveFormat command to work with mixed editable (Closed)

Created:
6 years, 6 months ago by yosin_UTC9
Modified:
6 years, 5 months ago
Reviewers:
yoichio, Yuta Kitamura
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Make RemoveFormat command to work with mixed editable This patch changes assertion in |ApplyStyleCommand::removeInlineStyle()| to consider |PositionIsBeforeChildren| as same as |PositionIsBeforeAnchor| and |offsetInContainerNode <= 0|. In the attached test case, |firstPositionInOrBeforeNode(next.get())| returns |PositionIsBeforeChildren| for B element. When we don't have uneditable element, inline styles are removed by |removeInlineStyleFromElement| for BODY element rather than each child in BODY element. Blink doesn't go the path contains the assertion. BUG=388212 TEST=LayoutTests/editing/execCommand/remove-foramt-mixed-editable-crash.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177448

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -4 lines) Patch
A + LayoutTests/editing/execCommand/remove-foramt-mixed-editable-crash.html View 1 chunk +3 lines, -4 lines 0 comments Download
A + LayoutTests/editing/execCommand/remove-foramt-mixed-editable-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/core/editing/ApplyStyleCommand.cpp View 1 chunk +1 line, -1 line 5 comments Download

Messages

Total messages: 9 (0 generated)
yosin_UTC9
Could you review this patch? Thanks in advance.
6 years, 6 months ago (2014-06-26 08:27:32 UTC) #1
Yuta Kitamura
https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp File Source/core/editing/ApplyStyleCommand.cpp (right): https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp#newcode1158 Source/core/editing/ApplyStyleCommand.cpp:1158: ASSERT(s.anchorType() == Position::PositionIsBeforeAnchor || s.anchorType() == Position::PositionIsBeforeChildren || s.offsetInContainerNode() ...
6 years, 5 months ago (2014-07-01 09:12:35 UTC) #2
yosin_UTC9
https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp File Source/core/editing/ApplyStyleCommand.cpp (right): https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp#newcode1158 Source/core/editing/ApplyStyleCommand.cpp:1158: ASSERT(s.anchorType() == Position::PositionIsBeforeAnchor || s.anchorType() == Position::PositionIsBeforeChildren || s.offsetInContainerNode() ...
6 years, 5 months ago (2014-07-02 03:30:36 UTC) #3
Yuta Kitamura
https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp File Source/core/editing/ApplyStyleCommand.cpp (right): https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp#newcode1158 Source/core/editing/ApplyStyleCommand.cpp:1158: ASSERT(s.anchorType() == Position::PositionIsBeforeAnchor || s.anchorType() == Position::PositionIsBeforeChildren || s.offsetInContainerNode() ...
6 years, 5 months ago (2014-07-02 07:27:21 UTC) #4
yosin_UTC9
https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp File Source/core/editing/ApplyStyleCommand.cpp (right): https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp#newcode1158 Source/core/editing/ApplyStyleCommand.cpp:1158: ASSERT(s.anchorType() == Position::PositionIsBeforeAnchor || s.anchorType() == Position::PositionIsBeforeChildren || s.offsetInContainerNode() ...
6 years, 5 months ago (2014-07-02 08:04:03 UTC) #5
Yuta Kitamura
lgtm https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp File Source/core/editing/ApplyStyleCommand.cpp (right): https://codereview.chromium.org/332613003/diff/1/Source/core/editing/ApplyStyleCommand.cpp#newcode1158 Source/core/editing/ApplyStyleCommand.cpp:1158: ASSERT(s.anchorType() == Position::PositionIsBeforeAnchor || s.anchorType() == Position::PositionIsBeforeChildren || ...
6 years, 5 months ago (2014-07-03 05:11:29 UTC) #6
yosin_UTC9
The CQ bit was checked by yosin@chromium.org
6 years, 5 months ago (2014-07-03 05:18:43 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yosin@chromium.org/332613003/1
6 years, 5 months ago (2014-07-03 05:19:31 UTC) #8
commit-bot: I haz the power
6 years, 5 months ago (2014-07-03 05:22:51 UTC) #9
Message was sent while issue was closed.
Change committed as 177448

Powered by Google App Engine
This is Rietveld 408576698