| OLD | NEW | 
|---|
| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 190 | 190 | 
| 191 void HTMLViewSourceDocument::addLine(const AtomicString& className) | 191 void HTMLViewSourceDocument::addLine(const AtomicString& className) | 
| 192 { | 192 { | 
| 193     // Create a table row. | 193     // Create a table row. | 
| 194     RefPtr<HTMLTableRowElement> trow = HTMLTableRowElement::create(*this); | 194     RefPtr<HTMLTableRowElement> trow = HTMLTableRowElement::create(*this); | 
| 195     m_tbody->parserAppendChild(trow); | 195     m_tbody->parserAppendChild(trow); | 
| 196 | 196 | 
| 197     // Create a cell that will hold the line number (it is generated in the styl
     esheet using counters). | 197     // Create a cell that will hold the line number (it is generated in the styl
     esheet using counters). | 
| 198     RefPtr<HTMLTableCellElement> td = HTMLTableCellElement::create(tdTag, *this)
     ; | 198     RefPtr<HTMLTableCellElement> td = HTMLTableCellElement::create(tdTag, *this)
     ; | 
| 199     td->setAttribute(classAttr, "webkit-line-number"); | 199     td->setAttribute(classAttr, "webkit-line-number"); | 
| 200     td->setAttribute(valueAttr, String::number(++m_lineNumber)); | 200     td->setIntegralAttribute(valueAttr, ++m_lineNumber); | 
| 201     trow->parserAppendChild(td); | 201     trow->parserAppendChild(td); | 
| 202 | 202 | 
| 203     // Create a second cell for the line contents | 203     // Create a second cell for the line contents | 
| 204     td = HTMLTableCellElement::create(tdTag, *this); | 204     td = HTMLTableCellElement::create(tdTag, *this); | 
| 205     td->setAttribute(classAttr, "webkit-line-content"); | 205     td->setAttribute(classAttr, "webkit-line-content"); | 
| 206     trow->parserAppendChild(td); | 206     trow->parserAppendChild(td); | 
| 207     m_current = m_td = td; | 207     m_current = m_td = td; | 
| 208 | 208 | 
| 209     // Open up the needed spans. | 209     // Open up the needed spans. | 
| 210     if (!className.isEmpty()) { | 210     if (!className.isEmpty()) { | 
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 289     else | 289     else | 
| 290         classValue = "webkit-html-attribute-value webkit-html-resource-link"; | 290         classValue = "webkit-html-attribute-value webkit-html-resource-link"; | 
| 291     anchor->setAttribute(classAttr, classValue); | 291     anchor->setAttribute(classAttr, classValue); | 
| 292     anchor->setAttribute(targetAttr, "_blank"); | 292     anchor->setAttribute(targetAttr, "_blank"); | 
| 293     anchor->setAttribute(hrefAttr, url); | 293     anchor->setAttribute(hrefAttr, url); | 
| 294     m_current->parserAppendChild(anchor); | 294     m_current->parserAppendChild(anchor); | 
| 295     return anchor.release(); | 295     return anchor.release(); | 
| 296 } | 296 } | 
| 297 | 297 | 
| 298 } | 298 } | 
| OLD | NEW | 
|---|