| 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 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3477 } | 3477 } |
| 3478 | 3478 |
| 3479 String Document::UserAgent() const { | 3479 String Document::UserAgent() const { |
| 3480 return GetFrame() ? GetFrame()->Loader().UserAgent() : String(); | 3480 return GetFrame() ? GetFrame()->Loader().UserAgent() : String(); |
| 3481 } | 3481 } |
| 3482 | 3482 |
| 3483 void Document::DisableEval(const String& error_message) { | 3483 void Document::DisableEval(const String& error_message) { |
| 3484 if (!GetFrame()) | 3484 if (!GetFrame()) |
| 3485 return; | 3485 return; |
| 3486 | 3486 |
| 3487 GetFrame()->Script().DisableEval(error_message); | 3487 GetFrame()->GetScriptController().DisableEval(error_message); |
| 3488 } | 3488 } |
| 3489 | 3489 |
| 3490 void Document::DidLoadAllImports() { | 3490 void Document::DidLoadAllImports() { |
| 3491 if (!HaveScriptBlockingStylesheetsLoaded()) | 3491 if (!HaveScriptBlockingStylesheetsLoaded()) |
| 3492 return; | 3492 return; |
| 3493 if (!ImportLoader()) | 3493 if (!ImportLoader()) |
| 3494 StyleResolverMayHaveChanged(); | 3494 StyleResolverMayHaveChanged(); |
| 3495 DidLoadAllScriptBlockingResources(); | 3495 DidLoadAllScriptBlockingResources(); |
| 3496 } | 3496 } |
| 3497 | 3497 |
| (...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4751 "' is a top-level domain."); | 4751 "' is a top-level domain."); |
| 4752 return; | 4752 return; |
| 4753 } | 4753 } |
| 4754 | 4754 |
| 4755 if (frame_) { | 4755 if (frame_) { |
| 4756 bool was_cross_domain = frame_->IsCrossOriginSubframe(); | 4756 bool was_cross_domain = frame_->IsCrossOriginSubframe(); |
| 4757 GetSecurityOrigin()->SetDomainFromDOM(new_domain); | 4757 GetSecurityOrigin()->SetDomainFromDOM(new_domain); |
| 4758 if (View() && (was_cross_domain != frame_->IsCrossOriginSubframe())) | 4758 if (View() && (was_cross_domain != frame_->IsCrossOriginSubframe())) |
| 4759 View()->CrossOriginStatusChanged(); | 4759 View()->CrossOriginStatusChanged(); |
| 4760 | 4760 |
| 4761 frame_->Script().UpdateSecurityOrigin(GetSecurityOrigin()); | 4761 frame_->GetScriptController().UpdateSecurityOrigin(GetSecurityOrigin()); |
| 4762 } | 4762 } |
| 4763 } | 4763 } |
| 4764 | 4764 |
| 4765 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified | 4765 // http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified |
| 4766 String Document::lastModified() const { | 4766 String Document::lastModified() const { |
| 4767 DateComponents date; | 4767 DateComponents date; |
| 4768 bool found_date = false; | 4768 bool found_date = false; |
| 4769 if (frame_) { | 4769 if (frame_) { |
| 4770 if (DocumentLoader* document_loader = Loader()) { | 4770 if (DocumentLoader* document_loader = Loader()) { |
| 4771 const AtomicString& http_last_modified = | 4771 const AtomicString& http_last_modified = |
| (...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5735 | 5735 |
| 5736 String Document::suborigin() const { | 5736 String Document::suborigin() const { |
| 5737 return GetSecurityOrigin()->HasSuborigin() | 5737 return GetSecurityOrigin()->HasSuborigin() |
| 5738 ? GetSecurityOrigin()->GetSuborigin()->GetName() | 5738 ? GetSecurityOrigin()->GetSuborigin()->GetName() |
| 5739 : String(); | 5739 : String(); |
| 5740 } | 5740 } |
| 5741 | 5741 |
| 5742 void Document::DidUpdateSecurityOrigin() { | 5742 void Document::DidUpdateSecurityOrigin() { |
| 5743 if (!frame_) | 5743 if (!frame_) |
| 5744 return; | 5744 return; |
| 5745 frame_->Script().UpdateSecurityOrigin(GetSecurityOrigin()); | 5745 frame_->GetScriptController().UpdateSecurityOrigin(GetSecurityOrigin()); |
| 5746 } | 5746 } |
| 5747 | 5747 |
| 5748 bool Document::IsContextThread() const { | 5748 bool Document::IsContextThread() const { |
| 5749 return IsMainThread(); | 5749 return IsMainThread(); |
| 5750 } | 5750 } |
| 5751 | 5751 |
| 5752 void Document::UpdateFocusAppearanceLater() { | 5752 void Document::UpdateFocusAppearanceLater() { |
| 5753 if (!update_focus_appearance_timer_.IsActive()) | 5753 if (!update_focus_appearance_timer_.IsActive()) |
| 5754 update_focus_appearance_timer_.StartOneShot(0, BLINK_FROM_HERE); | 5754 update_focus_appearance_timer_.StartOneShot(0, BLINK_FROM_HERE); |
| 5755 } | 5755 } |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6660 } | 6660 } |
| 6661 | 6661 |
| 6662 void showLiveDocumentInstances() { | 6662 void showLiveDocumentInstances() { |
| 6663 WeakDocumentSet& set = liveDocumentSet(); | 6663 WeakDocumentSet& set = liveDocumentSet(); |
| 6664 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6664 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6665 for (blink::Document* document : set) | 6665 for (blink::Document* document : set) |
| 6666 fprintf(stderr, "- Document %p URL: %s\n", document, | 6666 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6667 document->Url().GetString().Utf8().Data()); | 6667 document->Url().GetString().Utf8().Data()); |
| 6668 } | 6668 } |
| 6669 #endif | 6669 #endif |
| OLD | NEW |