Bug 202697 - [LFC][Painting] Add very basic block and inline painting
Summary: [LFC][Painting] Add very basic block and inline painting
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-10-08 09:28 PDT by zalan
Modified: 2019-10-08 21:34 PDT (History)
7 users (show)

See Also:


Attachments
Patch (10.56 KB, patch)
2019-10-08 09:32 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (10.56 KB, patch)
2019-10-08 09:34 PDT, 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-10-08 09:28:46 PDT
only border/background color with simple text. no phases and z-index.
Comment 1 Radar WebKit Bug Importer 2019-10-08 09:29:16 PDT
<rdar://problem/56076562>
Comment 2 zalan 2019-10-08 09:32:07 PDT
Created attachment 380435 [details]
Patch
Comment 3 zalan 2019-10-08 09:34:06 PDT
Created attachment 380437 [details]
Patch
Comment 4 Antti Koivisto 2019-10-08 09:39:18 PDT
Comment on attachment 380437 [details]
Patch

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

> Source/WebCore/layout/displaytree/DisplayPainter.cpp:99
> +static void paintInlineContent(GraphicsContext& context, const Box& absoluteDisplayBox, const RenderStyle& style, const String& content, const Layout::InlineFormattingState& formattingState)

Maybe things like GraphicsContext should become members of the Painter?
Comment 5 zalan 2019-10-08 09:40:38 PDT
(In reply to Antti Koivisto from comment #4)
> Comment on attachment 380437 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=380437&action=review
> 
> > Source/WebCore/layout/displaytree/DisplayPainter.cpp:99
> > +static void paintInlineContent(GraphicsContext& context, const Box& absoluteDisplayBox, const RenderStyle& style, const String& content, const Layout::InlineFormattingState& formattingState)
> 
> Maybe things like GraphicsContext should become members of the Painter?
Yeah, we need to figure out the proper setup here.
Comment 6 WebKit Commit Bot 2019-10-08 10:26:37 PDT
Comment on attachment 380437 [details]
Patch

Clearing flags on attachment: 380437

Committed r250837: <https://trac.webkit.org/changeset/250837>
Comment 7 WebKit Commit Bot 2019-10-08 10:26:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Sam Weinig 2019-10-08 10:43:55 PDT
Since historically, painting is hard to test, do you think there is anything we can do, as you start adding painting support, to make this more testable? 

For instance, and this is just a for instance, one idea would be to virtualize the GraphicsContext calls, and have a concrete implementation that just logs the calls. Then, for testing, we could do dump calls and test against an expected set of calls (a-la-a dump render tree).
Comment 9 zalan 2019-10-08 21:34:47 PDT
(In reply to Sam Weinig from comment #8)
> Since historically, painting is hard to test, do you think there is anything
> we can do, as you start adding painting support, to make this more testable? 
> 
> For instance, and this is just a for instance, one idea would be to
> virtualize the GraphicsContext calls, and have a concrete implementation
> that just logs the calls. Then, for testing, we could do dump calls and test
> against an expected set of calls (a-la-a dump render tree).

This is a very good idea. We actually might be able to use the display list recording for this.