REGRESSION (r129456): http/tests/security/xss-eval.html is failing on JSC platforms
https://bugs.webkit.org/show_bug.cgi?id=97529

Reviewed by Filip Pizlo.

A recent patch changed JSC's EvalError behaviour; bring this more into line with other browsers.

Source/JavaScriptCore: 

JSC currently throws an EvalError if you try to call eval with a this object that doesn't
match the given eval function. This does not match other browsers, which generally just
ignore the this value that was passed, and eval the string in the eval function's environment.

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncEval):
    - Remove EvalError, ignore passed this value.

LayoutTests: 

* fast/js/eval-cross-window-expected.txt:
* fast/js/eval-cross-window.html:
    - Changed not to expect EvalErrors (this matches other browsers), and modified testThis
      to check that the this object is always set to the global object.
* http/tests/security/resources/xss-eval2.html:
* http/tests/security/resources/xss-eval3.html:
* http/tests/security/xss-eval-expected.txt:
* http/tests/security/xss-eval.html:
    - Updated. Access via the global environment is not a security risk, since the eval is
      accessing it's own document's informantion. Access via the shell attempts to access
      the navigated pages document, tripping an access check & throwing a TypeError.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac: WebKit/mac part of <rdar://problem/11455228> [mac] Stop using screen fonts
https://bugs.webkit.org/show_bug.cgi?id=97620

Reviewed by John Sullivan.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Changed the default value of the screenFontSubstitutionEnabled
preference to NO.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):  Changed to enable screen font substitution also if
the value of the NSFontDefaultScreenFontSubstitutionEnabled user defaults key is YES.

Source/WebKit2: WebKit2 part of <rdar://problem/11455228> [mac] Stop using screen fonts
https://bugs.webkit.org/show_bug.cgi?id=97620

Reviewed by John Sullivan.

* Shared/WebPreferencesStore.h:
(WebKit): Changed the default value of the screenFontSubstitutionEnabled preference to false.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Added an initializer for
the new shouldForceScreenFontSubstitution data member.
(WebKit::WebProcessCreationParameters::encode): Added encoding of shouldForceScreenFontSubstitution.
(WebKit::WebProcessCreationParameters::decode): Added decoding of shouldForceScreenFontSubstitution.
* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters): Added shouldForceScreenFontSubstitution boolean data member.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess): Added code to set shouldForceScreenFontSubstitution
in the process creation parameters to the value of the NSFontDefaultScreenFontSubstitutionEnabled user
defaults key.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Changed to enable screen font substitution also if
shouldForceScreenFontSubstitution() is true.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::shouldForceScreenFontSubstitution): Added this getter.
(WebProcess): Added m_shouldForceScreenFontSubstitution boolean data member.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Added initialization of
m_shouldForceScreenFontSubstitution from the creation parameters.

Tools: Tools part of <rdar://problem/11455228> [mac] Stop using screen fonts
https://bugs.webkit.org/show_bug.cgi?id=97620

Reviewed by John Sullivan.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues): Enable screen font substitution when
running the tests.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues): Ditto.



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