#include "wtf/text/StringHash.h"
#include <limits.h>
-namespace WebCore {
+namespace blink {
MediaQueryToken::MediaQueryToken(MediaQueryTokenType type, BlockType blockType)
return String(" ");
if (m_delimiter) {
- sprintf(buffer, "%c", m_delimiter);
+ sprintf(buffer, "'%c'", m_delimiter);
return String(buffer, strlen(buffer));
}
if (m_numericValue) {
- static const unsigned maxUnitBufferLength = 5;
+ static const unsigned maxUnitBufferLength = 6;
char unitBuffer[maxUnitBufferLength] = {0};
if (m_unit == CSSPrimitiveValue::CSS_PERCENTAGE)
sprintf(unitBuffer, "%s", "%");
sprintf(unitBuffer, "%s", "px");
else if (m_unit == CSSPrimitiveValue::CSS_EMS)
sprintf(unitBuffer, "%s", "em");
+ else if (m_unit != CSSPrimitiveValue::CSS_NUMBER)
+ sprintf(unitBuffer, "%s", "other");
if (m_numericValueType == IntegerValueType)
sprintf(buffer, "%d%s", static_cast<int>(m_numericValue), unitBuffer);
else
return m_numericValue;
}
-} // namespace WebCore
+} // namespace blink