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

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

Issue 2384273007: reflow comments in core/html/*.{cpp,h},core/html/imports (Closed)
Patch Set: comments Created 4 years, 2 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) 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 void HTMLViewSourceDocument::createContainingTable() { 68 void HTMLViewSourceDocument::createContainingTable() {
69 HTMLHtmlElement* html = HTMLHtmlElement::create(*this); 69 HTMLHtmlElement* html = HTMLHtmlElement::create(*this);
70 parserAppendChild(html); 70 parserAppendChild(html);
71 HTMLHeadElement* head = HTMLHeadElement::create(*this); 71 HTMLHeadElement* head = HTMLHeadElement::create(*this);
72 html->parserAppendChild(head); 72 html->parserAppendChild(head);
73 HTMLBodyElement* body = HTMLBodyElement::create(*this); 73 HTMLBodyElement* body = HTMLBodyElement::create(*this);
74 html->parserAppendChild(body); 74 html->parserAppendChild(body);
75 75
76 // Create a line gutter div that can be used to make sure the gutter extends d own the height of the whole 76 // Create a line gutter div that can be used to make sure the gutter extends
77 // document. 77 // down the height of the whole document.
78 HTMLDivElement* div = HTMLDivElement::create(*this); 78 HTMLDivElement* div = HTMLDivElement::create(*this);
79 div->setAttribute(classAttr, "line-gutter-backdrop"); 79 div->setAttribute(classAttr, "line-gutter-backdrop");
80 body->parserAppendChild(div); 80 body->parserAppendChild(div);
81 81
82 HTMLTableElement* table = HTMLTableElement::create(*this); 82 HTMLTableElement* table = HTMLTableElement::create(*this);
83 body->parserAppendChild(table); 83 body->parserAppendChild(table);
84 m_tbody = HTMLTableSectionElement::create(tbodyTag, *this); 84 m_tbody = HTMLTableSectionElement::create(tbodyTag, *this);
85 table->parserAppendChild(m_tbody); 85 table->parserAppendChild(m_tbody);
86 m_current = m_tbody; 86 m_current = m_tbody;
87 m_lineNumber = 0; 87 m_lineNumber = 0;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 span->setAttribute(classAttr, className); 196 span->setAttribute(classAttr, className);
197 m_current->parserAppendChild(span); 197 m_current->parserAppendChild(span);
198 return span; 198 return span;
199 } 199 }
200 200
201 void HTMLViewSourceDocument::addLine(const AtomicString& className) { 201 void HTMLViewSourceDocument::addLine(const AtomicString& className) {
202 // Create a table row. 202 // Create a table row.
203 HTMLTableRowElement* trow = HTMLTableRowElement::create(*this); 203 HTMLTableRowElement* trow = HTMLTableRowElement::create(*this);
204 m_tbody->parserAppendChild(trow); 204 m_tbody->parserAppendChild(trow);
205 205
206 // Create a cell that will hold the line number (it is generated in the styles heet using counters). 206 // Create a cell that will hold the line number (it is generated in the
207 // stylesheet using counters).
207 HTMLTableCellElement* td = HTMLTableCellElement::create(tdTag, *this); 208 HTMLTableCellElement* td = HTMLTableCellElement::create(tdTag, *this);
208 td->setAttribute(classAttr, "line-number"); 209 td->setAttribute(classAttr, "line-number");
209 td->setIntegralAttribute(valueAttr, ++m_lineNumber); 210 td->setIntegralAttribute(valueAttr, ++m_lineNumber);
210 trow->parserAppendChild(td); 211 trow->parserAppendChild(td);
211 212
212 // Create a second cell for the line contents 213 // Create a second cell for the line contents
213 td = HTMLTableCellElement::create(tdTag, *this); 214 td = HTMLTableCellElement::create(tdTag, *this);
214 td->setAttribute(classAttr, "line-content"); 215 td->setAttribute(classAttr, "line-content");
215 trow->parserAppendChild(td); 216 trow->parserAppendChild(td);
216 m_current = m_td = td; 217 m_current = m_td = td;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 321 }
321 322
322 DEFINE_TRACE(HTMLViewSourceDocument) { 323 DEFINE_TRACE(HTMLViewSourceDocument) {
323 visitor->trace(m_current); 324 visitor->trace(m_current);
324 visitor->trace(m_tbody); 325 visitor->trace(m_tbody);
325 visitor->trace(m_td); 326 visitor->trace(m_td);
326 HTMLDocument::trace(visitor); 327 HTMLDocument::trace(visitor);
327 } 328 }
328 329
329 } // namespace blink 330 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLVideoElement.cpp ('k') | third_party/WebKit/Source/core/html/ImageDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698