Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unreviewed, rolling out r191250 and r191253.
https://bugs.webkit.org/show_bug.cgi?id=150296

Broke all the tests on Windows (Requested by ap on #webkit).

Reverted changesets:

"Stop honoring the user default
"WebKitKerningAndLigaturesEnabledByDefault""
https://bugs.webkit.org/show_bug.cgi?id=150287
http://trac.webkit.org/changeset/191250

"Build fix after r191250"
http://trac.webkit.org/changeset/191253

Canonical link: https://commits.webkit.org/168425@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Oct 18, 2015
1 parent 6214319 commit 7628379
Show file tree
Hide file tree
Showing 10 changed files with 103 additions and 4 deletions.
17 changes: 17 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
2015-10-18 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r191250 and r191253.
https://bugs.webkit.org/show_bug.cgi?id=150296

Broke all the tests on Windows (Requested by ap on #webkit).

Reverted changesets:

"Stop honoring the user default
"WebKitKerningAndLigaturesEnabledByDefault""
https://bugs.webkit.org/show_bug.cgi?id=150287
http://trac.webkit.org/changeset/191250

"Build fix after r191250"
http://trac.webkit.org/changeset/191253

2015-10-17 David Hyatt <hyatt@apple.com>

Implement the CSS4 'revert' keyword.
Expand Down
13 changes: 13 additions & 0 deletions Source/WebCore/platform/graphics/FontCascade.cpp
Expand Up @@ -92,6 +92,9 @@ static bool useBackslashAsYenSignForFamily(const AtomicString& family)

FontCascade::CodePath FontCascade::s_codePath = Auto;

bool FontCascade::s_defaultKerning = false;
bool FontCascade::s_defaultLigatures = false;

// ============================================================================================
// FontCascade Implementation (Cross-Platform Portion)
// ============================================================================================
Expand Down Expand Up @@ -584,6 +587,16 @@ FontCascade::CodePath FontCascade::codePath()
return s_codePath;
}

void FontCascade::setDefaultKerning(bool enable)
{
s_defaultKerning = enable;
}

void FontCascade::setDefaultLigatures(bool enable)
{
s_defaultLigatures = enable;
}

FontCascade::CodePath FontCascade::codePath(const TextRun& run) const
{
if (s_codePath != Auto)
Expand Down
7 changes: 6 additions & 1 deletion Source/WebCore/platform/graphics/FontCascade.h
Expand Up @@ -265,6 +265,8 @@ class FontCascade {
static CodePath codePath();
static CodePath s_codePath;

WEBCORE_EXPORT static void setDefaultKerning(bool);
WEBCORE_EXPORT static void setDefaultLigatures(bool);
static const uint8_t s_roundingHackCharacterTable[256];
static bool isRoundingHackCharacter(UChar32 c)
{
Expand Down Expand Up @@ -304,7 +306,7 @@ class FontCascade {
return true;
if (textRenderingMode == OptimizeSpeed)
return false;
return true;
return s_defaultKerning;
}

bool computeEnableKerning() const
Expand All @@ -327,6 +329,9 @@ class FontCascade {
return advancedTextRenderingMode();
}

static bool s_defaultKerning;
static bool s_defaultLigatures;

FontCascadeDescription m_fontDescription;
mutable RefPtr<FontCascadeFonts> m_fonts;
WeakPtrFactory<FontCascade> m_weakPtrFactory;
Expand Down
17 changes: 17 additions & 0 deletions Source/WebKit/mac/ChangeLog
@@ -1,3 +1,20 @@
2015-10-18 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r191250 and r191253.
https://bugs.webkit.org/show_bug.cgi?id=150296

Broke all the tests on Windows (Requested by ap on #webkit).

Reverted changesets:

"Stop honoring the user default
"WebKitKerningAndLigaturesEnabledByDefault""
https://bugs.webkit.org/show_bug.cgi?id=150287
http://trac.webkit.org/changeset/191250

"Build fix after r191250"
http://trac.webkit.org/changeset/191253

2015-10-17 Myles C. Maxfield <mmaxfield@apple.com>

Build fix after r191250
Expand Down
16 changes: 13 additions & 3 deletions Source/WebKit/mac/WebView/WebView.mm
Expand Up @@ -624,6 +624,8 @@ - (NSResponder *)_responderForResponderOperations;
NSString *_WebViewRemoteInspectorHasSessionChangedNotification = @"_WebViewRemoteInspectorHasSessionChangedNotification";
#endif

NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";

@interface WebProgressItem : NSObject
{
@public
Expand Down Expand Up @@ -4694,15 +4696,23 @@ + (void)initialize
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_cacheModelChangedNotification:) name:WebPreferencesCacheModelChangedInternalNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesRemovedNotification:) name:WebPreferencesRemovedNotification object:nil];

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults registerDefaults:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey]];

#if PLATFORM(IOS)
continuousSpellCheckingEnabled = NO;
#endif

#else

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
#if !PLATFORM(IOS)
continuousSpellCheckingEnabled = [defaults boolForKey:WebContinuousSpellCheckingEnabled];
grammarCheckingEnabled = [defaults boolForKey:WebGrammarCheckingEnabled];
#endif

bool defaultKerningAndLigatures = [defaults boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
FontCascade::setDefaultKerning(defaultKerningAndLigatures);
FontCascade::setDefaultLigatures(defaultKerningAndLigatures);

#if !PLATFORM(IOS)
automaticQuoteSubstitutionEnabled = [self _shouldAutomaticQuoteSubstitutionBeEnabled];
automaticLinkDetectionEnabled = [defaults boolForKey:WebAutomaticLinkDetectionEnabled];
automaticDashSubstitutionEnabled = [self _shouldAutomaticDashSubstitutionBeEnabled];
Expand Down
17 changes: 17 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,20 @@
2015-10-18 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r191250 and r191253.
https://bugs.webkit.org/show_bug.cgi?id=150296

Broke all the tests on Windows (Requested by ap on #webkit).

Reverted changesets:

"Stop honoring the user default
"WebKitKerningAndLigaturesEnabledByDefault""
https://bugs.webkit.org/show_bug.cgi?id=150287
http://trac.webkit.org/changeset/191250

"Build fix after r191250"
http://trac.webkit.org/changeset/191253

2015-10-17 Myles C. Maxfield <mmaxfield@apple.com>

Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
Expand Down
8 changes: 8 additions & 0 deletions Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Expand Up @@ -40,6 +40,8 @@ WebProcessCreationParameters::WebProcessCreationParameters()
, shouldUseFontSmoothing(true)
, defaultRequestTimeoutInterval(INT_MAX)
#if PLATFORM(COCOA)
, shouldEnableKerningByDefault(false)
, shouldEnableLigaturesByDefault(false)
, shouldEnableJIT(false)
, shouldEnableFTLJIT(false)
#endif
Expand Down Expand Up @@ -121,6 +123,8 @@ void WebProcessCreationParameters::encode(IPC::ArgumentEncoder& encoder) const
encoder << acceleratedCompositingPort;
encoder << uiProcessBundleResourcePath;
encoder << uiProcessBundleResourcePathExtensionHandle;
encoder << shouldEnableKerningByDefault;
encoder << shouldEnableLigaturesByDefault;
encoder << shouldEnableJIT;
encoder << shouldEnableFTLJIT;
encoder << !!bundleParameterData;
Expand Down Expand Up @@ -265,6 +269,10 @@ bool WebProcessCreationParameters::decode(IPC::ArgumentDecoder& decoder, WebProc
return false;
if (!decoder.decode(parameters.uiProcessBundleResourcePathExtensionHandle))
return false;
if (!decoder.decode(parameters.shouldEnableKerningByDefault))
return false;
if (!decoder.decode(parameters.shouldEnableLigaturesByDefault))
return false;
if (!decoder.decode(parameters.shouldEnableJIT))
return false;
if (!decoder.decode(parameters.shouldEnableFTLJIT))
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit2/Shared/WebProcessCreationParameters.h
Expand Up @@ -142,6 +142,8 @@ struct WebProcessCreationParameters {
String uiProcessBundleResourcePath;
SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;

bool shouldEnableKerningByDefault;
bool shouldEnableLigaturesByDefault;
bool shouldEnableJIT;
bool shouldEnableFTLJIT;

Expand Down
8 changes: 8 additions & 0 deletions Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Expand Up @@ -64,6 +64,7 @@
NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
NSString *WebKitJSCJITEnabledDefaultsKey = @"WebKitJSCJITEnabledDefaultsKey";
NSString *WebKitJSCFTLJITEnabledDefaultsKey = @"WebKitJSCFTLJITEnabledDefaultsKey";
NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory";
Expand Down Expand Up @@ -101,6 +102,10 @@ static void registerUserDefaultsIfNeeded()

[registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCJITEnabledDefaultsKey];
[registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCFTLJITEnabledDefaultsKey];

#if PLATFORM(COCOA)
[registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
#endif

#if ENABLE(NETWORK_CACHE)
[registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitNetworkCacheEnabledDefaultsKey];
Expand Down Expand Up @@ -170,6 +175,9 @@ static void registerUserDefaultsIfNeeded()
parameters.accessibilityEnhancedUserInterfaceEnabled = false;
#endif

bool shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
parameters.shouldEnableKerningByDefault = shouldEnableKerningAndLigaturesByDefault;
parameters.shouldEnableLigaturesByDefault = shouldEnableKerningAndLigaturesByDefault;
parameters.shouldEnableJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCJITEnabledDefaultsKey];
parameters.shouldEnableFTLJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCFTLJITEnabledDefaultsKey];
parameters.shouldEnableMemoryPressureReliefLogging = [[NSUserDefaults standardUserDefaults] boolForKey:@"LogMemoryJetsamDetails"];
Expand Down
2 changes: 2 additions & 0 deletions Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm
Expand Up @@ -152,6 +152,8 @@ static id NSApplicationAccessibilityFocusedUIElement(NSApplication*, SEL)

m_compositingRenderServerPort = WTF::move(parameters.acceleratedCompositingPort);
m_presenterApplicationPid = parameters.presenterApplicationPid;
FontCascade::setDefaultKerning(parameters.shouldEnableKerningByDefault);
FontCascade::setDefaultLigatures(parameters.shouldEnableLigaturesByDefault);

MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);

Expand Down

0 comments on commit 7628379

Please sign in to comment.