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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2895953002: Update dangling markup mitigations. (Closed)
Patch Set: Test. Created 3 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: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 3677190d1c8f8ebce5e3064f6b484bb6947760f4..079eaaacb99805dee462cf192dda893cd4dba87d 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -5209,24 +5209,7 @@ void Document::SetEncodingData(const DocumentEncodingData& new_data) {
}
KURL Document::CompleteURL(const String& url) const {
- KURL completed = CompleteURLWithOverride(url, base_url_);
-
- if (completed.WhitespaceRemoved()) {
- if (completed.ProtocolIsInHTTPFamily()) {
- UseCounter::Count(*this,
- UseCounter::kDocumentCompleteURLHTTPContainingNewline);
- bool less_than = url.Contains('<');
- if (less_than) {
- UseCounter::Count(
- *this,
- UseCounter::kDocumentCompleteURLHTTPContainingNewlineAndLessThan);
- }
- } else {
- UseCounter::Count(
- *this, UseCounter::kDocumentCompleteURLNonHTTPContainingNewline);
- }
- }
- return completed;
+ return CompleteURLWithOverride(url, base_url_);
}
KURL Document::CompleteURLWithOverride(const String& url,

Powered by Google App Engine
This is Rietveld 408576698