Bug 51845

Summary: CSS3 gradients with em-based stops fail to repaint when font size changes
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz, simon.fraser, webmaster
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 52701    
Bug Blocks:    
Attachments:
Description Flags
Patch mitz: review+

Simon Fraser (smfr)
Reported 2011-01-03 12:24:32 PST
CSS3 gradients allow use of various units to control color stop position, including 'em'. However, we cache gradients based purely on size, so fail to repaint them when just font size changes.
Attachments
Patch (10.43 KB, patch)
2011-01-29 12:32 PST, Simon Fraser (smfr)
mitz: review+
Simon Fraser (smfr)
Comment 1 2011-01-05 22:56:19 PST
It may also be that a gradient shared between two renderers with different font sizes does not render correctly in one of them.
Simon Fraser (smfr)
Comment 2 2011-01-29 12:32:47 PST
Eric Seidel (no email)
Comment 3 2011-01-30 03:51:20 PST
Comment on attachment 80570 [details] Patch Hmm... I wonder how many other places we get this wrong. :)
mitz
Comment 4 2011-01-30 09:47:49 PST
Comment on attachment 80570 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80570&action=review > Source/WebCore/css/CSSGradientValue.cpp:412 > + for (size_t i = 0; i < m_stops.size(); i++) { Please change this to ++i.
Simon Fraser (smfr)
Comment 5 2011-01-30 10:20:13 PST
Note You need to log in before you can comment on or make changes to this bug.