Give Documents a steady ref on its Settings.
Created attachment 209394 [details] EWS experiment
Attachment 209394 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/css/CSSParser.cpp', u'Source/WebCore/css/DeprecatedStyleBuilder.cpp', u'Source/WebCore/css/StyleResolver.cpp', u'Source/WebCore/css/StyleResolver.h', u'Source/WebCore/dom/DOMImplementation.cpp', u'Source/WebCore/dom/Document.cpp', u'Source/WebCore/dom/Document.h', u'Source/WebCore/dom/DocumentStyleSheetCollection.cpp', u'Source/WebCore/dom/ScriptableDocumentParser.cpp', u'Source/WebCore/dom/ScriptedAnimationController.cpp', u'Source/WebCore/dom/make_names.pl', u'Source/WebCore/editing/InsertIntoTextNodeCommand.cpp', u'Source/WebCore/editing/markup.cpp', u'Source/WebCore/html/FTPDirectoryDocument.cpp', u'Source/WebCore/html/FTPDirectoryDocument.h', u'Source/WebCore/html/HTMLAnchorElement.cpp', u'Source/WebCore/html/HTMLAppletElement.cpp', u'Source/WebCore/html/HTMLCanvasElement.cpp', u'Source/WebCore/html/HTMLDocument.cpp', u'Source/WebCore/html/HTMLDocument.h', u'Source/WebCore/html/HTMLElement.cpp', u'Source/WebCore/html/HTMLFrameElementBase.cpp', u'Source/WebCore/html/HTMLImageLoader.cpp', u'Source/WebCore/html/HTMLMediaElement.cpp', u'Source/WebCore/html/HTMLVideoElement.cpp', u'Source/WebCore/html/HTMLViewSourceDocument.cpp', u'Source/WebCore/html/HTMLViewSourceDocument.h', u'Source/WebCore/html/ImageDocument.cpp', u'Source/WebCore/html/ImageDocument.h', u'Source/WebCore/html/MediaDocument.cpp', u'Source/WebCore/html/MediaDocument.h', u'Source/WebCore/html/PluginDocument.cpp', u'Source/WebCore/html/PluginDocument.h', u'Source/WebCore/html/TextDocument.cpp', u'Source/WebCore/html/TextDocument.h', u'Source/WebCore/html/parser/HTMLParserOptions.cpp', u'Source/WebCore/html/shadow/MediaControlElements.cpp', u'Source/WebCore/inspector/DOMPatchSupport.cpp', u'Source/WebCore/loader/DocumentWriter.cpp', u'Source/WebCore/loader/FrameLoader.cpp', u'Source/WebCore/loader/LinkLoader.cpp', u'Source/WebCore/loader/PlaceholderDocument.h', u'Source/WebCore/loader/SinkDocument.cpp', u'Source/WebCore/loader/SinkDocument.h', u'Source/WebCore/loader/cache/CachedFont.cpp', u'Source/WebCore/loader/cache/CachedSVGDocument.cpp', u'Source/WebCore/rendering/InlineTextBox.cpp', u'Source/WebCore/rendering/RenderBoxModelObject.cpp', u'Source/WebCore/rendering/RenderEmbeddedObject.cpp', u'Source/WebCore/rendering/RenderLayer.cpp', u'Source/WebCore/rendering/RenderLayerCompositor.cpp', u'Source/WebCore/rendering/RenderObject.cpp', u'Source/WebCore/rendering/RenderSearchField.cpp', u'Source/WebCore/rendering/RenderText.cpp', u'Source/WebCore/rendering/RenderTheme.cpp', u'Source/WebCore/style/StyleFontSizeFunctions.cpp', u'Source/WebCore/style/StyleResolveForDocument.cpp', u'Source/WebCore/style/StyleResolveTree.cpp', u'Source/WebCore/style/StyleResolveTree.h', u'Source/WebCore/svg/SVGDocument.cpp', u'Source/WebCore/svg/SVGDocument.h', u'Source/WebCore/svg/SVGUseElement.cpp', u'Source/WebCore/xml/XMLHttpRequest.cpp', u'Source/WebCore/xml/XSLTProcessor.cpp']" exit_code: 1 Source/WebCore/dom/DOMImplementation.cpp:374: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 63 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 209394 [details] EWS experiment Attachment 209394 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/1545243
Comment on attachment 209394 [details] EWS experiment Attachment 209394 [details] did not pass efl-ews (efl): Output: http://webkit-queues.appspot.com/results/1519910
Comment on attachment 209394 [details] EWS experiment Attachment 209394 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1546096
What's a steady ref?
I think I just wanted to add a Settings& Document::settings(). Looks like there was some trouble dealing with frameless documents. I bet this would be easy to solve though..
Created attachment 300625 [details] Patch for EWS Quick and dirty, let's see what EWS thinks.
Comment on attachment 300625 [details] Patch for EWS Attachment 300625 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3004189 New failing tests: fast/html/detach-frame-while-clicking-on-anchor-with-ping.html
Created attachment 300629 [details] Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
(In reply to comment #9) > Comment on attachment 300625 [details] > Patch for EWS > > Attachment 300625 [details] did not pass mac-ews (mac): > Output: http://webkit-queues.webkit.org/results/3004189 > > New failing tests: > fast/html/detach-frame-while-clicking-on-anchor-with-ping.html This failure is beautiful. The code assumes Document::frame() is non-null because Document::settings() was.
Created attachment 300912 [details] Another EWSable
Created attachment 300919 [details] Patch
Comment on attachment 300919 [details] Patch Awesome! r=me
Comment on attachment 300919 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=300919&action=review > Source/WebCore/dom/Document.h:513 > + Settings& settings() const { return m_settings.get(); } Could we make this const Settings& settings() const and maybe have separate mutableSettings() if needed? > Source/WebCore/page/csp/ContentSecurityPolicy.cpp:260 > + if (Settings* settings = is<Document>(m_scriptExecutionContext) ? &downcast<Document>(*m_scriptExecutionContext).settings() : nullptr) > return settings->allowContentSecurityPolicySourceStarToMatchAnyProtocol(); This could be just if (is<Document>(m_scriptExecutionContext)) downcast<Document>(*m_scriptExecutionContext).settings().allowContentSecurityPolicySourceStarToMatchAnyProtocol(); > Source/WebCore/rendering/SimpleLineLayout.cpp:1183 > + auto& settings = document->settings(); > + settings.setSimpleLineLayoutEnabled(!settings.simpleLineLayoutEnabled()); Temporary is not really useful here.
Comment on attachment 300919 [details] Patch YES!
True fact: Dave Hyatt said we should do this 11 years ago.
(In reply to comment #16) > YES! I know right. Okay I'm gonna land this first, and then take Antti's suggestion and make Document::settings() return a const Settings, which will require a bunch more fixes since Settings getters are non-const (huh!)
Created attachment 301049 [details] Patch for landing
Comment on attachment 301049 [details] Patch for landing Clearing flags on attachment: 301049 Committed r211964: <http://trac.webkit.org/changeset/211964>
All reviewed patches have been landed. Closing bug.