Bug 136514

Summary: Initial letters should clear one another
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, jonlee, kondapallykalyan, ossy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+

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