Page MenuHomePhabricator

Opacity bug on icons in Webkit/Blink
Closed, ResolvedPublic

Description

Setting opacity below 1 on icons results in a clipping of icons'/indicators' edge in Chrome under certain conditions.

There has been articles about Chrome and similar misbehaviour in Firefox.
I'm pretty sure, that I've come across such misbehaviour in production, but currently only one occasion is reproducible for me: Demo's icon section's IndicatorWidget in Chrome 62.0.3202.94 on Mac OS X on Retina display MacBook resolution. As soon as I switch to a different, external monitor (with higher resolution) the mis-rendering is gone as well.

Promoting elements with opacity property to a GPU composite layer seem to be a possible way out of this.

Event Timeline

Volker_E renamed this task from Opacity transition bug on icons in Chrome to Opacity bug on icons in Chrome.Dec 6 2017, 11:05 PM
Volker_E updated the task description. (Show Details)

@Catrope Coming from our in-person chat, adding a default value under 1 doesn't solve the specific issue.

Change 395881 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] demos: Promote icons page Indicator to GPU layer

https://gerrit.wikimedia.org/r/395881

There are blurry lines around improving the situation here. Testing any icon/indicator usage on different solutions in browser Chrome 17/18/19/20 on Win 7 via BrowserStack didn't uncover any other problematic occasion – neither in OOUI nor in VE standalone demos. Let's just update comments in places aside of demos and put this on resolved instead of adding .oo-ui-force-gpu-composite-layer() to any time we touch opacity.
Related to T154460: Revisit OOUI's GPU hack mixin `transform: translate3d()`

Change 395904 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] Clarify .oo-ui-force-gpu-composite-layer() mixin comment

https://gerrit.wikimedia.org/r/395904

Change 395904 merged by jenkins-bot:
[oojs/ui@master] Clarify .oo-ui-force-gpu-composite-layer() mixin comment

https://gerrit.wikimedia.org/r/395904

Volker_E triaged this task as Low priority.
Volker_E moved this task from Reviewing to OOUI-0.25.0 on the OOUI board.
Volker_E edited projects, added OOUI (OOUI-0.25.0); removed OOUI.
Volker_E removed a project: Patch-For-Review.
Volker_E removed a subscriber: gerritbot.

Change 395881 merged by jenkins-bot:
[oojs/ui@master] demos: Promote icons page IndicatorWidget to GPU layer

https://gerrit.wikimedia.org/r/395881

With the new icons in https://gerrit.wikimedia.org/r/#/c/400091/ among them several circled ones taking up the full SVG canvas, I've been able to (non-reproducibly) see this happen again in Chrome 63/OS X for 'help' (in ButtonWidget framed), 'alert' and 'info' icon. Not re-opening yet until fully reproducible.
Way out would be promoting these instances too, but it's open if there are limits in GPU layer usage and if trying to be wittier than the browser itself on a large amount of layers won't open door for side-effects.

T182257 Icon opacity-transition non-GPU issue after M229 - OOjs UI Demos 2018-01-04.png (620×1 px, 66 KB)

This also affects RCFilters background-color highlight circles.

Re-opened with RCFilters issue and new icons set.

Change 416919 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] WikimediaUI theme: Apply translateZ hack to full canvas icons

https://gerrit.wikimedia.org/r/416919

Change 416919 merged by Bartosz Dziewoński:
[oojs/ui@master] WikimediaUI theme: Apply translateZ hack to full canvas icons

https://gerrit.wikimedia.org/r/416919

matmarex edited projects, added OOUI; removed OOUI (OOUI-0.26.0).

Apex is still affected, same for some indicator combinations in WikimediaUI.

With .oo-ui-buttonElement.oo-ui-iconElement .oo-ui-iconElement-icon, .oo-ui-buttonElement.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator we've got the elevate to GPU hack already 163 times in place in demos. One concern was extending this further to more elements might backlash in unforseeable ways on pages with a lot of icons and indicators on mobile.

Volker_E renamed this task from Opacity bug on icons in Chrome to Opacity bug on icons in Webkit/Blink.Mar 29 2018, 8:04 PM

There you go:

<a class="mw-ui-button mw-ui-quiet" href="//www.mediawiki.org/w/index.php?title=Topic:U9s5xxu6hw5bu5id&amp;action=history" style="padding-left: 10px; padding-right: 0px;" title=""><span class="mw-ui-icon mw-ui-icon-before mw-ui-icon-clock"></span> History</a>

Thank you so much for looking into this, BTW, really appreciate how quickly you jumped on it!

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)

Volker_E claimed this task.

This has been resolved for the majority of full-icon use cases.