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

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

Issue 1463473002: Make unicode-bidi:isolate the default for elements with dir attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more test fix (bidi-LDB-2-HTML.html) Created 5 years 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 } else if (name == dirAttr) { 228 } else if (name == dirAttr) {
229 if (equalIgnoringCase(value, "auto")) { 229 if (equalIgnoringCase(value, "auto")) {
230 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBid i, unicodeBidiAttributeForDirAuto(this)); 230 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicodeBid i, unicodeBidiAttributeForDirAuto(this));
231 } else { 231 } else {
232 if (isValidDirAttribute(value)) 232 if (isValidDirAttribute(value))
233 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, value); 233 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, value);
234 else 234 else
235 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, "ltr"); 235 addPropertyToPresentationAttributeStyle(style, CSSPropertyDirect ion, "ltr");
236 if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(output Tag)) 236 if (!hasTagName(bdiTag) && !hasTagName(bdoTag) && !hasTagName(output Tag))
237 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicod eBidi, CSSValueEmbed); 237 addPropertyToPresentationAttributeStyle(style, CSSPropertyUnicod eBidi, CSSValueIsolate);
238 } 238 }
239 } else if (name.matches(XMLNames::langAttr)) { 239 } else if (name.matches(XMLNames::langAttr)) {
240 mapLanguageAttributeToLocale(value, style); 240 mapLanguageAttributeToLocale(value, style);
241 } else if (name == langAttr) { 241 } else if (name == langAttr) {
242 // xml:lang has a higher priority than lang. 242 // xml:lang has a higher priority than lang.
243 if (!fastHasAttribute(XMLNames::langAttr)) 243 if (!fastHasAttribute(XMLNames::langAttr))
244 mapLanguageAttributeToLocale(value, style); 244 mapLanguageAttributeToLocale(value, style);
245 } else { 245 } else {
246 Element::collectStyleForPresentationAttribute(name, value, style); 246 Element::collectStyleForPresentationAttribute(name, value, style);
247 } 247 }
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 #ifndef NDEBUG 1031 #ifndef NDEBUG
1032 1032
1033 // For use in the debugger 1033 // For use in the debugger
1034 void dumpInnerHTML(blink::HTMLElement*); 1034 void dumpInnerHTML(blink::HTMLElement*);
1035 1035
1036 void dumpInnerHTML(blink::HTMLElement* element) 1036 void dumpInnerHTML(blink::HTMLElement* element)
1037 { 1037 {
1038 printf("%s\n", element->innerHTML().ascii().data()); 1038 printf("%s\n", element->innerHTML().ascii().data());
1039 } 1039 }
1040 #endif 1040 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698