Bug 51435
| Summary: | Issues with ContextShadow | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
| Component: | Platform | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | alex, helder, mrobinson |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | OS X 10.5 | ||
Simon Fraser (smfr)
I see some issues with ContextShadow:
1. Code cleanup:
* Rename drawRectShadowWithoutTiling to drawUntiledRectShadow
* Move tiled drawing code into drawRectShadowWithTiling
* drawRectShadow() just calls one or the other
2. layer area calculation
* the code that inflates the shadow rect by the radius happens in both drawRectShadow, and again down in calculateLayerBoundingRect.
* when drawRectShadow() calls calculateLayerBoundingRect, it passes the already-inflated rect, leading to double inflation, I think. This does not happen in the drawRectShadowWithoutTiling code path.
3. Clipping causes double inflation
* the "intersect with the clip" code in calculateLayerBoundingRect can cause double inflation on sides of the shadow that are not clipped. I think you want to intersect with an inflated clip.
4. The comment for m_sourceRect is wrong. m_sourceRect can end up larger than the layer buffer when clipped. There is no member var that tracks the rect in the layer buffer to which blurring should be applied.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |