OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2013 Google, Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 case HTMLToken::EndOfFile: | 52 case HTMLToken::EndOfFile: |
53 break; | 53 break; |
54 case HTMLToken::StartTag: | 54 case HTMLToken::StartTag: |
55 m_attributes.reserveInitialCapacity(token->attributes().size()); | 55 m_attributes.reserveInitialCapacity(token->attributes().size()); |
56 for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes
().begin(); it != token->attributes().end(); ++it) | 56 for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes
().begin(); it != token->attributes().end(); ++it) |
57 m_attributes.append(Attribute(attemptStaticStringCreation(it->name,
Likely8Bit), StringImpl::create8BitIfPossible(it->value))); | 57 m_attributes.append(Attribute(attemptStaticStringCreation(it->name,
Likely8Bit), StringImpl::create8BitIfPossible(it->value))); |
58 // Fall through! | 58 // Fall through! |
59 case HTMLToken::EndTag: | 59 case HTMLToken::EndTag: |
60 m_selfClosing = token->selfClosing(); | 60 m_selfClosing = token->selfClosing(); |
61 // Fall through! | 61 // Fall through! |
62 case HTMLToken::Comment: | |
63 case HTMLToken::Character: { | 62 case HTMLToken::Character: { |
64 m_isAll8BitData = token->isAll8BitData(); | 63 m_isAll8BitData = token->isAll8BitData(); |
65 m_data = attemptStaticStringCreation(token->data(), token->isAll8BitData
() ? Force8Bit : Force16Bit); | 64 m_data = attemptStaticStringCreation(token->data(), token->isAll8BitData
() ? Force8Bit : Force16Bit); |
66 break; | 65 break; |
67 } | 66 } |
68 default: | 67 default: |
69 ASSERT_NOT_REACHED(); | 68 ASSERT_NOT_REACHED(); |
70 break; | 69 break; |
71 } | 70 } |
72 } | 71 } |
(...skipping 12 matching lines...) Expand all Loading... |
85 for (Vector<Attribute>::const_iterator it = m_attributes.begin(); it != m_at
tributes.end(); ++it) { | 84 for (Vector<Attribute>::const_iterator it = m_attributes.begin(); it != m_at
tributes.end(); ++it) { |
86 if (!it->name.isSafeToSendToAnotherThread()) | 85 if (!it->name.isSafeToSendToAnotherThread()) |
87 return false; | 86 return false; |
88 if (!it->value.isSafeToSendToAnotherThread()) | 87 if (!it->value.isSafeToSendToAnotherThread()) |
89 return false; | 88 return false; |
90 } | 89 } |
91 return m_data.isSafeToSendToAnotherThread(); | 90 return m_data.isSafeToSendToAnotherThread(); |
92 } | 91 } |
93 | 92 |
94 } | 93 } |
OLD | NEW |