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-2008, 2013, 2014 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004-2008, 2013, 2014 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Have to quote so the locale id is treated as a string instead of as a
CSS keyword. | 159 // Have to quote so the locale id is treated as a string instead of as a
CSS keyword. |
160 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitLocale,
serializeString(value)); | 160 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitLocale,
serializeString(value)); |
161 | 161 |
162 // FIXME: Remove the following UseCounter code when we collect enough | 162 // FIXME: Remove the following UseCounter code when we collect enough |
163 // data. | 163 // data. |
164 UseCounter::count(document(), UseCounter::LangAttribute); | 164 UseCounter::count(document(), UseCounter::LangAttribute); |
165 if (isHTMLHtmlElement(*this)) | 165 if (isHTMLHtmlElement(*this)) |
166 UseCounter::count(document(), UseCounter::LangAttributeOnHTML); | 166 UseCounter::count(document(), UseCounter::LangAttributeOnHTML); |
167 else if (isHTMLBodyElement(*this)) | 167 else if (isHTMLBodyElement(*this)) |
168 UseCounter::count(document(), UseCounter::LangAttributeOnBody); | 168 UseCounter::count(document(), UseCounter::LangAttributeOnBody); |
169 String htmlLanguage = value.string(); | 169 String htmlLanguage = value.getString(); |
170 size_t firstSeparator = htmlLanguage.find('-'); | 170 size_t firstSeparator = htmlLanguage.find('-'); |
171 if (firstSeparator != kNotFound) | 171 if (firstSeparator != kNotFound) |
172 htmlLanguage = htmlLanguage.left(firstSeparator); | 172 htmlLanguage = htmlLanguage.left(firstSeparator); |
173 String uiLanguage = defaultLanguage(); | 173 String uiLanguage = defaultLanguage(); |
174 firstSeparator = uiLanguage.find('-'); | 174 firstSeparator = uiLanguage.find('-'); |
175 if (firstSeparator != kNotFound) | 175 if (firstSeparator != kNotFound) |
176 uiLanguage = uiLanguage.left(firstSeparator); | 176 uiLanguage = uiLanguage.left(firstSeparator); |
177 firstSeparator = uiLanguage.find('_'); | 177 firstSeparator = uiLanguage.find('_'); |
178 if (firstSeparator != kNotFound) | 178 if (firstSeparator != kNotFound) |
179 uiLanguage = uiLanguage.left(firstSeparator); | 179 uiLanguage = uiLanguage.left(firstSeparator); |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 #ifndef NDEBUG | 1039 #ifndef NDEBUG |
1040 | 1040 |
1041 // For use in the debugger | 1041 // For use in the debugger |
1042 void dumpInnerHTML(blink::HTMLElement*); | 1042 void dumpInnerHTML(blink::HTMLElement*); |
1043 | 1043 |
1044 void dumpInnerHTML(blink::HTMLElement* element) | 1044 void dumpInnerHTML(blink::HTMLElement* element) |
1045 { | 1045 { |
1046 printf("%s\n", element->innerHTML().ascii().data()); | 1046 printf("%s\n", element->innerHTML().ascii().data()); |
1047 } | 1047 } |
1048 #endif | 1048 #endif |
OLD | NEW |