OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 if (attributeValue.isEmpty()) | 1047 if (attributeValue.isEmpty()) |
1048 return; | 1048 return; |
1049 | 1049 |
1050 String colorString = attributeValue.stripWhiteSpace(); | 1050 String colorString = attributeValue.stripWhiteSpace(); |
1051 | 1051 |
1052 // "transparent" doesn't apply a color either. | 1052 // "transparent" doesn't apply a color either. |
1053 if (equalIgnoringCase(colorString, "transparent")) | 1053 if (equalIgnoringCase(colorString, "transparent")) |
1054 return; | 1054 return; |
1055 | 1055 |
1056 // If the string is a named CSS color or a 3/6-digit hex color, use that. | 1056 // If the string is a named CSS color or a 3/6-digit hex color, use that. |
1057 Color parsedColor(colorString); | 1057 StyleColor parsedColor(colorString); |
1058 if (!parsedColor.isValid()) | 1058 if (!parsedColor.isValid()) |
1059 parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString)); | 1059 parsedColor = parseColorStringWithCrazyLegacyRules(colorString); |
1060 | 1060 |
1061 style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.r
gb())); | 1061 style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.r
gb())); |
1062 } | 1062 } |
1063 | 1063 |
1064 void HTMLElement::defaultEventHandler(Event* event) | 1064 void HTMLElement::defaultEventHandler(Event* event) |
1065 { | 1065 { |
1066 if (event->type() == eventNames().keypressEvent && event->isKeyboardEvent())
{ | 1066 if (event->type() == eventNames().keypressEvent && event->isKeyboardEvent())
{ |
1067 handleKeypressEvent(toKeyboardEvent(event)); | 1067 handleKeypressEvent(toKeyboardEvent(event)); |
1068 if (event->defaultHandled()) | 1068 if (event->defaultHandled()) |
1069 return; | 1069 return; |
(...skipping 18 matching lines...) Expand all Loading... |
1088 #ifndef NDEBUG | 1088 #ifndef NDEBUG |
1089 | 1089 |
1090 // For use in the debugger | 1090 // For use in the debugger |
1091 void dumpInnerHTML(WebCore::HTMLElement*); | 1091 void dumpInnerHTML(WebCore::HTMLElement*); |
1092 | 1092 |
1093 void dumpInnerHTML(WebCore::HTMLElement* element) | 1093 void dumpInnerHTML(WebCore::HTMLElement* element) |
1094 { | 1094 { |
1095 printf("%s\n", element->innerHTML().ascii().data()); | 1095 printf("%s\n", element->innerHTML().ascii().data()); |
1096 } | 1096 } |
1097 #endif | 1097 #endif |
OLD | NEW |