Title: [282723] trunk
Revision
282723
Author
[email protected]
Date
2021-09-18 01:56:27 -0700 (Sat, 18 Sep 2021)

Log Message

[iOS Family] Delete letterpress support
https://bugs.webkit.org/show_bug.cgi?id=230441

Reviewed by Tim Horton.

Source/WebCore:

It isn't necessary anymore.

Tests deleted.

* PlatformMac.cmake:
* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationFlagsToCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator OptionSet<TextDecoration> const):
* css/CSSValueKeywords.in:
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeTextDecorationLine):
* platform/graphics/FontCascade.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/cocoa/FontCascadeCocoa.cpp: Added.
(WebCore::FontCascade::canReturnFallbackFontsForComplexText):
(WebCore::FontCascade::canExpandAroundIdeographsInComplexText):
* platform/graphics/cocoa/FontCascadeCocoa.mm: Removed.
* platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::FontCascade::drawGlyphs):
(WebCore::shouldUseLetterpressEffect): Deleted.
* rendering/TextPaintStyle.cpp:
(WebCore::TextPaintStyle::operator== const):
(WebCore::computeTextPaintStyle):
(WebCore::updateGraphicsContext):
* rendering/TextPaintStyle.h:
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* rendering/style/RenderStyleConstants.h:

Source/WTF:

* wtf/PlatformEnable.h:
* wtf/PlatformEnableCocoa.h:

LayoutTests:

* TestExpectations:
* fast/text/letterpress-different-expected-mismatch.html: Removed.
* fast/text/letterpress-different.html: Removed.
* fast/text/letterpress-paint-expected-mismatch.html: Removed.
* fast/text/letterpress-paint.html: Removed.
* platform/ios/TestExpectations:
* platform/ios/ios/getComputedStyle-text-decoration-letterpress-expected.txt: Removed.
* platform/ios/ios/getComputedStyle-text-decoration-letterpress.html: Removed.
* platform/ios/ios/resources/getComputedStyle-text-decoration-letterpress.js: Removed.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (282722 => 282723)


--- trunk/LayoutTests/ChangeLog	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/ChangeLog	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,3 +1,20 @@
+2021-09-18  Myles C. Maxfield  <[email protected]>
+
+        [iOS Family] Delete letterpress support
+        https://bugs.webkit.org/show_bug.cgi?id=230441
+
+        Reviewed by Tim Horton.
+
+        * TestExpectations:
+        * fast/text/letterpress-different-expected-mismatch.html: Removed.
+        * fast/text/letterpress-different.html: Removed.
+        * fast/text/letterpress-paint-expected-mismatch.html: Removed.
+        * fast/text/letterpress-paint.html: Removed.
+        * platform/ios/TestExpectations:
+        * platform/ios/ios/getComputedStyle-text-decoration-letterpress-expected.txt: Removed.
+        * platform/ios/ios/getComputedStyle-text-decoration-letterpress.html: Removed.
+        * platform/ios/ios/resources/getComputedStyle-text-decoration-letterpress.js: Removed.
+
 2021-09-17  Chris Dumez  <[email protected]>
 
         [ Catalina+ Win WK1 ] http/tests/misc/iframe-reparenting-id-collision.html is a flaky text failure

Modified: trunk/LayoutTests/TestExpectations (282722 => 282723)


--- trunk/LayoutTests/TestExpectations	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/TestExpectations	2021-09-18 08:56:27 UTC (rev 282723)
@@ -2588,9 +2588,6 @@
 
 webkit.org/b/172056 fast/text/multiglyph-characters.html [ Failure ]
 
-# Only iOS has implemented lettepress.
-fast/text/letterpress-different.html [ ImageOnlyFailure ]
-
 # CSS Shapes tests
 webkit.org/b/163706 imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/shape-image-010.html [ Skip ]
 webkit.org/b/163706 imported/w3c/web-platform-tests/css/css-shapes/shape-outside/shape-image/shape-image-024.html [ Skip ]

Deleted: trunk/LayoutTests/fast/text/letterpress-different-expected-mismatch.html (282722 => 282723)


--- trunk/LayoutTests/fast/text/letterpress-different-expected-mismatch.html	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/fast/text/letterpress-different-expected-mismatch.html	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-</head>
-<body>
-<div style="font: 17px system-ui;">Test passes if this text has a letterpress effect.</div>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/letterpress-different.html (282722 => 282723)


--- trunk/LayoutTests/fast/text/letterpress-different.html	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/fast/text/letterpress-different.html	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-</head>
-<body>
-<div style="font: 17px system-ui; text-decoration: -webkit-letterpress;">Test passes if this text has a letterpress effect.</div>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/letterpress-paint-expected-mismatch.html (282722 => 282723)


--- trunk/LayoutTests/fast/text/letterpress-paint-expected-mismatch.html	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/fast/text/letterpress-paint-expected-mismatch.html	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-</head>
-<body>
-</body>
-</html>

Deleted: trunk/LayoutTests/fast/text/letterpress-paint.html (282722 => 282723)


--- trunk/LayoutTests/fast/text/letterpress-paint.html	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/fast/text/letterpress-paint.html	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-</head>
-<body>
-<div style="font: 17px system-ui; text-decoration: -webkit-letterpress;">Test passes if something paints.</div>
-</body>
-</html>

Modified: trunk/LayoutTests/platform/ios/TestExpectations (282722 => 282723)


--- trunk/LayoutTests/platform/ios/TestExpectations	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2021-09-18 08:56:27 UTC (rev 282723)
@@ -2423,9 +2423,6 @@
 
 webkit.org/b/130972 transitions/3d/interrupted-transition.html [ Pass Timeout ]
 
-# Only iOS has implemented lettepress.
-fast/text/letterpress-different.html [ Pass ]
-
 webkit.org/b/162739 fast/images/gif-loop-count.html [ Pass ImageOnlyFailure ]
 
 webkit.org/b/162647 http/tests/xmlhttprequest/onabort-response-getters.html [ Pass Failure ]

Deleted: trunk/LayoutTests/platform/ios/ios/getComputedStyle-text-decoration-letterpress-expected.txt (282722 => 282723)


--- trunk/LayoutTests/platform/ios/ios/getComputedStyle-text-decoration-letterpress-expected.txt	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/platform/ios/ios/getComputedStyle-text-decoration-letterpress-expected.txt	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,47 +0,0 @@
-Test for custom letterpress text-decoration style.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Initial value:
-PASS e.style.getPropertyCSSValue('text-decoration') is null
-PASS computedStyle.textDecoration is 'none'
-PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
-PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
-
-Initial value (explicit):
-PASS e.style.textDecoration is 'initial'
-PASS e.style.getPropertyCSSValue('text-decoration').toString() is '[object CSSValue]'
-PASS e.style.getPropertyCSSValue('text-decoration').cssText is 'initial'
-PASS computedStyle.textDecoration is 'none'
-PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
-PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
-
-Value 'none':
-PASS e.style.textDecoration is 'none'
-PASS e.style.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
-PASS e.style.getPropertyCSSValue('text-decoration').cssText is 'none'
-PASS computedStyle.textDecoration is 'none'
-PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
-PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
-
-Value '-webkit-letterpress':
-PASS e.style.textDecoration is '-webkit-letterpress'
-PASS e.style.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
-PASS e.style.getPropertyCSSValue('text-decoration').cssText is '-webkit-letterpress'
-PASS computedStyle.textDecoration is '-webkit-letterpress'
-PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
-PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is '-webkit-letterpress'
-
-Value 'underline -webkit-letterpress line-through':
-PASS e.style.textDecoration is 'underline -webkit-letterpress line-through'
-PASS e.style.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
-PASS e.style.getPropertyCSSValue('text-decoration').cssText is 'underline -webkit-letterpress line-through'
-PASS computedStyle.textDecoration is 'underline line-through -webkit-letterpress'
-PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
-PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'underline line-through -webkit-letterpress'
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Deleted: trunk/LayoutTests/platform/ios/ios/getComputedStyle-text-decoration-letterpress.html (282722 => 282723)


--- trunk/LayoutTests/platform/ios/ios/getComputedStyle-text-decoration-letterpress.html	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/LayoutTests/platform/ios/ios/getComputedStyle-text-decoration-letterpress.html	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src=""
-</head>
-<body>
-<script src=""
-<script src=""
-</body>
-</html>

Modified: trunk/Source/WTF/ChangeLog (282722 => 282723)


--- trunk/Source/WTF/ChangeLog	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WTF/ChangeLog	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,3 +1,13 @@
+2021-09-18  Myles C. Maxfield  <[email protected]>
+
+        [iOS Family] Delete letterpress support
+        https://bugs.webkit.org/show_bug.cgi?id=230441
+
+        Reviewed by Tim Horton.
+
+        * wtf/PlatformEnable.h:
+        * wtf/PlatformEnableCocoa.h:
+
 2021-09-17  David Kilzer  <[email protected]>
 
         Build fix: WebKit::WebProcessPool should use a weak observer with CFNotificationCenter

Modified: trunk/Source/WTF/wtf/PlatformEnable.h (282722 => 282723)


--- trunk/Source/WTF/wtf/PlatformEnable.h	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WTF/wtf/PlatformEnable.h	2021-09-18 08:56:27 UTC (rev 282723)
@@ -348,10 +348,6 @@
 #define ENABLE_LAYOUT_FORMATTING_CONTEXT 0
 #endif
 
-#if !defined(ENABLE_LETTERPRESS)
-#define ENABLE_LETTERPRESS 0
-#endif
-
 #if !defined(ENABLE_MATHML)
 #define ENABLE_MATHML 1
 #endif

Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (282722 => 282723)


--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2021-09-18 08:56:27 UTC (rev 282723)
@@ -337,10 +337,6 @@
 #define ENABLE_LEGACY_ENCRYPTED_MEDIA 1
 #endif
 
-#if !defined(ENABLE_LETTERPRESS) && PLATFORM(IOS_FAMILY)
-#define ENABLE_LETTERPRESS 1
-#endif
-
 #if !defined(ENABLE_MAC_GESTURE_EVENTS) && PLATFORM(MAC) && USE(APPLE_INTERNAL_SDK)
 #define ENABLE_MAC_GESTURE_EVENTS 1
 #endif

Modified: trunk/Source/WebCore/ChangeLog (282722 => 282723)


--- trunk/Source/WebCore/ChangeLog	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/ChangeLog	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,3 +1,42 @@
+2021-09-18  Myles C. Maxfield  <[email protected]>
+
+        [iOS Family] Delete letterpress support
+        https://bugs.webkit.org/show_bug.cgi?id=230441
+
+        Reviewed by Tim Horton.
+
+        It isn't necessary anymore.
+
+        Tests deleted.
+
+        * PlatformMac.cmake:
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::renderTextDecorationFlagsToCSSValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::operator OptionSet<TextDecoration> const):
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeTextDecorationLine):
+        * platform/graphics/FontCascade.h:
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/cocoa/FontCascadeCocoa.cpp: Added.
+        (WebCore::FontCascade::canReturnFallbackFontsForComplexText):
+        (WebCore::FontCascade::canExpandAroundIdeographsInComplexText):
+        * platform/graphics/cocoa/FontCascadeCocoa.mm: Removed.
+        * platform/graphics/coretext/FontCascadeCoreText.cpp:
+        (WebCore::FontCascade::drawGlyphs):
+        (WebCore::shouldUseLetterpressEffect): Deleted.
+        * rendering/TextPaintStyle.cpp:
+        (WebCore::TextPaintStyle::operator== const):
+        (WebCore::computeTextPaintStyle):
+        (WebCore::updateGraphicsContext):
+        * rendering/TextPaintStyle.h:
+        * rendering/style/RenderStyleConstants.cpp:
+        (WebCore::operator<<):
+        * rendering/style/RenderStyleConstants.h:
+
 2021-09-17  Simon Fraser  <[email protected]>
 
         Replace all the complex math in ScrollAnimationSmooth with a single call into a CubicBezierTimingFunction

Modified: trunk/Source/WebCore/PlatformMac.cmake (282722 => 282723)


--- trunk/Source/WebCore/PlatformMac.cmake	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/PlatformMac.cmake	2021-09-18 08:56:27 UTC (rev 282723)
@@ -314,7 +314,7 @@
 
     platform/graphics/cocoa/FloatRectCocoa.mm
     platform/graphics/cocoa/FontCacheCoreText.cpp
-    platform/graphics/cocoa/FontCascadeCocoa.mm
+    platform/graphics/cocoa/FontCascadeCocoa.cpp
     platform/graphics/cocoa/FontCocoa.cpp
     platform/graphics/cocoa/FontDescriptionCocoa.cpp
     platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp

Modified: trunk/Source/WebCore/SourcesCocoa.txt (282722 => 282723)


--- trunk/Source/WebCore/SourcesCocoa.txt	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2021-09-18 08:56:27 UTC (rev 282723)
@@ -363,7 +363,7 @@
 platform/graphics/cocoa/ColorCocoa.mm
 platform/graphics/cocoa/FloatRectCocoa.mm
 platform/graphics/cocoa/FontCacheCoreText.cpp
-platform/graphics/cocoa/FontCascadeCocoa.mm
+platform/graphics/cocoa/FontCascadeCocoa.cpp
 platform/graphics/cocoa/FontCocoa.cpp
 platform/graphics/cocoa/FontDescriptionCocoa.cpp
 platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (282722 => 282723)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-09-18 08:56:27 UTC (rev 282723)
@@ -13984,7 +13984,7 @@
 		B2A1F2A90CEF0ABF00442F6A /* SVGMissingGlyphElement.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = SVGMissingGlyphElement.idl; sourceTree = "<group>"; };
 		B2AFFC750D00A5C10030074D /* FontCustomPlatformData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontCustomPlatformData.cpp; sourceTree = "<group>"; };
 		B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontCustomPlatformData.h; sourceTree = "<group>"; };
-		B2AFFC780D00A5C10030074D /* FontCascadeCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCascadeCocoa.mm; sourceTree = "<group>"; };
+		B2AFFC780D00A5C10030074D /* FontCascadeCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCascadeCocoa.cpp; sourceTree = "<group>"; };
 		B2AFFC8C0D00A5DF0030074D /* TextBoundaries.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = TextBoundaries.mm; sourceTree = "<group>"; };
 		B2B1F7140D00CAA8004AEA64 /* PointerEventsHitRules.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PointerEventsHitRules.cpp; sourceTree = "<group>"; };
 		B2B1F7150D00CAA8004AEA64 /* PointerEventsHitRules.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PointerEventsHitRules.h; sourceTree = "<group>"; };
@@ -27306,7 +27306,7 @@
 				B275354C0B053814002CE64F /* FloatRectCocoa.mm */,
 				1C3969CF1B74211E002BCFA7 /* FontCacheCoreText.cpp */,
 				C2458E611FE8979E00594759 /* FontCacheCoreText.h */,
-				B2AFFC780D00A5C10030074D /* FontCascadeCocoa.mm */,
+				B2AFFC780D00A5C10030074D /* FontCascadeCocoa.cpp */,
 				1C6FD8B0250A35F100D6E920 /* FontCocoa.cpp */,
 				1C12AC2C1EE779950079E0A0 /* FontDescriptionCocoa.cpp */,
 				1C12AC281EE778AE0079E0A0 /* FontFamilySpecificationCoreText.cpp */,

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (282722 => 282723)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1590,10 +1590,6 @@
         list->append(cssValuePool.createIdentifierValue(CSSValueOverline));
     if (textDecoration & TextDecoration::LineThrough)
         list->append(cssValuePool.createIdentifierValue(CSSValueLineThrough));
-#if ENABLE(LETTERPRESS)
-    if (textDecoration & TextDecoration::Letterpress)
-        list->append(cssValuePool.createIdentifierValue(CSSValueWebkitLetterpress));
-#endif
 
     if (!list->length())
         return cssValuePool.createIdentifierValue(CSSValueNone);

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (282722 => 282723)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2021-09-18 08:56:27 UTC (rev 282723)
@@ -2420,10 +2420,6 @@
         return TextDecoration::LineThrough;
     case CSSValueBlink:
         return TextDecoration::Blink;
-#if ENABLE(LETTERPRESS)
-    case CSSValueWebkitLetterpress:
-        return TextDecoration::Letterpress;
-#endif
     default:
         break;
     }

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (282722 => 282723)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1073,10 +1073,6 @@
 manual
 // auto
 
-#if defined(ENABLE_LETTERPRESS) && ENABLE_LETTERPRESS
--webkit-letterpress
-#endif
-
 #if defined(ENABLE_OVERFLOW_SCROLLING_TOUCH) && ENABLE_OVERFLOW_SCROLLING_TOUCH
 // -webkit-overflow-scrolling
 // auto

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (282722 => 282723)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1659,11 +1659,7 @@
 
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     while (true) {
-#if ENABLE(LETTERPRESS)
-        RefPtr<CSSPrimitiveValue> ident = consumeIdent<CSSValueBlink, CSSValueUnderline, CSSValueOverline, CSSValueLineThrough, CSSValueWebkitLetterpress>(range);
-#else
         RefPtr<CSSPrimitiveValue> ident = consumeIdent<CSSValueBlink, CSSValueUnderline, CSSValueOverline, CSSValueLineThrough>(range);
-#endif
         if (!ident)
             break;
         if (list->hasValue(ident.get()))

Modified: trunk/Source/WebCore/platform/graphics/FontCascade.h (282722 => 282723)


--- trunk/Source/WebCore/platform/graphics/FontCascade.h	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h	2021-09-18 08:56:27 UTC (rev 282723)
@@ -91,7 +91,6 @@
 };
 
 #if USE(CORE_TEXT)
-void showLetterpressedGlyphsWithAdvances(const FloatPoint&, const Font&, GraphicsContext&, const CGGlyph*, const CGSize* advances, unsigned count);
 void fillVectorWithHorizontalGlyphPositions(Vector<CGPoint, 256>& positions, CGContextRef, const CGSize* advances, unsigned count, const FloatPoint&);
 AffineTransform computeOverallTextMatrix(const Font&);
 AffineTransform computeVerticalTextMatrix(const Font&, const AffineTransform& previousTextMatrix);

Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (282722 => 282723)


--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2021-09-18 08:56:27 UTC (rev 282723)
@@ -104,9 +104,6 @@
 enum class TextDrawingMode : uint8_t {
     Fill = 1 << 0,
     Stroke = 1 << 1,
-#if ENABLE(LETTERPRESS)
-    Letterpress = 1 << 2,
-#endif
 };
 using TextDrawingModeFlags = OptionSet<TextDrawingMode>;
 
@@ -759,9 +756,6 @@
         WebCore::TextDrawingMode,
         WebCore::TextDrawingMode::Fill,
         WebCore::TextDrawingMode::Stroke
-#if ENABLE(LETTERPRESS)
-        , WebCore::TextDrawingMode::Letterpress
-#endif
     >;
 };
 

Added: trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.cpp (0 => 282723)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.cpp	2021-09-18 08:56:27 UTC (rev 282723)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 1999 Lars Knoll ([email protected])
+ *           (C) 1999 Antti Koivisto ([email protected])
+ *           (C) 2000 Dirk Mueller ([email protected])
+ * Copyright (C) 2003, 2006-2021, 2016 Apple Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "FontCascade.h"
+
+namespace WebCore {
+
+bool FontCascade::canReturnFallbackFontsForComplexText()
+{
+    return true;
+}
+
+bool FontCascade::canExpandAroundIdeographsInComplexText()
+{
+    return true;
+}
+
+}

Deleted: trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm (282722 => 282723)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 1999 Lars Knoll ([email protected])
- *           (C) 1999 Antti Koivisto ([email protected])
- *           (C) 2000 Dirk Mueller ([email protected])
- * Copyright (C) 2003, 2006-2011, 2016 Apple Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#import "config.h"
-#import "FontCascade.h"
-
-#import "GraphicsContextCG.h"
-#import <pal/spi/cg/CoreGraphicsSPI.h>
-
-#if PLATFORM(IOS_FAMILY)
-#import <pal/ios/UIKitSoftLink.h>
-#import <pal/spi/ios/CoreUISPI.h>
-#import <wtf/SoftLinking.h>
-
-SOFT_LINK_PRIVATE_FRAMEWORK(CoreUI)
-SOFT_LINK_CLASS(CoreUI, CUICatalog)
-SOFT_LINK_CLASS(CoreUI, CUIStyleEffectConfiguration)
-#endif
-
-namespace WebCore {
-
-bool FontCascade::canReturnFallbackFontsForComplexText()
-{
-    return true;
-}
-
-bool FontCascade::canExpandAroundIdeographsInComplexText()
-{
-    return true;
-}
-
-void showLetterpressedGlyphsWithAdvances(const FloatPoint& point, const Font& font, GraphicsContext& coreContext, const CGGlyph* glyphs, const CGSize* advances, unsigned count)
-{
-#if ENABLE(LETTERPRESS)
-    if (!count)
-        return;
-
-    const FontPlatformData& platformData = font.platformData();
-    if (platformData.orientation() == FontOrientation::Vertical) {
-        // FIXME: Implement support for vertical text. See <rdar://problem/13737298>.
-        return;
-    }
-
-    CGContextRef context = coreContext.platformContext();
-
-    Vector<CGPoint, 256> positions(count);
-    fillVectorWithHorizontalGlyphPositions(positions, context, advances, count, point);
-
-    CTFontRef ctFont = platformData.ctFont();
-    CGContextSetFontSize(context, CTFontGetSize(ctFont));
-
-    static CUICatalog *catalog = PAL::softLink_UIKit__UIKitGetTextEffectsCatalog();
-    if (!catalog)
-        return;
-
-    static CUIStyleEffectConfiguration *styleConfiguration;
-    if (!styleConfiguration) {
-        styleConfiguration = [allocCUIStyleEffectConfigurationInstance() init];
-        styleConfiguration.useSimplifiedEffect = YES;
-    }
-
-#if HAVE(OS_DARK_MODE_SUPPORT)
-    styleConfiguration.appearanceName = coreContext.useDarkAppearance() ? @"UIAppearanceDark" : @"UIAppearanceLight";
-#endif
-
-    CGContextSetFont(context, adoptCF(CTFontCopyGraphicsFont(ctFont, nullptr)).get());
-    CGContextSetFontSize(context, platformData.size());
-
-    [catalog drawGlyphs:glyphs atPositions:positions.data() inContext:context withFont:ctFont count:count stylePresetName:@"_UIKitNewLetterpressStyle" styleConfiguration:styleConfiguration foregroundColor:CGContextGetFillColorAsColor(context)];
-
-    CGContextSetFont(context, nullptr);
-    CGContextSetFontSize(context, 0);
-#else
-    UNUSED_PARAM(point);
-    UNUSED_PARAM(font);
-    UNUSED_PARAM(coreContext);
-    UNUSED_PARAM(glyphs);
-    UNUSED_PARAM(advances);
-    UNUSED_PARAM(count);
-#endif
-}
-
-}

Modified: trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp (282722 => 282723)


--- trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp	2021-09-18 08:56:27 UTC (rev 282723)
@@ -150,16 +150,6 @@
     }
 }
 
-static inline bool shouldUseLetterpressEffect(const GraphicsContext& context)
-{
-#if ENABLE(LETTERPRESS)
-    return context.textDrawingMode().contains(TextDrawingMode::Letterpress);
-#else
-    UNUSED_PARAM(context);
-    return false;
-#endif
-}
-
 static void showGlyphsWithAdvances(const FloatPoint& point, const Font& font, CGContextRef context, const CGGlyph* glyphs, const CGSize* advances, unsigned count, const AffineTransform& textMatrix)
 {
     if (!count)
@@ -242,8 +232,6 @@
     if (shouldAntialias != originalShouldAntialias)
         CGContextSetShouldAntialias(cgContext, shouldAntialias);
 
-    bool useLetterpressEffect = shouldUseLetterpressEffect(context);
-    UNUSED_VARIABLE(useLetterpressEffect);
     FloatPoint point = anchorPoint;
 
     auto textMatrix = computeOverallTextMatrix(font);
@@ -284,14 +272,7 @@
         context.setFillColor(fillColor);
     }
 
-#if ENABLE(LETTERPRESS)
-    if (useLetterpressEffect)
-        showLetterpressedGlyphsWithAdvances(point, font, context, glyphs, advances, numGlyphs);
-    else
-#endif
-    {
-        showGlyphsWithAdvances(point, font, cgContext, glyphs, advances, numGlyphs, textMatrix);
-    }
+    showGlyphsWithAdvances(point, font, cgContext, glyphs, advances, numGlyphs, textMatrix);
 
     if (syntheticBoldOffset)
         showGlyphsWithAdvances(FloatPoint(point.x() + syntheticBoldOffset, point.y()), font, cgContext, glyphs, advances, numGlyphs, textMatrix);

Modified: trunk/Source/WebCore/rendering/TextPaintStyle.cpp (282722 => 282723)


--- trunk/Source/WebCore/rendering/TextPaintStyle.cpp	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/rendering/TextPaintStyle.cpp	2021-09-18 08:56:27 UTC (rev 282723)
@@ -50,9 +50,6 @@
 {
     return fillColor == other.fillColor && strokeColor == other.strokeColor && emphasisMarkColor == other.emphasisMarkColor
         && strokeWidth == other.strokeWidth && paintOrder == other.paintOrder && lineJoin == other.lineJoin
-#if ENABLE(LETTERPRESS)
-        && useLetterpressEffect == other.useLetterpressEffect
-#endif
 #if HAVE(OS_DARK_MODE_SUPPORT)
         && useDarkAppearance == other.useDarkAppearance
 #endif
@@ -80,10 +77,6 @@
 {
     TextPaintStyle paintStyle;
 
-#if ENABLE(LETTERPRESS)
-    paintStyle.useLetterpressEffect = lineStyle.textDecorationsInEffect().contains(TextDecoration::Letterpress);
-#endif
-
 #if HAVE(OS_DARK_MODE_SUPPORT)
     paintStyle.useDarkAppearance = frame.document() ? frame.document()->useDarkAppearance(&lineStyle) : false;
 #endif
@@ -180,12 +173,6 @@
 {
     TextDrawingModeFlags mode = context.textDrawingMode();
     TextDrawingModeFlags newMode = mode;
-#if ENABLE(LETTERPRESS)
-    if (paintStyle.useLetterpressEffect)
-        newMode.add(TextDrawingMode::Letterpress);
-    else
-        newMode.remove(TextDrawingMode::Letterpress);
-#endif
     if (paintStyle.strokeWidth > 0 && paintStyle.strokeColor.isVisible())
         newMode.add(TextDrawingMode::Stroke);
     if (mode != newMode) {

Modified: trunk/Source/WebCore/rendering/TextPaintStyle.h (282722 => 282723)


--- trunk/Source/WebCore/rendering/TextPaintStyle.h	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/rendering/TextPaintStyle.h	2021-09-18 08:56:27 UTC (rev 282723)
@@ -49,9 +49,6 @@
     Color strokeColor;
     Color emphasisMarkColor;
     float strokeWidth { 0 };
-#if ENABLE(LETTERPRESS)
-    bool useLetterpressEffect { false };
-#endif
 #if HAVE(OS_DARK_MODE_SUPPORT)
     bool useDarkAppearance { false };
 #endif

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp (282722 => 282723)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp	2021-09-18 08:56:27 UTC (rev 282723)
@@ -1063,9 +1063,6 @@
     case TextDecoration::Overline: ts << "overline"; break;
     case TextDecoration::LineThrough: ts << "line-through"; break;
     case TextDecoration::Blink: ts << "blink"; break;
-#if ENABLE(LETTERPRESS)
-    case TextDecoration::Letterpress: ts << "letterpress"; break;
-#endif
     }
     return ts;
 }

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (282722 => 282723)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-09-18 06:51:07 UTC (rev 282722)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-09-18 08:56:27 UTC (rev 282723)
@@ -739,11 +739,7 @@
     None
 };
 
-#if ENABLE(LETTERPRESS)
-static const size_t TextDecorationBits = 5;
-#else
 static const size_t TextDecorationBits = 4;
-#endif
 enum class TextDecoration : uint8_t {
     None          = 0,
     Underline     = 1 << 0,
@@ -750,9 +746,6 @@
     Overline      = 1 << 1,
     LineThrough   = 1 << 2,
     Blink         = 1 << 3,
-#if ENABLE(LETTERPRESS)
-    Letterpress   = 1 << 4,
-#endif
 };
 
 enum class TextDecorationStyle : uint8_t {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to