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

Side by Side Diff: Source/core/rendering/style/StyleGridData.h

Issue 14786002: Allow defining named grid lines on the grid element (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 13 matching lines...) Expand all
24 */ 24 */
25 25
26 #ifndef StyleGridData_h 26 #ifndef StyleGridData_h
27 #define StyleGridData_h 27 #define StyleGridData_h
28 28
29 #include "core/rendering/style/GridTrackSize.h" 29 #include "core/rendering/style/GridTrackSize.h"
30 #include "core/rendering/style/RenderStyleConstants.h" 30 #include "core/rendering/style/RenderStyleConstants.h"
31 #include <wtf/PassRefPtr.h> 31 #include <wtf/PassRefPtr.h>
32 #include <wtf/RefCounted.h> 32 #include <wtf/RefCounted.h>
33 #include <wtf/Vector.h> 33 #include <wtf/Vector.h>
34 #include <wtf/text/WTFString.h>
34 35
35 namespace WebCore { 36 namespace WebCore {
36 37
38 typedef HashMap<String, Vector<size_t> > NamedGridLinesMapping;
39
esprehn 2013/05/03 21:45:58 NamedGridLinesMap to be consistent with other usag
Julien - ping for review 2013/05/06 16:22:33 Will be changed.
37 class StyleGridData : public RefCounted<StyleGridData> { 40 class StyleGridData : public RefCounted<StyleGridData> {
38 public: 41 public:
39 static PassRefPtr<StyleGridData> create() { return adoptRef(new StyleGridDat a); } 42 static PassRefPtr<StyleGridData> create() { return adoptRef(new StyleGridDat a); }
40 PassRefPtr<StyleGridData> copy() const { return adoptRef(new StyleGridData(* this)); } 43 PassRefPtr<StyleGridData> copy() const { return adoptRef(new StyleGridData(* this)); }
41 44
42 bool operator==(const StyleGridData& o) const 45 bool operator==(const StyleGridData& o) const
43 { 46 {
44 return m_gridColumns == o.m_gridColumns && m_gridRows == o.m_gridRows && m_gridAutoFlow == o.m_gridAutoFlow && m_gridAutoRows == o.m_gridAutoRows && m_g ridAutoColumns == o.m_gridAutoColumns; 47 return m_gridColumns == o.m_gridColumns && m_gridRows == o.m_gridRows && m_gridAutoFlow == o.m_gridAutoFlow && m_gridAutoRows == o.m_gridAutoRows && m_g ridAutoColumns == o.m_gridAutoColumns && m_namedGridColumnLines == o.m_namedGrid ColumnLines && m_namedGridRowLines == o.m_namedGridRowLines;
45 } 48 }
46 49
47 bool operator!=(const StyleGridData& o) const 50 bool operator!=(const StyleGridData& o) const
48 { 51 {
49 return !(*this == o); 52 return !(*this == o);
50 } 53 }
51 54
52 // FIXME: Update the naming of the following variables. 55 // FIXME: Update the naming of the following variables.
53 Vector<GridTrackSize> m_gridColumns; 56 Vector<GridTrackSize> m_gridColumns;
54 Vector<GridTrackSize> m_gridRows; 57 Vector<GridTrackSize> m_gridRows;
55 58
59 NamedGridLinesMapping m_namedGridColumnLines;
60 NamedGridLinesMapping m_namedGridRowLines;
61
56 GridAutoFlow m_gridAutoFlow; 62 GridAutoFlow m_gridAutoFlow;
57 63
58 GridTrackSize m_gridAutoRows; 64 GridTrackSize m_gridAutoRows;
59 GridTrackSize m_gridAutoColumns; 65 GridTrackSize m_gridAutoColumns;
60 66
61 private: 67 private:
62 StyleGridData(); 68 StyleGridData();
63 StyleGridData(const StyleGridData&); 69 StyleGridData(const StyleGridData&);
64 }; 70 };
65 71
66 } // namespace WebCore 72 } // namespace WebCore
67 73
68 #endif // StyleGridData_h 74 #endif // StyleGridData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698