Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLElement.cpp

Issue 1653313002: Changed the default value for Empty Dir Attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed the unittests Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 {
chakshu 2016/02/11 05:55:37 @kojii Can you look at this fix for default value
238 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, "ltr"); 238 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, "");
239 if (hasTagName(bodyTag))
kojii 2016/02/11 13:51:16 Probably isHTMLBodyElement() is better? I'm not ce
chakshu 2016/02/12 06:04:10 isHTMLBodyElement() is basically the wrapper funct
240 addPropertyToPresentationAttributeStyle(style, CSSPropertyDi rection, "ltr");
241 }
239 if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(output Tag)) 242 if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(output Tag))
240 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicod eBidi, CSSValueIsolate); 243 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicod eBidi, CSSValueIsolate);
241 } 244 }
242 } else if (name.matches(XMLNames::langAttr)) { 245 } else if (name.matches(XMLNames::langAttr)) {
243 mapLanguageAttributeToLocale(value, style); 246 mapLanguageAttributeToLocale(value, style);
244 } else if (name == langAttr) { 247 } else if (name == langAttr) {
245 // xml:lang has a higher priority than lang. 248 // xml:lang has a higher priority than lang.
246 if (!fastHasAttribute(XMLNames::langAttr)) 249 if (!fastHasAttribute(XMLNames::langAttr))
247 mapLanguageAttributeToLocale(value, style); 250 mapLanguageAttributeToLocale(value, style);
248 } else { 251 } else {
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 #ifndef NDEBUG 1039 #ifndef NDEBUG
1037 1040
1038 // For use in the debugger 1041 // For use in the debugger
1039 void dumpInnerHTML(blink::HTMLElement*); 1042 void dumpInnerHTML(blink::HTMLElement*);
1040 1043
1041 void dumpInnerHTML(blink::HTMLElement* element) 1044 void dumpInnerHTML(blink::HTMLElement* element)
1042 { 1045 {
1043 printf("%s\n", element->innerHTML().ascii().data()); 1046 printf("%s\n", element->innerHTML().ascii().data());
1044 } 1047 }
1045 #endif 1048 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/imported/web-platform-tests/html/dom/elements/global-attributes/dir-empty-attribute-value-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698