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

Changeset 245439 in webkit


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

Merge r243819 - Remove support for -apple-trailing-word
https://bugs.webkit.org/show_bug.cgi?id=196525

Reviewed by Zalan Bujtas.

This CSS property is nonstandard and not used.

.:

  • Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

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

(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):

  • css/CSSPrimitiveValueMappings.h:

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

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

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

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForStyle):

  • rendering/SimpleLineLayoutCoverage.cpp:

(WebCore::SimpleLineLayout::printReason):

  • rendering/SimpleLineLayoutCoverage.h:
  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::lineBreak):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::commitLineBreakClear):
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
(WebCore::BreakingContext::handleBR):
(WebCore::BreakingContext::handleFloat):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::handleEndOfLine):
(WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::push): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::update): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::renderer const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::offset const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::get const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::current const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::historyLength const): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::moveTo): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::increment): Deleted.
(WebCore::BreakingContext::InlineIteratorHistory::clear): Deleted.
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Deleted.

  • rendering/style/RenderStyle.h:

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

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator== const):

  • rendering/style/StyleRareInheritedData.h:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • fast/text/trailing-word-expected.html: Removed.
  • fast/text/trailing-word.html: Removed.
  • platform/gtk/TestExpectations:
  • platform/mac/fast/text/trailing-word-parse-expected.txt: Removed.
  • platform/mac/fast/text/trailing-word-parse.html: Removed.
  • platform/win/TestExpectations:
Location:
releases/WebKitGTK/webkit-2.24
Files:
4 deleted
27 edited

Legend:

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

    r245133 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * Source/cmake/WebKitFeatures.cmake:
     11
    1122019-05-09  Xan López  <xan@igalia.com>
    213
  • releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog

    r245438 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * fast/text/trailing-word-expected.html: Removed.
     11        * fast/text/trailing-word.html: Removed.
     12        * platform/gtk/TestExpectations:
     13        * platform/mac/fast/text/trailing-word-parse-expected.txt: Removed.
     14        * platform/mac/fast/text/trailing-word-parse.html: Removed.
     15        * platform/win/TestExpectations:
     16
    1172019-04-02  Simon Fraser  <simon.fraser@apple.com>
    218
  • releases/WebKitGTK/webkit-2.24/LayoutTests/platform/gtk/TestExpectations

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

    r241518 r245439  
    29782978fast/text/combining-mark-paint.html [ ImageOnlyFailure ]
    29792979fast/text/synthetic-bold-transformed.html [ ImageOnlyFailure ]
    2980 fast/text/trailing-word.html [ ImageOnlyFailure ]
    29812980
    29822981# TestRunner::addChromeInputField() and focusWebView() not implemented
  • releases/WebKitGTK/webkit-2.24/Source/JavaScriptCore/ChangeLog

    r245436 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11
    1122019-03-12  Michael Saboff  <msaboff@apple.com>
    213
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r245438 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11        * css/CSSComputedStyleDeclaration.cpp:
     12        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
     13        * css/CSSPrimitiveValueMappings.h:
     14        (WebCore::CSSPrimitiveValue::operator TrailingWord const): Deleted.
     15        * css/CSSProperties.json:
     16        * css/CSSValueKeywords.in:
     17        * css/parser/CSSParserFastPaths.cpp:
     18        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
     19        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
     20        * rendering/SimpleLineLayout.cpp:
     21        (WebCore::SimpleLineLayout::canUseForStyle):
     22        * rendering/SimpleLineLayoutCoverage.cpp:
     23        (WebCore::SimpleLineLayout::printReason):
     24        * rendering/SimpleLineLayoutCoverage.h:
     25        * rendering/line/BreakingContext.h:
     26        (WebCore::BreakingContext::BreakingContext):
     27        (WebCore::BreakingContext::lineBreak):
     28        (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
     29        (WebCore::BreakingContext::commitLineBreakClear):
     30        (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
     31        (WebCore::BreakingContext::handleBR):
     32        (WebCore::BreakingContext::handleFloat):
     33        (WebCore::BreakingContext::handleText):
     34        (WebCore::BreakingContext::handleEndOfLine):
     35        (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Deleted.
     36        (WebCore::BreakingContext::InlineIteratorHistory::push): Deleted.
     37        (WebCore::BreakingContext::InlineIteratorHistory::update): Deleted.
     38        (WebCore::BreakingContext::InlineIteratorHistory::renderer const): Deleted.
     39        (WebCore::BreakingContext::InlineIteratorHistory::offset const): Deleted.
     40        (WebCore::BreakingContext::InlineIteratorHistory::nextBreakablePosition const): Deleted.
     41        (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator const): Deleted.
     42        (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode const): Deleted.
     43        (WebCore::BreakingContext::InlineIteratorHistory::get const): Deleted.
     44        (WebCore::BreakingContext::InlineIteratorHistory::current const): Deleted.
     45        (WebCore::BreakingContext::InlineIteratorHistory::historyLength const): Deleted.
     46        (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Deleted.
     47        (WebCore::BreakingContext::InlineIteratorHistory::increment): Deleted.
     48        (WebCore::BreakingContext::InlineIteratorHistory::clear): Deleted.
     49        (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Deleted.
     50        * rendering/style/RenderStyle.h:
     51        (WebCore::RenderStyle::trailingWord const): Deleted.
     52        (WebCore::RenderStyle::setTrailingWord): Deleted.
     53        (WebCore::RenderStyle::initialTrailingWord): Deleted.
     54        * rendering/style/RenderStyleConstants.h:
     55        * rendering/style/StyleRareInheritedData.cpp:
     56        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
     57        (WebCore::StyleRareInheritedData::operator== const):
     58        * rendering/style/StyleRareInheritedData.h:
     59
    1602019-04-02  Simon Fraser  <simon.fraser@apple.com>
    261
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/PAL/ChangeLog

    r241799 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11
    1122019-02-16  Darin Adler  <darin@apple.com>
    213
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

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

    r240472 r245439  
    54065406#endif
    54075407
    5408 #if ENABLE(CSS_TRAILING_WORD)
    5409 template<> 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 
    5426 template<> 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 
    54425408#if ENABLE(APPLE_PAY)
    54435409template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ApplePayButtonStyle e)
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSProperties.json

    r240472 r245439  
    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": "non-standard"
    6968         },
    69696957        "-apple-pay-button-style": {
    69706958            "codegen-properties": {
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/CSSValueKeywords.in

    r240472 r245439  
    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 
    13311326#if defined(ENABLE_APPLE_PAY) && ENABLE_APPLE_PAY
    13321327// -apple-pay-button-style
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/css/parser/CSSParserFastPaths.cpp

    r240334 r245439  
    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
    769765#if ENABLE(APPLE_PAY)
    770766    case CSSPropertyApplePayButtonStyle: // white | white-outline | black
     
    935931    // case CSSPropertyTextOrientation:
    936932    // case CSSPropertyUserSelect:
    937 #if ENABLE(CSS_TRAILING_WORD)
    938     case CSSPropertyAppleTrailingWord:
    939 #endif
    940933#if ENABLE(CSS_COMPOSITING)
    941934    case CSSPropertyIsolation:
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/SimpleLineLayout.cpp

    r245437 r245439  
    241241    if (style.nbspMode() != NBSPMode::Normal)
    242242        SET_REASON_AND_RETURN_IF_NEEDED(FlowHasWebKitNBSPMode, reasons, includeReasons);
    243 #if ENABLE(CSS_TRAILING_WORD)
    244     if (style.trailingWord() != TrailingWord::Auto)
    245         SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonAutoTrailingWord, reasons, includeReasons);
    246 #endif
    247243    if (style.hyphens() == Hyphens::Auto) {
    248244        auto textReasons = canUseForText(style.hyphenString(), style.fontCascade(), WTF::nullopt, false, includeReasons);
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/SimpleLineLayoutCoverage.cpp

    r237893 r245439  
    136136        stream << "line-break is not auto";
    137137        break;
    138     case FlowHasNonAutoTrailingWord:
    139         stream << "-apple-trailing-word is not auto";
    140         break;
    141138    case FlowHasSVGFont:
    142139        stream << "SVG font";
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/SimpleLineLayoutCoverage.h

    r237893 r245439  
    6767    FlowHasBorderFitLines                 = 1LLU  << 29,
    6868    FlowHasNonAutoLineBreak               = 1LLU  << 30,
    69     FlowHasNonAutoTrailingWord            = 1LLU  << 31,
    7069    FlowHasSVGFont                        = 1LLU  << 32,
    7170    FlowTextIsEmpty                       = 1LLU  << 33,
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/line/BreakingContext.h

    r239427 r245439  
    9898        , m_resolver(resolver)
    9999        , m_current(resolver.position())
    100 #if ENABLE(CSS_TRAILING_WORD)
    101         , m_lineBreakHistory(InlineIterator(resolver.position()), block.style().trailingWord() == TrailingWord::PartiallyBalanced ? 5 : 1)
    102 #else
    103         , m_lineBreakHistory(InlineIterator(resolver.position()), 1)
    104 #endif
     100        , m_lineBreak(resolver.position())
    105101        , m_block(block)
    106102        , m_lastObject(m_current.renderer())
     
    135131
    136132    RenderObject* currentObject() { return m_current.renderer(); }
    137     InlineIterator lineBreak() { return m_lineBreakHistory.current(); }
     133    InlineIterator lineBreak() { return m_lineBreak; }
    138134    LineWidth& lineWidth() { return m_width; }
    139135    bool atEnd() { return m_atEnd; }
     
    154150    void commitAndUpdateLineBreakIfNeeded();
    155151    InlineIterator handleEndOfLine();
    156 #if ENABLE(CSS_TRAILING_WORD)
    157     InlineIterator optimalLineBreakLocationForTrailingWord();
    158 #endif
    159152   
    160153    float computeAdditionalBetweenWordsWidth(RenderText&, TextLayout*, UChar, WordTrailingSpace&, HashSet<const Font*>& fallbackFonts, WordMeasurements&, const FontCascade&, bool isFixedPitch, unsigned lastSpace, float lastSpaceWordSpacing, float wordSpacingForWordMeasurement, unsigned offset);
     
    163156    {
    164157        if (m_width.fitsOnLine(ignoringTrailingSpace) || m_lastWS == WhiteSpace::NoWrap || m_hangsAtEnd)
    165             m_lineBreakHistory.clear();
     158            m_lineBreak.clear();
    166159        m_hangsAtEnd = false;
    167160    }
     
    170163    {
    171164        m_width.commit();
    172         m_lineBreakHistory.clear();
     165        m_lineBreak.clear();
    173166        m_hangsAtEnd = false;
    174167    }
     
    177170    {
    178171        m_width.commit();
    179         m_lineBreakHistory.moveTo(object, offset, nextBreak);
     172        m_lineBreak.moveTo(object, offset, nextBreak);
    180173        m_hangsAtEnd = false;
    181174    }
    182175
    183176private:
    184     // This class keeps a sliding window of the past n locations for an InlineIterator.
    185     class InlineIteratorHistory : private Vector<InlineIterator, 1> {
    186     public:
    187         InlineIteratorHistory() = delete;
    188         InlineIteratorHistory(const InlineIterator& initial, size_t capacity)
    189             : m_capacity(capacity)
    190         {
    191             ASSERT(capacity > 0);
    192             this->append(initial);
    193         }
    194 
    195         void push(const WTF::Function<void(InlineIterator& modifyMe)>& updater)
    196         {
    197             ASSERT(!this->isEmpty());
    198             if (m_capacity != 1)
    199                 this->insert(0, InlineIterator(this->at(0)));
    200             updater(this->at(0));
    201             if (m_capacity != 1)
    202                 this->resize(m_capacity);
    203         }
    204 
    205         void update(const WTF::Function<void(InlineIterator& modifyMe)>& updater)
    206         {
    207             ASSERT(!this->isEmpty());
    208             updater(this->at(0));
    209         }
    210 
    211         RenderObject* renderer() const { return this->at(0).renderer(); }
    212         unsigned offset() const { return this->at(0).offset(); }
    213         Optional<unsigned> nextBreakablePosition() const { return this->at(0).nextBreakablePosition(); }
    214         bool atTextParagraphSeparator() const { return this->at(0).atTextParagraphSeparator(); }
    215         UChar previousInSameNode() const { return this->at(0).previousInSameNode(); }
    216         const InlineIterator& get(size_t i) const { return this->at(i); };
    217         const InlineIterator& current() const { return get(0); }
    218         size_t historyLength() const { return this->size(); }
    219 
    220         void moveTo(RenderObject& object, unsigned offset, Optional<unsigned> nextBreak = WTF::nullopt)
    221         {
    222             push([&](InlineIterator& modifyMe) {
    223                 modifyMe.moveTo(object, offset, nextBreak);
    224             });
    225         }
    226 
    227         void increment()
    228         {
    229             update([](InlineIterator& modifyMe) {
    230                 modifyMe.increment();
    231             });
    232         }
    233 
    234         void clear()
    235         {
    236             push([](InlineIterator& modifyMe) {
    237                 modifyMe.clear();
    238             });
    239         }
    240 
    241     private:
    242         const size_t m_capacity;
    243     };
    244 
    245177    LineBreaker& m_lineBreaker;
    246178    InlineBidiResolver& m_resolver;
    247179
    248180    InlineIterator m_current;
    249     InlineIteratorHistory m_lineBreakHistory;
     181    InlineIterator m_lineBreak;
    250182    InlineIterator m_startOfIgnoredSpaces;
    251183
     
    343275    if (fitsOnLineOrHangsAtEnd()) {
    344276        RenderObject& br = *m_current.renderer();
    345         m_lineBreakHistory.push([&](InlineIterator& modifyMe) {
    346             modifyMe.moveToStartOf(br);
    347             modifyMe.increment();
    348         });
     277        m_lineBreak.moveToStartOf(br);
     278        m_lineBreak.increment();
    349279
    350280        // A <br> always breaks a line, so don't let the line be collapsed
     
    465395    if (m_floatsFitOnLine && m_width.fitsOnLineExcludingTrailingWhitespace(m_block.logicalWidthForFloat(floatingObject))) {
    466396        m_lineBreaker.positionNewFloatOnLine(floatingObject, m_lastFloatFromPreviousLine, m_lineInfo, m_width);
    467         if (m_lineBreakHistory.renderer() == m_current.renderer()) {
    468             ASSERT(!m_lineBreakHistory.offset());
    469             m_lineBreakHistory.increment();
     397        if (m_lineBreak.renderer() == m_current.renderer()) {
     398            ASSERT(!m_lineBreak.offset());
     399            m_lineBreak.increment();
    470400        }
    471401    } else
     
    753683        combineRenderer.combineTextIfNeeded();
    754684        // The length of the renderer's text may have changed. Increment stale iterator positions
    755         if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreakHistory.current(), combineRenderer)) {
     685        if (iteratorIsBeyondEndOfRenderCombineText(m_lineBreak, combineRenderer)) {
    756686            ASSERT(iteratorIsBeyondEndOfRenderCombineText(m_resolver.position(), combineRenderer));
    757             m_lineBreakHistory.increment();
     687            m_lineBreak.increment();
    758688            m_resolver.increment();
    759689        }
     
    921851                    if (!m_width.fitsOnLineIncludingExtraWidth(charWidth)) {
    922852                        lineWasTooWide = true;
    923                         m_lineBreakHistory.push([&](InlineIterator& modifyMe) {
    924                             modifyMe.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());
    925                             m_lineBreaker.skipTrailingWhitespace(modifyMe, m_lineInfo);
    926                         });
     853                        m_lineBreak.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());
     854                        m_lineBreaker.skipTrailingWhitespace(m_lineBreak, m_lineInfo);
    927855                    }
    928856                }
     
    932860                    // bad so just don't allow it.
    933861                    if (canHyphenate && !m_width.fitsOnLine() && (m_nextObject || !renderText.containsOnlyHTMLWhitespace(m_current.offset(), renderText.text().length() - m_current.offset()) || isLineEmpty)) {
    934                         m_lineBreakHistory.push([&](InlineIterator& modifyMe) {
    935                             tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
    936                         });
     862                        tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, m_lineBreak, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
    937863                        if (m_lineBreaker.m_hyphenated) {
    938864                            m_atEnd = true;
     
    940866                        }
    941867                    }
    942                     if (m_lineBreakHistory.atTextParagraphSeparator()) {
     868                    if (m_lineBreak.atTextParagraphSeparator()) {
    943869                        if (!stoppedIgnoringSpaces && m_current.offset() > 0)
    944870                            ensureCharacterGetsLineBox(m_lineWhitespaceCollapsingState, m_current);
    945                         m_lineBreakHistory.increment();
     871                        m_lineBreak.increment();
    946872                        m_lineInfo.setPreviousLineBrokeCleanly(true);
    947                         wordMeasurement.endOffset = m_lineBreakHistory.offset();
     873                        wordMeasurement.endOffset = m_lineBreak.offset();
    948874                    }
    949875                    // Check if the last breaking position is a soft-hyphen.
     
    951877                        Optional<unsigned> lastBreakingPositon;
    952878                        const RenderObject* rendererAtBreakingPosition = nullptr;
    953                         if (m_lineBreakHistory.offset() || m_lineBreakHistory.nextBreakablePosition()) {
    954                             lastBreakingPositon = m_lineBreakHistory.offset();
    955                             rendererAtBreakingPosition = m_lineBreakHistory.renderer();
     879                        if (m_lineBreak.offset() || m_lineBreak.nextBreakablePosition()) {
     880                            lastBreakingPositon = m_lineBreak.offset();
     881                            rendererAtBreakingPosition = m_lineBreak.renderer();
    956882                        } else if (m_current.nextBreakablePosition() && m_current.nextBreakablePosition().value() <= m_current.offset()) {
    957883                            // We might just be right after the soft-hyphen
     
    974900                        }
    975901                    }
    976                     if (m_lineBreakHistory.offset() && m_lineBreakHistory.offset() != (unsigned)wordMeasurement.endOffset && !wordMeasurement.width) {
     902                    if (m_lineBreak.offset() && m_lineBreak.offset() != (unsigned)wordMeasurement.endOffset && !wordMeasurement.width) {
    977903                        if (charWidth) {
    978                             wordMeasurement.endOffset = m_lineBreakHistory.offset();
     904                            wordMeasurement.endOffset = m_lineBreak.offset();
    979905                            wordMeasurement.width = charWidth;
    980906                        }
     
    1000926                    ensureCharacterGetsLineBox(m_lineWhitespaceCollapsingState, m_current);
    1001927                commitLineBreakAtCurrentWidth(renderObject, m_current.offset(), m_current.nextBreakablePosition());
    1002                 m_lineBreakHistory.increment();
     928                m_lineBreak.increment();
    1003929                m_lineInfo.setPreviousLineBrokeCleanly(true);
    1004930                return true;
     
    1017943                // Remember this as a breakable position in case
    1018944                // adding the end width forces a break.
    1019                 m_lineBreakHistory.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());
     945                m_lineBreak.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());
    1020946                midWordBreak &= (breakWords || breakAll);
    1021947            }
     
    10821008        if (!m_currentCharacterIsWS && previousCharacterIsWS) {
    10831009            if (m_autoWrap && m_currentStyle->breakOnlyAfterWhiteSpace())
    1084                 m_lineBreakHistory.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());
     1010                m_lineBreak.moveTo(renderObject, m_current.offset(), m_current.nextBreakablePosition());
    10851011        }
    10861012
     
    11251051        // no more content, and a hyphenated single word would end up on a line by itself. This looks
    11261052        // bad so just don't allow it.
    1127         if (canHyphenate && (m_nextObject || isLineEmpty)) {
    1128             m_lineBreakHistory.push([&](InlineIterator& modifyMe) {
    1129                 tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, modifyMe, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
    1130             });
    1131         }
    1132 
    1133         if (!hyphenated && m_lineBreakHistory.previousInSameNode() == softHyphen && style.hyphens() != Hyphens::None) {
     1053        if (canHyphenate && (m_nextObject || isLineEmpty))
     1054            tryHyphenating(renderText, font, style.locale(), consecutiveHyphenatedLines, m_blockStyle.hyphenationLimitLines(), style.hyphenationLimitBefore(), style.hyphenationLimitAfter(), lastSpace, m_current.offset(), m_width.currentWidth() - additionalTempWidth, m_width.availableWidth(), isFixedPitch, m_collapseWhiteSpace, lastSpaceWordSpacing, m_lineBreak, m_current.nextBreakablePosition(), m_lineBreaker.m_hyphenated);
     1055
     1056        if (!hyphenated && m_lineBreak.previousInSameNode() == softHyphen && style.hyphens() != Hyphens::None) {
    11341057            hyphenated = true;
    11351058            m_atEnd = true;
     
    12551178inline InlineIterator BreakingContext::handleEndOfLine()
    12561179{
    1257     if (m_lineBreakHistory.current() == m_resolver.position()) {
    1258         if (!m_lineBreakHistory.renderer() || !m_lineBreakHistory.renderer()->isBR()) {
     1180    if (m_lineBreak == m_resolver.position()) {
     1181        if (!m_lineBreak.renderer() || !m_lineBreak.renderer()->isBR()) {
    12591182            // we just add as much as possible
    12601183            if (m_blockStyle.whiteSpace() == WhiteSpace::Pre && !m_current.offset()) {
     
    12631186                else
    12641187                    commitLineBreakClear();
    1265             }
    1266             else if (m_lineBreakHistory.renderer()) {
     1188            } else if (m_lineBreak.renderer()) {
    12671189                // Don't ever break in the middle of a word if we can help it.
    12681190                // There's no room at all. We just have to be on this line,
     
    12721194        }
    12731195        // make sure we consume at least one char/object.
    1274         if (m_lineBreakHistory.current() == m_resolver.position())
    1275             m_lineBreakHistory.increment();
     1196        if (m_lineBreak == m_resolver.position())
     1197            m_lineBreak.increment();
    12761198    } else if (!m_current.offset() && !m_width.committedWidth() && m_width.uncommittedWidth() && !m_hadUncommittedWidthBeforeCurrent) {
    12771199        // Do not push the current object to the next line, when this line has some content, but it is still considered empty.
     
    12791201        // at the start of a line, if no width has been committed yet.
    12801202        // Behave as if it was actually empty and consume at least one object.
    1281         m_lineBreakHistory.increment();
     1203        m_lineBreak.increment();
    12821204    }
    12831205
    12841206    // Sanity check our whitespace collapsing transitions.
    1285     TrailingObjects::CollapseFirstSpaceOrNot collapsed = checkWhitespaceCollapsingTransitions(m_lineWhitespaceCollapsingState, m_lineBreakHistory.current());
    1286 
    1287     m_trailingObjects.updateWhitespaceCollapsingTransitionsForTrailingBoxes(m_lineWhitespaceCollapsingState, m_lineBreakHistory.current(), collapsed);
     1207    TrailingObjects::CollapseFirstSpaceOrNot collapsed = checkWhitespaceCollapsingTransitions(m_lineWhitespaceCollapsingState, m_lineBreak);
     1208
     1209    m_trailingObjects.updateWhitespaceCollapsingTransitionsForTrailingBoxes(m_lineWhitespaceCollapsingState, m_lineBreak, collapsed);
    12881210
    12891211    // We might have made lineBreak an iterator that points past the end
     
    12911213    // of the next object instead to avoid confusing the rest of the
    12921214    // code.
    1293     if (m_lineBreakHistory.offset()) {
    1294         m_lineBreakHistory.update([](InlineIterator& modifyMe) {
    1295             modifyMe.setOffset(modifyMe.offset() - 1);
    1296             modifyMe.increment();
    1297         });
    1298     }
    1299 
    1300 #if ENABLE(CSS_TRAILING_WORD)
    1301     if (m_blockStyle.trailingWord() == TrailingWord::PartiallyBalanced)
    1302         return optimalLineBreakLocationForTrailingWord();
    1303 #endif
    1304     return m_lineBreakHistory.current();
    1305 }
    1306 
    1307 #if ENABLE(CSS_TRAILING_WORD)
    1308 inline InlineIterator BreakingContext::optimalLineBreakLocationForTrailingWord()
    1309 {
    1310     const unsigned longTrailingWordLength = 20;
    1311     const float optimalTrailingLineRatio = 0.1;
    1312     InlineIterator lineBreak = m_lineBreakHistory.current();
    1313     if (!lineBreak.renderer() || !m_lineInfo.isFirstLine() || bidiNextSkippingEmptyInlines(*lineBreak.root(), lineBreak.renderer()) || !is<RenderText>(lineBreak.renderer()))
    1314         return lineBreak;
    1315     RenderText& renderText = downcast<RenderText>(*lineBreak.renderer());
    1316     // Don't even bother measuring if our remaining line has many characters
    1317     if (renderText.text().length() == lineBreak.offset() || renderText.text().length() - lineBreak.offset() > longTrailingWordLength)
    1318         return lineBreak;
    1319     bool canUseLineBreakShortcut = m_renderTextInfo.lineBreakIterator.mode() == LineBreakIteratorMode::Default;
    1320     bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == NBSPMode::Space;
    1321     Optional<unsigned> nextBreakablePosition = lineBreak.nextBreakablePosition();
    1322     isBreakable(m_renderTextInfo.lineBreakIterator, lineBreak.offset() + 1, nextBreakablePosition, breakNBSP, canUseLineBreakShortcut, m_currentStyle->wordBreak() == WordBreak::KeepAll);
    1323     if (!nextBreakablePosition || nextBreakablePosition.value() != renderText.text().length())
    1324         return lineBreak;
    1325     const RenderStyle& style = lineStyle(renderText, m_lineInfo);
    1326     const FontCascade& font = style.fontCascade();
    1327     HashSet<const Font*> dummyFonts;
    1328     InlineIterator best = lineBreak;
    1329     for (size_t i = 1; i < m_lineBreakHistory.historyLength(); ++i) {
    1330         const InlineIterator& candidate = m_lineBreakHistory.get(i);
    1331         if (candidate.renderer() != lineBreak.renderer())
    1332             return best;
    1333         float width = textWidth(renderText, candidate.offset(), renderText.text().length() - candidate.offset(), font, 0, font.isFixedPitch(), m_collapseWhiteSpace, dummyFonts);
    1334         if (width > m_width.availableWidth())
    1335             return best;
    1336         if (width / m_width.availableWidth() > optimalTrailingLineRatio) // Subsequent line is long enough
    1337             return candidate;
    1338         best = candidate;
    1339     }
    1340     return best;
    1341 }
    1342 #endif
    1343 
    1344 }
     1215    if (m_lineBreak.offset()) {
     1216        m_lineBreak.setOffset(m_lineBreak.offset() - 1);
     1217        m_lineBreak.increment();
     1218    }
     1219
     1220    return m_lineBreak;
     1221}
     1222
     1223}
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/style/RenderStyle.h

    r241192 r245439  
    800800    bool shouldPlaceBlockDirectionScrollbarOnLeft() const;
    801801
    802 #if ENABLE(CSS_TRAILING_WORD)
    803     TrailingWord trailingWord() const { return static_cast<TrailingWord>(m_rareInheritedData->trailingWord); }
    804 #endif
    805 
    806802#if ENABLE(APPLE_PAY)
    807803    ApplePayButtonStyle applePayButtonStyle() const { return static_cast<ApplePayButtonStyle>(m_rareNonInheritedData->applePayButtonStyle); }
     
    12591255
    12601256    void setTextSecurity(TextSecurity security) { SET_VAR(m_rareInheritedData, textSecurity, static_cast<unsigned>(security)); }
    1261 
    1262 #if ENABLE(CSS_TRAILING_WORD)
    1263     void setTrailingWord(TrailingWord v) { SET_VAR(m_rareInheritedData, trailingWord, static_cast<unsigned>(v)); }
    1264 #endif
    12651257
    12661258#if ENABLE(APPLE_PAY)
     
    16311623#endif
    16321624
    1633 #if ENABLE(CSS_TRAILING_WORD)
    1634     static TrailingWord initialTrailingWord() { return TrailingWord::Auto; }
    1635 #endif
    1636 
    16371625#if ENABLE(APPLE_PAY)
    16381626    static ApplePayButtonStyle initialApplePayButtonStyle() { return ApplePayButtonStyle::Black; }
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/style/RenderStyleConstants.h

    r239978 r245439  
    11091109#endif
    11101110
    1111 #if ENABLE(CSS_TRAILING_WORD)
    1112 enum class TrailingWord : uint8_t {
    1113     Auto,
    1114     PartiallyBalanced
    1115 };
    1116 #endif
    1117 
    11181111#if ENABLE(APPLE_PAY)
    11191112enum class ApplePayButtonStyle : uint8_t {
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/style/StyleRareInheritedData.cpp

    r238001 r245439  
    131131#if PLATFORM(IOS_FAMILY)
    132132    , touchCalloutEnabled(RenderStyle::initialTouchCalloutEnabled())
    133 #endif
    134 #if ENABLE(CSS_TRAILING_WORD)
    135     , trailingWord(static_cast<unsigned>(RenderStyle::initialTrailingWord()))
    136133#endif
    137134    , hangingPunctuation(RenderStyle::initialHangingPunctuation().toRaw())
     
    230227    , touchCalloutEnabled(o.touchCalloutEnabled)
    231228#endif
    232 #if ENABLE(CSS_TRAILING_WORD)
    233     , trailingWord(o.trailingWord)
    234 #endif
    235229    , hangingPunctuation(o.hangingPunctuation)
    236230    , paintOrder(o.paintOrder)
     
    355349        && lineSnap == o.lineSnap
    356350        && lineAlign == o.lineAlign
    357 #if ENABLE(CSS_TRAILING_WORD)
    358         && trailingWord == o.trailingWord
    359 #endif
    360351        && hangingPunctuation == o.hangingPunctuation
    361352        && paintOrder == o.paintOrder
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/style/StyleRareInheritedData.h

    r238001 r245439  
    146146#endif
    147147
    148 #if ENABLE(CSS_TRAILING_WORD)
    149     unsigned trailingWord : 1;
    150 #endif
    151 
    152148    unsigned hangingPunctuation : 4;
    153149
  • releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/ChangeLog

    r242438 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * UserInterface/Models/CSSKeywordCompletions.js:
     11
    1122019-02-21  Darin Adler  <darin@apple.com>
    213
  • releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js

    r239690 r245439  
    156156    // Compatibility (iOS 12): `inherited` didn't exist on `CSSPropertyInfo`
    157157    "-apple-color-filter",
    158     "-apple-trailing-word",
    159158    "-webkit-animation-trigger",
    160159    "-webkit-aspect-ratio",
     
    788787        "plain", "buy", "set-up", "donate", "check-out", "book", "subscribe",
    789788    ],
    790     "-apple-trailing-word": [
    791         "auto", "-webkit-partially-balanced",
    792     ],
    793789    "-webkit-alt": [
    794790        "attr()",
  • releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog

    r245115 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11
    1122019-05-08  Alexander Mikhaylenko  <exalm7659@gmail.com>
    213
  • releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/mac/ChangeLog

    r242438 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * Configurations/FeatureDefines.xcconfig:
     11
    1122019-02-21  Darin Adler  <darin@apple.com>
    213
  • releases/WebKitGTK/webkit-2.24/Source/cmake/WebKitFeatures.cmake

    r241540 r245439  
    115115    WEBKIT_OPTION_DEFINE(ENABLE_CSS_SCROLL_SNAP "Toggle CSS snap scroll support" PRIVATE OFF)
    116116    WEBKIT_OPTION_DEFINE(ENABLE_CSS_SELECTORS_LEVEL4 "Toggle CSS Selectors Level 4 support" PRIVATE ON)
    117     WEBKIT_OPTION_DEFINE(ENABLE_CSS_TRAILING_WORD "Toggle CSS trailing word support" PRIVATE OFF)
    118117    WEBKIT_OPTION_DEFINE(ENABLE_CSS_TYPED_OM "Toggle CSS Typed OM support" PRIVATE OFF)
    119118    WEBKIT_OPTION_DEFINE(ENABLE_CURSOR_VISIBILITY "Toggle cursor visibility support" PRIVATE OFF)
  • releases/WebKitGTK/webkit-2.24/Tools/ChangeLog

    r245133 r245439  
     12019-04-03  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Remove support for -apple-trailing-word
     4        https://bugs.webkit.org/show_bug.cgi?id=196525
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        This CSS property is nonstandard and not used.
     9
     10        * Scripts/webkitperl/FeatureList.pm:
     11        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
     12
    1132019-05-09  Xan López  <xan@igalia.com>
    214
  • releases/WebKitGTK/webkit-2.24/Tools/Scripts/webkitperl/FeatureList.pm

    r241283 r245439  
    268268      define => "ENABLE_CSS_SELECTORS_LEVEL4", value => \$cssSelectorsLevel4Support },
    269269
    270     { option => "css-trailing-word", desc => "Toggle CSS trailing word support",
    271       define => "ENABLE_CSS_TRAILING_WORD", value => \$cssTrailingWordSupport },
    272 
    273270    { option => "css-typed-om", desc => "Toggle CSS Typed OM support",
    274271      define => "ENABLE_CSS_TYPED_OM", value => \$cssTypedOMSupport },
Note: See TracChangeset for help on using the changeset viewer.