Have Element::ensureUniqueElementData() return a reference

Have Element::ensureUniqueElementData() return a reference instead of a pointer
as it can never return null. It makes the calling code look safer.

R=adamk

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167962 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix more leaks in the blink unit tests.

WebFrameClients need to call WebFrame::close() in frameDetached();
otherwise the reference will leak.

BUG=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167963 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Have Node::highestAncestor() return a reference

Have Node::highestAncestor() return a reference instead of a pointer as it can
never return null. This makes the calling code look safer.

R=adamk

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167964 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Compositing update calls RenderLayerStackingNode::isStackingContext too much

This CL simplifies isStackingContext and makes RenderLayer call
isStackingContext fewer times. This function is hot on the compositing update
profile for toggle_drawer in the Silk page set. After this change, I didn't see
a big change to the profile, but it's silly to do all this work twice.

R=esprehn@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167965 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix bug in which not all style invalidation dirty bits were being cleared
when whole-subtree invalidation was triggered.

BUG=346928

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167966 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Adds sha256/384/512 support to CSP script-hash and style-hash.

The Content Security Policy 1.1 spec calls for script-hash and style-hash to
support the regular suite of sha-2 hashes. This implements support for those
hashes under the CSP experimental flag.

BUG=327826

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167967 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Apply .globalAlpha to SVG-images painted using <canvas> drawImage()

BUG=261177

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

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

This function is essentially unchanged since it was moved to C++ in http://src.chromium.org/viewvc/blink?revision=18541&view=revision

It includes a clause where we check the original url as well as the actual url to determine if we should treat the URL as same. This is counter-intuitive and unnecessary. Replace all shouldTreatURLAsSameAsCurrent() with checks against the new DocumentLoader::urlForHistory(), which checks either the url or the SubstituteData::failingURL() if one exists.

This is also the only use of HistoryItem::m_originalURLString, so remove that, too.

BUG=340277
TEST=http/tests/navigation/back-to-get-after-post.php

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167971 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove the TextTrackCue constructor

Intent to Remove:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/R34xpMQGtXU/XwXsi85Y7acJ

BUG=346235

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167972 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make Element::ensureActiveAnimations() return a reference

Make Element::ensureActiveAnimations() return a reference instead of a pointer
as it can never return null. This makes the calling code look safer.

R=adamk

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

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