This is a follow up to bug 100393. Rather than manually having to expose new settings in internal.settings, we can auto generate the code. This avoids problems like forgetting to write the code to reset the value between tests.
The plan is to have make_settings.pl generate an idl file and the .h and .cpp implementations. We then run the idl file through the bindings generator and compile all the generated files. My current naming is InternalSettingsGenerated, but feel free to suggest a different name. Source/WebCore/testing/InternalSettings.idl will still exist and it will extend InternalSettingsGenerated.idl. For a variety of reasons, you may still need to write custom code for a setting (e.g., the setting takes enums, points, or some other non-webidl type).
Created attachment 179532 [details] Patch
Comment on attachment 179532 [details] Patch Running through ews. I've only tested on Chromium Linux and Apple Mac so far.
Comment on attachment 179532 [details] Patch Attachment 179532 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15319781
Comment on attachment 179532 [details] Patch Attachment 179532 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15317780
Comment on attachment 179532 [details] Patch Attachment 179532 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/15322779
Comment on attachment 179532 [details] Patch Attachment 179532 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/15319858
Comment on attachment 179532 [details] Patch Attachment 179532 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15317881 New failing tests: css1/font_properties/font_size.html css1/formatting_model/inline_elements.html css1/text_properties/line_height.html css1/formatting_model/replaced_elements.html css1/font_properties/font_family.html css1/font_properties/font_weight.html css1/text_properties/letter_spacing.html css1/classification/white_space.html css1/basic/id_as_selector.html css1/basic/inheritance.html css1/color_and_background/background_position.html css1/pseudo/firstletter.html css1/cascade/cascade_order.html css1/color_and_background/background.html css1/pseudo/multiple_pseudo_elements.html css1/conformance/forward_compatible_parsing.html css1/pseudo/firstline.html css1/formatting_model/height_of_lines.html css1/basic/containment.html css1/basic/class_as_selector.html css1/color_and_background/background_attachment.html css1/basic/comments.html css1/pseudo/anchor.html css1/formatting_model/vertical_formatting.html css1/color_and_background/background_repeat.html css1/font_properties/font.html css1/formatting_model/floating_elements.html css1/formatting_model/horizontal_formatting.html css1/classification/display.html css1/classification/list_style_type.html
Comment on attachment 179532 [details] Patch Attachment 179532 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15319880 New failing tests: compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html css3/filters/reference-filter-update-after-remove.html editing/selection/5195166-1.html compositing/geometry/vertical-scroll-composited.html compositing/absolute-inside-out-of-view-fixed.html compositing/layer-creation/fixed-position-out-of-view.html compositing/geometry/fixed-position-transform-composited-page-scale-down.html compositing/geometry/fixed-position-transform-composited-page-scale.html compositing/geometry/fixed-position.html http/tests/inspector/appcache/appcache-manifest-with-non-existing-file.html css3/filters/blur-filter-page-scroll-parents.html compositing/geometry/fixed-position-composited-switch.html compositing/layer-creation/fixed-position-out-of-view-scaled.html compositing/geometry/fixed-position-iframe-composited-page-scale.html css3/filters/blur-filter-page-scroll.html editing/deleting/delete-ligature-003.html compositing/geometry/horizontal-scroll-composited.html editing/selection/5354455-1.html compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html css3/filters/blur-filter-page-scroll-self.html compositing/geometry/fixed-position-composited-page-scale.html editing/spelling/grammar-edit-word.html editing/deleting/whitespace-pre-1.html compositing/geometry/fixed-position-composited-page-scale-scroll.html compositing/geometry/fixed-position-iframe-composited-page-scale-down.html compositing/geometry/fixed-position-composited-page-scale-down.html compositing/iframes/scroll-grandchild-iframe.html editing/deleting/paragraph-in-preserveNewline.html compositing/overflow/fixed-position-ancestor-clip.html compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html
Created attachment 180064 [details] Patch
Comment on attachment 180064 [details] Patch qt build fix
Comment on attachment 180064 [details] Patch Attachment 180064 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/15401439
Comment on attachment 180064 [details] Patch Attachment 180064 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15413361
Comment on attachment 180064 [details] Patch Attachment 180064 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15400431
Comment on attachment 180064 [details] Patch Attachment 180064 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15410450 New failing tests: fast/canvas/canvas-bg.html fast/canvas/canvas-incremental-repaint-2.html fast/canvas/shadow-offset-7.html fast/canvas/canvas-scale-strokePath-shadow.html fast/canvas/canvas-text-alignment.html fast/canvas/image-object-in-canvas.html fast/canvas/fillrect_gradient.html fast/canvas/canvas-render-layer.html fast/canvas/canvas-transforms-during-path.html fast/canvas/canvas-as-image-incremental-repaint.html fast/canvas/setWidthResetAfterForcedRender.html fast/canvas/image-pattern-rotate.html fast/canvas/fillrect-gradient-zero-stops.html fast/canvas/quadraticCurveTo.xml fast/canvas/canvas-imageSmoothingEnabled-patterns.html fast/canvas/canvas-as-image.html fast/canvas/shadow-offset-5.html fast/canvas/canvas-composite.html fast/canvas/canvas-resize-after-paint-without-layout.html fast/canvas/canvas-incremental-repaint.html fast/canvas/shadow-offset-6.html fast/canvas/canvas-bg-zoom.html fast/canvas/canvas-composite-transformclip.html fast/canvas/shadow-offset-4.html fast/canvas/canvas-composite-fill-repaint.html fast/canvas/patternfill-repeat.html fast/canvas/canvas-text-baseline.html fast/canvas/gradient-add-second-start-end-stop.html fast/canvas/canvas-transforms-fillRect-shadow.html
Comment on attachment 180064 [details] Patch Attachment 180064 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/15418468
Comment on attachment 180064 [details] Patch Attachment 180064 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15400535 New failing tests: compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html css3/filters/reference-filter-update-after-remove.html compositing/overflow/automatically-opt-into-composited-scrolling.html compositing/geometry/vertical-scroll-composited.html compositing/absolute-inside-out-of-view-fixed.html compositing/layer-creation/fixed-position-out-of-view.html compositing/geometry/fixed-position-transform-composited-page-scale-down.html compositing/geometry/fixed-position-transform-composited-page-scale.html compositing/geometry/fixed-position.html css3/filters/blur-filter-page-scroll-parents.html editing/selection/5195166-1.html compositing/geometry/fixed-position-composited-switch.html compositing/layer-creation/fixed-position-out-of-view-scaled.html compositing/geometry/fixed-position-iframe-composited-page-scale.html css3/filters/blur-filter-page-scroll.html editing/deleting/delete-ligature-003.html compositing/geometry/horizontal-scroll-composited.html compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html css3/filters/blur-filter-page-scroll-self.html compositing/geometry/fixed-position-composited-page-scale.html editing/spelling/grammar-edit-word.html editing/deleting/whitespace-pre-1.html compositing/geometry/fixed-position-composited-page-scale-scroll.html compositing/geometry/fixed-position-iframe-composited-page-scale-down.html compositing/geometry/fixed-position-composited-page-scale-down.html compositing/iframes/scroll-grandchild-iframe.html editing/deleting/paragraph-in-preserveNewline.html compositing/overflow/fixed-position-ancestor-clip.html compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html editing/execCommand/query-command-state.html
Created attachment 180251 [details] Patch
Comment on attachment 180251 [details] Patch Attachment 180251 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/15411781
Comment on attachment 180251 [details] Patch Attachment 180251 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15402978 New failing tests: compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html css3/filters/reference-filter-update-after-remove.html compositing/overflow/automatically-opt-into-composited-scrolling.html compositing/geometry/vertical-scroll-composited.html compositing/absolute-inside-out-of-view-fixed.html compositing/layer-creation/fixed-position-out-of-view.html compositing/geometry/fixed-position-transform-composited-page-scale-down.html compositing/geometry/fixed-position-transform-composited-page-scale.html compositing/geometry/fixed-position.html css3/filters/blur-filter-page-scroll-parents.html editing/selection/5195166-1.html compositing/geometry/fixed-position-composited-switch.html compositing/layer-creation/fixed-position-out-of-view-scaled.html compositing/geometry/fixed-position-iframe-composited-page-scale.html css3/filters/blur-filter-page-scroll.html editing/deleting/delete-ligature-003.html compositing/geometry/horizontal-scroll-composited.html editing/selection/5354455-1.html compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html css3/filters/blur-filter-page-scroll-self.html compositing/geometry/fixed-position-composited-page-scale.html editing/spelling/grammar-edit-word.html editing/deleting/whitespace-pre-1.html compositing/geometry/fixed-position-composited-page-scale-scroll.html compositing/geometry/fixed-position-iframe-composited-page-scale-down.html compositing/geometry/fixed-position-composited-page-scale-down.html compositing/iframes/scroll-grandchild-iframe.html editing/deleting/paragraph-in-preserveNewline.html compositing/overflow/fixed-position-ancestor-clip.html compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html
Created attachment 180435 [details] Patch
Comment on attachment 180435 [details] Patch Attachment 180435 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/15445279
Comment on attachment 180435 [details] Patch Attachment 180435 [details] did not pass gtk-ews (gtk): Output: http://queues.webkit.org/results/15457207
Can I get some help getting this to compile on gtk+ and efl? Here's what should happen: We run make_settings.pl which produces SettingsMacros.h, InternalSettingsGenerated.h, InternalSettingsGenerated.cpp, and InternalSettingsGenerated.idl. We treat InternalSettingsGenerated.idl like the other checked in .idl files and include it in the supplemental_dependencies list and run it through the bindings generator. The bindings generator produces JSInternalSettingsGenerated.cpp and JSInternalSettingsGenerated.h. We compile InternalSettingsGenerated.cpp and JSInternalSettingsGenerated.cpp into the webcore testing lib that contains the files in Source/WebCore/testing.
Comment on attachment 180435 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180435&action=review > Source/WebCore/ChangeLog:8 > + Generate functions at internals.settings for setting settings. If the setting is setting settings?
(In reply to comment #25) > (From update of attachment 180435 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=180435&action=review > > > Source/WebCore/ChangeLog:8 > > + Generate functions at internals.settings for setting settings. If the setting is > > setting settings? Heh, that's actually correct, but I can reword it. The first is a verb and the second is a (plural) noun.
Comment on attachment 180435 [details] Patch Attachment 180435 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15475026 New failing tests: compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html css3/filters/reference-filter-update-after-remove.html compositing/overflow/automatically-opt-into-composited-scrolling.html compositing/geometry/vertical-scroll-composited.html compositing/absolute-inside-out-of-view-fixed.html compositing/layer-creation/fixed-position-out-of-view.html compositing/geometry/fixed-position-transform-composited-page-scale-down.html compositing/geometry/fixed-position-transform-composited-page-scale.html compositing/geometry/fixed-position.html css3/filters/blur-filter-page-scroll-parents.html editing/selection/5195166-1.html compositing/geometry/fixed-position-composited-switch.html compositing/layer-creation/fixed-position-out-of-view-scaled.html compositing/geometry/fixed-position-iframe-composited-page-scale.html css3/filters/blur-filter-page-scroll.html editing/deleting/delete-ligature-003.html compositing/geometry/horizontal-scroll-composited.html compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html css3/filters/blur-filter-page-scroll-self.html compositing/geometry/fixed-position-composited-page-scale.html editing/spelling/grammar-edit-word.html editing/deleting/whitespace-pre-1.html compositing/geometry/fixed-position-composited-page-scale-scroll.html compositing/geometry/fixed-position-iframe-composited-page-scale-down.html compositing/geometry/fixed-position-composited-page-scale-down.html compositing/iframes/scroll-grandchild-iframe.html editing/deleting/paragraph-in-preserveNewline.html compositing/overflow/fixed-position-ancestor-clip.html compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html editing/execCommand/query-command-state.html
Created attachment 180552 [details] Patch
Comment on attachment 180552 [details] Patch I was able to get this to build on gtk+ and pass the editing/input tests. EFL next!
Comment on attachment 180552 [details] Patch Attachment 180552 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/15455529
Created attachment 180570 [details] Patch
Comment on attachment 180570 [details] Patch Should build on EFL.
Comment on attachment 180570 [details] Patch Attachment 180570 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15458555 New failing tests: compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html css3/filters/reference-filter-update-after-remove.html compositing/overflow/automatically-opt-into-composited-scrolling.html compositing/geometry/vertical-scroll-composited.html compositing/absolute-inside-out-of-view-fixed.html compositing/layer-creation/fixed-position-out-of-view.html compositing/geometry/fixed-position-transform-composited-page-scale-down.html compositing/geometry/fixed-position-transform-composited-page-scale.html compositing/geometry/fixed-position.html css3/filters/blur-filter-page-scroll-parents.html editing/selection/5195166-1.html compositing/geometry/fixed-position-composited-switch.html compositing/layer-creation/fixed-position-out-of-view-scaled.html compositing/geometry/fixed-position-iframe-composited-page-scale.html css3/filters/blur-filter-page-scroll.html editing/deleting/delete-ligature-003.html compositing/geometry/horizontal-scroll-composited.html editing/selection/5354455-1.html compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html css3/filters/blur-filter-page-scroll-self.html compositing/geometry/fixed-position-composited-page-scale.html editing/spelling/grammar-edit-word.html editing/deleting/whitespace-pre-1.html compositing/geometry/fixed-position-composited-page-scale-scroll.html compositing/geometry/fixed-position-iframe-composited-page-scale-down.html compositing/geometry/fixed-position-composited-page-scale-down.html compositing/iframes/scroll-grandchild-iframe.html editing/deleting/paragraph-in-preserveNewline.html compositing/overflow/fixed-position-ancestor-clip.html compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html
Comment on attachment 180570 [details] Patch Attachment 180570 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15458572 New failing tests: compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html css3/filters/reference-filter-update-after-remove.html compositing/overflow/automatically-opt-into-composited-scrolling.html compositing/geometry/vertical-scroll-composited.html compositing/absolute-inside-out-of-view-fixed.html compositing/layer-creation/fixed-position-out-of-view.html compositing/geometry/fixed-position-transform-composited-page-scale-down.html compositing/geometry/fixed-position-transform-composited-page-scale.html compositing/geometry/fixed-position.html css3/filters/blur-filter-page-scroll-parents.html editing/selection/5195166-1.html compositing/geometry/fixed-position-composited-switch.html compositing/layer-creation/fixed-position-out-of-view-scaled.html compositing/geometry/fixed-position-iframe-composited-page-scale.html css3/filters/blur-filter-page-scroll.html editing/deleting/delete-ligature-003.html compositing/geometry/horizontal-scroll-composited.html editing/selection/5354455-1.html compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html css3/filters/blur-filter-page-scroll-self.html compositing/geometry/fixed-position-composited-page-scale.html editing/spelling/grammar-edit-word.html editing/deleting/whitespace-pre-1.html compositing/geometry/fixed-position-composited-page-scale-scroll.html compositing/geometry/fixed-position-iframe-composited-page-scale-down.html compositing/geometry/fixed-position-composited-page-scale-down.html compositing/iframes/scroll-grandchild-iframe.html editing/deleting/paragraph-in-preserveNewline.html compositing/overflow/fixed-position-ancestor-clip.html compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html
Created attachment 181055 [details] Patch
Comment on attachment 181055 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181055&action=review > Source/WebCore/testing/InternalSettings.cpp:152 > +class InternalSettingsWrapper : public Supplement<Page> { I'd add a comment explaining why we're not using RefCountedSupplement
Created attachment 181061 [details] Patch
Comment on attachment 181061 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=181061&action=review > Source/WebCore/GNUmakefile.am:558 > +.SECONDARY: > +DerivedSources/WebCore/JSInternalSettingsGenerated.h: DerivedSources/WebCore/InternalSettingsGenerated.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm $(supplemental_dependency_file) > + $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(feature_defines)" --generator JS --supplementalDependencyFile $(supplemental_dependency_file) $< Makefile experts: This duplicates a similar rule above that applies to %.idl. That didn't work for DerivedSources/WebCore/InternalSettingsGenerated.idl because it couldn't find the file (it was dropping DerivedSources/WebCore from the path IIRC). It would be nice if we could avoid this duplication.
Comment on attachment 181061 [details] Patch Clearing flags on attachment: 181061 Committed r138661: <http://trac.webkit.org/changeset/138661>
All reviewed patches have been landed. Closing bug.
Broke the Apple Windows build: http://build.webkit.org/builders/Apple%20Win%20Debug%20%28Build%29/builds/60201
Reverted r138661 for reason: Compile problems on EFL Committed r138678: <http://trac.webkit.org/changeset/138678>
I rolled this out because of problems on EFL. I think the Win compile problems are related to the Win bot. On EFL, there were 2 problems: 1) Wasn't compiling on the 32 bit builder: http://build.webkit.org/builders/EFL%20Linux%2032-bit%20Release%20%28Build%29/builds/12244/steps/compile-webkit/logs/stdio 2) On the 64 bit builder, the compile succeeded but the next build regenerated bindings even though it didn't need to. There some dependency that's wrong. On a related note, it looks like SettingsMacros.h was generated 3 times, which seems wrong (search for SettingsMacros.h): http://build.webkit.org/builders/EFL%20Linux%2064-bit%20Release%20WK2/builds/2261/steps/compile-webkit/logs/stdio
Oh, the Apple Win compile was file after rniwa clobbered the output directory.
Created attachment 181195 [details] Patch for landing
I had a typo in one of the output headers from make_settings.pl that was causing the script to run multiple times. I verified locally that there are no spurious rebuilds.
Comment on attachment 181195 [details] Patch for landing Clearing flags on attachment: 181195 Committed r138727: <http://trac.webkit.org/changeset/138727>