| 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 4634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4645 "'" + newDomain + "' is not a suffix of '" + domain() + "'."); | 4645 "'" + newDomain + "' is not a suffix of '" + domain() + "'."); |
| 4646 return; | 4646 return; |
| 4647 } | 4647 } |
| 4648 | 4648 |
| 4649 if (result == OriginAccessEntry::MatchesOriginButIsPublicSuffix) { | 4649 if (result == OriginAccessEntry::MatchesOriginButIsPublicSuffix) { |
| 4650 exceptionState.throwSecurityError("'" + newDomain + | 4650 exceptionState.throwSecurityError("'" + newDomain + |
| 4651 "' is a top-level domain."); | 4651 "' is a top-level domain."); |
| 4652 return; | 4652 return; |
| 4653 } | 4653 } |
| 4654 | 4654 |
| 4655 bool wasCrossDomain = m_frame->isCrossOriginSubframe(); |
| 4655 getSecurityOrigin()->setDomainFromDOM(newDomain); | 4656 getSecurityOrigin()->setDomainFromDOM(newDomain); |
| 4657 if (view() && (wasCrossDomain != m_frame->isCrossOriginSubframe())) |
| 4658 view()->crossOriginStatusChanged(); |
| 4659 |
| 4656 if (m_frame) | 4660 if (m_frame) |
| 4657 m_frame->script().updateSecurityOrigin(getSecurityOrigin()); | 4661 m_frame->script().updateSecurityOrigin(getSecurityOrigin()); |
| 4658 } | 4662 } |
| 4659 | 4663 |
| 4660 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified | 4664 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified |
| 4661 String Document::lastModified() const { | 4665 String Document::lastModified() const { |
| 4662 DateComponents date; | 4666 DateComponents date; |
| 4663 bool foundDate = false; | 4667 bool foundDate = false; |
| 4664 if (m_frame) { | 4668 if (m_frame) { |
| 4665 if (DocumentLoader* documentLoader = loader()) { | 4669 if (DocumentLoader* documentLoader = loader()) { |
| (...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6588 } | 6592 } |
| 6589 | 6593 |
| 6590 void showLiveDocumentInstances() { | 6594 void showLiveDocumentInstances() { |
| 6591 WeakDocumentSet& set = liveDocumentSet(); | 6595 WeakDocumentSet& set = liveDocumentSet(); |
| 6592 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6596 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6593 for (blink::Document* document : set) | 6597 for (blink::Document* document : set) |
| 6594 fprintf(stderr, "- Document %p URL: %s\n", document, | 6598 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6595 document->url().getString().utf8().data()); | 6599 document->url().getString().utf8().data()); |
| 6596 } | 6600 } |
| 6597 #endif | 6601 #endif |
| OLD | NEW |