⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245440 in webkit


Ignore:
Timestamp:
May 17, 2019, 3:14:44 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r243841 - -apple-trailing-word is needed for browser detection
https://bugs.webkit.org/show_bug.cgi?id=196575

Unreviewed.

PerformanceTests:

  • MotionMark/resources/debug-runner/motionmark.css:

(#intro .start-benchmark p):

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

This is an unreviewed partial revert of r243819. Turns out there are some websites
which use this property to do browser detection. So, we need to continue to parse
the property, but we don't need the property to do anything.

Test: fast/text/trailing-word-detection.html

  • Configurations/FeatureDefines.xcconfig:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TrailingWord const):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::trailingWord const):
(WebCore::RenderStyle::setTrailingWord):
(WebCore::RenderStyle::initialTrailingWord):

  • rendering/style/RenderStyleConstants.h:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • fast/text/trailing-word-detection-expected.txt: Added.
  • fast/text/trailing-word-detection.html: Added.
  • platform/gtk/TestExpectations:
  • platform/win/TestExpectations:
Location:
releases/WebKitGTK/webkit-2.24
Files:
2 added
18 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog

    r245439 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        * fast/text/trailing-word-detection-expected.txt: Added.
     9        * fast/text/trailing-word-detection.html: Added.
     10        * platform/gtk/TestExpectations:
     11        * platform/win/TestExpectations:
     12
    1132019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
    214
  • releases/WebKitGTK/webkit-2.24/LayoutTests/platform/gtk/TestExpectations

    r245439 r245440  
    32023202webkit.org/b/160248 fast/text/combining-mark-paint.html [ ImageOnlyFailure ]
    32033203webkit.org/b/160248 fast/text/synthetic-bold-transformed.html [ ImageOnlyFailure ]
     3204webkit.org/b/160248 fast/text/trailing-word-detection.html [ Failure ]
    32043205
    32053206webkit.org/b/160249 fast/shrink-wrap/rect-shrink-wrap.html [ ImageOnlyFailure ]
  • releases/WebKitGTK/webkit-2.24/LayoutTests/platform/win/TestExpectations

    r245439 r245440  
    29782978fast/text/combining-mark-paint.html [ ImageOnlyFailure ]
    29792979fast/text/synthetic-bold-transformed.html [ ImageOnlyFailure ]
     2980fast/text/trailing-word-detection.html [ Failure ]
    29802981
    29812982# TestRunner::addChromeInputField() and focusWebView() not implemented
  • releases/WebKitGTK/webkit-2.24/PerformanceTests/ChangeLog

    r241193 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        * MotionMark/resources/debug-runner/motionmark.css:
     9        (#intro .start-benchmark p):
     10
    1112019-02-08  Saam barati  <sbarati@apple.com>
    212
  • releases/WebKitGTK/webkit-2.24/PerformanceTests/MotionMark/resources/debug-runner/motionmark.css

    r233147 r245440  
    210210    color: hsl(11, 72%, 50%);
    211211    margin-bottom: 1em;
    212     -apple-trailing-word: -apple-partially-balanced;
    213212}
    214213
  • releases/WebKitGTK/webkit-2.24/Source/JavaScriptCore/ChangeLog

    r245439 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        * Configurations/FeatureDefines.xcconfig:
     9
    1102019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
    211
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r245439 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        This is an unreviewed partial revert of r243819. Turns out there are some websites
     9        which use this property to do browser detection. So, we need to continue to parse
     10        the property, but we don't need the property to do anything.
     11
     12        Test: fast/text/trailing-word-detection.html
     13
     14        * Configurations/FeatureDefines.xcconfig:
     15        * css/CSSComputedStyleDeclaration.cpp:
     16        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
     17        * css/CSSPrimitiveValueMappings.h:
     18        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     19        (WebCore::CSSPrimitiveValue::operator TrailingWord const):
     20        * css/CSSProperties.json:
     21        * css/CSSValueKeywords.in:
     22        * css/parser/CSSParserFastPaths.cpp:
     23        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
     24        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
     25        * rendering/style/RenderStyle.h:
     26        (WebCore::RenderStyle::trailingWord const):
     27        (WebCore::RenderStyle::setTrailingWord):
     28        (WebCore::RenderStyle::initialTrailingWord):
     29        * rendering/style/RenderStyleConstants.h:
     30
    1312019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
    232
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/PAL/ChangeLog

    r245439 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        * Configurations/FeatureDefines.xcconfig:
     9
    1102019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
    211
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r245439 r245440  
    40304030#endif
    40314031
     4032#if ENABLE(CSS_TRAILING_WORD)
     4033        case CSSPropertyAppleTrailingWord:
     4034            return cssValuePool.createValue(style.trailingWord());
     4035#endif
     4036
    40324037#if ENABLE(APPLE_PAY)
    40334038        case CSSPropertyApplePayButtonStyle:
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r245439 r245440  
    54065406#endif
    54075407
     5408#if ENABLE(CSS_TRAILING_WORD)
     5409template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TrailingWord e)
     5410    : CSSValue(PrimitiveClass)
     5411{
     5412    m_primitiveUnitType = CSS_VALUE_ID;
     5413    switch (e) {
     5414    case TrailingWord::Auto:
     5415        m_value.valueID = CSSValueAuto;
     5416        break;
     5417    case TrailingWord::PartiallyBalanced:
     5418        m_value.valueID = CSSValueWebkitPartiallyBalanced;
     5419        break;
     5420    default:
     5421        ASSERT_NOT_REACHED();
     5422        break;
     5423    }
     5424}
     5425
     5426template<> inline CSSPrimitiveValue::operator TrailingWord() const
     5427{
     5428    ASSERT(isValueID());
     5429    switch (m_value.valueID) {
     5430    case CSSValueAuto:
     5431        return TrailingWord::Auto;
     5432    case CSSValueWebkitPartiallyBalanced:
     5433        return TrailingWord::PartiallyBalanced;
     5434    default:
     5435        break;
     5436    }
     5437    ASSERT_NOT_REACHED();
     5438    return TrailingWord::Auto;
     5439}
     5440#endif
     5441
    54085442#if ENABLE(APPLE_PAY)
    54095443template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ApplePayButtonStyle e)
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSProperties.json

    r245439 r245440  
    69556955            "status": "non-standard"
    69566956        },
     6957        "-apple-trailing-word": {
     6958            "inherited": true,
     6959            "values": [
     6960                "auto",
     6961                "-webkit-partially-balanced"
     6962            ],
     6963            "codegen-properties": {
     6964                "name-for-methods": "TrailingWord",
     6965                "enable-if": "ENABLE_CSS_TRAILING_WORD"
     6966            },
     6967            "status": {
     6968                "status": "non-standard",
     6969                "comment": "Needed for feature-detecting the Safari browser. Implementation has no effect."
     6970            }
     6971        },
    69576972        "-apple-pay-button-style": {
    69586973            "codegen-properties": {
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSValueKeywords.in

    r245439 r245440  
    13241324from-intrinsic
    13251325
     1326#if defined(ENABLE_CSS_TRAILING_WORD) && ENABLE_CSS_TRAILING_WORD
     1327// -apple-trailing-word
     1328-webkit-partially-balanced
     1329#endif
     1330
    13261331#if defined(ENABLE_APPLE_PAY) && ENABLE_APPLE_PAY
    13271332// -apple-pay-button-style
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/parser/CSSParserFastPaths.cpp

    r245439 r245440  
    763763    case CSSPropertyWebkitBorderFit:
    764764        return valueID == CSSValueBorder || valueID == CSSValueLines;
     765#if ENABLE(CSS_TRAILING_WORD)
     766    case CSSPropertyAppleTrailingWord: // auto | -apple-partially-balanced
     767        return valueID == CSSValueAuto || valueID == CSSValueWebkitPartiallyBalanced;
     768#endif
    765769#if ENABLE(APPLE_PAY)
    766770    case CSSPropertyApplePayButtonStyle: // white | white-outline | black
     
    931935    // case CSSPropertyTextOrientation:
    932936    // case CSSPropertyUserSelect:
     937#if ENABLE(CSS_TRAILING_WORD)
     938    case CSSPropertyAppleTrailingWord:
     939#endif
    933940#if ENABLE(CSS_COMPOSITING)
    934941    case CSSPropertyIsolation:
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/style/RenderStyle.h

    r245439 r245440  
    800800    bool shouldPlaceBlockDirectionScrollbarOnLeft() const;
    801801
     802#if ENABLE(CSS_TRAILING_WORD)
     803    TrailingWord trailingWord() const { return TrailingWord::Auto; }
     804#endif
     805
    802806#if ENABLE(APPLE_PAY)
    803807    ApplePayButtonStyle applePayButtonStyle() const { return static_cast<ApplePayButtonStyle>(m_rareNonInheritedData->applePayButtonStyle); }
     
    12551259
    12561260    void setTextSecurity(TextSecurity security) { SET_VAR(m_rareInheritedData, textSecurity, static_cast<unsigned>(security)); }
     1261
     1262#if ENABLE(CSS_TRAILING_WORD)
     1263    void setTrailingWord(TrailingWord) { }
     1264#endif
    12571265
    12581266#if ENABLE(APPLE_PAY)
     
    16231631#endif
    16241632
     1633#if ENABLE(CSS_TRAILING_WORD)
     1634    static TrailingWord initialTrailingWord() { return TrailingWord::Auto; }
     1635#endif
     1636
    16251637#if ENABLE(APPLE_PAY)
    16261638    static ApplePayButtonStyle initialApplePayButtonStyle() { return ApplePayButtonStyle::Black; }
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/style/RenderStyleConstants.h

    r245439 r245440  
    11091109#endif
    11101110
     1111#if ENABLE(CSS_TRAILING_WORD)
     1112enum class TrailingWord : uint8_t {
     1113    Auto,
     1114    PartiallyBalanced
     1115};
     1116#endif
     1117
    11111118#if ENABLE(APPLE_PAY)
    11121119enum class ApplePayButtonStyle : uint8_t {
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog

    r245439 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        * Configurations/FeatureDefines.xcconfig:
     9
    1102019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
    211
  • releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/mac/ChangeLog

    r245439 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        * Configurations/FeatureDefines.xcconfig:
     9
    1102019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
    211
  • releases/WebKitGTK/webkit-2.24/Tools/ChangeLog

    r245439 r245440  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        -apple-trailing-word is needed for browser detection
     4        https://bugs.webkit.org/show_bug.cgi?id=196575
     5
     6        Unreviewed.
     7
     8        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
     9
    1102019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
    211
Note: See TracChangeset for help on using the changeset viewer.