Bug 146784 - Brightness filter on image with transition ignores border radius clipping on ancestor
Summary: Brightness filter on image with transition ignores border radius clipping on ...
Status: RESOLVED DUPLICATE of bug 68196
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
: 203558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-09 06:56 PDT by Amaury Bauzac
Modified: 2022-08-31 14:40 PDT (History)
6 users (show)

See Also:


Attachments
WIP (24.02 KB, patch)
2016-05-09 08:41 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amaury Bauzac 2015-07-09 06:56:35 PDT
Version : 537.36

Reproduced on Chrome 43 and Safari

Hello, 

I encounter a CSS problem using the brightness filter and transition filter on an image. Here is a simple example :

<style>
div {
  border: 4px solid #fff;
  border-radius: 50%;
  overflow: hidden;
}

img {
  -webkit-filter: brightness(0.8);
  -webkit-transition: -webkit-filter 1s ease-out;
  width: 100%;
}

img:hover {
  -webkit-filter: brightness(0.6);
}
</style>

<div>
  <img src="http://i0.kym-cdn.com/photos/images/facebook/000/581/722/7bc.jpg">
</div>


Or see directly : http://codepen.io/bqlou/pen/rVvLXK

Expected result : when hovering the image, brightness applies to the image

Actual result : when hovering the image, brightness applies to the image without repainting the whole picture during the transition
Comment 1 Simon Fraser (smfr) 2015-07-10 08:54:16 PDT
The bug here is that we're not taking the border-radius into account for the composited clip while the transition is running. I think we have another bug on this.
Comment 2 Radar WebKit Bug Importer 2015-07-10 08:54:45 PDT
<rdar://problem/21766718>
Comment 3 Simon Fraser (smfr) 2016-05-07 10:43:22 PDT
The problem is more general. Any layer that has an "ancestor clipping layer" that's affected by corner radius doesn't take the radius into account.
Comment 4 Simon Fraser (smfr) 2016-05-09 08:41:10 PDT
Created attachment 278406 [details]
WIP
Comment 5 WebKit Commit Bot 2016-05-09 08:44:46 PDT
Attachment 278406 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/RenderLayer.h:817:  The parameter name "context" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 14 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Simon Fraser (smfr) 2019-10-30 12:06:22 PDT
*** Bug 203558 has been marked as a duplicate of this bug. ***
Comment 7 Simon Fraser (smfr) 2022-08-31 14:40:20 PDT

*** This bug has been marked as a duplicate of bug 68196 ***