Bug 201076 - Implement layout system independent text box iterator
Summary: Implement layout system independent text box iterator
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: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-23 05:52 PDT by Antti Koivisto
Modified: 2019-08-26 10:58 PDT (History)
7 users (show)

See Also:


Attachments
patch (21.17 KB, patch)
2019-08-23 06:00 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (21.17 KB, patch)
2019-08-23 06:19 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (21.46 KB, patch)
2019-08-23 23:33 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2019-08-23 05:52:53 PDT
Add a generic way to traverse line layout without caring about the details of the underlying layout system.
Comment 1 Antti Koivisto 2019-08-23 06:00:35 PDT
Created attachment 377124 [details]
patch
Comment 2 Antti Koivisto 2019-08-23 06:19:50 PDT
Created attachment 377125 [details]
patch
Comment 3 Simon Fraser (smfr) 2019-08-23 11:13:56 PDT
Comment on attachment 377125 [details]
patch

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

> Source/WebCore/rendering/line/DisplayAccessTextBoxes.h:39
> +namespace DisplayAccess {

I don't like this name for two reasons. First, "Display" can be read as a verb. Second you're not accessing displays.
Comment 4 Antti Koivisto 2019-08-23 12:01:53 PDT
Display as in "display tree". But suggestions are welcome.
Comment 5 Antti Koivisto 2019-08-23 13:43:53 PDT
I think I'll go with 'LineInterface' for the namespace.
Comment 6 Sam Weinig 2019-08-23 14:35:06 PDT
Can you help me understand what a LineInterface::TextBox (or DisplayAccess::TextBox) is supposed to represent. With both of those names, I can't quite wrap my head around it.
Comment 7 Antti Koivisto 2019-08-23 14:54:00 PDT
(In reply to Sam Weinig from comment #6)
> Can you help me understand what a LineInterface::TextBox (or
> DisplayAccess::TextBox) is supposed to represent. With both of those names,
> I can't quite wrap my head around it.

It is an interface for accessing (layout generated) text box properties that hides the underlying data structures. There will be similar interfaces for other inline box types. Note that TextBox itself is just a temporary generated by the iterator, it is not an interesting type in itself.

The goal is be able to write code that accesses line layout without having to write multiple versions for different paths (we have two and a third one on the way).
Comment 8 Antti Koivisto 2019-08-23 23:33:52 PDT
Created attachment 377204 [details]
patch
Comment 9 Antti Koivisto 2019-08-23 23:35:09 PDT
Called it LineLayoutInterface
Comment 10 WebKit Commit Bot 2019-08-24 06:31:56 PDT
Comment on attachment 377204 [details]
patch

Clearing flags on attachment: 377204

Committed r249084: <https://trac.webkit.org/changeset/249084>
Comment 11 WebKit Commit Bot 2019-08-24 06:31:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Radar WebKit Bug Importer 2019-08-24 06:32:16 PDT
<rdar://problem/54670697>
Comment 13 Simon Fraser (smfr) 2019-08-26 10:58:51 PDT
Comment on attachment 377204 [details]
patch

I would prefer we avoid "interface" in names. See VideoFullscreenInterface, for which I can never grok the meaning of "interface".