| 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 5693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5704 if (frame()) | 5704 if (frame()) |
| 5705 frame()->loader().client()->didUpdateToUniqueOrigin(); | 5705 frame()->loader().client()->didUpdateToUniqueOrigin(); |
| 5706 } | 5706 } |
| 5707 } | 5707 } |
| 5708 | 5708 |
| 5709 void Document::updateSecurityOrigin(PassRefPtr<SecurityOrigin> origin) { | 5709 void Document::updateSecurityOrigin(PassRefPtr<SecurityOrigin> origin) { |
| 5710 setSecurityOrigin(std::move(origin)); | 5710 setSecurityOrigin(std::move(origin)); |
| 5711 didUpdateSecurityOrigin(); | 5711 didUpdateSecurityOrigin(); |
| 5712 } | 5712 } |
| 5713 | 5713 |
| 5714 String Document::origin() const { |
| 5715 return getSecurityOrigin()->toString(); |
| 5716 } |
| 5717 |
| 5718 String Document::suborigin() const { |
| 5719 return getSecurityOrigin()->hasSuborigin() |
| 5720 ? getSecurityOrigin()->suborigin()->name() |
| 5721 : String(); |
| 5722 } |
| 5723 |
| 5714 void Document::didUpdateSecurityOrigin() { | 5724 void Document::didUpdateSecurityOrigin() { |
| 5715 if (!m_frame) | 5725 if (!m_frame) |
| 5716 return; | 5726 return; |
| 5717 m_frame->script().updateSecurityOrigin(getSecurityOrigin()); | 5727 m_frame->script().updateSecurityOrigin(getSecurityOrigin()); |
| 5718 } | 5728 } |
| 5719 | 5729 |
| 5720 bool Document::isContextThread() const { | 5730 bool Document::isContextThread() const { |
| 5721 return isMainThread(); | 5731 return isMainThread(); |
| 5722 } | 5732 } |
| 5723 | 5733 |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6668 } | 6678 } |
| 6669 | 6679 |
| 6670 void showLiveDocumentInstances() { | 6680 void showLiveDocumentInstances() { |
| 6671 WeakDocumentSet& set = liveDocumentSet(); | 6681 WeakDocumentSet& set = liveDocumentSet(); |
| 6672 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6682 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6673 for (blink::Document* document : set) | 6683 for (blink::Document* document : set) |
| 6674 fprintf(stderr, "- Document %p URL: %s\n", document, | 6684 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6675 document->url().getString().utf8().data()); | 6685 document->url().getString().utf8().data()); |
| 6676 } | 6686 } |
| 6677 #endif | 6687 #endif |
| OLD | NEW |