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

Issue 859446 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

shadow part's partmap is off by one level

Project Member Reported by fergal@chromium.org, Jul 2

Issue description

Currently

<style>::part(outer) {...}</style>
<custom-element1 partmap="inner outer">
  <custom-element2>
    # shadow
      <span part="inner"></span>
  </custom-element2>
</custom-element1>

Allows the span to be styled. This does not match the spec and it allows the author of document to style the span even though the custom-element1's author has not forwarded the part.

A correct example has the partmap on the inner CE.

<style>::part(outer) {...}</style>
<custom-element1>
  <custom-element2 partmap="inner outer">
    # shadow
      <span part="inner"></span>
  </custom-element2>
</custom-element1>

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8269be5cd75e1c187125e25b091b9acd9de7f42

commit d8269be5cd75e1c187125e25b091b9acd9de7f42
Author: Fergal Daly <fergal@chromium.org>
Date: Tue Jul 03 08:43:04 2018

CSS: shadow part map application was off-by-one.

The previous implementation gave the document the ability to forward a
part from sub-component of a component but only the component author
should be able to do that.

Bug:  859446 , 805271
Change-Id: I37dc9399646a2db677c350546cbb1cfad7ee2d39
Reviewed-on: https://chromium-review.googlesource.com/1122136
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Anders Ruud <andruud@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572148}
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/WebKit/LayoutTests/css-shadow-parts/double-forward.html
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/WebKit/LayoutTests/css-shadow-parts/invalidation-change-part-name-forward.html
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/WebKit/LayoutTests/css-shadow-parts/invalidation-change-partmap-forward.html
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/WebKit/LayoutTests/css-shadow-parts/invalidation-complex-selector-forward.html
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/WebKit/LayoutTests/css-shadow-parts/precedence-part-vs-part.html
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/WebKit/LayoutTests/css-shadow-parts/simple-forward-shorthand.html
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/WebKit/LayoutTests/css-shadow-parts/simple-forward.html
[modify] https://crrev.com/d8269be5cd75e1c187125e25b091b9acd9de7f42/third_party/blink/renderer/core/css/resolver/style_resolver.cc

Status: Fixed (was: Started)

Sign in to add a comment