[webkit-dev] RenderLayer::isStackingContext() confusion
shawnsingh at chromium.org
Wed Apr 3 12:48:36 PDT 2013
According to CSS 2.1 spec, an element becomes a stacking context when:
- it is positioned (relative, absolute, or fixed)
- and it has a non-auto z-index
Spec also mentions that there's room for expanding this definition; the
examples I know about are fixed-position elements and elements with
The implementation of RenderLayer::isStackingContext() looks fishy. It
only checks for a non-auto z-index. It does not check for the positioning
style of the layer. There is no indication that it checks for any more
recent special cases such as fixed-position or transforms.
Is this function name a misnomer? should it actually be renamed to
If the additional criteria is not being checked inside this helper
function, then where is it? I see some code in collectLayers that looks
vaguely similar to checking whether an element is positioned, but what
about all the other uses of isStackingContext everywhere?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev