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

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

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/DecodedDataDocumentParser.cpp ('k') | Source/core/dom/MessagePort.cpp » ('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 r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 1308
1309 void Document::setTitle(const String& title) 1309 void Document::setTitle(const String& title)
1310 { 1310 {
1311 // Title set by JavaScript -- overrides any title elements. 1311 // Title set by JavaScript -- overrides any title elements.
1312 m_titleSetExplicitly = true; 1312 m_titleSetExplicitly = true;
1313 if (!isHTMLDocument() && !isXHTMLDocument()) 1313 if (!isHTMLDocument() && !isXHTMLDocument())
1314 m_titleElement = 0; 1314 m_titleElement = 0;
1315 else if (!m_titleElement) { 1315 else if (!m_titleElement) {
1316 if (HTMLElement* headElement = head()) { 1316 if (HTMLElement* headElement = head()) {
1317 m_titleElement = createElement(titleTag, false); 1317 m_titleElement = createElement(titleTag, false);
1318 headElement->appendChild(m_titleElement, ASSERT_NO_EXCEPTION_STATE, AttachLazily); 1318 headElement->appendChild(m_titleElement, ASSERT_NO_EXCEPTION, Attach Lazily);
1319 } 1319 }
1320 } 1320 }
1321 1321
1322 // The DOM API has no method of specifying direction, so assume LTR. 1322 // The DOM API has no method of specifying direction, so assume LTR.
1323 updateTitle(StringWithDirection(title, LTR)); 1323 updateTitle(StringWithDirection(title, LTR));
1324 1324
1325 if (m_titleElement) { 1325 if (m_titleElement) {
1326 ASSERT(isHTMLTitleElement(m_titleElement.get())); 1326 ASSERT(isHTMLTitleElement(m_titleElement.get()));
1327 if (isHTMLTitleElement(m_titleElement.get())) 1327 if (isHTMLTitleElement(m_titleElement.get()))
1328 toHTMLTitleElement(m_titleElement.get())->setText(title); 1328 toHTMLTitleElement(m_titleElement.get())->setText(title);
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 } 2717 }
2718 } 2718 }
2719 2719
2720 void Document::processHttpEquivSetCookie(const String& content) 2720 void Document::processHttpEquivSetCookie(const String& content)
2721 { 2721 {
2722 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me ta .....> 2722 // FIXME: make setCookie work on XML documents too; e.g. in case of <html:me ta .....>
2723 if (!isHTMLDocument()) 2723 if (!isHTMLDocument())
2724 return; 2724 return;
2725 2725
2726 // Exception (for sandboxed documents) ignored. 2726 // Exception (for sandboxed documents) ignored.
2727 toHTMLDocument(this)->setCookie(content, IGNORE_EXCEPTION_STATE); 2727 toHTMLDocument(this)->setCookie(content, IGNORE_EXCEPTION);
2728 } 2728 }
2729 2729
2730 void Document::processHttpEquivXFrameOptions(const String& content) 2730 void Document::processHttpEquivXFrameOptions(const String& content)
2731 { 2731 {
2732 Frame* frame = this->frame(); 2732 Frame* frame = this->frame();
2733 if (!frame) 2733 if (!frame)
2734 return; 2734 return;
2735 2735
2736 FrameLoader* frameLoader = frame->loader(); 2736 FrameLoader* frameLoader = frame->loader();
2737 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); 2737 unsigned long requestIdentifier = loader()->mainResourceIdentifier();
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
5112 { 5112 {
5113 return DocumentLifecycleNotifier::create(this); 5113 return DocumentLifecycleNotifier::create(this);
5114 } 5114 }
5115 5115
5116 DocumentLifecycleNotifier* Document::lifecycleNotifier() 5116 DocumentLifecycleNotifier* Document::lifecycleNotifier()
5117 { 5117 {
5118 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier()); 5118 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec ycleNotifier());
5119 } 5119 }
5120 5120
5121 } // namespace WebCore 5121 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/DecodedDataDocumentParser.cpp ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698