This is a useful option for automated testing. It allows you to set up test pages that clean up after themselves when they're done.
Created attachment 24900 [details] Patch to implement this feature
Comment on attachment 24900 [details] Patch to implement this feature The patch looks fine in general, but the variable names don't follow WebKit's style guidelines: http://webkit.org/coding/coding-style.html
Created attachment 25513 [details] Patch to implement this feature Fixed the variable names to be CamelCase
Comment on attachment 25513 [details] Patch to implement this feature > + bool allowScriptsToCloseWindows = > + (settings && settings->allowScriptsToCloseWindows()); No reason to put these on two lines. > @@ -232,6 +235,7 @@ namespace WebCore { > bool m_zoomsTextOnly : 1; > bool m_enforceCSSMIMETypeInStrictMode : 1; > size_t m_maximumDecodedImageSize; > + bool m_allowScriptsToCloseWindows : 1; If you move this bool up one place, it will not cause unnessary bloating of the object. This patch looks fine, but it is not hooked up to anything. Usually when we expose a new setting, we hook it up to the WebPreferences API (or probably SPI in this case) in WebKit. r- since this really won't do anything on its own.
Comment on attachment 25513 [details] Patch to implement this feature I am reversing my decision here. It is a little odd to add a new setting without adding WebKit SPI to do something with it, and I would rather you did, but it is not strictly necessary.
http://trac.webkit.org/changeset/40315