Chromium Code Reviews| Index: Source/core/html/HTMLDialogElement.cpp |
| diff --git a/Source/core/html/HTMLDialogElement.cpp b/Source/core/html/HTMLDialogElement.cpp |
| index bb8952226746c71671082f012ccf8bb355c19bbb..485e63862c09b15f2d7b51c72255ab249bfce820 100644 |
| --- a/Source/core/html/HTMLDialogElement.cpp |
| +++ b/Source/core/html/HTMLDialogElement.cpp |
| @@ -94,6 +94,7 @@ HTMLDialogElement::HTMLDialogElement(Document& document) |
| , m_centeringMode(Uninitialized) |
| , m_centeredPosition(0) |
| , m_returnValue("") |
| + , m_modal(false) |
| { |
| ScriptWrappable::init(this); |
| } |
| @@ -112,6 +113,12 @@ void HTMLDialogElement::close(const String& returnValue, ExceptionState& excepti |
| closeDialog(returnValue); |
| } |
| +void HTMLDialogElement::removedFrom(ContainerNode* insertionPoint) |
| +{ |
| + m_modal = false; |
|
esprehn
2014/01/23 18:44:58
What calls inertSubtreesChanged(document()) when y
falken
2014/01/24 01:50:44
Oh great point. This is an existing bug, we won't
|
| + HTMLElement::removedFrom(insertionPoint); |
| +} |
| + |
| void HTMLDialogElement::closeDialog(const String& returnValue) |
| { |
| if (!fastHasAttribute(openAttr)) |
| @@ -119,6 +126,7 @@ void HTMLDialogElement::closeDialog(const String& returnValue) |
| setBooleanAttribute(openAttr, false); |
| HTMLDialogElement* activeModalDialog = document().activeModalDialog(); |
| + m_modal = false; |
| document().removeFromTopLayer(this); |
| if (activeModalDialog == this) |
| inertSubtreesChanged(document()); |
| @@ -156,6 +164,7 @@ void HTMLDialogElement::showModal(ExceptionState& exceptionState) |
| return; |
| } |
| + m_modal = true; |
| document().addToTopLayer(this); |
| setBooleanAttribute(openAttr, true); |