Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: Source/core/html/HTMLDialogElement.h

Issue 134753003: Reland r165710 "Replace RenderFullScreen with top layer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: patch for landing Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
36 class QualifiedName; 36 class QualifiedName;
37 37
38 class HTMLDialogElement FINAL : public HTMLElement { 38 class HTMLDialogElement FINAL : public HTMLElement {
39 public: 39 public:
40 static PassRefPtr<HTMLDialogElement> create(Document&); 40 static PassRefPtr<HTMLDialogElement> create(Document&);
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 bool isModal() const { return m_modal; }
46 47
47 enum CenteringMode { Uninitialized, Centered, NotCentered }; 48 enum CenteringMode { Uninitialized, Centered, NotCentered };
48 CenteringMode centeringMode() const { return m_centeringMode; } 49 CenteringMode centeringMode() const { return m_centeringMode; }
49 LayoutUnit centeredPosition() const 50 LayoutUnit centeredPosition() const
50 { 51 {
51 ASSERT(m_centeringMode == Centered); 52 ASSERT(m_centeringMode == Centered);
52 return m_centeredPosition; 53 return m_centeredPosition;
53 } 54 }
54 void setCentered(LayoutUnit centeredPosition); 55 void setCentered(LayoutUnit centeredPosition);
55 void setNotCentered(); 56 void setNotCentered();
56 57
57 String returnValue() const { return m_returnValue; } 58 String returnValue() const { return m_returnValue; }
58 void setReturnValue(const String& returnValue) { m_returnValue = returnValue ; } 59 void setReturnValue(const String& returnValue) { m_returnValue = returnValue ; }
59 60
60 private: 61 private:
61 explicit HTMLDialogElement(Document&); 62 explicit HTMLDialogElement(Document&);
62 63
63 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 64 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
64 virtual void defaultEventHandler(Event*) OVERRIDE; 65 virtual void defaultEventHandler(Event*) OVERRIDE;
66 virtual void removedFrom(ContainerNode*) OVERRIDE;
65 67
66 void forceLayoutForCentering(); 68 void forceLayoutForCentering();
67 69
68 CenteringMode m_centeringMode; 70 CenteringMode m_centeringMode;
69 LayoutUnit m_centeredPosition; 71 LayoutUnit m_centeredPosition;
70 String m_returnValue; 72 String m_returnValue;
73 bool m_modal;
71 }; 74 };
72 75
73 inline bool isHTMLDialogElement(const Node& node) 76 inline bool isHTMLDialogElement(const Node& node)
74 { 77 {
75 ASSERT_WITH_SECURITY_IMPLICATION(RuntimeEnabledFeatures::dialogElementEnable d()); 78 ASSERT_WITH_SECURITY_IMPLICATION(RuntimeEnabledFeatures::dialogElementEnable d());
76 return node.hasTagName(HTMLNames::dialogTag); 79 return node.hasTagName(HTMLNames::dialogTag);
77 } 80 }
78 81
79 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLDialogElement); 82 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLDialogElement);
80 83
81 } // namespace WebCore 84 } // namespace WebCore
82 85
83 #endif 86 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698