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

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

Issue 2528673003: Rework the "rules for parsing dimension values" implementation (Closed)
Patch Set: Rebase; clarify comment. Created 4 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/html/HTMLElement.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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Apple Inc. All rights 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Apple Inc. All rights
8 * reserved. 8 * reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 CSSImageValue::create(url, document().completeURL(url)); 321 CSSImageValue::create(url, document().completeURL(url));
322 imageValue->setReferrer(Referrer(document().outgoingReferrer(), 322 imageValue->setReferrer(Referrer(document().outgoingReferrer(),
323 document().getReferrerPolicy())); 323 document().getReferrerPolicy()));
324 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, *imageValue)); 324 style->setProperty(CSSProperty(CSSPropertyBackgroundImage, *imageValue));
325 } 325 }
326 } else if (name == valignAttr) { 326 } else if (name == valignAttr) {
327 if (!value.isEmpty()) 327 if (!value.isEmpty())
328 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign, 328 addPropertyToPresentationAttributeStyle(style, CSSPropertyVerticalAlign,
329 value); 329 value);
330 } else if (name == cellspacingAttr) { 330 } else if (name == cellspacingAttr) {
331 if (!value.isEmpty()) 331 if (!value.isEmpty()) {
332 addHTMLLengthToStyle(style, CSSPropertyBorderSpacing, value); 332 addHTMLLengthToStyle(style, CSSPropertyBorderSpacing, value,
333 DontAllowPercentageValues);
334 }
333 } else if (name == alignAttr) { 335 } else if (name == alignAttr) {
334 if (!value.isEmpty()) { 336 if (!value.isEmpty()) {
335 if (equalIgnoringCase(value, "center")) { 337 if (equalIgnoringCase(value, "center")) {
336 addPropertyToPresentationAttributeStyle( 338 addPropertyToPresentationAttributeStyle(
337 style, CSSPropertyWebkitMarginStart, CSSValueAuto); 339 style, CSSPropertyWebkitMarginStart, CSSValueAuto);
338 addPropertyToPresentationAttributeStyle( 340 addPropertyToPresentationAttributeStyle(
339 style, CSSPropertyWebkitMarginEnd, CSSValueAuto); 341 style, CSSPropertyWebkitMarginEnd, CSSValueAuto);
340 } else { 342 } else {
341 addPropertyToPresentationAttributeStyle(style, CSSPropertyFloat, value); 343 addPropertyToPresentationAttributeStyle(style, CSSPropertyFloat, value);
342 } 344 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 const AtomicString& HTMLTableElement::summary() const { 607 const AtomicString& HTMLTableElement::summary() const {
606 return getAttribute(summaryAttr); 608 return getAttribute(summaryAttr);
607 } 609 }
608 610
609 DEFINE_TRACE(HTMLTableElement) { 611 DEFINE_TRACE(HTMLTableElement) {
610 visitor->trace(m_sharedCellStyle); 612 visitor->trace(m_sharedCellStyle);
611 HTMLElement::trace(visitor); 613 HTMLElement::trace(visitor);
612 } 614 }
613 615
614 } // namespace blink 616 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698