OLD | NEW |
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 next = NodeTraversal::next(node, dialog); | 57 next = NodeTraversal::next(node, dialog); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 static void inertSubtreesChanged(Document& document) | 61 static void inertSubtreesChanged(Document& document) |
62 { | 62 { |
63 if (AXObjectCache* cache = document.existingAXObjectCache()) | 63 if (AXObjectCache* cache = document.existingAXObjectCache()) |
64 cache->handleInertSubtreesChanged(); | 64 cache->handleInertSubtreesChanged(); |
65 } | 65 } |
66 | 66 |
67 HTMLDialogElement::HTMLDialogElement(const QualifiedName& tagName, Document& doc
ument) | 67 HTMLDialogElement::HTMLDialogElement(Document& document) |
68 : HTMLElement(tagName, document) | 68 : HTMLElement(dialogTag, document) |
69 , m_centeringMode(Uninitialized) | 69 , m_centeringMode(Uninitialized) |
70 , m_centeredPosition(0) | 70 , m_centeredPosition(0) |
71 , m_returnValue("") | 71 , m_returnValue("") |
72 { | 72 { |
73 ASSERT(hasTagName(dialogTag)); | |
74 ScriptWrappable::init(this); | 73 ScriptWrappable::init(this); |
75 } | 74 } |
76 | 75 |
77 PassRefPtr<HTMLDialogElement> HTMLDialogElement::create(const QualifiedName& tag
Name, Document& document) | 76 PassRefPtr<HTMLDialogElement> HTMLDialogElement::create(Document& document) |
78 { | 77 { |
79 return adoptRef(new HTMLDialogElement(tagName, document)); | 78 return adoptRef(new HTMLDialogElement(document)); |
80 } | 79 } |
81 | 80 |
82 void HTMLDialogElement::close(const String& returnValue, ExceptionState& es) | 81 void HTMLDialogElement::close(const String& returnValue, ExceptionState& es) |
83 { | 82 { |
84 if (!fastHasAttribute(openAttr)) { | 83 if (!fastHasAttribute(openAttr)) { |
85 es.throwUninformativeAndGenericDOMException(InvalidStateError); | 84 es.throwUninformativeAndGenericDOMException(InvalidStateError); |
86 return; | 85 return; |
87 } | 86 } |
88 closeDialog(returnValue); | 87 closeDialog(returnValue); |
89 } | 88 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 168 } |
170 | 169 |
171 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty
le) const | 170 bool HTMLDialogElement::shouldBeReparentedUnderRenderView(const RenderStyle* sty
le) const |
172 { | 171 { |
173 if (style && style->position() == AbsolutePosition) | 172 if (style && style->position() == AbsolutePosition) |
174 return true; | 173 return true; |
175 return Element::shouldBeReparentedUnderRenderView(style); | 174 return Element::shouldBeReparentedUnderRenderView(style); |
176 } | 175 } |
177 | 176 |
178 } // namespace WebCore | 177 } // namespace WebCore |
OLD | NEW |