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

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

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hack for XML prefix Created 7 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 | Annotate | Revision Log
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return; 50 return;
51 } 51 }
52 } 52 }
53 if (node->hasTagName(dialogTag)) 53 if (node->hasTagName(dialogTag))
54 next = NodeTraversal::nextSkippingChildren(node, dialog); 54 next = NodeTraversal::nextSkippingChildren(node, dialog);
55 else 55 else
56 next = NodeTraversal::next(node, dialog); 56 next = NodeTraversal::next(node, dialog);
57 } 57 }
58 } 58 }
59 59
60 HTMLDialogElement::HTMLDialogElement(const QualifiedName& tagName, Document& doc ument) 60 HTMLDialogElement::HTMLDialogElement(Document& document)
61 : HTMLElement(tagName, document) 61 : HTMLElement(dialogTag, document)
62 , m_centeringMode(Uninitialized) 62 , m_centeringMode(Uninitialized)
63 , m_centeredPosition(0) 63 , m_centeredPosition(0)
64 , m_returnValue("") 64 , m_returnValue("")
65 { 65 {
66 ASSERT(hasTagName(dialogTag));
67 ScriptWrappable::init(this); 66 ScriptWrappable::init(this);
68 } 67 }
69 68
70 PassRefPtr<HTMLDialogElement> HTMLDialogElement::create(const QualifiedName& tag Name, Document& document) 69 PassRefPtr<HTMLDialogElement> HTMLDialogElement::create(Document& document)
71 { 70 {
72 return adoptRef(new HTMLDialogElement(tagName, document)); 71 return adoptRef(new HTMLDialogElement(document));
73 } 72 }
74 73
75 void HTMLDialogElement::close(const String& returnValue, ExceptionState& es) 74 void HTMLDialogElement::close(const String& returnValue, ExceptionState& es)
76 { 75 {
77 if (!fastHasAttribute(openAttr)) { 76 if (!fastHasAttribute(openAttr)) {
78 es.throwUninformativeAndGenericDOMException(InvalidStateError); 77 es.throwUninformativeAndGenericDOMException(InvalidStateError);
79 return; 78 return;
80 } 79 }
81 closeDialog(returnValue); 80 closeDialog(returnValue);
82 } 81 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 156 }
158 157
159 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const 158 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty le) const
160 { 159 {
161 if (style && style->position() == AbsolutePosition) 160 if (style && style->position() == AbsolutePosition)
162 return true; 161 return true;
163 return Element::shouldBeReparentedUnderRenderView(style); 162 return Element::shouldBeReparentedUnderRenderView(style);
164 } 163 }
165 164
166 } // namespace WebCore 165 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698