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

Side by Side Diff: Source/core/css/CSSContentDistributionValue.cpp

Issue 636993002: [CSS Grid Layout] Upgrade justify-content parsing to CSS3 Box Alignment spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaseline some tests expectations. Created 6 years, 1 month 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
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/css/CSSContentDistributionValue.h"
7
8 #include "core/css/CSSValueList.h"
9 #include "wtf/text/StringBuilder.h"
10
11 namespace blink {
12
13 CSSContentDistributionValue::CSSContentDistributionValue(CSSValueID distribution , CSSValueID position, CSSValueID overflow)
14 : CSSValue(CSSContentDistributionClass)
15 , m_distribution(distribution)
16 , m_position(position)
17 , m_overflow(overflow)
18 {
19 }
20
21 CSSContentDistributionValue::~CSSContentDistributionValue()
22 {
23 }
24
25 String CSSContentDistributionValue::customCSSText() const
26 {
27 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated() ;
28
29 if (m_distribution != CSSValueInvalid)
30 list->append(distribution());
31 if (m_position != CSSValueInvalid)
32 list->append(position());
33 if (m_overflow != CSSValueInvalid)
34 list->append(overflow());
35
36 return list.release()->customCSSText();
37 }
38
39 bool CSSContentDistributionValue::equals(const CSSContentDistributionValue& othe r) const
40 {
41 return m_distribution == other.m_distribution && m_position == other.m_posit ion && m_overflow == other.m_overflow;
42 }
43
44 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSContentDistributionValue.h ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698