[webkit-reviews] review requested: [Bug 20534] DumpRenderTree needs a way to override settings on a per-test basis : [Attachment 26874] Alternate patch to issue 20534

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 20 15:23:23 PST 2009


Glenn Wilson <gwilson at google.com> has asked Eric Seidel <eric at webkit.org> for
review:
Bug 20534: DumpRenderTree needs a way to override settings on a per-test basis
https://bugs.webkit.org/show_bug.cgi?id=20534

Attachment 26874: Alternate patch to issue 20534
https://bugs.webkit.org/attachment.cgi?id=26874&action=review

------- Additional Comments from Glenn Wilson <gwilson at google.com>
Here is an alternate patch to this that implements the ideas that Eric and I
discussed a few weeks back.

This patch adds a new dictionary to WebPreferencesPrivate that holds overridden
values.  When valueForKey looks to access a value, it first checks the
overrides to see if there is an overridden value for this particular key.  If
so, it uses that key, if not, it goes about its normal business.

overridePreference sets a value in this new dictionary, and resetToDefaults
merely empties this new dictionary of all values.

This version of the patch has several advantages over previous versions:
- all overridden values are kept separate from default values.	If there's ever
a crash, these won't be saved anywhere
- resetToDefaults and overridePreference are significantly simpler
- it requires no flag-setting to indicate an overridden value

Please take a look and let me know what can be improved!


More information about the webkit-reviews mailing list