Enable a srcset 0x descriptor

According to recent spec changes, a "0x" descriptor should be correctly parsed,
and imply intrinsic dimensions of infinity to the image.
This CL enables that, and tests that intrinsic dimensions are impacted accordingly.

BUG=378252

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175196 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert of Enable a srcset 0x descriptor (https://codereview.chromium.org/305643006/)

Reason for revert:
This patch closed the tree with a '"update" on "Win7 Tests"' message. Reverting

Original issue's description:
> Enable a srcset 0x descriptor
> 
> According to recent spec changes, a "0x" descriptor should be correctly parsed,
> and imply intrinsic dimensions of infinity to the image.
> This CL enables that, and tests that intrinsic dimensions are impacted accordingly.
> 
> BUG=378252
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175196

TBR=eseidel@chromium.org,pdr@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=378252

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175197 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify & optimize StringImpl::replace(UChar, UChar)

StringImpl::replace(UChar, UChar) is mentioned as one of the
hot spots by the Intel VTune Amplifier profile when running
the 'textarea-dom.html' performance test.

StringImpl::replace(UChar, UChar) is optimized (and simplified)
by using 'StringImpl::find' method instead of manual traversing
the internal buffer and checking 'is8Bit' property value on
each iteration.

This changes gives approx 2.25% improvement of the average
'textarea-dom.html' performance test results (linux desktop x64,
GCC 4.6.3, release content_shell build with enabled
'linux_dump_symbols' flag).

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175198 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reset RestyleFlags when Element is removed.

The RestyleFlags are set based on selectors and DOM structure. Wether the
elements are attached or detached is irrelevant. Furthermore, when these
flags are reset, we must be sure all elements which may contribute to these
flags will have their style recalculated in order to set the flags properly.
That is not necessarily the case for attach/detach since siblings, or
descendants of siblings of the detached element will not have their style
recalculated in general.

Instead, reset RestyleFlags when an element is removed from its parent. If
the element is re-inserted into the DOM, siblings and sibling subtrees will
have the style recalculated to update the flags properly.

R=esprehn@chromium.org
BUG=376139

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175199 bbb929c8-8fbe-4397-9dbb-9b2b20218538
MUST LAND AFTER crrev.com/302543006

Adds Netinfo v3 to Blink.

The layout changes outside of netinfo/ are regolding.

Design doc: https://docs.google.com/a/chromium.org/document/d/1LTk9uVMGi4kurzcF5ellsAJReTF31fFJMHrQwSVtBjc/

BUG=368358

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175200 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: Reduce RefPtr to WorkerGlobalScope.

This CL reduces the number of required Heap::collectGarbage calls in
Heap::collectAllGarbage on Worker termination.

 - Make Event::m_target Member<>.
 - Make MessageEvent::m_source Member<>.
  MessageEvent is used to communicate between the main thread and workers.
  For consistency, this CL adjusts MessagePort argument/return types.

They reduce RefPtr to WorkerGlobalScope, which implements EventTarget.

BUG=375671

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175201 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Deprecate the Element.prefix setter

Intent to Deprecate and Remove:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/Tu9pL7gMPyo/f-eYf_AkpQMJ

The conclusion of the thread was to deprecate only at this time.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175202 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Gate subpixel scaling by RuntimeEnabledFeatures::subpixelFontScalingEnabled() on Mac

Synchronise releasing / default activating this feature with the other platforms.

BUG=378195
R=eae,dglazkov,eseidel

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

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

No one reads this state.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175204 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Empty inline elements always get a line box.

CSS 2.1 (http://www.w3.org/TR/CSS2/visudet.html#leading) says: "Empty inline 
elements generate empty inline boxes, but these boxes still have margins, padding, 
borders and a line height, and thus influence [line-height calculation] just 
like elements with content."

We weren't creating lineboxes for empty inline elements when they occurred
between a single trailing space and a single leading space - this is because
our linebox creation was based on the too-narrow premise that we were already
ignoring spaces. However, if an empty inline element comes after a trailing 
space but before one or more leading spaces then it will be ignored as part 
of the collapsed space between the trailing space and the next non-collapsible 
space - so we should force the creation of a linebox in such cases.

This allows us to pass Hixie's empty inline test: 
http://www.hixie.ch/tests/evil/mixed/emptyinline.html

BUG=328939

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175205 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Inline some trivial functions in CompositingReasonFinder

This CL also moves CompositingReasonOverflowScrollingTouch inside
hasOverflowScrollTrigger because needsCompositedScrolling cannot return true if
we don't have the overflow scroll trigger.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175206 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Revert of Empty inline elements always get a line box. (https://codereview.chromium.org/300853007/)

Reason for revert:
This changed the subpixel positioning of glyphs on lines with first-letter renderers on Mac builds. See https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Mac10_6/28423/layout-test-results/results.html as an example.

I think the new results are benign - but would like to confirm with leviw and reland as NeedsRebaseline if we're both happy with them.


Original issue's description:
> Empty inline elements always get a line box.
> 
> CSS 2.1 (http://www.w3.org/TR/CSS2/visudet.html#leading) says: "Empty inline 
> elements generate empty inline boxes, but these boxes still have margins, padding, 
> borders and a line height, and thus influence [line-height calculation] just 
> like elements with content."
> 
> We weren't creating lineboxes for empty inline elements when they occurred
> between a single trailing space and a single leading space - this is because
> our linebox creation was based on the too-narrow premise that we were already
> ignoring spaces. However, if an empty inline element comes after a trailing 
> space but before one or more leading spaces then it will be ignored as part 
> of the collapsed space between the trailing space and the next non-collapsible 
> space - so we should force the creation of a linebox in such cases.
> 
> This allows us to pass Hixie's empty inline test: 
> http://www.hixie.ch/tests/evil/mixed/emptyinline.html
> 
> BUG=328939
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175205

TBR=leviw@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=328939

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175207 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Unreviewed Mac rebaselines

TBR=pdr@chromium.org

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

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

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/308123005

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

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/301193007

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

It seems a lot of code moved out of this class, so remove various includes and forward references.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175211 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove SVGElementInstance includes, these are not
needed anymore after
https://codereview.chromium.org/268223003

BUG=313438

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175212 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Un-inline Element's constructor to avoid bloating

Un-inline Element's constructor to avoid bloating, as advised by Chromium
coding style:
http://www.chromium.org/developers/coding-style/cpp-dos-and-donts#TOC-Stop-inlining-constructors-and-destructors.

The Element class is used in inheritence and has non-POD data members. The
Element constructor is thus non-trivial.

This reduces release binary size by ~12Kb. I saw no impact on the Dromaeo
score:
http://dromaeo.com/?id=222265,222266

R=eseidel@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175213 bbb929c8-8fbe-4397-9dbb-9b2b20218538
HTMLImportsController does not need to hold Document ptr.

Since it owns the HTMLImportTreeRoot, it can just ask it for the
master document. Additionally, remove indirection plumbing that's
just straightforward queries of master document.

No changes in behavior, refactoring.

R=morrita
BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@175214 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Un-inline Node's constructor to avoid bloating

Un-inline Node's constructor to avoid bloating. Node's constructor is not
trivial and Node is used in inheritance.

This reduces the release binary size by ~4Kb. I did not see any impact on the
Dromaeo score:
http://dromaeo.com/?id=222265,222267

R=eseidel@chromium.org

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

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