Eliminate flakiness for inspector/styles/pseudo-elements.html

Explicitly wait for the elements tree to update.

R=pfeldman, vsevik

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

git-svn-id: svn://svn.chromium.org/blink/trunk@158711 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Media query malformed when 'or' is used as a media type.

The Media Queries errata[1] dated 2013-06-27 includes 'or' in the list of
reserved keywords that will result in a malformed media query instead of an
unknown media type when used as a media type.

[1] http://www.w3.org/Style/2012/REC-mediaqueries-20120619-errata.html

BUG=288213

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

git-svn-id: svn://svn.chromium.org/blink/trunk@158713 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Process the 'autofocus' attribute upon dialog.showModal()

This change just handles autofocusing as described in the
WHATWG spec: on subject.showModal, give focus to the
"first element in tree order whose nearest ancestor
dialog element is subject and that has an autofocus
attribute specified, if any."

Probably, the first focusable child should get focus if
nothing was autofocused, but that spec is still in
progress:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=23366

This patch introduces isAutofocusable and
shouldAutofocusOnAttach, since the steps for autofocusing
on node insertion and on dialog.showModal differ in
the spec.

Although the spec just says to autofocus
elements with the "autofocus" attribute, our existing
behavior is to not autofocus elements who don't have an
autofocus IDL attribute, e.g., using
setAttribute('autofocus') on an <output> won't give it 
focus. This is consistent with Firefox's behavior.
So the check of the element tags in isAutofocus() remains
for dialog.showModal.


BUG=298079

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

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