Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2692993003: Invalidate throttling-related dirty bits when changing cross-origin status. (Closed)
Patch Set: none Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698