| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // <option> and <optgroup> can be styled even if they don't get layout objec
ts, | 46 // <option> and <optgroup> can be styled even if they don't get layout objec
ts, |
| 47 // so they store their style internally and return it through nonLayoutObjec
tComputedStyle(). | 47 // so they store their style internally and return it through nonLayoutObjec
tComputedStyle(). |
| 48 // We check here explicitly to avoid the virtual call in the common case. | 48 // We check here explicitly to avoid the virtual call in the common case. |
| 49 if (isHTMLOptGroupElement(*this) || isHTMLOptionElement(this)) | 49 if (isHTMLOptGroupElement(*this) || isHTMLOptionElement(this)) |
| 50 return nonLayoutObjectComputedStyle(); | 50 return nonLayoutObjectComputedStyle(); |
| 51 return 0; | 51 return 0; |
| 52 } | 52 } |
| 53 | 53 |
| 54 inline const ComputedStyle* Node::parentComputedStyle() const | 54 inline const ComputedStyle* Node::parentComputedStyle() const |
| 55 { | 55 { |
| 56 if (isActiveInsertionPoint(*this)) | 56 if (isSlotOrActiveInsertionPoint()) |
| 57 return 0; | 57 return 0; |
| 58 ContainerNode* parent = LayoutTreeBuilderTraversal::parent(*this); | 58 ContainerNode* parent = LayoutTreeBuilderTraversal::parent(*this); |
| 59 return parent ? parent->computedStyle() : 0; | 59 return parent ? parent->computedStyle() : 0; |
| 60 } | 60 } |
| 61 | 61 |
| 62 inline const ComputedStyle& Node::computedStyleRef() const | 62 inline const ComputedStyle& Node::computedStyleRef() const |
| 63 { | 63 { |
| 64 const ComputedStyle* style = computedStyle(); | 64 const ComputedStyle* style = computedStyle(); |
| 65 ASSERT(style); | 65 ASSERT(style); |
| 66 return *style; | 66 return *style; |
| 67 } | 67 } |
| 68 | 68 |
| 69 } | 69 } |
| 70 #endif // NodeComputedStyle_h | 70 #endif // NodeComputedStyle_h |
| OLD | NEW |