Generate existing casting functions with DEFINE_TYPE_CASTS and friends.

BUG=309516

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164065 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove unused functions in HTMLInputElement, InputTypes, and StepRange.

Remove:
 - HTMLInputElement::canHaveSelection()
 - HTMLInputElement::accept()
 - HTMLInputElement::visibleValue()
 - HTMLInputElement::isColorControl()
 - HTMLInputElement::isSubmitButton()
 - HTMLInputElement::icon() declaration
 - HTMLInputElement::supportsMaxLength()
 - InputType::parseToDateComponents()
 - InputType::shouldResetOnDocumentActivation()
 - InputType::isSubmitButton()
 - PasswordInputType::shouldResetOnDocumentActivation()
 - StepRange::stepScaleFactor()
 - SubmitInputType::isSubmitButton()

Remove InputType::parseToDateComponents(), and make
BaseDateAndTimeInputType::parseToDateComponents() non-virtual.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164066 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: fix inconsistent constructor exceptions

Currently the Perl CG generates failedToExecute exceptions instead of
failedToConstruct exceptions in some cases for constructors.
(This turned up when porting to Python.)
This regularizes it, and removes a number of hacks in Python.

Followup to:
IDL compiler: [NamedConstructor] arguments
https://codereview.chromium.org/116803006/
...but can actually be reviewed in either order.

R=haraken
CC=kouhei

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164067 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Update test .woff2 font file and re-enable woff2 test

The compression algorithm of WOFF 2.0 has switched from LZMA to Brotli.
This patch updates Ahem.woff2 to an "uncompressed" (pre-processing only)
woff2 format, since we expect some incompatible changes in Brotli binary
format. Also re-enables fast/css/font-face-woff2.html test.

Ahem.woff2 is generated from Ahem.ttf in the same directory
using font-compression-reference tool[1] with the following command:

java -cp build/jar/compression.jar \
  com.google.typography.font.compression.CompressionRunner \
  -x glyf/cbbox,triplet,code,reslice:woff2 -o Ahem.ttf

[1] https://code.google.com/p/font-compression-reference/
    revision 5ce8fad3ab9824f9f4d5fb4768c313b6309e94e3

BUG=307828

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

git-svn-id: svn://svn.chromium.org/blink/trunk@164068 bbb929c8-8fbe-4397-9dbb-9b2b20218538
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.

BUG=276757

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

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