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

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

Issue 16103013: DocType strings should be 8 bit wide (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 void HTMLConstructionSite::finishedParsing() 415 void HTMLConstructionSite::finishedParsing()
416 { 416 {
417 m_document->finishedParsing(); 417 m_document->finishedParsing();
418 } 418 }
419 419
420 void HTMLConstructionSite::insertDoctype(AtomicHTMLToken* token) 420 void HTMLConstructionSite::insertDoctype(AtomicHTMLToken* token)
421 { 421 {
422 ASSERT(token->type() == HTMLToken::DOCTYPE); 422 ASSERT(token->type() == HTMLToken::DOCTYPE);
423 423
424 const String& publicId = String::adopt(token->publicIdentifier()); 424 const String& publicId = StringImpl::create8BitIfPossible(token->publicIdent ifier());
425 const String& systemId = String::adopt(token->systemIdentifier()); 425 const String& systemId = StringImpl::create8BitIfPossible(token->systemIdent ifier());
426 RefPtr<DocumentType> doctype = DocumentType::create(m_document, token->name( ), publicId, systemId); 426 RefPtr<DocumentType> doctype = DocumentType::create(m_document, token->name( ), publicId, systemId);
427 attachLater(m_attachmentRoot, doctype.release()); 427 attachLater(m_attachmentRoot, doctype.release());
428 428
429 // DOCTYPE nodes are only processed when parsing fragments w/o contextElemen ts, which 429 // DOCTYPE nodes are only processed when parsing fragments w/o contextElemen ts, which
430 // never occurs. However, if we ever chose to support such, this code is su btly wrong, 430 // never occurs. However, if we ever chose to support such, this code is su btly wrong,
431 // because context-less fragments can determine their own quirks mode, and t hus change 431 // because context-less fragments can determine their own quirks mode, and t hus change
432 // parsing rules (like <p> inside <table>). For now we ASSERT that we never hit this code 432 // parsing rules (like <p> inside <table>). For now we ASSERT that we never hit this code
433 // in a fragment, as changing the owning document's compatibility mode would be wrong. 433 // in a fragment, as changing the owning document's compatibility mode would be wrong.
434 ASSERT(!m_isParsingFragment); 434 ASSERT(!m_isParsingFragment);
435 if (m_isParsingFragment) 435 if (m_isParsingFragment)
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 { 760 {
761 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert); 761 HTMLConstructionSiteTask task(HTMLConstructionSiteTask::Insert);
762 findFosterSite(task); 762 findFosterSite(task);
763 task.child = node; 763 task.child = node;
764 ASSERT(task.parent); 764 ASSERT(task.parent);
765 765
766 m_taskQueue.append(task); 766 m_taskQueue.append(task);
767 } 767 }
768 768
769 } 769 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698