Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(748)

Unified Diff: Source/core/dom/ElementRareData.h

Issue 917613004: Add isTabStop attribute to Element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert status to experimental Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Element.idl ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ElementRareData.h
diff --git a/Source/core/dom/ElementRareData.h b/Source/core/dom/ElementRareData.h
index 100b750e8328fda605461861ee9a9e6c0c37ca89..1c5c2300669b79f8e1fc23fff88403def41d6ecb 100644
--- a/Source/core/dom/ElementRareData.h
+++ b/Source/core/dom/ElementRareData.h
@@ -57,15 +57,22 @@ public:
void setTabIndexExplicitly(short index)
{
m_tabindex = index;
+ // isTabStop is overridden by setting tabindex.
+ m_isTabStop = (m_tabindex >= 0);
setElementFlag(TabIndexWasSetExplicitly, true);
}
void clearTabIndexExplicitly()
{
m_tabindex = 0;
+ m_isTabStop = true;
clearElementFlag(TabIndexWasSetExplicitly);
}
+ bool isTabStop() const { return m_isTabStop; }
+
+ void setIsTabStop(bool flag) { m_isTabStop = flag; }
+
CSSStyleDeclaration& ensureInlineCSSStyleDeclaration(Element* ownerElement);
void clearShadow() { m_shadow = nullptr; }
@@ -130,6 +137,7 @@ public:
private:
short m_tabindex;
+ bool m_isTabStop;
LayoutSize m_minimumSizeForResizing;
IntSize m_savedLayerScrollOffset;
@@ -162,6 +170,7 @@ inline LayoutSize defaultMinimumSizeForResizing()
inline ElementRareData::ElementRareData(LayoutObject* renderer)
: NodeRareData(renderer)
, m_tabindex(0)
+ , m_isTabStop(true)
, m_minimumSizeForResizing(defaultMinimumSizeForResizing())
{
m_isElementRareData = true;
« no previous file with comments | « Source/core/dom/Element.idl ('k') | Source/core/page/FocusController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698