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

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

Issue 16183002: Unprefix CSS Variables (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased and updated prefix test Created 7 years, 6 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
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 { 587 {
588 return adoptRef(new MutableStylePropertySet(properties, count)); 588 return adoptRef(new MutableStylePropertySet(properties, count));
589 } 589 }
590 590
591 String StylePropertySet::PropertyReference::cssName() const 591 String StylePropertySet::PropertyReference::cssName() const
592 { 592 {
593 if (id() == CSSPropertyVariable) { 593 if (id() == CSSPropertyVariable) {
594 ASSERT(propertyValue()->isVariableValue()); 594 ASSERT(propertyValue()->isVariableValue());
595 if (!propertyValue()->isVariableValue()) 595 if (!propertyValue()->isVariableValue())
596 return emptyString(); // Should not happen, but if it does, avoid a bad cast. 596 return emptyString(); // Should not happen, but if it does, avoid a bad cast.
597 return "-webkit-var-" + static_cast<const CSSVariableValue*>(propertyVal ue())->name(); 597 return "var-" + static_cast<const CSSVariableValue*>(propertyValue())->n ame();
598 } 598 }
599 return getPropertyNameString(id()); 599 return getPropertyNameString(id());
600 } 600 }
601 601
602 String StylePropertySet::PropertyReference::cssText() const 602 String StylePropertySet::PropertyReference::cssText() const
603 { 603 {
604 StringBuilder result; 604 StringBuilder result;
605 result.append(cssName()); 605 result.append(cssName());
606 result.appendLiteral(": "); 606 result.appendLiteral(": ");
607 result.append(propertyValue()->cssText()); 607 result.append(propertyValue()->cssText());
608 if (isImportant()) 608 if (isImportant())
609 result.appendLiteral(" !important"); 609 result.appendLiteral(" !important");
610 result.append(';'); 610 result.append(';');
611 return result.toString(); 611 return result.toString();
612 } 612 }
613 613
614 614
615 } // namespace WebCore 615 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698