DevTools: refactor filtered item dialog: use delegate-based scoring.

R=vsevik@chromium.org

Review URL: https://codereview.chromium.org/17083002

git-svn-id: svn://svn.chromium.org/blink/trunk@152728 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix a case where history state is changed while a client redirect is in process.

We set a new load as a client redirect if it is started with the
lockBackForwardList flag set or if it is the first load in its context and
about:blank (the later case is implemented in
HistoryController::currentItemShouldBeReplaced). Before r149960, this check was
performed when the navigation was scheduled, but after, it is scheduled when
the load is actually started. Between those two events, it's possible that
other actions (e.g. history.pushState) can modify the history state. In that
case, currentItemShouldBeReplaced() will return false and the history will have
a spurious entry, causing back button behavior to go to a blank page.

Therefore, if currentItemShouldBeReplaced() is true at start time for loads
that are candidates for locking back/foward list, override the
lockBackForwardList flag.

BUG=244780
TEST=http/tests/history/client-redirect-after-push-state.html

Review URL: https://chromiumcodereview.appspot.com/17239004

git-svn-id: svn://svn.chromium.org/blink/trunk@152729 bbb929c8-8fbe-4397-9dbb-9b2b20218538