OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 5191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5202 GetLayoutViewItem().MutableStyleRef().SetRtlOrdering( | 5202 GetLayoutViewItem().MutableStyleRef().SetRtlOrdering( |
5203 visually_ordered_ ? EOrder::kVisual : EOrder::kLogical); | 5203 visually_ordered_ ? EOrder::kVisual : EOrder::kLogical); |
5204 } | 5204 } |
5205 SetNeedsStyleRecalc(kSubtreeStyleChange, | 5205 SetNeedsStyleRecalc(kSubtreeStyleChange, |
5206 StyleChangeReasonForTracing::Create( | 5206 StyleChangeReasonForTracing::Create( |
5207 StyleChangeReason::kVisuallyOrdered)); | 5207 StyleChangeReason::kVisuallyOrdered)); |
5208 } | 5208 } |
5209 } | 5209 } |
5210 | 5210 |
5211 KURL Document::CompleteURL(const String& url) const { | 5211 KURL Document::CompleteURL(const String& url) const { |
5212 KURL completed = CompleteURLWithOverride(url, base_url_); | 5212 return CompleteURLWithOverride(url, base_url_); |
5213 | |
5214 if (completed.WhitespaceRemoved()) { | |
5215 if (completed.ProtocolIsInHTTPFamily()) { | |
5216 UseCounter::Count(*this, | |
5217 UseCounter::kDocumentCompleteURLHTTPContainingNewline); | |
5218 bool less_than = url.Contains('<'); | |
5219 if (less_than) { | |
5220 UseCounter::Count( | |
5221 *this, | |
5222 UseCounter::kDocumentCompleteURLHTTPContainingNewlineAndLessThan); | |
5223 } | |
5224 } else { | |
5225 UseCounter::Count( | |
5226 *this, UseCounter::kDocumentCompleteURLNonHTTPContainingNewline); | |
5227 } | |
5228 } | |
5229 return completed; | |
5230 } | 5213 } |
5231 | 5214 |
5232 KURL Document::CompleteURLWithOverride(const String& url, | 5215 KURL Document::CompleteURLWithOverride(const String& url, |
5233 const KURL& base_url_override) const { | 5216 const KURL& base_url_override) const { |
5234 DCHECK(base_url_override.IsEmpty() || base_url_override.IsValid()); | 5217 DCHECK(base_url_override.IsEmpty() || base_url_override.IsValid()); |
5235 | 5218 |
5236 // Always return a null URL when passed a null string. | 5219 // Always return a null URL when passed a null string. |
5237 // FIXME: Should we change the KURL constructor to have this behavior? | 5220 // FIXME: Should we change the KURL constructor to have this behavior? |
5238 // See also [CSS]StyleSheet::completeURL(const String&) | 5221 // See also [CSS]StyleSheet::completeURL(const String&) |
5239 if (url.IsNull()) | 5222 if (url.IsNull()) |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6821 } | 6804 } |
6822 | 6805 |
6823 void showLiveDocumentInstances() { | 6806 void showLiveDocumentInstances() { |
6824 WeakDocumentSet& set = liveDocumentSet(); | 6807 WeakDocumentSet& set = liveDocumentSet(); |
6825 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6808 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6826 for (blink::Document* document : set) | 6809 for (blink::Document* document : set) |
6827 fprintf(stderr, "- Document %p URL: %s\n", document, | 6810 fprintf(stderr, "- Document %p URL: %s\n", document, |
6828 document->Url().GetString().Utf8().data()); | 6811 document->Url().GetString().Utf8().data()); |
6829 } | 6812 } |
6830 #endif | 6813 #endif |
OLD | NEW |