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

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

Issue 2880573002: Store border-*-style on SurroundData in ComputedStyle (Closed)
Patch Set: Store border-*-style on SurroundData in ComputedStyle not BorderStyle 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 // the same type disagree. 544 // the same type disagree.
545 static bool CompareBorders(const CollapsedBorderValue& border1, 545 static bool CompareBorders(const CollapsedBorderValue& border1,
546 const CollapsedBorderValue& border2) { 546 const CollapsedBorderValue& border2) {
547 // Sanity check the values passed in. The null border have lowest priority. 547 // Sanity check the values passed in. The null border have lowest priority.
548 if (!border2.Exists()) 548 if (!border2.Exists())
549 return false; 549 return false;
550 if (!border1.Exists()) 550 if (!border1.Exists())
551 return true; 551 return true;
552 552
553 // Rule #1 above. 553 // Rule #1 above.
554 if (border1.Style() == kBorderStyleHidden) 554 if (border1.Style() == EBorderStyle::kHidden)
555 return false; 555 return false;
556 if (border2.Style() == kBorderStyleHidden) 556 if (border2.Style() == EBorderStyle::kHidden)
557 return true; 557 return true;
558 558
559 // Rule #2 above. A style of 'none' has lowest priority and always loses to 559 // Rule #2 above. A style of 'none' has lowest priority and always loses to
560 // any other border. 560 // any other border.
561 if (border2.Style() == kBorderStyleNone) 561 if (border2.Style() == EBorderStyle::kNone)
562 return false; 562 return false;
563 if (border1.Style() == kBorderStyleNone) 563 if (border1.Style() == EBorderStyle::kNone)
564 return true; 564 return true;
565 565
566 // The first part of rule #3 above. Wider borders win. 566 // The first part of rule #3 above. Wider borders win.
567 if (border1.Width() != border2.Width()) 567 if (border1.Width() != border2.Width())
568 return border1.Width() < border2.Width(); 568 return border1.Width() < border2.Width();
569 569
570 // The borders have equal width. Sort by border style. 570 // The borders have equal width. Sort by border style.
571 if (border1.Style() != border2.Style()) 571 if (border1.Style() != border2.Style())
572 return border1.Style() < border2.Style(); 572 return border1.Style() < border2.Style();
573 573
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 1483
1484 return LayoutBlock::HasLineIfEmpty(); 1484 return LayoutBlock::HasLineIfEmpty();
1485 } 1485 }
1486 1486
1487 PaintInvalidationReason LayoutTableCell::InvalidatePaint( 1487 PaintInvalidationReason LayoutTableCell::InvalidatePaint(
1488 const PaintInvalidatorContext& context) const { 1488 const PaintInvalidatorContext& context) const {
1489 return TableCellPaintInvalidator(*this, context).InvalidatePaint(); 1489 return TableCellPaintInvalidator(*this, context).InvalidatePaint();
1490 } 1490 }
1491 1491
1492 } // namespace blink 1492 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698