[Webkit-unassigned] [Bug 41113] [WinCairo] Text box backgrounds do not render in partially opaque layers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 25 09:46:49 PDT 2010


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





--- Comment #5 from Adam Roben (aroben) <aroben at apple.com>  2010-06-25 09:46:50 PST ---
(From update of attachment 59583)
> +        Functionality unchanged, no new tests.

This doesn't seem correct. You are changing functionality (by fixing a bug). Can we come up with a test?

> +    // If this context does not support alpha blending, then it may have
> +    // been drawn with GDI functions which always set the alpha channel
> +    // to zero. We need to manually set the bitmap to be fully opaque.
> +    unsigned char* bytes = reinterpret_cast<unsigned char*>(info.bmBits);
> +    if (!supportAlphaBlend)
> +        for (size_t i = 0; i < info.bmHeight * info.bmWidthBytes; i += 4)
> +            bytes[i + 3] = 255;

Our style guidelines say that there should be braces around the body of the if (because it spans multiple lines, even though it's only a single statement).

But I agree with Brent that a function might be clearer.

-- 
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