[Webkit-unassigned] [Bug 39854] Refactor platform dependent editing behavior code out of Settings

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 28 08:38:03 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39854


Antonio Gomes (tonikitoo) <tonikitoo at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #57277|0                           |1
        is obsolete|                            |




--- Comment #5 from Antonio Gomes (tonikitoo) <tonikitoo at webkit.org>  2010-05-28 08:38:00 PST ---
Created an attachment (id=57331)
 --> (https://bugs.webkit.org/attachment.cgi?id=57331)
wip - second prototype of the idea

> I think we probably don't need the cpp file though. These methods should all > be really dumb if-statements that check the editing behavior and return
> booleans.

Not using dedicated .cpp/.h files for the class anymore. Instead it is not a private class of Settings and it is now called EditingBehaviorController

> A class is OK too, but I don't think it needs to be mutable. Instead the constructor can take an argument of the behavior, and to change it you can just replace the object with an entirely new one. There's no need to ever take a pointer to one of these.

Ok, also made it not mutable: wheneven Settings::setEditingBehavior(EditingBehavior) is called, a new Object is created on the stack.

In this design, for each specific editing behavior there would be a method in Settings and a correspondent method in EditingBehaviorController. The former returns a forward the call of the latter.

The changes in RenderBlock is still shown as an example call site.

What do you think?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list