Bug 136514 - Initial letters should clear one another
Summary: Initial letters should clear one another
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-09-03 16:23 PDT by Dave Hyatt
Modified: 2014-11-22 02:42 PST (History)
7 users (show)

See Also:


Attachments
Patch (61.32 KB, patch)
2014-09-03 16:27 PDT, Dave Hyatt
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2014-09-03 16:23:36 PDT
Initial letters should clear one another so that short paragraphs don't result in first letters getting jumbled up.
Comment 1 Dave Hyatt 2014-09-03 16:27:02 PDT
Created attachment 237599 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-09-03 16:29:40 PDT
Comment on attachment 237599 [details]
Patch

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

> Source/WebCore/rendering/RenderBlockFlow.cpp:2304
> +    bool isInitialLetter = childBox.style().styleType() == FIRST_LETTER && childBox.style().initialLetterDrop() > 0;

Seems like this could be an inline function on RenderStyle.

> Source/WebCore/rendering/RenderBlockFlow.cpp:2576
> +    const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();

auto?

> Source/WebCore/rendering/RenderBlockFlow.cpp:2580
> +        if (floatingObject->isPlaced() && floatingObject->renderer().style().styleType() == FIRST_LETTER && floatingObject->renderer().style().initialLetterDrop() > 0)

Then you could say floatingObject->renderer().style().hasInitialLetter() here.
Comment 3 Dave Hyatt 2014-09-04 13:58:56 PDT
Not going to add the method to RenderStyle, but only because next patch will add support for initial-letter on things other than first letters, and at that point just checking the property itself (without checking first letter any longer) will be sufficient.
Comment 4 Radar WebKit Bug Importer 2014-11-11 09:52:08 PST
<rdar://problem/18941425>
Comment 5 Jon Lee 2014-11-11 09:52:30 PST
Changelist 173281