Merge from Chromium at DEPS revision 230120

This commit was generated by merge_to_master.py.

Change-Id: Iab152fc67d869deb6e9505babd8d71cab63335dd
diff --git a/Source/core/html/HTMLDialogElement.h b/Source/core/html/HTMLDialogElement.h
index 521dc79..c78bd88 100644
--- a/Source/core/html/HTMLDialogElement.h
+++ b/Source/core/html/HTMLDialogElement.h
@@ -26,6 +26,7 @@
 #ifndef HTMLDialogElement_h
 #define HTMLDialogElement_h
 
+#include "RuntimeEnabledFeatures.h"
 #include "core/html/HTMLElement.h"
 
 namespace WebCore {
@@ -43,27 +44,37 @@
     void show();
     void showModal(ExceptionState&);
 
+    enum CenteringMode { Uninitialized, Centered, NotCentered };
+    CenteringMode centeringMode() const { return m_centeringMode; }
+    LayoutUnit centeredPosition() const
+    {
+        ASSERT(m_centeringMode == Centered);
+        return m_centeredPosition;
+    }
+    void setCentered(LayoutUnit centeredPosition);
+    void setNotCentered();
+
     String returnValue() const { return m_returnValue; }
     void setReturnValue(const String& returnValue) { m_returnValue = returnValue; }
 
 private:
     HTMLDialogElement(const QualifiedName&, Document&);
 
-    virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE;
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void defaultEventHandler(Event*) OVERRIDE;
     virtual bool shouldBeReparentedUnderRenderView(const RenderStyle*) const OVERRIDE;
 
-    void reposition();
+    void forceLayoutForCentering();
 
-    bool m_topIsValid;
-    LayoutUnit m_top;
+    CenteringMode m_centeringMode;
+    LayoutUnit m_centeredPosition;
     String m_returnValue;
 };
 
 inline HTMLDialogElement* toHTMLDialogElement(Node* node)
 {
     ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::dialogTag));
+    ASSERT_WITH_SECURITY_IMPLICATION(RuntimeEnabledFeatures::dialogElementEnabled());
     return static_cast<HTMLDialogElement*>(node);
 }