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

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 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 } 1451 }
1452 } 1452 }
1453 1453
1454 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const 1454 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const
1455 { 1455 {
1456 return m_currentItem && url == m_currentItem->url(); 1456 return m_currentItem && url == m_currentItem->url();
1457 } 1457 }
1458 1458
1459 bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const 1459 bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const
1460 { 1460 {
1461 if (!equalIgnoringCase(url.string(), "about:srcdoc")) 1461 if (!equalIgnoringCase(url, srcdocURL()))
Tom Sepez 2015/11/16 17:16:06 Shouldn't this be url.isAboutSrcDocUrl() ? We now
Xiaocheng 2015/11/17 05:25:47 Done.
1462 return false; 1462 return false;
1463 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner(); 1463 HTMLFrameOwnerElement* ownerElement = m_frame->deprecatedLocalOwner();
1464 if (!isHTMLIFrameElement(ownerElement)) 1464 if (!isHTMLIFrameElement(ownerElement))
1465 return false; 1465 return false;
1466 return ownerElement->fastHasAttribute(srcdocAttr); 1466 return ownerElement->fastHasAttribute(srcdocAttr);
1467 } 1467 }
1468 1468
1469 void FrameLoader::dispatchDocumentElementAvailable() 1469 void FrameLoader::dispatchDocumentElementAvailable()
1470 { 1470 {
1471 client()->documentElementAvailable(); 1471 client()->documentElementAvailable();
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 // FIXME: We need a way to propagate insecure requests policy flags to 1550 // FIXME: We need a way to propagate insecure requests policy flags to
1551 // out-of-process frames. For now, we'll always use default behavior. 1551 // out-of-process frames. For now, we'll always use default behavior.
1552 if (!parentFrame->isLocalFrame()) 1552 if (!parentFrame->isLocalFrame())
1553 return nullptr; 1553 return nullptr;
1554 1554
1555 ASSERT(toLocalFrame(parentFrame)->document()); 1555 ASSERT(toLocalFrame(parentFrame)->document());
1556 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ; 1556 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade() ;
1557 } 1557 }
1558 1558
1559 } // namespace blink 1559 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698