Bug 57938 - Add member functions for determining line/paragraph separation to InlineIterator
Summary: Add member functions for determining line/paragraph separation to InlineIterator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Levi Weintraub
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 03:23 PDT by Levi Weintraub
Modified: 2011-04-06 05:13 PDT (History)
1 user (show)

See Also:


Attachments
Patch (5.79 KB, patch)
2011-04-06 04:16 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff
Patch (5.82 KB, patch)
2011-04-06 04:56 PDT, Levi Weintraub
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Levi Weintraub 2011-04-06 03:23:19 PDT
These checks are currently done by calling into public member variables of InlineIterator, and should be cleaned up.

Also adding "preservesNewline" to RenderObject.
Comment 1 Levi Weintraub 2011-04-06 04:16:37 PDT
Created attachment 88392 [details]
Patch
Comment 2 Ryosuke Niwa 2011-04-06 04:39:12 PDT
Comment on attachment 88392 [details]
Patch

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

> Source/WebCore/rendering/InlineIterator.h:71
> +    inline bool isHardTextLinebreak()

Since this is a member function of an iterator, would atHardTextLinebreak makes more sense?  But what does hard text line break really mean?  Is this terminology used elsewhere?  Maybe atPreservedLineBreak makes more sense?

> Source/WebCore/rendering/InlineIterator.h:77
> +    inline bool isParagraphSeparator()

Ditto: s/is/at/
Comment 3 Levi Weintraub 2011-04-06 04:46:39 PDT
Comment on attachment 88392 [details]
Patch

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

>> Source/WebCore/rendering/InlineIterator.h:71
>> +    inline bool isHardTextLinebreak()
> 
> Since this is a member function of an iterator, would atHardTextLinebreak makes more sense?  But what does hard text line break really mean?  Is this terminology used elsewhere?  Maybe atPreservedLineBreak makes more sense?

At sounds fine. HardLineBreak is the terminology used in BidiResolver (see: createBidiRunsForLine). Though we don't yet support it, when we add support for Unicode Paragraph Separators (https://bugs.webkit.org/show_bug.cgi?id=53203), this won't just be applicable to preserved newline characters.

How about atTextParagraphSeparator, as this is how it will be treated when running Unicode BiDi algorithm?
Comment 4 Levi Weintraub 2011-04-06 04:56:36 PDT
Created attachment 88396 [details]
Patch
Comment 5 Levi Weintraub 2011-04-06 05:13:05 PDT
Comment on attachment 88396 [details]
Patch

Clearing flags on attachment: 88396

Committed r83038: <http://trac.webkit.org/changeset/83038>
Comment 6 Levi Weintraub 2011-04-06 05:13:15 PDT
All reviewed patches have been landed.  Closing bug.