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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp

Issue 1417463003: Move z-index property handling into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again! Created 5 years, 1 month 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 779
780 bool CSSPrimitiveValue::equals(const CSSPrimitiveValue& other) const 780 bool CSSPrimitiveValue::equals(const CSSPrimitiveValue& other) const
781 { 781 {
782 if (type() != other.type()) 782 if (type() != other.type())
783 return false; 783 return false;
784 784
785 switch (type()) { 785 switch (type()) {
786 case UnitType::Unknown: 786 case UnitType::Unknown:
787 return false; 787 return false;
788 case UnitType::Number: 788 case UnitType::Number:
789 case UnitType::Integer:
789 case UnitType::Percentage: 790 case UnitType::Percentage:
790 case UnitType::Ems: 791 case UnitType::Ems:
791 case UnitType::Exs: 792 case UnitType::Exs:
792 case UnitType::Rems: 793 case UnitType::Rems:
793 case UnitType::Pixels: 794 case UnitType::Pixels:
794 case UnitType::Centimeters: 795 case UnitType::Centimeters:
795 case UnitType::DotsPerPixel: 796 case UnitType::DotsPerPixel:
796 case UnitType::DotsPerInch: 797 case UnitType::DotsPerInch:
797 case UnitType::DotsPerCentimeter: 798 case UnitType::DotsPerCentimeter:
798 case UnitType::Millimeters: 799 case UnitType::Millimeters:
(...skipping 11 matching lines...) Expand all
810 case UnitType::ViewportWidth: 811 case UnitType::ViewportWidth:
811 case UnitType::ViewportHeight: 812 case UnitType::ViewportHeight:
812 case UnitType::ViewportMin: 813 case UnitType::ViewportMin:
813 case UnitType::ViewportMax: 814 case UnitType::ViewportMax:
814 case UnitType::Fraction: 815 case UnitType::Fraction:
815 return m_value.num == other.m_value.num; 816 return m_value.num == other.m_value.num;
816 case UnitType::ValueID: 817 case UnitType::ValueID:
817 return m_value.valueID == other.m_value.valueID; 818 return m_value.valueID == other.m_value.valueID;
818 case UnitType::Calc: 819 case UnitType::Calc:
819 return m_value.calc && other.m_value.calc && m_value.calc->equals(*other .m_value.calc); 820 return m_value.calc && other.m_value.calc && m_value.calc->equals(*other .m_value.calc);
820 case UnitType::Integer:
821 case UnitType::Chs: 821 case UnitType::Chs:
822 case UnitType::CalcPercentageWithNumber: 822 case UnitType::CalcPercentageWithNumber:
823 case UnitType::CalcPercentageWithLength: 823 case UnitType::CalcPercentageWithLength:
824 case UnitType::QuirkyEms: 824 case UnitType::QuirkyEms:
825 return false; 825 return false;
826 } 826 }
827 return false; 827 return false;
828 } 828 }
829 829
830 DEFINE_TRACE_AFTER_DISPATCH(CSSPrimitiveValue) 830 DEFINE_TRACE_AFTER_DISPATCH(CSSPrimitiveValue)
831 { 831 {
832 #if ENABLE(OILPAN) 832 #if ENABLE(OILPAN)
833 switch (type()) { 833 switch (type()) {
834 case UnitType::Calc: 834 case UnitType::Calc:
835 visitor->trace(m_value.calc); 835 visitor->trace(m_value.calc);
836 break; 836 break;
837 default: 837 default:
838 break; 838 break;
839 } 839 }
840 #endif 840 #endif
841 CSSValue::traceAfterDispatch(visitor); 841 CSSValue::traceAfterDispatch(visitor);
842 } 842 }
843 843
844 } // namespace blink 844 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698