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

Side by Side Diff: Source/core/html/HTMLViewSourceDocument.cpp

Issue 277633002: Convert DocumentParser code to Use more reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make TextDocument use reference as well Created 6 years, 7 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 | « Source/core/dom/Document.cpp ('k') | Source/core/html/TextDocument.cpp » ('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) 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2009, 2010 Apple 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 { 53 {
54 setIsViewSource(true); 54 setIsViewSource(true);
55 55
56 // FIXME: Why do view-source pages need to load in quirks mode? 56 // FIXME: Why do view-source pages need to load in quirks mode?
57 setCompatibilityMode(QuirksMode); 57 setCompatibilityMode(QuirksMode);
58 lockCompatibilityMode(); 58 lockCompatibilityMode();
59 } 59 }
60 60
61 PassRefPtr<DocumentParser> HTMLViewSourceDocument::createParser() 61 PassRefPtr<DocumentParser> HTMLViewSourceDocument::createParser()
62 { 62 {
63 return HTMLViewSourceParser::create(this, m_type); 63 return HTMLViewSourceParser::create(*this, m_type);
64 } 64 }
65 65
66 void HTMLViewSourceDocument::createContainingTable() 66 void HTMLViewSourceDocument::createContainingTable()
67 { 67 {
68 RefPtrWillBeRawPtr<HTMLHtmlElement> html = HTMLHtmlElement::create(*this); 68 RefPtrWillBeRawPtr<HTMLHtmlElement> html = HTMLHtmlElement::create(*this);
69 parserAppendChild(html); 69 parserAppendChild(html);
70 RefPtrWillBeRawPtr<HTMLHeadElement> head = HTMLHeadElement::create(*this); 70 RefPtrWillBeRawPtr<HTMLHeadElement> head = HTMLHeadElement::create(*this);
71 html->parserAppendChild(head); 71 html->parserAppendChild(head);
72 RefPtrWillBeRawPtr<HTMLBodyElement> body = HTMLBodyElement::create(*this); 72 RefPtrWillBeRawPtr<HTMLBodyElement> body = HTMLBodyElement::create(*this);
73 html->parserAppendChild(body); 73 html->parserAppendChild(body);
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 void HTMLViewSourceDocument::trace(Visitor* visitor) 297 void HTMLViewSourceDocument::trace(Visitor* visitor)
298 { 298 {
299 visitor->trace(m_current); 299 visitor->trace(m_current);
300 visitor->trace(m_tbody); 300 visitor->trace(m_tbody);
301 visitor->trace(m_td); 301 visitor->trace(m_td);
302 HTMLDocument::trace(visitor); 302 HTMLDocument::trace(visitor);
303 } 303 }
304 304
305 } 305 }
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/TextDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698