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

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: leviw review 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 #ifndef NDEBUG 1033 #ifndef NDEBUG
1034 1034
1035 // For use in the debugger 1035 // For use in the debugger
1036 void dumpInnerHTML(blink::HTMLElement*); 1036 void dumpInnerHTML(blink::HTMLElement*);
1037 1037
1038 void dumpInnerHTML(blink::HTMLElement* element) 1038 void dumpInnerHTML(blink::HTMLElement* element)
1039 { 1039 {
1040 printf("%s\n", element->innerHTML().ascii().data()); 1040 printf("%s\n", element->innerHTML().ascii().data());
1041 } 1041 }
1042 #endif 1042 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698