Bug 108977 - Make baseWritingDirectionForSelectionStart available to all platforms in the Editor class
Summary: Make baseWritingDirectionForSelectionStart available to all platforms in the ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Unspecified
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-05 13:34 PST by Enrica Casucci
Modified: 2013-02-05 14:39 PST (History)
2 users (show)

See Also:


Attachments
Patch (4.50 KB, patch)
2013-02-05 14:16 PST, Enrica Casucci
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2013-02-05 13:34:45 PST
This method used to be Mac specific because it was returning NSWritingDirection.
After http://trac.webkit.org/changeset/141513 the same method now returns WritingDirection which is a WebCore type.
We want to move this to Editor.cpp so that we can use it for iOS as well.
Comment 1 Enrica Casucci 2013-02-05 14:16:24 PST
Created attachment 186703 [details]
Patch
Comment 2 Ryosuke Niwa 2013-02-05 14:21:52 PST
Comment on attachment 186703 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=186703&action=review

> Source/WebCore/editing/Editor.cpp:1345
> +        result = LeftToRightWritingDirection;
> +        break;

I know you're just moving an existing code but we can just return here.

> Source/WebCore/editing/Editor.cpp:1348
> +        result = RightToLeftWritingDirection;
> +        break;

Ditto.
Comment 3 Enrica Casucci 2013-02-05 14:34:05 PST
(In reply to comment #2)
> (From update of attachment 186703 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=186703&action=review
> 
> > Source/WebCore/editing/Editor.cpp:1345
> > +        result = LeftToRightWritingDirection;
> > +        break;
> 
> I know you're just moving an existing code but we can just return here.
> 
> > Source/WebCore/editing/Editor.cpp:1348
> > +        result = RightToLeftWritingDirection;
> > +        break;
> 
> Ditto.

I agree. Thanks for the review!
Comment 4 Enrica Casucci 2013-02-05 14:39:00 PST
Committed revision 141937.