My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 48278: Border with a color with alpha != 1 breaks webkit gradient on skia
4 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  morrita@google.com
Closed:  Dec 2010
Cc:  senorbla...@chromium.org, darin@chromium.org, thakis@chromium.org

Blocking:
issue 48277

Restricted
  • Only users with Commit permission may comment.


Sign in to add a comment
 
Project Member Reported by thakis@chromium.org, Jul 3, 2010
<!DOCTYPE html>
<html>
<head>
<style>
.icon {
  width: 176px;
  height: 176px;
  float: left;
  margin: 50px;
}
.notes {
  background-color:red;
  border-bottom: 1px solid rgba(1, 52, 193, 0.2);
}
.contacts {
  background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDC192), to(#D19A48));
}
</style>
</head><body>
<div class="notes icon"></div>
<div class="contacts icon"></div>
</body></html>

The "border-bottom" line breaks the rendering of the "-webkit-gradient" line below. See attached screenshots for how it looks with and without the border-bottom line.
b_bad.png
24.3 KB   View   Download
b_good.png
24.6 KB   View   Download
Jul 3, 2010
#1 thakis@chromium.org
(No comment was entered for this change.)
Labels: Internals-Skia
Jul 4, 2010
#2 thakis@chromium.org
Putting an early return in RenderObject::drawLineForBoxSide makes this go away (at the expense of breaking borders).
Jul 4, 2010
#3 thakis@chromium.org
As does commenting out the two calls to setFillColor in that function. It looks like PlatformContextSkia::setFillColor also resets the fill shader (which is used to draw gradients), and webkit doesn't set it again.
Jul 4, 2010
#4 thakis@chromium.org
Skia's GraphicsContext::setPlatformFillColor() just calls through to PlatformContextSkia::setFillColor, which does

void PlatformContextSkia::setFillColor(SkColor color)
{
    m_state->m_fillColor = color;
    setFillShader(NULL);
}

The call to setFillShader seems very wrong. It means that if webkit does

    context->setPlatformFillGradient(gradient);
    context->setPlatformFillColor(color);

 then the call to setPlatformFillColor() will erase the shader set in the line above by setPlatformFillGradient(). That's wrong. Why was it done?
Cc: senorbla...@chromium.org da...@chromium.org
Jul 5, 2010
#5 senorbla...@chromium.org
This is supposed to mirror the changes done in GraphicsContext::setFillColor():

    m_common->state.fillColor = color;
    m_common->state.fillColorSpace = colorSpace;
    m_common->state.fillGradient.clear();
    m_common->state.fillPattern.clear();
    setPlatformFillColor(color, colorSpace);

I haven't looked into why the code path that borders uses is breaking this, though.

If you want to look into the history of this code, see:

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

Jul 5, 2010
#6 senorbla...@chromium.org
BTW, setPlatformFillColor() is private for a reason.  It shouldn't be called from outside platform/graphics.
Jul 7, 2010
#7 ka...@chromium.org
(No comment was entered for this change.)
Labels: Mstone-X
Jul 8, 2010
#8 kerz@chromium.org
Moving all bugs marked as untriaged and mstone X to be available rather than untriaged.  If you think this is in error, please feel free to set back to untriaged.
Status: Available
Dec 20, 2010
#9 thakis@chromium.org
morrita got this: https://bugs.webkit.org/show_bug.cgi?id=51240
Status: Started
Owner: morr...@google.com
Cc: tha...@chromium.org
Dec 21, 2010
#10 thakis@chromium.org
(No comment was entered for this change.)
Status: Fixed
Mar 23, 2011
#11 lafo...@chromium.org
(No comment was entered for this change.)
Labels: -Area-Compat-Web bulkmove Area-Compat
Oct 12, 2012
#12 bugdroid1@chromium.org
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Labels: Restrict-AddIssueComment-Commit
Blocking: -chromium:48277 chromium:48277
Mar 10, 2013
#13 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Type-Bug -Area-WebKit -Internals-Skia -Area-Compat Cr-Content Cr-Internals-Skia Type-Compat
Apr 5, 2013
#14 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Cr-Content Cr-Blink
Sign in to add a comment

Powered by Google Project Hosting