| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |