Bug 15896

Summary: More 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: All   
OS: All   
Attachments:
Description Flags
proposed patch darin: review+

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.