Platforms like iOS don't use DeleteButton ui at all. It doesn't make sense to use the current implementation that does quite a bit of work before calling into the client to find out there is nothing to do.
Created attachment 187629 [details] Patch
Attachment 187629 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/editing/DeleteButtonController.cpp', u'Source/WebCore/editing/DeleteButtonController.h']" exit_code: 1 Source/WebCore/editing/DeleteButtonController.h:64: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 187629 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=187629&action=review > Source/WebCore/editing/DeleteButtonController.h:42 > +#if !PLATFORM(IOS) Why don't we add ENABLE_DELETE_BUTTON_CONTROLLER instead?
After discussing this topic with a number of people, I decided to go for a different approach. I'm adding ENABLE_DELETION_UI to control the use of this feature. I will initially enabled it by default for all the ports to avoid breaking other ports, since I don't know for sure if and how they use it.
Created attachment 187691 [details] Patch2
Comment on attachment 187691 [details] Patch2 rs=me.
View in context: https://bugs.webkit.org/attachment.cgi?id=187691&action=review > Source/WebCore/dom/ContainerNode.cpp:31 > +#if ENABLE(DELETION_UI) > #include "DeleteButtonController.h" > +#endif Since it is an ENABLE(), I would have the #ifdef in the header file instead of around the #include. > Source/WebCore/editing/Editor.cpp:861 > +#if ENABLE(DELETION_UI) > + m_deleteButtonController = adoptPtr(new DeleteButtonController(frame)); > +#endif Node sure why you moved this out of the initialization.
(In reply to comment #7) > View in context: https://bugs.webkit.org/attachment.cgi?id=187691&action=review > > > Source/WebCore/dom/ContainerNode.cpp:31 > > +#if ENABLE(DELETION_UI) > > #include "DeleteButtonController.h" > > +#endif > > Since it is an ENABLE(), I would have the #ifdef in the header file instead of around the #include. > > > Source/WebCore/editing/Editor.cpp:861 > > +#if ENABLE(DELETION_UI) > > + m_deleteButtonController = adoptPtr(new DeleteButtonController(frame)); > > +#endif > > Node sure why you moved this out of the initialization. (In reply to comment #7) > View in context: https://bugs.webkit.org/attachment.cgi?id=187691&action=review > > > Source/WebCore/dom/ContainerNode.cpp:31 > > +#if ENABLE(DELETION_UI) > > #include "DeleteButtonController.h" > > +#endif > > Since it is an ENABLE(), I would have the #ifdef in the header file instead of around the #include. > > > Source/WebCore/editing/Editor.cpp:861 > > +#if ENABLE(DELETION_UI) > > + m_deleteButtonController = adoptPtr(new DeleteButtonController(frame)); > > +#endif > > Node sure why you moved this out of the initialization. I don't like the #ifdef in the initialization list.
Committed revision 142533.