Bug 23430

Summary: Frame Refactor: Move methods from Frame to Editor
Product: WebKit Reporter: Holger Freyther <zecke>
Component: WebKit Misc.Assignee: Holger Freyther <zecke>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Do the moving eric: review-

Description Holger Freyther 2009-01-20 03:58:53 PST
const Selection& mark() const; // Mark, to be used as emacs uses it.
void setMark(const Selection&);

void computeAndSetTypingStyle(CSSStyleDeclaration* , EditAction = EditActionUnspecified);
String selectionStartStylePropertyValue(int stylePropertyID) const;
void applyEditingStyleToBodyElement() const;
void applyEditingStyleToElement(Element*) const;

IntRect firstRectForRange(Range*) const;

void respondToChangedSelection(const Selection& oldSelection, bool closeTyping);
bool shouldChangeSelection(const Selection& oldSelection, const Selection& newSelection, EAffinity, bool stillSelecting) const;

RenderStyle* styleForSelectionStart(Node*& nodeToRemove) const;

unsigned markAllMatchesForText(const String&, bool caseFlag, unsigned limit);
bool markedTextMatchesAreHighlighted() const;
void setMarkedTextMatchesAreHighlighted(bool flag);

PassRefPtr<CSSComputedStyleDeclaration> selectionComputedStyle(Node*& nodeToRemove) const;

void textFieldDidBeginEditing(Element*);
void textFieldDidEndEditing(Element*);
void textDidChangeInTextField(Element*);
bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*);
void textWillBeDeletedInTextField(Element* input);
void textDidChangeInTextArea(Element*);

DragImageRef dragImageForSelection();
Comment 1 Holger Freyther 2009-01-20 04:43:30 PST
Created attachment 26862 [details]
Do the moving

Tests pass on the mac. I need to verify the result o git rebase and manual merging as I was hit hard by Sam's work on killing FramePrivate. Review and comments are appreciated right now.
Comment 2 Eric Seidel (no email) 2009-05-21 18:32:55 PDT
Comment on attachment 26862 [details]
Do the moving

So long as you're just moving code, this looks great.  I worry that this patch is long-since rotten (that the methods you're moving may have changed).

It seems a little strange that selectedText() is on Editor instead of say SelectionController, but it seems fine.

r=me, if you make sure the patch is updated to compile with TOT with all the LayoutTests passing and that you're certain that the code you are moving is up-to-date.
Comment 3 Eric Seidel (no email) 2009-06-15 18:57:08 PDT
Comment on attachment 26862 [details]
Do the moving

Not much use having this in the commit queue.  You have my r+ if this is updated to work on TOT.  I guess I'll mark it r- for now and you can re-post a patch which applies on TOT.
Comment 4 Ryosuke Niwa 2012-05-30 00:54:10 PDT
Fixed in http://trac.webkit.org/changeset/67122.

*** This bug has been marked as a duplicate of bug 45218 ***