Title: [122420] trunk
Revision
122420
Author
[email protected]
Date
2012-07-11 22:33:03 -0700 (Wed, 11 Jul 2012)

Log Message

Add dialog element feature toggle to InternalSettings
https://bugs.webkit.org/show_bug.cgi?id=90934

Patch by Matt Falkenhagen <[email protected]> on 2012-07-11
Reviewed by Hajime Morita.

.:

* Source/autotools/symbols.filter: Added newly exported symbol.

Source/WebCore:

This enables layout tests to be written for dialog although the feature is disabled by default.

Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
       fast/dom/HTMLDialogElement/dialog-enabled.html

* WebCore.exp.in: Added newly exported symbol.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
(WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
(WebCore::InternalSettings::setDialogElementEnabled): Added.
(WebCore):
* testing/InternalSettings.h: Added support for dialog.
(Backup):
(InternalSettings):
* testing/InternalSettings.idl: Added support for dialog.

LayoutTests:

* fast/dom/HTMLDialogElement/dialog-disabled-expected.txt: Added.
* fast/dom/HTMLDialogElement/dialog-disabled.html: Added.
* fast/dom/HTMLDialogElement/dialog-enabled-expected.txt: Added.
* fast/dom/HTMLDialogElement/dialog-enabled.html: Added.
* platform/efl/TestExpectations: Skipped because ENABLE_DIALOG_ELEMENT is off by default.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (122419 => 122420)


--- trunk/ChangeLog	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/ChangeLog	2012-07-12 05:33:03 UTC (rev 122420)
@@ -1,3 +1,12 @@
+2012-07-11  Matt Falkenhagen  <[email protected]>
+
+        Add dialog element feature toggle to InternalSettings
+        https://bugs.webkit.org/show_bug.cgi?id=90934
+
+        Reviewed by Hajime Morita.
+
+        * Source/autotools/symbols.filter: Added newly exported symbol.
+
 2012-07-11  Arnaud Renevier  <[email protected]>
 
         [Gtk] allow building with css-filters

Modified: trunk/LayoutTests/ChangeLog (122419 => 122420)


--- trunk/LayoutTests/ChangeLog	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/LayoutTests/ChangeLog	2012-07-12 05:33:03 UTC (rev 122420)
@@ -1,3 +1,19 @@
+2012-07-11  Matt Falkenhagen  <[email protected]>
+
+        Add dialog element feature toggle to InternalSettings
+        https://bugs.webkit.org/show_bug.cgi?id=90934
+
+        Reviewed by Hajime Morita.
+
+        * fast/dom/HTMLDialogElement/dialog-disabled-expected.txt: Added.
+        * fast/dom/HTMLDialogElement/dialog-disabled.html: Added.
+        * fast/dom/HTMLDialogElement/dialog-enabled-expected.txt: Added.
+        * fast/dom/HTMLDialogElement/dialog-enabled.html: Added.
+        * platform/efl/TestExpectations: Skipped because ENABLE_DIALOG_ELEMENT is off by default.
+        * platform/gtk/TestExpectations: Ditto.
+        * platform/mac/TestExpectations: Ditto.
+        * platform/qt/TestExpectations: Ditto.
+
 2012-07-11  Hayato Ito  <[email protected]>
 
         Unreviewed gardening.

Added: trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-disabled-expected.txt (0 => 122420)


--- trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-disabled-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-disabled-expected.txt	2012-07-12 05:33:03 UTC (rev 122420)
@@ -0,0 +1,10 @@
+The DIALOG element should not be recognized if the dialog feature is off.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS typeof dialog.show == 'undefined' is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-disabled.html (0 => 122420)


--- trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-disabled.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-disabled.html	2012-07-12 05:33:03 UTC (rev 122420)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<dialog id="mydialog"></dialog>
+<script>
+description("The DIALOG element should not be recognized if the dialog feature is off.");
+if (window.internals)
+    internals.settings.setDialogElementEnabled(false);
+dialog = document.getElementById('mydialog');
+shouldBeTrue("typeof dialog.show == 'undefined'");
+</script>
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled-expected.txt (0 => 122420)


--- trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled-expected.txt	2012-07-12 05:33:03 UTC (rev 122420)
@@ -0,0 +1,10 @@
+The DIALOG element should be recognized if the dialog feature is on.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS typeof dialog.show == 'function' is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled.html (0 => 122420)


--- trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/HTMLDialogElement/dialog-enabled.html	2012-07-12 05:33:03 UTC (rev 122420)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<dialog id="mydialog"></dialog>
+<script>
+description("The DIALOG element should be recognized if the dialog feature is on.");
+if (window.internals)
+    internals.settings.setDialogElementEnabled(true);
+dialog = document.getElementById('mydialog');
+shouldBeTrue("typeof dialog.show == 'function'");
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/platform/efl/TestExpectations (122419 => 122420)


--- trunk/LayoutTests/platform/efl/TestExpectations	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2012-07-12 05:33:03 UTC (rev 122420)
@@ -135,6 +135,8 @@
 // Text Autosizing is not yet enabled.
 BUGWK84186 SKIP : fast/text-autosizing = PASS
 
+// Dialog element is not yet enabled.
+BUGWK84635 SKIP : fast/dom/HTMLDialogElement = TEXT
 //////////////////////////////////////////////////////////////////////////////////////////
 // CRASHES
 //////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (122419 => 122420)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2012-07-12 05:33:03 UTC (rev 122420)
@@ -349,6 +349,8 @@
 // Text Autosizing is not yet enabled.
 BUGWK84186 SKIP : fast/text-autosizing = PASS
 
+// Dialog element is not yet enabled.
+BUGWK84635 SKIP : fast/dom/HTMLDialogElement = TEXT
 //////////////////////////////////////////////////////////////////////////////////////////
 // End of Expected failures
 //////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/LayoutTests/platform/mac/TestExpectations (122419 => 122420)


--- trunk/LayoutTests/platform/mac/TestExpectations	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2012-07-12 05:33:03 UTC (rev 122420)
@@ -289,3 +289,6 @@
 
 // Text Autosizing is not enabled.
 BUGWK84186 SKIP : fast/text-autosizing = PASS
+
+// Dialog element is not yet enabled.
+BUGWK84635 SKIP : fast/dom/HTMLDialogElement = TEXT

Modified: trunk/LayoutTests/platform/qt/TestExpectations (122419 => 122420)


--- trunk/LayoutTests/platform/qt/TestExpectations	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2012-07-12 05:33:03 UTC (rev 122420)
@@ -110,3 +110,6 @@
 
 // Text Autosizing is not enabled.
 BUGWK84186 SKIP : fast/text-autosizing = PASS
+
+// Dialog element is not yet enabled.
+BUGWK84635 SKIP : fast/dom/HTMLDialogElement = TEXT

Modified: trunk/Source/WebCore/ChangeLog (122419 => 122420)


--- trunk/Source/WebCore/ChangeLog	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/Source/WebCore/ChangeLog	2012-07-12 05:33:03 UTC (rev 122420)
@@ -1,3 +1,26 @@
+2012-07-11  Matt Falkenhagen  <[email protected]>
+
+        Add dialog element feature toggle to InternalSettings
+        https://bugs.webkit.org/show_bug.cgi?id=90934
+
+        Reviewed by Hajime Morita.
+
+        This enables layout tests to be written for dialog although the feature is disabled by default.
+
+        Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
+               fast/dom/HTMLDialogElement/dialog-enabled.html
+
+        * WebCore.exp.in: Added newly exported symbol.
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
+        (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
+        (WebCore::InternalSettings::setDialogElementEnabled): Added.
+        (WebCore):
+        * testing/InternalSettings.h: Added support for dialog.
+        (Backup):
+        (InternalSettings):
+        * testing/InternalSettings.idl: Added support for dialog.
+
 2012-07-11  Kent Tamura  <[email protected]>
 
         Accessing width or height of a detached image input element causes crash

Modified: trunk/Source/WebCore/WebCore.exp.in (122419 => 122420)


--- trunk/Source/WebCore/WebCore.exp.in	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-07-12 05:33:03 UTC (rev 122420)
@@ -2379,6 +2379,10 @@
 __ZN7WebCore22RuntimeEnabledFeatures18isShadowDOMEnabledE
 #endif
 
+#if ENABLE(DIALOG_ELEMENT)
+__ZN7WebCore22RuntimeEnabledFeatures22isDialogElementEnabledE
+#endif
+
 #if ENABLE(SVG)
 __ZN7WebCore14SVGSMILElement13isSMILElementEPNS_4NodeE
 __ZN7WebCore8Document13svgExtensionsEv

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (122419 => 122420)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2012-07-12 05:33:03 UTC (rev 122420)
@@ -89,6 +89,9 @@
     , m_originalTextAutosizingEnabled(settings->textAutosizingEnabled())
     , m_originalTextAutosizingWindowSizeOverride(settings->textAutosizingWindowSizeOverride())
 #endif
+#if ENABLE(DIALOG_ELEMENT)
+    , m_originalDialogElementEnabled(RuntimeEnabledFeatures::dialogElementEnabled())
+#endif
 {
 }
 
@@ -115,6 +118,9 @@
     settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled);
     settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindowSizeOverride);
 #endif
+#if ENABLE(DIALOG_ELEMENT)
+    RuntimeEnabledFeatures::setDialogElementEnabled(m_originalDialogElementEnabled);
+#endif
 }
 
 InternalSettings* InternalSettings::from(Page* page)
@@ -442,6 +448,16 @@
     settings()->setWindowFocusRestricted(restricted);
 }
 
+void InternalSettings::setDialogElementEnabled(bool enabled, ExceptionCode& ec)
+{
+    UNUSED_PARAM(ec);
+#if ENABLE(DIALOG_ELEMENT)
+    RuntimeEnabledFeatures::setDialogElementEnabled(enabled);
+#else
+    UNUSED_PARAM(enabled);
+#endif
+}
+
 void InternalSettings::allowRoundingHacks() const
 {
     TextRun::setAllowsRoundingHacks(true);
@@ -540,5 +556,4 @@
     return "viewport size " + String::number(attributes.layoutSize.width()) + "x" + String::number(attributes.layoutSize.height()) + " scale " + String::number(attributes.initialScale) + " with limits [" + String::number(attributes.minimumScale) + ", " + String::number(attributes.maximumScale) + "] and userScalable " + (attributes.userScalable ? "true" : "false");
 }
 
-
 }

Modified: trunk/Source/WebCore/testing/InternalSettings.h (122419 => 122420)


--- trunk/Source/WebCore/testing/InternalSettings.h	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2012-07-12 05:33:03 UTC (rev 122420)
@@ -71,6 +71,9 @@
         bool m_originalTextAutosizingEnabled;
         IntSize m_originalTextAutosizingWindowSizeOverride;
 #endif
+#if ENABLE(DIALOG_ELEMENT)
+        bool m_originalDialogElementEnabled;
+#endif
     };
 
     typedef RefCountedSupplement<Page, InternalSettings> SuperType;
@@ -116,6 +119,7 @@
     void setFixedPositionCreatesStackingContext(bool, ExceptionCode&);
     void setSyncXHRInDocumentsEnabled(bool, ExceptionCode&);
     void setWindowFocusRestricted(bool, ExceptionCode&);
+    void setDialogElementEnabled(bool, ExceptionCode&);
     void setJavaScriptProfilingEnabled(bool enabled, ExceptionCode&);
     Vector<String> userPreferredLanguages() const;
     void setUserPreferredLanguages(const Vector<String>&);

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (122419 => 122420)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2012-07-12 05:33:03 UTC (rev 122420)
@@ -64,6 +64,7 @@
         void setSyncXHRInDocumentsEnabled(in boolean enabled) raises(DOMException);
         void setJavaScriptProfilingEnabled(in boolean creates) raises(DOMException);
         void setWindowFocusRestricted(in boolean restricted) raises(DOMException);
+        void setDialogElementEnabled(in boolean enabled) raises(DOMException);
 
         void setPagination(in DOMString mode, in long gap) raises(DOMException);
         sequence<String> userPreferredLanguages();

Modified: trunk/Source/autotools/symbols.filter (122419 => 122420)


--- trunk/Source/autotools/symbols.filter	2012-07-12 05:20:01 UTC (rev 122419)
+++ trunk/Source/autotools/symbols.filter	2012-07-12 05:33:03 UTC (rev 122420)
@@ -157,6 +157,7 @@
 _ZN7WebCore22RuntimeEnabledFeatures32setMultipleShadowSubtreesEnabledEb;
 _ZN7WebCore22RuntimeEnabledFeatures18isShadowDOMEnabledE;
 _ZN7WebCore22RuntimeEnabledFeatures22isCSSExclusionsEnabledE;
+_ZN7WebCore22RuntimeEnabledFeatures22isDialogElementEnabledE;
 _ZNK7WebCore8Document13nodesFromRectEiijjjjbb;
 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE;
 _ZNK7WebCore6Editor26selectionStartHasMarkerForENS_14DocumentMarker10MarkerTypeEii;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to