Title: [106603] trunk/Source/WebCore
- Revision
- 106603
- Author
- [email protected]
- Date
- 2012-02-02 16:26:10 -0800 (Thu, 02 Feb 2012)
Log Message
BMW Car Configuration Page doesn't work (Only manifests in Chromium)
https://bugs.webkit.org/show_bug.cgi?id=77312
Reviewed by Dimitri Glazkov.
When we autogenerated the event factory, we missed the check for
whether touch events were enabled at runtime:
http://trac.webkit.org/changeset/97933/trunk/Source/WebCore/dom/Document.cpp
This patch adds the check back.
Unfortunately, there isn't a testing frame work for
RuntimeEnabledFeatures. The main difficulty is that these static bools
need to be set when WebKit is initialized and can't be changed (which
is why they're not part of WebCore::Settings). To test them properly,
we'd need a testing framework that booted up WebKit for each test.
We could test this particular change (which doesn't need the bool to be
constant through the runtime of WebKit), but that would create a
sandtrap for future patches who might thing that this testing framework
can really be used to test RuntimeEnabledFeatures.
The net result is that Chromium is going to end up living with the
non-default codepath for these settings being untested, which will lead
to regressions like this one. If we ened up with a bunch of these
regressions, we'll likely end up with a testing framework similar to
Chromium's browsers_tests, which create a fresh subprocess for each
test.
* dom/EventFactory.in:
* dom/make_event_factory.pl:
(defaultItemFactory):
(generateImplementation):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (106602 => 106603)
--- trunk/Source/WebCore/ChangeLog 2012-02-03 00:24:56 UTC (rev 106602)
+++ trunk/Source/WebCore/ChangeLog 2012-02-03 00:26:10 UTC (rev 106603)
@@ -1,3 +1,39 @@
+2012-02-02 Adam Barth <[email protected]>
+
+ BMW Car Configuration Page doesn't work (Only manifests in Chromium)
+ https://bugs.webkit.org/show_bug.cgi?id=77312
+
+ Reviewed by Dimitri Glazkov.
+
+ When we autogenerated the event factory, we missed the check for
+ whether touch events were enabled at runtime:
+ http://trac.webkit.org/changeset/97933/trunk/Source/WebCore/dom/Document.cpp
+
+ This patch adds the check back.
+
+ Unfortunately, there isn't a testing frame work for
+ RuntimeEnabledFeatures. The main difficulty is that these static bools
+ need to be set when WebKit is initialized and can't be changed (which
+ is why they're not part of WebCore::Settings). To test them properly,
+ we'd need a testing framework that booted up WebKit for each test.
+
+ We could test this particular change (which doesn't need the bool to be
+ constant through the runtime of WebKit), but that would create a
+ sandtrap for future patches who might thing that this testing framework
+ can really be used to test RuntimeEnabledFeatures.
+
+ The net result is that Chromium is going to end up living with the
+ non-default codepath for these settings being untested, which will lead
+ to regressions like this one. If we ened up with a bunch of these
+ regressions, we'll likely end up with a testing framework similar to
+ Chromium's browsers_tests, which create a fresh subprocess for each
+ test.
+
+ * dom/EventFactory.in:
+ * dom/make_event_factory.pl:
+ (defaultItemFactory):
+ (generateImplementation):
+
2012-02-02 Justin Novosad <[email protected]>
[Chromium] Use SkCanvas::flush in skia port
Modified: trunk/Source/WebCore/dom/EventFactory.in (106602 => 106603)
--- trunk/Source/WebCore/dom/EventFactory.in 2012-02-03 00:24:56 UTC (rev 106602)
+++ trunk/Source/WebCore/dom/EventFactory.in 2012-02-03 00:26:10 UTC (rev 106603)
@@ -37,9 +37,8 @@
SVGZoomEvent conditional=SVG
SVGZoomEvents interfaceName=SVGZoomEvent, conditional=SVG
IDBVersionChangeEvent conditional=INDEXED_DATABASE
-TouchEvent conditional=TOUCH_EVENTS
+TouchEvent conditional=TOUCH_EVENTS, runtimeConditional=touchEnabled
DeviceMotionEvent conditional=DEVICE_ORIENTATION
DeviceOrientationEvent conditional=DEVICE_ORIENTATION
OrientationEvent interfaceName=Event, conditional=ORIENTATION_EVENTS
TrackEvent conditional=VIDEO_TRACK
-
Modified: trunk/Source/WebCore/dom/make_event_factory.pl (106602 => 106603)
--- trunk/Source/WebCore/dom/make_event_factory.pl 2012-02-03 00:24:56 UTC (rev 106602)
+++ trunk/Source/WebCore/dom/make_event_factory.pl 2012-02-03 00:26:10 UTC (rev 106603)
@@ -42,7 +42,8 @@
{
return (
'interfaceName' => 0,
- 'conditional' => 0
+ 'conditional' => 0,
+ 'runtimeConditional' => 0
);
}
@@ -85,6 +86,9 @@
print F "#include \"${namespace}Factory.h\"\n";
print F "\n";
print F "#include \"${namespace}Headers.h\"\n";
+ print F "#if USE(V8)\n";
+ print F "#include \"RuntimeEnabledFeatures.h\"\n";
+ print F "#endif\n";
print F "\n";
print F "namespace WebCore {\n";
print F "\n";
@@ -93,11 +97,20 @@
for my $eventName (sort keys %parsedEvents) {
my $conditional = $parsedEvents{$eventName}{"conditional"};
+ my $runtimeConditional = $parsedEvents{$eventName}{"runtimeConditional"};
my $interfaceName = $InCompiler->interfaceForItem($eventName);
print F "#if ENABLE($conditional)\n" if $conditional;
+ if ($runtimeConditional) {
+ print F " #if USE(V8)\n";
+ print F " // FIXME: JSC should support RuntimeEnabledFeatures as well.\n";
+ print F " if (type == \"$eventName\" && RuntimeEnabledFeatures::$runtimeConditional())\n";
+ print F " return ${interfaceName}::create();\n";
+ print F " #else\n";
+ }
print F " if (type == \"$eventName\")\n";
print F " return ${interfaceName}::create();\n";
+ print F "#endif // USE(V8)\n" if $runtimeConditional;
print F "#endif\n" if $conditional;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes