Commit a153ff0d authored by dpapad's avatar dpapad Committed by Commit bot

MD Settings: Second iteration of search within settings.

 - Force render parts of the page that should be searched but
   are currently not rendered.
 - Ensuring that searching code yields often enough to the main
   thread to prevent UI freeze.

Specifically
 - Adding three types of tasks TopLevelSearchTask, SearchTask and
   RenderTask.
 - Adding a task manager class, which yields before executing a
   task by using window.requestIdleCallback().
 - Canceling obsolete tasks (happens when a new search is issued after the
   task was posted but before it made it to the front of the queue).

BUG=608535
TEST=Navigate to chrome://md-settings. Search for a term that exists in
an unrendered sub-page, for example "engine". Navigate to the subpage by
clicking "Manage search engines". Notice that matches are magically
highlighted even though this subpage was not rendered when the search was
initiated.

CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2103133007
Cr-Commit-Position: refs/heads/master@{#405232}
parent cdc2bb46
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment