WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
193704
Introduce CustomUndoStep.h and CustomUndoStep.cpp
https://bugs.webkit.org/show_bug.cgi?id=193704
Summary
Introduce CustomUndoStep.h and CustomUndoStep.cpp
Wenson Hsieh
Reported
2019-01-22 19:43:40 PST
Work towards <
rdar://problem/44807048
>
Attachments
Patch
(13.55 KB, patch)
2019-01-22 19:46 PST
,
Wenson Hsieh
rniwa
: review+
Details
Formatted Diff
Diff
Patch for landing
(13.33 KB, patch)
2019-01-22 21:30 PST
,
Wenson Hsieh
wenson_hsieh
: commit-queue-
Details
Formatted Diff
Diff
Patch for landing
(11.85 KB, patch)
2019-01-22 21:32 PST
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2019-01-22 19:46:11 PST
Created
attachment 359840
[details]
Patch
Ryosuke Niwa
Comment 2
2019-01-22 19:51:39 PST
Comment on
attachment 359840
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=359840&action=review
> Source/WebCore/editing/CompositeEditCommand.h:91 > + const String& customUndoLabel() const final { return emptyString(); }
I think a better approach is have the conversion from EditAction to label here.
Ryosuke Niwa
Comment 3
2019-01-22 19:52:33 PST
(In reply to Ryosuke Niwa from
comment #2
)
> Comment on
attachment 359840
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=359840&action=review
> > > Source/WebCore/editing/CompositeEditCommand.h:91 > > + const String& customUndoLabel() const final { return emptyString(); } > > I think a better approach is have the conversion from EditAction to label > here.
Not saying that we should make such a change in this patch but I think having editAction() & customUndoLabel() is rather confusing so we probably shouldn't add such a method. Also, this label is used for redo as well so saying it's undo label is quite misleading.
Wenson Hsieh
Comment 4
2019-01-22 20:03:13 PST
(In reply to Ryosuke Niwa from
comment #3
)
> (In reply to Ryosuke Niwa from
comment #2
) > > Comment on
attachment 359840
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=359840&action=review
> > > > > Source/WebCore/editing/CompositeEditCommand.h:91 > > > + const String& customUndoLabel() const final { return emptyString(); } > > > > I think a better approach is have the conversion from EditAction to label > > here. > > Not saying that we should make such a change in this patch but I think > having editAction() & customUndoLabel() is rather confusing so we probably > shouldn't add such a method. Also, this label is used for redo as well so > saying it's undo label is quite misleading.
That's a good point! This will take a bit of refactoring, but I think it's worth it (this should also allow us to remove some duplicate code between WebKitLegacy and WebKit). I'll land this patch (Part 2) without customUndoLabel() for now, and write up a patch to add an undoRedoLabel() method to UndoStep instead. This refactoring patch will sit between this one (Part 2) and the Part 3 I had planned.
Wenson Hsieh
Comment 5
2019-01-22 21:30:22 PST
Created
attachment 359848
[details]
Patch for landing
Wenson Hsieh
Comment 6
2019-01-22 21:32:31 PST
Created
attachment 359849
[details]
Patch for landing
WebKit Commit Bot
Comment 7
2019-01-22 22:10:51 PST
Comment on
attachment 359849
[details]
Patch for landing Clearing flags on attachment: 359849 Committed
r240328
: <
https://trac.webkit.org/changeset/240328
>
Wenson Hsieh
Comment 8
2019-01-22 22:29:29 PST
(In reply to Wenson Hsieh from
comment #4
)
> (In reply to Ryosuke Niwa from
comment #3
) > > (In reply to Ryosuke Niwa from
comment #2
) > > > Comment on
attachment 359840
[details]
> > > Patch > > > > > > View in context: > > >
https://bugs.webkit.org/attachment.cgi?id=359840&action=review
> > > > > > > Source/WebCore/editing/CompositeEditCommand.h:91 > > > > + const String& customUndoLabel() const final { return emptyString(); } > > > > > > I think a better approach is have the conversion from EditAction to label > > > here. > > > > Not saying that we should make such a change in this patch but I think > > having editAction() & customUndoLabel() is rather confusing so we probably > > shouldn't add such a method. Also, this label is used for redo as well so > > saying it's undo label is quite misleading. > > That's a good point! This will take a bit of refactoring, but I think it's > worth it (this should also allow us to remove some duplicate code between > WebKitLegacy and WebKit). I'll land this patch (Part 2) without > customUndoLabel() for now, and write up a patch to add an undoRedoLabel() > method to UndoStep instead. > > This refactoring patch will sit between this one (Part 2) and the Part 3 I > had planned.
I filed
https://bugs.webkit.org/show_bug.cgi?id=193706
to track this refactoring.
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