[Webkit-unassigned] [Bug 27841] Fix box shadow painting: should pass shadow's color

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 30 13:08:57 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27841





--- Comment #9 from mitz at webkit.org  2009-07-30 13:08:57 PDT ---
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > (In reply to comment #5)
> > > > (In reply to comment #4)
> > > > > (In reply to comment #3)
> > > > > > (From update of attachment 33791 [details] [details] [details] [details] [details] [details])
> > > > > > I think this is wrong. What is the issue this is supposed to address?
> > > > > 
> > > > > It always uses Color::black to paint box shadow regardless shadow style, which
> > > > > is wrong.
> > > > 
> > > > The code uses a black fill for the shape casting the shadow. The shadow
> > > > properties, including its color, are based on the ShadowData structure from the
> > > > style:
> > > > 
> > > >     for (ShadowData* shadow = s->boxShadow(); shadow; shadow = shadow->next) {
> > > > […]
> > > >         Color& shadowColor = shadow->color;
> > > > […]
> > > >             context->setShadow(shadowOffset, shadowBlur, shadowColor);
> > > 
> > > Thanks for your explain. Probably I misunderstood. One thing still confusing:
> > > can I know the reason that it uses shadow color later in that function?
> > 
> > I am not sure which use of shadow color you are asking about. There are two
> > branches, one for “normal” shadows and one for inset shadows, and each branch
> > has its own call to setShadow() where it passes the shadow color.
> 
> The branch for inset shadows, it calls fillRoundedRect and fillRect with shadow
> color.

If the hole rect is empty then the shadow is cast uniformly on the entire
content box. In the case, instead of using a separate shape to cast the shadow,
the code just applies a uniform fill with the shadow color.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list