Bug 144082

Summary: [Mac] Disable QTKit by default on future OS X.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jonlee, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
darin: review+
Patch for landing
none
Patch for landing none

Description Jer Noble 2015-04-22 17:26:10 PDT
[Mac] Disable QTKit by default on future OS X.
Comment 1 Jer Noble 2015-04-22 17:31:08 PDT
Created attachment 251389 [details]
Patch
Comment 2 Darin Adler 2015-04-22 18:06:29 PDT
Comment on attachment 251389 [details]
Patch

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

Can we find a way to not have this in three different places!?

> Source/WTF/wtf/Platform.h:1007
> +#define WTF_USE_QTKIT 1

This is a strange use of USE(QTKIT). If it’s false, then you default to not using QTKit, but can turn it on at runtime. That’s not normally what our USE macros mean.

> Source/WebCore/page/Settings.cpp:80
> -#if PLATFORM(COCOA)
> +#if USE(QTKIT)
>  bool Settings::gQTKitEnabled = true;
> +#else
> +bool Settings::gQTKitEnabled = false;
>  #endif

Still need to wrap this in #if PLATFORM(COCOA)
Comment 3 Jer Noble 2015-04-22 20:43:39 PDT
(In reply to comment #2)
> Comment on attachment 251389 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=251389&action=review
> 
> Can we find a way to not have this in three different places!?

I'd love to, but WebCore, WebKit, and WebKit2 each have their own definitions for their respective default settings. 

> > Source/WTF/wtf/Platform.h:1007
> > +#define WTF_USE_QTKIT 1
> 
> This is a strange use of USE(QTKIT). If it’s false, then you default to not
> using QTKit, but can turn it on at runtime. That’s not normally what our USE
> macros mean.

I realize; this is just the first step. The next step is to actually disable the implementation. 

Meanwhile, having this USE macro means not having to repeat the same platform macro everywhere in each of the settings defaults.  I'm open to other ideas though. 

> > Source/WebCore/page/Settings.cpp:80
> > -#if PLATFORM(COCOA)
> > +#if USE(QTKIT)
> >  bool Settings::gQTKitEnabled = true;
> > +#else
> > +bool Settings::gQTKitEnabled = false;
> >  #endif
> 
> Still need to wrap this in #if PLATFORM(COCOA)

Oh, good point.
Comment 4 Jer Noble 2015-04-23 10:49:49 PDT
Created attachment 251454 [details]
Patch for landing

Got rid of WTF_USE_WEBKIT and managed to have the WebKit and WebKit2 preference defaults derived from the WebCore ones.
Comment 5 Jer Noble 2015-04-23 10:57:09 PDT
Created attachment 251455 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2015-04-23 15:44:48 PDT
Comment on attachment 251455 [details]
Patch for landing

Clearing flags on attachment: 251455

Committed r183221: <http://trac.webkit.org/changeset/183221>
Comment 7 Jon Lee 2015-04-27 00:28:54 PDT
rdar://problem/20314926
Comment 8 Alexey Proskuryakov 2015-05-01 10:33:20 PDT
As discussed in person, we probably need more tests updated, see <rdar://problem/20527672>.