| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 void HTMLDialogElement::removedFrom(ContainerNode* insertionPoint) | 171 void HTMLDialogElement::removedFrom(ContainerNode* insertionPoint) |
| 172 { | 172 { |
| 173 HTMLElement::removedFrom(insertionPoint); | 173 HTMLElement::removedFrom(insertionPoint); |
| 174 setNotCentered(); | 174 setNotCentered(); |
| 175 // FIXME: We should call inertSubtreesChanged() here. | 175 // FIXME: We should call inertSubtreesChanged() here. |
| 176 } | 176 } |
| 177 | 177 |
| 178 void HTMLDialogElement::setCentered(LayoutUnit centeredPosition) | 178 void HTMLDialogElement::setCentered(LayoutUnit centeredPosition) |
| 179 { | 179 { |
| 180 ASSERT(m_centeringMode == NeedsCentering); | 180 DCHECK_EQ(m_centeringMode, NeedsCentering); |
| 181 m_centeredPosition = centeredPosition; | 181 m_centeredPosition = centeredPosition; |
| 182 m_centeringMode = Centered; | 182 m_centeringMode = Centered; |
| 183 } | 183 } |
| 184 | 184 |
| 185 void HTMLDialogElement::setNotCentered() | 185 void HTMLDialogElement::setNotCentered() |
| 186 { | 186 { |
| 187 m_centeringMode = NotCentered; | 187 m_centeringMode = NotCentered; |
| 188 } | 188 } |
| 189 | 189 |
| 190 bool HTMLDialogElement::isPresentationAttribute(const QualifiedName& name) const | 190 bool HTMLDialogElement::isPresentationAttribute(const QualifiedName& name) const |
| (...skipping 10 matching lines...) Expand all Loading... |
| 201 { | 201 { |
| 202 if (event->type() == EventTypeNames::cancel) { | 202 if (event->type() == EventTypeNames::cancel) { |
| 203 closeDialog(); | 203 closeDialog(); |
| 204 event->setDefaultHandled(); | 204 event->setDefaultHandled(); |
| 205 return; | 205 return; |
| 206 } | 206 } |
| 207 HTMLElement::defaultEventHandler(event); | 207 HTMLElement::defaultEventHandler(event); |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace blink | 210 } // namespace blink |
| OLD | NEW |