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

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

Issue 132333018: Revert of Reland r165710 "Replace RenderFullScreen with top layer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/core/dom/RenderTreeBuilder.cpp ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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; }
47 46
48 enum CenteringMode { Uninitialized, Centered, NotCentered }; 47 enum CenteringMode { Uninitialized, Centered, NotCentered };
49 CenteringMode centeringMode() const { return m_centeringMode; } 48 CenteringMode centeringMode() const { return m_centeringMode; }
50 LayoutUnit centeredPosition() const 49 LayoutUnit centeredPosition() const
51 { 50 {
52 ASSERT(m_centeringMode == Centered); 51 ASSERT(m_centeringMode == Centered);
53 return m_centeredPosition; 52 return m_centeredPosition;
54 } 53 }
55 void setCentered(LayoutUnit centeredPosition); 54 void setCentered(LayoutUnit centeredPosition);
56 void setNotCentered(); 55 void setNotCentered();
57 56
58 String returnValue() const { return m_returnValue; } 57 String returnValue() const { return m_returnValue; }
59 void setReturnValue(const String& returnValue) { m_returnValue = returnValue ; } 58 void setReturnValue(const String& returnValue) { m_returnValue = returnValue ; }
60 59
61 private: 60 private:
62 explicit HTMLDialogElement(Document&); 61 explicit HTMLDialogElement(Document&);
63 62
64 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; 63 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
65 virtual void defaultEventHandler(Event*) OVERRIDE; 64 virtual void defaultEventHandler(Event*) OVERRIDE;
66 virtual void removedFrom(ContainerNode*) OVERRIDE;
67 65
68 void forceLayoutForCentering(); 66 void forceLayoutForCentering();
69 67
70 CenteringMode m_centeringMode; 68 CenteringMode m_centeringMode;
71 LayoutUnit m_centeredPosition; 69 LayoutUnit m_centeredPosition;
72 String m_returnValue; 70 String m_returnValue;
73 bool m_modal;
74 }; 71 };
75 72
76 inline bool isHTMLDialogElement(const Node& node) 73 inline bool isHTMLDialogElement(const Node& node)
77 { 74 {
78 ASSERT_WITH_SECURITY_IMPLICATION(RuntimeEnabledFeatures::dialogElementEnable d()); 75 ASSERT_WITH_SECURITY_IMPLICATION(RuntimeEnabledFeatures::dialogElementEnable d());
79 return node.hasTagName(HTMLNames::dialogTag); 76 return node.hasTagName(HTMLNames::dialogTag);
80 } 77 }
81 78
82 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLDialogElement); 79 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLDialogElement);
83 80
84 } // namespace WebCore 81 } // namespace WebCore
85 82
86 #endif 83 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/RenderTreeBuilder.cpp ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698