Changeset 266714 in webkit


Ignore:
Timestamp:
Sep 7, 2020 9:30:14 PM (4 years ago)
Author:
rniwa@webkit.org
Message:

Move all remaining flags from ElementRareData to Node to reduce the frequency
https://bugs.webkit.org/show_bug.cgi?id=216208

Reviewed by Darin Adler.

This patch moves all remaining bit flags from ElementRareData to Node::m_nodeFlags. It also stores
tabIndex of 0 and -1 in Node::m_nodeFlags to avoid creating ElementRareData for these common values.

No new tests since there should be no behavioral change.

  • dom/Element.cpp:

(WebCore::Element::clearTabIndexExplicitlyIfNeeded): Deleted. Merged into setTabIndexExplicitly.
(WebCore::Element::setTabIndexExplicitly): Now takes Optional<int>. Stores 0 and -1 as node flags.
(WebCore::Element::tabIndexSetExplicitly const): Added the special casing for 0 and -1.
(WebCore::Element::removedFromAncestor):
(WebCore::Element::containsFullScreenElement const): Deleted.
(WebCore::Element::setContainsFullScreenElement):
(WebCore::Element::hasPendingResources const): Deleted.
(WebCore::Element::setHasPendingResources): Deleted.
(WebCore::Element::clearHasPendingResources): Deleted.
(WebCore::Element::hasCSSAnimation const): Deleted.
(WebCore::Element::setHasCSSAnimation): Deleted.
(WebCore::Element::clearHasCSSAnimation): Deleted.
(WebCore::Element::createElementIdentifier):

  • dom/Element.h:

(WebCore::Element::hasPendingResources const): Moved here from Element.cpp.
(WebCore::Element::setHasPendingResources): Ditto.
(WebCore::Element::clearHasPendingResources): Ditto.
(WebCore::Element::hasCSSAnimation const): Ditto.
(WebCore::Element::setHasCSSAnimation): Ditto.
(WebCore::Element::clearHasCSSAnimation): Ditto.
(WebCore::Element::containsFullScreenElement const): Ditto.

  • dom/ElementRareData.cpp:
  • dom/ElementRareData.h:

(WebCore::ElementRareData::tabIndex const): Deleted.
(WebCore::ElementRareData::setTabIndexExplicitly): Deleted.
(WebCore::ElementRareData::tabIndexSetExplicitly const): Deleted.
(WebCore::ElementRareData::clearTabIndexExplicitly): Deleted.
(WebCore::ElementRareData::containsFullScreenElement): Deleted.
(WebCore::ElementRareData::setContainsFullScreenElement): Deleted.
(WebCore::ElementRareData::hasPendingResources const): Deleted.
(WebCore::ElementRareData::setHasPendingResources): Deleted.
(WebCore::ElementRareData::hasCSSAnimation const): Deleted.
(WebCore::ElementRareData::setHasCSSAnimation): Deleted.
(WebCore::ElementRareData::hasElementIdentifier const): Deleted.
(WebCore::ElementRareData::setHasElementIdentifier): Deleted.
(WebCore::ElementRareData::useTypes const): Added the missing use types for style maps, part list,
and part names.
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::unusualTabIndex const): Renamed from tabIndex.
(WebCore::ElementRareData::setUnusualTabIndex): Ditto from setTabIndexExplicitly.

  • dom/Node.cpp:

(WebCore::stringForRareDataUseType): Added the missing strings.

  • dom/Node.h:

(WebCore::Node::NodeFlags): Moved bit flags from ElementRareData and reserved the two highest bits
to store TabIndexState.
(WebCore::Node::s_tabIndexStateBitOffset): Added.
(WebCore::Node::s_tabIndexStateBitMask): Added.
(WebCore::Node::TabIndexState): Added.
(WebCore::Node::tabIndexState const): Added.
(WebCore::Node::setTabIndexState): Added.

  • dom/NodeRareData.h:

(WebCore::NodeRareData::UseType): Added the missing use types: style maps, part list, and part names.

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::parseAttribute):

  • mathml/MathMLElement.cpp:

(WebCore::MathMLElement::parseAttribute):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::parseAttribute):

Location:
trunk/Source/WebCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r266712 r266714  
     12020-09-07  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Move all remaining flags from ElementRareData to Node to reduce the frequency
     4        https://bugs.webkit.org/show_bug.cgi?id=216208
     5
     6        Reviewed by Darin Adler.
     7
     8        This patch moves all remaining bit flags from ElementRareData to Node::m_nodeFlags. It also stores
     9        tabIndex of 0 and -1 in Node::m_nodeFlags to avoid creating ElementRareData for these common values.
     10
     11        No new tests since there should be no behavioral change.
     12
     13        * dom/Element.cpp:
     14        (WebCore::Element::clearTabIndexExplicitlyIfNeeded): Deleted. Merged into setTabIndexExplicitly.
     15        (WebCore::Element::setTabIndexExplicitly): Now takes Optional<int>. Stores 0 and -1 as node flags.
     16        (WebCore::Element::tabIndexSetExplicitly const): Added the special casing for 0 and -1.
     17        (WebCore::Element::removedFromAncestor):
     18        (WebCore::Element::containsFullScreenElement const): Deleted.
     19        (WebCore::Element::setContainsFullScreenElement):
     20        (WebCore::Element::hasPendingResources const): Deleted.
     21        (WebCore::Element::setHasPendingResources): Deleted.
     22        (WebCore::Element::clearHasPendingResources): Deleted.
     23        (WebCore::Element::hasCSSAnimation const): Deleted.
     24        (WebCore::Element::setHasCSSAnimation): Deleted.
     25        (WebCore::Element::clearHasCSSAnimation): Deleted.
     26        (WebCore::Element::createElementIdentifier):
     27        * dom/Element.h:
     28        (WebCore::Element::hasPendingResources const): Moved here from Element.cpp.
     29        (WebCore::Element::setHasPendingResources): Ditto.
     30        (WebCore::Element::clearHasPendingResources): Ditto.
     31        (WebCore::Element::hasCSSAnimation const): Ditto.
     32        (WebCore::Element::setHasCSSAnimation): Ditto.
     33        (WebCore::Element::clearHasCSSAnimation): Ditto.
     34        (WebCore::Element::containsFullScreenElement const): Ditto.
     35        * dom/ElementRareData.cpp:
     36        * dom/ElementRareData.h:
     37        (WebCore::ElementRareData::tabIndex const): Deleted.
     38        (WebCore::ElementRareData::setTabIndexExplicitly): Deleted.
     39        (WebCore::ElementRareData::tabIndexSetExplicitly const): Deleted.
     40        (WebCore::ElementRareData::clearTabIndexExplicitly): Deleted.
     41        (WebCore::ElementRareData::containsFullScreenElement): Deleted.
     42        (WebCore::ElementRareData::setContainsFullScreenElement): Deleted.
     43        (WebCore::ElementRareData::hasPendingResources const): Deleted.
     44        (WebCore::ElementRareData::setHasPendingResources): Deleted.
     45        (WebCore::ElementRareData::hasCSSAnimation const): Deleted.
     46        (WebCore::ElementRareData::setHasCSSAnimation): Deleted.
     47        (WebCore::ElementRareData::hasElementIdentifier const): Deleted.
     48        (WebCore::ElementRareData::setHasElementIdentifier): Deleted.
     49        (WebCore::ElementRareData::useTypes const): Added the missing use types for style maps, part list,
     50        and part names.
     51        (WebCore::ElementRareData::ElementRareData):
     52        (WebCore::ElementRareData::unusualTabIndex const): Renamed from tabIndex.
     53        (WebCore::ElementRareData::setUnusualTabIndex): Ditto from setTabIndexExplicitly.
     54        * dom/Node.cpp:
     55        (WebCore::stringForRareDataUseType): Added the missing strings.
     56        * dom/Node.h:
     57        (WebCore::Node::NodeFlags): Moved bit flags from ElementRareData and reserved the two highest bits
     58        to store TabIndexState.
     59        (WebCore::Node::s_tabIndexStateBitOffset): Added.
     60        (WebCore::Node::s_tabIndexStateBitMask): Added.
     61        (WebCore::Node::TabIndexState): Added.
     62        (WebCore::Node::tabIndexState const): Added.
     63        (WebCore::Node::setTabIndexState): Added.
     64        * dom/NodeRareData.h:
     65        (WebCore::NodeRareData::UseType): Added the missing use types: style maps, part list, and part names.
     66        * html/HTMLElement.cpp:
     67        (WebCore::HTMLElement::parseAttribute):
     68        * mathml/MathMLElement.cpp:
     69        (WebCore::MathMLElement::parseAttribute):
     70        * svg/SVGElement.cpp:
     71        (WebCore::SVGElement::parseAttribute):
     72
    1732020-09-07  Chris Dumez  <cdumez@apple.com>
    274
  • trunk/Source/WebCore/dom/Element.cpp

    r266691 r266714  
    242242}
    243243
    244 void Element::clearTabIndexExplicitlyIfNeeded()
    245 {
    246     if (hasRareData())
    247         elementRareData()->clearTabIndexExplicitly();
    248 }
    249 
    250 void Element::setTabIndexExplicitly(int tabIndex)
    251 {
    252     ensureElementRareData().setTabIndexExplicitly(tabIndex);
     244void Element::setTabIndexExplicitly(Optional<int> tabIndex)
     245{
     246    if (!tabIndex) {
     247        setTabIndexState(TabIndexState::NotSet);
     248        return;
     249    }
     250    setTabIndexState([this, value = tabIndex.value()]() {
     251        switch (value) {
     252        case 0:
     253            return TabIndexState::Zero;
     254        case -1:
     255            return TabIndexState::NegativeOne;
     256        default:
     257            ensureElementRareData().setUnusualTabIndex(value);
     258            return TabIndexState::InRareData;
     259        }
     260    }());
    253261}
    254262
    255263Optional<int> Element::tabIndexSetExplicitly() const
    256264{
    257     if (!hasRareData())
     265    switch (tabIndexState()) {
     266    case TabIndexState::NotSet:
    258267        return WTF::nullopt;
    259     return elementRareData()->tabIndex();
     268    case TabIndexState::Zero:
     269        return 0;
     270    case TabIndexState::NegativeOne:
     271        return -1;
     272    case TabIndexState::InRareData:
     273        ASSERT(hasRareData());
     274        return elementRareData()->unusualTabIndex();
     275    }
     276    ASSERT_NOT_REACHED();
     277    return WTF::nullopt;
    260278}
    261279
     
    22672285#endif
    22682286
    2269     if (hasRareData() && elementRareData()->hasElementIdentifier()) {
     2287    if (getFlag(HasElementIdentifierFlag)) {
    22702288        document().identifiedElementWasRemovedFromDocument(*this);
    2271         elementRareData()->setHasElementIdentifier(false);
     2289        clearFlag(HasElementIdentifierFlag);
    22722290    }
    22732291}
     
    37173735}
    37183736
    3719 bool Element::containsFullScreenElement() const
    3720 {
    3721     return hasRareData() && elementRareData()->containsFullScreenElement();
    3722 }
    3723 
    37243737void Element::setContainsFullScreenElement(bool flag)
    37253738{
    3726     ensureElementRareData().setContainsFullScreenElement(flag);
     3739    if (flag)
     3740        setFlag(ContainsFullScreenElementFlag);
     3741    else
     3742        clearFlag(ContainsFullScreenElementFlag);
    37273743    invalidateStyleAndLayerComposition();
    37283744}
     
    43654381    else
    43664382        m_elementData = downcast<ShareableElementData>(*m_elementData).makeUniqueCopy();
    4367 }
    4368 
    4369 bool Element::hasPendingResources() const
    4370 {
    4371     return hasRareData() && elementRareData()->hasPendingResources();
    4372 }
    4373 
    4374 void Element::setHasPendingResources()
    4375 {
    4376     ensureElementRareData().setHasPendingResources(true);
    4377 }
    4378 
    4379 void Element::clearHasPendingResources()
    4380 {
    4381     if (!hasRareData())
    4382         return;
    4383     elementRareData()->setHasPendingResources(false);
    4384 }
    4385 
    4386 bool Element::hasCSSAnimation() const
    4387 {
    4388     return hasRareData() && elementRareData()->hasCSSAnimation();
    4389 }
    4390 
    4391 void Element::setHasCSSAnimation()
    4392 {
    4393     ensureElementRareData().setHasCSSAnimation(true);
    4394 }
    4395 
    4396 void Element::clearHasCSSAnimation()
    4397 {
    4398     if (!hasRareData())
    4399         return;
    4400     elementRareData()->setHasCSSAnimation(false);
    44014383}
    44024384
     
    46124594ElementIdentifier Element::createElementIdentifier()
    46134595{
    4614     auto& rareData = ensureElementRareData();
    4615     ASSERT(!rareData.hasElementIdentifier());
    4616 
    4617     rareData.setHasElementIdentifier(true);
     4596    ASSERT(!getFlag(HasElementIdentifierFlag));
     4597    setFlag(HasElementIdentifierFlag);
    46184598    return ElementIdentifier::generate();
    46194599}
  • trunk/Source/WebCore/dom/Element.h

    r266578 r266714  
    3636#include <JavaScriptCore/Strong.h>
    3737
     38#define DUMP_NODE_STATISTICS 0
     39
    3840namespace WebCore {
    3941
     
    480482    virtual bool childShouldCreateRenderer(const Node&) const;
    481483
    482     bool hasPendingResources() const;
    483     void setHasPendingResources();
    484     void clearHasPendingResources();
     484    bool hasPendingResources() const { return getFlag(HasPendingResourcesFlag); }
     485    void setHasPendingResources() { setFlag(HasPendingResourcesFlag); }
     486    void clearHasPendingResources() { clearFlag(HasPendingResourcesFlag); }
    485487    virtual void buildPendingResource() { };
    486488
    487     bool hasCSSAnimation() const;
    488     void setHasCSSAnimation();
    489     void clearHasCSSAnimation();
     489    bool hasCSSAnimation() const { return getFlag(HasCSSAnimationFlag); }
     490    void setHasCSSAnimation() { setFlag(HasCSSAnimationFlag); }
     491    void clearHasCSSAnimation() { clearFlag(HasCSSAnimationFlag); }
    490492
    491493    KeyframeEffectStack* keyframeEffectStack() const;
     
    512514
    513515#if ENABLE(FULLSCREEN_API)
    514     WEBCORE_EXPORT bool containsFullScreenElement() const;
     516    bool containsFullScreenElement() const { return getFlag(ContainsFullScreenElementFlag); }
    515517    void setContainsFullScreenElement(bool);
    516518    void setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(bool);
     
    636638    virtual void parserDidSetAttributes();
    637639
    638     void clearTabIndexExplicitlyIfNeeded();
    639     void setTabIndexExplicitly(int);
     640    void setTabIndexExplicitly(Optional<int>);
    640641
    641642    void classAttributeChanged(const AtomString& newClassString);
  • trunk/Source/WebCore/dom/ElementRareData.cpp

    r252253 r266714  
    3737    int tabIndex;
    3838    unsigned short childIndex;
    39 #if ENABLE(FULLSCREEN_API)
    40     unsigned bitfields : 12;
    41 #else
    42     unsigned bitfields : 11;
    43 #endif
    4439    LayoutSize sizeForResizing;
    4540    IntPoint savedLayerScrollPosition;
  • trunk/Source/WebCore/dom/ElementRareData.h

    r258316 r266714  
    5757    void resetComputedStyle();
    5858    void resetStyleRelations();
    59    
    60     Optional<int> tabIndex() const { return m_tabIndexWasSetExplicitly ? Optional<int> { m_tabIndex } : WTF::nullopt; }
    61     void setTabIndexExplicitly(int index) { m_tabIndex = index; m_tabIndexWasSetExplicitly = true; }
    62     bool tabIndexSetExplicitly() const { return m_tabIndexWasSetExplicitly; }
    63     void clearTabIndexExplicitly() { m_tabIndex = 0; m_tabIndexWasSetExplicitly = false; }
    64 
    65 #if ENABLE(FULLSCREEN_API)
    66     bool containsFullScreenElement() { return m_containsFullScreenElement; }
    67     void setContainsFullScreenElement(bool value) { m_containsFullScreenElement = value; }
    68 #endif
     59
     60    int unusualTabIndex() const;
     61    void setUnusualTabIndex(int);
    6962
    7063    unsigned childIndex() const { return m_childIndex; }
     
    9790    void setSavedLayerScrollPosition(IntPoint position) { m_savedLayerScrollPosition = position; }
    9891
    99     bool hasPendingResources() const { return m_hasPendingResources; }
    100     void setHasPendingResources(bool has) { m_hasPendingResources = has; }
    101 
    102     bool hasCSSAnimation() const { return m_hasCSSAnimation; }
    103     void setHasCSSAnimation(bool value) { m_hasCSSAnimation = value; }
    104 
    10592    ElementAnimationRareData* elementAnimationRareData() { return m_animationRareData.get(); }
    10693    ElementAnimationRareData& ensureAnimationRareData();
    107 
    108     bool hasElementIdentifier() const { return m_hasElementIdentifier; }
    109     void setHasElementIdentifier(bool value) { m_hasElementIdentifier = value; }
    11094
    11195    DOMTokenList* partList() const { return m_partList.get(); }
     
    134118    {
    135119        auto result = NodeRareData::useTypes();
    136         if (m_tabIndexWasSetExplicitly)
     120        if (m_unusualTabIndex)
    137121            result.add(UseType::TabIndex);
    138122        if (m_minimumSizeForResizing != defaultMinimumSizeForResizing())
     
    158142            result.add(UseType::ResizeObserver);
    159143#endif
     144        if (m_animationRareData)
     145            result.add(UseType::Animations);
    160146        if (m_beforePseudoElement || m_afterPseudoElement)
    161147            result.add(UseType::PseudoElements);
    162         if (m_animationRareData)
    163             result.add(UseType::Animations);
     148#if ENABLE(CSS_TYPED_OM)
     149        if (m_attributeStyleMap)
     150            result.add(UseType::StyleMap);
     151#endif
     152        if (m_partList)
     153            result.add(UseType::PartList);
     154        if (!m_partNames.isEmpty())
     155            result.add(UseType::PartNames);
    164156        return result;
    165157    }
     
    167159
    168160private:
    169     int m_tabIndex;
    170     unsigned short m_childIndex;
    171     unsigned m_tabIndexWasSetExplicitly : 1;
    172 #if ENABLE(FULLSCREEN_API)
    173     unsigned m_containsFullScreenElement : 1;
    174 #endif
    175     unsigned m_hasPendingResources : 1;
    176     unsigned m_hasCSSAnimation : 1;
    177     unsigned m_hasElementIdentifier : 1;
     161    int m_unusualTabIndex { 0 };
     162    unsigned short m_childIndex { 0 };
    178163
    179164    LayoutSize m_minimumSizeForResizing;
     
    211196inline ElementRareData::ElementRareData()
    212197    : NodeRareData(Type::Element)
    213     , m_tabIndex(0)
    214     , m_childIndex(0)
    215     , m_tabIndexWasSetExplicitly(false)
    216 #if ENABLE(FULLSCREEN_API)
    217     , m_containsFullScreenElement(false)
    218 #endif
    219     , m_hasPendingResources(false)
    220     , m_hasCSSAnimation(false)
    221     , m_hasElementIdentifier(false)
    222198    , m_minimumSizeForResizing(defaultMinimumSizeForResizing())
    223199{
     
    253229}
    254230
     231inline int ElementRareData::unusualTabIndex() const
     232{
     233    ASSERT(m_unusualTabIndex); // setUnusualTabIndex must have been called before this.
     234    return m_unusualTabIndex;
     235}
     236
     237inline void ElementRareData::setUnusualTabIndex(int tabIndex)
     238{
     239    ASSERT(tabIndex && tabIndex != -1); // Common values of 0 and -1 are stored as TabIndexState in Node.
     240    m_unusualTabIndex = tabIndex;
     241}
     242
    255243inline ElementAnimationRareData& ElementRareData::ensureAnimationRareData()
    256244{
  • trunk/Source/WebCore/dom/Node.cpp

    r266618 r266714  
    131131    case NodeRareData::UseType::InteractionObserver:
    132132        return "InteractionObserver";
     133    case NodeRareData::UseType::ResizeObserver:
     134        return "ResizeObserver";
     135    case NodeRareData::UseType::Animations:
     136        return "Animations";
    133137    case NodeRareData::UseType::PseudoElements:
    134138        return "PseudoElements";
    135     case NodeRareData::UseType::Animations:
    136         return "Animations";
     139    case NodeRareData::UseType::StyleMap:
     140        return "StyleMap";
     141    case NodeRareData::UseType::PartList:
     142        return "PartList";
     143    case NodeRareData::UseType::PartNames:
     144        return "PartNames";
    137145    }
    138146    return nullptr;
  • trunk/Source/WebCore/dom/Node.h

    r266578 r266714  
    4040#include <wtf/URLHash.h>
    4141#include <wtf/WeakPtr.h>
    42 
    43 // This needs to be here because Document.h also depends on it.
    44 #define DUMP_NODE_STATISTICS 0
    4542
    4643namespace WTF {
     
    544541        HasCustomStyleResolveCallbacksFlag = 1 << 22,
    545542
    546         // Bits 23-31 are free.
     543        HasPendingResourcesFlag = 1 << 23,
     544        HasCSSAnimationFlag = 1 << 24,
     545        HasElementIdentifierFlag = 1 << 25,
     546#if ENABLE(FULLSCREEN_API)
     547        ContainsFullScreenElementFlag = 1 << 26,
     548#endif
     549
     550        // Bits 27-29 are free.
     551        // Bits 30-31: TabIndexState
    547552
    548553        DefaultNodeFlags = IsParsingChildrenFinishedFlag
     554    };
     555
     556    static constexpr unsigned s_tabIndexStateBitOffset = 30;
     557    static constexpr uint32_t s_tabIndexStateBitMask = 3U << s_tabIndexStateBitOffset;
     558    enum class TabIndexState : uint8_t {
     559        NotSet = 0,
     560        Zero = 1,
     561        NegativeOne = 2,
     562        InRareData = 3,
    549563    };
    550564
     
    553567    void setFlag(NodeFlags mask) const { m_nodeFlags |= mask; }
    554568    void clearFlag(NodeFlags mask) const { m_nodeFlags &= ~mask; }
     569
     570    TabIndexState tabIndexState() const { return static_cast<TabIndexState>((m_nodeFlags & s_tabIndexStateBitMask) >> s_tabIndexStateBitOffset); }
     571    void setTabIndexState(TabIndexState state) { m_nodeFlags = (m_nodeFlags & ~s_tabIndexStateBitMask) | (static_cast<uint32_t>(state) << s_tabIndexStateBitOffset); }
    555572
    556573    bool isParsingChildrenFinished() const { return getFlag(IsParsingChildrenFinishedFlag); }
  • trunk/Source/WebCore/dom/NodeRareData.h

    r264488 r266714  
    245245public:
    246246#if defined(DUMP_NODE_STATISTICS) && DUMP_NODE_STATISTICS
    247     enum class UseType : uint16_t {
     247    enum class UseType : uint32_t {
    248248        ConnectedFrameCount = 1 << 0,
    249249        NodeList = 1 << 1,
     
    259259        AttributeMap = 1 << 11,
    260260        InteractionObserver = 1 << 12,
    261         PseudoElements = 1 << 13,
     261        ResizeObserver = 1 << 13,
    262262        Animations = 1 << 14,
     263        PseudoElements = 1 << 15,
     264        StyleMap = 1 << 16,
     265        PartList = 1 << 17,
     266        PartNames = 1 << 18,
    263267    };
    264268#endif
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r266618 r266714  
    453453    if (name == tabindexAttr) {
    454454        if (value.isEmpty())
    455             clearTabIndexExplicitlyIfNeeded();
     455            setTabIndexExplicitly(WTF::nullopt);
    456456        else if (auto optionalTabIndex = parseHTMLInteger(value))
    457457            setTabIndexExplicitly(optionalTabIndex.value());
  • trunk/Source/WebCore/mathml/MathMLElement.cpp

    r258140 r266714  
    9393    } else if (name == HTMLNames::tabindexAttr) {
    9494        if (value.isEmpty())
    95             clearTabIndexExplicitlyIfNeeded();
     95            setTabIndexExplicitly(WTF::nullopt);
    9696        else if (auto optionalTabIndex = parseHTMLInteger(value))
    9797            setTabIndexExplicitly(optionalTabIndex.value());
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r259687 r266714  
    340340    if (name == HTMLNames::tabindexAttr) {
    341341        if (value.isEmpty())
    342             clearTabIndexExplicitlyIfNeeded();
     342            setTabIndexExplicitly(WTF::nullopt);
    343343        else if (auto optionalTabIndex = parseHTMLInteger(value))
    344344            setTabIndexExplicitly(optionalTabIndex.value());
Note: See TracChangeset for help on using the changeset viewer.