[Webkit-unassigned] [Bug 108897] [Cairo] Canvas-shadow behavior is not being as expected
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 25 02:51:34 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=108897
--- Comment #44 from Rashmi Shyamasundar <rashmi.s2 at samsung.com> 2013-04-25 02:49:53 PST ---
The below failures are being caused because of negative parameters of destination rect. It can be solved by appropriately them to positive parameters.
fast/canvas/drawImage-with-negative-source-destination.html
css2.1/20110323/margin-collapse-clear-012.htm
css2.1/20110323/margin-collapse-clear-013.htm
css2.1/20110323/margin-collapse-clear-014.htm
css2.1/20110323/margin-collapse-clear-015.htm
Currently in PlatformContextCairo::drawSurfaceToContext(), only the srcRect parameters are being checked for negative values. The same check has to be added for destRect as well.
The below piece of code resolves the above failures -
// We need to account for negative destination dimensions by flipping the rectangle.
FloatRect finalDestRect = destRect;
if (destRect.width() < 0) {
finalDestRect.setX(destRect.x() + destRect.width());
finalDestRect.setWidth(std::fabs(destRect.width()));
}
if (destRect.height() < 0) {
finalDestRect.setY(destRect.y() + destRect.height());
finalDestRect.setHeight(std::fabs(destRect.height()));
}
I have attached the file PlatformContextCairo.cpp, with the above code inserted in the function drawSurfaceToContext().
--
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