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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. Created 3 years, 8 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 24 matching lines...) Expand all
35 namespace blink { 35 namespace blink {
36 36
37 CSSGridTemplateAreasValue::CSSGridTemplateAreasValue( 37 CSSGridTemplateAreasValue::CSSGridTemplateAreasValue(
38 const NamedGridAreaMap& gridAreaMap, 38 const NamedGridAreaMap& gridAreaMap,
39 size_t rowCount, 39 size_t rowCount,
40 size_t columnCount) 40 size_t columnCount)
41 : CSSValue(GridTemplateAreasClass), 41 : CSSValue(GridTemplateAreasClass),
42 m_gridAreaMap(gridAreaMap), 42 m_gridAreaMap(gridAreaMap),
43 m_rowCount(rowCount), 43 m_rowCount(rowCount),
44 m_columnCount(columnCount) { 44 m_columnCount(columnCount) {
45 ASSERT(m_rowCount); 45 DCHECK(m_rowCount);
46 ASSERT(m_columnCount); 46 DCHECK(m_columnCount);
47 } 47 }
48 48
49 static String stringForPosition(const NamedGridAreaMap& gridAreaMap, 49 static String stringForPosition(const NamedGridAreaMap& gridAreaMap,
50 size_t row, 50 size_t row,
51 size_t column) { 51 size_t column) {
52 for (const auto& item : gridAreaMap) { 52 for (const auto& item : gridAreaMap) {
53 const GridArea& area = item.value; 53 const GridArea& area = item.value;
54 if (row >= area.rows.startLine() && row < area.rows.endLine() && 54 if (row >= area.rows.startLine() && row < area.rows.endLine() &&
55 column >= area.columns.startLine() && column < area.columns.endLine()) 55 column >= area.columns.startLine() && column < area.columns.endLine())
56 return item.key; 56 return item.key;
(...skipping 18 matching lines...) Expand all
75 return builder.toString(); 75 return builder.toString();
76 } 76 }
77 77
78 bool CSSGridTemplateAreasValue::equals( 78 bool CSSGridTemplateAreasValue::equals(
79 const CSSGridTemplateAreasValue& other) const { 79 const CSSGridTemplateAreasValue& other) const {
80 return m_gridAreaMap == other.m_gridAreaMap && 80 return m_gridAreaMap == other.m_gridAreaMap &&
81 m_rowCount == other.m_rowCount && m_columnCount == other.m_columnCount; 81 m_rowCount == other.m_rowCount && m_columnCount == other.m_columnCount;
82 } 82 }
83 83
84 } // namespace blink 84 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGridAutoRepeatValue.h ('k') | third_party/WebKit/Source/core/css/CSSGroupingRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698