RESOLVED FIXED 24757
Chromium port doesn't support opacity on complex text
https://bugs.webkit.org/show_bug.cgi?id=24757
Summary Chromium port doesn't support opacity on complex text
Brett Wilson (Google)
Reported 2009-03-23 08:01:41 PDT
It isn't hooked up to the TransparencyWin object which handles the text transparency. Chromium bug: http://code.google.com/p/chromium/issues/detail?id=8768
Attachments
Patch (18.93 KB, patch)
2009-03-23 08:02 PDT, Brett Wilson (Google)
eric: review-
Patch v2 (21.49 KB, patch)
2009-03-25 11:12 PDT, Brett Wilson (Google)
dglazkov: review+
Brett Wilson (Google)
Comment 1 2009-03-23 08:02:03 PDT
Eric Seidel (no email)
Comment 2 2009-03-23 08:52:00 PDT
Comment on attachment 28852 [details] Patch ChangeLog needed. I'm surprised there isn't a test to cover this already? WK style is "init()": void Init(); I'm unclear as to why Init needs to be separate from construction? (And I'm also not sure why a generalized "init" function is preferred over the old initForGDI()) Otherwise this looks fine. I think mostly it just needs a ChangeLog to document what you're doing (so the reviewer can more easily understand what you're doing). ;)
Dimitri Glazkov (Google)
Comment 3 2009-03-23 08:52:04 PDT
Comment on attachment 28852 [details] Patch This looks good, except for these nits: Don't forget the ChangeLog entry. > + TransparencyAwareFontPainter(GraphicsContext* context, const FloatPoint& point); No need for argument names in declaration unless they need additional explanation. > +protected: > + // Called by our subclass' constructor to initialize GDI if necessary. This > + // is a separate function so it can be called after the subclass finishes > + // construction (it calls virtual functions). > + void Init(); init(); > + public: > + TransparencyAwareGlyphPainter(GraphicsContext* context, > + const SimpleFontData* font, > + const GlyphBuffer& glyphBuffer, > + int from, int numGlyphs, > + const FloatPoint& point); Same here, args don't need names, except for "from" and "numGlyphs". > + bool drawGlyphs(int numGlyphs, const WORD* glyphs, const int* advances, > + int startAdvance) const; Ditto. > + return IntRect(m_point.x() - (m_font->ascent() + m_font->descent()) / 2, > + m_point.y() - m_font->ascent() - m_font->lineGap(), > + totalWidth + m_font->ascent() + m_font->descent(), > + m_font->lineSpacing()); Is this computation the same for Uniscribe, just with different params? Maybe we could have a local static here to keep it in one place? > + TransparencyAwareUniscribePainter(GraphicsContext* context, > + const Font* font, > + const TextRun& run, > + int from, int to, > + const FloatPoint& point); Same here about args.
Brett Wilson (Google)
Comment 4 2009-03-23 09:09:36 PDT
(In reply to comment #2) > I'm unclear as to why Init needs to be separate from construction? (And I'm > also not sure why a generalized "init" function is preferred over the old > initForGDI()) This is documented in the comment above the Init declaration: + // Called by our subclass' constructor to initialize GDI if necessary. This + // is a separate function so it can be called after the subclass finishes + // construction (it calls virtual functions).
Brett Wilson (Google)
Comment 5 2009-03-25 11:12:56 PDT
Created attachment 28936 [details] Patch v2
Dimitri Glazkov (Google)
Comment 6 2009-03-25 11:16:38 PDT
Comment on attachment 28936 [details] Patch v2 Nice.
Brett Wilson (Google)
Comment 7 2009-03-25 11:18:30 PDT
Fixed in r41978
Note You need to log in before you can comment on or make changes to this bug.