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

Side by Side Diff: Source/core/rendering/RenderTableCell.cpp

Issue 19697011: Change rendering code to use RenderObject::resolveColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
« no previous file with comments | « Source/core/rendering/RenderTable.h ('k') | Source/core/rendering/RenderTheme.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, 2007, 2008, 2009 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 493 }
494 494
495 CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC olorOrNot includeColor) const 495 CollapsedBorderValue RenderTableCell::computeCollapsedStartBorder(IncludeBorderC olorOrNot includeColor) const
496 { 496 {
497 RenderTable* table = this->table(); 497 RenderTable* table = this->table();
498 498
499 // For the start border, we need to check, in order of precedence: 499 // For the start border, we need to check, in order of precedence:
500 // (1) Our start border. 500 // (1) Our start border.
501 int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderStartColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0; 501 int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderStartColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0;
502 int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProp erty(CSSPropertyWebkitBorderEndColor, styleForCellFlow()->direction(), styleForC ellFlow()->writingMode()) : 0; 502 int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProp erty(CSSPropertyWebkitBorderEndColor, styleForCellFlow()->direction(), styleForC ellFlow()->writingMode()) : 0;
503 CollapsedBorderValue result(style()->borderStart(), includeColor ? style()-> visitedDependentColor(startColorProperty) : Color(), BCELL); 503 CollapsedBorderValue result(style()->borderStart(), includeColor ? resolveCo lor(startColorProperty) : Color(), BCELL);
504 504
505 // (2) The end border of the preceding cell. 505 // (2) The end border of the preceding cell.
506 RenderTableCell* cellBefore = table->cellBefore(this); 506 RenderTableCell* cellBefore = table->cellBefore(this);
507 if (cellBefore) { 507 if (cellBefore) {
508 CollapsedBorderValue cellBeforeAdjoiningBorder = CollapsedBorderValue(ce llBefore->borderAdjoiningCellAfter(this), includeColor ? cellBefore->style()->vi sitedDependentColor(endColorProperty) : Color(), BCELL); 508 CollapsedBorderValue cellBeforeAdjoiningBorder = CollapsedBorderValue(ce llBefore->borderAdjoiningCellAfter(this), includeColor ? cellBefore->resolveColo r(endColorProperty) : Color(), BCELL);
509 // |result| should be the 2nd argument as |cellBefore| should win in cas e of equality per CSS 2.1 (Border conflict resolution, point 4). 509 // |result| should be the 2nd argument as |cellBefore| should win in cas e of equality per CSS 2.1 (Border conflict resolution, point 4).
510 result = chooseBorder(cellBeforeAdjoiningBorder, result); 510 result = chooseBorder(cellBeforeAdjoiningBorder, result);
511 if (!result.exists()) 511 if (!result.exists())
512 return result; 512 return result;
513 } 513 }
514 514
515 bool startBorderAdjoinsTable = hasStartBorderAdjoiningTable(); 515 bool startBorderAdjoinsTable = hasStartBorderAdjoiningTable();
516 if (startBorderAdjoinsTable) { 516 if (startBorderAdjoinsTable) {
517 // (3) Our row's start border. 517 // (3) Our row's start border.
518 result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoinin gStartCell(this), includeColor ? parent()->style()->visitedDependentColor(startC olorProperty) : Color(), BROW)); 518 result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoinin gStartCell(this), includeColor ? parent()->resolveColor(startColorProperty) : Co lor(), BROW));
519 if (!result.exists()) 519 if (!result.exists())
520 return result; 520 return result;
521 521
522 // (4) Our row group's start border. 522 // (4) Our row group's start border.
523 result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjo iningStartCell(this), includeColor ? section()->style()->visitedDependentColor(s tartColorProperty) : Color(), BROWGROUP)); 523 result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjo iningStartCell(this), includeColor ? section()->resolveColor(startColorProperty) : Color(), BROWGROUP));
524 if (!result.exists()) 524 if (!result.exists())
525 return result; 525 return result;
526 } 526 }
527 527
528 // (5) Our column and column group's start borders. 528 // (5) Our column and column group's start borders.
529 bool startColEdge; 529 bool startColEdge;
530 bool endColEdge; 530 bool endColEdge;
531 if (RenderTableCol* colElt = table->colElement(col(), &startColEdge, &endCol Edge)) { 531 if (RenderTableCol* colElt = table->colElement(col(), &startColEdge, &endCol Edge)) {
532 if (colElt->isTableColumnGroup() && startColEdge) { 532 if (colElt->isTableColumnGroup() && startColEdge) {
533 // The |colElt| is a column group and is also the first colgroup (in case of spanned colgroups). 533 // The |colElt| is a column group and is also the first colgroup (in case of spanned colgroups).
534 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellStartBorder(this), includeColor ? colElt->style()->visitedDependentCol or(startColorProperty) : Color(), BCOLGROUP)); 534 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellStartBorder(this), includeColor ? colElt->resolveColor(startColorPrope rty) : Color(), BCOLGROUP));
535 if (!result.exists()) 535 if (!result.exists())
536 return result; 536 return result;
537 } else if (!colElt->isTableColumnGroup()) { 537 } else if (!colElt->isTableColumnGroup()) {
538 // We first consider the |colElt| and irrespective of whether it is a spanned col or not, we apply 538 // We first consider the |colElt| and irrespective of whether it is a spanned col or not, we apply
539 // its start border. This is as per HTML5 which states that: "For th e purposes of the CSS table model, 539 // its start border. This is as per HTML5 which states that: "For th e purposes of the CSS table model,
540 // the col element is expected to be treated as if it was present as many times as its span attribute specifies". 540 // the col element is expected to be treated as if it was present as many times as its span attribute specifies".
541 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellStartBorder(this), includeColor ? colElt->style()->visitedDependentCol or(startColorProperty) : Color(), BCOL)); 541 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellStartBorder(this), includeColor ? colElt->resolveColor(startColorPrope rty) : Color(), BCOL));
542 if (!result.exists()) 542 if (!result.exists())
543 return result; 543 return result;
544 // Next, apply the start border of the enclosing colgroup but only i f it is adjacent to the cell's edge. 544 // Next, apply the start border of the enclosing colgroup but only i f it is adjacent to the cell's edge.
545 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oupIfAdjacentBefore()) { 545 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oupIfAdjacentBefore()) {
546 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGro up->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP)); 546 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColumnGro up->resolveColor(startColorProperty) : Color(), BCOLGROUP));
547 if (!result.exists()) 547 if (!result.exists())
548 return result; 548 return result;
549 } 549 }
550 } 550 }
551 } 551 }
552 552
553 // (6) The end border of the preceding column. 553 // (6) The end border of the preceding column.
554 if (cellBefore) { 554 if (cellBefore) {
555 if (RenderTableCol* colElt = table->colElement(col() - 1, &startColEdge, &endColEdge)) { 555 if (RenderTableCol* colElt = table->colElement(col() - 1, &startColEdge, &endColEdge)) {
556 if (colElt->isTableColumnGroup() && endColEdge) { 556 if (colElt->isTableColumnGroup() && endColEdge) {
557 // The element is a colgroup and is also the last colgroup (in c ase of spanned colgroups). 557 // The element is a colgroup and is also the last colgroup (in c ase of spanned colgroups).
558 result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoini ngCellAfter(this), includeColor ? colElt->style()->visitedDependentColor(endColo rProperty) : Color(), BCOLGROUP), result); 558 result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoini ngCellAfter(this), includeColor ? colElt->resolveColor(endColorProperty) : Color (), BCOLGROUP), result);
559 if (!result.exists()) 559 if (!result.exists())
560 return result; 560 return result;
561 } else if (colElt->isTableColumn()) { 561 } else if (colElt->isTableColumn()) {
562 // Resolve the collapsing border against the col's border ignori ng any 'span' as per HTML5. 562 // Resolve the collapsing border against the col's border ignori ng any 'span' as per HTML5.
563 result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoini ngCellAfter(this), includeColor ? colElt->style()->visitedDependentColor(endColo rProperty) : Color(), BCOL), result); 563 result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoini ngCellAfter(this), includeColor ? colElt->resolveColor(endColorProperty) : Color (), BCOL), result);
564 if (!result.exists()) 564 if (!result.exists())
565 return result; 565 return result;
566 // Next, if the previous col has a parent colgroup then its end border should be applied 566 // Next, if the previous col has a parent colgroup then its end border should be applied
567 // but only if it is adjacent to the cell's edge. 567 // but only if it is adjacent to the cell's edge.
568 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColu mnGroupIfAdjacentAfter()) { 568 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColu mnGroupIfAdjacentAfter()) {
569 result = chooseBorder(CollapsedBorderValue(enclosingColumnGr oup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->st yle()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP), result); 569 result = chooseBorder(CollapsedBorderValue(enclosingColumnGr oup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup->re solveColor(endColorProperty) : Color(), BCOLGROUP), result);
570 if (!result.exists()) 570 if (!result.exists())
571 return result; 571 return result;
572 } 572 }
573 } 573 }
574 } 574 }
575 } 575 }
576 576
577 if (startBorderAdjoinsTable) { 577 if (startBorderAdjoinsTable) {
578 // (7) The table's start border. 578 // (7) The table's start border.
579 result = chooseBorder(result, CollapsedBorderValue(table->tableStartBord erAdjoiningCell(this), includeColor ? table->style()->visitedDependentColor(star tColorProperty) : Color(), BTABLE)); 579 result = chooseBorder(result, CollapsedBorderValue(table->tableStartBord erAdjoiningCell(this), includeColor ? table->resolveColor(startColorProperty) : Color(), BTABLE));
580 if (!result.exists()) 580 if (!result.exists())
581 return result; 581 return result;
582 } 582 }
583 583
584 return result; 584 return result;
585 } 585 }
586 586
587 CollapsedBorderValue RenderTableCell::collapsedEndBorder(IncludeBorderColorOrNot includeColor) const 587 CollapsedBorderValue RenderTableCell::collapsedEndBorder(IncludeBorderColorOrNot includeColor) const
588 { 588 {
589 CollapsedBorderValue result = computeCollapsedEndBorder(includeColor); 589 CollapsedBorderValue result = computeCollapsedEndBorder(includeColor);
590 if (includeColor) 590 if (includeColor)
591 section()->setCachedCollapsedBorder(this, CBSEnd, result); 591 section()->setCachedCollapsedBorder(this, CBSEnd, result);
592 return result; 592 return result;
593 } 593 }
594 594
595 CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol orOrNot includeColor) const 595 CollapsedBorderValue RenderTableCell::computeCollapsedEndBorder(IncludeBorderCol orOrNot includeColor) const
596 { 596 {
597 RenderTable* table = this->table(); 597 RenderTable* table = this->table();
598 // Note: We have to use the effective column information instead of whether we have a cell after as a table doesn't 598 // Note: We have to use the effective column information instead of whether we have a cell after as a table doesn't
599 // have to be regular (any row can have less cells than the total cell count ). 599 // have to be regular (any row can have less cells than the total cell count ).
600 bool isEndColumn = table->colToEffCol(col() + colSpan() - 1) == table->numEf fCols() - 1; 600 bool isEndColumn = table->colToEffCol(col() + colSpan() - 1) == table->numEf fCols() - 1;
601 601
602 // For end border, we need to check, in order of precedence: 602 // For end border, we need to check, in order of precedence:
603 // (1) Our end border. 603 // (1) Our end border.
604 int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderStartColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0; 604 int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderStartColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0;
605 int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProp erty(CSSPropertyWebkitBorderEndColor, styleForCellFlow()->direction(), styleForC ellFlow()->writingMode()) : 0; 605 int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProp erty(CSSPropertyWebkitBorderEndColor, styleForCellFlow()->direction(), styleForC ellFlow()->writingMode()) : 0;
606 CollapsedBorderValue result = CollapsedBorderValue(style()->borderEnd(), inc ludeColor ? style()->visitedDependentColor(endColorProperty) : Color(), BCELL); 606 CollapsedBorderValue result = CollapsedBorderValue(style()->borderEnd(), inc ludeColor ? resolveColor(endColorProperty) : Color(), BCELL);
607 607
608 // (2) The start border of the following cell. 608 // (2) The start border of the following cell.
609 if (!isEndColumn) { 609 if (!isEndColumn) {
610 if (RenderTableCell* cellAfter = table->cellAfter(this)) { 610 if (RenderTableCell* cellAfter = table->cellAfter(this)) {
611 CollapsedBorderValue cellAfterAdjoiningBorder = CollapsedBorderValue (cellAfter->borderAdjoiningCellBefore(this), includeColor ? cellAfter->style()-> visitedDependentColor(startColorProperty) : Color(), BCELL); 611 CollapsedBorderValue cellAfterAdjoiningBorder = CollapsedBorderValue (cellAfter->borderAdjoiningCellBefore(this), includeColor ? cellAfter->resolveCo lor(startColorProperty) : Color(), BCELL);
612 result = chooseBorder(result, cellAfterAdjoiningBorder); 612 result = chooseBorder(result, cellAfterAdjoiningBorder);
613 if (!result.exists()) 613 if (!result.exists())
614 return result; 614 return result;
615 } 615 }
616 } 616 }
617 617
618 bool endBorderAdjoinsTable = hasEndBorderAdjoiningTable(); 618 bool endBorderAdjoinsTable = hasEndBorderAdjoiningTable();
619 if (endBorderAdjoinsTable) { 619 if (endBorderAdjoinsTable) {
620 // (3) Our row's end border. 620 // (3) Our row's end border.
621 result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoinin gEndCell(this), includeColor ? parent()->style()->visitedDependentColor(endColor Property) : Color(), BROW)); 621 result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoinin gEndCell(this), includeColor ? parent()->resolveColor(endColorProperty) : Color( ), BROW));
622 if (!result.exists()) 622 if (!result.exists())
623 return result; 623 return result;
624 624
625 // (4) Our row group's end border. 625 // (4) Our row group's end border.
626 result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjo iningEndCell(this), includeColor ? section()->style()->visitedDependentColor(end ColorProperty) : Color(), BROWGROUP)); 626 result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjo iningEndCell(this), includeColor ? section()->resolveColor(endColorProperty) : C olor(), BROWGROUP));
627 if (!result.exists()) 627 if (!result.exists())
628 return result; 628 return result;
629 } 629 }
630 630
631 // (5) Our column and column group's end borders. 631 // (5) Our column and column group's end borders.
632 bool startColEdge; 632 bool startColEdge;
633 bool endColEdge; 633 bool endColEdge;
634 if (RenderTableCol* colElt = table->colElement(col() + colSpan() - 1, &start ColEdge, &endColEdge)) { 634 if (RenderTableCol* colElt = table->colElement(col() + colSpan() - 1, &start ColEdge, &endColEdge)) {
635 if (colElt->isTableColumnGroup() && endColEdge) { 635 if (colElt->isTableColumnGroup() && endColEdge) {
636 // The element is a colgroup and is also the last colgroup (in case of spanned colgroups). 636 // The element is a colgroup and is also the last colgroup (in case of spanned colgroups).
637 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellEndBorder(this), includeColor ? colElt->style()->visitedDependentColor (endColorProperty) : Color(), BCOLGROUP)); 637 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellEndBorder(this), includeColor ? colElt->resolveColor(endColorProperty) : Color(), BCOLGROUP));
638 if (!result.exists()) 638 if (!result.exists())
639 return result; 639 return result;
640 } else if (!colElt->isTableColumnGroup()) { 640 } else if (!colElt->isTableColumnGroup()) {
641 // First apply the end border of the column irrespective of whether it is spanned or not. This is as per 641 // First apply the end border of the column irrespective of whether it is spanned or not. This is as per
642 // HTML5 which states that: "For the purposes of the CSS table model , the col element is expected to be 642 // HTML5 which states that: "For the purposes of the CSS table model , the col element is expected to be
643 // treated as if it was present as many times as its span attribute specifies". 643 // treated as if it was present as many times as its span attribute specifies".
644 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellEndBorder(this), includeColor ? colElt->style()->visitedDependentColor (endColorProperty) : Color(), BCOL)); 644 result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdj oiningCellEndBorder(this), includeColor ? colElt->resolveColor(endColorProperty) : Color(), BCOL));
645 if (!result.exists()) 645 if (!result.exists())
646 return result; 646 return result;
647 // Next, if it has a parent colgroup then we apply its end border bu t only if it is adjacent to the cell. 647 // Next, if it has a parent colgroup then we apply its end border bu t only if it is adjacent to the cell.
648 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oupIfAdjacentAfter()) { 648 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oupIfAdjacentAfter()) {
649 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup ->style()->visitedDependentColor(endColorProperty) : Color(), BCOLGROUP)); 649 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->borderAdjoiningCellEndBorder(this), includeColor ? enclosingColumnGroup ->resolveColor(endColorProperty) : Color(), BCOLGROUP));
650 if (!result.exists()) 650 if (!result.exists())
651 return result; 651 return result;
652 } 652 }
653 } 653 }
654 } 654 }
655 655
656 // (6) The start border of the next column. 656 // (6) The start border of the next column.
657 if (!isEndColumn) { 657 if (!isEndColumn) {
658 if (RenderTableCol* colElt = table->colElement(col() + colSpan(), &start ColEdge, &endColEdge)) { 658 if (RenderTableCol* colElt = table->colElement(col() + colSpan(), &start ColEdge, &endColEdge)) {
659 if (colElt->isTableColumnGroup() && startColEdge) { 659 if (colElt->isTableColumnGroup() && startColEdge) {
660 // This case is a colgroup without any col, we only compute it i f it is adjacent to the cell's edge. 660 // This case is a colgroup without any col, we only compute it i f it is adjacent to the cell's edge.
661 result = chooseBorder(result, CollapsedBorderValue(colElt->borde rAdjoiningCellBefore(this), includeColor ? colElt->style()->visitedDependentColo r(startColorProperty) : Color(), BCOLGROUP)); 661 result = chooseBorder(result, CollapsedBorderValue(colElt->borde rAdjoiningCellBefore(this), includeColor ? colElt->resolveColor(startColorProper ty) : Color(), BCOLGROUP));
662 if (!result.exists()) 662 if (!result.exists())
663 return result; 663 return result;
664 } else if (colElt->isTableColumn()) { 664 } else if (colElt->isTableColumn()) {
665 // Resolve the collapsing border against the col's border ignori ng any 'span' as per HTML5. 665 // Resolve the collapsing border against the col's border ignori ng any 'span' as per HTML5.
666 result = chooseBorder(result, CollapsedBorderValue(colElt->borde rAdjoiningCellBefore(this), includeColor ? colElt->style()->visitedDependentColo r(startColorProperty) : Color(), BCOL)); 666 result = chooseBorder(result, CollapsedBorderValue(colElt->borde rAdjoiningCellBefore(this), includeColor ? colElt->resolveColor(startColorProper ty) : Color(), BCOL));
667 if (!result.exists()) 667 if (!result.exists())
668 return result; 668 return result;
669 // If we have a parent colgroup, resolve the border only if it i s adjacent to the cell. 669 // If we have a parent colgroup, resolve the border only if it i s adjacent to the cell.
670 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColu mnGroupIfAdjacentBefore()) { 670 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColu mnGroupIfAdjacentBefore()) {
671 result = chooseBorder(result, CollapsedBorderValue(enclosing ColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColum nGroup->style()->visitedDependentColor(startColorProperty) : Color(), BCOLGROUP) ); 671 result = chooseBorder(result, CollapsedBorderValue(enclosing ColumnGroup->borderAdjoiningCellStartBorder(this), includeColor ? enclosingColum nGroup->resolveColor(startColorProperty) : Color(), BCOLGROUP));
672 if (!result.exists()) 672 if (!result.exists())
673 return result; 673 return result;
674 } 674 }
675 } 675 }
676 } 676 }
677 } 677 }
678 678
679 if (endBorderAdjoinsTable) { 679 if (endBorderAdjoinsTable) {
680 // (7) The table's end border. 680 // (7) The table's end border.
681 result = chooseBorder(result, CollapsedBorderValue(table->tableEndBorder AdjoiningCell(this), includeColor ? table->style()->visitedDependentColor(endCol orProperty) : Color(), BTABLE)); 681 result = chooseBorder(result, CollapsedBorderValue(table->tableEndBorder AdjoiningCell(this), includeColor ? table->resolveColor(endColorProperty) : Colo r(), BTABLE));
682 if (!result.exists()) 682 if (!result.exists())
683 return result; 683 return result;
684 } 684 }
685 685
686 return result; 686 return result;
687 } 687 }
688 688
689 CollapsedBorderValue RenderTableCell::collapsedBeforeBorder(IncludeBorderColorOr Not includeColor) const 689 CollapsedBorderValue RenderTableCell::collapsedBeforeBorder(IncludeBorderColorOr Not includeColor) const
690 { 690 {
691 CollapsedBorderValue result = computeCollapsedBeforeBorder(includeColor); 691 CollapsedBorderValue result = computeCollapsedBeforeBorder(includeColor);
692 if (includeColor) 692 if (includeColor)
693 section()->setCachedCollapsedBorder(this, CBSBefore, result); 693 section()->setCachedCollapsedBorder(this, CBSBefore, result);
694 return result; 694 return result;
695 } 695 }
696 696
697 CollapsedBorderValue RenderTableCell::computeCollapsedBeforeBorder(IncludeBorder ColorOrNot includeColor) const 697 CollapsedBorderValue RenderTableCell::computeCollapsedBeforeBorder(IncludeBorder ColorOrNot includeColor) const
698 { 698 {
699 RenderTable* table = this->table(); 699 RenderTable* table = this->table();
700 700
701 // For before border, we need to check, in order of precedence: 701 // For before border, we need to check, in order of precedence:
702 // (1) Our before border. 702 // (1) Our before border.
703 int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareP roperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), sty leForCellFlow()->writingMode()) : 0; 703 int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareP roperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), sty leForCellFlow()->writingMode()) : 0;
704 int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0; 704 int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0;
705 CollapsedBorderValue result = CollapsedBorderValue(style()->borderBefore(), includeColor ? style()->visitedDependentColor(beforeColorProperty) : Color(), BC ELL); 705 CollapsedBorderValue result = CollapsedBorderValue(style()->borderBefore(), includeColor ? resolveColor(beforeColorProperty) : Color(), BCELL);
706 706
707 RenderTableCell* prevCell = table->cellAbove(this); 707 RenderTableCell* prevCell = table->cellAbove(this);
708 if (prevCell) { 708 if (prevCell) {
709 // (2) A before cell's after border. 709 // (2) A before cell's after border.
710 result = chooseBorder(CollapsedBorderValue(prevCell->style()->borderAfte r(), includeColor ? prevCell->style()->visitedDependentColor(afterColorProperty) : Color(), BCELL), result); 710 result = chooseBorder(CollapsedBorderValue(prevCell->style()->borderAfte r(), includeColor ? prevCell->resolveColor(afterColorProperty) : Color(), BCELL) , result);
711 if (!result.exists()) 711 if (!result.exists())
712 return result; 712 return result;
713 } 713 }
714 714
715 // (3) Our row's before border. 715 // (3) Our row's before border.
716 result = chooseBorder(result, CollapsedBorderValue(parent()->style()->border Before(), includeColor ? parent()->style()->visitedDependentColor(beforeColorPro perty) : Color(), BROW)); 716 result = chooseBorder(result, CollapsedBorderValue(parent()->style()->border Before(), includeColor ? parent()->resolveColor(beforeColorProperty) : Color(), BROW));
717 if (!result.exists()) 717 if (!result.exists())
718 return result; 718 return result;
719 719
720 // (4) The previous row's after border. 720 // (4) The previous row's after border.
721 if (prevCell) { 721 if (prevCell) {
722 RenderObject* prevRow = 0; 722 RenderObject* prevRow = 0;
723 if (prevCell->section() == section()) 723 if (prevCell->section() == section())
724 prevRow = parent()->previousSibling(); 724 prevRow = parent()->previousSibling();
725 else 725 else
726 prevRow = prevCell->section()->lastChild(); 726 prevRow = prevCell->section()->lastChild();
727 727
728 if (prevRow) { 728 if (prevRow) {
729 result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderA fter(), includeColor ? prevRow->style()->visitedDependentColor(afterColorPropert y) : Color(), BROW), result); 729 result = chooseBorder(CollapsedBorderValue(prevRow->style()->borderA fter(), includeColor ? prevRow->resolveColor(afterColorProperty) : Color(), BROW ), result);
730 if (!result.exists()) 730 if (!result.exists())
731 return result; 731 return result;
732 } 732 }
733 } 733 }
734 734
735 // Now check row groups. 735 // Now check row groups.
736 RenderTableSection* currSection = section(); 736 RenderTableSection* currSection = section();
737 if (!rowIndex()) { 737 if (!rowIndex()) {
738 // (5) Our row group's before border. 738 // (5) Our row group's before border.
739 result = chooseBorder(result, CollapsedBorderValue(currSection->style()- >borderBefore(), includeColor ? currSection->style()->visitedDependentColor(befo reColorProperty) : Color(), BROWGROUP)); 739 result = chooseBorder(result, CollapsedBorderValue(currSection->style()- >borderBefore(), includeColor ? currSection->resolveColor(beforeColorProperty) : Color(), BROWGROUP));
740 if (!result.exists()) 740 if (!result.exists())
741 return result; 741 return result;
742 742
743 // (6) Previous row group's after border. 743 // (6) Previous row group's after border.
744 currSection = table->sectionAbove(currSection, SkipEmptySections); 744 currSection = table->sectionAbove(currSection, SkipEmptySections);
745 if (currSection) { 745 if (currSection) {
746 result = chooseBorder(CollapsedBorderValue(currSection->style()->bor derAfter(), includeColor ? currSection->style()->visitedDependentColor(afterColo rProperty) : Color(), BROWGROUP), result); 746 result = chooseBorder(CollapsedBorderValue(currSection->style()->bor derAfter(), includeColor ? currSection->resolveColor(afterColorProperty) : Color (), BROWGROUP), result);
747 if (!result.exists()) 747 if (!result.exists())
748 return result; 748 return result;
749 } 749 }
750 } 750 }
751 751
752 if (!currSection) { 752 if (!currSection) {
753 // (8) Our column and column group's before borders. 753 // (8) Our column and column group's before borders.
754 RenderTableCol* colElt = table->colElement(col()); 754 RenderTableCol* colElt = table->colElement(col());
755 if (colElt) { 755 if (colElt) {
756 result = chooseBorder(result, CollapsedBorderValue(colElt->style()-> borderBefore(), includeColor ? colElt->style()->visitedDependentColor(beforeColo rProperty) : Color(), BCOL)); 756 result = chooseBorder(result, CollapsedBorderValue(colElt->style()-> borderBefore(), includeColor ? colElt->resolveColor(beforeColorProperty) : Color (), BCOL));
757 if (!result.exists()) 757 if (!result.exists())
758 return result; 758 return result;
759 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oup()) { 759 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oup()) {
760 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->style()->borderBefore(), includeColor ? enclosingColumnGroup->style()-> visitedDependentColor(beforeColorProperty) : Color(), BCOLGROUP)); 760 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->style()->borderBefore(), includeColor ? enclosingColumnGroup->resolveCo lor(beforeColorProperty) : Color(), BCOLGROUP));
761 if (!result.exists()) 761 if (!result.exists())
762 return result; 762 return result;
763 } 763 }
764 } 764 }
765 765
766 // (9) The table's before border. 766 // (9) The table's before border.
767 result = chooseBorder(result, CollapsedBorderValue(table->style()->borde rBefore(), includeColor ? table->style()->visitedDependentColor(beforeColorPrope rty) : Color(), BTABLE)); 767 result = chooseBorder(result, CollapsedBorderValue(table->style()->borde rBefore(), includeColor ? table->resolveColor(beforeColorProperty) : Color(), BT ABLE));
768 if (!result.exists()) 768 if (!result.exists())
769 return result; 769 return result;
770 } 770 }
771 771
772 return result; 772 return result;
773 } 773 }
774 774
775 CollapsedBorderValue RenderTableCell::collapsedAfterBorder(IncludeBorderColorOrN ot includeColor) const 775 CollapsedBorderValue RenderTableCell::collapsedAfterBorder(IncludeBorderColorOrN ot includeColor) const
776 { 776 {
777 CollapsedBorderValue result = computeCollapsedAfterBorder(includeColor); 777 CollapsedBorderValue result = computeCollapsedAfterBorder(includeColor);
778 if (includeColor) 778 if (includeColor)
779 section()->setCachedCollapsedBorder(this, CBSAfter, result); 779 section()->setCachedCollapsedBorder(this, CBSAfter, result);
780 return result; 780 return result;
781 } 781 }
782 782
783 CollapsedBorderValue RenderTableCell::computeCollapsedAfterBorder(IncludeBorderC olorOrNot includeColor) const 783 CollapsedBorderValue RenderTableCell::computeCollapsedAfterBorder(IncludeBorderC olorOrNot includeColor) const
784 { 784 {
785 RenderTable* table = this->table(); 785 RenderTable* table = this->table();
786 786
787 // For after border, we need to check, in order of precedence: 787 // For after border, we need to check, in order of precedence:
788 // (1) Our after border. 788 // (1) Our after border.
789 int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareP roperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), sty leForCellFlow()->writingMode()) : 0; 789 int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareP roperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow()->direction(), sty leForCellFlow()->writingMode()) : 0;
790 int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0; 790 int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwarePr operty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow()->direction(), style ForCellFlow()->writingMode()) : 0;
791 CollapsedBorderValue result = CollapsedBorderValue(style()->borderAfter(), i ncludeColor ? style()->visitedDependentColor(afterColorProperty) : Color(), BCEL L); 791 CollapsedBorderValue result = CollapsedBorderValue(style()->borderAfter(), i ncludeColor ? resolveColor(afterColorProperty) : Color(), BCELL);
792 792
793 RenderTableCell* nextCell = table->cellBelow(this); 793 RenderTableCell* nextCell = table->cellBelow(this);
794 if (nextCell) { 794 if (nextCell) {
795 // (2) An after cell's before border. 795 // (2) An after cell's before border.
796 result = chooseBorder(result, CollapsedBorderValue(nextCell->style()->bo rderBefore(), includeColor ? nextCell->style()->visitedDependentColor(beforeColo rProperty) : Color(), BCELL)); 796 result = chooseBorder(result, CollapsedBorderValue(nextCell->style()->bo rderBefore(), includeColor ? nextCell->resolveColor(beforeColorProperty) : Color (), BCELL));
797 if (!result.exists()) 797 if (!result.exists())
798 return result; 798 return result;
799 } 799 }
800 800
801 // (3) Our row's after border. (FIXME: Deal with rowspan!) 801 // (3) Our row's after border. (FIXME: Deal with rowspan!)
802 result = chooseBorder(result, CollapsedBorderValue(parent()->style()->border After(), includeColor ? parent()->style()->visitedDependentColor(afterColorPrope rty) : Color(), BROW)); 802 result = chooseBorder(result, CollapsedBorderValue(parent()->style()->border After(), includeColor ? parent()->resolveColor(afterColorProperty) : Color(), BR OW));
803 if (!result.exists()) 803 if (!result.exists())
804 return result; 804 return result;
805 805
806 // (4) The next row's before border. 806 // (4) The next row's before border.
807 if (nextCell) { 807 if (nextCell) {
808 result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->s tyle()->borderBefore(), includeColor ? nextCell->parent()->style()->visitedDepen dentColor(beforeColorProperty) : Color(), BROW)); 808 result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->s tyle()->borderBefore(), includeColor ? nextCell->parent()->resolveColor(beforeCo lorProperty) : Color(), BROW));
809 if (!result.exists()) 809 if (!result.exists())
810 return result; 810 return result;
811 } 811 }
812 812
813 // Now check row groups. 813 // Now check row groups.
814 RenderTableSection* currSection = section(); 814 RenderTableSection* currSection = section();
815 if (rowIndex() + rowSpan() >= currSection->numRows()) { 815 if (rowIndex() + rowSpan() >= currSection->numRows()) {
816 // (5) Our row group's after border. 816 // (5) Our row group's after border.
817 result = chooseBorder(result, CollapsedBorderValue(currSection->style()- >borderAfter(), includeColor ? currSection->style()->visitedDependentColor(after ColorProperty) : Color(), BROWGROUP)); 817 result = chooseBorder(result, CollapsedBorderValue(currSection->style()- >borderAfter(), includeColor ? currSection->resolveColor(afterColorProperty) : C olor(), BROWGROUP));
818 if (!result.exists()) 818 if (!result.exists())
819 return result; 819 return result;
820 820
821 // (6) Following row group's before border. 821 // (6) Following row group's before border.
822 currSection = table->sectionBelow(currSection, SkipEmptySections); 822 currSection = table->sectionBelow(currSection, SkipEmptySections);
823 if (currSection) { 823 if (currSection) {
824 result = chooseBorder(result, CollapsedBorderValue(currSection->styl e()->borderBefore(), includeColor ? currSection->style()->visitedDependentColor( beforeColorProperty) : Color(), BROWGROUP)); 824 result = chooseBorder(result, CollapsedBorderValue(currSection->styl e()->borderBefore(), includeColor ? currSection->resolveColor(beforeColorPropert y) : Color(), BROWGROUP));
825 if (!result.exists()) 825 if (!result.exists())
826 return result; 826 return result;
827 } 827 }
828 } 828 }
829 829
830 if (!currSection) { 830 if (!currSection) {
831 // (8) Our column and column group's after borders. 831 // (8) Our column and column group's after borders.
832 RenderTableCol* colElt = table->colElement(col()); 832 RenderTableCol* colElt = table->colElement(col());
833 if (colElt) { 833 if (colElt) {
834 result = chooseBorder(result, CollapsedBorderValue(colElt->style()-> borderAfter(), includeColor ? colElt->style()->visitedDependentColor(afterColorP roperty) : Color(), BCOL)); 834 result = chooseBorder(result, CollapsedBorderValue(colElt->style()-> borderAfter(), includeColor ? colElt->resolveColor(afterColorProperty) : Color() , BCOL));
835 if (!result.exists()) return result; 835 if (!result.exists()) return result;
836 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oup()) { 836 if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGr oup()) {
837 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->style()->borderAfter(), includeColor ? enclosingColumnGroup->style()->v isitedDependentColor(afterColorProperty) : Color(), BCOLGROUP)); 837 result = chooseBorder(result, CollapsedBorderValue(enclosingColu mnGroup->style()->borderAfter(), includeColor ? enclosingColumnGroup->resolveCol or(afterColorProperty) : Color(), BCOLGROUP));
838 if (!result.exists()) 838 if (!result.exists())
839 return result; 839 return result;
840 } 840 }
841 } 841 }
842 842
843 // (9) The table's after border. 843 // (9) The table's after border.
844 result = chooseBorder(result, CollapsedBorderValue(table->style()->borde rAfter(), includeColor ? table->style()->visitedDependentColor(afterColorPropert y) : Color(), BTABLE)); 844 result = chooseBorder(result, CollapsedBorderValue(table->style()->borde rAfter(), includeColor ? table->resolveColor(afterColorProperty) : Color(), BTAB LE));
845 if (!result.exists()) 845 if (!result.exists())
846 return result; 846 return result;
847 } 847 }
848 848
849 return result; 849 return result;
850 } 850 }
851 851
852 inline CollapsedBorderValue RenderTableCell::cachedCollapsedLeftBorder(const Ren derStyle* styleForCellFlow) const 852 inline CollapsedBorderValue RenderTableCell::cachedCollapsedLeftBorder(const Ren derStyle* styleForCellFlow) const
853 { 853 {
854 if (styleForCellFlow->isHorizontalWritingMode()) 854 if (styleForCellFlow->isHorizontalWritingMode())
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 // precedence paint on top of borders with lower precedence. 1135 // precedence paint on top of borders with lower precedence.
1136 CollapsedBorders borders; 1136 CollapsedBorders borders;
1137 borders.addBorder(topVal, BSTop, renderTop, borderRect.x(), borderRect.y(), borderRect.maxX(), borderRect.y() + topWidth, topStyle); 1137 borders.addBorder(topVal, BSTop, renderTop, borderRect.x(), borderRect.y(), borderRect.maxX(), borderRect.y() + topWidth, topStyle);
1138 borders.addBorder(bottomVal, BSBottom, renderBottom, borderRect.x(), borderR ect.maxY() - bottomWidth, borderRect.maxX(), borderRect.maxY(), bottomStyle); 1138 borders.addBorder(bottomVal, BSBottom, renderBottom, borderRect.x(), borderR ect.maxY() - bottomWidth, borderRect.maxX(), borderRect.maxY(), bottomStyle);
1139 borders.addBorder(leftVal, BSLeft, renderLeft, borderRect.x(), borderRect.y( ), borderRect.x() + leftWidth, borderRect.maxY(), leftStyle); 1139 borders.addBorder(leftVal, BSLeft, renderLeft, borderRect.x(), borderRect.y( ), borderRect.x() + leftWidth, borderRect.maxY(), leftStyle);
1140 borders.addBorder(rightVal, BSRight, renderRight, borderRect.maxX() - rightW idth, borderRect.y(), borderRect.maxX(), borderRect.maxY(), rightStyle); 1140 borders.addBorder(rightVal, BSRight, renderRight, borderRect.maxX() - rightW idth, borderRect.y(), borderRect.maxX(), borderRect.maxY(), rightStyle);
1141 1141
1142 bool antialias = shouldAntialiasLines(graphicsContext); 1142 bool antialias = shouldAntialiasLines(graphicsContext);
1143 1143
1144 for (CollapsedBorder* border = borders.nextBorder(); border; border = border s.nextBorder()) { 1144 for (CollapsedBorder* border = borders.nextBorder(); border; border = border s.nextBorder()) {
1145 if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue ())) 1145 if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue ())) {
1146 drawLineForBoxSide(graphicsContext, border->x1, border->y1, border-> x2, border->y2, border->side, 1146 drawLineForBoxSide(graphicsContext, border->x1, border->y1, border-> x2, border->y2, border->side,
1147 border->borderValue.color(), border->style, 0, 0, antialias); 1147 resolveColor(border->borderValue.color()), border->style, 0, 0, antialias);
1148 }
1148 } 1149 }
1149 } 1150 }
1150 1151
1151 void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Lay outPoint& paintOffset, RenderObject* backgroundObject) 1152 void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, const Lay outPoint& paintOffset, RenderObject* backgroundObject)
1152 { 1153 {
1153 if (!paintInfo.shouldPaintWithinRoot(this)) 1154 if (!paintInfo.shouldPaintWithinRoot(this))
1154 return; 1155 return;
1155 1156
1156 if (!backgroundObject) 1157 if (!backgroundObject)
1157 return; 1158 return;
1158 1159
1159 if (style()->visibility() != VISIBLE) 1160 if (style()->visibility() != VISIBLE)
1160 return; 1161 return;
1161 1162
1162 RenderTable* tableElt = table(); 1163 RenderTable* tableElt = table();
1163 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC hild()) 1164 if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstC hild())
1164 return; 1165 return;
1165 1166
1166 LayoutPoint adjustedPaintOffset = paintOffset; 1167 LayoutPoint adjustedPaintOffset = paintOffset;
1167 if (backgroundObject != this) 1168 if (backgroundObject != this)
1168 adjustedPaintOffset.moveBy(location()); 1169 adjustedPaintOffset.moveBy(location());
1169 1170
1170 Color c = backgroundObject->style()->visitedDependentColor(CSSPropertyBackgr oundColor); 1171 Color c = backgroundObject->resolveColor(CSSPropertyBackgroundColor);
1171 const FillLayer* bgLayer = backgroundObject->style()->backgroundLayers(); 1172 const FillLayer* bgLayer = backgroundObject->style()->backgroundLayers();
1172 1173
1173 if (bgLayer->hasImage() || c.isValid()) { 1174 if (bgLayer->hasImage() || c.isValid()) {
1174 // We have to clip here because the background would paint 1175 // We have to clip here because the background would paint
1175 // on top of the borders otherwise. This only matters for cells and row s. 1176 // on top of the borders otherwise. This only matters for cells and row s.
1176 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == t his || backgroundObject == parent()) && tableElt->collapseBorders(); 1177 bool shouldClip = backgroundObject->hasLayer() && (backgroundObject == t his || backgroundObject == parent()) && tableElt->collapseBorders();
1177 GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip); 1178 GraphicsContextStateSaver stateSaver(*paintInfo.context, shouldClip);
1178 if (shouldClip) { 1179 if (shouldClip) {
1179 LayoutRect clipRect(adjustedPaintOffset.x() + borderLeft(), adjusted PaintOffset.y() + borderTop(), 1180 LayoutRect clipRect(adjustedPaintOffset.x() + borderLeft(), adjusted PaintOffset.y() + borderTop(),
1180 width() - borderLeft() - borderRight(), height() - borderTop() - borderBottom()); 1181 width() - borderLeft() - borderRight(), height() - borderTop() - borderBottom());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 1258
1258 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent) 1259 RenderTableCell* RenderTableCell::createAnonymousWithParentRenderer(const Render Object* parent)
1259 { 1260 {
1260 RenderTableCell* newCell = RenderTableCell::createAnonymous(parent->document ()); 1261 RenderTableCell* newCell = RenderTableCell::createAnonymous(parent->document ());
1261 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL); 1262 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyleWithDisplay( parent->style(), TABLE_CELL);
1262 newCell->setStyle(newStyle.release()); 1263 newCell->setStyle(newStyle.release());
1263 return newCell; 1264 return newCell;
1264 } 1265 }
1265 1266
1266 } // namespace WebCore 1267 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTable.h ('k') | Source/core/rendering/RenderTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698