Chromium Code Reviews| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 if (equalIgnoringCase(value, "true")) { | 225 if (equalIgnoringCase(value, "true")) { |
| 226 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUser Drag, CSSValueElement); | 226 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUser Drag, CSSValueElement); |
| 227 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUser Select, CSSValueNone); | 227 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUser Select, CSSValueNone); |
| 228 } else if (equalIgnoringCase(value, "false")) { | 228 } else if (equalIgnoringCase(value, "false")) { |
| 229 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUser Drag, CSSValueNone); | 229 addPropertyToPresentationAttributeStyle(style, CSSPropertyWebkitUser Drag, CSSValueNone); |
| 230 } | 230 } |
| 231 } else if (name == dirAttr) { | 231 } else if (name == dirAttr) { |
| 232 if (equalIgnoringCase(value, "auto")) { | 232 if (equalIgnoringCase(value, "auto")) { |
| 233 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBid i, unicodeBidiAttributeForDirAuto(this)); | 233 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBid i, unicodeBidiAttributeForDirAuto(this)); |
| 234 } else { | 234 } else { |
| 235 if (isValidDirAttribute(value)) | 235 if (isValidDirAttribute(value)) { |
| 236 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, value); | 236 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, value); |
| 237 else | 237 } else { |
| 238 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, "ltr"); | 238 if (isHTMLBodyElement(*this)) |
|
kojii
2016/02/12 07:13:07
nit: better to use "else if"; i.e.,
if (...)
..
chakshu
2016/02/15 05:49:25
Done.
| |
| 239 addPropertyToPresentationAttributeStyle(style, CSSPropertyDi rection, "ltr"); | |
| 240 else | |
| 241 addPropertyToPresentationAttributeStyle(style, CSSPropertyDi rection, ""); | |
| 242 } | |
| 239 if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(output Tag)) | 243 if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(output Tag)) |
| 240 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicod eBidi, CSSValueIsolate); | 244 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicod eBidi, CSSValueIsolate); |
| 241 } | 245 } |
| 242 } else if (name.matches(XMLNames::langAttr)) { | 246 } else if (name.matches(XMLNames::langAttr)) { |
| 243 mapLanguageAttributeToLocale(value, style); | 247 mapLanguageAttributeToLocale(value, style); |
| 244 } else if (name == langAttr) { | 248 } else if (name == langAttr) { |
| 245 // xml:lang has a higher priority than lang. | 249 // xml:lang has a higher priority than lang. |
| 246 if (!fastHasAttribute(XMLNames::langAttr)) | 250 if (!fastHasAttribute(XMLNames::langAttr)) |
| 247 mapLanguageAttributeToLocale(value, style); | 251 mapLanguageAttributeToLocale(value, style); |
| 248 } else { | 252 } else { |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1036 #ifndef NDEBUG | 1040 #ifndef NDEBUG |
| 1037 | 1041 |
| 1038 // For use in the debugger | 1042 // For use in the debugger |
| 1039 void dumpInnerHTML(blink::HTMLElement*); | 1043 void dumpInnerHTML(blink::HTMLElement*); |
| 1040 | 1044 |
| 1041 void dumpInnerHTML(blink::HTMLElement* element) | 1045 void dumpInnerHTML(blink::HTMLElement* element) |
| 1042 { | 1046 { |
| 1043 printf("%s\n", element->innerHTML().ascii().data()); | 1047 printf("%s\n", element->innerHTML().ascii().data()); |
| 1044 } | 1048 } |
| 1045 #endif | 1049 #endif |
| OLD | NEW |