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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
383 | 383 |
384 void setAffectedByFocus() { noninherited_flags.affectedByFocus = true; } | 384 void setAffectedByFocus() { noninherited_flags.affectedByFocus = true; } |
385 void setAffectedByHover() { noninherited_flags.affectedByHover = true; } | 385 void setAffectedByHover() { noninherited_flags.affectedByHover = true; } |
386 void setAffectedByActive() { noninherited_flags.affectedByActive = true; } | 386 void setAffectedByActive() { noninherited_flags.affectedByActive = true; } |
387 void setAffectedByDrag() { noninherited_flags.affectedByDrag = true; } | 387 void setAffectedByDrag() { noninherited_flags.affectedByDrag = true; } |
388 | 388 |
389 bool operator==(const ComputedStyle& other) const; | 389 bool operator==(const ComputedStyle& other) const; |
390 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; } | 390 bool operator!=(const ComputedStyle& other) const { return !(*this == other) ; } |
391 bool isFloating() const { return noninherited_flags.floating != NoFloat; } | 391 bool isFloating() const { return noninherited_flags.floating != NoFloat; } |
392 bool hasMargin() const { return surround->margin.nonZero(); } | 392 bool hasMargin() const { return surround->margin.nonZero(); } |
393 bool hasBorderFill() const { return surround->border.hasBorderFill(); } | |
393 bool hasBorder() const { return surround->border.hasBorder(); } | 394 bool hasBorder() const { return surround->border.hasBorder(); } |
395 bool hasBorderDecoration() const { return hasBorder() || hasBorderFill(); } | |
pdr.
2015/06/02 03:07:56
Can the hasBorder and image check in ComputedStyle
davve
2015/06/03 06:56:01
You mean replacing
if (!hasBorder())
| |
394 bool hasPadding() const { return surround->padding.nonZero(); } | 396 bool hasPadding() const { return surround->padding.nonZero(); } |
395 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } | 397 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } |
396 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } | 398 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } |
397 | 399 |
398 bool hasBackgroundImage() const { return m_background->background().hasImage (); } | 400 bool hasBackgroundImage() const { return m_background->background().hasImage (); } |
399 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } | 401 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } |
400 | 402 |
401 bool hasEntirelyFixedBackground() const; | 403 bool hasEntirelyFixedBackground() const; |
402 | 404 |
403 bool hasAppearance() const { return appearance() != NoControlPart; } | 405 bool hasAppearance() const { return appearance() != NoControlPart; } |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1505 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; } | 1507 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; } |
1506 | 1508 |
1507 Color visitedDependentColor(int colorProperty) const; | 1509 Color visitedDependentColor(int colorProperty) const; |
1508 | 1510 |
1509 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } | 1511 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; } |
1510 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } | 1512 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } |
1511 | 1513 |
1512 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } | 1514 bool hasChildDependentFlags() const { return emptyState() || hasExplicitlyIn heritedProperties(); } |
1513 void copyChildDependentFlagsFrom(const ComputedStyle&); | 1515 void copyChildDependentFlagsFrom(const ComputedStyle&); |
1514 | 1516 |
1515 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resize() != RES IZE_NONE; } | 1517 bool hasBoxDecorations() const { return hasBorderDecoration() || hasBorderRa dius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resiz e() != RESIZE_NONE; } |
1516 | 1518 |
1517 bool borderObscuresBackground() const; | 1519 bool borderObscuresBackground() const; |
1518 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const; | 1520 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const; |
1519 | 1521 |
1520 // Initial values for all the properties | 1522 // Initial values for all the properties |
1521 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } | 1523 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } |
1522 static EBorderStyle initialBorderStyle() { return BNONE; } | 1524 static EBorderStyle initialBorderStyle() { return BNONE; } |
1523 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } | 1525 static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } |
1524 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } | 1526 static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } |
1525 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } | 1527 static LengthSize initialBorderRadius() { return LengthSize(Length(0, Fixed) , Length(0, Fixed)); } |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1881 } | 1883 } |
1882 | 1884 |
1883 inline bool ComputedStyle::hasPseudoElementStyle() const | 1885 inline bool ComputedStyle::hasPseudoElementStyle() const |
1884 { | 1886 { |
1885 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 1887 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
1886 } | 1888 } |
1887 | 1889 |
1888 } // namespace blink | 1890 } // namespace blink |
1889 | 1891 |
1890 #endif // ComputedStyle_h | 1892 #endif // ComputedStyle_h |
OLD | NEW |