[Webkit-unassigned] [Bug 74775] WebKit editing throws exception when monochrome color dragged onto text
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 21 11:23:08 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=74775
--- Comment #6 from Darin Adler <darin at apple.com> 2011-12-21 11:23:08 PST ---
(From update of attachment 120196)
View in context: https://bugs.webkit.org/attachment.cgi?id=120196&action=review
> Source/WebCore/platform/mac/DragDataMac.mm:121
> NSColor *color = [NSColor colorFromPasteboard:m_pasteboard.get()];
> +
> + // The supplied color may not be in an RGB colorspace. This commonly occurs when e.g.
> + // a color is dragged from the NSColorPanel grayscale picker. Before we attempt to access RGB components,
> + // ensure it's appropriately converted to an RGB colorspace.
> + if ([[color colorSpace] colorSpaceModel] != NSRGBColorSpaceModel) {
> + color = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
> + }
Why not call that method unconditionally? Is there a case that would behave worse? We don’t put braces around a single-line if statement body in WebKit codings style.
I suggest removing the third sentence of that comment, since it just repeats what the code does.
--
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