WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 184854
Render a badge on system preview images
https://bugs.webkit.org/show_bug.cgi?id=184854
Summary
Render a badge on system preview images
Dean Jackson
Reported
2018-04-20 17:51:05 PDT
Render a badge on system preview images
Attachments
Patch
(6.66 KB, patch)
2018-04-20 18:14 PDT
,
Dean Jackson
thorton
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-04-20 17:51:41 PDT
<
rdar://problem/39615154
>
Dean Jackson
Comment 2
2018-04-20 18:14:48 PDT
Created
attachment 338503
[details]
Patch
Tim Horton
Comment 3
2018-04-20 18:19:38 PDT
Comment on
attachment 338503
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338503&action=review
> Source/WebCore/rendering/RenderTheme.cpp:1374 > + auto roundedMarkerRect = FloatRoundedRect { markerRect, { 8, 8 }, { 8, 8 }, { 8, 8 }, { 8, 8 } };
There is a single-float uniform radii constructor
zalan
Comment 4
2018-04-20 18:22:26 PDT
Comment on
attachment 338503
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338503&action=review
> Source/WebCore/rendering/RenderTheme.cpp:1360 > +void RenderTheme::paintSystemPreviewBadge(Image& image, const PaintInfo& paintInfo, const FloatRect& rect)
const Image&
> Source/WebCore/rendering/RenderTheme.cpp:1375 > + auto markerRect = FloatRect {rect.x() + rect.width() - 24, rect.y() + 8, 16, 16 }; > + auto roundedMarkerRect = FloatRoundedRect { markerRect, { 8, 8 }, { 8, 8 }, { 8, 8 }, { 8, 8 } }; > + auto color = Color { 255, 0, 0 };
How do these hardcoded values work in scaled context?
Tim Horton
Comment 5
2018-04-20 18:28:43 PDT
Comment on
attachment 338503
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338503&action=review
>> Source/WebCore/rendering/RenderTheme.cpp:1375 >> + auto color = Color { 255, 0, 0 }; > > How do these hardcoded values work in scaled context?
Assuming the badge should scale up, they'll be fine!
Dean Jackson
Comment 6
2018-04-20 18:32:05 PDT
Committed
r230872
: <
https://trac.webkit.org/changeset/230872
>
Dean Jackson
Comment 7
2018-04-20 18:35:28 PDT
(In reply to Tim Horton from
comment #5
)
> Comment on
attachment 338503
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=338503&action=review
> > >> Source/WebCore/rendering/RenderTheme.cpp:1375 > >> + auto color = Color { 255, 0, 0 }; > > > > How do these hardcoded values work in scaled context? > > Assuming the badge should scale up, they'll be fine!
Yep, the badge should scale with the image. The one we'll implement for Apple is specified to be 10% of the image height.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug