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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2365263002: Added isComputedStyle::isDisplayTableType() and made it static (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(m_rareNonIn heritedData, m_visitedLinkBorderTopColor, v); } 2460 void setVisitedLinkBorderTopColor(const StyleColor& v) { SET_VAR(m_rareNonIn heritedData, m_visitedLinkBorderTopColor, v); }
2461 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(m_rareNonInhe ritedData, m_visitedLinkOutlineColor, v); } 2461 void setVisitedLinkOutlineColor(const StyleColor& v) { SET_VAR(m_rareNonInhe ritedData, m_visitedLinkOutlineColor, v); }
2462 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(m_r areNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); } 2462 void setVisitedLinkColumnRuleColor(const StyleColor& v) { SET_NESTED_VAR(m_r areNonInheritedData, m_multiCol, m_visitedLinkColumnRuleColor, v); }
2463 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(m_rare NonInheritedData, m_visitedLinkTextDecorationColor, v); } 2463 void setVisitedLinkTextDecorationColor(const StyleColor& v) { SET_VAR(m_rare NonInheritedData, m_visitedLinkTextDecorationColor, v); }
2464 void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SET TER(m_rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasi sColor, v); } 2464 void setVisitedLinkTextEmphasisColor(const StyleColor& v) { SET_VAR_WITH_SET TER(m_rareInheritedData, visitedLinkTextEmphasisColor, setVisitedLinkTextEmphasi sColor, v); }
2465 void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER( m_rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); } 2465 void setVisitedLinkTextFillColor(const StyleColor& v) { SET_VAR_WITH_SETTER( m_rareInheritedData, visitedLinkTextFillColor, setVisitedLinkTextFillColor, v); }
2466 void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTE R(m_rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor , v); } 2466 void setVisitedLinkTextStrokeColor(const StyleColor& v) { SET_VAR_WITH_SETTE R(m_rareInheritedData, visitedLinkTextStrokeColor, setVisitedLinkTextStrokeColor , v); }
2467 2467
2468 void inheritUnicodeBidiFrom(const ComputedStyle& parent) { m_nonInheritedDat a.m_unicodeBidi = parent.m_nonInheritedData.m_unicodeBidi; } 2468 void inheritUnicodeBidiFrom(const ComputedStyle& parent) { m_nonInheritedDat a.m_unicodeBidi = parent.m_nonInheritedData.m_unicodeBidi; }
2469 2469
2470 bool isDisplayFlexibleBox(EDisplay display) const 2470 static bool isDisplayFlexibleBox(EDisplay display)
2471 { 2471 {
2472 return display == FLEX || display == INLINE_FLEX; 2472 return display == FLEX || display == INLINE_FLEX;
2473 } 2473 }
2474 2474
2475 bool isDisplayGridBox(EDisplay display) const 2475 static bool isDisplayGridBox(EDisplay display)
2476 { 2476 {
2477 return display == GRID || display == INLINE_GRID; 2477 return display == GRID || display == INLINE_GRID;
2478 } 2478 }
2479 2479
2480 bool isDisplayReplacedType(EDisplay display) const 2480 static bool isDisplayReplacedType(EDisplay display)
2481 { 2481 {
2482 return display == INLINE_BLOCK || display == INLINE_BOX || display == IN LINE_FLEX 2482 return display == INLINE_BLOCK || display == INLINE_BOX || display == IN LINE_FLEX
2483 || display == INLINE_TABLE || display == INLINE_GRID; 2483 || display == INLINE_TABLE || display == INLINE_GRID;
2484 } 2484 }
2485 2485
2486 bool isDisplayInlineType(EDisplay display) const 2486 static bool isDisplayInlineType(EDisplay display)
2487 { 2487 {
2488 return display == INLINE || isDisplayReplacedType(display); 2488 return display == INLINE || isDisplayReplacedType(display);
2489 } 2489 }
2490 2490
2491 static bool isDisplayTableType(EDisplay display)
2492 {
2493 return display == TABLE || display == INLINE_TABLE || display == TABLE_R OW_GROUP
2494 || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW
2495 || display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || displ ay == TABLE_CELL
2496 || 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
2497 }
2498
2491 // Color accessors are all private to make sure callers use visitedDependent Color instead to access them. 2499 // Color accessors are all private to make sure callers use visitedDependent Color instead to access them.
2492 StyleColor borderLeftColor() const { return m_surround->border.left().color( ); } 2500 StyleColor borderLeftColor() const { return m_surround->border.left().color( ); }
2493 StyleColor borderRightColor() const { return m_surround->border.right().colo r(); } 2501 StyleColor borderRightColor() const { return m_surround->border.right().colo r(); }
2494 StyleColor borderTopColor() const { return m_surround->border.top().color(); } 2502 StyleColor borderTopColor() const { return m_surround->border.top().color(); }
2495 StyleColor borderBottomColor() const { return m_surround->border.bottom().co lor(); } 2503 StyleColor borderBottomColor() const { return m_surround->border.bottom().co lor(); }
2496 StyleColor backgroundColor() const { return m_background->color(); } 2504 StyleColor backgroundColor() const { return m_background->color(); }
2497 Color color() const; 2505 Color color() const;
2498 StyleColor columnRuleColor() const { return m_rareNonInheritedData->m_multiC ol->m_rule.color(); } 2506 StyleColor columnRuleColor() const { return m_rareNonInheritedData->m_multiC ol->m_rule.color(); }
2499 StyleColor outlineColor() const { return m_background->outline().color(); } 2507 StyleColor outlineColor() const { return m_background->outline().color(); }
2500 StyleColor textEmphasisColor() const { return m_rareInheritedData->textEmpha sisColor(); } 2508 StyleColor textEmphasisColor() const { return m_rareInheritedData->textEmpha sisColor(); }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 } 2638 }
2631 2639
2632 inline bool ComputedStyle::hasPseudoElementStyle() const 2640 inline bool ComputedStyle::hasPseudoElementStyle() const
2633 { 2641 {
2634 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 2642 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
2635 } 2643 }
2636 2644
2637 } // namespace blink 2645 } // namespace blink
2638 2646
2639 #endif // ComputedStyle_h 2647 #endif // ComputedStyle_h
OLDNEW
« 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