Revert "Short-circuit JSGlobalObjectInspectorController when not inspecting."
<https://webkit.org/b/129995>

This code path is not taken anymore on DYEB, and I can't explain why
it was showing up in my profiles. Backing it out per JoePeck's suggestion.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::reportAPIException):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix relative paths to UseInternalSDK.xcconfig for ANGLE and WebKit/mac

Rubber-stamped by Mark Rowe.

One-too-few "..".

* Configurations/Base.xcconfig:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The viewport code should not depend on WebKitSystemInterface
https://bugs.webkit.org/show_bug.cgi?id=130218

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-13
Reviewed by Tim Horton.

Source/WebCore: 

The viewport code cannot be generalized to other ports because it relies
on WebKit system interface to get the device screen size.
This patch fixes that by going through ChromeClient to get the data.

* dom/Document.cpp:
(WebCore::Document::processViewport):
Get the screensize from chrome client.

* dom/ViewportArguments.cpp:
(WebCore::computeViewportAttributes):
This is dead code. Nothing should ever use computeViewportAttributes().

(WebCore::finalizeViewportArguments):
* dom/ViewportArguments.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::viewportScreenSize):

Source/WebKit/ios: 

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::viewportScreenSize):
Get the viewport size from WebKitSystemInterface.

Source/WebKit2: 

Get the viewport size from the UIProcess when creating a new WebProcess.
From there, the value is stored in WebPage and used whenever we need to update
the viewport parameters.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::viewportScreenSize):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::viewportScreenSize):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportScreenSize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean up RenderStyle creation
https://bugs.webkit.org/show_bug.cgi?id=130180

Reviewed by Andreas Kling.

Use the copy constructor with the default style instead of having a special
constructor for that.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::create):
(WebCore::RenderStyle::RenderStyle):
* rendering/style/RenderStyle.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a bunch of mistakes in the parsing of ::cue( and ::cue
https://bugs.webkit.org/show_bug.cgi?id=130113

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-13
Reviewed by Andreas Kling.

* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::setPseudoTypeValue):
The ::cue() pseudo element "function" was passed as a PseudoClass.
The type was then parsed and considered as a compatibility type to flip
the match type back to PseudoElement.

Instead of all that jazz, just pass the right type from the grammar.

* css/CSSSelector.cpp:
(WebCore::CSSSelector::parsePseudoType):
The non-function ::cue pseudo element use shadow pseudo ID for matching the element.
Since it is unprefixed, it needs to map to one of the Custom types. The previous code
was using String::startsWith() for some reason, change that to a simple equality.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r165540.
https://bugs.webkit.org/show_bug.cgi?id=130199

caused 1 hidpi test fail (Requested by zalan on #webkit).

Reverted changeset:

"Subpixel rendering: Nested layers with subpixel accumulation
paint to wrong position."
https://bugs.webkit.org/show_bug.cgi?id=130153
http://trac.webkit.org/changeset/165540

Source/WebCore: 

Patch by Commit Queue <commit-queue@webkit.org> on 2014-03-13

LayoutTests: 

Patch by Commit Queue <commit-queue@webkit.org> on 2014-03-13


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Network.loadResource XHR crash if page reloaded while request is ongoing
https://bugs.webkit.org/show_bug.cgi?id=130211

Reviewed by Timothy Hatcher.

Merged from Blink with changes, (patch by vsevik@chromium.org):
http://src.chromium.org/viewvc/blink?view=revision&revision=152712

Using an XMLHttpRequest to download resources had a few issues. Being an
Active DOM Object the load could be paused. Without an extra retain,
when the load was cancelled (e.g. a page reload) the XHR would get
destructed and could cause a crash if the list of active DOM objects
was actively being iterated.

Switch to a DocumentThreadableLoader to manage the load ourselves.
This still uses the Memory cache, but we have a little more control.

* inspector/InspectorResourceAgent.h:
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::InspectorResourceAgent):
(WebCore::InspectorResourceAgent::loadResource):
Switch from XHR to DocumentThreadableLoader.

* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::sendForInspector):
Remove the now unnecessary XHR sendForInspector path.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Network.loadResource should include the response status code
https://bugs.webkit.org/show_bug.cgi?id=130216

Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/InspectorResourceAgent.cpp:
Record and send the http status code.

* inspector/protocol/Network.json:
Include status code property in the success callback.

Source/WebInspectorUI:

* UserInterface/Controllers/SourceMapManager.js:
(WebInspector.SourceMapManager.prototype.sourceMapLoaded):
(WebInspector.SourceMapManager.prototype._loadAndParseSourceMap):
* UserInterface/Models/SourceMapResource.js:
(WebInspector.SourceMapResource.prototype.requestContentFromBackend.sourceMapResourceLoaded):
If the response is 400 or larger, treat it as an error / failed load.

* UserInterface/Protocol/InspectorWebBackendCommands.js:
Update protocol to provide status code parameter.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove InspectorFrontendHost.loadResourceSynchronously
https://bugs.webkit.org/show_bug.cgi?id=130217

Reviewed by Timothy Hatcher.

Source/WebCore:

This has been replaced by NetworkAgent.loadResource,
which loads asynchronously through the backend.

* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:

Source/WebInspectorUI:

* UserInterface/Protocol/InspectorFrontendHostStub.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix for Mac Windows after r165545.
https://bugs.webkit.org/show_bug.cgi?id=129744

Reviewed by Timothy Hatcher.

* Interfaces/IWebInspectorPrivate.idl: Remove callId from IWebInspectorPrivate.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/16317198>

Update WKSI to fix a small leak on iOS.

* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMavericks.a:
* libWebKitSystemInterfaceMountainLion.a:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r160806): Incorrect cascade order of prefixed and non-prefixed variants of
CSS properties box-shadow and background-{clip, origin, size}
https://bugs.webkit.org/show_bug.cgi?id=130102
<rdar://problem/16187037>

Reviewed by Andreas Kling.

Source/WebCore:

Fixes an issues in the computation of the final value for the CSS properties
box-shadow and background-{clip, origin, size} when the definition of a selector
uses both the prefixed and non-prefixed variants (in order) of these properties.

Tests: fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html
       fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html
       fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html
       fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html

* css/CSSPropertyNames.in: Add a comment to explain the difference between property
-webkit-box-shadow and property box-shadow.
* css/StyleResolver.cpp:
(WebCore::shouldApplyPropertyInParseOrder): Add prefixed and non-prefixed variants
of box-shadow and background-{clip, origin, size} to the list of properties that need
to be applied in the same order as they were parsed from the stylesheet.

LayoutTests:

Add tests to ensure that we correctly cascade the prefixed and non-prefixed variants
of the CSS properties box-shadow and background-{clip, origin, size}.

* fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order-expected.html: Added.
* fast/css/cascade/background-clip-and-webkit-background-clip-cascade-order.html: Added.
* fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order-expected.html: Added.
* fast/css/cascade/background-origin-and-webkit-background-origin-cascade-order.html: Added.
* fast/css/cascade/background-size-and-webkit-background-size-cascade-order-expected.html: Added.
* fast/css/cascade/background-size-and-webkit-background-size-cascade-order.html: Added.
* fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order-expected.html: Added.
* fast/css/cascade/box-shadow-and-webkit-box-shadow-cascade-order.html: Added.
* fast/css/resources/green-128x128.png: Added.
* fast/css/resources/green-square-above-red-square.png: Added.
* fast/css/resources/red-square-above-green-square.png: Added.
* fast/css/resources/red-square-in-green-square.png: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Failure to link with older installations of WebP
https://bugs.webkit.org/show_bug.cgi?id=130195

Reviewed by Gustavo Noronha Silva.

Fix the issue by using a temporary variable as the output parameter
to check_include_files(), setting WEBP_FOUND accordingly later.

* Source/cmake/FindWebP.cmake: Avoid reusing the WEBP_FOUND
variable in check_include_files(), as it will lead to misleading
results (will always be FALSE). Use a temporary variable instead
and explicitly set WEBP_FOUND to TRUE later if needed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165588 268f45cc-cd09-0410-ab3c-d52691b4dbfc