| 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 4927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4938 layoutViewItem().mutableStyleRef().setRtlOrdering( | 4938 layoutViewItem().mutableStyleRef().setRtlOrdering( |
| 4939 m_visuallyOrdered ? EOrder::kVisual : EOrder::kLogical); | 4939 m_visuallyOrdered ? EOrder::kVisual : EOrder::kLogical); |
| 4940 } | 4940 } |
| 4941 setNeedsStyleRecalc(SubtreeStyleChange, | 4941 setNeedsStyleRecalc(SubtreeStyleChange, |
| 4942 StyleChangeReasonForTracing::create( | 4942 StyleChangeReasonForTracing::create( |
| 4943 StyleChangeReason::VisuallyOrdered)); | 4943 StyleChangeReason::VisuallyOrdered)); |
| 4944 } | 4944 } |
| 4945 } | 4945 } |
| 4946 | 4946 |
| 4947 KURL Document::completeURL(const String& url) const { | 4947 KURL Document::completeURL(const String& url) const { |
| 4948 String trimmed = url.stripWhiteSpace(); |
| 4949 bool newline = trimmed.contains('\n') || trimmed.contains('\r'); |
| 4950 bool brace = trimmed.contains('<'); |
| 4951 if (newline) |
| 4952 UseCounter::count(*this, UseCounter::DocumentCompleteURLContainingNewline); |
| 4953 if (brace) { |
| 4954 UseCounter::count(*this, |
| 4955 UseCounter::DocumentCompleteURLContainingOpenBrace); |
| 4956 } |
| 4957 if (newline && brace) { |
| 4958 UseCounter::count( |
| 4959 *this, UseCounter::DocumentCompleteURLContainingNewlineAndOpenBrace); |
| 4960 } |
| 4948 return completeURLWithOverride(url, m_baseURL); | 4961 return completeURLWithOverride(url, m_baseURL); |
| 4949 } | 4962 } |
| 4950 | 4963 |
| 4951 KURL Document::completeURLWithOverride(const String& url, | 4964 KURL Document::completeURLWithOverride(const String& url, |
| 4952 const KURL& baseURLOverride) const { | 4965 const KURL& baseURLOverride) const { |
| 4953 DCHECK(baseURLOverride.isEmpty() || baseURLOverride.isValid()); | 4966 DCHECK(baseURLOverride.isEmpty() || baseURLOverride.isValid()); |
| 4954 | 4967 |
| 4955 // Always return a null URL when passed a null string. | 4968 // Always return a null URL when passed a null string. |
| 4956 // FIXME: Should we change the KURL constructor to have this behavior? | 4969 // FIXME: Should we change the KURL constructor to have this behavior? |
| 4957 // See also [CSS]StyleSheet::completeURL(const String&) | 4970 // See also [CSS]StyleSheet::completeURL(const String&) |
| (...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6505 } | 6518 } |
| 6506 | 6519 |
| 6507 void showLiveDocumentInstances() { | 6520 void showLiveDocumentInstances() { |
| 6508 WeakDocumentSet& set = liveDocumentSet(); | 6521 WeakDocumentSet& set = liveDocumentSet(); |
| 6509 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6522 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6510 for (Document* document : set) | 6523 for (Document* document : set) |
| 6511 fprintf(stderr, "- Document %p URL: %s\n", document, | 6524 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6512 document->url().getString().utf8().data()); | 6525 document->url().getString().utf8().data()); |
| 6513 } | 6526 } |
| 6514 #endif | 6527 #endif |
| OLD | NEW |