RESOLVED FIXED Bug 51441
Editor.h doesn't need to include SelectionController.h
https://bugs.webkit.org/show_bug.cgi?id=51441
Summary Editor.h doesn't need to include SelectionController.h
Ryosuke Niwa
Reported 2010-12-21 19:33:01 PST
Editor.h includes SelectionController.h only because it needs to access EDirection. We should move this enum into a separate header file so that we don't have to include SelectionController.h in Editor.h
Attachments
cleanup (51.24 KB, patch)
2010-12-22 12:39 PST, Ryosuke Niwa
no flags
Fixed per levin's comment and build breaks (51.77 KB, patch)
2010-12-22 13:28 PST, Ryosuke Niwa
no flags
Replaced all instances of SelectionController::Direction(\w+) by Direction in WebKit (62.12 KB, patch)
2010-12-22 13:58 PST, Ryosuke Niwa
eric: review+
Ryosuke Niwa
Comment 1 2010-12-22 12:39:48 PST
Created attachment 77249 [details] cleanup
Ryosuke Niwa
Comment 2 2010-12-22 12:42:17 PST
(In reply to comment #1) > Created an attachment (id=77249) [details] > cleanup I ended up renaming SelectionController::EDirection to SelectionDirection and putting it in VisibleSelection.h rather than adding a new header. But I did add WritingDirection.h though.
WebKit Review Bot
Comment 3 2010-12-22 12:55:16 PST
Early Warning System Bot
Comment 4 2010-12-22 13:02:21 PST
WebKit Review Bot
Comment 5 2010-12-22 13:08:54 PST
David Levin
Comment 6 2010-12-22 13:09:48 PST
Comment on attachment 77249 [details] cleanup View in context: https://bugs.webkit.org/attachment.cgi?id=77249&action=review r- for build breaks (and a few minor things that I happened to see). I probably won't give the final r+ on this but thought it valuable to move it past this step. > WebCore/editing/Editor.h:50 > +class CSSMutableStyleDeclaration; Out of order. > WebCore/editing/WritingDirection.h:2 > + * Copyright (C) 2008 Apple Inc. All rights reserved. Multiple things are wrong here....
Ryosuke Niwa
Comment 7 2010-12-22 13:23:43 PST
(In reply to comment #6) > > WebCore/editing/Editor.h:50 > > +class CSSMutableStyleDeclaration; > > Out of order. Oops, will fix. > > WebCore/editing/WritingDirection.h:2 > > + * Copyright (C) 2008 Apple Inc. All rights reserved. > > Multiple things are wrong here.... WritingDirection was added in 2008 by mitz so this copyright information is correct.
Ryosuke Niwa
Comment 8 2010-12-22 13:28:43 PST
Created attachment 77254 [details] Fixed per levin's comment and build breaks
Ryosuke Niwa
Comment 9 2010-12-22 13:33:17 PST
http://trac.webkit.org/changeset/34896 is the change set that added WritingDirection. It was subsequently moved by the following change sets: http://trac.webkit.org/changeset/34935 http://trac.webkit.org/changeset/72573
Eric Seidel (no email)
Comment 10 2010-12-22 13:35:20 PST
Comment on attachment 77254 [details] Fixed per levin's comment and build breaks LGTM.
Ryosuke Niwa
Comment 11 2010-12-22 13:44:27 PST
Thanks for the review, Eric! I'll wait until the EWS finishes building because there might be some WebKit code that's using EDirection as there was in mac port. (In reply to comment #10) > (From update of attachment 77254 [details]) > LGTM.
WebKit Review Bot
Comment 12 2010-12-22 13:50:06 PST
Ryosuke Niwa
Comment 13 2010-12-22 13:58:28 PST
Created attachment 77258 [details] Replaced all instances of SelectionController::Direction(\w+) by Direction in WebKit
Ryosuke Niwa
Comment 14 2010-12-22 13:59:48 PST
(In reply to comment #11) > Thanks for the review, Eric! I'll wait until the EWS finishes building because there might be some WebKit code that's using EDirection as there was in mac port. (In reply to comment #13) > Created an attachment (id=77258) [details] > Replaced all instances of SelectionController::Direction(\w+) by Direction in WebKit It turned out there were lots of them. I replaced all in this patch. Resubmitting for a review.
Early Warning System Bot
Comment 15 2010-12-22 14:01:04 PST
Eric Seidel (no email)
Comment 16 2010-12-22 14:16:48 PST
Comment on attachment 77258 [details] Replaced all instances of SelectionController::Direction(\w+) by Direction in WebKit View in context: https://bugs.webkit.org/attachment.cgi?id=77258&action=review OK. I figiured there were more includes you would remove. > WebCore/page/Frame.h:37 > +#include "SelectionController.h" Should this be SelectionController.h here?
Ryosuke Niwa
Comment 17 2010-12-22 14:18:45 PST
(In reply to comment #16) > > WebCore/page/Frame.h:37 > > +#include "SelectionController.h" > > Should this be SelectionController.h here? Yes, Frame holds an instance of SelectionController as a member variable.
WebKit Review Bot
Comment 18 2010-12-22 14:21:31 PST
Ryosuke Niwa
Comment 19 2010-12-22 14:35:06 PST
(In reply to comment #18) > Attachment 77258 [details] did not build on chromium: > Build output: http://queues.webkit.org/results/7258116 Odd. It seems like my patch was missing the changes to WebFrameImpl.cpp. Will fix before the land.
WebKit Review Bot
Comment 20 2010-12-22 15:47:41 PST
Ryosuke Niwa
Comment 21 2010-12-23 11:00:07 PST
Note You need to log in before you can comment on or make changes to this bug.