m_selection is never NULL so we can just return a reference from Frame::selection().
Created attachment 208970 [details] Patch for bots
Attachment 208970 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/accessibility/AccessibilityRenderObject.cpp', u'Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm', u'Source/WebCore/css/SelectorChecker.cpp', u'Source/WebCore/dom/CharacterData.cpp', u'Source/WebCore/dom/Clipboard.cpp', u'Source/WebCore/dom/Document.cpp', u'Source/WebCore/dom/Element.cpp', u'Source/WebCore/editing/AlternativeTextController.cpp', u'Source/WebCore/editing/DeleteButtonController.cpp', u'Source/WebCore/editing/DeleteSelectionCommand.cpp', u'Source/WebCore/editing/DictationCommand.cpp', u'Source/WebCore/editing/EditCommand.cpp', u'Source/WebCore/editing/EditingStyle.cpp', u'Source/WebCore/editing/Editor.cpp', u'Source/WebCore/editing/EditorCommand.cpp', u'Source/WebCore/editing/FrameSelection.cpp', u'Source/WebCore/editing/InsertLineBreakCommand.cpp', u'Source/WebCore/editing/InsertTextCommand.cpp', u'Source/WebCore/editing/ModifySelectionListLevel.cpp', u'Source/WebCore/editing/RemoveFormatCommand.cpp', u'Source/WebCore/editing/ReplaceSelectionCommand.cpp', u'Source/WebCore/editing/SetSelectionCommand.cpp', u'Source/WebCore/editing/SpellingCorrectionCommand.cpp', u'Source/WebCore/editing/TextInsertionBaseCommand.cpp', u'Source/WebCore/editing/TypingCommand.cpp', u'Source/WebCore/editing/ios/EditorIOS.mm', u'Source/WebCore/editing/mac/EditorMac.mm', u'Source/WebCore/html/HTMLAnchorElement.cpp', u'Source/WebCore/html/HTMLInputElement.cpp', u'Source/WebCore/html/HTMLTextAreaElement.cpp', u'Source/WebCore/html/HTMLTextFormControlElement.cpp', u'Source/WebCore/html/TextFieldInputType.cpp', u'Source/WebCore/loader/FrameLoader.cpp', u'Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp', u'Source/WebCore/page/ContextMenuController.cpp', u'Source/WebCore/page/DOMSelection.cpp', u'Source/WebCore/page/DragController.cpp', u'Source/WebCore/page/DragController.h', u'Source/WebCore/page/EventHandler.cpp', u'Source/WebCore/page/FocusController.cpp', u'Source/WebCore/page/Frame.h', u'Source/WebCore/page/FrameView.cpp', u'Source/WebCore/page/Page.cpp', u'Source/WebCore/page/mac/FrameMac.mm', u'Source/WebCore/page/mac/FrameSnapshottingMac.mm', u'Source/WebCore/page/win/FrameWin.cpp', u'Source/WebCore/platform/ios/PasteboardIOS.mm', u'Source/WebCore/rendering/HitTestResult.cpp', u'Source/WebCore/rendering/RenderBlock.cpp', u'Source/WebCore/rendering/RenderImage.cpp', u'Source/WebCore/rendering/RenderLayer.cpp', u'Source/WebCore/rendering/RenderListBox.cpp', u'Source/WebCore/rendering/RenderObject.cpp', u'Source/WebCore/rendering/RenderTextControlSingleLine.cpp', u'Source/WebCore/rendering/RenderTheme.cpp', u'Source/WebCore/rendering/RenderThemeWin.cpp', u'Source/WebCore/rendering/RenderTreeAsText.cpp', u'Source/WebCore/rendering/RenderView.cpp', u'Source/WebCore/svg/SVGSVGElement.cpp', u'Source/WebCore/svg/SVGTextContentElement.cpp', u'Source/WebCore/testing/Internals.cpp', u'Source/WebKit/blackberry/Api/InRegionScroller.cpp', u'Source/WebKit/blackberry/ChangeLog', u'Source/WebKit/blackberry/WebKitSupport/DatePickerClient.cpp', u'Source/WebKit/blackberry/WebKitSupport/InPageSearchManager.cpp', u'Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp', u'Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp', u'Source/WebKit/blackberry/WebKitSupport/SpellingHandler.cpp', u'Source/WebKit/efl/ChangeLog', u'Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp', u'Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp', u'Source/WebKit/gtk/ChangeLog', u'Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp', u'Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp', u'Source/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/Plugins/WebPluginController.mm', u'Source/WebKit/mac/WebView/WebFrame.mm', u'Source/WebKit/mac/WebView/WebHTMLRepresentation.mm', u'Source/WebKit/mac/WebView/WebHTMLView.mm', u'Source/WebKit/mac/WebView/WebTextCompletionController.mm', u'Source/WebKit/mac/WebView/WebView.mm', u'Source/WebKit/qt/ChangeLog', u'Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp', u'Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp', u'Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp', u'Source/WebKit/win/ChangeLog', u'Source/WebKit/win/WebFrame.cpp', u'Source/WebKit/win/WebView.cpp', u'Source/WebKit/wince/ChangeLog', u'Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm', u'Source/WebKit2/WebProcess/WebPage/FindController.cpp', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp', u'Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm']" exit_code: 1 Source/WebCore/rendering/RenderTextControlSingleLine.cpp:287: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Source/WebCore/editing/Editor.cpp:2536: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 97 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 208970 [details] Patch for bots Attachment 208970 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1462960
Comment on attachment 208970 [details] Patch for bots Attachment 208970 [details] did not pass qt-ews (qt): Output: http://webkit-queues.appspot.com/results/1384506
Comment on attachment 208970 [details] Patch for bots Attachment 208970 [details] did not pass efl-wk2-ews (efl-wk2): Output: http://webkit-queues.appspot.com/results/1478304
Comment on attachment 208970 [details] Patch for bots Attachment 208970 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1476612
Created attachment 208972 [details] Take 2 for bots
Comment on attachment 208972 [details] Take 2 for bots Attachment 208972 [details] did not pass qt-wk2-ews (qt-wk2): Output: http://webkit-queues.appspot.com/results/1442043
Comment on attachment 208972 [details] Take 2 for bots Attachment 208972 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1437351
Created attachment 208973 [details] Take 3 make qt-wk2 happy
Comment on attachment 208973 [details] Take 3 make qt-wk2 happy Attachment 208973 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1365475
Comment on attachment 208973 [details] Take 3 make qt-wk2 happy Attachment 208973 [details] did not pass efl-ews (efl): Output: http://webkit-queues.appspot.com/results/1438299
Created attachment 208983 [details] Take 4
Comment on attachment 208983 [details] Take 4 Attachment 208983 [details] did not pass gtk-ews (gtk): Output: http://webkit-queues.appspot.com/results/1471658
Created attachment 209045 [details] Take 5
Comment on attachment 209045 [details] Take 5 Looks like gtk bot it happy now. Marking patch for review.
Comment on attachment 209045 [details] Take 5 Attachment 209045 [details] did not pass win-ews (win): Output: http://webkit-queues.appspot.com/results/1479648
Comment on attachment 209045 [details] Take 5 Attachment 209045 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/1437394 New failing tests: media/audio-garbage-collect.html
Created attachment 209063 [details] Archive of layout-test-results from webkit-ews-02 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-02 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Committed r154286: <http://trac.webkit.org/changeset/154286>
Checked in patch with Windows build fix. I don't think the layout test failures are caused by my changes but I'll keep an eye on the bots.