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

Unified Diff: Source/core/html/HTMLViewSourceDocument.cpp

Issue 306953006: Remove webkit- prefix from classes used by View Source (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/view-source.css ('k') | Source/core/inspector/InspectorOverlayPage.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLViewSourceDocument.cpp
diff --git a/Source/core/html/HTMLViewSourceDocument.cpp b/Source/core/html/HTMLViewSourceDocument.cpp
index f0383a5398bab751369ea046dc3e21d028af2012..10dd07436e6b03f79b1f3e10aecd17401e0ed10f 100644
--- a/Source/core/html/HTMLViewSourceDocument.cpp
+++ b/Source/core/html/HTMLViewSourceDocument.cpp
@@ -81,7 +81,7 @@ void HTMLViewSourceDocument::createContainingTable()
// Create a line gutter div that can be used to make sure the gutter extends down the height of the whole
// document.
RefPtrWillBeRawPtr<HTMLDivElement> div = HTMLDivElement::create(*this);
- div->setAttribute(classAttr, "webkit-line-gutter-backdrop");
+ div->setAttribute(classAttr, "line-gutter-backdrop");
body->parserAppendChild(div);
RefPtrWillBeRawPtr<HTMLTableElement> table = HTMLTableElement::create(*this);
@@ -122,22 +122,22 @@ void HTMLViewSourceDocument::addSource(const String& source, HTMLToken& token, S
void HTMLViewSourceDocument::processDoctypeToken(const String& source, HTMLToken&)
{
- m_current = addSpanWithClassName("webkit-html-doctype");
- addText(source, "webkit-html-doctype");
+ m_current = addSpanWithClassName("html-doctype");
+ addText(source, "html-doctype");
m_current = m_td;
}
void HTMLViewSourceDocument::processEndOfFileToken(const String& source, HTMLToken&)
{
- m_current = addSpanWithClassName("webkit-html-end-of-file");
- addText(source, "webkit-html-end-of-file");
+ m_current = addSpanWithClassName("html-end-of-file");
+ addText(source, "html-end-of-file");
m_current = m_td;
}
void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& token, SourceAnnotation annotation)
{
maybeAddSpanForAnnotation(annotation);
- m_current = addSpanWithClassName("webkit-html-tag");
+ m_current = addSpanWithClassName("html-tag");
AtomicString tagName(token.name());
@@ -155,7 +155,7 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to
AtomicString value(StringImpl::create8BitIfPossible(iter->value));
index = addRange(source, index, iter->nameRange.start - token.startIndex(), emptyAtom);
- index = addRange(source, index, iter->nameRange.end - token.startIndex(), "webkit-html-attribute-name");
+ index = addRange(source, index, iter->nameRange.end - token.startIndex(), "html-attribute-name");
if (tagName == baseTag && name == hrefAttr)
addBase(value);
@@ -163,7 +163,7 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to
index = addRange(source, index, iter->valueRange.start - token.startIndex(), emptyAtom);
bool isLink = name == srcAttr || name == hrefAttr;
- index = addRange(source, index, iter->valueRange.end - token.startIndex(), "webkit-html-attribute-value", isLink, tagName == aTag, value);
+ index = addRange(source, index, iter->valueRange.end - token.startIndex(), "html-attribute-value", isLink, tagName == aTag, value);
++iter;
}
@@ -172,8 +172,8 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to
void HTMLViewSourceDocument::processCommentToken(const String& source, HTMLToken&)
{
- m_current = addSpanWithClassName("webkit-html-comment");
- addText(source, "webkit-html-comment");
+ m_current = addSpanWithClassName("html-comment");
+ addText(source, "html-comment");
m_current = m_td;
}
@@ -203,20 +203,20 @@ void HTMLViewSourceDocument::addLine(const AtomicString& className)
// Create a cell that will hold the line number (it is generated in the stylesheet using counters).
RefPtrWillBeRawPtr<HTMLTableCellElement> td = HTMLTableCellElement::create(tdTag, *this);
- td->setAttribute(classAttr, "webkit-line-number");
+ td->setAttribute(classAttr, "line-number");
td->setIntegralAttribute(valueAttr, ++m_lineNumber);
trow->parserAppendChild(td);
// Create a second cell for the line contents
td = HTMLTableCellElement::create(tdTag, *this);
- td->setAttribute(classAttr, "webkit-line-content");
+ td->setAttribute(classAttr, "line-content");
trow->parserAppendChild(td);
m_current = m_td = td;
// Open up the needed spans.
if (!className.isEmpty()) {
- if (className == "webkit-html-attribute-name" || className == "webkit-html-attribute-value")
- m_current = addSpanWithClassName("webkit-html-tag");
+ if (className == "html-attribute-name" || className == "html-attribute-value")
+ m_current = addSpanWithClassName("html-tag");
m_current = addSpanWithClassName(className);
}
}
@@ -288,15 +288,15 @@ PassRefPtrWillBeRawPtr<Element> HTMLViewSourceDocument::addBase(const AtomicStri
PassRefPtrWillBeRawPtr<Element> HTMLViewSourceDocument::addLink(const AtomicString& url, bool isAnchor)
{
if (m_current == m_tbody)
- addLine("webkit-html-tag");
+ addLine("html-tag");
// Now create a link for the attribute value instead of a span.
RefPtrWillBeRawPtr<HTMLAnchorElement> anchor = HTMLAnchorElement::create(*this);
const char* classValue;
if (isAnchor)
- classValue = "webkit-html-attribute-value webkit-html-external-link";
+ classValue = "html-attribute-value html-external-link";
else
- classValue = "webkit-html-attribute-value webkit-html-resource-link";
+ classValue = "html-attribute-value html-resource-link";
anchor->setAttribute(classAttr, classValue);
anchor->setAttribute(targetAttr, "_blank");
anchor->setAttribute(hrefAttr, url);
@@ -307,7 +307,7 @@ PassRefPtrWillBeRawPtr<Element> HTMLViewSourceDocument::addLink(const AtomicStri
void HTMLViewSourceDocument::maybeAddSpanForAnnotation(SourceAnnotation annotation)
{
if (annotation == AnnotateSourceAsXSS) {
- m_current = addSpanWithClassName("webkit-highlight");
+ m_current = addSpanWithClassName("highlight");
m_current->setAttribute(titleAttr, kXSSDetected);
}
}
« no previous file with comments | « Source/core/css/view-source.css ('k') | Source/core/inspector/InspectorOverlayPage.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698