HTMLConverter needs to strip white colors when the document is in dark mode, like it does for black in light mode. <rdar://problem/48677354>
Created attachment 380377 [details] Patch
Created attachment 380381 [details] Patch
Created attachment 380438 [details] Patch
Web Inspector layout test failure on WK1 is unrelated. Ready to review.
Comment on attachment 380438 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380438&action=review > Source/WebCore/editing/cocoa/HTMLConverter.mm:-864 > - if (red < ColorEpsilon && green < ColorEpsilon && blue < ColorEpsilon && (ignoreBlack || alpha < ColorEpsilon)) I'm guessing this was basically looking for 'black'. I don't know what the trade off for looking for 'probably almost black' and 'true black' is, but I'm trusting this is equal or better than Color::isBlackColor. > Source/WebCore/editing/cocoa/HTMLConverter.mm:882 > + nit whitespace?
Comment on attachment 380438 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380438&action=review >> Source/WebCore/editing/cocoa/HTMLConverter.mm:-864 >> - if (red < ColorEpsilon && green < ColorEpsilon && blue < ColorEpsilon && (ignoreBlack || alpha < ColorEpsilon)) > > I'm guessing this was basically looking for 'black'. I don't know what the trade off for looking for 'probably almost black' and 'true black' is, but I'm trusting this is equal or better than Color::isBlackColor. Yes, this was looking for black. However, since getRGBA does a division by 255 to convert the hex to a float, so there was this logic to avoid floating point issues. Using Color::isBlackColor is better because it looks at the internal hex, and supports extended color too.
Comment on attachment 380438 [details] Patch Clearing flags on attachment: 380438 Committed r250863: <https://trac.webkit.org/changeset/250863>
All reviewed patches have been landed. Closing bug.