Set up viewport and scissor according to the actual drawing buffer size.

BUG=303915
TEST=drawingbuffer-test.html on mac amd or intel
R=bajones@chromium.org, kbr@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167432 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Update MediaKeys and MediaKeySession lifetimes

MediaKeys objects live as long as JavaScript or HTMLMediaElement has a
reference to it.

MediaKeySession objects live as long as JavaScript has a reference to it
or MediaKeys still exists and !closed. So even if all JavaScript references
to MediaKeySession are gone, the MediaKeySession object remain so that
events from the CDM can still get passed to JavaScript. It will fire events
until MediaKeys goes away (indicating that the CDM is no longer needed)
or the session is closed by the CDM.

Also update MediaKeys to know when the context is going away so that it can
clean up.

BUG=341567
TEST=EME content tests pass

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167433 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Icons of "debugger" section overlaps...

BUG=344848
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167434 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add myself to more watchlists

Add myself to dom and css watchlists.

NOTRY=true
R=ch.dumez@samsung.com

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167435 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Adding debug leak guard to Canvas2DLayerBridge

R=senorblanco@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167436 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove DisableCompositingQueryAsserts from Interals.cpp

We need to update compositing before poking the animation engine.

BUG=343760

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167437 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fire canplaythrough after play and playing when autoplaying

The new test case is copied (with style adjustments) from
https://github.com/w3c/web-platform-tests/pull/636

Once it is imported under LayoutTests/w3c/web-platform-tests/ it should
be removed from LayoutTests/media/W3C/.

BUG=344531

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167438 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix garden-o-matic unittests

I broke these with my previous checkin

BUG=
R=abarth@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167439 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move almost all of CSSPropertyParser into CSSPropertyParser.cpp

This moves 8200 lines out of BisonCSSParser leaving only 1700 lines left. :)

When I split CSSPropertyParser from BisonCSSParser I left
all the code in BisonCSSParser-in.cpp to make the diff
small and to avoid conflicting with others changes.

Now I'm moving (almost) all of CSSPropertyParser into the
correct .cpp file.

The only bit left is some transform parsing code which uses
the -in.cpp preprocessor bits of BisonCSSParser.  Its
the only code which uses this fancy SWITCH/CASE preprocessor
and should just be moved out into its own file.

BUG=330389
R=abarth@chromium.org
TBR=abarth

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167440 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove compositing chicken/egg issues in RenderObject::adjustStyleDifference

Previously, this could would query compositing state to determine what sort of
style difference a translate or similar CSS change ought to be treated as.
Instead of querying the compositing state, this CL moves us to just using the
direct reasons for compositing. In the comon case, when we have a composited
layer, the direct reasons for compositing will contain that information. In the
uncommon case, where we have a compositing layer for another reason, we'll end
up doing some extra work.

This CL resolves the chicken/egg problems in this function because we can
compute the direct compositing reasons incrementally without needing to
recompute the indirect reasons for compositing (which involve global
information about the page, e.g., about the positions of various elements).

R=esprehn@chromium.org
BUG=339848

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167141

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167441 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Convert Garden-o-matic network code to Promises

This is part of a larger refactoring to simplify (and hopefully speed up) garden-o-matic.

BUG=
R=abarth@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167442 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use data driven code when registering Element constructors.

For more compact initialization code. Because I want to.

R=adamk@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167443 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Get rid of inefficient uses of childNodeCount()

Get rid of inefficient uses of childNodeCount() as this method can be costly.
Its implementation needs to traverse the node's direct children in the DOM tree
in order to count them. A lot of callers wrongly assume calling
childNodeCount() is cheap.

In a lot of cases, the callers simply want to know if the node has any children
or it is has exactly one child. hasChildNodes() / hasOneChild() methods provide
the same information much more efficiently.

In some cases, we already know the node is a ContainerNode but call the
Node::childNodeCount() method instead of ContainerNode::childNodeCount() which
bypasses the isContainerNode() check.

Finally, the caller sometimes wants to traverse all the direct children and
uses childNodeCount() / childNode(index) to do so. This causes the children to
be traversed twice (even more when childNodeCount() is used as loop condition
and not cached before the loop). In this case, it is best to use the traversal
API (NodeTraversal / ElementTraversal).

R=adamk, eseidel

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167444 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 167430 "Disabled newly added visible content rect tests."

> Disabled newly added visible content rect tests.
> 
> Tests were broken on Android. Disabling to allow a Blink roll while I
> fix the tests.
> 
> TBR=bokan@chromium.org
> 
> Review URL: https://codereview.chromium.org/162613009

TBR=acolwell@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167445 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 167342 "Fixed visible contents size calculation under sca..."

> Fixed visible contents size calculation under scale with scrollbars.
> 
> The visible contents rects calculated in FrameView didn't account
> properly for scrollbars when scaled. With the desktop pinch we need
> to include the fact that scrollbars will scale along with the page.
> This patch changes the visibleContentsRect method to subtract the
> scrollbar thickness only after converting to CSS pixels.
> 
> Additionally, WebViewImpl's method to clamp scroll offset at a
> certain scale also did not account for scaled scrollbars.
> 
> BUG=336539
> 
> Review URL: https://codereview.chromium.org/151453003

TBR=bokan@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167446 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert "Move almost all of CSSPropertyParser into CSSPropertyParser.cpp"

This appears to have broken Mac?

This reverts commit 826851cea564ad3094369df65625f3831da80979.

git-svn-id: svn://svn.chromium.org/blink/trunk@167447 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert 167313 "We've replaced SharedPersistent with ScopedPersis..."

This is a speculative revert to fix failures in interactive_tests in windows.
http://build.chromium.org/p/chromium.webkit/builders/Win7%20%28dbg%29/builds/13518


> We've replaced SharedPersistent with ScopedPersistent or ScriptValue before, but a couple of SharedPersistents are remaining. So this CL replaces them.
> 
> Ideally we want to remove SharedPersistent though.
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165751
> 
> Review URL: https://codereview.chromium.org/146523002

TBR=haraken@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167448 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add core/timing/ objects to USED_FROM_MULTIPLE_THREADS

After r167398, test_resource_dedicated_worker.html was failing because UserTiming is touched by workers. This CL adds UserTiming and other objects in core/timing/ to USED_FROM_MULTIPLE_THREADS.

BUG=340522
R=tkent@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167450 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove JSON and Pickle from idl_compiler.py

No longer needed, as .h/.cpp output identical.
(JSON and pickle were to check that parse tree was the same with Perl.)

BUG=345137
TBR=haraken
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167451 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use binary search in UnicodeRangeSet::intersectsWith()

This makes FontFaceSet#load() and #check() faster, when there are font
faces with many unicode ranges.
- Make sure m_ranges is sorted and non-overlapping.
- Use binary search in intersectsWith().
- Add unit test for UnicodeRangeSet.

BUG=
TEST=webkit_unit_tests

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

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