ApplyStyleCommand should utilize EphemeralRange |
|||
Issue descriptionTo catch a bug at call sites, we should make |ApplyStyleCommand::UpdateStartEnd()| to take |EphemeralRange| instead of two positions, start and end.
,
Apr 3 2018
In addition to utilize EphemeralRange in UpdateStartEnd(), we want to utilize
EphemeralRange in
- Create(Document& document,
const EditingStyle* style,
const Position& start,
const Position& end)
and it's wrappers.
- ApplyStyleCommand(Document&,
const EditingStyle*,
const Position& start,
const Position& end);
void RemoveInlineStyle(EditingStyle*,
const Position& start,
const Position& end,
EditingState*);
void FixRangeAndApplyInlineStyle(EditingStyle*,
const Position& start,
const Position& end,
EditingState*);
and more functions to take |Position start, Position end|.
,
Apr 3 2018
We may want to use |range_| instead of |start_| and |end_|. If we can use |EpehemralRange|, it is nice.
,
Apr 3 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5eeed90f5c798b2b3294e19e7646a5c338aed517 commit 5eeed90f5c798b2b3294e19e7646a5c338aed517 Author: tanvir.rizvi <tanvir.rizvi@samsung.com> Date: Tue Apr 03 11:18:14 2018 Make ApplyStyleCommand::UpdateStartEnd to take EphemeralRange UpdateStartEnd takes start and end position as parameters, and then does a DCHECK_LE for start and end. EphemeralRange constructor also does same DCHECK. Since UpdateStartEnd is called from many places, so to catch a bug at the call site, function UpdateStartEnd is made to take EphemeralRange instead. Bug: 826106 Change-Id: I6e1cd23e9aac2846a2f083cd6f4d8110fa3a9085 Reviewed-on: https://chromium-review.googlesource.com/989852 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Tanvir Rizvi <tanvir.rizvi@samsung.com> Cr-Commit-Position: refs/heads/master@{#547668} [modify] https://crrev.com/5eeed90f5c798b2b3294e19e7646a5c338aed517/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp [modify] https://crrev.com/5eeed90f5c798b2b3294e19e7646a5c338aed517/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h
,
Apr 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f8554ddf85336ebf6b733022fa2b5fd23dc22065 commit f8554ddf85336ebf6b733022fa2b5fd23dc22065 Author: tanvir.rizvi <tanvir.rizvi@samsung.com> Date: Tue Apr 10 09:16:59 2018 Use EphemeralRange in ApplyStyleCommand::RemoveInlineStyle For code health we use Ephemeral range instead of passsing position in RemoveInlineStyle. With this we catch a bug at call sites, as EphemeralRange construction takes care of the current DCHECKS in RemoveInlineStyle Bug: 826106 Change-Id: Ibaa37789f7671aa464b4c87d30f12bd023a67a3d Reviewed-on: https://chromium-review.googlesource.com/1001437 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Tanvir Rizvi <tanvir.rizvi@samsung.com> Cr-Commit-Position: refs/heads/master@{#549466} [modify] https://crrev.com/f8554ddf85336ebf6b733022fa2b5fd23dc22065/third_party/blink/renderer/core/editing/commands/apply_style_command.cc [modify] https://crrev.com/f8554ddf85336ebf6b733022fa2b5fd23dc22065/third_party/blink/renderer/core/editing/commands/apply_style_command.h
,
Aug 1
|
|||
►
Sign in to add a comment |
|||
Comment 1 by tanvir.r...@samsung.com
, Mar 27 2018