WebCore/ChangeLog

 12010-07-12 Peter Beverloo <peter@lvp-media.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Removed support for the -khtml CSS vendor prefix and limit the
 6 -apple prefix to two properties (dashboard-region and line-clamp).
 7
 8 * css/CSSParser.cpp:
 9 (WebCore::cssPropertyID):
 10
1112010-07-12 Andreas Kling <andreas.kling@nokia.com>
212
313 Reviewed by Simon Hausmann.
63092

WebCore/css/CSSParser.cpp

@@static int cssPropertyID(const UChar* pr
55805580
55815581 const char* name = buffer;
55825582 if (buffer[0] == '-') {
5583  // If the prefix is -apple- or -khtml-, change it to -webkit-.
5584  // This makes the string one character longer.
5585  if (hasPrefix(buffer, length, "-apple-") || hasPrefix(buffer, length, "-khtml-")) {
 5583 if (strcmp(buffer, "-apple-dashboard-region") == 0 || strcmp(buffer, "-apple-line-clamp") == 0) {
 5584 // Support two Apple-specific CSS properties previously used for
 5585 // the Dashboard and Safari RSS lime clamping.
55865586 memmove(buffer + 7, buffer + 6, length + 1 - 6);
55875587 memcpy(buffer, "-webkit", 7);
55885588 ++length;
5589  }
5590 
5591  if (hasPrefix(buffer, length, "-webkit")) {
5592  if (strcmp(buffer, "-webkit-opacity") == 0) {
5593  // Honor -webkit-opacity as a synonym for opacity.
5594  // This was the only syntax that worked in Safari 1.1, and may be in use on some websites and widgets.
5595  const char* const opacity = "opacity";
5596  name = opacity;
5597  length = strlen(opacity);
5598  } else if (hasPrefix(buffer + 7, length - 7, "-border-")) {
5599  // -webkit-border-*-*-radius worked in Safari 4 and earlier. -webkit-border-radius syntax
5600  // differs from border-radius, so it is remains as a distinct property.
5601  if (!strcmp(buffer + 15, "top-left-radius")
5602  || !strcmp(buffer + 15, "top-right-radius")
5603  || !strcmp(buffer + 15, "bottom-right-radius")
5604  || !strcmp(buffer + 15, "bottom-left-radius")) {
5605  name = buffer + 8;
5606  length -= 8;
5607  }
 5589 } else if (hasPrefix(buffer, length, "-webkit-border-")) {
 5590 // -webkit-border-*-*-radius worked in Safari 4 and earlier. -webkit-border-radius syntax
 5591 // differs from border-radius, so it is remains as a distinct property.
 5592 if (!strcmp(buffer + 15, "top-left-radius")
 5593 || !strcmp(buffer + 15, "top-right-radius")
 5594 || !strcmp(buffer + 15, "bottom-right-radius")
 5595 || !strcmp(buffer + 15, "bottom-left-radius")) {
 5596 name = buffer + 8;
 5597 length -= 8;
56085598 }
56095599 }
56105600 }
63092