Bug 15847

Summary: Some editing cleanup
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: HTML EditingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
proposed patch
none
updated patch
none
updated patch darin: review+

Alexey Proskuryakov
Reported 2007-11-05 10:56:48 PST
Some minor modifications I wanted to make while studying editing code. Patch forthcoming.
Attachments
proposed patch (12.99 KB, patch)
2007-11-05 11:10 PST, Alexey Proskuryakov
no flags
updated patch (12.36 KB, patch)
2007-11-06 01:12 PST, Alexey Proskuryakov
no flags
updated patch (13.02 KB, patch)
2007-11-06 01:35 PST, Alexey Proskuryakov
darin: review+
Alexey Proskuryakov
Comment 1 2007-11-05 11:10:55 PST
Created attachment 17048 [details] proposed patch
Alexey Proskuryakov
Comment 2 2007-11-06 01:12:47 PST
Created attachment 17057 [details] updated patch Removed a change to m_starting/endingSelection - I realized that m_starting/endingRootEditableElement depended on it. The constructor still looks wrong, but I don't understand the concepts well enough to suggest a fix.
Alexey Proskuryakov
Comment 3 2007-11-06 01:35:12 PST
Created attachment 17058 [details] updated patch Hmm, on the other hand, m_starting/engingRootEditableElement gets immediately overwritten, too.
Darin Adler
Comment 4 2007-11-06 07:38:05 PST
Comment on attachment 17058 [details] updated patch + return (NSString *)plainText(makeRange(startVisiblePosition, endVisiblePosition).get()); Why is that typecast needed? r=me Another kind of editing cleanup we need is to move as much as possible of the Mac-specific editing code in WebHTMLView into Editor and make it platform-independent. There's some truly-platform-specific code there, but there's more code that is there simply for historic reasons.
Alexey Proskuryakov
Comment 5 2007-11-06 08:12:02 PST
> + return (NSString *)plainText(makeRange(startVisiblePosition, > endVisiblePosition).get()); > > Why is that typecast needed? I thought it was needed because the function returned an id - but looks like Objective-C++ somehow guesses that a conversion to NSString * is implied here! Committed revision 27477.
Darin Adler
Comment 6 2007-11-06 08:45:25 PST
(In reply to comment #5) > I thought it was needed because the function returned an id - but looks like > Objective-C++ somehow guesses that a conversion to NSString * is implied here! Bizarre!
Note You need to log in before you can comment on or make changes to this bug.