Unreviewed, rolling out r153925.

http://trac.webkit.org/changeset/153925
https://bugs.webkit.org/show_bug.cgi?id=119768

broke fast/media/media-query-list-07.html (Requested by kling
on #webkit).

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::JSTestCallback):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* css/MediaAllInOne.cpp:
* css/MediaQueryListListener.cpp: Copied from Source/WebCore/css/MediaQueryListListener.idl.
(WebCore::MediaQueryListListener::queryChanged):
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::create):
(WebCore::MediaQueryListListener::operator==):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 2ce08b1d
......@@ -316,7 +316,6 @@ set(WebCore_IDL_FILES
css/FontLoader.idl
css/MediaList.idl
css/MediaQueryList.idl
css/MediaQueryListListener.idl
css/RGBColor.idl
css/Rect.idl
css/StyleMedia.idl
......@@ -1075,6 +1074,7 @@ set(WebCore_SOURCES
css/MediaQueryEvaluator.cpp
css/MediaQueryExp.cpp
css/MediaQueryList.cpp
css/MediaQueryListListener.cpp
css/MediaQueryMatcher.cpp
css/PageRuleCollector.cpp
css/PropertySetCSSStyleDeclaration.cpp
......
2013-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153925.
http://trac.webkit.org/changeset/153925
https://bugs.webkit.org/show_bug.cgi?id=119768
broke fast/media/media-query-list-07.html (Requested by kling
on #webkit).
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::JSTestCallback):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* css/MediaAllInOne.cpp:
* css/MediaQueryListListener.cpp: Copied from Source/WebCore/css/MediaQueryListListener.idl.
(WebCore::MediaQueryListListener::queryChanged):
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::create):
(WebCore::MediaQueryListListener::operator==):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
2013-08-13 Simon Fraser <simon.fraser@apple.com>
Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
......@@ -274,7 +274,6 @@
#include "JSMediaError.cpp"
#include "JSMediaList.cpp"
#include "JSMediaQueryList.cpp"
#include "JSMediaQueryListListener.cpp"
#if ENABLE(MEDIA_SOURCE)
#include "JSMediaSource.cpp"
#endif
......
......@@ -651,7 +651,7 @@ BINDING_IDLS = \
DOM_CLASSES=$(basename $(notdir $(BINDING_IDLS)))
JS_DOM_HEADERS=$(filter-out JSEventListener.h, $(DOM_CLASSES:%=JS%.h))
JS_DOM_HEADERS=$(filter-out JSMediaQueryListListener.h JSEventListener.h, $(DOM_CLASSES:%=JS%.h))
WEB_DOM_HEADERS :=
......
......@@ -209,7 +209,6 @@ IDL_BINDINGS += \
$$PWD/css/FontLoader.idl \
$$PWD/css/MediaList.idl \
$$PWD/css/MediaQueryList.idl \
$$PWD/css/MediaQueryListListener.idl \
$$PWD/css/Rect.idl \
$$PWD/css/RGBColor.idl \
$$PWD/css/StyleMedia.idl \
......
......@@ -527,8 +527,6 @@ webcore_built_sources += \
DerivedSources/WebCore/JSMediaStreamTrackEvent.h \
DerivedSources/WebCore/JSMediaQueryList.cpp \
DerivedSources/WebCore/JSMediaQueryList.h \
DerivedSources/WebCore/JSMediaQueryListListener.cpp \
DerivedSources/WebCore/JSMediaQueryListListener.h \
DerivedSources/WebCore/JSMessageChannel.cpp \
DerivedSources/WebCore/JSMessageChannel.h \
DerivedSources/WebCore/JSMessageEvent.cpp \
......@@ -1363,7 +1361,6 @@ dom_binding_idls += \
$(WebCore)/css/FontLoader.idl \
$(WebCore)/css/MediaList.idl \
$(WebCore)/css/MediaQueryList.idl \
$(WebCore)/css/MediaQueryListListener.idl \
$(WebCore)/css/RGBColor.idl \
$(WebCore)/css/Rect.idl \
$(WebCore)/css/StyleMedia.idl \
......@@ -2720,6 +2717,7 @@ webcore_sources += \
Source/WebCore/css/MediaQueryExp.h \
Source/WebCore/css/MediaQueryList.cpp \
Source/WebCore/css/MediaQueryList.h \
Source/WebCore/css/MediaQueryListListener.cpp \
Source/WebCore/css/MediaQueryListListener.h \
Source/WebCore/css/MediaQueryMatcher.cpp \
Source/WebCore/css/MediaQueryMatcher.h \
......
......@@ -317,6 +317,7 @@ SOURCES += \
css/MediaQueryEvaluator.cpp \
css/MediaQueryExp.cpp \
css/MediaQueryList.cpp \
css/MediaQueryListListener.cpp \
css/MediaQueryMatcher.cpp \
css/PageRuleCollector.cpp \
css/PropertySetCSSStyleDeclaration.cpp \
......
......@@ -3364,20 +3364,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaQueryListListener.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMessageChannel.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
......@@ -9289,6 +9275,14 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\css\MediaQueryListListener.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\css\MediaQueryMatcher.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
......@@ -18400,7 +18394,6 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaError.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaList.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaQueryList.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaQueryListListener.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMessageChannel.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMessageEvent.h" />
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMessagePort.h" />
......@@ -2328,6 +2328,9 @@
<ClCompile Include="..\css\MediaQueryList.cpp">
<Filter>css</Filter>
</ClCompile>
<ClCompile Include="..\css\MediaQueryListListener.cpp">
<Filter>css</Filter>
</ClCompile>
<ClCompile Include="..\css\MediaQueryMatcher.cpp">
<Filter>css</Filter>
</ClCompile>
......@@ -6043,9 +6046,6 @@
<ClCompile Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaQueryList.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaQueryListListener.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
<ClCompile Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMessageChannel.cpp">
<Filter>DerivedSources</Filter>
</ClCompile>
......@@ -13782,9 +13782,6 @@
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaQueryList.h">
<Filter>DerivedSources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMediaQueryListListener.h">
<Filter>DerivedSources</Filter>
</ClInclude>
<ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSMessageChannel.h">
<Filter>DerivedSources</Filter>
</ClInclude>
......
......@@ -1959,8 +1959,6 @@
7AFD4FF4113277B60035B883 /* ScriptDebugListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
7BE7427381FA906FBB4F0F2C /* JSSVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 950C4C02BED8936F818E2F99 /* JSSVGGraphicsElement.h */; };
7C522D4B15B477E8009B7C95 /* InspectorOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */; };
7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C5343FA17B74B63004232F0 /* JSMediaQueryListListener.cpp */; };
7C5343FD17B74B63004232F0 /* JSMediaQueryListListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C5343FB17B74B63004232F0 /* JSMediaQueryListListener.h */; };
7CC7E3D717208C0F003C5277 /* IDNScriptWhiteList.txt in Resources */ = {isa = PBXBuildFile; fileRef = 7CC7E3D617208C0F003C5277 /* IDNScriptWhiteList.txt */; };
7CE30DA9171B63D200EC33E1 /* FrameSnapshottingMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CE30DA7171B63D200EC33E1 /* FrameSnapshottingMac.mm */; };
7CE30DAA171B63D200EC33E1 /* FrameSnapshottingMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE30DA8171B63D200EC33E1 /* FrameSnapshottingMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -5279,6 +5277,7 @@
D23CA56C0AB0EB8D005108A5 /* RangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = D23CA56B0AB0EB8D005108A5 /* RangeException.h */; };
D302754912A5FE84004BD828 /* RenderDetailsMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D302754512A5FE84004BD828 /* RenderDetailsMarker.cpp */; };
D302754A12A5FE84004BD828 /* RenderDetailsMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = D302754612A5FE84004BD828 /* RenderDetailsMarker.h */; };
D340629B1253BC8C009E4259 /* MediaQueryListListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D340629A1253BC8C009E4259 /* MediaQueryListListener.cpp */; };
D359D789129CA2710006E5D2 /* HTMLDetailsElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D359D786129CA2710006E5D2 /* HTMLDetailsElement.cpp */; };
D359D78A129CA2710006E5D2 /* HTMLDetailsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = D359D787129CA2710006E5D2 /* HTMLDetailsElement.h */; };
D359D791129CA3C00006E5D2 /* DOMHTMLDetailsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = D359D78E129CA3C00006E5D2 /* DOMHTMLDetailsElement.h */; };
......@@ -8392,8 +8391,6 @@
7AFD4FF3113277B60035B883 /* ScriptDebugListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugListener.h; sourceTree = "<group>"; };
7C522D4915B477E8009B7C95 /* InspectorOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorOverlay.cpp; sourceTree = "<group>"; };
7C522D4A15B478B2009B7C95 /* InspectorOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorOverlay.h; sourceTree = "<group>"; };
7C5343FA17B74B63004232F0 /* JSMediaQueryListListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaQueryListListener.cpp; sourceTree = "<group>"; };
7C5343FB17B74B63004232F0 /* JSMediaQueryListListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JSMediaQueryListListener.h; sourceTree = "<group>"; };
7C60128060078BB70E367A95 /* DNSResolveQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNSResolveQueue.cpp; sourceTree = "<group>"; };
7C6136F61710C35200FF4A57 /* Hasher.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = Hasher.pm; path = scripts/Hasher.pm; sourceTree = "<group>"; };
7C6136F71710C35200FF4A57 /* InFilesCompiler.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = InFilesCompiler.pm; path = scripts/InFilesCompiler.pm; sourceTree = "<group>"; };
......@@ -12051,6 +12048,7 @@
D23CA56B0AB0EB8D005108A5 /* RangeException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RangeException.h; sourceTree = "<group>"; };
D302754512A5FE84004BD828 /* RenderDetailsMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderDetailsMarker.cpp; sourceTree = "<group>"; };
D302754612A5FE84004BD828 /* RenderDetailsMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderDetailsMarker.h; sourceTree = "<group>"; };
D340629A1253BC8C009E4259 /* MediaQueryListListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaQueryListListener.cpp; sourceTree = "<group>"; };
D359D786129CA2710006E5D2 /* HTMLDetailsElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDetailsElement.cpp; sourceTree = "<group>"; };
D359D787129CA2710006E5D2 /* HTMLDetailsElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLDetailsElement.h; sourceTree = "<group>"; };
D359D788129CA2710006E5D2 /* HTMLDetailsElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLDetailsElement.idl; sourceTree = "<group>"; };
......@@ -17288,8 +17286,6 @@
BC3C39B50C0D3D8D005F4D7A /* JSMediaList.h */,
D3A94A42122DC40F00A37BBC /* JSMediaQueryList.cpp */,
D3A94A43122DC40F00A37BBC /* JSMediaQueryList.h */,
7C5343FA17B74B63004232F0 /* JSMediaQueryListListener.cpp */,
7C5343FB17B74B63004232F0 /* JSMediaQueryListListener.h */,
BCFE2F0F0C1B58370020235F /* JSRect.cpp */,
BCFE2F100C1B58370020235F /* JSRect.h */,
BC74DA461013F468007987AD /* JSRGBColor.cpp */,
......@@ -19832,6 +19828,7 @@
D3A94A31122DABAC00A37BBC /* MediaQueryList.cpp */,
D3A94A32122DABAC00A37BBC /* MediaQueryList.h */,
D3A94A33122DABAC00A37BBC /* MediaQueryList.idl */,
D340629A1253BC8C009E4259 /* MediaQueryListListener.cpp */,
D3A94A34122DABAC00A37BBC /* MediaQueryListListener.h */,
D3A94A35122DABAC00A37BBC /* MediaQueryListListener.idl */,
D3AA10F1123A98AA0092152B /* MediaQueryMatcher.cpp */,
......@@ -20992,7 +20989,6 @@
E1CDE9221501916900862CC5 /* AsyncFileStream.h in Headers */,
89D08DA012228451001241DF /* AsyncFileSystem.h in Headers */,
89D08DA112228451001241DF /* AsyncFileSystemCallbacks.h in Headers */,
7C5343FD17B74B63004232F0 /* JSMediaQueryListListener.h in Headers */,
976D6C77122B8A3D001FD1F7 /* AsyncFileWriter.h in Headers */,
976D6C93122B8A3D001FD1F7 /* AsyncFileWriterClient.h in Headers */,
37C61F0112095C87007A3C67 /* AtomicStringKeyedMRUCache.h in Headers */,
......@@ -24859,7 +24855,6 @@
85DF2C5D0AA341F600AD64C5 /* DOMHTMLFormElement.mm in Sources */,
85DF81960AA77E4B00486AD7 /* DOMHTMLFrameElement.mm in Sources */,
85DF81980AA77E4B00486AD7 /* DOMHTMLFrameSetElement.mm in Sources */,
7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */,
85992EBB0AA5069500AC0785 /* DOMHTMLHeadElement.mm in Sources */,
85183B450AA6926100F19FA3 /* DOMHTMLHeadingElement.mm in Sources */,
85ECBEF20AA7626900544F0B /* DOMHTMLHRElement.mm in Sources */,
......@@ -26092,6 +26087,7 @@
4E19592B0A39DACC00220FE5 /* MediaQueryEvaluator.cpp in Sources */,
4E19592D0A39DACC00220FE5 /* MediaQueryExp.cpp in Sources */,
D3A94A38122DABAC00A37BBC /* MediaQueryList.cpp in Sources */,
D340629B1253BC8C009E4259 /* MediaQueryListListener.cpp in Sources */,
D3AA10F3123A98AA0092152B /* MediaQueryMatcher.cpp in Sources */,
FD671A77159BB07000197559 /* MediaStreamAudioSourceNode.cpp in Sources */,
BCB16C170979C3BD00467741 /* MemoryCache.cpp in Sources */,
......@@ -3131,10 +3131,6 @@ sub GenerateCallbackHeader
# Destructor
push(@headerContent, " virtual ~$className();\n");
if ($interface->extendedAttributes->{"CallbackNeedsOperatorEqual"}) {
push(@headerContent, " virtual bool operator==(const $interfaceName&) const;\n\n")
}
# Functions
my $numFunctions = @{$interface->functions};
if ($numFunctions > 0) {
......@@ -3193,12 +3189,7 @@ sub GenerateCallbackImplementation
# Constructor
push(@implContent, "${className}::${className}(JSObject* callback, JSDOMGlobalObject* globalObject)\n");
if ($interface->extendedAttributes->{"CallbackNeedsOperatorEqual"}) {
push(@implContent, " : ${interfaceName}(${className}Type)\n");
} else {
push(@implContent, " : ${interfaceName}()\n");
}
push(@implContent, " , ActiveDOMCallback(globalObject->scriptExecutionContext())\n");
push(@implContent, " : ActiveDOMCallback(globalObject->scriptExecutionContext())\n");
push(@implContent, " , m_data(new JSCallbackData(callback, globalObject))\n");
push(@implContent, "{\n");
push(@implContent, "}\n\n");
......@@ -3216,16 +3207,8 @@ sub GenerateCallbackImplementation
push(@implContent, "#ifndef NDEBUG\n");
push(@implContent, " m_data = 0;\n");
push(@implContent, "#endif\n");
push(@implContent, "}\n\n");
push(@implContent, "}\n");
if ($interface->extendedAttributes->{"CallbackNeedsOperatorEqual"}) {
push(@implContent, "bool ${className}::operator==(const ${interfaceName}& other) const\n");
push(@implContent, "{\n");
push(@implContent, " if (other.type() != type())\n");
push(@implContent, " return false;\n");
push(@implContent, " return static_cast<const ${className}*>(&other)->m_data->callback() == m_data->callback();\n");
push(@implContent, "}\n\n");
}
# Functions
my $numFunctions = @{$interface->functions};
if ($numFunctions > 0) {
......@@ -3356,7 +3339,8 @@ my %nativeType = (
"unsigned long long" => "unsigned long long",
"byte" => "int8_t",
"octet" => "uint8_t",
"DOMTimeStamp" => "DOMTimeStamp",
"MediaQueryListListener" => "RefPtr<MediaQueryListListener>",
"DOMTimeStamp" => "DOMTimeStamp",
);
sub GetNativeType
......@@ -3491,6 +3475,11 @@ sub JSValueToNative
return "to$type(exec->vm(), $value)";
}
if ($type eq "MediaQueryListListener") {
AddToImplIncludes("MediaQueryListListener.h", $conditional);
return "MediaQueryListListener::create(ScriptValue(exec->vm(), " . $value ."))";
}
if ($type eq "SerializedScriptValue") {
AddToImplIncludes("SerializedScriptValue.h", $conditional);
return "SerializedScriptValue::create(exec, $value, 0, 0)";
......
......@@ -21,7 +21,6 @@
ActiveDOMObject
CPPPureInterface
CachedAttribute
CallbackNeedsOperatorEqual
CallWith=ScriptExecutionContext|ScriptState|ScriptArguments|CallStack
CheckSecurity
CheckSecurityForNode
......
......@@ -36,8 +36,7 @@ using namespace JSC;
namespace WebCore {
JSTestCallback::JSTestCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
: TestCallback()
, ActiveDOMCallback(globalObject->scriptExecutionContext())
: ActiveDOMCallback(globalObject->scriptExecutionContext())
, m_data(new JSCallbackData(callback, globalObject))
{
}
......@@ -56,7 +55,6 @@ JSTestCallback::~JSTestCallback()
#endif
}
// Functions
bool JSTestCallback::callbackWithNoParam()
......
......@@ -23,7 +23,7 @@
#include "ExceptionCode.h"
#include "JSDOMBinding.h"
#include "JSMediaQueryListListener.h"
#include "MediaQueryListListener.h"
#include "TestMediaQueryListListener.h"
#include <runtime/Error.h>
#include <wtf/GetPtr.h>
......@@ -167,9 +167,9 @@ EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod
TestMediaQueryListListener* impl = static_cast<TestMediaQueryListListener*>(castedThis->impl());
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
if (exec->argumentCount() <= 0 || !exec->argument(0).isFunction())
return throwVMTypeError(exec);
RefPtr<MediaQueryListListener> listener = JSMediaQueryListListener::create(asObject(exec->argument(0)), castedThis->globalObject());
RefPtr<MediaQueryListListener> listener(MediaQueryListListener::create(ScriptValue(exec->vm(), exec->argument(0))));
if (exec->hadException())
return JSValue::encode(jsUndefined());
impl->method(listener);
return JSValue::encode(jsUndefined());
}
......
......@@ -31,4 +31,5 @@
#include "MediaQueryEvaluator.cpp"
#include "MediaQueryExp.cpp"
#include "MediaQueryList.cpp"
#include "MediaQueryListListener.cpp"
#include "MediaQueryMatcher.cpp"
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "MediaQueryListListener.h"
#include "MediaQueryList.h"
#include "ScriptFunctionCall.h"
#include "JSMediaQueryList.h"
namespace WebCore {
void MediaQueryListListener::queryChanged(ScriptState* state, MediaQueryList* query)
{
ScriptCallback callback(state, m_value);
callback.appendArgument(toJS(state, deprecatedGlobalObjectForPrototype(state), query));
callback.call();
}
}
......@@ -20,34 +20,35 @@
#ifndef MediaQueryListListener_h
#define MediaQueryListListener_h
#include "ScriptState.h"
#include "ScriptValue.h"
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class MediaQueryList;
// See http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface
class MediaQueryListListener : public RefCounted<MediaQueryListListener> {
public:
enum Type {
JSMediaQueryListListenerType
};
virtual bool queryChanged(MediaQueryList*) = 0;
virtual bool operator==(const MediaQueryListListener&) const = 0;
virtual ~MediaQueryListListener() { }
Type type() const { return m_type; }
protected:
explicit MediaQueryListListener(Type type)
: m_type(type)
static PassRefPtr<MediaQueryListListener> create(const ScriptValue& value)
{
if (!value.isFunction())
return 0;
return adoptRef(new MediaQueryListListener(value));
}
void queryChanged(ScriptState*, MediaQueryList*);
bool operator==(const MediaQueryListListener& other) const { return m_value == other.m_value; }
private:
Type m_type;
MediaQueryListListener(const ScriptValue& value) : m_value(value) { }
ScriptValue m_value;
};
} // namespace WebCore
}
#endif // MediaQueryListListener_h
......@@ -18,7 +18,10 @@
*/
[
CallbackNeedsOperatorEqual
] callback interface MediaQueryListListener {
boolean queryChanged([Default=Undefined] optional MediaQueryList list);
NoInterfaceObject,
JSNoStaticTables,
ObjCProtocol,
CPPPureInterface,
] interface MediaQueryListListener {
void queryChanged([Default=Undefined] optional MediaQueryList list);
};
......@@ -42,12 +42,12 @@ MediaQueryMatcher::Listener::~Listener()
{
}
void MediaQueryMatcher::Listener::evaluate(MediaQueryEvaluator* evaluator)
void MediaQueryMatcher::Listener::evaluate(ScriptState* state, MediaQueryEvaluator* evaluator)
{
bool notify;
m_query->evaluate(evaluator, notify);
if (notify)
m_listener->queryChanged(m_query.get());
m_listener->queryChanged(state, m_query.get());
}
MediaQueryMatcher::MediaQueryMatcher(Document* document)
......@@ -141,13 +141,17 @@ void MediaQueryMatcher::styleResolverChanged()
{
ASSERT(m_document);
ScriptState* scriptState = mainWorldScriptState(m_document->frame());
if (!scriptState)
return;
++m_evaluationRound;
OwnPtr<MediaQueryEvaluator> evaluator = prepareEvaluator();
if (!evaluator)
return;
for (size_t i = 0; i < m_listeners.size(); ++i)
m_listeners[i]->evaluate(evaluator.get());
m_listeners[i]->evaluate(scriptState, evaluator.get());
}
} // namespace WebCore
}
......@@ -20,6 +20,7 @@
#ifndef MediaQueryMatcher_h
#define MediaQueryMatcher_h
#include "ScriptState.h"
#include <wtf/Forward.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
......@@ -58,7 +59,7 @@ private:
Listener(PassRefPtr<MediaQueryListListener>, PassRefPtr<MediaQueryList>);
~Listener();
void evaluate(MediaQueryEvaluator*);
void evaluate(ScriptState*, MediaQueryEvaluator*);
MediaQueryListListener* listener() { return m_listener.get(); }
MediaQueryList* query() { return m_query.get(); }
......@@ -81,6 +82,6 @@ private:
unsigned m_evaluationRound;
};
} // namespace WebCore
}
#endif // MediaQueryMatcher_h
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment