Remove WebPopupMenuImpl::enterForceCompositingMode

Create the compositor in WebPopupMenuImpl::initialize because it's always going to be used.

BUG=378029

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175160 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Implement navigator.languages.

Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-navigator-languages

BUG=365123

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175161 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make HTMLImportTreeNode own the whole import tree.

Since the lifetimes of HTMLImportTreeNode and all of its
descendants are inextricably linked, it makes sense for
all ownership responsibilities to be transfered from
HTMLImportsController to HTMLImportTreeNode.

No functional changes, refactoring.

R=morrita
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175162 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use localToContainerPoint when checking mapToContainer result

The mapToContainer method is calculating the value in relation
to the container, but when we verify the result we calculate
the localToAbsolute value. This doesn't take the container
into account so we get the wrong values.

BUG=371640

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175163 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fixed layout test fast/canvas/canvas-bg.html to work with accelerated canvas

This patch removes the semi-transparent color used int the test, which
was irrelevant to the feature being testes and was causing the test
to fail due to rounding errors in compositing.

BUG=368008

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175164 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Increase repaint test delay when running in browser

When running a repaint test in browser, sometimes we may want to see
the page contents before and after repaintTest(). The origianl 100ms
delay seems too short to show the page contents before repaintTest().

This may be more useful when we have repaint overlay feature when
showing layout test results (https://codereview.chromium.org/303223008/).

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175165 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Enable Skia discardable memory path on Android

With this change Android will stop using the old discardable memory path
and will use Skia's implementation of discardable memory and caching.

Tested on Android with ChromeShell.

BUG=169282

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175166 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make the bridge_id in WebGeolocationPermissionRequestManager be unique per process.

Right now it's unique per view, but as part of converting the content side code to use frames instead of views in https://codereview.chromium.org/303503008/ we need this to be unique per view. That can change back in the future once all the permission-related code in the browser (PermissionRequestID in particular) is converted.

BUG=304341

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175167 bbb929c8-8fbe-4397-9dbb-9b2b20218538
move to new ImageGenerator API

This will allow us to remove SK_SUPPORT_LEGACY_IMAGEGENERATORAPI

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175168 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make importNode work when the XML document contains a CDATA section

Make importNode work when the XML document contains a CDATA section
by avoiding calling createCDATASection since createCDATASection
throws an exception for HTML Documents.

The new behavior matches Firefox.

BUG=340059

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175169 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r174930

http://src.chromium.org/viewvc/blink?view=revision&revision=174930

BUG=373240
TBR=dominik.rottsches@intel.com

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175170 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Skip child ShadowRoots when invalidation does not have boundary crossing rules

When the only things that changed are not tree boundary crossing rules we
can skip invalidation in descendant ShadowRoots. This means that
if you have lots of nested components with duplicate class names then using
a descendant selector in an enclosing component won't invalidate style in
nested ShadowRoots.

I also packed the booleans on DescendantInvalidationSet since we keep growing
it with new flags.

In the future we can make this tree boundary crossing logic even smarter so that
if you have both tree boundary and not tree boundary crossing invalidation
sets on the same subtree we can skip running the non-tree boundary crossing
rules when recursing into a ShadowRoot.

I also took this as an opportunity to clean up the addFeaturesToInvalidationSets
logic and merged the new treeBoundaryCrossing flag and the wholeSubtreeInvalid
flag into the InvalidationSetFeatures.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175171 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Combine background repaint conditions in RenderStyle and RenderObject

Combined RenderStyle::needsFullRepaintOnContainer(Width|Height)Change
and local function mustRepaintFillLayers() in RenderObject.cpp into
RenderObject::mustRepaintFillLayersOn(Width|Height)Change.

Added missing logics of the original mustRepaintFillLayers():
- repaint if background-repeat is not repeat and no-repeat;
- repaint if background-position is not left or top origin;
- don't repaint if background-position is of fixed length;

TEST=fast/repaint/background-resize-width.html
TEST=fast/repaint/background-resize-height.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175172 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix incorrectly disabled SSE2 WebAudio optimizations for Windows.

MSVC doesn't set __SSE__ or__SSE2__ defines:

http://msdn.microsoft.com/en-us/library/b0084kay.aspx

BUG=349320
TEST=compiles

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175173 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Speculative fix for null m_documentLoader deref in FrameLoader::loadInSameDocument

This should fix an uncommon crash during history traversal.

I believe the steps to get into this state are:
1. Load a page with a slow-loading iframe. The iframe load must begin before the main frame's load event fires.
2. While the iframe is still in the provisional load state, attempt a same-document history navigation in the child frame.
3. The child frame's provisional load is cancelled by the history navigation in FrameLoader::loadInSameDocument, which in turn causes the parent frame's load event to fire synchronously.
4. The parent frame's onload event handler detaches the iframe.
5. No checks are performed after cancelling the provisional load in FrameLoader::loadInSameDocument, leading to a null deref and crash.

We should be able to prevent a crash in this case by checking whether the frame is still attached after cancelling the provisional load in FrameLoader::loadInSameDocument.

BUG=374391

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175174 bbb929c8-8fbe-4397-9dbb-9b2b20218538
The issue is summarized here:  https://github.com/WebAudio/web-audio-api/issues/324

This CL can't solve all issues when the source position approaches the listener position because when the locations are equal, we get a singular point in the equations.

This just makes it continuous as the source approaches the listener. If the source then goes past, there will be a unavoidable discontinuity.

TEST=Listen to http://jsfiddle.net/UxwGP/10. When the slider position is 0, there should be no sudden change in pitch.

TEST=Listen to http://jsfiddle.net/qWHAt/34/ using mono source and HRTF panner.  Initially, the pitch is very low. Move the slider just to the left or right of center and the pitch goes up. As you move the slider through center slowly, the pitch drops drastically at center.  With this CL, this the pitch does not start out low, and as you move the slider around, the pitch never drops low at center. There is a discontinuity moving from left to right, but this is because the source was moving away from the listener and is not moving towards the listener.

BUG=141739

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175175 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Heap-use-after-free in WebCore::GraphicsContext::drawImage

Replaced getShapeImageAndRect() in ShapeOutsideInfo.cpp with
ShapeOutsideInfo::createShapeForImage(). The original function
failed to protect the PassRefPtr return value returned by StyleImage::image(). 

BUG=378469

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175176 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Unreviewed Win XP rebaselines for r175038, part 7

Windows XP specific rebaselines for r175038 as the XP > Win7 fallback is
no longer valid for text tests.

TBR=dglazkov@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175178 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use method registration approach for creating events on core and modules.

BUG=376506

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175179 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Auto-rebaseline for r174992

http://src.chromium.org/viewvc/blink?view=revision&revision=174992

BUG=164167
TBR=eae@chromium.org

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

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