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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
10 * | 10 * |
(...skipping 9458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9469 m_floatingMediaQueryExpList = adoptPtr(new Vector<OwnPtr<MediaQueryExp> >); | 9469 m_floatingMediaQueryExpList = adoptPtr(new Vector<OwnPtr<MediaQueryExp> >); |
9470 return m_floatingMediaQueryExpList.get(); | 9470 return m_floatingMediaQueryExpList.get(); |
9471 } | 9471 } |
9472 | 9472 |
9473 PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > > CSSParser::sinkFloatingMediaQueryExp
List(Vector<OwnPtr<MediaQueryExp> >* list) | 9473 PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > > CSSParser::sinkFloatingMediaQueryExp
List(Vector<OwnPtr<MediaQueryExp> >* list) |
9474 { | 9474 { |
9475 ASSERT_UNUSED(list, list == m_floatingMediaQueryExpList); | 9475 ASSERT_UNUSED(list, list == m_floatingMediaQueryExpList); |
9476 return m_floatingMediaQueryExpList.release(); | 9476 return m_floatingMediaQueryExpList.release(); |
9477 } | 9477 } |
9478 | 9478 |
9479 MediaQuery* CSSParser::createFloatingMediaQuery(MediaQuery::Restrictor restricto
r, const String& mediaType, PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > > expressi
ons) | 9479 MediaQuery* CSSParser::createFloatingMediaQuery(MediaQuery::Restrictor restricto
r, const AtomicString& mediaType, PassOwnPtr<Vector<OwnPtr<MediaQueryExp> > > ex
pressions) |
9480 { | 9480 { |
9481 m_floatingMediaQuery = adoptPtr(new MediaQuery(restrictor, mediaType, expres
sions)); | 9481 m_floatingMediaQuery = adoptPtr(new MediaQuery(restrictor, mediaType, expres
sions)); |
9482 return m_floatingMediaQuery.get(); | 9482 return m_floatingMediaQuery.get(); |
9483 } | 9483 } |
9484 | 9484 |
9485 MediaQuery* CSSParser::createFloatingMediaQuery(PassOwnPtr<Vector<OwnPtr<MediaQu
eryExp> > > expressions) | 9485 MediaQuery* CSSParser::createFloatingMediaQuery(PassOwnPtr<Vector<OwnPtr<MediaQu
eryExp> > > expressions) |
9486 { | 9486 { |
9487 return createFloatingMediaQuery(MediaQuery::None, "all", expressions); | 9487 return createFloatingMediaQuery(MediaQuery::None, AtomicString("all", Atomic
String::ConstructFromLiteral), expressions); |
9488 } | 9488 } |
9489 | 9489 |
9490 MediaQuery* CSSParser::createFloatingNotAllQuery() | 9490 MediaQuery* CSSParser::createFloatingNotAllQuery() |
9491 { | 9491 { |
9492 return createFloatingMediaQuery(MediaQuery::Not, "all", sinkFloatingMediaQue
ryExpList(createFloatingMediaQueryExpList())); | 9492 return createFloatingMediaQuery(MediaQuery::Not, AtomicString("all", AtomicS
tring::ConstructFromLiteral), sinkFloatingMediaQueryExpList(createFloatingMediaQ
ueryExpList())); |
9493 } | 9493 } |
9494 | 9494 |
9495 PassOwnPtr<MediaQuery> CSSParser::sinkFloatingMediaQuery(MediaQuery* query) | 9495 PassOwnPtr<MediaQuery> CSSParser::sinkFloatingMediaQuery(MediaQuery* query) |
9496 { | 9496 { |
9497 ASSERT_UNUSED(query, query == m_floatingMediaQuery); | 9497 ASSERT_UNUSED(query, query == m_floatingMediaQuery); |
9498 return m_floatingMediaQuery.release(); | 9498 return m_floatingMediaQuery.release(); |
9499 } | 9499 } |
9500 | 9500 |
9501 Vector<RefPtr<StyleKeyframe> >* CSSParser::createFloatingKeyframeVector() | 9501 Vector<RefPtr<StyleKeyframe> >* CSSParser::createFloatingKeyframeVector() |
9502 { | 9502 { |
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10414 { | 10414 { |
10415 // The tokenizer checks for the construct of an+b. | 10415 // The tokenizer checks for the construct of an+b. |
10416 // However, since the {ident} rule precedes the {nth} rule, some of those | 10416 // However, since the {ident} rule precedes the {nth} rule, some of those |
10417 // tokens are identified as string literal. Furthermore we need to accept | 10417 // tokens are identified as string literal. Furthermore we need to accept |
10418 // "odd" and "even" which does not match to an+b. | 10418 // "odd" and "even" which does not match to an+b. |
10419 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 10419 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
10420 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 10420 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
10421 } | 10421 } |
10422 | 10422 |
10423 } | 10423 } |
OLD | NEW |