minor cleanup and gardening after the mac rebaselining from the weekend.

TBR=
BUG=264088

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

git-svn-id: svn://svn.chromium.org/blink/trunk@155541 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't assert wrapping Custom Element type extensions of HTMLElements.

Some HTML elements such as SECTION don't have a distinct DOM
interface; they just use HTMLElement. When one of these is used as a
Custom Elements type extension, Custom Elements wrapping machinery
needs to produce a "direct" wrapper, just like when they're wrapped by
usual means.

This defect was found by the fuzzing described in
<http://crbug.com/234509#c40>.

BUG=234509

Review URL: https://chromiumcodereview.appspot.com/22057003

git-svn-id: svn://svn.chromium.org/blink/trunk@155542 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Manually "restore" context, instead of using save/restore when RenderLayerBacking paints.

Assuming that RenderLayer painting code does not change the transform
state of the context, then RenderLayerBacking can avoid a potentially
costly context save/restore.  Instead, we can just manually undo the
one translation that was applied in when RenderLayerBacking paints,
to be equivalent to a "restore".

It is worth noting that we had already been relying on this assumption
for a while. Only recently in r155466 was this assumption removed.  But
this new code that uses save/restore may have caused a slight perf
regression.

BUG=268273

Review URL: https://chromiumcodereview.appspot.com/22177002

git-svn-id: svn://svn.chromium.org/blink/trunk@155543 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Enhancements to PartitionAlloc to support threading and arbitrary allocation sizes.

BUG=267094
TEST=WTF_PartitionAlloc.GenericAlloc
R=abarth@chromium.org, tsepez@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@155544 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix orphan needsLayout state in RenderTextControlSingleLine.

We should mark a renderer for containerElement, which wraps
innerTextElement and innerBlockElement in cases of input[type=search] or
input[type=number].

BUG=267194

Review URL: https://chromiumcodereview.appspot.com/21697003

git-svn-id: svn://svn.chromium.org/blink/trunk@155545 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Allow eviction of ImageBitmaps that are created from ImageElements.

We hold a reference to the HTMLImageElement in the ImageBitmap but elevate the priority of 
its CachedResource. Cropping is handled at drawing time.

Some style changes are also being introduced in this patch.
 
BUG=259947, 166658

Review URL: https://chromiumcodereview.appspot.com/19393004

git-svn-id: svn://svn.chromium.org/blink/trunk@155546 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Enable indexing based search across all files implementation.

TBR=pfeldman

Review URL: https://chromiumcodereview.appspot.com/21936002

git-svn-id: svn://svn.chromium.org/blink/trunk@155547 bbb929c8-8fbe-4397-9dbb-9b2b20218538
update appcache expectations for the two failing tests to match reality.

TBR=michaeln@chromium.org
BUG=268111

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

git-svn-id: svn://svn.chromium.org/blink/trunk@155548 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove ContentSelectorQuery and simplify <content select> distribution

Looking at the ShadowDOM/LargeDistributionWithLayout perf test in Instruments we spend
substantial amounts of time inside getAttribute and virtual calls during distribution. There's
a lot of unneeded abstractions in distribution that aren't needed, like matchTypeFor(Node*)
where we always ignore the Node argument, or the the virtual selectList(). We also did lots
of extra work like copying the list of selectors into a vector in ContentSelectorDataList
when we could just iterate the list directly instead.

This patch removes all the virtual abstractions and instead uses isHTMLContentElement to check
for the insertion point type. It also inlines lots of calls so that inside the loop in
ContentDistributor::distributeSelectionsTo we don't need to make any function calls at all
if there's no select attribute, and even if there is we only need to make function calls
for running the selector itself. I also removed the calls to getAttribute that were hiding
inside HTMLContentElement::select() which are very expensive to do repeatedly.

This patch makes LargeDistributionWithLayout another 11% faster.

R=dglazkov@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@155549 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove even more tests that have been migrated to v8.

R=adamk@chromium.org, machenbach@chromium.org
BUG=237872

Review URL: https://chromiumcodereview.appspot.com/22281002

git-svn-id: svn://svn.chromium.org/blink/trunk@155550 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove GCC 4 workaround for DEFINE_STATIC_LOCAL

We no longer build with GCC 4 so this special casing can be removed.
After discussing this with Abarth, DEFINE_STATIC_LOCAL does have some
value on its own so I'm leaving that in for now.

R=abarth
BUG=263695

Review URL: https://chromiumcodereview.appspot.com/22266003

git-svn-id: svn://svn.chromium.org/blink/trunk@155551 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Ensure there's a document before adding Resource Timing.

BUG=265532

Review URL: https://chromiumcodereview.appspot.com/22015002

git-svn-id: svn://svn.chromium.org/blink/trunk@155552 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove 'String::append' from 'Source/core/dom/QualifiedName.cpp'

BUG=268281

Review URL: https://chromiumcodereview.appspot.com/21981004

git-svn-id: svn://svn.chromium.org/blink/trunk@155553 bbb929c8-8fbe-4397-9dbb-9b2b20218538
New positioning model: Simple shape-margin tests

Update simple shape-margin tests to work with new positioning model.
Also move them to the CSSWG's repo.

BUG=260357

Review URL: https://chromiumcodereview.appspot.com/22276002

git-svn-id: svn://svn.chromium.org/blink/trunk@155554 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Allow grid positions to be named grid areas

This change extends our handling of grid position to allow for
named grid areas. This required to split the shorthands parsing
between grid-{row|column} and grid-area as the rules for expanding
are slightly different.  The patch reuses a lot of the existing logic
to marshall the values into RenderStyle.

One big difference after this change is that:

grid-row: foobar / none;

used to be rejected at parsing but is now allowed.

BUG=258092

Review URL: https://chromiumcodereview.appspot.com/22215002

git-svn-id: svn://svn.chromium.org/blink/trunk@155555 bbb929c8-8fbe-4397-9dbb-9b2b20218538
ExceptionState has some code that was useful during the
transition from ExceptionCode. Remove that code now that
the code base has switched to ExceptionState.

This removes the to bool, to ExceptionCode as well as assign from
ExceptionCode

BUG=252233

Review URL: https://chromiumcodereview.appspot.com/22274002

git-svn-id: svn://svn.chromium.org/blink/trunk@155556 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Use TrackExceptionState instead of NonThrowExceptionState

I somehow ended up with two classes doing the same thing. This removes
NonThrowExceptionState in favor of TrackExceptionState.

BUG=252233
TBR=abarth

Review URL: https://chromiumcodereview.appspot.com/22280003

git-svn-id: svn://svn.chromium.org/blink/trunk@155557 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Do not dispatch 'focus' or 'blur' event twice when window active state is changed.

* Bug
On Windows, 'focus' event for the window object or a focused element is
dispatched twice when the browser tab gets active, and 'blue' evnet is
dispatched twice when the browser tab gets inactive.
On OSX, 'blur' evnet is dispatched twice when the browser tab gets inactive.
On Android, we don't have this bug.

* Root cause
Focus/blue event is dispatched in dispatchEventsOnWindowAndFocusedNode
in these cases. FocusController::setFocused(bool) calls it, and
FocusController::setActive(bool) also calls it if setFocused(true) was
already called.

On Windows, these functions are called in the following sequence:
  Activation:
    WebView::setFocus(true)
      FocusController::setFocused(true)
      FocusController::setActive(true)
    WebView::setIsActive(true)
  Inactivation:
    WebView::setIsActive(false)
      FocusController::setActive(false)
    WebView::setFocus(false)
      FocusController::setFocused(false)

On OSX, these functions are called in the following sequence:
  Activation:
    WebView::setIsActive(true)
      FocusController::setActive(true)
    WebView::setFocus(true)
      FocusController::setFocused(true)
      FocusController::setActive(true)
  Inactivation:
    WebView::setIsActive(false)
      FocusController::setActive(false)
    WebView::setFocus(false)
      FocusController::setFocused(false);

On Android, these functions are called in the following sequence:
  Activation:
    WebView::setFocus(true)
      FocusController::setFocused(true)
      FocusController::setActive(true)
  Inactivation:
    WebView::setFocus(false)
      FocusController::setFocused(false);

* Fix
We don't need to call dispatchEventsOnWindowAndFocusedNode in
setActive() because we don't make a window focused state true when the
window is inactive.

BUG=117307

Review URL: https://chromiumcodereview.appspot.com/22076003

git-svn-id: svn://svn.chromium.org/blink/trunk@155558 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Mark a test flaky

which is svg/custom/foreign-object-skew.svg.

TBR=pdr
BUG=268692

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

git-svn-id: svn://svn.chromium.org/blink/trunk@155559 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Text decorations should be listed as non-inheritable

Both "text-decoration" specs (CSS 2.1, CSS 3) and "text-decoration-line
spec (CSS 3) states these properties are not inherited (w/ exceptions,
which are currently handled by -in-effect property), however those were
listed as inherited for no reason - thus preserving behavior as shown by
layout test results.

BUG=165462

Review URL: https://chromiumcodereview.appspot.com/20751008

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