New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 649285 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Computed style values that use parentNode are wrong for Shadow DOM

Project Member Reported by esprehn@chromium.org, Sep 22 2016

Issue description

ex.

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp?sq=package:chromium&l=2145

        if (style.minHeight().isAuto()) {
            Node* parent = styledNode->parentNode();
            if (isFlexOrGrid(parent ? parent->ensureComputedStyle() : nullptr))
                return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
            return zoomAdjustedPixelValue(0, style);
        }
        return zoomAdjustedPixelValueForLength(style.minHeight(), style);

that doesn't work if you've been slotted somewhere, your parentStyle doesn't come from the parentNode(), it comes from your insertion point.
 

Comment 1 by timloh@chromium.org, Sep 23 2016

Cc: jfernan...@igalia.com
Status: Available (was: Untriaged)
Looks like min-height/width are the only users of the node at all in ComputedStyleCSSValueMapping::get. I couldn't work out which specs this was coming from but I'd guess we could try and move it to the StyleAdjuster and then remove all the plumbing of Node around these parts?
Cc: cbiesin...@chromium.org
I think @cbiesinger should know more about this. 
The spec is https://drafts.csswg.org/css-flexbox/#min-size-auto

"On a flex item whose overflow is visible in the main axis, when specified on the flex item’s main-axis min-size property, specifies an automatic minimum size. It otherwise computes to 0 (unless otherwise defined by a future specification)."

So our implementation is actually too simplistic but it does need to know if it's a flex item (or, grid item)
Labels: Hotlist-Interop

Comment 5 by hayato@chromium.org, Oct 12 2016

Components: -Blink>WebComponents Blink>DOM>ShadowDOM
Labels: Update-Quarterly

Comment 7 by hayato@chromium.org, Feb 17 2017

We should use FlatTreeTraversal::parent() here, from where parentStyle comes.

Comment 8 by kochi@chromium.org, Mar 30 2017

Components: -Blink>DOM>ShadowDOM

Comment 9 by kochi@chromium.org, Mar 30 2017

Cc: kochi@chromium.org
Labels: Code-ComputedStyle

Comment 11 by meade@chromium.org, Oct 31 2017

Labels: ApproachableBug
Labels: -Update-Quarterly
Project Member

Comment 13 by sheriffbot@chromium.org, Dec 6

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Untriaged)
The implementation for the mentioned instance in the report now checks if its layout object is a flex or grid item. No access to parentNode(). Could not see any suspicious use of parentNode() in css/ or style/ now.

Sign in to add a comment