Changeset 282723 in webkit


Ignore:
Timestamp:
Sep 18, 2021, 1:56:27 AM (4 years ago)
Author:
[email protected]
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.
Location:
trunk
Files:
1 added
8 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r282716 r282723  
     12021-09-18  Myles C. Maxfield  <[email protected]>
     2
     3        [iOS Family] Delete letterpress support
     4        https://bugs.webkit.org/show_bug.cgi?id=230441
     5
     6        Reviewed by Tim Horton.
     7
     8        * TestExpectations:
     9        * fast/text/letterpress-different-expected-mismatch.html: Removed.
     10        * fast/text/letterpress-different.html: Removed.
     11        * fast/text/letterpress-paint-expected-mismatch.html: Removed.
     12        * fast/text/letterpress-paint.html: Removed.
     13        * platform/ios/TestExpectations:
     14        * platform/ios/ios/getComputedStyle-text-decoration-letterpress-expected.txt: Removed.
     15        * platform/ios/ios/getComputedStyle-text-decoration-letterpress.html: Removed.
     16        * platform/ios/ios/resources/getComputedStyle-text-decoration-letterpress.js: Removed.
     17
    1182021-09-17  Chris Dumez  <[email protected]>
    219
  • trunk/LayoutTests/TestExpectations

    r282713 r282723  
    25882588
    25892589webkit.org/b/172056 fast/text/multiglyph-characters.html [ Failure ]
    2590 
    2591 # Only iOS has implemented lettepress.
    2592 fast/text/letterpress-different.html [ ImageOnlyFailure ]
    25932590
    25942591# CSS Shapes tests
  • trunk/LayoutTests/platform/ios/TestExpectations

    r282696 r282723  
    24242424webkit.org/b/130972 transitions/3d/interrupted-transition.html [ Pass Timeout ]
    24252425
    2426 # Only iOS has implemented lettepress.
    2427 fast/text/letterpress-different.html [ Pass ]
    2428 
    24292426webkit.org/b/162739 fast/images/gif-loop-count.html [ Pass ImageOnlyFailure ]
    24302427
  • trunk/Source/WTF/ChangeLog

    r282705 r282723  
     12021-09-18  Myles C. Maxfield  <[email protected]>
     2
     3        [iOS Family] Delete letterpress support
     4        https://bugs.webkit.org/show_bug.cgi?id=230441
     5
     6        Reviewed by Tim Horton.
     7
     8        * wtf/PlatformEnable.h:
     9        * wtf/PlatformEnableCocoa.h:
     10
    1112021-09-17  David Kilzer  <[email protected]>
    212
  • trunk/Source/WTF/wtf/PlatformEnable.h

    r282513 r282723  
    349349#endif
    350350
    351 #if !defined(ENABLE_LETTERPRESS)
    352 #define ENABLE_LETTERPRESS 0
    353 #endif
    354 
    355351#if !defined(ENABLE_MATHML)
    356352#define ENABLE_MATHML 1
  • trunk/Source/WTF/wtf/PlatformEnableCocoa.h

    r282628 r282723  
    338338#endif
    339339
    340 #if !defined(ENABLE_LETTERPRESS) && PLATFORM(IOS_FAMILY)
    341 #define ENABLE_LETTERPRESS 1
    342 #endif
    343 
    344340#if !defined(ENABLE_MAC_GESTURE_EVENTS) && PLATFORM(MAC) && USE(APPLE_INTERNAL_SDK)
    345341#define ENABLE_MAC_GESTURE_EVENTS 1
  • trunk/Source/WebCore/ChangeLog

    r282721 r282723  
     12021-09-18  Myles C. Maxfield  <[email protected]>
     2
     3        [iOS Family] Delete letterpress support
     4        https://bugs.webkit.org/show_bug.cgi?id=230441
     5
     6        Reviewed by Tim Horton.
     7
     8        It isn't necessary anymore.
     9
     10        Tests deleted.
     11
     12        * PlatformMac.cmake:
     13        * SourcesCocoa.txt:
     14        * WebCore.xcodeproj/project.pbxproj:
     15        * css/CSSComputedStyleDeclaration.cpp:
     16        (WebCore::renderTextDecorationFlagsToCSSValue):
     17        * css/CSSPrimitiveValueMappings.h:
     18        (WebCore::CSSPrimitiveValue::operator OptionSet<TextDecoration> const):
     19        * css/CSSValueKeywords.in:
     20        * css/parser/CSSPropertyParser.cpp:
     21        (WebCore::consumeTextDecorationLine):
     22        * platform/graphics/FontCascade.h:
     23        * platform/graphics/GraphicsContext.h:
     24        * platform/graphics/cocoa/FontCascadeCocoa.cpp: Added.
     25        (WebCore::FontCascade::canReturnFallbackFontsForComplexText):
     26        (WebCore::FontCascade::canExpandAroundIdeographsInComplexText):
     27        * platform/graphics/cocoa/FontCascadeCocoa.mm: Removed.
     28        * platform/graphics/coretext/FontCascadeCoreText.cpp:
     29        (WebCore::FontCascade::drawGlyphs):
     30        (WebCore::shouldUseLetterpressEffect): Deleted.
     31        * rendering/TextPaintStyle.cpp:
     32        (WebCore::TextPaintStyle::operator== const):
     33        (WebCore::computeTextPaintStyle):
     34        (WebCore::updateGraphicsContext):
     35        * rendering/TextPaintStyle.h:
     36        * rendering/style/RenderStyleConstants.cpp:
     37        (WebCore::operator<<):
     38        * rendering/style/RenderStyleConstants.h:
     39
    1402021-09-17  Simon Fraser  <[email protected]>
    241
  • trunk/Source/WebCore/PlatformMac.cmake

    r282480 r282723  
    315315    platform/graphics/cocoa/FloatRectCocoa.mm
    316316    platform/graphics/cocoa/FontCacheCoreText.cpp
    317     platform/graphics/cocoa/FontCascadeCocoa.mm
     317    platform/graphics/cocoa/FontCascadeCocoa.cpp
    318318    platform/graphics/cocoa/FontCocoa.cpp
    319319    platform/graphics/cocoa/FontDescriptionCocoa.cpp
  • trunk/Source/WebCore/SourcesCocoa.txt

    r282720 r282723  
    364364platform/graphics/cocoa/FloatRectCocoa.mm
    365365platform/graphics/cocoa/FontCacheCoreText.cpp
    366 platform/graphics/cocoa/FontCascadeCocoa.mm
     366platform/graphics/cocoa/FontCascadeCocoa.cpp
    367367platform/graphics/cocoa/FontCocoa.cpp
    368368platform/graphics/cocoa/FontDescriptionCocoa.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r282720 r282723  
    1398513985                B2AFFC750D00A5C10030074D /* FontCustomPlatformData.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontCustomPlatformData.cpp; sourceTree = "<group>"; };
    1398613986                B2AFFC760D00A5C10030074D /* FontCustomPlatformData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontCustomPlatformData.h; sourceTree = "<group>"; };
    13987                 B2AFFC780D00A5C10030074D /* FontCascadeCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCascadeCocoa.mm; sourceTree = "<group>"; };
     13987                B2AFFC780D00A5C10030074D /* FontCascadeCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCascadeCocoa.cpp; sourceTree = "<group>"; };
    1398813988                B2AFFC8C0D00A5DF0030074D /* TextBoundaries.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = TextBoundaries.mm; sourceTree = "<group>"; };
    1398913989                B2B1F7140D00CAA8004AEA64 /* PointerEventsHitRules.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PointerEventsHitRules.cpp; sourceTree = "<group>"; };
     
    2730727307                                1C3969CF1B74211E002BCFA7 /* FontCacheCoreText.cpp */,
    2730827308                                C2458E611FE8979E00594759 /* FontCacheCoreText.h */,
    27309                                 B2AFFC780D00A5C10030074D /* FontCascadeCocoa.mm */,
     27309                                B2AFFC780D00A5C10030074D /* FontCascadeCocoa.cpp */,
    2731027310                                1C6FD8B0250A35F100D6E920 /* FontCocoa.cpp */,
    2731127311                                1C12AC2C1EE779950079E0A0 /* FontDescriptionCocoa.cpp */,
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r282545 r282723  
    15911591    if (textDecoration & TextDecoration::LineThrough)
    15921592        list->append(cssValuePool.createIdentifierValue(CSSValueLineThrough));
    1593 #if ENABLE(LETTERPRESS)
    1594     if (textDecoration & TextDecoration::Letterpress)
    1595         list->append(cssValuePool.createIdentifierValue(CSSValueWebkitLetterpress));
    1596 #endif
    15971593
    15981594    if (!list->length())
  • trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r282397 r282723  
    24212421    case CSSValueBlink:
    24222422        return TextDecoration::Blink;
    2423 #if ENABLE(LETTERPRESS)
    2424     case CSSValueWebkitLetterpress:
    2425         return TextDecoration::Letterpress;
    2426 #endif
    24272423    default:
    24282424        break;
  • trunk/Source/WebCore/css/CSSValueKeywords.in

    r282162 r282723  
    10741074// auto
    10751075
    1076 #if defined(ENABLE_LETTERPRESS) && ENABLE_LETTERPRESS
    1077 -webkit-letterpress
    1078 #endif
    1079 
    10801076#if defined(ENABLE_OVERFLOW_SCROLLING_TOUCH) && ENABLE_OVERFLOW_SCROLLING_TOUCH
    10811077// -webkit-overflow-scrolling
  • trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp

    r282403 r282723  
    16601660    RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
    16611661    while (true) {
    1662 #if ENABLE(LETTERPRESS)
    1663         RefPtr<CSSPrimitiveValue> ident = consumeIdent<CSSValueBlink, CSSValueUnderline, CSSValueOverline, CSSValueLineThrough, CSSValueWebkitLetterpress>(range);
    1664 #else
    16651662        RefPtr<CSSPrimitiveValue> ident = consumeIdent<CSSValueBlink, CSSValueUnderline, CSSValueOverline, CSSValueLineThrough>(range);
    1666 #endif
    16671663        if (!ident)
    16681664            break;
  • trunk/Source/WebCore/platform/graphics/FontCascade.h

    r282242 r282723  
    9292
    9393#if USE(CORE_TEXT)
    94 void showLetterpressedGlyphsWithAdvances(const FloatPoint&, const Font&, GraphicsContext&, const CGGlyph*, const CGSize* advances, unsigned count);
    9594void fillVectorWithHorizontalGlyphPositions(Vector<CGPoint, 256>& positions, CGContextRef, const CGSize* advances, unsigned count, const FloatPoint&);
    9695AffineTransform computeOverallTextMatrix(const Font&);
  • trunk/Source/WebCore/platform/graphics/GraphicsContext.h

    r279794 r282723  
    105105    Fill = 1 << 0,
    106106    Stroke = 1 << 1,
    107 #if ENABLE(LETTERPRESS)
    108     Letterpress = 1 << 2,
    109 #endif
    110107};
    111108using TextDrawingModeFlags = OptionSet<TextDrawingMode>;
     
    760757        WebCore::TextDrawingMode::Fill,
    761758        WebCore::TextDrawingMode::Stroke
    762 #if ENABLE(LETTERPRESS)
    763         , WebCore::TextDrawingMode::Letterpress
    764 #endif
    765759    >;
    766760};
  • trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp

    r279301 r282723  
    151151}
    152152
    153 static inline bool shouldUseLetterpressEffect(const GraphicsContext& context)
    154 {
    155 #if ENABLE(LETTERPRESS)
    156     return context.textDrawingMode().contains(TextDrawingMode::Letterpress);
    157 #else
    158     UNUSED_PARAM(context);
    159     return false;
    160 #endif
    161 }
    162 
    163153static void showGlyphsWithAdvances(const FloatPoint& point, const Font& font, CGContextRef context, const CGGlyph* glyphs, const CGSize* advances, unsigned count, const AffineTransform& textMatrix)
    164154{
     
    243233        CGContextSetShouldAntialias(cgContext, shouldAntialias);
    244234
    245     bool useLetterpressEffect = shouldUseLetterpressEffect(context);
    246     UNUSED_VARIABLE(useLetterpressEffect);
    247235    FloatPoint point = anchorPoint;
    248236
     
    285273    }
    286274
    287 #if ENABLE(LETTERPRESS)
    288     if (useLetterpressEffect)
    289         showLetterpressedGlyphsWithAdvances(point, font, context, glyphs, advances, numGlyphs);
    290     else
    291 #endif
    292     {
    293         showGlyphsWithAdvances(point, font, cgContext, glyphs, advances, numGlyphs, textMatrix);
    294     }
     275    showGlyphsWithAdvances(point, font, cgContext, glyphs, advances, numGlyphs, textMatrix);
    295276
    296277    if (syntheticBoldOffset)
  • trunk/Source/WebCore/rendering/TextPaintStyle.cpp

    r279002 r282723  
    5151    return fillColor == other.fillColor && strokeColor == other.strokeColor && emphasisMarkColor == other.emphasisMarkColor
    5252        && strokeWidth == other.strokeWidth && paintOrder == other.paintOrder && lineJoin == other.lineJoin
    53 #if ENABLE(LETTERPRESS)
    54         && useLetterpressEffect == other.useLetterpressEffect
    55 #endif
    5653#if HAVE(OS_DARK_MODE_SUPPORT)
    5754        && useDarkAppearance == other.useDarkAppearance
     
    8077{
    8178    TextPaintStyle paintStyle;
    82 
    83 #if ENABLE(LETTERPRESS)
    84     paintStyle.useLetterpressEffect = lineStyle.textDecorationsInEffect().contains(TextDecoration::Letterpress);
    85 #endif
    8679
    8780#if HAVE(OS_DARK_MODE_SUPPORT)
     
    181174    TextDrawingModeFlags mode = context.textDrawingMode();
    182175    TextDrawingModeFlags newMode = mode;
    183 #if ENABLE(LETTERPRESS)
    184     if (paintStyle.useLetterpressEffect)
    185         newMode.add(TextDrawingMode::Letterpress);
    186     else
    187         newMode.remove(TextDrawingMode::Letterpress);
    188 #endif
    189176    if (paintStyle.strokeWidth > 0 && paintStyle.strokeColor.isVisible())
    190177        newMode.add(TextDrawingMode::Stroke);
  • trunk/Source/WebCore/rendering/TextPaintStyle.h

    r278253 r282723  
    5050    Color emphasisMarkColor;
    5151    float strokeWidth { 0 };
    52 #if ENABLE(LETTERPRESS)
    53     bool useLetterpressEffect { false };
    54 #endif
    5552#if HAVE(OS_DARK_MODE_SUPPORT)
    5653    bool useDarkAppearance { false };
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp

    r282397 r282723  
    10641064    case TextDecoration::LineThrough: ts << "line-through"; break;
    10651065    case TextDecoration::Blink: ts << "blink"; break;
    1066 #if ENABLE(LETTERPRESS)
    1067     case TextDecoration::Letterpress: ts << "letterpress"; break;
    1068 #endif
    10691066    }
    10701067    return ts;
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r282397 r282723  
    740740};
    741741
    742 #if ENABLE(LETTERPRESS)
    743 static const size_t TextDecorationBits = 5;
    744 #else
    745742static const size_t TextDecorationBits = 4;
    746 #endif
    747743enum class TextDecoration : uint8_t {
    748744    None          = 0,
     
    751747    LineThrough   = 1 << 2,
    752748    Blink         = 1 << 3,
    753 #if ENABLE(LETTERPRESS)
    754     Letterpress   = 1 << 4,
    755 #endif
    756749};
    757750
Note: See TracChangeset for help on using the changeset viewer.