commit | 7561162385945b6d42cee97ae3ebfdaa388f5950 | [log] [tgz] |
---|---|---|
author | Xiaocheng Hu <xiaochengh@chromium.org> | Wed Oct 10 19:29:09 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Oct 10 19:29:09 2018 |
tree | 36d3a5c8b8140e0dc345143bb8d0c62e83214ebe | |
parent | 949b920b0bc71c1c6880c9639beeefbb876f8555 [diff] |
[LayoutNG] Report the correct text box info for dom snapshot Current LayoutNG implementation of LayoutText::GetTextBoxInfo() simply dumps text fragment info, which does not necessary match the legacy text box info expected by the API. This patch adds the missing parts: - Legacy text boxes are broken at collapsed whitespaces but NG fragments are not. This patch uses NGOffsetMapping to help break the fragment at collapsed whitespaces. - Legacy text boxes' start offset references the LayoutText::GetText() string. This patch converts the fragments' start offsets back onto the LayoutText string. Bug: 636993 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: Ib28f2a2382930ae5c1d1de7e85ea771ca19037cc Reviewed-on: https://chromium-review.googlesource.com/c/1274051 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#598451}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .