OLD | NEW |
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. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
8 * All rights reserved. | 8 * All rights 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // the same type disagree. | 556 // the same type disagree. |
557 static bool CompareBorders(const CollapsedBorderValue& border1, | 557 static bool CompareBorders(const CollapsedBorderValue& border1, |
558 const CollapsedBorderValue& border2) { | 558 const CollapsedBorderValue& border2) { |
559 // Sanity check the values passed in. The null border have lowest priority. | 559 // Sanity check the values passed in. The null border have lowest priority. |
560 if (!border2.Exists()) | 560 if (!border2.Exists()) |
561 return false; | 561 return false; |
562 if (!border1.Exists()) | 562 if (!border1.Exists()) |
563 return true; | 563 return true; |
564 | 564 |
565 // Rule #1 above. | 565 // Rule #1 above. |
566 if (border1.Style() == kBorderStyleHidden) | 566 if (border1.Style() == EBorderStyle::kHidden) |
567 return false; | 567 return false; |
568 if (border2.Style() == kBorderStyleHidden) | 568 if (border2.Style() == EBorderStyle::kHidden) |
569 return true; | 569 return true; |
570 | 570 |
571 // Rule #2 above. A style of 'none' has lowest priority and always loses to | 571 // Rule #2 above. A style of 'none' has lowest priority and always loses to |
572 // any other border. | 572 // any other border. |
573 if (border2.Style() == kBorderStyleNone) | 573 if (border2.Style() == EBorderStyle::kNone) |
574 return false; | 574 return false; |
575 if (border1.Style() == kBorderStyleNone) | 575 if (border1.Style() == EBorderStyle::kNone) |
576 return true; | 576 return true; |
577 | 577 |
578 // The first part of rule #3 above. Wider borders win. | 578 // The first part of rule #3 above. Wider borders win. |
579 if (border1.Width() != border2.Width()) | 579 if (border1.Width() != border2.Width()) |
580 return border1.Width() < border2.Width(); | 580 return border1.Width() < border2.Width(); |
581 | 581 |
582 // The borders have equal width. Sort by border style. | 582 // The borders have equal width. Sort by border style. |
583 if (border1.Style() != border2.Style()) | 583 if (border1.Style() != border2.Style()) |
584 return border1.Style() < border2.Style(); | 584 return border1.Style() < border2.Style(); |
585 | 585 |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1495 | 1495 |
1496 return LayoutBlock::HasLineIfEmpty(); | 1496 return LayoutBlock::HasLineIfEmpty(); |
1497 } | 1497 } |
1498 | 1498 |
1499 PaintInvalidationReason LayoutTableCell::InvalidatePaint( | 1499 PaintInvalidationReason LayoutTableCell::InvalidatePaint( |
1500 const PaintInvalidatorContext& context) const { | 1500 const PaintInvalidatorContext& context) const { |
1501 return TableCellPaintInvalidator(*this, context).InvalidatePaint(); | 1501 return TableCellPaintInvalidator(*this, context).InvalidatePaint(); |
1502 } | 1502 } |
1503 | 1503 |
1504 } // namespace blink | 1504 } // namespace blink |
OLD | NEW |