Refactor gfxTextRange to better match how it's actually used
Categories
(Core :: Layout: Text and Fonts, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(1 file)
The gfxTextRange struct is not well-named or -placed in the tree. It's not a general-purpose text range; it's used only by gfxFontGroup to keep track of ranges and associated fonts during the font-matching process for text run construction.
The MatchType enum within gfxTextRange exists only so we can expose how font matching happened via the dom::InspectorFontFace interface.
So I intend to define the MatchType enum within InspectorFontFace (and alias it as FontMatchType within gfxTextRun/gfxFontGroup), and move the gfxTextRange struct inside gfxFontGroup as a local TextRange type, which better reflects its purpose.
(The real motivation for this, aside from that it feels better-organized, is to eliminate the need for #include "gfxFont.h" in InspectorFontFace.h, because that led to conflicts later on in the shared-font-list work.)
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
This more closely reflects what the match-type flags and the range struct are actually used for,
and allows us to reduce #include usage of the massive gfxFont.h header.
Assignee | ||
Comment 2•6 years ago
|
||
:jwatt, just FYI - this is basically what you previously reviewed as "patch 3" in bug 1514869, but I've shuffled things around into what I think is a much better arrangement, and split it out into a dependent bug as it's a standalone change.
Updated•6 years ago
|
Comment 4•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Description
•