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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp

Issue 2890733002: Make EBorderStyle an enum class. (Closed)
Patch Set: Build for Mac Created 3 years, 7 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
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. 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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTable.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698