Fixed issue where multiple WebGL contexts could not be created in some circumstances.

BUG=319265
TEST=run the following command line: "content/test/gpu/run_gpu_test webgl_conformance --webgl-conformance-version=1.0.3 --page-filter=context-creation.html"

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

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

It is only used by the VTT code, so keep only VTTCueBox.

BUG=270340

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163149 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix inspector-protocol/heap-profiler/heap-objects-tracking.html crash in debug mode

I added reportProgress option which allows us to mute snapshot progress update events in the protocol test and avoid renderer crash. In all other cases this option should be true. When the protocol test run in their own process we will deprecated and remove this option.

BUG=325209

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163150 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Allow resource loads inside page unload events

https://src.chromium.org/viewvc/blink?revision=154852&view=revision appears
to have inadvertently caused ResourceFetcher::shouldLoadNewResource() to return
false inside of unload events. This is because activeDocumentLoader() has
switched to the provisional document loader, but the request is coming from
the committed document loader.

Test written by sigbjornf@opera.com

BUG=321241
TEST=http/tests/xmlhttprequest/xmlhttprequest-unload-sync.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163151 bbb929c8-8fbe-4397-9dbb-9b2b20218538
CSSSegmentedFontFaceCache should not know about Document.

1) Remove dependency on Document (and core/dom, for that matter)
in CSSSegmentedFontFaceCache
2) Shorten function names to make the sounds sweet.

This removes another place where CSSFontSelector is expected to know
about Document.

R=eae,eseidel,ksakamoto@chromium.org
BUG=324991

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163152 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: [CustomToV8] interface

BUG=239771

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163153 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Extract HTMLImportData from HTMLImportLoader

This change is a preparation of crbug.com/306292.
To fix it, an import tree loader needs "pending" state
and wait preceeding import being loaded.

This change extract HTMLImportData from HTMLImportLoader,
which allows the loader to be "pending" state, by
having null "data" object.

To dedup imports, each HTMLImportData object can be shared
by multiple loaders. Before this change, the loader was
shared for handling duplication.

BUG=306292
R=dglazkov, tkent
TEST=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163154 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[HTML Imports] Support linked stylesheet

This change unblocks stylesheet links in imported documents being loaded.
As stylesheet loading should block script execution, the style links
in imports tells the master document that it is loading a stylesheet.

BUG=319151
R=esprehn,ojan,dglazkov
TEST=import-style-link.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163155 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix resolution MQ not reacting to page zoom changes

Resolution media queries weren't considered as viewport dependant, and therefore weren't reacting to pagezoom changes.
Since resolution/DPR are dependant on page zoom, these MQs should react to page zoom changes.
This fix adds these MQs to the list of viewport dependant MQs, and adds a test to prevent future regressions.

BUG=325230

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163156 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't allow calling Element::styleForRenderer() outside recalcStyle

I noticed this being called in a recent web animations patch inside
a loop and outside recalcStyle which would cause us to rule match
repeatedly since we can no longer style share outside recalcStyle. Worse
there's no bloom filter outside recalcStyle so this was going to the super
slow path.

Nothing should ever call this that's not part of the recalcStyle process,
so add ASSERTs to ensure that.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163157 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Makes blending methods in WebLayer.h pure virtuals. Adds a layout test.

- makes blendMode() and isRootForIsolatedGroup() pure virtuals
  (the Chromium code does implement these now)
- adds a layout reftest testing clipping layers with blending. This
  reftest has been reviewed with http://crrev.com/23511004/, but it
  couldn't pass because compositor-renderer bindings were
  not submitted yet.

BUG=243223

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163158 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: [RuntimeEnabled] interfaces

Straightforward, also fixes an indentation error in the Perl.
(Slightly awkward to do cleanly, though Jinja isn't bad.)

BUG=239771

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163159 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make VTTParser::collectDigitsToInt non-copying

Modify VTTParser::collectDigits to simply count the number of digits and
advance the position. Rename it to scanDigits and make it local to the
compilation unit.
Convert users of collectDigits to use scanDigits instead. For
collectDigitsToInt this means that there's no longer a need to copy the
digits into a temporary String. Similarly for parseFloatPercentageValue.

Also fixes a minor issue in parseFloatPercentageValue where the endpoints
(0 and 100) were excluded from the range of valid values rather than
included.

BUG=305317

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163160 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION to generate toSVGSMILElement()

DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION supports more plenty toFoo helper functions than
manual toFoo(). This cl changes isSMILElement from static member to inline function to generate
toSVGSMILElement().

BUG=309516

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163161 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Do not make a subclass of Text only to disable selection.

We can avoid text selection by adding -webkit-user-select:none to button input
elements.

We udpate some rendering tests because of slight text color differences and
margin selection paint difference. They are acceptable because they are very
minor differences.

BUG=265699
TEST=Covered by existing tests.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@163162 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: remove [MasqueradesAsUndefined]

This removes the [MasqueradesAsUndefined] extended attribute, instead
including a special case for the one interface that uses it.
(HTMLAllCollection, for document.all)

Response to request of haraken@:
https://codereview.chromium.org/103753002/#msg2

* No changes to generated code.
* Removed from IDLExtendedAttributes.txt
* Docs updated to remove mention.
https://sites.google.com/a/chromium.org/dev/blink/webidl/blink-idl-extended-attributes

BUG=239771

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

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