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

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

Issue 789513004: Removing border attribute should remove the visual border (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 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 | « LayoutTests/fast/table/script-tests/border-changes.js ('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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 if (element->hasTagName(preTag) || element->hasTagName(textareaTag)) 120 if (element->hasTagName(preTag) || element->hasTagName(textareaTag))
121 return CSSValueWebkitPlaintext; 121 return CSSValueWebkitPlaintext;
122 // FIXME: For bdo element, dir="auto" should result in "bidi-override isolat e" but we don't support having multiple values in unicode-bidi yet. 122 // FIXME: For bdo element, dir="auto" should result in "bidi-override isolat e" but we don't support having multiple values in unicode-bidi yet.
123 // See https://bugs.webkit.org/show_bug.cgi?id=73164. 123 // See https://bugs.webkit.org/show_bug.cgi?id=73164.
124 return CSSValueWebkitIsolate; 124 return CSSValueWebkitIsolate;
125 } 125 }
126 126
127 unsigned HTMLElement::parseBorderWidthAttribute(const AtomicString& value) const 127 unsigned HTMLElement::parseBorderWidthAttribute(const AtomicString& value) const
128 { 128 {
129 unsigned borderWidth = 0; 129 unsigned borderWidth = 0;
130 if (value.isEmpty() || !parseHTMLNonNegativeInteger(value, borderWidth)) 130 if (value.isEmpty() || !parseHTMLNonNegativeInteger(value, borderWidth)) {
131 return hasTagName(tableTag) ? 1 : borderWidth; 131 if (hasTagName(tableTag) && !value.isNull())
132 return 1;
133 }
132 return borderWidth; 134 return borderWidth;
133 } 135 }
134 136
135 void HTMLElement::applyBorderAttributeToStyle(const AtomicString& value, Mutable StylePropertySet* style) 137 void HTMLElement::applyBorderAttributeToStyle(const AtomicString& value, Mutable StylePropertySet* style)
136 { 138 {
137 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidth, parse BorderWidthAttribute(value), CSSPrimitiveValue::CSS_PX); 139 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderWidth, parse BorderWidthAttribute(value), CSSPrimitiveValue::CSS_PX);
138 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSVa lueSolid); 140 addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSVa lueSolid);
139 } 141 }
140 142
141 void HTMLElement::mapLanguageAttributeToLocale(const AtomicString& value, Mutabl eStylePropertySet* style) 143 void HTMLElement::mapLanguageAttributeToLocale(const AtomicString& value, Mutabl eStylePropertySet* style)
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 #ifndef NDEBUG 1036 #ifndef NDEBUG
1035 1037
1036 // For use in the debugger 1038 // For use in the debugger
1037 void dumpInnerHTML(blink::HTMLElement*); 1039 void dumpInnerHTML(blink::HTMLElement*);
1038 1040
1039 void dumpInnerHTML(blink::HTMLElement* element) 1041 void dumpInnerHTML(blink::HTMLElement* element)
1040 { 1042 {
1041 printf("%s\n", element->innerHTML().ascii().data()); 1043 printf("%s\n", element->innerHTML().ascii().data());
1042 } 1044 }
1043 #endif 1045 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/table/script-tests/border-changes.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698