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

Side by Side Diff: Source/core/html/HTMLDialogElement.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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/html/HTMLDetailsElement.cpp ('k') | Source/core/html/HTMLDirectoryElement.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 if (AXObjectCache* cache = topDocument.axObjectCache()) 90 if (AXObjectCache* cache = topDocument.axObjectCache())
91 cache->childrenChanged(cache->getOrCreate(&topDocument)); 91 cache->childrenChanged(cache->getOrCreate(&topDocument));
92 } 92 }
93 93
94 inline HTMLDialogElement::HTMLDialogElement(Document& document) 94 inline HTMLDialogElement::HTMLDialogElement(Document& document)
95 : HTMLElement(dialogTag, document) 95 : HTMLElement(dialogTag, document)
96 , m_centeringMode(NotCentered) 96 , m_centeringMode(NotCentered)
97 , m_centeredPosition(0) 97 , m_centeredPosition(0)
98 , m_returnValue("") 98 , m_returnValue("")
99 { 99 {
100 ScriptWrappable::init(this);
101 UseCounter::count(document, UseCounter::DialogElement); 100 UseCounter::count(document, UseCounter::DialogElement);
102 } 101 }
103 102
104 DEFINE_NODE_FACTORY(HTMLDialogElement) 103 DEFINE_NODE_FACTORY(HTMLDialogElement)
105 104
106 void HTMLDialogElement::close(const String& returnValue, ExceptionState& excepti onState) 105 void HTMLDialogElement::close(const String& returnValue, ExceptionState& excepti onState)
107 { 106 {
108 if (!fastHasAttribute(openAttr)) { 107 if (!fastHasAttribute(openAttr)) {
109 exceptionState.throwDOMException(InvalidStateError, "The element does no t have an 'open' attribute, and therefore cannot be closed."); 108 exceptionState.throwDOMException(InvalidStateError, "The element does no t have an 'open' attribute, and therefore cannot be closed.");
110 return; 109 return;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 { 198 {
200 if (event->type() == EventTypeNames::cancel) { 199 if (event->type() == EventTypeNames::cancel) {
201 closeDialog(); 200 closeDialog();
202 event->setDefaultHandled(); 201 event->setDefaultHandled();
203 return; 202 return;
204 } 203 }
205 HTMLElement::defaultEventHandler(event); 204 HTMLElement::defaultEventHandler(event);
206 } 205 }
207 206
208 } // namespace blink 207 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLDetailsElement.cpp ('k') | Source/core/html/HTMLDirectoryElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698