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

Side by Side Diff: Source/core/html/parser/CompactHTMLToken.cpp

Issue 342933003: Remove an unneccessary FIXME comment for HTMLToken (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 { 48 {
49 switch (m_type) { 49 switch (m_type) {
50 case HTMLToken::Uninitialized: 50 case HTMLToken::Uninitialized:
51 ASSERT_NOT_REACHED(); 51 ASSERT_NOT_REACHED();
52 break; 52 break;
53 case HTMLToken::DOCTYPE: { 53 case HTMLToken::DOCTYPE: {
54 m_data = attemptStaticStringCreation(token->name(), Likely8Bit); 54 m_data = attemptStaticStringCreation(token->name(), Likely8Bit);
55 55
56 // There is only 1 DOCTYPE token per document, so to avoid increasing th e 56 // There is only 1 DOCTYPE token per document, so to avoid increasing th e
57 // size of CompactHTMLToken, we just use the m_attributes vector. 57 // size of CompactHTMLToken, we just use the m_attributes vector.
58 m_attributes.append(Attribute(attemptStaticStringCreation(token->publicI dentifier(), Likely8Bit), String(token->systemIdentifier()))); 58 m_attributes.append(Attribute(token->publicIdentifier(), token->systemId entifier()));
59 m_doctypeForcesQuirks = token->forceQuirks(); 59 m_doctypeForcesQuirks = token->forceQuirks();
60 break; 60 break;
61 } 61 }
62 case HTMLToken::EndOfFile: 62 case HTMLToken::EndOfFile:
63 break; 63 break;
64 case HTMLToken::StartTag: 64 case HTMLToken::StartTag:
65 m_attributes.reserveInitialCapacity(token->attributes().size()); 65 m_attributes.reserveInitialCapacity(token->attributes().size());
66 for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes ().begin(); it != token->attributes().end(); ++it) 66 for (Vector<HTMLToken::Attribute>::const_iterator it = token->attributes ().begin(); it != token->attributes().end(); ++it)
67 m_attributes.append(Attribute(attemptStaticStringCreation(it->name, Likely8Bit), StringImpl::create8BitIfPossible(it->value))); 67 m_attributes.append(Attribute(attemptStaticStringCreation(it->name, Likely8Bit), StringImpl::create8BitIfPossible(it->value)));
68 // Fall through! 68 // Fall through!
(...skipping 26 matching lines...) Expand all
95 for (Vector<Attribute>::const_iterator it = m_attributes.begin(); it != m_at tributes.end(); ++it) { 95 for (Vector<Attribute>::const_iterator it = m_attributes.begin(); it != m_at tributes.end(); ++it) {
96 if (!it->name.isSafeToSendToAnotherThread()) 96 if (!it->name.isSafeToSendToAnotherThread())
97 return false; 97 return false;
98 if (!it->value.isSafeToSendToAnotherThread()) 98 if (!it->value.isSafeToSendToAnotherThread())
99 return false; 99 return false;
100 } 100 }
101 return m_data.isSafeToSendToAnotherThread(); 101 return m_data.isSafeToSendToAnotherThread();
102 } 102 }
103 103
104 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698