Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Element.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
| index 047e339cba3e817a5c7eb056291cb3d2776f7584..03e35061c9ca40cd5608fab8a1e7dd6096a3019e 100644 |
| --- a/third_party/WebKit/Source/core/dom/Element.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Element.cpp |
| @@ -217,7 +217,7 @@ void Element::clearTabIndexExplicitlyIfNeeded() { |
| elementRareData()->clearTabIndexExplicitly(); |
| } |
| -void Element::setTabIndexExplicitly(short tabIndex) { |
| +void Element::setTabIndexExplicitly(int tabIndex) { |
| ensureElementRareData().setTabIndexExplicitly(tabIndex); |
| } |
| @@ -225,7 +225,7 @@ void Element::setTabIndex(int value) { |
| setIntegralAttribute(tabindexAttr, value); |
| } |
| -short Element::tabIndex() const { |
| +int Element::tabIndex() const { |
| return hasRareData() ? elementRareData()->tabIndex() : 0; |
| } |
| @@ -2433,11 +2433,7 @@ void Element::parseAttribute(const QualifiedName& name, |
| document().setNeedsFocusedElementCheck(); |
| } |
| } else if (parseHTMLInteger(value, tabindex)) { |
| - // Clamp tabindex to the range of 'short' to match Firefox's behavior. |
| - setTabIndexExplicitly( |
| - max(static_cast<int>(std::numeric_limits<short>::min()), |
| - std::min(tabindex, |
| - static_cast<int>(std::numeric_limits<short>::max())))); |
| + setTabIndexExplicitly(tabindex); |
|
kochi
2016/10/18 02:37:24
Could you add a comment here for the behavior when
rwlbuis
2016/10/19 00:43:43
Done.
|
| } |
| } else if (name == XMLNames::langAttr) { |
| pseudoStateChanged(CSSSelector::PseudoLang); |