Update DCHECKS

This commit is contained in:
Adam Barth
2016-09-15 12:06:53 -07:00
parent 41099a5147
commit 5a040b1445
2 changed files with 3 additions and 3 deletions

View File

@@ -343,7 +343,7 @@ class TextStyle {
int get hashCode => hashValues(hashList(_encoded), _fontFamily, _fontSize, _letterSpacing, _wordSpacing, _height);
String toString() {
return 'TextStyle(${_encoded[0]}|'
return 'TextStyle('
'color: ${ _encoded[0] & 0x0002 == 0x0002 ? new Color(_encoded[1]) : "unspecified"}, '
'decoration: ${ _encoded[0] & 0x0004 == 0x0004 ? new TextDecoration._(_encoded[2]) : "unspecified"}, '
'decorationColor: ${_encoded[0] & 0x0008 == 0x0008 ? new Color(_encoded[3]) : "unspecified"}, '

View File

@@ -147,7 +147,7 @@ void ParagraphBuilder::pushStyle(tonic::Int32List& encoded,
double letterSpacing,
double wordSpacing,
double height) {
FTL_DCHECK(encoded.num_elements() == 7);
FTL_DCHECK(encoded.num_elements() == 8);
RefPtr<RenderStyle> style = RenderStyle::create();
style->inheritFrom(m_currentRenderObject->style());
@@ -241,7 +241,7 @@ ftl::RefPtr<Paragraph> ParagraphBuilder::build(tonic::Int32List& encoded,
const std::string& fontFamily,
double fontSize,
double lineHeight) {
FTL_DCHECK(encoded.num_elements() == 5);
FTL_DCHECK(encoded.num_elements() == 4);
int32_t mask = encoded[0];
if (mask) {