Commit 1d3bb180 authored by adele's avatar adele

Reviewed by Brady.

        Update to last fix.

        * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK.
        * WebView/WebView.mm: (-[WebView stringByEvaluatingJavaScriptFromString:]):
        Added check to only use the VitalSource workaround if the app is not linked on or after
        the defined WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK version number.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 993602c1
2007-03-28 Adele Peterson <adele@apple.com>
Reviewed by Brady.
Update to last fix.
* Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK.
* WebView/WebView.mm: (-[WebView stringByEvaluatingJavaScriptFromString:]):
Added check to only use the VitalSource workaround if the app is not linked on or after
the defined WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK version number.
2007-03-28 Adele Peterson <adele@apple.com>
Reviewed by Kevin M.
......
......@@ -35,6 +35,7 @@
#define WEBKIT_FIRST_VERSION_WITHOUT_ACROBAT_QUIRK 0x020A0000 // 522.0.0
#define WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION 0x020A0000 // 522.0.0
#define WEBKIT_FIRST_VERSION_WITHOUT_APERTURE_QUIRK 0x020A0000 // 522.0.0
#define WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK 0x020A0000 // 522.0.0
#ifdef __cplusplus
extern "C" {
......
......@@ -2102,7 +2102,7 @@ NS_ENDHANDLER
// FIXME: We can remove this workaround for VitalSource Bookshelf when they update
// their code so that it no longer calls stringByEvaluatingJavaScriptFromString with a return statement.
// Return statements are only valid in a function. See <rdar://problem/5095515> for the evangelism bug.
if ([[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.vitalsource.bookshelf"]) {
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_VITALSOURCE_QUIRK) && [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.vitalsource.bookshelf"]) {
NSRange returnStringRange = [script rangeOfString:@"return "];
if (returnStringRange.length != 0 && returnStringRange.location == 0)
script = [script substringFromIndex: returnStringRange.location + returnStringRange.length];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment