  void
  nsColorPicker::Update(NSColor* aColor)
  {
-   GetHexStringFromNSColor(aColor, mColor);
--  mCallback->Update(mColor);
+-  GetHexStringFromNSColor(aColor, mColor);
 +  NSColor *color = aColor;
 +  if ([[aColor colorSpaceName] isEqualToString:NSNamedColorSpace])        {
 +    color = [aColor colorUsingColorSpace:[NSColorSpace genericRGBColorSpace]];
 +  }
 +
 +  GetHexStringFromNSColor(color, mColor);
+   mCallback->Update(mColor);
  }
  
  void

+          }
+          aResult.Append(char16_t(')'));
         }
         aResult.Append(char16_t(')'));
       }
     } else if (eCSSUnit_HexColor == unit) {
       nscolor color = GetColorValue();
       aResult.Append('#');
       aResult.AppendPrintf("%02x", NS_GET_R(color));
       aResult.AppendPrintf("%02x", NS_GET_G(color));
diff --git a/parser/htmlparser/nsExpatDriver.cpp b/parser/htmlparser/nsExpatDriver.cpp
--- a/parser/htmlparser/nsExpatDriver.cpp
+++ b/parser/htmlparser/nsExpatDriver.cpp

 {
   mCallback->Done(EmptyString());
   mCallback = nullptr;
diff --git a/widget/cocoa/nsMenuItemX.mm b/widget/cocoa/nsMenuItemX.mm
--- a/widget/cocoa/nsMenuItemX.mm
+++ b/widget/cocoa/nsMenuItemX.mm
