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

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

Issue 301813002: Highlight relfected XSS vectors in view-source page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLViewSourceDocument.h
diff --git a/Source/core/html/HTMLViewSourceDocument.h b/Source/core/html/HTMLViewSourceDocument.h
index 76595a26d65b07c56bbf39f251c305d00a1f195a..014e92b4770e09e770e81a9f7d6bd40925e5495c 100644
--- a/Source/core/html/HTMLViewSourceDocument.h
+++ b/Source/core/html/HTMLViewSourceDocument.h
@@ -40,7 +40,7 @@ public:
return adoptRefWillBeRefCountedGarbageCollected(new HTMLViewSourceDocument(initializer, mimeType));
}
- void addSource(const String&, HTMLToken&);
+ void addSource(const String&, HTMLToken&, bool dangerous);
Mike West 2014/05/29 09:29:48 Nit: Would you mind changing |dangerous| here and
virtual void trace(Visitor*) OVERRIDE;
@@ -51,15 +51,15 @@ private:
void processDoctypeToken(const String& source, HTMLToken&);
void processEndOfFileToken(const String& source, HTMLToken&);
- void processTagToken(const String& source, HTMLToken&);
+ void processTagToken(const String& source, HTMLToken&, bool highlight);
eseidel 2014/05/29 14:28:11 All of these bools are hard to read at callsites:
jww 2014/05/29 18:35:01 Just as a further thought that I could see future
void processCommentToken(const String& source, HTMLToken&);
- void processCharacterToken(const String& source, HTMLToken&);
+ void processCharacterToken(const String& source, HTMLToken&, bool highlight);
void createContainingTable();
PassRefPtr<Element> addSpanWithClassName(const AtomicString&);
void addLine(const AtomicString& className);
void finishLine();
- void addText(const String& text, const AtomicString& className);
+ void addText(const String& text, const AtomicString& className, bool highlight = false);
int addRange(const String& source, int start, int end, const AtomicString& className, bool isLink = false, bool isAnchor = false, const AtomicString& link = nullAtom);
PassRefPtr<Element> addLink(const AtomicString& url, bool isAnchor);
PassRefPtr<Element> addBase(const AtomicString& href);

Powered by Google App Engine
This is Rietveld 408576698