Bug 15896 - More editing cleanup
Summary: More editing cleanup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-08 04:14 PST by Alexey Proskuryakov
Modified: 2007-11-11 12:32 PST (History)
0 users

See Also:


Attachments
proposed patch (45.15 KB, patch)
2007-11-08 04:17 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2007-11-08 04:14:43 PST
More changes (not sure if I'm going to become an editing expert as a result, but others' experience will get obsoleted for sure :-) ).

Some of the changes might be rather risky. Any mistakes found (or not) during reviewing would be an opportunity to impove our test coverage...
Comment 1 Alexey Proskuryakov 2007-11-08 04:17:58 PST
Created attachment 17122 [details]
proposed patch
Comment 2 Darin Adler 2007-11-10 12:40:41 PST
Comment on attachment 17122 [details]
proposed patch

-int Node::maxOffset() const
+int Node::maxCharacterOffset() const
 {
-    return 1;
+    ASSERT_NOT_REACHED();
+    return 0;
 }

Could this be pure virtual?

+    return (int)m_data.length();

I'd prefer a C++ style cast.

r=me
Comment 3 Alexey Proskuryakov 2007-11-11 12:32:51 PST
Committed revision 27690.

(In reply to comment #2)
> Could this be pure virtual?

I think it can not - if it were pure virtual, other subclasses would have to override it.

> I'd prefer a C++ style cast.

Done.