|
|
Created:
3 years, 7 months ago by Xiaocheng Modified:
3 years, 6 months ago Reviewers:
yosin_UTC9 CC:
blink-reviews, chromium-reviews Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionReorganize the maintenance of several text node related members in TextIterator
Some members of TextIterator are used only by text node related functions, but
are initialized/reset at multiple places in the class. This patch reorganizes
them so that they are maintained solely by text node related functions/code.
- offset_
- handled_first_letter_
- first_letter_text_
BUG=721957
TEST=n/a; shouldn't have any behavioral change
Review-Url: https://codereview.chromium.org/2896023003
Cr-Commit-Position: refs/heads/master@{#475231}
Committed: https://chromium.googlesource.com/chromium/src/+/2d8f80cfe9a0069c01a44d3f209b69e5186da2fc
Patch Set 1 #Patch Set 2 : Mon May 22 15:40:24 PDT 2017 #Patch Set 3 : Tue May 23 20:24:06 PDT 2017 #Patch Set 4 : Tue May 23 22:15:08 PDT 2017 #Patch Set 5 : Tue May 23 22:16:40 PDT 2017 #Patch Set 6 : Thu May 25 15:15:18 PDT 2017 #Messages
Total messages: 40 (30 generated)
Description was changed from ========== Reorganize the maintenance of several text node related fields in TextIterator BUG= ========== to ========== Reorganize several text node related fields in TextIterator BUG= ==========
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Reorganize several text node related fields in TextIterator BUG= ========== to ========== Reorganize the maintenance of several text node related members in TextIterator The following three members are used only in text node handling, but are initialized/reset at multiple places. This patch moves their init/reset to HandleTextNode() since HandleTextNode() is called only once for each text node. - offset_ - handled_first_letter_ - first_letter_text_ The following member is used only when deciding whether there is a whitespace at the end of a text node that should be emitted, but hasn't been emitted during the handling of the node. Since its use is limited at two places, it should also be reset at those two places. - last_text_node_ends_with_collapsed_space_ BUG=721957 TEST=n/a; shouldn't have any behavioral change ==========
xiaochengh@chromium.org changed reviewers: + yosin@chromium.org
PTAL.
Description was changed from ========== Reorganize the maintenance of several text node related members in TextIterator The following three members are used only in text node handling, but are initialized/reset at multiple places. This patch moves their init/reset to HandleTextNode() since HandleTextNode() is called only once for each text node. - offset_ - handled_first_letter_ - first_letter_text_ The following member is used only when deciding whether there is a whitespace at the end of a text node that should be emitted, but hasn't been emitted during the handling of the node. Since its use is limited at two places, it should also be reset at those two places. - last_text_node_ends_with_collapsed_space_ BUG=721957 TEST=n/a; shouldn't have any behavioral change ========== to ========== Reorganize the maintenance of several text node related members in TextIterator Some members of TextIterator are used only by text node related functions, but are initialized/reset at multiple places in the class. This patch reorganizes them so that they are maintained solely by text node related functions/code. The following three members are used only in text node handling, but are initialized/reset at multiple places. This patch moves their init/reset to HandleTextNode() since HandleTextNode() is called only once for each text node. - offset_ - handled_first_letter_ - first_letter_text_ The following member is used only when deciding whether there is a whitespace at the end of a text node that should be emitted, but hasn't been emitted during the handling of the node. Since its use is limited at two places, it should also be reset at those two places. - last_text_node_ends_with_collapsed_space_ BUG=721957 TEST=n/a; shouldn't have any behavioral change ==========
rs lgtm
The CQ bit was checked by yosin@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
This CL has an open dependency (Issue 2902683005 Patch 80001). Please resolve the dependency and try again. If you are sure that there is no real dependency, please use one of the options listed in https://goo.gl/9Es4OR to land the CL.
Thanks for reviewing. Postponed to M61 in case of regressions.
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Whoops, I should have run layout tests locally before uploading... The reorganization of last_text_node_ends_with_collapsed_space_ is not successful yet. There are some scenarios where it should be cleared but not. Fixing...
Description was changed from ========== Reorganize the maintenance of several text node related members in TextIterator Some members of TextIterator are used only by text node related functions, but are initialized/reset at multiple places in the class. This patch reorganizes them so that they are maintained solely by text node related functions/code. The following three members are used only in text node handling, but are initialized/reset at multiple places. This patch moves their init/reset to HandleTextNode() since HandleTextNode() is called only once for each text node. - offset_ - handled_first_letter_ - first_letter_text_ The following member is used only when deciding whether there is a whitespace at the end of a text node that should be emitted, but hasn't been emitted during the handling of the node. Since its use is limited at two places, it should also be reset at those two places. - last_text_node_ends_with_collapsed_space_ BUG=721957 TEST=n/a; shouldn't have any behavioral change ========== to ========== Reorganize the maintenance of several text node related members in TextIterator Some members of TextIterator are used only by text node related functions, but are initialized/reset at multiple places in the class. This patch reorganizes them so that they are maintained solely by text node related functions/code. - offset_ - handled_first_letter_ - first_letter_text_ BUG=721957 TEST=n/a; shouldn't have any behavioral change ==========
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
I finally decided not to touch whitespace fixup code (last_text_node_ended_with_collapsed_space_). It's maintenance is too hacky and can't be properly encapsulated. Instead, I'm going to wrap its maintenance by the wrapper class, so that when switching to LayoutNG, the wrapper function can be replaced by no-op.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by xiaochengh@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yosin@chromium.org Link to the patchset: https://codereview.chromium.org/2896023003/#ps100001 (title: "Thu May 25 15:15:18 PDT 2017")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by xiaochengh@chromium.org
The CQ bit was checked by xiaochengh@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 100001, "attempt_start_ts": 1495854899527080, "parent_rev": "ff8d8838d10847c5c41b7e7bc6ee488ccebbcda2", "commit_rev": "2d8f80cfe9a0069c01a44d3f209b69e5186da2fc"}
Message was sent while issue was closed.
Description was changed from ========== Reorganize the maintenance of several text node related members in TextIterator Some members of TextIterator are used only by text node related functions, but are initialized/reset at multiple places in the class. This patch reorganizes them so that they are maintained solely by text node related functions/code. - offset_ - handled_first_letter_ - first_letter_text_ BUG=721957 TEST=n/a; shouldn't have any behavioral change ========== to ========== Reorganize the maintenance of several text node related members in TextIterator Some members of TextIterator are used only by text node related functions, but are initialized/reset at multiple places in the class. This patch reorganizes them so that they are maintained solely by text node related functions/code. - offset_ - handled_first_letter_ - first_letter_text_ BUG=721957 TEST=n/a; shouldn't have any behavioral change Review-Url: https://codereview.chromium.org/2896023003 Cr-Commit-Position: refs/heads/master@{#475231} Committed: https://chromium.googlesource.com/chromium/src/+/2d8f80cfe9a0069c01a44d3f209b... ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/2d8f80cfe9a0069c01a44d3f209b... |