WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23774
Selection::validate() should be broken into smaller pieces to be less confusing
https://bugs.webkit.org/show_bug.cgi?id=23774
Summary
Selection::validate() should be broken into smaller pieces to be less confusing
Eric Seidel (no email)
Reported
2009-02-05 15:44:41 PST
Selection::validate() should be broken into smaller pieces to be less confusing I've done so. I think it's a lot easier to read. :) I also changed EState to SelectionState to match the coding style guidelines.
Attachments
Minor refactoring and cleanup to Selection code
(15.30 KB, patch)
2009-02-05 15:45 PST
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
Slightly clearer diff, and added documentation of ASSERTS ojan and I kept hitting in this code.
(14.97 KB, patch)
2009-02-05 16:04 PST
,
Eric Seidel (no email)
no flags
Details
Formatted Diff
Diff
updated after ojan and mark's comments
(14.88 KB, patch)
2009-02-06 14:37 PST
,
Eric Seidel (no email)
justin.garcia
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-02-05 15:45:25 PST
Created
attachment 27367
[details]
Minor refactoring and cleanup to Selection code WebCore/ChangeLog | 36 +++++++++++ WebCore/editing/Editor.cpp | 16 +++--- WebCore/editing/Selection.cpp | 104 +++++++++++++++++--------------- WebCore/editing/Selection.h | 36 ++++++----- WebCore/editing/SelectionController.h | 2 +- WebCore/editing/TypingCommand.cpp | 16 +++--- WebCore/page/Frame.cpp | 16 ++--- 7 files changed, 134 insertions(+), 92 deletions(-)
Eric Seidel (no email)
Comment 2
2009-02-05 16:04:55 PST
Created
attachment 27368
[details]
Slightly clearer diff, and added documentation of ASSERTS ojan and I kept hitting in this code. WebCore/ChangeLog | 36 ++++++++++++++++++++++ WebCore/editing/Editor.cpp | 16 +++++----- WebCore/editing/Selection.cpp | 54 +++++++++++++++++++------------- WebCore/editing/Selection.h | 36 ++++++++++++---------- WebCore/editing/SelectionController.h | 2 +- WebCore/editing/TypingCommand.cpp | 16 +++++----- WebCore/page/Frame.cpp | 16 ++++------ 7 files changed, 111 insertions(+), 65 deletions(-)
Eric Seidel (no email)
Comment 3
2009-02-05 16:18:57 PST
Adding folks who might like to review this (tiny) piece of wonderment!
Ojan Vafai
Comment 4
2009-02-05 17:34:15 PST
Comment on
attachment 27368
[details]
Slightly clearer diff, and added documentation of ASSERTS ojan and I kept hitting in this code. A nit. (not that I'm a reviewer)
> +++ b/WebCore/editing/Selection.cpp > +void Selection::setBaseAndExtentToDeepEquivilants()
Typo: Equivalents. Here and elsewhere.
Eric Seidel (no email)
Comment 5
2009-02-06 14:37:18 PST
Comment on
attachment 27368
[details]
Slightly clearer diff, and added documentation of ASSERTS ojan and I kept hitting in this code. Will post update with spelling correction and fix of ASSERT
Eric Seidel (no email)
Comment 6
2009-02-06 14:37:34 PST
Created
attachment 27419
[details]
updated after ojan and mark's comments WebCore/ChangeLog | 36 ++++++++++++++++++++++ WebCore/editing/Editor.cpp | 16 +++++----- WebCore/editing/Selection.cpp | 52 +++++++++++++++++++------------- WebCore/editing/Selection.h | 36 ++++++++++++---------- WebCore/editing/SelectionController.h | 2 +- WebCore/editing/TypingCommand.cpp | 16 +++++----- WebCore/page/Frame.cpp | 16 ++++------ 7 files changed, 110 insertions(+), 64 deletions(-)
Eric Seidel (no email)
Comment 7
2009-02-06 14:38:15 PST
I've of course run the layout tests and they pass. :)
Justin Garcia
Comment 8
2009-02-06 15:22:01 PST
- enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT }; Where did it go?
Eric Seidel (no email)
Comment 9
2009-02-06 15:33:22 PST
(In reply to
comment #8
)
> - enum EDirection { FORWARD, BACKWARD, RIGHT, LEFT }; > > Where did it go?
It's not needed in this file. It's already declared in SelectionController as well iirc.
Eric Seidel (no email)
Comment 10
2009-02-06 16:09:03 PST
Thanks! VisibleSelection here we come! Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebCore/ChangeLog M WebCore/editing/Editor.cpp M WebCore/editing/Selection.cpp M WebCore/editing/Selection.h M WebCore/editing/SelectionController.h M WebCore/editing/TypingCommand.cpp M WebCore/page/Frame.cpp Committed
r40738
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug