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

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

Issue 1320013005: Make CSSParserMode parameter not optional for MutableStylePropertySet::create() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 3 months 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 | Annotate | Revision Log
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 } 386 }
387 387
388 if (bordersBefore != cellBorders() || oldPadding != m_padding) { 388 if (bordersBefore != cellBorders() || oldPadding != m_padding) {
389 m_sharedCellStyle = nullptr; 389 m_sharedCellStyle = nullptr;
390 setNeedsTableStyleRecalc(); 390 setNeedsTableStyleRecalc();
391 } 391 }
392 } 392 }
393 393
394 static PassRefPtrWillBeRawPtr<StylePropertySet> createBorderStyle(CSSValueID val ue) 394 static PassRefPtrWillBeRawPtr<StylePropertySet> createBorderStyle(CSSValueID val ue)
395 { 395 {
396 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(); 396 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(HTMLQuirksMode);
397 style->setProperty(CSSPropertyBorderTopStyle, value); 397 style->setProperty(CSSPropertyBorderTopStyle, value);
398 style->setProperty(CSSPropertyBorderBottomStyle, value); 398 style->setProperty(CSSPropertyBorderBottomStyle, value);
399 style->setProperty(CSSPropertyBorderLeftStyle, value); 399 style->setProperty(CSSPropertyBorderLeftStyle, value);
400 style->setProperty(CSSPropertyBorderRightStyle, value); 400 style->setProperty(CSSPropertyBorderRightStyle, value);
401 return style.release(); 401 return style.release();
402 } 402 }
403 403
404 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle() 404 const StylePropertySet* HTMLTableElement::additionalPresentationAttributeStyle()
405 { 405 {
406 if (m_frameAttr) 406 if (m_frameAttr)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 if (m_borderColorAttr) 442 if (m_borderColorAttr)
443 return SolidBorders; 443 return SolidBorders;
444 return InsetBorders; 444 return InsetBorders;
445 } 445 }
446 ASSERT_NOT_REACHED(); 446 ASSERT_NOT_REACHED();
447 return NoBorders; 447 return NoBorders;
448 } 448 }
449 449
450 PassRefPtrWillBeRawPtr<StylePropertySet> HTMLTableElement::createSharedCellStyle () 450 PassRefPtrWillBeRawPtr<StylePropertySet> HTMLTableElement::createSharedCellStyle ()
451 { 451 {
452 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(); 452 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(HTMLQuirksMode);
453 453
454 switch (cellBorders()) { 454 switch (cellBorders()) {
455 case SolidBordersColsOnly: 455 case SolidBordersColsOnly:
456 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); 456 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin);
457 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); 457 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin);
458 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); 458 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid);
459 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); 459 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid);
460 style->setProperty(CSSPropertyBorderColor, cssValuePool().createInherite dValue()); 460 style->setProperty(CSSPropertyBorderColor, cssValuePool().createInherite dValue());
461 break; 461 break;
462 case SolidBordersRowsOnly: 462 case SolidBordersRowsOnly:
(...skipping 26 matching lines...) Expand all
489 489
490 const StylePropertySet* HTMLTableElement::additionalCellStyle() 490 const StylePropertySet* HTMLTableElement::additionalCellStyle()
491 { 491 {
492 if (!m_sharedCellStyle) 492 if (!m_sharedCellStyle)
493 m_sharedCellStyle = createSharedCellStyle(); 493 m_sharedCellStyle = createSharedCellStyle();
494 return m_sharedCellStyle.get(); 494 return m_sharedCellStyle.get();
495 } 495 }
496 496
497 static PassRefPtrWillBeRawPtr<StylePropertySet> createGroupBorderStyle(int rows) 497 static PassRefPtrWillBeRawPtr<StylePropertySet> createGroupBorderStyle(int rows)
498 { 498 {
499 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(); 499 RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet: :create(HTMLQuirksMode);
500 if (rows) { 500 if (rows) {
501 style->setProperty(CSSPropertyBorderTopWidth, CSSValueThin); 501 style->setProperty(CSSPropertyBorderTopWidth, CSSValueThin);
502 style->setProperty(CSSPropertyBorderBottomWidth, CSSValueThin); 502 style->setProperty(CSSPropertyBorderBottomWidth, CSSValueThin);
503 style->setProperty(CSSPropertyBorderTopStyle, CSSValueSolid); 503 style->setProperty(CSSPropertyBorderTopStyle, CSSValueSolid);
504 style->setProperty(CSSPropertyBorderBottomStyle, CSSValueSolid); 504 style->setProperty(CSSPropertyBorderBottomStyle, CSSValueSolid);
505 } else { 505 } else {
506 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin); 506 style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin);
507 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin); 507 style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin);
508 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid); 508 style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid);
509 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid); 509 style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return getAttribute(summaryAttr); 559 return getAttribute(summaryAttr);
560 } 560 }
561 561
562 DEFINE_TRACE(HTMLTableElement) 562 DEFINE_TRACE(HTMLTableElement)
563 { 563 {
564 visitor->trace(m_sharedCellStyle); 564 visitor->trace(m_sharedCellStyle);
565 HTMLElement::trace(visitor); 565 HTMLElement::trace(visitor);
566 } 566 }
567 567
568 } 568 }
OLDNEW
« no previous file with comments | « Source/core/editing/commands/EditorCommand.cpp ('k') | Source/core/html/canvas/CanvasFontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698