Web Inspector:  The JS code injected by worker inspector shouldn't be evaluated through JSMainThreadExecState
https://bugs.webkit.org/show_bug.cgi?id=95341

Patch by Peter Wang <peter.wang@torchmobile.com.cn> on 2012-09-25
Reviewed by Yury Semikhatsky.

Add extra code to "JSC::InjectedScriptManager" and "JSC::ScriptFunctionCall" to make sure the
interfaces of JSMainThreadExecState are invoked only in main thread.

No new test case for this bug. Without this patch, opening worker inspector will meet failed assert statements.

* bindings/js/JSInjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createInjectedScript):
* bindings/js/ScriptFunctionCall.cpp:
(WebCore::ScriptFunctionCall::call):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Relative URL Link Tooltips do not respect <base>
https://bugs.webkit.org/show_bug.cgi?id=43434

Reviewed by Pavel Feldman.

Source/WebCore:

New "baseURL" field added into the DOM.Node payload for document nodes and is made use of while resolving and completing URLs.

* inspector/Inspector.json:
* inspector/InspectorDOMAgent.cpp:
(WebCore::documentBaseURLString):
(WebCore):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* inspector/front-end/AuditRules.js:
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
(WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived):
(WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived):
* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode.prototype.resolveURL):
(WebInspector.DOMDocument):

LayoutTests:

Added an iframe containing the <base> tag to test DOMNode.prototype.resolveURL() with a non-trivial baseURL.

* inspector/elements/elements-panel-rewrite-href.html:
* inspector/elements/elements-panel-rewrite-href-expected.txt:
* inspector/elements/resources/elements-panel-rewrite-href-iframe.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, another test case adjustment after r129459. Python 2.7 doesn't
seem to be a requirement yet so the assertDictEqual method is not yet available
on all builders. Assert that the empty dictionary length equals 0 instead.

* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ResultSummaryTest.test_interpret_test_failures):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][WTR] WTR bundle client loads binary data as text
https://bugs.webkit.org/show_bug.cgi?id=97532

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-09-25
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Added WKBundlePageCanShowMIMEType() function to WKBundlePage private API.
This function is put to WKBundlePage to keep consistency with WebKit::WebPageProxy::canShowMIMEType().
Actually it does not need anything from page.

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageCanShowMIMEType):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

WTR::InjectedBundlePage::decidePolicyForResponse now checks response MIME type
and returns WKBundlePagePolicyActionPassThrough if it cannot be shown.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForResponse):

LayoutTests:

Unskipped http/tests/loading/text-content-type-with-binary-extension.html for WK2.

* platform/efl-wk1/TestExpectations:
* platform/efl/TestExpectations:
* platform/wk2/Skipped:

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