Closed Bug 683156 Opened 15 years ago Closed 13 years ago

opacity:0 items generate display items

Categories

(Core :: Web Painting, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: heeen, Unassigned)

Details

It appears that content with opacity:0 inside scrollboxes still generate display items: > . . . . Clip 0x45b8d090(TextBox(label)(1)[value=]) (0,148,854,332)(0,0,0,0) content=0x45bfd4c0 > . . . . . . ScrollLayer 0x45b8d090(TextBox(label)(1)[value=]) (0,0,0,0)(0,0,0,0) content=0x45bfd4c0 . . . . . . . . WrapList 0x45b8d090(TextBox(label)(1)[value=]) (0,0,0,0)(0,0,0,0) content=0x45bfd4c0 Although these badges have opacity:0 and no value, they still generate this clip-scrolllayer-wraplist construct without containing anything to draw. This was observed in fennec in the awesome page history, the css chain for the elements in question is > label .autocomplete-item-badge < vbox < hbox .autocomplete-item-container < autocompleteresult .history-item < richlistbox .history-list-children < historylist #history-items < vbox #awesome-panels < stack #stack < window #main-window if you set visibility:hidden, the items disappear as expected.
To elaborate: The problem lies in joining clips and scrolllayers generated by xul scroll boxes that I am working on in bug 657893. These empty badge items generate the aforementioned display items *after* the scroll bars, which means their clips and later scrollLayer items won't get merged with the rest of the scrolled content. This in turn will cause the last scrolllayer items to be deleted, which removes the display port. Without the display port, no caching takes place and we have to redraw a buffer the sice of the visible area (viewport) of the scrollbox. This incurs locking-painting-unlocking costs which hurt performance. In any case it doesn't make much sense to me to generate these invisible display items in the first place while we are generating display lists for rendering.
Component: Graphics → Layout: View Rendering
QA Contact: thebes → layout.view-rendering
// In case we are not using displayport or the nsDisplayScrollLayers are // flattened during visibility computation, we still need to export the // metadata about this scroll box to the compositor process. nsDisplayScrollInfoLayer* layerItem = new (aBuilder) nsDisplayScrollInfoLayer( aBuilder, mScrolledFrame, mOuter); So this creates a wrapper unconditionally even if there are no children to scroll. We can easily fix that. But then chrome won't be told about scrollable areas that are empty. Is that really what you want?
OK, I was confused. The question is, what's creating the empty WrapList that gets a ScrollLayer wrapped around it?
It is the badges some badge handler creates, but which are opacity:0 in their original state but get a transition to opacity:1 when they receive some content. http://mxr.mozilla.org/mozilla-central/source/mobile/themes/core/browser.css#852 http://mxr.mozilla.org/mozilla-central/source/mobile/chrome/content/common-ui.js#1445 A fix in css has been discussed with :mfinkle and I added it here https://bug657893.bugzilla.mozilla.org/attachment.cgi?id=556888 Nevertheless I think it would also be good to fix this in gecko.
Yeah, but what code is generating the WrapList object?
In bug 811831 we decided to keep creating display items for opacity:0 elements, but not create layers for them.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.