Title: [285513] trunk/Source/WebCore

Diff

Modified: trunk/Source/WebCore/ChangeLog (285512 => 285513)


--- trunk/Source/WebCore/ChangeLog	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/ChangeLog	2021-11-09 19:05:05 UTC (rev 285513)
@@ -1,3 +1,17 @@
+2021-11-09  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, reverting r285318.
+        https://bugs.webkit.org/show_bug.cgi?id=232894
+
+        broke Apple internal build
+
+        Reverted changeset:
+
+        "[Cocoa] Migrate from CTFontCopyVariationAxes() to
+        CTFontCopyVariationAxesInternal() if possible"
+        https://bugs.webkit.org/show_bug.cgi?id=232690
+        https://commits.webkit.org/r285318
+
 2021-11-09  Alan Bujtas  <za...@apple.com>
 
         [LFC][IFC] Line spanning inline box items should be treated as opaque bidi content

Modified: trunk/Source/WebCore/Headers.cmake (285512 => 285513)


--- trunk/Source/WebCore/Headers.cmake	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/Headers.cmake	2021-11-09 19:05:05 UTC (rev 285513)
@@ -1374,7 +1374,6 @@
     platform/graphics/RenderingResourceIdentifier.h
     platform/graphics/RenderingMode.h
     platform/graphics/RoundedRect.h
-    platform/graphics/ShouldLocalizeAxisNames.h
     platform/graphics/SourceBufferPrivate.h
     platform/graphics/SourceBufferPrivateClient.h
     platform/graphics/StringTruncator.h

Modified: trunk/Source/WebCore/PAL/ChangeLog (285512 => 285513)


--- trunk/Source/WebCore/PAL/ChangeLog	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-11-09 19:05:05 UTC (rev 285513)
@@ -1,3 +1,17 @@
+2021-11-09  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, reverting r285318.
+        https://bugs.webkit.org/show_bug.cgi?id=232894
+
+        broke Apple internal build
+
+        Reverted changeset:
+
+        "[Cocoa] Migrate from CTFontCopyVariationAxes() to
+        CTFontCopyVariationAxesInternal() if possible"
+        https://bugs.webkit.org/show_bug.cgi?id=232690
+        https://commits.webkit.org/r285318
+
 2021-11-08  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [WebGPU] Connect JS bindings code to internal WebGPU interface

Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CoreTextSPI.h (285512 => 285513)


--- trunk/Source/WebCore/PAL/pal/spi/cf/CoreTextSPI.h	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CoreTextSPI.h	2021-11-09 19:05:05 UTC (rev 285513)
@@ -169,7 +169,6 @@
 CTFontRef CTFontCreateForCharactersWithLanguageAndOption(CTFontRef currentFont, const UTF16Char *characters, CFIndex length, CFStringRef language, CTFontFallbackOption, CFIndex *coveredLength);
 CTFontRef CTFontCopyPhysicalFont(CTFontRef);
 CTFontSymbolicTraits CTFontGetPhysicalSymbolicTraits(CTFontRef);
-CFArrayRef CTFontCopyVariationAxesInternal(CTFontRef);
 
 extern const CFStringRef kCTUIFontTextStyleShortHeadline;
 extern const CFStringRef kCTUIFontTextStyleShortBody;

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (285512 => 285513)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-11-09 19:05:05 UTC (rev 285513)
@@ -629,7 +629,6 @@
 		1C26671B26FA932F00117073 /* FontCreationContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C26671926FA7F2E00117073 /* FontCreationContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1C43DE6B22AB4B8A001527D9 /* LocalCurrentTraitCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C43DE6822AB4B8A001527D9 /* LocalCurrentTraitCollection.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1C4D0DD324D9F10D003D7498 /* GlyphBufferMembers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C4D0DD124D9F0DB003D7498 /* GlyphBufferMembers.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		1C4DB02627339FE0007B0AD1 /* ShouldLocalizeAxisNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C4DB02427339E5E007B0AD1 /* ShouldLocalizeAxisNames.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1C5E1DA826F94B9000E07AF1 /* FontPaletteValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C5E1DA626F949B900E07AF1 /* FontPaletteValues.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		1C6626111C6E7CA600AB527C /* FontFace.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C66260F1C6E7CA600AB527C /* FontFace.h */; };
 		1C73A7132185757E004CCEA5 /* TextUnderlineOffset.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CB6B4FB217B83940093B9CD /* TextUnderlineOffset.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -7093,7 +7092,6 @@
 		1C43DE6A22AB4B8A001527D9 /* LocalCurrentTraitCollection.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalCurrentTraitCollection.mm; sourceTree = "<group>"; };
 		1C4674FD26F4843600B61273 /* FontPalette.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontPalette.h; sourceTree = "<group>"; };
 		1C4D0DD124D9F0DB003D7498 /* GlyphBufferMembers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GlyphBufferMembers.h; sourceTree = "<group>"; };
-		1C4DB02427339E5E007B0AD1 /* ShouldLocalizeAxisNames.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShouldLocalizeAxisNames.h; sourceTree = "<group>"; };
 		1C50C49522C84F2400A6E4BE /* WHLSLStandardLibraryFunctionMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLStandardLibraryFunctionMap.cpp; sourceTree = "<group>"; };
 		1C5E1DA626F949B900E07AF1 /* FontPaletteValues.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FontPaletteValues.h; sourceTree = "<group>"; };
 		1C66260E1C6E7CA600AB527C /* FontFace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFace.cpp; sourceTree = "<group>"; };
@@ -27986,7 +27984,6 @@
 				A73F95FD12C97BFE0031AAF9 /* RoundedRect.h */,
 				0F3DD44D12F5EA1B000D9190 /* ShadowBlur.cpp */,
 				0F3DD44E12F5EA1B000D9190 /* ShadowBlur.h */,
-				1C4DB02427339E5E007B0AD1 /* ShouldLocalizeAxisNames.h */,
 				1DD127AC256E3A8700B227D7 /* SourceBufferPrivate.cpp */,
 				CD641EB21818F5ED00EE4C41 /* SourceBufferPrivate.h */,
 				CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */,
@@ -36004,7 +36001,6 @@
 				CD36C16B260A65CC00C8C529 /* SharedRoutingArbitrator.h in Headers */,
 				834DFAD01F7DAE5D00C2725B /* SharedStringHash.h in Headers */,
 				93309EA3099EB78C0056E581 /* SharedTimer.h in Headers */,
-				1C4DB02627339FE0007B0AD1 /* ShouldLocalizeAxisNames.h in Headers */,
 				DF19E2AC24772BC1007BDACB /* ShouldRelaxThirdPartyCookieBlocking.h in Headers */,
 				8362E8C120CEF9CB00245886 /* ShouldTreatAsContinuingLoad.h in Headers */,
 				9316DDFB240C64B4009340AA /* SimpleRange.h in Headers */,

Modified: trunk/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp (285512 => 285513)


--- trunk/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/inspector/agents/InspectorCSSAgent.cpp	2021-11-09 19:05:05 UTC (rev 285513)
@@ -575,7 +575,7 @@
 static Ref<Protocol::CSS::Font> buildObjectForFont(const Font& font)
 {
     auto resultVariationAxes = JSON::ArrayOf<Protocol::CSS::FontVariationAxis>::create();
-    for (auto& variationAxis : font.platformData().variationAxes(ShouldLocalizeAxisNames::Yes)) {
+    for (auto& variationAxis : font.platformData().variationAxes()) {
         auto axis = Protocol::CSS::FontVariationAxis::create()
             .setTag(variationAxis.tag())
             .setMinimumValue(variationAxis.minimumValue())

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp (285512 => 285513)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.cpp	2021-11-09 19:05:05 UTC (rev 285513)
@@ -82,7 +82,7 @@
 #endif
 
 #if !PLATFORM(COCOA)
-Vector<FontPlatformData::FontVariationAxis> FontPlatformData::variationAxes(ShouldLocalizeAxisNames) const
+Vector<FontPlatformData::FontVariationAxis> FontPlatformData::variationAxes() const
 {
     // FIXME: <webkit.org/b/219614> Not implemented yet.
     return { };

Modified: trunk/Source/WebCore/platform/graphics/FontPlatformData.h (285512 => 285513)


--- trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/platform/graphics/FontPlatformData.h	2021-11-09 19:05:05 UTC (rev 285513)
@@ -25,7 +25,6 @@
 #pragma once
 
 #include "SharedBuffer.h"
-#include "ShouldLocalizeAxisNames.h"
 #include "TextFlags.h"
 #include <wtf/Forward.h>
 #include <wtf/RetainPtr.h>
@@ -180,7 +179,7 @@
     bool isForTextCombine() const { return widthVariant() != FontWidthVariant::RegularWidth; } // Keep in sync with callers of FontDescription::setWidthVariant().
 
     String familyName() const;
-    Vector<FontVariationAxis> variationAxes(ShouldLocalizeAxisNames) const;
+    Vector<FontVariationAxis> variationAxes() const;
 
 #if USE(CAIRO)
     cairo_scaled_font_t* scaledFont() const { return m_scaledFont.get(); }

Deleted: trunk/Source/WebCore/platform/graphics/ShouldLocalizeAxisNames.h (285512 => 285513)


--- trunk/Source/WebCore/platform/graphics/ShouldLocalizeAxisNames.h	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/platform/graphics/ShouldLocalizeAxisNames.h	2021-11-09 19:05:05 UTC (rev 285513)
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <cstdint>
-
-namespace WebCore {
-
-enum class ShouldLocalizeAxisNames : uint8_t {
-    No,
-    Yes
-};
-
-}

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (285512 => 285513)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2021-11-09 19:05:05 UTC (rev 285513)
@@ -300,22 +300,10 @@
     return CFStringGetLength(fontName) > 0 && CFStringGetCharacterAtIndex(fontName, 0) == '.';
 }
 
-static RetainPtr<CFArrayRef> variationAxes(CTFontRef font, ShouldLocalizeAxisNames shouldLocalizeAxisNames)
+VariationDefaultsMap defaultVariationValues(CTFontRef font)
 {
-#if defined(HAVE_CTFontCopyVariationAxesInternal) // This macro is defined inside CoreText, not WebKit.
-    if (shouldLocalizeAxisNames == ShouldLocalizeAxisNames::Yes)
-        return adoptCF(CTFontCopyVariationAxes(font));
-    return adoptCF(CTFontCopyVariationAxesInternal(font));
-#else
-    UNUSED_PARAM(shouldLocalizeAxisNames);
-    return adoptCF(CTFontCopyVariationAxes(font));
-#endif
-}
-
-VariationDefaultsMap defaultVariationValues(CTFontRef font, ShouldLocalizeAxisNames shouldLocalizeAxisNames)
-{
     VariationDefaultsMap result;
-    auto axes = variationAxes(font, shouldLocalizeAxisNames);
+    auto axes = adoptCF(CTFontCopyVariationAxes(font));
     if (!axes)
         return result;
     auto size = CFArrayGetCount(axes.get());
@@ -530,7 +518,7 @@
 
     auto fontOpticalSizing = fontDescription.opticalSizing();
 
-    auto defaultValues = defaultVariationValues(originalFont, ShouldLocalizeAxisNames::No);
+    auto defaultValues = defaultVariationValues(originalFont);
 
     auto fontSelectionRequest = fontDescription.fontSelectionRequest();
     auto fontStyleAxis = fontDescription.fontStyleAxis();
@@ -1033,7 +1021,7 @@
         return result;
 
     auto font = adoptCF(CTFontCreateWithFontDescriptor(fontDescriptor, 0, nullptr));
-    auto variations = variationAxes(font.get(), ShouldLocalizeAxisNames::No);
+    auto variations = adoptCF(CTFontCopyVariationAxes(font.get()));
     if (!variations)
         return result;
 

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h (285512 => 285513)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.h	2021-11-09 19:05:05 UTC (rev 285513)
@@ -29,7 +29,6 @@
 #pragma once
 
 #include "FontDescription.h"
-#include "ShouldLocalizeAxisNames.h"
 
 #include <CoreText/CTFont.h>
 
@@ -73,5 +72,5 @@
 void addAttributesForWebFonts(CFMutableDictionaryRef attributes, AllowUserInstalledFonts);
 RetainPtr<CFSetRef> installedFontMandatoryAttributes(AllowUserInstalledFonts);
 
-VariationDefaultsMap defaultVariationValues(CTFontRef, ShouldLocalizeAxisNames);
+VariationDefaultsMap defaultVariationValues(CTFontRef);
 }

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm (285512 => 285513)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2021-11-09 19:02:56 UTC (rev 285512)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm	2021-11-09 19:05:05 UTC (rev 285513)
@@ -62,7 +62,7 @@
     return nullptr;
 }
 
-Vector<FontPlatformData::FontVariationAxis> FontPlatformData::variationAxes(ShouldLocalizeAxisNames shouldLocalizeAxisNames) const
+Vector<FontPlatformData::FontVariationAxis> FontPlatformData::variationAxes() const
 {
     auto platformFont = ctFont();
     if (!platformFont)
@@ -69,7 +69,7 @@
         return { };
     
     Vector<FontVariationAxis> results;
-    for (auto& [tag, values] : defaultVariationValues(platformFont, shouldLocalizeAxisNames))
+    for (auto& [tag, values] : defaultVariationValues(platformFont))
         results.append(FontPlatformData::FontVariationAxis(values.axisName, String(tag.data(), tag.size()), values.defaultValue, values.minimumValue, values.maximumValue));
     
     return results;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to