commit | 71e551ac476ec9b247be8f19c6eb696632d90cf4 | [log] [tgz] |
---|---|---|
author | Rakina Zata Amni <rakina@chromium.org> | Fri Dec 14 16:15:49 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Dec 14 16:15:49 2018 |
tree | 61a3f879088efadd2cb8f55c9db66e2595131887 | |
parent | ecd24deef98b86289496029088c50d14e615a92f [diff] |
Find-in-page per block using FindBuffer This CL introduces FindBuffer, which Find-in-page will use to find matches instead of using FindPlainText that uses TextIterator. Since find-in-page matches can't span multiple blocks, we are using that fact to know where we can separate the text in the document. FindBuffer collects text one block at a time, and then finds the match in that block. We trigger FindBuffer text collection & finding many times until it goes through everything. FindInPage uses TextSearcherICU to find text, and uses flat-tree traversal, ComputedStyle, and LayoutObject + NGOffsetMapping, whereas the previous way was to use TextIterator. This CL also changes the way we handle newlines - newlines will be saved as object replacement character/whitespaces for Find-in-page purposes. Some tests that rely on newlines are deleted as a result. Note: This change is not user-visible because it is not possible to do a Find-in-page from the UI with newlines. See doc for details: https://docs.google.com/document/d/1D5q7ZMrLPfilXnIGI3SOL0mwdiQC7SQEtGWk-9ysbMg/edit?usp=sharing Bug: 868227 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: Id5dd7e6c428f59442d02ec88ea0cec6eb4e64c22 Reviewed-on: https://chromium-review.googlesource.com/c/1282425 Commit-Queue: Rakina Zata Amni <rakina@chromium.org> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#616701}
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 .