Chromium Code Reviews| 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 410 bool isFloating() const { return noninherited_flags.floating != NoFloat; } | 410 bool isFloating() const { return noninherited_flags.floating != NoFloat; } |
| 411 bool hasMargin() const { return surround->margin.nonZero(); } | 411 bool hasMargin() const { return surround->margin.nonZero(); } |
| 412 bool hasBorderFill() const { return surround->border.hasBorderFill(); } | 412 bool hasBorderFill() const { return surround->border.hasBorderFill(); } |
| 413 bool hasBorder() const { return surround->border.hasBorder(); } | 413 bool hasBorder() const { return surround->border.hasBorder(); } |
| 414 bool hasBorderDecoration() const { return hasBorder() || hasBorderFill(); } | 414 bool hasBorderDecoration() const { return hasBorder() || hasBorderFill(); } |
| 415 bool hasPadding() const { return surround->padding.nonZero(); } | 415 bool hasPadding() const { return surround->padding.nonZero(); } |
| 416 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } | 416 bool hasMarginBeforeQuirk() const { return marginBefore().quirk(); } |
| 417 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } | 417 bool hasMarginAfterQuirk() const { return marginAfter().quirk(); } |
| 418 | 418 |
| 419 bool hasBackgroundImage() const { return m_background->background().hasImage (); } | 419 bool hasBackgroundImage() const { return m_background->background().hasImage (); } |
| 420 bool hasBackgroundImageOrBackdropFilter() const { return hasBackgroundImage( ) || hasBackdropFilter(); } | |
| 420 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } | 421 bool hasFixedBackgroundImage() const { return m_background->background().has FixedImage(); } |
| 421 | 422 |
| 422 bool hasEntirelyFixedBackground() const; | 423 bool hasEntirelyFixedBackground() const; |
| 423 | 424 |
| 424 bool hasAppearance() const { return appearance() != NoControlPart; } | 425 bool hasAppearance() const { return appearance() != NoControlPart; } |
| 425 | 426 |
| 426 bool hasBackgroundRelatedColorReferencingCurrentColor() const | 427 bool hasBackgroundRelatedColorReferencingCurrentColor() const |
| 427 { | 428 { |
| 428 if (backgroundColor().isCurrentColor() || visitedLinkBackgroundColor().i sCurrentColor()) | 429 if (backgroundColor().isCurrentColor() || visitedLinkBackgroundColor().i sCurrentColor()) |
| 429 return true; | 430 return true; |
| 430 if (!boxShadow()) | 431 if (!boxShadow()) |
| 431 return false; | 432 return false; |
| 432 return shadowListHasCurrentColor(boxShadow()); | 433 return shadowListHasCurrentColor(boxShadow()); |
| 433 } | 434 } |
| 434 | 435 |
| 435 bool hasBackground() const | 436 bool hasBackground() const |
| 436 { | 437 { |
| 437 Color color = visitedDependentColor(CSSPropertyBackgroundColor); | 438 Color color = visitedDependentColor(CSSPropertyBackgroundColor); |
| 438 if (color.alpha()) | 439 if (color.alpha()) |
| 439 return true; | 440 return true; |
| 440 return hasBackgroundImage(); | 441 return hasBackgroundImageOrBackdropFilter(); |
|
pdr.
2016/01/27 05:52:09
Is this tested? This was my concern in the previou
jaydasika
2016/01/27 23:59:42
Ah, I see your point. I think we should have a sep
| |
| 441 } | 442 } |
| 442 | 443 |
| 443 LayoutRectOutsets imageOutsets(const NinePieceImage&) const; | 444 LayoutRectOutsets imageOutsets(const NinePieceImage&) const; |
| 444 bool hasBorderImageOutsets() const | 445 bool hasBorderImageOutsets() const |
| 445 { | 446 { |
| 446 return borderImage().hasImage() && borderImage().outset().nonZero(); | 447 return borderImage().hasImage() && borderImage().outset().nonZero(); |
| 447 } | 448 } |
| 448 LayoutRectOutsets borderImageOutsets() const | 449 LayoutRectOutsets borderImageOutsets() const |
| 449 { | 450 { |
| 450 return imageOutsets(borderImage()); | 451 return imageOutsets(borderImage()); |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2017 } | 2018 } |
| 2018 | 2019 |
| 2019 inline bool ComputedStyle::hasPseudoElementStyle() const | 2020 inline bool ComputedStyle::hasPseudoElementStyle() const |
| 2020 { | 2021 { |
| 2021 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; | 2022 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; |
| 2022 } | 2023 } |
| 2023 | 2024 |
| 2024 } // namespace blink | 2025 } // namespace blink |
| 2025 | 2026 |
| 2026 #endif // ComputedStyle_h | 2027 #endif // ComputedStyle_h |
| OLD | NEW |