Internals::setAuthorShadowDOMForAnyElementEnabled should be on InternalSettings
authormorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2012 06:11:43 +0000 (06:11 +0000)
committermorrita@google.com <morrita@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Aug 2012 06:11:43 +0000 (06:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=92823

Reviewed by Kentaro Hara.

Source/WebCore:

This change moves Internals::setAuthorShadowDOMForAnyElementEnabled() to
InternalSettings to support original value recovery.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled): Moved from Internals.
(WebCore):
* testing/InternalSettings.h:
(Backup):
(InternalSettings):
* testing/InternalSettings.idl:
* testing/Internals.cpp:
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

LayoutTests:

Followed the changed on Internals API.

* fast/dom/shadow/input-with-validation.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124304 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/dom/shadow/input-with-validation.html
Source/WebCore/ChangeLog
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl

index b61f2f8..e0e3620 100644 (file)
@@ -1,3 +1,14 @@
+2012-07-31  MORITA Hajime  <morrita@google.com>
+
+        Internals::setAuthorShadowDOMForAnyElementEnabled should be on InternalSettings
+        https://bugs.webkit.org/show_bug.cgi?id=92823
+
+        Reviewed by Kentaro Hara.
+
+        Followed the changed on Internals API.
+
+        * fast/dom/shadow/input-with-validation.html:
+
 2012-07-31  Keishi Hattori  <keishi@webkit.org>
 
         Mark fast/forms/color/color-suggestion-picker-appearance.html as missing or image mismatch
index c9201b3..3e14317 100644 (file)
@@ -9,7 +9,7 @@
 
 <script>
 if (window.internals)
-    internals.setAuthorShadowDOMForAnyElementEnabled(true);
+    internals.settings.setAuthorShadowDOMForAnyElementEnabled(true);
 
 var input = document.getElementById('password');
 var shadowRoot = new WebKitShadowRoot(input);
@@ -19,8 +19,6 @@ document.getElementById('submit').click();
 if (window.testRunner) {
     testRunner.waitUntilDone();
     setTimeout(function() {
-        if (window.internals)
-            internals.setAuthorShadowDOMForAnyElementEnabled(false);  
         testRunner.notifyDone();
     }, 10);
 }
index 0d185d3..1efb247 100644 (file)
@@ -1,3 +1,27 @@
+2012-07-31  MORITA Hajime  <morrita@google.com>
+
+        Internals::setAuthorShadowDOMForAnyElementEnabled should be on InternalSettings
+        https://bugs.webkit.org/show_bug.cgi?id=92823
+
+        Reviewed by Kentaro Hara.
+
+        This change moves Internals::setAuthorShadowDOMForAnyElementEnabled() to
+        InternalSettings to support original value recovery.
+
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::setAuthorShadowDOMForAnyElementEnabled): Moved from Internals.
+        (WebCore):
+        * testing/InternalSettings.h:
+        (Backup):
+        (InternalSettings):
+        * testing/InternalSettings.idl:
+        * testing/Internals.cpp:
+        * testing/Internals.h:
+        (Internals):
+        * testing/Internals.idl:
+
 2012-07-31  Vincent Scheib  <scheib@chromium.org>
 
         webkitRequestPointerLock and webkitExitPointerLock limited to the same document of an active Pointer lock.
index 552c13a..d359a02 100755 (executable)
@@ -77,6 +77,7 @@ InternalSettings::Backup::Backup(Page* page, Settings* settings)
     , m_originalCSSExclusionsEnabled(RuntimeEnabledFeatures::cssExclusionsEnabled())
 #if ENABLE(SHADOW_DOM)
     , m_originalShadowDOMEnabled(RuntimeEnabledFeatures::shadowDOMEnabled())
+    , m_originalAuthorShadowDOMForAnyElementEnabled(RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled())
 #endif
     , m_originalEditingBehavior(settings->editingBehaviorType())
     , m_originalFixedPositionCreatesStackingContext(settings->fixedPositionCreatesStackingContext())
@@ -105,6 +106,7 @@ void InternalSettings::Backup::restoreTo(Page* page, Settings* settings)
     RuntimeEnabledFeatures::setCSSExclusionsEnabled(m_originalCSSExclusionsEnabled);
 #if ENABLE(SHADOW_DOM)
     RuntimeEnabledFeatures::setShadowDOMEnabled(m_originalShadowDOMEnabled);
+    RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(m_originalAuthorShadowDOMForAnyElementEnabled);
 #endif
     settings->setEditingBehaviorType(m_originalEditingBehavior);
     settings->setFixedPositionCreatesStackingContext(m_originalFixedPositionCreatesStackingContext);
@@ -273,6 +275,15 @@ void InternalSettings::setShadowDOMEnabled(bool enabled, ExceptionCode& ec)
 #endif
 }
 
+void InternalSettings::setAuthorShadowDOMForAnyElementEnabled(bool isEnabled)
+{
+#if ENABLE(SHADOW_DOM)
+    RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(isEnabled);
+#else
+    UNUSED_PARAM(isEnabled);
+#endif
+}
+
 void InternalSettings::setTouchEventEmulationEnabled(bool enabled, ExceptionCode& ec)
 {
 #if ENABLE(TOUCH_EVENTS)
index c3d0cb5..bb25c58 100755 (executable)
@@ -59,6 +59,7 @@ public:
         bool m_originalCSSExclusionsEnabled;
 #if ENABLE(SHADOW_DOM)
         bool m_originalShadowDOMEnabled;
+        bool m_originalAuthorShadowDOMForAnyElementEnabled;
 #endif
         EditingBehaviorType m_originalEditingBehavior;
         bool m_originalFixedPositionCreatesStackingContext;
@@ -104,6 +105,7 @@ public:
     void setDeviceSupportsTouch(bool enabled, ExceptionCode&);
     void setDeviceSupportsMouse(bool enabled, ExceptionCode&);
     void setShadowDOMEnabled(bool enabled, ExceptionCode&);
+    void setAuthorShadowDOMForAnyElementEnabled(bool);
     void setStandardFontFamily(const String& family, const String& script, ExceptionCode&);
     void setSerifFontFamily(const String& family, const String& script, ExceptionCode&);
     void setSansSerifFontFamily(const String& family, const String& script, ExceptionCode&);
index dd139c0..6c04bc6 100755 (executable)
@@ -44,6 +44,7 @@ module window {
         void setDeviceSupportsTouch(in boolean enabled) raises(DOMException);
         void setDeviceSupportsMouse(in boolean enabled) raises(DOMException);
         void setShadowDOMEnabled(in boolean enabled) raises(DOMException);
+        void setAuthorShadowDOMForAnyElementEnabled(in boolean isEnabled);
         void setStandardFontFamily(in DOMString family, in DOMString script) raises(DOMException);
         void setSerifFontFamily(in DOMString family, in DOMString script) raises(DOMException);
         void setSansSerifFontFamily(in DOMString family, in DOMString script) raises(DOMException);
index 4203878..2fdc066 100644 (file)
@@ -433,15 +433,6 @@ void Internals::setShadowPseudoId(Element* element, const String& id, ExceptionC
     return element->setShadowPseudoId(id, ec);
 }
 
-void Internals::setAuthorShadowDOMForAnyElementEnabled(bool isEnabled)
-{
-#if ENABLE(SHADOW_DOM)
-    RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled(isEnabled);
-#else
-    UNUSED_PARAM(isEnabled);
-#endif
-}
-
 String Internals::visiblePlaceholder(Element* element)
 {
     HTMLTextFormControlElement* textControl = toTextFormControl(element);
index 4994ca0..157662c 100644 (file)
@@ -82,8 +82,6 @@ public:
     String shadowPseudoId(Element*, ExceptionCode&);
     void setShadowPseudoId(Element*, const String&, ExceptionCode&);
 
-    void setAuthorShadowDOMForAnyElementEnabled(bool isEnabled);
-
     PassRefPtr<Element> createContentElement(Document*, ExceptionCode&);
     Element* getElementByIdInShadowRoot(Node* shadowRoot, const String& id, ExceptionCode&);
     bool isValidContentSelect(Element* insertionPoint, ExceptionCode&);
index 26cd102..601e8a7 100644 (file)
@@ -56,7 +56,6 @@ module window {
         boolean isValidContentSelect(in Element contentElement) raises(DOMException);
         Node treeScopeRootNode(in Node node) raises (DOMException);
         Node parentTreeScope(in Node node) raises (DOMException);
-        void setAuthorShadowDOMForAnyElementEnabled(in boolean isEnabled);
 
         Node nextSiblingByWalker(in Node node) raises(DOMException);
         Node firstChildByWalker(in Node node) raises(DOMException);