Title: [141277] trunk/Source/WebCore
Revision
141277
Author
[email protected]
Date
2013-01-30 09:15:18 -0800 (Wed, 30 Jan 2013)

Log Message

Element::areAuthorShadowsAllowed should be private
https://bugs.webkit.org/show_bug.cgi?id=108298

Reviewed by Darin Adler.

There's no reason for areAuthorShadowsAllowed to be exposed publically
on Element since it just controls the behavior of createShadowRoot. Make
it private and fix all places where it wasn't in subclasses.

No new tests, just refactoring.

* dom/Element.h:
(WebCore::Element::areAuthorShadowsAllowed): Made private.
* html/HTMLFrameElementBase.h:
(HTMLFrameElementBase):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* html/HTMLPlugInElement.h:
(HTMLPlugInElement):
* svg/SVGElement.h:
(SVGElement):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141276 => 141277)


--- trunk/Source/WebCore/ChangeLog	2013-01-30 17:12:30 UTC (rev 141276)
+++ trunk/Source/WebCore/ChangeLog	2013-01-30 17:15:18 UTC (rev 141277)
@@ -1,3 +1,29 @@
+2013-01-30  Elliott Sprehn  <[email protected]>
+
+        Element::areAuthorShadowsAllowed should be private
+        https://bugs.webkit.org/show_bug.cgi?id=108298
+
+        Reviewed by Darin Adler.
+
+        There's no reason for areAuthorShadowsAllowed to be exposed publically
+        on Element since it just controls the behavior of createShadowRoot. Make
+        it private and fix all places where it wasn't in subclasses.
+
+        No new tests, just refactoring.
+
+        * dom/Element.h:
+        (WebCore::Element::areAuthorShadowsAllowed): Made private.
+        * html/HTMLFrameElementBase.h:
+        (HTMLFrameElementBase):
+        * html/HTMLInputElement.h:
+        (HTMLInputElement):
+        * html/HTMLMediaElement.h:
+        (HTMLMediaElement):
+        * html/HTMLPlugInElement.h:
+        (HTMLPlugInElement):
+        * svg/SVGElement.h:
+        (SVGElement):
+
 2013-01-30  Eugene Klyuchnikov  <[email protected]>
 
         Web Inspector: Script Profiler: Make profiler output typed.

Modified: trunk/Source/WebCore/dom/Element.h (141276 => 141277)


--- trunk/Source/WebCore/dom/Element.h	2013-01-30 17:12:30 UTC (rev 141276)
+++ trunk/Source/WebCore/dom/Element.h	2013-01-30 17:15:18 UTC (rev 141277)
@@ -295,7 +295,6 @@
 
     bool hasAuthorShadowRoot() const { return shadowRoot(); }
     virtual void willAddAuthorShadowRoot() { }
-    virtual bool areAuthorShadowsAllowed() const { return true; }
 
     ShadowRoot* userAgentShadowRoot() const;
     ShadowRoot* ensureUserAgentShadowRoot();
@@ -532,6 +531,7 @@
     PassRefPtr<PseudoElement> createPseudoElementIfNeeded(PseudoId);
     void setPseudoElement(PseudoId, PassRefPtr<PseudoElement>);
 
+    virtual bool areAuthorShadowsAllowed() const { return true; }
     virtual void didAddUserAgentShadowRoot(ShadowRoot*) { }
 
     // FIXME: Remove the need for Attr to call willModifyAttribute/didModifyAttribute.

Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.h (141276 => 141277)


--- trunk/Source/WebCore/html/HTMLFrameElementBase.h	2013-01-30 17:12:30 UTC (rev 141276)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.h	2013-01-30 17:15:18 UTC (rev 141277)
@@ -53,7 +53,6 @@
     virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
     virtual void didNotifySubtreeInsertions(ContainerNode*) OVERRIDE;
     virtual void attach();
-    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
 
 private:
     virtual bool supportsFocus() const;
@@ -62,6 +61,8 @@
     virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
     virtual bool isFrameElementBase() const { return true; }
 
+    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
+
     bool viewSourceMode() const { return m_viewSource; }
 
     void setNameAndOpenURL();

Modified: trunk/Source/WebCore/html/HTMLInputElement.h (141276 => 141277)


--- trunk/Source/WebCore/html/HTMLInputElement.h	2013-01-30 17:12:30 UTC (rev 141276)
+++ trunk/Source/WebCore/html/HTMLInputElement.h	2013-01-30 17:15:18 UTC (rev 141277)
@@ -304,13 +304,13 @@
 
     virtual void defaultEventHandler(Event*);
 
+private:
+    enum AutoCompleteSetting { Uninitialized, On, Off };
+
     // FIXME: Author shadows should be allowed
     // https://bugs.webkit.org/show_bug.cgi?id=92608
     virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
 
-private:
-    enum AutoCompleteSetting { Uninitialized, On, Off };
-
     virtual void didAddUserAgentShadowRoot(ShadowRoot*) OVERRIDE;
 
     virtual void willChangeForm() OVERRIDE;

Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (141276 => 141277)


--- trunk/Source/WebCore/html/HTMLMediaElement.h	2013-01-30 17:12:30 UTC (rev 141276)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h	2013-01-30 17:15:18 UTC (rev 141277)
@@ -89,7 +89,6 @@
     MediaPlayer* player() const { return m_player.get(); }
 
     virtual void willAddAuthorShadowRoot() OVERRIDE;
-    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
 
     virtual bool isVideo() const = 0;
     virtual bool hasVideo() const { return false; }
@@ -383,6 +382,8 @@
 private:
     void createMediaPlayer();
 
+    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
+
     virtual bool hasCustomFocusLogic() const OVERRIDE;
     virtual bool supportsFocus() const;
     virtual bool isMouseFocusable() const;

Modified: trunk/Source/WebCore/html/HTMLPlugInElement.h (141276 => 141277)


--- trunk/Source/WebCore/html/HTMLPlugInElement.h	2013-01-30 17:12:30 UTC (rev 141276)
+++ trunk/Source/WebCore/html/HTMLPlugInElement.h	2013-01-30 17:15:18 UTC (rev 141277)
@@ -80,7 +80,6 @@
     virtual void detach();
     virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE;
     virtual void collectStyleForPresentationAttribute(const Attribute&, StylePropertySet*) OVERRIDE;
-    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
 
     // Subclasses should use guardedDispatchBeforeLoadEvent instead of calling dispatchBeforeLoadEvent directly.
     bool guardedDispatchBeforeLoadEvent(const String& sourceURL);
@@ -92,6 +91,8 @@
 private:
     bool dispatchBeforeLoadEvent(const String& sourceURL); // Not implemented, generates a compile error if subclasses call this by mistake.
 
+    virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
+
     virtual void defaultEventHandler(Event*);
 
     virtual RenderWidget* renderWidgetForJSBindings() const = 0;
@@ -99,7 +100,6 @@
     virtual bool isKeyboardFocusable(KeyboardEvent*) const;
     virtual bool isPluginElement() const;
 
-private:
     mutable ScriptInstance m_instance;
 #if ENABLE(NETSCAPE_PLUGIN_API)
     NPObject* m_NPObject;

Modified: trunk/Source/WebCore/svg/SVGElement.h (141276 => 141277)


--- trunk/Source/WebCore/svg/SVGElement.h	2013-01-30 17:12:30 UTC (rev 141276)
+++ trunk/Source/WebCore/svg/SVGElement.h	2013-01-30 17:15:18 UTC (rev 141277)
@@ -136,13 +136,13 @@
 
     void reportAttributeParsingError(SVGParsingError, const QualifiedName&, const AtomicString&);
 
+private:
+    friend class SVGElementInstance;
+
     // FIXME: Author shadows should be allowed
     // https://bugs.webkit.org/show_bug.cgi?id=77938
     virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; }
 
-private:
-    friend class SVGElementInstance;
-
     RenderStyle* computedStyle(PseudoId = NOPSEUDO);
     virtual RenderStyle* virtualComputedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO) { return computedStyle(pseudoElementSpecifier); }
     virtual bool willRecalcStyle(StyleChange);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to