| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 } | 270 } |
| 271 } | 271 } |
| 272 | 272 |
| 273 void CSSParserSelector::adoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >&
selectorVector) | 273 void CSSParserSelector::adoptSelectorVector(Vector<OwnPtr<CSSParserSelector> >&
selectorVector) |
| 274 { | 274 { |
| 275 CSSSelectorList* selectorList = new CSSSelectorList(); | 275 CSSSelectorList* selectorList = new CSSSelectorList(); |
| 276 selectorList->adoptSelectorVector(selectorVector); | 276 selectorList->adoptSelectorVector(selectorVector); |
| 277 m_selector->setSelectorList(adoptPtr(selectorList)); | 277 m_selector->setSelectorList(adoptPtr(selectorList)); |
| 278 } | 278 } |
| 279 | 279 |
| 280 void CSSParserSelector::setSelectorList(PassOwnPtr<CSSSelectorList> selectorList
) |
| 281 { |
| 282 m_selector->setSelectorList(selectorList); |
| 283 } |
| 284 |
| 280 bool CSSParserSelector::isSimple() const | 285 bool CSSParserSelector::isSimple() const |
| 281 { | 286 { |
| 282 if (m_selector->selectorList() || m_selector->matchesPseudoElement()) | 287 if (m_selector->selectorList() || m_selector->matchesPseudoElement()) |
| 283 return false; | 288 return false; |
| 284 | 289 |
| 285 if (!m_tagHistory) | 290 if (!m_tagHistory) |
| 286 return true; | 291 return true; |
| 287 | 292 |
| 288 if (m_selector->match() == CSSSelector::Tag) { | 293 if (m_selector->match() == CSSSelector::Tag) { |
| 289 // We can't check against anyQName() here because namespace may not be n
ullAtom. | 294 // We can't check against anyQName() here because namespace may not be n
ullAtom. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 bool CSSParserSelector::hasHostPseudoSelector() const | 332 bool CSSParserSelector::hasHostPseudoSelector() const |
| 328 { | 333 { |
| 329 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel
ector; selector = selector->tagHistory()) { | 334 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel
ector; selector = selector->tagHistory()) { |
| 330 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud
oType() == CSSSelector::PseudoHostContext) | 335 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud
oType() == CSSSelector::PseudoHostContext) |
| 331 return true; | 336 return true; |
| 332 } | 337 } |
| 333 return false; | 338 return false; |
| 334 } | 339 } |
| 335 | 340 |
| 336 } // namespace blink | 341 } // namespace blink |
| OLD | NEW |