OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ | 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ |
4 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 4 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 return haveBufferedCharacterToken(); | 956 return haveBufferedCharacterToken(); |
957 if (!success) { | 957 if (!success) { |
958 ASSERT(decodedEntity.isEmpty()); | 958 ASSERT(decodedEntity.isEmpty()); |
959 m_token->appendToAttributeValue('&'); | 959 m_token->appendToAttributeValue('&'); |
960 } else { | 960 } else { |
961 for (unsigned i = 0; i < decodedEntity.length; ++i) | 961 for (unsigned i = 0; i < decodedEntity.length; ++i) |
962 m_token->appendToAttributeValue(decodedEntity.data[i]); | 962 m_token->appendToAttributeValue(decodedEntity.data[i]); |
963 } | 963 } |
964 // We're supposed to switch back to the attribute value state that | 964 // We're supposed to switch back to the attribute value state that |
965 // we were in when we were switched into this state. Rather than | 965 // we were in when we were switched into this state. Rather than |
966 // keeping track of this explictly, we observe that the previous | 966 // keeping track of this explicitly, we observe that the previous |
967 // state can be determined by m_additionalAllowedCharacter. | 967 // state can be determined by m_additionalAllowedCharacter. |
968 if (m_additionalAllowedCharacter == '"') | 968 if (m_additionalAllowedCharacter == '"') |
969 HTML_SWITCH_TO(AttributeValueDoubleQuotedState); | 969 HTML_SWITCH_TO(AttributeValueDoubleQuotedState); |
970 else if (m_additionalAllowedCharacter == '\'') | 970 else if (m_additionalAllowedCharacter == '\'') |
971 HTML_SWITCH_TO(AttributeValueSingleQuotedState); | 971 HTML_SWITCH_TO(AttributeValueSingleQuotedState); |
972 else if (m_additionalAllowedCharacter == '>') | 972 else if (m_additionalAllowedCharacter == '>') |
973 HTML_SWITCH_TO(AttributeValueUnquotedState); | 973 HTML_SWITCH_TO(AttributeValueUnquotedState); |
974 else | 974 else |
975 ASSERT_NOT_REACHED(); | 975 ASSERT_NOT_REACHED(); |
976 } | 976 } |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 | 1588 |
1589 return true; | 1589 return true; |
1590 } | 1590 } |
1591 | 1591 |
1592 inline void HTMLTokenizer::parseError() | 1592 inline void HTMLTokenizer::parseError() |
1593 { | 1593 { |
1594 notImplemented(); | 1594 notImplemented(); |
1595 } | 1595 } |
1596 | 1596 |
1597 } | 1597 } |
OLD | NEW |