| 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 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 class HTMLDialogElement final : public HTMLElement { | 37 class HTMLDialogElement final : public HTMLElement { |
| 38 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
| 39 public: | 39 public: |
| 40 DECLARE_NODE_FACTORY(HTMLDialogElement); | 40 DECLARE_NODE_FACTORY(HTMLDialogElement); |
| 41 | 41 |
| 42 void close(const String& returnValue, ExceptionState&); | 42 void close(const String& returnValue, ExceptionState&); |
| 43 void closeDialog(const String& returnValue = String()); | 43 void closeDialog(const String& returnValue = String()); |
| 44 void show(); | 44 void show(); |
| 45 void showModal(ExceptionState&); | 45 void showModal(ExceptionState&); |
| 46 void removedFrom(ContainerNode*) override; | 46 void removedFrom(ContainerNode* insertionPoint, Node* next) override; |
| 47 | 47 |
| 48 // NotCentered means do not center the dialog. Centered means the dialog has | 48 // NotCentered means do not center the dialog. Centered means the dialog has |
| 49 // been centered and centeredPosition() is set. NeedsCentering means attempt | 49 // been centered and centeredPosition() is set. NeedsCentering means attempt |
| 50 // to center on the next layout, then set to Centered or NotCentered. | 50 // to center on the next layout, then set to Centered or NotCentered. |
| 51 enum CenteringMode { NotCentered, Centered, NeedsCentering }; | 51 enum CenteringMode { NotCentered, Centered, NeedsCentering }; |
| 52 CenteringMode centeringMode() const { return m_centeringMode; } | 52 CenteringMode centeringMode() const { return m_centeringMode; } |
| 53 LayoutUnit centeredPosition() const | 53 LayoutUnit centeredPosition() const |
| 54 { | 54 { |
| 55 ASSERT(m_centeringMode == Centered); | 55 ASSERT(m_centeringMode == Centered); |
| 56 return m_centeredPosition; | 56 return m_centeredPosition; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 70 void forceLayoutForCentering(); | 70 void forceLayoutForCentering(); |
| 71 | 71 |
| 72 CenteringMode m_centeringMode; | 72 CenteringMode m_centeringMode; |
| 73 LayoutUnit m_centeredPosition; | 73 LayoutUnit m_centeredPosition; |
| 74 String m_returnValue; | 74 String m_returnValue; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif // HTMLDialogElement_h | 79 #endif // HTMLDialogElement_h |
| OLD | NEW |