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

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

Issue 1611523002: Require the entry document to have the same origin as the open()d document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 Document& axObjectCacheOwner() const; 465 Document& axObjectCacheOwner() const;
466 AXObjectCache* existingAXObjectCache() const; 466 AXObjectCache* existingAXObjectCache() const;
467 AXObjectCache* axObjectCache() const; 467 AXObjectCache* axObjectCache() const;
468 void clearAXObjectCache(); 468 void clearAXObjectCache();
469 469
470 // to get visually ordered hebrew and arabic pages right 470 // to get visually ordered hebrew and arabic pages right
471 bool visuallyOrdered() const { return m_visuallyOrdered; } 471 bool visuallyOrdered() const { return m_visuallyOrdered; }
472 472
473 DocumentLoader* loader() const; 473 DocumentLoader* loader() const;
474 474
475 // This is the DOM API document.open() 475 // This is the DOM API document.open(). enteredDocument is the responsible
476 void open(Document* ownerDocument, ExceptionState&); 476 // document of the entry settings object.
477 void open(Document* enteredDocument, ExceptionState&);
477 // This is used internally and does not handle exceptions. 478 // This is used internally and does not handle exceptions.
478 void open(); 479 void open();
479 PassRefPtrWillBeRawPtr<DocumentParser> implicitOpen(ParserSynchronizationPol icy); 480 PassRefPtrWillBeRawPtr<DocumentParser> implicitOpen(ParserSynchronizationPol icy);
480 481
481 // This is the DOM API document.close() 482 // This is the DOM API document.close()
482 void close(ExceptionState&); 483 void close(ExceptionState&);
483 // This is used internally and does not handle exceptions. 484 // This is used internally and does not handle exceptions.
484 void close(); 485 void close();
485 // implicitClose() actually does the work of closing the input stream. 486 // implicitClose() actually does the work of closing the input stream.
486 void implicitClose(); 487 void implicitClose();
487 488
488 bool dispatchBeforeUnloadEvent(ChromeClient&, bool isReload, bool& didAllowN avigation); 489 bool dispatchBeforeUnloadEvent(ChromeClient&, bool isReload, bool& didAllowN avigation);
489 void dispatchUnloadEvents(); 490 void dispatchUnloadEvents();
490 491
491 enum PageDismissalType { 492 enum PageDismissalType {
492 NoDismissal = 0, 493 NoDismissal = 0,
493 BeforeUnloadDismissal = 1, 494 BeforeUnloadDismissal = 1,
494 PageHideDismissal = 2, 495 PageHideDismissal = 2,
495 UnloadDismissal = 3 496 UnloadDismissal = 3
496 }; 497 };
497 PageDismissalType pageDismissalEventBeingDispatched() const; 498 PageDismissalType pageDismissalEventBeingDispatched() const;
498 499
499 void cancelParsing(); 500 void cancelParsing();
500 501
501 void write(const SegmentedString& text, Document* ownerDocument = nullptr, E xceptionState& = ASSERT_NO_EXCEPTION); 502 void write(const SegmentedString& text, Document* enteredDocument = nullptr, ExceptionState& = ASSERT_NO_EXCEPTION);
502 void write(const String& text, Document* ownerDocument = nullptr, ExceptionS tate& = ASSERT_NO_EXCEPTION); 503 void write(const String& text, Document* enteredDocument = nullptr, Exceptio nState& = ASSERT_NO_EXCEPTION);
503 void writeln(const String& text, Document* ownerDocument = nullptr, Exceptio nState& = ASSERT_NO_EXCEPTION); 504 void writeln(const String& text, Document* enteredDocument = nullptr, Except ionState& = ASSERT_NO_EXCEPTION);
504 void write(LocalDOMWindow*, const Vector<String>& text, ExceptionState&); 505 void write(LocalDOMWindow*, const Vector<String>& text, ExceptionState&);
505 void writeln(LocalDOMWindow*, const Vector<String>& text, ExceptionState&); 506 void writeln(LocalDOMWindow*, const Vector<String>& text, ExceptionState&);
506 507
507 bool wellFormed() const { return m_wellFormed; } 508 bool wellFormed() const { return m_wellFormed; }
508 509
509 const KURL& url() const { return m_url; } 510 const KURL& url() const { return m_url; }
510 void setURL(const KURL&); 511 void setURL(const KURL&);
511 512
512 // To understand how these concepts relate to one another, please see the 513 // To understand how these concepts relate to one another, please see the
513 // comments surrounding their declaration. 514 // comments surrounding their declaration.
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1450 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1450 1451
1451 } // namespace blink 1452 } // namespace blink
1452 1453
1453 #ifndef NDEBUG 1454 #ifndef NDEBUG
1454 // Outside the WebCore namespace for ease of invocation from gdb. 1455 // Outside the WebCore namespace for ease of invocation from gdb.
1455 CORE_EXPORT void showLiveDocumentInstances(); 1456 CORE_EXPORT void showLiveDocumentInstances();
1456 #endif 1457 #endif
1457 1458
1458 #endif // Document_h 1459 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698