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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 setBooleanAttribute(openAttr, true); | 164 setBooleanAttribute(openAttr, true); |
165 | 165 |
166 // Throw away the AX cache first, so the subsequent steps don't have a chanc
e of queuing up | 166 // Throw away the AX cache first, so the subsequent steps don't have a chanc
e of queuing up |
167 // AX events on objects that would be invalidated when the cache is thrown a
way. | 167 // AX events on objects that would be invalidated when the cache is thrown a
way. |
168 inertSubtreesChanged(document()); | 168 inertSubtreesChanged(document()); |
169 | 169 |
170 forceLayoutForCentering(); | 170 forceLayoutForCentering(); |
171 setFocusForDialog(this); | 171 setFocusForDialog(this); |
172 } | 172 } |
173 | 173 |
174 void HTMLDialogElement::removedFrom(ContainerNode* insertionPoint) | 174 void HTMLDialogElement::removedFrom(ContainerNode* insertionPoint, Node* next) |
175 { | 175 { |
176 HTMLElement::removedFrom(insertionPoint); | 176 HTMLElement::removedFrom(insertionPoint, next); |
177 setNotCentered(); | 177 setNotCentered(); |
178 // FIXME: We should call inertSubtreesChanged() here. | 178 // FIXME: We should call inertSubtreesChanged() here. |
179 } | 179 } |
180 | 180 |
181 void HTMLDialogElement::setCentered(LayoutUnit centeredPosition) | 181 void HTMLDialogElement::setCentered(LayoutUnit centeredPosition) |
182 { | 182 { |
183 ASSERT(m_centeringMode == NeedsCentering); | 183 ASSERT(m_centeringMode == NeedsCentering); |
184 m_centeredPosition = centeredPosition; | 184 m_centeredPosition = centeredPosition; |
185 m_centeringMode = Centered; | 185 m_centeringMode = Centered; |
186 } | 186 } |
(...skipping 17 matching lines...) Expand all Loading... |
204 { | 204 { |
205 if (event->type() == EventTypeNames::cancel) { | 205 if (event->type() == EventTypeNames::cancel) { |
206 closeDialog(); | 206 closeDialog(); |
207 event->setDefaultHandled(); | 207 event->setDefaultHandled(); |
208 return; | 208 return; |
209 } | 209 } |
210 HTMLElement::defaultEventHandler(event); | 210 HTMLElement::defaultEventHandler(event); |
211 } | 211 } |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
OLD | NEW |