| Summary: | Carets in GMail and iCloud compositions are the foreground text color | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Myles C. Maxfield <mmaxfield> | ||||||
| Component: | New Bugs | Assignee: | Myles C. Maxfield <mmaxfield> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | commit-queue, dino, joepeck, simon.fraser, thorton, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Myles C. Maxfield
2014-10-23 15:54:09 PDT
Created attachment 240374 [details]
Patch
Comment on attachment 240374 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=240374&action=review > Source/WebCore/editing/FrameSelection.cpp:1483 > + if (!topColor.alpha()) This needs to be topColor.hasAlpha() Comment on attachment 240374 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=240374&action=review > Source/WebCore/editing/FrameSelection.cpp:1477 > +static inline bool layeredColorsAppearSame(Color bottomColor, Color topColor) Not a huge fan of the name (would prefer something like colorDistinctOverColor() or something), Can this just call blend() and check if the result == bottomColor? > Source/WebCore/editing/FrameSelection.cpp:1481 > + if (bottomColor.red() == topColor.red() && bottomColor.green() == topColor.green() && bottomColor.blue() == topColor.blue()) Would be nice to push this into Color. (colorComponentsEqual or something). > Source/WebCore/editing/FrameSelection.cpp:1483 > + if (!topColor.alpha()) hasAlpha? Do you care about how much alpha? Created attachment 240375 [details]
Patch
Comment on attachment 240375 [details] Patch Clearing flags on attachment: 240375 Committed r175152: <http://trac.webkit.org/changeset/175152> All reviewed patches have been landed. Closing bug. Seems iOS builds are complaining: Source/WebCore/editing/FrameSelection.cpp:1477:20: error: unused function 'disappearsIntoBackground' [-Werror,-Wunused-function] static inline bool disappearsIntoBackground(Color foreground, Color background) 1 error generated. Comment on attachment 240375 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=240375&action=review > Source/WebCore/editing/FrameSelection.cpp:1480 > +static inline bool disappearsIntoBackground(Color foreground, Color background) > +{ > + return background.blend(foreground) == background; > +} Needs to be wrapped in #if ENABLE(TEXT_CARET). Also, is == too strict? Should we have some threshold for close colors? Build issue was fixed in http://trac.webkit.org/changeset/175155 I mentioned the perceptive matching issue to Myles; he didn't want to get into that rat hole. |