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

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

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mike's comments Created 6 years, 1 month 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 | « Source/core/html/HTMLTableColElement.cpp ('k') | Source/core/html/HTMLTableRowsCollection.cpp » ('j') | 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 reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2010, 2011 Apple Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 style->setProperty(CSSPropertyBorderTopStyle, value); 396 style->setProperty(CSSPropertyBorderTopStyle, value);
397 style->setProperty(CSSPropertyBorderBottomStyle, value); 397 style->setProperty(CSSPropertyBorderBottomStyle, value);
398 style->setProperty(CSSPropertyBorderLeftStyle, value); 398 style->setProperty(CSSPropertyBorderLeftStyle, value);
399 style->setProperty(CSSPropertyBorderRightStyle, value); 399 style->setProperty(CSSPropertyBorderRightStyle, value);
400 return style.release(); 400 return style.release();
401 } 401 }
402 402
403 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle() 403 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle()
404 { 404 {
405 if (m_frameAttr) 405 if (m_frameAttr)
406 return 0; 406 return nullptr;
407 407
408 if (!m_borderAttr && !m_borderColorAttr) { 408 if (!m_borderAttr && !m_borderColorAttr) {
409 // Setting the border to 'hidden' allows it to win over any border 409 // Setting the border to 'hidden' allows it to win over any border
410 // set on the table's cells during border-conflict resolution. 410 // set on the table's cells during border-conflict resolution.
411 if (m_rulesAttr != UnsetRules) { 411 if (m_rulesAttr != UnsetRules) {
412 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderSt yle, (createBorderStyle(CSSValueHidden))); 412 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderSt yle, (createBorderStyle(CSSValueHidden)));
413 return solidBorderStyle; 413 return solidBorderStyle;
414 } 414 }
415 return 0; 415 return nullptr;
416 } 416 }
417 417
418 if (m_borderColorAttr) { 418 if (m_borderColorAttr) {
419 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueSolid))); 419 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, solidBorderStyle, (createBorderStyle(CSSValueSolid)));
420 return solidBorderStyle; 420 return solidBorderStyle;
421 } 421 }
422 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, outsetBorderStyle, (c reateBorderStyle(CSSValueOutset))); 422 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, outsetBorderStyle, (c reateBorderStyle(CSSValueOutset)));
423 return outsetBorderStyle; 423 return outsetBorderStyle;
424 } 424 }
425 425
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); 506 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin);
507 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); 507 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid);
508 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); 508 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid);
509 } 509 }
510 return style.release(); 510 return style.release();
511 } 511 }
512 512
513 const StylePropertySet* HTMLTableElement::additionalGroupStyle(bool rows) 513 const StylePropertySet* HTMLTableElement::additionalGroupStyle(bool rows)
514 { 514 {
515 if (m_rulesAttr != GroupsRules) 515 if (m_rulesAttr != GroupsRules)
516 return 0; 516 return nullptr;
517 517
518 if (rows) { 518 if (rows) {
519 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, rowBorderStyle, ( createGroupBorderStyle(true))); 519 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, rowBorderStyle, ( createGroupBorderStyle(true)));
520 return rowBorderStyle; 520 return rowBorderStyle;
521 } 521 }
522 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, columnBorderStyle, (c reateGroupBorderStyle(false))); 522 DEFINE_STATIC_REF_WILL_BE_PERSISTENT(StylePropertySet, columnBorderStyle, (c reateGroupBorderStyle(false)));
523 return columnBorderStyle; 523 return columnBorderStyle;
524 } 524 }
525 525
526 bool HTMLTableElement::isURLAttribute(const Attribute& attribute) const 526 bool HTMLTableElement::isURLAttribute(const Attribute& attribute) const
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 return getAttribute(summaryAttr); 558 return getAttribute(summaryAttr);
559 } 559 }
560 560
561 void HTMLTableElement::trace(Visitor* visitor) 561 void HTMLTableElement::trace(Visitor* visitor)
562 { 562 {
563 visitor->trace(m_sharedCellStyle); 563 visitor->trace(m_sharedCellStyle);
564 HTMLElement::trace(visitor); 564 HTMLElement::trace(visitor);
565 } 565 }
566 566
567 } 567 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTableColElement.cpp ('k') | Source/core/html/HTMLTableRowsCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698