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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1444493002: Fix hard-coding of "about:srcdoc" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 } 1447 }
1448 } 1448 }
1449 1449
1450 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const 1450 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const
1451 { 1451 {
1452 return m_currentItem && url == m_currentItem->url(); 1452 return m_currentItem && url == m_currentItem->url();
1453 } 1453 }
1454 1454
1455 bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const 1455 bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const
1456 { 1456 {
1457 if (!equalIgnoringCase(url.string(), "about:srcdoc")) 1457 if (!url.isAboutSrcdocURL())
1458 return false; 1458 return false;
1459 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner(); 1459 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
1460 if (!isHTMLIFrameElement(ownerElement)) 1460 if (!isHTMLIFrameElement(ownerElement))
1461 return false; 1461 return false;
1462 return ownerElement->fastHasAttribute(srcdocAttr); 1462 return ownerElement->fastHasAttribute(srcdocAttr);
1463 } 1463 }
1464 1464
1465 void FrameLoader::dispatchDocumentElementAvailable() 1465 void FrameLoader::dispatchDocumentElementAvailable()
1466 { 1466 {
1467 client()->documentElementAvailable(); 1467 client()->documentElementAvailable();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 // FIXME: We need a way to propagate insecure requests policy flags to 1546 // FIXME: We need a way to propagate insecure requests policy flags to
1547 // out-of-process frames. For now, we'll always use default behavior. 1547 // out-of-process frames. For now, we'll always use default behavior.
1548 if (!parentFrame->isLocalFrame()) 1548 if (!parentFrame->isLocalFrame())
1549 return nullptr; 1549 return nullptr;
1550 1550
1551 ASSERT(toLocalFrame(parentFrame)->document()); 1551 ASSERT(toLocalFrame(parentFrame)->document());
1552 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1552 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1553 } 1553 }
1554 1554
1555 } // namespace blink 1555 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameElementBase.cpp ('k') | third_party/WebKit/Source/platform/weborigin/KURL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698