OLD | NEW |
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 mutable unsigned hasViewportUnits : 1; | 251 mutable unsigned hasViewportUnits : 1; |
252 | 252 |
253 // 32 bits | 253 // 32 bits |
254 | 254 |
255 unsigned pageBreakBefore : 2; // EPageBreak | 255 unsigned pageBreakBefore : 2; // EPageBreak |
256 unsigned pageBreakAfter : 2; // EPageBreak | 256 unsigned pageBreakAfter : 2; // EPageBreak |
257 unsigned pageBreakInside : 2; // EPageBreak | 257 unsigned pageBreakInside : 2; // EPageBreak |
258 | 258 |
259 unsigned styleType : 6; // PseudoId | 259 unsigned styleType : 6; // PseudoId |
260 unsigned pseudoBits : 8; | 260 unsigned pseudoBits : 8; |
261 unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited
property | 261 // FIXME: |explicitInheritance| should be moved to ElementRareData. |
262 unsigned unique : 1; // Style can not be shared. | 262 mutable unsigned explicitInheritance : 1; // Explicitly inherits a non-i
nherited property |
| 263 mutable unsigned unique : 1; // Style can not be shared. |
263 | 264 |
264 unsigned emptyState : 1; | 265 unsigned emptyState : 1; |
265 | 266 |
266 unsigned affectedByFocus : 1; | 267 unsigned affectedByFocus : 1; |
267 unsigned affectedByHover : 1; | 268 unsigned affectedByHover : 1; |
268 unsigned affectedByActive : 1; | 269 unsigned affectedByActive : 1; |
269 unsigned affectedByDrag : 1; | 270 unsigned affectedByDrag : 1; |
270 | 271 |
271 unsigned isLink : 1; | 272 unsigned isLink : 1; |
272 // If you add more style bits here, you will also need to update LayoutS
tyle::copyNonInheritedFrom() | 273 // If you add more style bits here, you will also need to update LayoutS
tyle::copyNonInheritedFrom() |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 { | 1454 { |
1454 if (v == writingMode()) | 1455 if (v == writingMode()) |
1455 return false; | 1456 return false; |
1456 | 1457 |
1457 inherited_flags.m_writingMode = v; | 1458 inherited_flags.m_writingMode = v; |
1458 return true; | 1459 return true; |
1459 } | 1460 } |
1460 | 1461 |
1461 // A unique style is one that has matches something that makes it impossible
to share. | 1462 // A unique style is one that has matches something that makes it impossible
to share. |
1462 bool unique() const { return noninherited_flags.unique; } | 1463 bool unique() const { return noninherited_flags.unique; } |
1463 void setUnique() { noninherited_flags.unique = true; } | 1464 void setUnique() const { noninherited_flags.unique = true; } |
1464 | 1465 |
1465 bool isSharable() const; | 1466 bool isSharable() const; |
1466 | 1467 |
1467 bool emptyState() const { return noninherited_flags.emptyState; } | 1468 bool emptyState() const { return noninherited_flags.emptyState; } |
1468 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b;
} | 1469 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b;
} |
1469 | 1470 |
1470 Color visitedDependentColor(int colorProperty) const; | 1471 Color visitedDependentColor(int colorProperty) const; |
1471 | 1472 |
1472 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe
ritance = true; } | 1473 void setHasExplicitlyInheritedProperties() const { noninherited_flags.explic
itInheritance = true; } |
1473 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex
plicitInheritance; } | 1474 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex
plicitInheritance; } |
1474 | 1475 |
1475 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() ||
hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resize() != RES
IZE_NONE; } | 1476 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() ||
hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resize() != RES
IZE_NONE; } |
1476 | 1477 |
1477 bool borderObscuresBackground() const; | 1478 bool borderObscuresBackground() const; |
1478 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru
e, bool includeLogicalRightEdge = true) const; | 1479 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru
e, bool includeLogicalRightEdge = true) const; |
1479 | 1480 |
1480 // Initial values for all the properties | 1481 // Initial values for all the properties |
1481 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } | 1482 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } |
1482 static EBorderStyle initialBorderStyle() { return BNONE; } | 1483 static EBorderStyle initialBorderStyle() { return BNONE; } |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1854 } | 1855 } |
1855 | 1856 |
1856 inline bool LayoutStyle::hasPseudoElementStyle() const | 1857 inline bool LayoutStyle::hasPseudoElementStyle() const |
1857 { | 1858 { |
1858 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 1859 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
1859 } | 1860 } |
1860 | 1861 |
1861 } // namespace blink | 1862 } // namespace blink |
1862 | 1863 |
1863 #endif // LayoutStyle_h | 1864 #endif // LayoutStyle_h |
OLD | NEW |