Make replaced preferred widths independent on available width

Prior to this patch, a replaced element with intrinsic ratio but with
no intrinsic width nor height and with 'width', 'height' both computed
values of 'auto', would have preferred width and preferred minimal
width that depended on the available width of the container.

After this patch, such a replaced element will have zero preferred
width and zero preferred minimal width.

Example:

<!doctype html>
<div style="width: 200px">
  <svg viewBox="0 0 1 1" style="background: blue">
  </svg>
<div>

<svg> becomes a 200x200 blue rectangle, intrinsic ratio (1) comes from
viewBox attribute. Preferred minimal width and preferred width would
be 200px prior to patch.

Changing the width of <div> would require recalculating preferred
widths on <svg>, something we rather not do, and does not currently
do. (See RenderReplaced::needsPreferredWidthsRecalculation()). This
means preferred minimal widths was left with stale values after
changes to the container.

The new behavior matches Firefox but is not yet in spec, possibly
because the sizing of such replaced element is undefined in CSS 2.1,
even though there is a suggestion, followed by Blink, in the spec.

BUG=382922

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176456 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Correct the squashing origin w.r.t. the transformed ancestor to take into account rounding to integer
offsets.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176457 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reduce forward declarations in core/rendering

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176458 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Removed the frame parameter from didChangeBrandColor because
the RenderFrame and WebFrame has 1:1 mapping now

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176459 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reduce forward declarations in core/svg

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176460 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Isolated world injected inline styles should bypass main world CSP.

Inline styles that are added to a page from an isolated world should bypass the
main world's CSP, much like how scripts do. As an example, this is important for
extensions to make sure they can bypass the page's CSP when they inject a style
tag into the page.

R=mkwst@chromium.org
BUG=385246

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176461 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Cleanup Blink's Platform from Screen Orientation stuff.

The embedders should now use WebScreenOrientationClient instead.

BUG=None

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176462 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Notify font loads via FontLoader

Before this patch, font load was noticed to CSSFontSelector through the
following path:

 RemoteFontFaceSource
 -> CSSFontFace
 -> CSSSegmentedFontFace
 -> CSSFontSelector

However, StyleEngine clears FontFaceCache upon stylesheet changes and
reconstruct it lazily, it is possible that CSSSegmentedFontFace is
absent when a load is completed. As a result, loaded font is not
rendered.

This patch fixes the problem by changing the notification path as follows:
 RemoteFontFaceSource -> FontLoader -> CSSFontSelector.

BUG=378238
TEST=fast/css/font-face-css-change-while-loading.html

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176463 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Revert stepping over/out on a call frame backend code.

This code is unused.

R=pfeldman@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176464 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Switch to the new SkCanvas::willSave() API.

Skia's save() SaveFlags bits are going the way of the dodo. At this
point all callers have been updated to always pass kMatrixClip, but
SkCanvas subclasses also need to use the new willSave() API.

(depends on https://codereview.chromium.org/338833003/ rolling)

BUG=skia:2297
R=reed@google.com,senorblanco@chromium.org,malch@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176465 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Issue paint invalidations *before* and after changing offsetFromRenderer
and reconfiguring the squashing GraphicsLayer.

Previously we were issuing them only after.

BUG=385103

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176466 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Disabled timing out perf test.

BUG=385313
TBR=bokan@chromium.org
NOTRY=True

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176467 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add PLATFORM_EXPORT to MediaStreamComponent::AudioSourceProviderImpl

On non-Windows, PLATFORM_EXPORT expands to a visibility attribute,
which is inherited by nested classes. On Windows, it's expanded to
a dllexport/dllimport attribute, which is not inherited.

When using Clang on Windows, MediaStreamComponent's dtor got
inlined, which destroys m_sourceProvider, whose destructor got inlined,
and tried to reference provideInput for the vtable, but failed to link
since it wasn't in the right dll. Exporting the inner class fixes this.

BUG=82385
TEST=build blink_web.dll with Clang on Windows in Release mode

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176468 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Define Color::transparent et al. when using Clang on Windows

MSVC treats their in-class initializations as definitions, but other
compilers don't. This updates the #ifdef to handle the Clang on Windows
case.

BUG=82385
TEST=build blink_web.dll with Clang on Windows in Release mode

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176469 bbb929c8-8fbe-4397-9dbb-9b2b20218538
LeakExpectations: Add more isolated world test

TBR=haraken
NOTRY=true
BUG=364377

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176470 bbb929c8-8fbe-4397-9dbb-9b2b20218538
[webcrypto] Remove ifdef that is no longer needed.

BUG=373917
TBR=abarth

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176471 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Explicitly compare FontVariant to enumerators.

It's a little opaque to say "if (fontDescription.variant())".

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176472 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Add UseCounter for web components related CSS selectors

This CL adds histogram statistics for the following
web components-related CSS selectors.

- :unresolved pseudo-class (for custom element)
- ::shadow pseudo element
- ::content pseudo element
- :host pseudo class
- :host-context() pseudo class
- /deep/ combinator

BUG=383749
TEST=open http://jsbin.com/bopezaso/2/edit, reload several times and see if FeatureObserver in chrome://histograms reflects it (number 465-470)

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176473 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Minor comment nit fix

/shadow-deep/ -> /deep/
and one minor comment correction.

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176474 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Rename {first,last}EditablePosition{After,Before}PositionInRoot to denote them returned VisiblePosion

This patch renames {first,last}EditablePosition{After,Before}PositionInRoot to
{first,last}EditableVisiblePosition{After,Before}PositionInRoot for having
lastEditblePositionBeforePositionInRoot() which returns Position instead of
VisiblePosition.

This patch is a preparation of fixing issue 339187 by
http://crrev.com/340713003

BUG=n/a
TEST=n/a

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

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