Remove FeatureObserver.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Feb 2014 20:24:03 +0000 (20:24 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Feb 2014 20:24:03 +0000 (20:24 +0000)
<https://webkit.org/b/129439>

This code was only used by the Chromium port and nobody else is
making use of it.

Reviewed by Anders Carlsson.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
* dom/EventTarget.h:
* html/ColorInputType.cpp:
* html/ColorInputType.h:
* html/DateInputType.cpp:
* html/DateInputType.h:
* html/DateTimeInputType.cpp:
* html/DateTimeInputType.h:
* html/DateTimeLocalInputType.cpp:
* html/DateTimeLocalInputType.h:
* html/EmailInputType.cpp:
* html/EmailInputType.h:
* html/HTMLDataListElement.cpp:
(WebCore::HTMLDataListElement::create):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::parseAttribute):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::parseAttribute):
* html/InputType.cpp:
* html/InputType.h:
* html/MonthInputType.cpp:
* html/MonthInputType.h:
* html/NumberInputType.cpp:
* html/NumberInputType.h:
* html/RangeInputType.cpp:
* html/RangeInputType.h:
* html/SearchInputType.cpp:
* html/SearchInputType.h:
* html/TelephoneInputType.cpp:
* html/TelephoneInputType.h:
* html/TextInputType.cpp:
* html/TextInputType.h:
* html/TimeInputType.cpp:
* html/TimeInputType.h:
* html/URLInputType.cpp:
* html/URLInputType.h:
* html/WeekInputType.cpp:
* html/WeekInputType.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::dispatchDidCommitLoad):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::didReceiveHeader):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):
* page/FeatureObserver.cpp: Removed.
* page/FeatureObserver.h: Removed.
* page/Page.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* workers/SharedWorker.cpp:
(WebCore::SharedWorker::create):
* workers/Worker.cpp:
(WebCore::Worker::create):

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

53 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/EventTarget.cpp
Source/WebCore/dom/EventTarget.h
Source/WebCore/html/ColorInputType.cpp
Source/WebCore/html/ColorInputType.h
Source/WebCore/html/DateInputType.cpp
Source/WebCore/html/DateInputType.h
Source/WebCore/html/DateTimeInputType.cpp
Source/WebCore/html/DateTimeInputType.h
Source/WebCore/html/DateTimeLocalInputType.cpp
Source/WebCore/html/DateTimeLocalInputType.h
Source/WebCore/html/EmailInputType.cpp
Source/WebCore/html/EmailInputType.h
Source/WebCore/html/HTMLDataListElement.cpp
Source/WebCore/html/HTMLFormControlElement.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/InputType.h
Source/WebCore/html/MonthInputType.cpp
Source/WebCore/html/MonthInputType.h
Source/WebCore/html/NumberInputType.cpp
Source/WebCore/html/NumberInputType.h
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/RangeInputType.h
Source/WebCore/html/SearchInputType.cpp
Source/WebCore/html/SearchInputType.h
Source/WebCore/html/TelephoneInputType.cpp
Source/WebCore/html/TelephoneInputType.h
Source/WebCore/html/TextInputType.cpp
Source/WebCore/html/TextInputType.h
Source/WebCore/html/TimeInputType.cpp
Source/WebCore/html/TimeInputType.h
Source/WebCore/html/URLInputType.cpp
Source/WebCore/html/URLInputType.h
Source/WebCore/html/WeekInputType.cpp
Source/WebCore/html/WeekInputType.h
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/page/ContentSecurityPolicy.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FeatureObserver.cpp [deleted file]
Source/WebCore/page/FeatureObserver.h [deleted file]
Source/WebCore/page/Page.h
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/workers/SharedWorker.cpp
Source/WebCore/workers/Worker.cpp

index 82271cd98ee45caf491d423945de014f6d1f1ba0..c4beb9b92e428c3f7d1f3778b7d601d09b01175b 100644 (file)
@@ -1704,7 +1704,6 @@ set(WebCore_SOURCES
     page/DragController.cpp
     page/EventHandler.cpp
     page/EventSource.cpp
-    page/FeatureObserver.cpp
     page/FocusController.cpp
     page/Frame.cpp
     page/FrameDestructionObserver.cpp
index a2e2f4d9c8f160f06dd9dda586b4952aabb89009..caab403850f2a6ca88cb203c8a407ec125659a9f 100644 (file)
@@ -1,3 +1,80 @@
+2014-02-27  Andreas Kling  <akling@apple.com>
+
+        Remove FeatureObserver.
+        <https://webkit.org/b/129439>
+
+        This code was only used by the Chromium port and nobody else is
+        making use of it.
+
+        Reviewed by Anders Carlsson.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/EventTarget.cpp:
+        (WebCore::EventTarget::fireEventListeners):
+        * dom/EventTarget.h:
+        * html/ColorInputType.cpp:
+        * html/ColorInputType.h:
+        * html/DateInputType.cpp:
+        * html/DateInputType.h:
+        * html/DateTimeInputType.cpp:
+        * html/DateTimeInputType.h:
+        * html/DateTimeLocalInputType.cpp:
+        * html/DateTimeLocalInputType.h:
+        * html/EmailInputType.cpp:
+        * html/EmailInputType.h:
+        * html/HTMLDataListElement.cpp:
+        (WebCore::HTMLDataListElement::create):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::parseAttribute):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::parseAttribute):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::parseAttribute):
+        * html/InputType.cpp:
+        * html/InputType.h:
+        * html/MonthInputType.cpp:
+        * html/MonthInputType.h:
+        * html/NumberInputType.cpp:
+        * html/NumberInputType.h:
+        * html/RangeInputType.cpp:
+        * html/RangeInputType.h:
+        * html/SearchInputType.cpp:
+        * html/SearchInputType.h:
+        * html/TelephoneInputType.cpp:
+        * html/TelephoneInputType.h:
+        * html/TextInputType.cpp:
+        * html/TextInputType.h:
+        * html/TimeInputType.cpp:
+        * html/TimeInputType.h:
+        * html/URLInputType.cpp:
+        * html/URLInputType.h:
+        * html/WeekInputType.cpp:
+        * html/WeekInputType.h:
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::responseReceived):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
+        (WebCore::FrameLoader::dispatchDidCommitLoad):
+        * page/ContentSecurityPolicy.cpp:
+        (WebCore::ContentSecurityPolicy::didReceiveHeader):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::selectCursor):
+        * page/FeatureObserver.cpp: Removed.
+        * page/FeatureObserver.h: Removed.
+        * page/Page.h:
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects):
+        * workers/SharedWorker.cpp:
+        (WebCore::SharedWorker::create):
+        * workers/Worker.cpp:
+        (WebCore::Worker::create):
+
 2014-02-27  Chris Fleizach  <cfleizach@apple.com>
 
         speechSynthesis.speak of a zero length utterance kills future speech
index 19ead4e79cd27faef14bef989735cdc4ee951b6d..efc94eb71c6a4a5450765ce001654ccd8641e9b2 100644 (file)
@@ -4081,8 +4081,6 @@ webcore_sources += \
        Source/WebCore/page/EventHandler.h \
        Source/WebCore/page/EventSource.cpp \
        Source/WebCore/page/EventSource.h \
-       Source/WebCore/page/FeatureObserver.cpp \
-       Source/WebCore/page/FeatureObserver.h \
        Source/WebCore/page/FocusController.cpp \
        Source/WebCore/page/FocusController.h \
        Source/WebCore/page/FocusDirection.h \
index f882c3a4f9e2e635086ca5d7317c56d8692bdb16..5218b5bb895d454d7964ffde0d30303f93e9c6f1 100644 (file)
     <ClCompile Include="..\page\EventHandler.cpp" />
     <ClCompile Include="..\page\win\EventHandlerWin.cpp" />
     <ClCompile Include="..\page\EventSource.cpp" />
-    <ClCompile Include="..\page\FeatureObserver.cpp" />
     <ClCompile Include="..\page\FocusController.cpp" />
     <ClCompile Include="..\page\Frame.cpp" />
     <ClCompile Include="..\page\FrameDestructionObserver.cpp" />
     <ClInclude Include="..\page\DragState.h" />
     <ClInclude Include="..\page\EventHandler.h" />
     <ClInclude Include="..\page\EventSource.h" />
-    <ClInclude Include="..\page\FeatureObserver.h" />
     <ClInclude Include="..\page\FocusController.h" />
     <ClInclude Include="..\page\FocusDirection.h" />
     <ClInclude Include="..\page\Frame.h" />
index a617409efd9f4ece37ebb3f60bd863918cae08b8..d37d19d6de9ab7bc36fe1bb68b64f64ac6be3f31 100644 (file)
     <ClCompile Include="..\page\EventSource.cpp">
       <Filter>page</Filter>
     </ClCompile>
-    <ClCompile Include="..\page\FeatureObserver.cpp">
-      <Filter>page</Filter>
-    </ClCompile>
     <ClCompile Include="..\page\FocusController.cpp">
       <Filter>page</Filter>
     </ClCompile>
     <ClInclude Include="..\page\EventSource.h">
       <Filter>page</Filter>
     </ClInclude>
-    <ClInclude Include="..\page\FeatureObserver.h">
-      <Filter>page</Filter>
-    </ClInclude>
     <ClInclude Include="..\page\FocusController.h">
       <Filter>page</Filter>
     </ClInclude>
index e4bfe44209ac45521672c305abd1cddd72bcd5c1..56bb53fb32a8a47468c57faf437d70001c53ad7f 100644 (file)
                97C078501165D5BE003A32EF /* SuffixTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 97C0784F1165D5BE003A32EF /* SuffixTree.h */; };
                97C471DB12F925BD0086354B /* ContentSecurityPolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97C471D912F925BC0086354B /* ContentSecurityPolicy.cpp */; };
                97C471DC12F925BD0086354B /* ContentSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 97C471DA12F925BD0086354B /* ContentSecurityPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               97C740141603F7A10011FF2D /* FeatureObserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97C740121603F7A10011FF2D /* FeatureObserver.cpp */; };
-               97C740151603F7A10011FF2D /* FeatureObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 97C740131603F7A10011FF2D /* FeatureObserver.h */; settings = {ATTRIBUTES = (Private, ); }; };
                97D2AD0314B823A60093DF32 /* DOMWindowProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97D2AD0114B823A60093DF32 /* DOMWindowProperty.cpp */; };
                97D2AD0414B823A60093DF32 /* DOMWindowProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 97D2AD0214B823A60093DF32 /* DOMWindowProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
                97DCE20110807C750057D394 /* HistoryController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DCE1FF10807C750057D394 /* HistoryController.cpp */; };
                97C1F552122855CB00EDE617 /* AtomicHTMLToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicHTMLToken.h; path = parser/AtomicHTMLToken.h; sourceTree = "<group>"; };
                97C471D912F925BC0086354B /* ContentSecurityPolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentSecurityPolicy.cpp; sourceTree = "<group>"; };
                97C471DA12F925BD0086354B /* ContentSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentSecurityPolicy.h; sourceTree = "<group>"; };
-               97C740121603F7A10011FF2D /* FeatureObserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FeatureObserver.cpp; sourceTree = "<group>"; };
-               97C740131603F7A10011FF2D /* FeatureObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeatureObserver.h; sourceTree = "<group>"; };
                97D2AD0114B823A60093DF32 /* DOMWindowProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowProperty.cpp; sourceTree = "<group>"; };
                97D2AD0214B823A60093DF32 /* DOMWindowProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowProperty.h; sourceTree = "<group>"; };
                97DCE1FF10807C750057D394 /* HistoryController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryController.cpp; sourceTree = "<group>"; };
                                E0FEF371B27C53EAC1C1FBEE /* EventSource.cpp */,
                                E0FEF371B17C53EAC1C1FBEE /* EventSource.h */,
                                E0FEF371B07C53EAC1C1FBEE /* EventSource.idl */,
-                               97C740121603F7A10011FF2D /* FeatureObserver.cpp */,
-                               97C740131603F7A10011FF2D /* FeatureObserver.h */,
                                14993BE30B2F2B1C0050497F /* FocusController.cpp */,
                                14993BE40B2F2B1C0050497F /* FocusController.h */,
                                062287830B4DB322000C34DF /* FocusDirection.h */,
                                6E67D2A71280E8A4008758F7 /* Extensions3DOpenGL.h in Headers */,
                                44DAB5B215A623580097C1E4 /* Extensions3DOpenGLCommon.h in Headers */,
                                7728694F14F8882500F484DC /* EXTTextureFilterAnisotropic.h in Headers */,
-                               97C740151603F7A10011FF2D /* FeatureObserver.h in Headers */,
                                A75E8B890E1DE2D6007F2481 /* FEBlend.h in Headers */,
                                A75E8B8B0E1DE2D6007F2481 /* FEColorMatrix.h in Headers */,
                                A75E8B8D0E1DE2D6007F2481 /* FEComponentTransfer.h in Headers */,
                                6E67D2A61280E8A4008758F7 /* Extensions3DOpenGL.cpp in Sources */,
                                44DAB5B115A623580097C1E4 /* Extensions3DOpenGLCommon.cpp in Sources */,
                                7728694E14F8882500F484DC /* EXTTextureFilterAnisotropic.cpp in Sources */,
-                               97C740141603F7A10011FF2D /* FeatureObserver.cpp in Sources */,
                                A75E8B880E1DE2D6007F2481 /* FEBlend.cpp in Sources */,
                                A75E8B8A0E1DE2D6007F2481 /* FEColorMatrix.cpp in Sources */,
                                A75E8B8C0E1DE2D6007F2481 /* FEComponentTransfer.cpp in Sources */,
index c4f9d03655ef4bc118cd7c92ee157eaaf000a160..7375eabed47ae18ef11033e7fcba10088db66a13 100644 (file)
@@ -177,41 +177,6 @@ static const AtomicString& legacyType(const Event* event)
     return emptyAtom;
 }
 
-static inline bool shouldObserveLegacyType(const AtomicString& legacyTypeName, bool hasLegacyTypeListeners, bool hasNewTypeListeners, FeatureObserver::Feature& feature)
-{
-    if (legacyTypeName == eventNames().webkitTransitionEndEvent) {
-        if (hasLegacyTypeListeners) {
-            if (hasNewTypeListeners)
-                feature = FeatureObserver::PrefixedAndUnprefixedTransitionEndEvent;
-            else
-                feature = FeatureObserver::PrefixedTransitionEndEvent;
-        } else {
-            ASSERT(hasNewTypeListeners);
-            feature = FeatureObserver::UnprefixedTransitionEndEvent;
-        }
-        return true;
-    }
-    return false;
-}
-
-void EventTarget::setupLegacyTypeObserverIfNeeded(const AtomicString& legacyTypeName, bool hasLegacyTypeListeners, bool hasNewTypeListeners)
-{
-    ASSERT(!legacyTypeName.isEmpty());
-    ASSERT(hasLegacyTypeListeners || hasNewTypeListeners);
-
-    ScriptExecutionContext* context = scriptExecutionContext();
-    if (!context || !context->isDocument())
-        return;
-
-    Document* document = toDocument(context);
-    if (!document->domWindow())
-        return;
-
-    FeatureObserver::Feature feature;
-    if (shouldObserveLegacyType(legacyTypeName, hasLegacyTypeListeners, hasNewTypeListeners, feature))
-        FeatureObserver::observe(document->domWindow(), feature);
-}
-
 bool EventTarget::fireEventListeners(Event* event)
 {
     ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
@@ -237,9 +202,6 @@ bool EventTarget::fireEventListeners(Event* event)
         event->setType(typeName);
     }
 
-    if (!legacyTypeName.isEmpty() && (legacyListenersVector || listenersVector))
-        setupLegacyTypeObserverIfNeeded(legacyTypeName, !!legacyListenersVector, !!listenersVector);
-
     return !event->defaultPrevented();
 }
         
index d11ec69a6bd812ec54ae3ffec3cf23b30b3db74b..56b7d15eda262a90de4dd56dba689e5848cee468 100644 (file)
@@ -155,7 +155,6 @@ namespace WebCore {
         virtual void derefEventTarget() = 0;
         
         void fireEventListeners(Event*, EventTargetData*, EventListenerVector&);
-        void setupLegacyTypeObserverIfNeeded(const AtomicString& legacyTypeName, bool hasLegacyTypeListeners, bool hasNewTypeListeners);
 
         friend class EventListenerIterator;
     };
index 97cd4359927bfc1b78a968740911cabda2c22062..2e2d9bd3b0a3dbe4c8226e6095b77b0a080d028d 100644 (file)
@@ -69,11 +69,6 @@ ColorInputType::~ColorInputType()
     endColorChooser();
 }
 
-void ColorInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeColor);
-}
-
 bool ColorInputType::isColorControl() const
 {
     return true;
index 360e3005c36c4759e75a6ce8f237694b0eedd5c7..bf94e86e63d9795a362defd631c25216d8faba5f 100644 (file)
@@ -51,7 +51,6 @@ public:
     virtual Vector<Color> suggestions() const override;
 
 private:
-    virtual void attach() override;
     virtual bool isColorControl() const override;
     virtual const AtomicString& formControlType() const override;
     virtual bool supportsRequired() const override;
index 91a7bc2ecb373793fa91ca33af91db17770673a5..9de785a7e9eccd324386a4a0f259fd08f371c03e 100644 (file)
@@ -49,11 +49,6 @@ DateInputType::DateInputType(HTMLInputElement& element)
 {
 }
 
-void DateInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeDate);
-}
-
 const AtomicString& DateInputType::formControlType() const
 {
     return InputTypeNames::date();
index f14a29f4b224c67ac80520a9c42a4df9b10e128e..88e0aa30204be54e7f81e0920a45786b41712b7c 100644 (file)
@@ -41,7 +41,6 @@ public:
     explicit DateInputType(HTMLInputElement&);
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual DateComponents::Type dateType() const override;
     virtual StepRange createStepRange(AnyStepHandling) const override;
index 1e7fb1ffae3b60a4639f8ff237b96c1ddb1433c1..dc10f8939154b003e2db84070e5c3befc0a20314 100644 (file)
@@ -45,11 +45,6 @@ static const int dateTimeDefaultStep = 60;
 static const int dateTimeDefaultStepBase = 0;
 static const int dateTimeStepScaleFactor = 1000;
 
-void DateTimeInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeDateTime);
-}
-
 const AtomicString& DateTimeInputType::formControlType() const
 {
     return InputTypeNames::datetime();
index aab26a3daaf5ad495274a813681d666d0eb734e2..f5f741087f0c877436806d1a2b3a5bec28d9faf1 100644 (file)
@@ -42,7 +42,6 @@ public:
     explicit DateTimeInputType(HTMLInputElement& element) : BaseDateTimeInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual DateComponents::Type dateType() const override;
     virtual StepRange createStepRange(AnyStepHandling) const override;
index 6f0f24933cc94e2d3ef8219ab75ce7b1dd5273ef..ebda3d3f42e4e6fa8a94c0a71c3f80f754bfbae7 100644 (file)
@@ -44,11 +44,6 @@ static const int dateTimeLocalDefaultStep = 60;
 static const int dateTimeLocalDefaultStepBase = 0;
 static const int dateTimeLocalStepScaleFactor = 1000;
 
-void DateTimeLocalInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeDateTimeLocal);
-}
-
 const AtomicString& DateTimeLocalInputType::formControlType() const
 {
     return InputTypeNames::datetimelocal();
index b1bc0490dc627c2bc05c34fdb2fe5889e0571c3f..d8a53b4433a9314263685faa1b6642efc2c553c0 100644 (file)
@@ -41,7 +41,6 @@ public:
     explicit DateTimeLocalInputType(HTMLInputElement& element) : BaseChooserOnlyDateAndTimeInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual DateComponents::Type dateType() const override;
     virtual double valueAsDate() const override;
index 57027019151fc396eb8731206084a536ca57ecdd..a5f6827b5e193566ac6a224dbd7405b630f22844 100644 (file)
@@ -52,12 +52,6 @@ static bool isValidEmailAddress(const String& address)
     return !matchOffset && matchLength == addressLength;
 }
 
-void EmailInputType::attach()
-{
-    TextFieldInputType::attach();
-    observeFeatureIfVisible(FeatureObserver::InputTypeEmail);
-}
-
 const AtomicString& EmailInputType::formControlType() const
 {
     return InputTypeNames::email();
index a0c6451638f2151147fecec86950646cdc20eef6..20b40dd0ef51c7d3892aa354230f964887e3e022 100644 (file)
@@ -40,7 +40,6 @@ public:
     explicit EmailInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual bool typeMismatchFor(const String&) const override;
     virtual bool typeMismatch() const override;
index 8c204eb046c88acbaa63650e4b2af362e20638f6..1c03f1c2fbf93a3ec35833bde26810172339530c 100644 (file)
@@ -33,7 +33,6 @@
 #if ENABLE(DATALIST_ELEMENT)
 #include "HTMLDataListElement.h"
 
-#include "FeatureObserver.h"
 #include "HTMLNames.h"
 #include "IdTargetObserverRegistry.h"
 
@@ -46,7 +45,6 @@ inline HTMLDataListElement::HTMLDataListElement(const QualifiedName& tagName, Do
 
 PassRefPtr<HTMLDataListElement> HTMLDataListElement::create(const QualifiedName& tagName, Document& document)
 {
-    FeatureObserver::observe(&document, FeatureObserver::DataListElement);
     return adoptRef(new HTMLDataListElement(tagName, document));
 }
 
index 50b0bfbfb2fa465b676e89ab48b849a5489c6f74..0e467d5d0c93e23c5a7dccca6340bd048a80836d 100644 (file)
@@ -29,7 +29,6 @@
 #include "Event.h"
 #include "EventHandler.h"
 #include "EventNames.h"
-#include "FeatureObserver.h"
 #include "Frame.h"
 #include "HTMLFieldSetElement.h"
 #include "HTMLFormElement.h"
@@ -124,10 +123,9 @@ void HTMLFormControlElement::setAncestorDisabled(bool isDisabled)
 
 void HTMLFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
-    if (name == formAttr) {
+    if (name == formAttr)
         formAttributeChanged();
-        FeatureObserver::observe(&document(), FeatureObserver::FormAttribute);
-    } else if (name == disabledAttr) {
+    else if (name == disabledAttr) {
         bool oldDisabled = m_disabled;
         m_disabled = !value.isNull();
         if (oldDisabled != m_disabled)
@@ -142,10 +140,6 @@ void HTMLFormControlElement::parseAttribute(const QualifiedName& name, const Ato
         m_isRequired = !value.isNull();
         if (wasRequired != m_isRequired)
             requiredAttributeChanged();
-        FeatureObserver::observe(&document(), FeatureObserver::RequiredAttribute);
-    } else if (name == autofocusAttr) {
-        HTMLElement::parseAttribute(name, value);
-        FeatureObserver::observe(&document(), FeatureObserver::AutoFocusAttribute);
     } else
         HTMLElement::parseAttribute(name, value);
 }
index 8ffa3a7a98ae6ddc93f94ed75810df97b37711bf..df20d3e6d044db0779ad51d6b1b6a0959a1fc3a3 100644 (file)
@@ -688,34 +688,26 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
             setNeedsStyleRecalc(ReconstructRenderTree);
         else
             setNeedsStyleRecalc();
-        FeatureObserver::observe(&document(), FeatureObserver::ResultsAttribute);
     } else if (name == autosaveAttr) {
         setNeedsStyleRecalc();
-        FeatureObserver::observe(&document(), FeatureObserver::AutoSaveAttribute);
     } else if (name == incrementalAttr) {
         setNeedsStyleRecalc();
-        FeatureObserver::observe(&document(), FeatureObserver::IncrementalAttribute);
     } else if (name == minAttr) {
         m_inputType->minOrMaxAttributeChanged();
         setNeedsValidityCheck();
-        FeatureObserver::observe(&document(), FeatureObserver::MinAttribute);
     } else if (name == maxAttr) {
         m_inputType->minOrMaxAttributeChanged();
         setNeedsValidityCheck();
-        FeatureObserver::observe(&document(), FeatureObserver::MaxAttribute);
     } else if (name == multipleAttr) {
         m_inputType->multipleAttributeChanged();
         setNeedsValidityCheck();
     } else if (name == stepAttr) {
         m_inputType->stepAttributeChanged();
         setNeedsValidityCheck();
-        FeatureObserver::observe(&document(), FeatureObserver::StepAttribute);
     } else if (name == patternAttr) {
         setNeedsValidityCheck();
-        FeatureObserver::observe(&document(), FeatureObserver::PatternAttribute);
     } else if (name == precisionAttr) {
         setNeedsValidityCheck();
-        FeatureObserver::observe(&document(), FeatureObserver::PrecisionAttribute);
     } else if (name == disabledAttr) {
         HTMLTextFormControlElement::parseAttribute(name, value);
         m_inputType->disabledAttributeChanged();
@@ -730,7 +722,6 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
             resetListAttributeTargetObserver();
             listAttributeTargetChanged();
         }
-        FeatureObserver::observe(&document(), FeatureObserver::ListAttribute);
     }
 #endif
 #if ENABLE(INPUT_SPEECH)
@@ -745,7 +736,6 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
         setNeedsStyleRecalc(ReconstructRenderTree);
 
         setFormControlValueMatchesRenderer(false);
-        FeatureObserver::observe(&document(), FeatureObserver::PrefixedSpeechAttribute);
     } else if (name == onwebkitspeechchangeAttr)
         setAttributeEventListener(eventNames().webkitspeechchangeEvent, name, value);
 #endif
index 4c8c0f0724acebb52eeb4bfaa19debede04fc54b..caf9bd088cf6733f0ffd537d3f79f02e836ca83b 100644 (file)
@@ -31,7 +31,6 @@
 #include "Document.h"
 #include "Event.h"
 #include "EventNames.h"
-#include "FeatureObserver.h"
 #include "Frame.h"
 #include "FrameSelection.h"
 #include "HTMLBRElement.h"
@@ -486,10 +485,9 @@ void HTMLTextFormControlElement::selectionChanged(bool shouldFireSelectEvent)
 
 void HTMLTextFormControlElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
-    if (name == placeholderAttr) {
+    if (name == placeholderAttr)
         updatePlaceholderVisibility(true);
-        FeatureObserver::observe(&document(), FeatureObserver::PlaceholderAttribute);
-    } else
+    else
         HTMLFormControlElementWithState::parseAttribute(name, value);
 }
 
index 5c9c62371e42ca8b11603842c97f55f76415faa7..b6e376e0f1355367fe0328234a5a67738ee270fe 100644 (file)
@@ -1150,12 +1150,4 @@ void InputType::stepUpFromRenderer(int n)
     }
 }
 
-void InputType::observeFeatureIfVisible(FeatureObserver::Feature feature) const
-{
-    if (RenderStyle* style = element().renderStyle()) {
-        if (style->visibility() != HIDDEN)
-            FeatureObserver::observe(&element().document(), feature);
-    }
-}
-
 } // namespace WebCore
index a5d606df9c9b835e4b920cb87267e71133a00a06..5549b68b980609392d91657db04572f8cf1f0a47 100644 (file)
@@ -33,7 +33,6 @@
 #ifndef InputType_h
 #define InputType_h
 
-#include "FeatureObserver.h"
 #include "HTMLTextFormControlElement.h"
 #include "RenderPtr.h"
 #include "StepRange.h"
@@ -325,7 +324,6 @@ protected:
     HTMLInputElement& element() const { return m_element; }
     Chrome* chrome() const;
     Decimal parseToNumberOrNaN(const String&) const;
-    void observeFeatureIfVisible(FeatureObserver::Feature) const;
 
 private:
     // Helper for stepUp()/stepDown(). Adds step value * count to the current value.
index a855ea0f006ec4ba3d4a3bedfca6ec9caaf1feea..62f1a5b3ba2439b6b1eeb5dcad76c78dd0dd749e 100644 (file)
@@ -47,11 +47,6 @@ static const int monthDefaultStep = 1;
 static const int monthDefaultStepBase = 0;
 static const int monthStepScaleFactor = 1;
 
-void MonthInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeMonth);
-}
-
 const AtomicString& MonthInputType::formControlType() const
 {
     return InputTypeNames::month();
index f312533943c94489eb99ca66d39a1b56de454ed4..cb869faec5bc4bd80ee4d5202d502a745477aaaf 100644 (file)
@@ -41,7 +41,6 @@ public:
     explicit MonthInputType(HTMLInputElement& element) : BaseChooserOnlyDateAndTimeInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual DateComponents::Type dateType() const override;
     virtual double valueAsDate() const override;
index 588820809a00229ebb6799c7f567e7ca3df0869a..84b3ccbd73eeda051ed07f0c88563325f4cde5a3 100644 (file)
@@ -92,12 +92,6 @@ static RealNumberRenderSize calculateRenderSize(const Decimal& value)
     return RealNumberRenderSize(sizeOfSign + sizeOfZero , numberOfZeroAfterDecimalPoint + sizeOfDigits);
 }
 
-void NumberInputType::attach()
-{
-    TextFieldInputType::attach();
-    observeFeatureIfVisible(FeatureObserver::InputTypeNumber);
-}
-
 const AtomicString& NumberInputType::formControlType() const
 {
     return InputTypeNames::number();
index 7aba7f9aa2d8c01552b036b9119c89e92a1fa9be..363eae006ddc2a741c99736d62b2154bf2d1ac83 100644 (file)
@@ -40,7 +40,6 @@ public:
     explicit NumberInputType(HTMLInputElement& element) : TextFieldInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavior) override;
     virtual double valueAsDouble() const override;
index 1c58576035e4f789969d77bdf75435768ba6cf10..8096a8396a76465f973a60d8db99c63d205f05ef 100644 (file)
@@ -81,11 +81,6 @@ RangeInputType::RangeInputType(HTMLInputElement& element)
 {
 }
 
-void RangeInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeRange);
-}
-
 bool RangeInputType::isRangeControl() const
 {
     return true;
index f56ca262d25bbb8d9dbe37283ae5e0286b608c7d..e7b5e11a6ba558f702d935aebca440284636bfe2 100644 (file)
@@ -42,7 +42,6 @@ public:
     explicit RangeInputType(HTMLInputElement&);
 
 private:
-    virtual void attach() override;
     virtual bool isRangeControl() const override;
     virtual const AtomicString& formControlType() const override;
     virtual double valueAsDouble() const override;
index 7a9e4cadea52633a4fee4cd5d491d1d7d6073361..7d468022f622407230178fdd96a6c63ccfc684e6 100644 (file)
@@ -51,12 +51,6 @@ SearchInputType::SearchInputType(HTMLInputElement& element)
 {
 }
 
-void SearchInputType::attach()
-{
-    TextFieldInputType::attach();
-    observeFeatureIfVisible(FeatureObserver::InputTypeSearch);
-}
-
 void SearchInputType::addSearchResult()
 {
 #if !PLATFORM(IOS)
index 14760f2500ae14d0c3b3b0acbf11c4a980e84ca4..2f9b6f3a78470aad426dc22d67f3eac1dfd5a6b9 100644 (file)
@@ -46,7 +46,6 @@ public:
     void stopSearchEventTimer();
 
 private:
-    virtual void attach() override;
     virtual void addSearchResult() override;
     virtual RenderPtr<RenderElement> createInputRenderer(PassRef<RenderStyle>) override;
     virtual const AtomicString& formControlType() const override;
index 77fd0e0a4bc0f72024a68f46df4e9a3ada8fdce9..b6f5916d475db4ed931aa45bf03190d86426006f 100644 (file)
 
 namespace WebCore {
 
-void TelephoneInputType::attach()
-{
-    TextFieldInputType::attach();
-    observeFeatureIfVisible(FeatureObserver::InputTypeTel);
-}
-
 const AtomicString& TelephoneInputType::formControlType() const
 {
     return InputTypeNames::telephone();
index 5804f9b67521fd153c678931df86ea1e944d5b9c..b723f9163e779794e3bbcab90ce17e40fd44f1db 100644 (file)
@@ -40,7 +40,6 @@ public:
     explicit TelephoneInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual bool shouldRespectSpeechAttribute() override;
     virtual bool isTelephoneField() const override;
index aa0804e1ce85d334e4224a828eac38e8f68eeb20..e1c5dfed87cb5069cc71a0f4b611d23abf970934 100644 (file)
@@ -39,16 +39,6 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-void TextInputType::attach()
-{
-    TextFieldInputType::attach();
-    const AtomicString& type = element().fastGetAttribute(typeAttr);
-    if (equalIgnoringCase(type, InputTypeNames::datetime()))
-        observeFeatureIfVisible(FeatureObserver::InputTypeDateTimeFallback);
-    else if (equalIgnoringCase(type, InputTypeNames::week()))
-        observeFeatureIfVisible(FeatureObserver::InputTypeWeekFallback);
-}
-
 const AtomicString& TextInputType::formControlType() const
 {
     return InputTypeNames::text();
index 34905a2b5bd9a274e2b72ce69a893902c642c24a..5cccd54bb323dc16075c3ef458da67999e4fca72 100644 (file)
@@ -40,7 +40,6 @@ public:
     explicit TextInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual bool shouldRespectSpeechAttribute() override;
 };
index 9db586dd141b281a4d274d991d1ec42dc2a43662..08d6b3092f9d2bdb2ff80049d2de533be02ea1e5 100644 (file)
@@ -52,11 +52,6 @@ TimeInputType::TimeInputType(HTMLInputElement& element)
 {
 }
 
-void TimeInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeTime);
-}
-
 const AtomicString& TimeInputType::formControlType() const
 {
     return InputTypeNames::time();
index 2c55bdffff40a7fe9b36d5ebcc8db1c662f17a2f..4b1e01afd92d59c2676e882cb6f656b176ae0868 100644 (file)
@@ -41,7 +41,6 @@ public:
     explicit TimeInputType(HTMLInputElement&);
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual DateComponents::Type dateType() const override;
     virtual Decimal defaultValueForStepUp() const override;
index cba29ec505a47ac2b504bbe6f2fe18a499aff28b..f3229ec499e75ecdb4104a78281caa4d85332350 100644 (file)
 
 namespace WebCore {
 
-void URLInputType::attach()
-{
-    TextFieldInputType::attach();
-    observeFeatureIfVisible(FeatureObserver::InputTypeURL);
-}
-
 const AtomicString& URLInputType::formControlType() const
 {
     return InputTypeNames::url();
index 396056ffcb37d9fae2d9a082b84b03ed00994c1a..eae3caf332032938d78f57167816110dfc73eab8 100644 (file)
@@ -40,7 +40,6 @@ public:
     explicit URLInputType(HTMLInputElement& element) : BaseTextInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual bool typeMismatchFor(const String&) const override;
     virtual bool typeMismatch() const override;
index 5bee921d07fa3855ce6bdbd1a61e9397474329d3..149ed137102db922172e2cec517efcbc5e288de2 100644 (file)
@@ -44,11 +44,6 @@ static const int weekDefaultStepBase = -259200000; // The first day of 1970-W01.
 static const int weekDefaultStep = 1;
 static const int weekStepScaleFactor = 604800000;
 
-void WeekInputType::attach()
-{
-    observeFeatureIfVisible(FeatureObserver::InputTypeWeek);
-}
-
 const AtomicString& WeekInputType::formControlType() const
 {
     return InputTypeNames::week();
index 8831f6d894b8cb98c5052a56b885a50647b2726b..3dfddfd2233e8ff7fb17abb71b117a8b66f02933 100644 (file)
@@ -41,7 +41,6 @@ public:
     explicit WeekInputType(HTMLInputElement& element) : BaseChooserOnlyDateAndTimeInputType(element) { }
 
 private:
-    virtual void attach() override;
     virtual const AtomicString& formControlType() const override;
     virtual DateComponents::Type dateType() const override;
     virtual StepRange createStepRange(AnyStepHandling) const override;
index 539a55dd2f3306dfdcd82c5883772005b7fca05d..59089ac221a3fba7661da657d19021fbadcb1f74 100644 (file)
@@ -635,10 +635,8 @@ void DocumentLoader::responseReceived(CachedResource* resource, const ResourceRe
     if (m_isLoadingMultipartContent) {
         setupForReplace();
         m_mainResource->clear();
-    } else if (response.isMultipart()) {
-        FeatureObserver::observe(m_frame->document(), FeatureObserver::MultipartMainResource);
+    } else if (response.isMultipart())
         m_isLoadingMultipartContent = true;
-    }
 
     m_response = response;
 
index b672e256e0583ae515252223b67c50efaf585565..fff622e9f01ff0d5e200097b2e43b08fafb26811 100644 (file)
@@ -3036,8 +3036,6 @@ void FrameLoader::applyUserAgent(ResourceRequest& request)
 
 bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, const URL& url, unsigned long requestIdentifier)
 {
-    FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptions);
-
     Frame& topFrame = m_frame.tree().top();
     if (&m_frame == &topFrame)
         return false;
@@ -3046,15 +3044,12 @@ bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, con
 
     switch (disposition) {
     case XFrameOptionsSameOrigin: {
-        FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptionsSameOrigin);
         RefPtr<SecurityOrigin> origin = SecurityOrigin::create(url);
         if (!origin->isSameSchemeHostPort(topFrame.document()->securityOrigin()))
             return true;
         for (Frame* frame = m_frame.tree().parent(); frame; frame = frame->tree().parent()) {
-            if (!origin->isSameSchemeHostPort(frame->document()->securityOrigin())) {
-                FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptionsSameOriginWithBadAncestorChain);
+            if (!origin->isSameSchemeHostPort(frame->document()->securityOrigin()))
                 break;
-            }
         }
         return false;
     }
@@ -3362,12 +3357,10 @@ void FrameLoader::dispatchDidCommitLoad()
 
     InspectorInstrumentation::didCommitLoad(&m_frame, m_documentLoader.get());
 
-    if (m_frame.isMainFrame()) {
-        m_frame.page()->featureObserver()->didCommitLoad();
 #if ENABLE(REMOTE_INSPECTOR)
+    if (m_frame.isMainFrame())
         m_frame.page()->remoteInspectorInformationDidChange();
 #endif
-    }
 }
 
 void FrameLoader::tellClientAboutPastMemoryCacheLoads()
index 1fa112a5d4211ca9d0833c86d6801e42ff1a02df..373efcbe912e4e451266b7b089c88405ebc1fa2b 100644 (file)
@@ -30,7 +30,6 @@
 #include "Console.h"
 #include "DOMStringList.h"
 #include "Document.h"
-#include "FeatureObserver.h"
 #include "FormData.h"
 #include "FormDataList.h"
 #include "Frame.h"
@@ -155,22 +154,6 @@ bool isDirectiveName(const String& name)
     );
 }
 
-FeatureObserver::Feature getFeatureObserverType(ContentSecurityPolicy::HeaderType type)
-{
-    switch (type) {
-    case ContentSecurityPolicy::PrefixedEnforce:
-        return FeatureObserver::PrefixedContentSecurityPolicy;
-    case ContentSecurityPolicy::Enforce:
-        return FeatureObserver::ContentSecurityPolicy;
-    case ContentSecurityPolicy::PrefixedReport:
-        return FeatureObserver::PrefixedContentSecurityPolicyReportOnly;
-    case ContentSecurityPolicy::Report:
-        return FeatureObserver::ContentSecurityPolicyReportOnly;
-    }
-    ASSERT_NOT_REACHED();
-    return FeatureObserver::NumberOfFeatures;
-}
-
 const ScriptCallFrame& getFirstNonNativeFrame(PassRefPtr<ScriptCallStack> stack)
 {
     int frameNumber = 0;
@@ -1467,12 +1450,6 @@ void ContentSecurityPolicy::copyStateFrom(const ContentSecurityPolicy* other)
 
 void ContentSecurityPolicy::didReceiveHeader(const String& header, HeaderType type)
 {
-    if (m_scriptExecutionContext->isDocument()) {
-        Document* document = toDocument(m_scriptExecutionContext);
-        if (document->domWindow())
-            FeatureObserver::observe(document->domWindow(), getFeatureObserverType(type));
-    }
-
     // RFC2616, section 4.2 specifies that headers appearing multiple times can
     // be combined with a comma. Walk the header string, and parse each comma
     // separated chunk as a separate header.
index 5e0ffac88473606829ba7d07e2388e971e4d4996..0f8a9cba93efc187f18a63237680a7f2ea036ad6 100644 (file)
@@ -1316,10 +1316,9 @@ OptionalCursor EventHandler::selectCursor(const HitTestResult& result, bool shif
     const Cursor& iBeam = horizontalText ? iBeamCursor() : verticalTextCursor();
 
 #if ENABLE(CURSOR_VISIBILITY)
-    if (style && style->cursorVisibility() == CursorVisibilityAutoHide) {
-        FeatureObserver::observe(m_frame.document(), FeatureObserver::CursorVisibility);
+    if (style && style->cursorVisibility() == CursorVisibilityAutoHide)
         startAutoHideCursorTimer();
-    else
+    else
         cancelAutoHideCursorTimer();
 #endif
 
diff --git a/Source/WebCore/page/FeatureObserver.cpp b/Source/WebCore/page/FeatureObserver.cpp
deleted file mode 100644 (file)
index f5397ab..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2012 Google, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "FeatureObserver.h"
-
-#include "DOMWindow.h"
-#include "Document.h"
-#include "HistogramSupport.h"
-#include "Page.h"
-
-namespace WebCore {
-
-FeatureObserver::FeatureObserver()
-{
-}
-
-FeatureObserver::~FeatureObserver()
-{
-    updateMeasurements();
-}
-
-void FeatureObserver::updateMeasurements()
-{
-    if (!m_featureBits)
-        return;
-
-    // Clearing feature bits is timing sensitive. Ports other than chromium do not use HistogramSupport,
-    // and pull the results on certain navigation events instead.
-    m_featureBits->clearAll();
-}
-
-void FeatureObserver::didCommitLoad()
-{
-    updateMeasurements();
-}
-
-void FeatureObserver::observe(Document* document, Feature feature)
-{
-    if (!document)
-        return;
-
-    Page* page = document->page();
-    if (!page)
-        return;
-
-    page->featureObserver()->didObserve(feature);
-}
-
-void FeatureObserver::observe(DOMWindow* domWindow, Feature feature)
-{
-    ASSERT(domWindow);
-    observe(domWindow->document(), feature);
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/page/FeatureObserver.h b/Source/WebCore/page/FeatureObserver.h
deleted file mode 100644 (file)
index d7f4e42..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (C) 2012 Google, Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FeatureObserver_h
-#define FeatureObserver_h
-
-#include <wtf/BitVector.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-class DOMWindow;
-class Document;
-
-class FeatureObserver {
-    WTF_MAKE_NONCOPYABLE(FeatureObserver);
-public:
-    FeatureObserver();
-    ~FeatureObserver();
-
-    enum Feature {
-        PageDestruction,
-        LegacyNotifications,
-        MultipartMainResource,
-        PrefixedIndexedDB,
-        WorkerStart,
-        SharedWorkerStart,
-        LegacyWebAudio,
-        WebAudioStart,
-        PrefixedContentSecurityPolicy,
-        UnprefixedIndexedDB,
-        OpenWebDatabase,
-        UnusedSlot01, // We used this slot for LegacyHTMLNotifications.
-        LegacyTextNotifications,
-        UnprefixedRequestAnimationFrame,
-        PrefixedRequestAnimationFrame,
-        ContentSecurityPolicy,
-        ContentSecurityPolicyReportOnly,
-        PrefixedContentSecurityPolicyReportOnly,
-        PrefixedTransitionEndEvent,
-        UnprefixedTransitionEndEvent,
-        PrefixedAndUnprefixedTransitionEndEvent,
-        AutoFocusAttribute,
-        AutoSaveAttribute,
-        DataListElement,
-        FormAttribute,
-        IncrementalAttribute,
-        InputTypeColor,
-        InputTypeDate,
-        InputTypeDateTime,
-        InputTypeDateTimeFallback,
-        InputTypeDateTimeLocal,
-        InputTypeEmail,
-        InputTypeMonth,
-        InputTypeNumber,
-        InputTypeRange,
-        InputTypeSearch,
-        InputTypeTel,
-        InputTypeTime,
-        InputTypeURL,
-        InputTypeWeek,
-        InputTypeWeekFallback,
-        ListAttribute,
-        MaxAttribute,
-        MinAttribute,
-        PatternAttribute,
-        PlaceholderAttribute,
-        PrecisionAttribute,
-        PrefixedDirectoryAttribute,
-        PrefixedSpeechAttribute,
-        RequiredAttribute,
-        ResultsAttribute,
-        StepAttribute,
-        PageVisits,
-        HTMLMarqueeElement,
-        CSSOverflowMarquee,
-        Reflection,
-        CursorVisibility,
-        StorageInfo,
-        XFrameOptions,
-        XFrameOptionsSameOrigin,
-        XFrameOptionsSameOriginWithBadAncestorChain,
-        DeprecatedFlexboxWebContent,
-        DeprecatedFlexboxChrome,
-        DeprecatedFlexboxChromeExtension,
-        // Add new features above this line. Don't change assigned numbers of each items.
-        NumberOfFeatures, // This enum value must be last.
-    };
-
-    static void observe(Document*, Feature);
-    static void observe(DOMWindow*, Feature);
-    void didCommitLoad();
-
-    const BitVector* accumulatedFeatureBits() const { return m_featureBits.get(); }
-
-private:
-    void didObserve(Feature feature)
-    {
-        ASSERT(feature != PageDestruction); // PageDestruction is reserved as a scaling factor.
-        ASSERT(feature < NumberOfFeatures);
-        if (!m_featureBits) {
-            m_featureBits = adoptPtr(new BitVector(NumberOfFeatures));
-            m_featureBits->clearAll();
-        }
-        m_featureBits->quickSet(feature);
-    }
-
-    void updateMeasurements();
-
-    OwnPtr<BitVector> m_featureBits;
-};
-
-} // namespace WebCore
-    
-#endif // FeatureObserver_h
index e41d1247c036ee4e6bf8b5b080b279b847d3b386..20f9bf1dfd3840bbff3b99f15fcb980d82f37876 100644 (file)
@@ -21,7 +21,6 @@
 #ifndef Page_h
 #define Page_h
 
-#include "FeatureObserver.h"
 #include "FindOptions.h"
 #include "FrameLoaderTypes.h"
 #include "LayoutMilestones.h"
@@ -218,8 +217,6 @@ public:
     ProgressTracker& progress() const { return *m_progress; }
     BackForwardController& backForward() const { return *m_backForwardController; }
 
-    FeatureObserver* featureObserver() { return &m_featureObserver; }
-
 #if ENABLE(VIEW_MODE_CSS_MEDIA)
     enum ViewMode {
         ViewModeInvalid,
@@ -472,8 +469,6 @@ private:
     PlugInClient* m_plugInClient;
     ValidationMessageClient* m_validationMessageClient;
 
-    FeatureObserver m_featureObserver;
-
     int m_subframeCount;
     String m_groupName;
     bool m_openedByDOM;
index 3dcd9e03f2ebe46da8080bc6aad36e3cf44e5e55..8d9c6c11aeb57b55ed1401a77f5fd8812db6d90a 100644 (file)
@@ -25,7 +25,6 @@
 #include "config.h"
 #include "RenderDeprecatedFlexibleBox.h"
 
-#include "FeatureObserver.h"
 #include "Font.h"
 #include "LayoutRepainter.h"
 #include "RenderLayer.h"
@@ -123,8 +122,6 @@ RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox(Element& element, PassR
 {
     setChildrenInline(false); // All of our children must be block-level
     m_stretchingChildren = false;
-
-    FeatureObserver::observe(&document(), FeatureObserver::DeprecatedFlexboxWebContent);
 }
 
 RenderDeprecatedFlexibleBox::~RenderDeprecatedFlexibleBox()
index 91a90eb293279e640629d86b35b343bfb8142893..972ff3631bb5e65cedec499d634e813c62cf0437 100644 (file)
@@ -52,7 +52,6 @@
 #include "DocumentEventQueue.h"
 #include "Element.h"
 #include "EventHandler.h"
-#include "FeatureObserver.h"
 #include "FloatConversion.h"
 #include "FloatPoint3D.h"
 #include "FloatRect.h"
@@ -6506,7 +6505,6 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle* oldStyle
     if (renderer().style().overflowX() == OMARQUEE && renderer().style().marqueeBehavior() != MNONE && renderer().isBox()) {
         if (!m_marquee)
             m_marquee = adoptPtr(new RenderMarquee(this));
-        FeatureObserver::observe(&renderer().document(), renderer().isHTMLMarquee() ? FeatureObserver::HTMLMarqueeElement : FeatureObserver::CSSOverflowMarquee);
         m_marquee->updateMarqueeStyle();
     }
     else if (m_marquee) {
@@ -6527,7 +6525,6 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle* oldStyle
             createReflection();
         else
             m_reflection->setStyle(createReflectionStyle());
-        FeatureObserver::observe(&renderer().document(), FeatureObserver::Reflection);
     }
     
     // FIXME: Need to detect a swap from custom to native scrollbars (and vice versa).
index 882e2290576aa956e868053e32c8ab0c43053d54..8eb35d20d7893f503e521fc58327b9a30e6ce37a 100644 (file)
@@ -36,7 +36,6 @@
 #include "SharedWorker.h"
 
 #include "ExceptionCode.h"
-#include "FeatureObserver.h"
 #include "InspectorInstrumentation.h"
 #include "URL.h"
 #include "MessageChannel.h"
@@ -60,8 +59,6 @@ PassRefPtr<SharedWorker> SharedWorker::create(ScriptExecutionContext& context, c
     ASSERT_WITH_SECURITY_IMPLICATION(context.isDocument());
     Document& document = static_cast<Document&>(context);
 
-    FeatureObserver::observe(document.domWindow(), FeatureObserver::SharedWorkerStart);
-
     RefPtr<SharedWorker> worker = adoptRef(new SharedWorker(context));
 
     RefPtr<MessageChannel> channel = MessageChannel::create(context);
index 629cf4e4e1f59a19c27df4ecddb42cd17993e610..7a9804ffe37b2178456d88ff4e3e997d35a50d96 100644 (file)
@@ -36,7 +36,6 @@
 #include "EventListener.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
-#include "FeatureObserver.h"
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "InspectorInstrumentation.h"
@@ -79,9 +78,6 @@ PassRefPtr<Worker> Worker::create(ScriptExecutionContext& context, const String&
 
     // We don't currently support nested workers, so workers can only be created from documents.
     ASSERT_WITH_SECURITY_IMPLICATION(context.isDocument());
-    Document& document = static_cast<Document&>(context);
-
-    FeatureObserver::observe(document.domWindow(), FeatureObserver::WorkerStart);
 
     RefPtr<Worker> worker = adoptRef(new Worker(context));