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

Unified Diff: Source/core/rendering/style/GridCoordinate.h

Issue 18532004: Implement 'grid-template' parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined and updated after Ojan's and Elliott's comments Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/UseCounter.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/GridCoordinate.h
diff --git a/Source/core/rendering/style/GridCoordinate.h b/Source/core/rendering/style/GridCoordinate.h
index a55b7fb79ae705980ce250cfbf3fcb6578c36670..ec0d890a43bafffc23d2e0e630d1228960b9f8b8 100644
--- a/Source/core/rendering/style/GridCoordinate.h
+++ b/Source/core/rendering/style/GridCoordinate.h
@@ -31,7 +31,9 @@
#ifndef GridCoordinate_h
#define GridCoordinate_h
+#include "wtf/HashMap.h"
#include "wtf/PassOwnPtr.h"
+#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -51,6 +53,11 @@ struct GridSpan {
ASSERT(initialPositionIndex <= finalPositionIndex);
}
+ bool operator==(const GridSpan& o) const
+ {
+ return initialPositionIndex == o.initialPositionIndex && finalPositionIndex == o.finalPositionIndex;
+ }
+
size_t initialPositionIndex;
size_t finalPositionIndex;
};
@@ -70,10 +77,22 @@ struct GridCoordinate {
{
}
+ bool operator==(const GridCoordinate& o) const
+ {
+ return columns == o.columns && rows == o.rows;
+ }
+
+ bool operator!=(const GridCoordinate& o) const
+ {
+ return !(*this == o);
+ }
+
GridSpan columns;
GridSpan rows;
};
+typedef HashMap<String, GridCoordinate> NamedGridAreaMap;
+
} // namespace WebCore
#endif // GridCoordinate_h
« no previous file with comments | « Source/core/page/UseCounter.cpp ('k') | Source/core/rendering/style/RenderStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698