Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: sky/engine/core/css/parser/CSSTokenizer-in.cpp

Issue 871773003: Remove @keyframe parsing. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/css/parser/CSSGrammar.y ('k') | sky/tests/animation/basic-declarative.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 inline void CSSTokenizer::detectAtToken(int length, bool hasEscape) 861 inline void CSSTokenizer::detectAtToken(int length, bool hasEscape)
862 { 862 {
863 CharacterType* name = tokenStart<CharacterType>(); 863 CharacterType* name = tokenStart<CharacterType>();
864 ASSERT(name[0] == '@' && length >= 2); 864 ASSERT(name[0] == '@' && length >= 2);
865 865
866 // Ignore leading @. 866 // Ignore leading @.
867 ++name; 867 ++name;
868 --length; 868 --length;
869 869
870 // charset, font-face, media, supports, 870 // charset, font-face, media, supports,
871 // -webkit-keyframes, keyframes, and -webkit-mediaquery are not affected by hasEscape. 871 // -webkit-mediaquery are not affected by hasEscape.
872 SWITCH(name, length) { 872 SWITCH(name, length) {
873 CASE("charset") { 873 CASE("charset") {
874 if (name - 1 == dataStart<CharacterType>()) 874 if (name - 1 == dataStart<CharacterType>())
875 m_token = CHARSET_SYM; 875 m_token = CHARSET_SYM;
876 } 876 }
877 CASE("font-face") { 877 CASE("font-face") {
878 m_token = FONT_FACE_SYM; 878 m_token = FONT_FACE_SYM;
879 } 879 }
880 CASE("keyframes") {
881 m_token = KEYFRAMES_SYM;
882 }
883 CASE("supports") { 880 CASE("supports") {
884 m_parsingMode = SupportsMode; 881 m_parsingMode = SupportsMode;
885 m_token = SUPPORTS_SYM; 882 m_token = SUPPORTS_SYM;
886 } 883 }
887 CASE("-internal-rule") { 884 CASE("-internal-rule") {
888 if (LIKELY(!hasEscape && m_internal)) 885 if (LIKELY(!hasEscape && m_internal))
889 m_token = INTERNAL_RULE_SYM; 886 m_token = INTERNAL_RULE_SYM;
890 } 887 }
891 CASE("-internal-decls") { 888 CASE("-internal-decls") {
892 if (LIKELY(!hasEscape && m_internal)) 889 if (LIKELY(!hasEscape && m_internal))
893 m_token = INTERNAL_DECLS_SYM; 890 m_token = INTERNAL_DECLS_SYM;
894 } 891 }
895 CASE("-internal-value") { 892 CASE("-internal-value") {
896 if (LIKELY(!hasEscape && m_internal)) 893 if (LIKELY(!hasEscape && m_internal))
897 m_token = INTERNAL_VALUE_SYM; 894 m_token = INTERNAL_VALUE_SYM;
898 } 895 }
899 CASE("-internal-selector") { 896 CASE("-internal-selector") {
900 if (LIKELY(!hasEscape && m_internal)) 897 if (LIKELY(!hasEscape && m_internal))
901 m_token = INTERNAL_SELECTOR_SYM; 898 m_token = INTERNAL_SELECTOR_SYM;
902 } 899 }
903 CASE("-internal-keyframe-rule") {
904 if (LIKELY(!hasEscape && m_internal))
905 m_token = INTERNAL_KEYFRAME_RULE_SYM;
906 }
907 CASE("-internal-keyframe-key-list") {
908 if (!m_internal)
909 return;
910 m_token = INTERNAL_KEYFRAME_KEY_LIST_SYM;
911 }
912 CASE("-internal-supports-condition") { 900 CASE("-internal-supports-condition") {
913 if (!m_internal) 901 if (!m_internal)
914 return; 902 return;
915 m_parsingMode = SupportsMode; 903 m_parsingMode = SupportsMode;
916 m_token = INTERNAL_SUPPORTS_CONDITION_SYM; 904 m_token = INTERNAL_SUPPORTS_CONDITION_SYM;
917 } 905 }
918 } 906 }
919 } 907 }
920 908
921 template <typename CharacterType> 909 template <typename CharacterType>
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 m_dataStart16[length - 1] = 0; 1263 m_dataStart16[length - 1] = 0;
1276 1264
1277 m_is8BitSource = false; 1265 m_is8BitSource = false;
1278 m_currentCharacter8 = 0; 1266 m_currentCharacter8 = 0;
1279 m_currentCharacter16 = m_dataStart16.get(); 1267 m_currentCharacter16 = m_dataStart16.get();
1280 setTokenStart<UChar>(m_currentCharacter16); 1268 setTokenStart<UChar>(m_currentCharacter16);
1281 m_lexFunc = &CSSTokenizer::realLex<UChar>; 1269 m_lexFunc = &CSSTokenizer::realLex<UChar>;
1282 } 1270 }
1283 1271
1284 } // namespace blink 1272 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/parser/CSSGrammar.y ('k') | sky/tests/animation/basic-declarative.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698