Bug 159049 - Enable window.open() for existing versions of Secret Society (compatibility)
Summary: Enable window.open() for existing versions of Secret Society (compatibility)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Wilander
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-06-22 17:52 PDT by John Wilander
Modified: 2017-01-21 13:56 PST (History)
10 users (show)

See Also:


Attachments
Patch (7.99 KB, patch)
2016-06-22 18:29 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch (7.64 KB, patch)
2016-06-23 08:59 PDT, John Wilander
no flags Details | Formatted Diff | Diff
Patch (7.51 KB, patch)
2016-06-23 09:06 PDT, John Wilander
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilander 2016-06-22 17:52:29 PDT
The Secret Society Hidden Mystery app has a broken version check treating iOS 10 as iOS 1 on iPads. Therefore it believes it can use window.open() in a tap handler. We should allow the existing versions of the app to do this to not break them.
Comment 1 John Wilander 2016-06-22 17:54:16 PDT
rdar://problem/26528349
Comment 2 John Wilander 2016-06-22 18:29:47 PDT
Created attachment 281893 [details]
Patch
Comment 3 Andy Estes 2016-06-22 18:38:11 PDT
Comment on attachment 281893 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281893&action=review

> Source/WTF/wtf/spi/darwin/dyldSPI.h:40
> +#define DYLD_IOS_VERSION_3_0  0x00030000
> +#define DYLD_IOS_VERSION_4_2  0x00040200
> +#define DYLD_IOS_VERSION_5_0  0x00050000
> +#define DYLD_IOS_VERSION_6_0  0x00060000
> +#define DYLD_IOS_VERSION_7_0  0x00070000
> +#define DYLD_IOS_VERSION_9_0  0x00090000
> +#define DYLD_IOS_VERSION_10_0 0x000A0000

We try to avoid lining things up on column boundaries like this. The problem with doing this is that we'd no longer get useful blame information for lines 34-39.

> Source/WebCore/page/DOMWindow.cpp:357
> -
> +    

Please remove this.

> Source/WebCore/page/DOMWindow.cpp:366
> +    

And this.
Comment 4 John Wilander 2016-06-23 08:59:13 PDT
Created attachment 281909 [details]
Patch
Comment 5 John Wilander 2016-06-23 09:06:06 PDT
Created attachment 281910 [details]
Patch
Comment 6 John Wilander 2016-06-23 09:07:47 PDT
(In reply to comment #3)
> Comment on attachment 281893 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=281893&action=review
> 
> > Source/WTF/wtf/spi/darwin/dyldSPI.h:40
> > +#define DYLD_IOS_VERSION_3_0  0x00030000
> > +#define DYLD_IOS_VERSION_4_2  0x00040200
> > +#define DYLD_IOS_VERSION_5_0  0x00050000
> > +#define DYLD_IOS_VERSION_6_0  0x00060000
> > +#define DYLD_IOS_VERSION_7_0  0x00070000
> > +#define DYLD_IOS_VERSION_9_0  0x00090000
> > +#define DYLD_IOS_VERSION_10_0 0x000A0000
> 
> We try to avoid lining things up on column boundaries like this. The problem
> with doing this is that we'd no longer get useful blame information for
> lines 34-39.

I recall you telling me this previously. :) Fixed.

> 
> > Source/WebCore/page/DOMWindow.cpp:357
> > -
> > +    
> 
> Please remove this.
> 
> > Source/WebCore/page/DOMWindow.cpp:366
> > +    
> 
> And this.

Fixed them both and another stray tab.

Thanks!
Comment 7 WebKit Commit Bot 2016-06-23 09:35:30 PDT
Comment on attachment 281910 [details]
Patch

Clearing flags on attachment: 281910

Committed r202380: <http://trac.webkit.org/changeset/202380>
Comment 8 WebKit Commit Bot 2016-06-23 09:35:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 David Kilzer (:ddkilzer) 2016-06-23 15:53:52 PDT
(In reply to comment #7)
> Comment on attachment 281910 [details]
> Patch
> 
> Clearing flags on attachment: 281910
> 
> Committed r202380: <http://trac.webkit.org/changeset/202380>

Follow-up build fix for internal iOS 9.x SDK builds:

Committed r202400: <http://trac.webkit.org/changeset/r202400>
Comment 10 John Wilander 2016-06-23 15:56:05 PDT
Thanks, Dave!
Comment 11 Alexey Proskuryakov 2016-06-23 19:46:06 PDT
> Follow-up build fix for internal iOS 9.x SDK builds:
> 
> Committed r202400: <http://trac.webkit.org/changeset/r202400>

ChangeLog for the build fix says "Define DYLD_IOS_VERSION_10_0 when building on internal SDKs older than iOS 10" - but the patch implemented something different. It defined the macro when targeting a pre-iOS 10 SDK. 

To check for SDK version, use MAX_ALLOWED, not MIN_REQUIRED.
Comment 12 Darin Adler 2017-01-21 09:35:19 PST
I believe we should remove the setting allowWindowOpenWithoutUserGesture because it is a duplicate of the already-existing setting javaScriptCanOpenWindowsAutomatically.
Comment 13 Darin Adler 2017-01-21 13:56:33 PST
Maybe Joe wants to tackle this as part of his cleanup?