| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 if (m_hasUAAppearance) { | 38 if (m_hasUAAppearance) { |
| 39 m_borderData = m_style->border(); | 39 m_borderData = m_style->border(); |
| 40 m_backgroundData = *m_style->backgroundLayers(); | 40 m_backgroundData = *m_style->backgroundLayers(); |
| 41 m_backgroundColor = m_style->backgroundColor(); | 41 m_backgroundColor = m_style->backgroundColor(); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 void StyleResolverState::clear() | 45 void StyleResolverState::clear() |
| 46 { | 46 { |
| 47 m_element = 0; | 47 m_element = 0; |
| 48 m_style = 0; |
| 48 m_styledElement = 0; | 49 m_styledElement = 0; |
| 49 m_parentStyle = 0; | 50 m_parentStyle = 0; |
| 50 m_parentNode = 0; | 51 m_parentNode = 0; |
| 51 m_regionForStyling = 0; | 52 m_regionForStyling = 0; |
| 52 m_elementStyleResources.clear(); | 53 m_elementStyleResources.clear(); |
| 53 } | 54 } |
| 54 | 55 |
| 56 PassRefPtr<RenderStyle> StyleResolverState::takeStyleAndClear() |
| 57 { |
| 58 RefPtr<RenderStyle> result = takeStyle(); |
| 59 clear(); |
| 60 return result.release(); |
| 61 } |
| 62 |
| 55 void StyleResolverState::initElement(Element* element) | 63 void StyleResolverState::initElement(Element* element) |
| 56 { | 64 { |
| 57 if (m_element == element) | 65 if (m_element == element) |
| 58 return; | 66 return; |
| 59 | 67 |
| 60 m_element = element; | 68 m_element = element; |
| 61 m_styledElement = element && element->isStyledElement() ? element : 0; | 69 m_styledElement = element && element->isStyledElement() ? element : 0; |
| 62 m_elementLinkState = element ? element->document()->visitedLinkState()->dete
rmineLinkState(element) : NotInsideLink; | 70 m_elementLinkState = element ? element->document()->visitedLinkState()->dete
rmineLinkState(element) : NotInsideLink; |
| 63 | 71 |
| 64 if (!element || element != element->document()->documentElement()) | 72 if (!element || element != element->document()->documentElement()) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 return RenderTheme::focusRingColor(); | 164 return RenderTheme::focusRingColor(); |
| 157 case CSSValueCurrentcolor: | 165 case CSSValueCurrentcolor: |
| 158 m_isMatchedPropertiesCacheable = false; | 166 m_isMatchedPropertiesCacheable = false; |
| 159 return style()->color(); | 167 return style()->color(); |
| 160 default: | 168 default: |
| 161 return colorForCSSValue(valueID); | 169 return colorForCSSValue(valueID); |
| 162 } | 170 } |
| 163 } | 171 } |
| 164 | 172 |
| 165 } // namespace WebCore | 173 } // namespace WebCore |
| OLD | NEW |