[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 12:41:26 PDT 2010


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|Linux                       |All
             Status|NEW                         |ASSIGNED
         AssignedTo|webkit-unassigned at lists.web |tonikitoo at webkit.org
                   |kit.org                     |




--- Comment #11 from Antonio Gomes (tonikitoo) <tonikitoo at webkit.org>  2010-05-28 12:41:23 PST ---
Eric suggested something else, which sounds reasonable to me: EditingBehavior (the class) to be very self contained and not even know about Settings and all.

<eseidel> anyway if you have EditingBehavior(settings->editingBehavior()) then you can ask nice questions like .shouldIDoAwesomeEditingStuff()
<eseidel> EditingBehavior is simply about trying to make the individual code lines not have to make policy decisions about mac vs. linux
<eseidel> they ask the question they want, in "plain english" as functions on the EditingBehavior, adn that class maps from the policy enum to a bool for that behavior
<eseidel> tonikitoo: so I don't think that SEttings would even know about the new EditingBehavior
<eseidel> tonikitoo: it could, but if it does, only to just call EditingBehavior(editingBehavior())

... we would end up with call sites doing

EditingBehavior foo(settings->editingBehavior());
if (foo.shouldXXXYYYZZZ()) {
   // cool stuff
}

of course, enum would be renamed to something else to avoid collision.

thoughts?

ps: it is good that we are putting cards over table, and I am sure we will find out the solution that all would be happy in the end

-- 
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