Closed Bug 1562359 Opened 5 years ago Closed 5 years ago

Assertion failure: cachedStyles[i]->EqualForCachedAnonymousContentStyle(*cs) (cached anonymous content styles should be identical to those we would compute normally), at /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp:3962

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: hiro, Assigned: heycam)

References

Details

Attachments

(1 file)

layout/forms/crashtests/1212688.html | causes this assertion. (I saw this on a try of mine)

Just in case you are not aware of this.

Thanks, I didn't see that failure before.

I'm going to turn the pref off so I can investigate this and bug 1562361 next week.

(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)

layout/forms/crashtests/1212688.html | causes this assertion. (I saw this on a try of mine)

I did put a wrong link. Here is a failure on m-c that I wanted to put. https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=900a0b1270437d60f87cd2832743439824ee9473&selectedJob=254027747

Thank you. Looks like it has been mis-starred.

Keywords: leave-open

From the logs:

Actual style:
  Properties:
    display: none
  Rules:
    xul|scrollbarbutton[sbattr="scrollbar-up-top"], xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] { display: none; }
    xul|scrollbarbutton { background-image: none !important; }
    xul|scrollbarbutton { min-height: 6px !important; min-width: 6px !important; -moz-appearance: none !important; visibility: hidden; }
    scrollbar, scrollbarbutton, scrollcorner, slider, thumb { user-select: none; }
    scrollbarbutton, slider, thumb { direction: inherit; cursor: inherit; }
    scrollcorner, resizer, scrollbar, scrollbarbutton, slider { border-block: initial; border-inline: initial; border-start-start-radius: initial; border-start-end-radius: initial; border-end-start-radius: initial; border-end-end-radius: initial; overflow-inline: initial; overflow-block: initial; margin-block: initial; margin-inline: initial; scroll-margin-block: initial; scroll-margin-inline: initial; padding-block: initial; padding-inline: initial; scroll-padding-block: initial; scroll-padding-inline: initial; inset-block: initial; inset-inline: initial; block-size: initial; min-block-size: initial; max-block-size: initial; inline-size: initial; min-inline-size: initial; max-inline-size: initial; background: initial; background-blend-mode: initial; border: initial; border-radius: initial; box-decoration-break: initial; -moz-float-edge: initial; position: initial; float: initial; clear: initial; vertical-align: initial; overflow: initial; overflow-anchor: initial; transition: initial; animation: initial; tr
    * { -moz-user-focus: ignore; user-select: none; display: -moz-box; box-sizing: border-box; }
Expected style:
  Properties:
    display: block
  Rules:
    select:not([size]):not([multiple]) > xul|scrollbar, select[size="1"] > xul|scrollbar, select:not([size]):not([multiple]) xul|scrollbarbutton, select[size="1"] xul|scrollbarbutton { display: block; margin-left: 0px; min-width: 16px; }
    xul|scrollbarbutton[sbattr="scrollbar-up-top"], xul|scrollbarbutton[sbattr="scrollbar-bottom-top"] { display: none; }
    xul|scrollbarbutton { background-image: none !important; }
    xul|scrollbarbutton { min-height: 6px !important; min-width: 6px !important; -moz-appearance: none !important; visibility: hidden; }
    scrollbar, scrollbarbutton, scrollcorner, slider, thumb { user-select: none; }
    scrollbarbutton, slider, thumb { direction: inherit; cursor: inherit; }
    scrollcorner, resizer, scrollbar, scrollbarbutton, slider { border-block: initial; border-inline: initial; border-start-start-radius: initial; border-start-end-radius: initial; border-end-start-radius: initial; border-end-end-radius: initial; overflow-inline: initial; overflow-block: initial; margin-block: initial; margin-inline: initial; scroll-margin-block: initial; scroll-margin-inline: initial; padding-block: initial; padding-inline: initial; scroll-padding-block: initial; scroll-padding-inline: initial; inset-block: initial; inset-inline: initial; block-size: initial; min-block-size: initial; max-block-size: initial; inline-size: initial; min-inline-size: initial; max-inline-size: initial; background: initial; background-blend-mode: initial; border: initial; border-radius: initial; box-decoration-break: initial; -moz-float-edge: initial; position: initial; float: initial; clear: initial; vertical-align: initial; overflow: initial; overflow-anchor: initial; transition: initial; animation: initial; tr
    * { -moz-user-focus: ignore; user-select: none; display: -moz-box; box-sizing: border-box; }
Assertion failure: cachedStyles[i]->EqualForCachedAnonymousContentStyle(*cs) (cached anonymous content styles should be identical to those we would compute normally), at /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp:3962

I haven't debugged it, so I am probably wrong, but normally mOuter is the scrollable frame, so we should use mScrolledFrame instead? (I don't actually know what mOuter's nsIContent is there)

Ah I think it's failing in this test because the markup is

<style>
  optgroup { overflow-x: hidden; }
</style>
<select>
  <optgroup>
    <option>

and in mobile/android/themes/geckoview/content.css we have

select:not([size]):not([multiple]) > xul|scrollbar,
select[size="1"] > xul|scrollbar,
select:not([size]):not([multiple]) xul|scrollbarbutton,
select[size="1"] xul|scrollbarbutton {
  display: block;
  margin-left: 0;
  min-width: 16px;
}

and note that these have descendant selectors to match the scrollbarbutton elements. I think the optgroup is making its own scrollbars, separate from the select's. And the check I linked to in comment 6 would find that the parent of that scrollbar element is the optgroup.

I think we can just adjust the UA style rule to use child selectors instead. (We don't actually do anything with these optgroup scrollbars.)

Assignee: nobody → cam
Status: NEW → ASSIGNED

And I don't think we even use XUL select popups on GeckoView, so I'm not sure why we have these rules.

Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/529c44a1eba8
Tweak XUL scrollbar styles on GeckoView to avoid cached scrollbar style assertions. r=emilio
Regressions: 1563699

should this bug be closed?

Flags: needinfo?(cam)

Thanks, yes.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(cam)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: