Bug 205623 - [LFC][IFC] Add LineBreaker::Result::Revert to indicate an earlier line wrap opportunity
Summary: [LFC][IFC] Add LineBreaker::Result::Revert to indicate an earlier line wrap o...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-12-28 19:58 PST by zalan
Modified: 2019-12-29 10:28 PST (History)
6 users (show)

See Also:


Attachments
Patch (9.02 KB, patch)
2019-12-28 20:07 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (7.92 KB, patch)
2019-12-29 09:29 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2019-12-28 19:58:31 PST
ssia
Comment 1 Radar WebKit Bug Importer 2019-12-28 19:58:54 PST
<rdar://problem/58228339>
Comment 2 zalan 2019-12-28 20:07:29 PST
Created attachment 386480 [details]
Patch
Comment 3 Antti Koivisto 2019-12-29 02:31:59 PST
Comment on attachment 386480 [details]
Patch

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

> Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp:140
> -        return { Result::Action::Keep, IsEndOfLine::No, { } };
> +        return Result { Result::Action::Keep };

Why name the type here and elsewhere?

> Source/WebCore/layout/inlineformatting/InlineLineBreaker.h:66
> +        Result(Action, IsEndOfLine = IsEndOfLine::No, Optional<PartialTrailingContent> = WTF::nullopt, const InlineItem* revertTo = nullptr);
> +
> +        Action action { Action::Keep };
> +        IsEndOfLine isEndOfLine { IsEndOfLine::No };
>          Optional<PartialTrailingContent> partialTrailingContent;
> +        const InlineItem* revertTo { nullptr };
>      };

I don't think you need a constructor if you make it

Optional<PartialTrailingContent> partialTrailingContent { };
Comment 4 zalan 2019-12-29 08:54:03 PST
(In reply to Antti Koivisto from comment #3)
> Comment on attachment 386480 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=386480&action=review
> 
> > Source/WebCore/layout/inlineformatting/InlineLineBreaker.cpp:140
> > -        return { Result::Action::Keep, IsEndOfLine::No, { } };
> > +        return Result { Result::Action::Keep };
> 
> Why name the type here and elsewhere?
Because I did not pay attention?

> 
> > Source/WebCore/layout/inlineformatting/InlineLineBreaker.h:66
> > +        Result(Action, IsEndOfLine = IsEndOfLine::No, Optional<PartialTrailingContent> = WTF::nullopt, const InlineItem* revertTo = nullptr);
> > +
> > +        Action action { Action::Keep };
> > +        IsEndOfLine isEndOfLine { IsEndOfLine::No };
> >          Optional<PartialTrailingContent> partialTrailingContent;
> > +        const InlineItem* revertTo { nullptr };
> >      };
> 
> I don't think you need a constructor if you make it
> 
> Optional<PartialTrailingContent> partialTrailingContent { };
oh cool
Comment 5 zalan 2019-12-29 09:29:20 PST
Created attachment 386492 [details]
Patch
Comment 6 WebKit Commit Bot 2019-12-29 10:27:41 PST
The commit-queue encountered the following flaky tests while processing attachment 386492 [details]:

imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors-small.html bug 203433
The commit-queue is continuing to process your patch.
Comment 7 WebKit Commit Bot 2019-12-29 10:28:31 PST
Comment on attachment 386492 [details]
Patch

Clearing flags on attachment: 386492

Committed r253937: <https://trac.webkit.org/changeset/253937>
Comment 8 WebKit Commit Bot 2019-12-29 10:28:33 PST
All reviewed patches have been landed.  Closing bug.