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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2365263002: Added isComputedStyle::isDisplayTableType() and made it static (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index d70c43f78d2d162af1cc868f6750a8fcc26fb140..5a5ac48a0c83500bf6f3dd540b4470d17a94ece9 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -2467,27 +2467,35 @@ private:
void inheritUnicodeBidiFrom(const ComputedStyle& parent) { m_nonInheritedData.m_unicodeBidi = parent.m_nonInheritedData.m_unicodeBidi; }
- bool isDisplayFlexibleBox(EDisplay display) const
+ static bool isDisplayFlexibleBox(EDisplay display)
{
return display == FLEX || display == INLINE_FLEX;
}
- bool isDisplayGridBox(EDisplay display) const
+ static bool isDisplayGridBox(EDisplay display)
{
return display == GRID || display == INLINE_GRID;
}
- bool isDisplayReplacedType(EDisplay display) const
+ static bool isDisplayReplacedType(EDisplay display)
{
return display == INLINE_BLOCK || display == INLINE_BOX || display == INLINE_FLEX
|| display == INLINE_TABLE || display == INLINE_GRID;
}
- bool isDisplayInlineType(EDisplay display) const
+ static bool isDisplayInlineType(EDisplay display)
{
return display == INLINE || isDisplayReplacedType(display);
}
+ static bool isDisplayTableType(EDisplay display)
+ {
+ return display == TABLE || display == INLINE_TABLE || display == TABLE_ROW_GROUP
+ || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW
+ || display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || display == TABLE_CELL
+ || display == TABLE_CAPTION;
meade_UTC10 2016/09/26 03:26:02 Nit: why not do it the way it was before to save s
sashab 2016/09/26 03:28:32 Good point :) It's because A) Code like this cause
+ }
+
// Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
StyleColor borderLeftColor() const { return m_surround->border.left().color(); }
StyleColor borderRightColor() const { return m_surround->border.right().color(); }
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698