• dpapad's avatar
    MD Settings: Second iteration of search within settings. · a153ff0d
    dpapad authored
     - 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}
    a153ff0d
search_settings.js 12.2 KB