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