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

Side by Side Diff: third_party/WebKit/Source/platform/Decimal.cpp

Issue 2048943002: Fix an assertion failure in InputType::applyStep() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 } 1021 }
1022 } 1022 }
1023 return builder.toString(); 1023 return builder.toString();
1024 } 1024 }
1025 1025
1026 Decimal Decimal::zero(Sign sign) 1026 Decimal Decimal::zero(Sign sign)
1027 { 1027 {
1028 return Decimal(EncodedData(sign, EncodedData::ClassZero)); 1028 return Decimal(EncodedData(sign, EncodedData::ClassZero));
1029 } 1029 }
1030 1030
1031 std::ostream& operator<<(std::ostream& ostream, const Decimal& decimal)
1032 {
1033 Decimal::EncodedData data = decimal.value();
1034 return ostream
1035 << "encode(" << String::number(data.coefficient()).ascii().data()
1036 << ", " << String::number(data.exponent()).ascii().data()
1037 << ", " << (data.getSign() == Decimal::Negative ? "Negative" : "Positive ")
1038 << ")=" << decimal.toString().ascii().data();
1039 }
1040
1031 } // namespace blink 1041 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/Decimal.h ('k') | third_party/WebKit/Source/platform/DecimalTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698