| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2008 David Smith (catfish.man@gmail.com) | 5 * (C) 2008 David Smith (catfish.man@gmail.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // <option> and <optgroup> can be styled even if they don't get layout | 44 // <option> and <optgroup> can be styled even if they don't get layout |
| 45 // objects, so they store their style internally and return it through | 45 // objects, so they store their style internally and return it through |
| 46 // nonLayoutObjectComputedStyle(). We check here explicitly to avoid the | 46 // nonLayoutObjectComputedStyle(). We check here explicitly to avoid the |
| 47 // virtual call in the common case. | 47 // virtual call in the common case. |
| 48 if (isHTMLOptGroupElement(*this) || isHTMLOptionElement(this)) | 48 if (isHTMLOptGroupElement(*this) || isHTMLOptionElement(this)) |
| 49 return nonLayoutObjectComputedStyle(); | 49 return nonLayoutObjectComputedStyle(); |
| 50 return 0; | 50 return 0; |
| 51 } | 51 } |
| 52 | 52 |
| 53 inline const ComputedStyle* Node::parentComputedStyle() const { | 53 inline const ComputedStyle* Node::parentComputedStyle() const { |
| 54 if (isSlotOrActiveInsertionPoint()) | 54 if (isActiveSlotOrActiveInsertionPoint()) |
| 55 return 0; | 55 return 0; |
| 56 ContainerNode* parent = LayoutTreeBuilderTraversal::parent(*this); | 56 ContainerNode* parent = LayoutTreeBuilderTraversal::parent(*this); |
| 57 return parent ? parent->computedStyle() : 0; | 57 return parent ? parent->computedStyle() : 0; |
| 58 } | 58 } |
| 59 | 59 |
| 60 inline const ComputedStyle& Node::computedStyleRef() const { | 60 inline const ComputedStyle& Node::computedStyleRef() const { |
| 61 const ComputedStyle* style = computedStyle(); | 61 const ComputedStyle* style = computedStyle(); |
| 62 DCHECK(style); | 62 DCHECK(style); |
| 63 return *style; | 63 return *style; |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace blink | 66 } // namespace blink |
| 67 #endif // NodeComputedStyle_h | 67 #endif // NodeComputedStyle_h |
| OLD | NEW |