Don't dispatch blur/focus events if the element's page is not focused.

When the page loses focus a blur event is dispatched once, prevent a second dispatch (via e.g. programmatic blur()-ing), when a page doesn't have focus, prevent a focus event dispatch (via e.g. programmatic focus()-ing), as it will receive a focus event when the page regains focus.

R=tkent@chromium.org
BUG=276757

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

git-svn-id: svn://svn.chromium.org/blink/trunk@160036 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed