| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
| 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
| 10 * | 10 * |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 #include "sky/engine/core/css/CSSTransformValue.h" | 56 #include "sky/engine/core/css/CSSTransformValue.h" |
| 57 #include "sky/engine/core/css/CSSUnicodeRangeValue.h" | 57 #include "sky/engine/core/css/CSSUnicodeRangeValue.h" |
| 58 #include "sky/engine/core/css/CSSValueList.h" | 58 #include "sky/engine/core/css/CSSValueList.h" |
| 59 #include "sky/engine/core/css/CSSValuePool.h" | 59 #include "sky/engine/core/css/CSSValuePool.h" |
| 60 #include "sky/engine/core/css/HashTools.h" | 60 #include "sky/engine/core/css/HashTools.h" |
| 61 #include "sky/engine/core/css/Pair.h" | 61 #include "sky/engine/core/css/Pair.h" |
| 62 #include "sky/engine/core/css/Rect.h" | 62 #include "sky/engine/core/css/Rect.h" |
| 63 #include "sky/engine/core/css/parser/BisonCSSParser.h" | 63 #include "sky/engine/core/css/parser/BisonCSSParser.h" |
| 64 #include "sky/engine/core/css/parser/CSSParserIdioms.h" | 64 #include "sky/engine/core/css/parser/CSSParserIdioms.h" |
| 65 #include "sky/engine/core/css/parser/CSSParserValues.h" | 65 #include "sky/engine/core/css/parser/CSSParserValues.h" |
| 66 #include "sky/engine/core/frame/UseCounter.h" | |
| 67 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" | 66 #include "sky/engine/core/html/parser/HTMLParserIdioms.h" |
| 68 #include "sky/engine/platform/FloatConversion.h" | 67 #include "sky/engine/platform/FloatConversion.h" |
| 69 #include "sky/engine/wtf/BitArray.h" | 68 #include "sky/engine/wtf/BitArray.h" |
| 70 #include "sky/engine/wtf/HexNumber.h" | 69 #include "sky/engine/wtf/HexNumber.h" |
| 71 #include "sky/engine/wtf/text/StringBuffer.h" | 70 #include "sky/engine/wtf/text/StringBuffer.h" |
| 72 #include "sky/engine/wtf/text/StringBuilder.h" | 71 #include "sky/engine/wtf/text/StringBuilder.h" |
| 73 #include "sky/engine/wtf/text/StringImpl.h" | 72 #include "sky/engine/wtf/text/StringImpl.h" |
| 74 #include "sky/engine/wtf/text/TextEncoding.h" | 73 #include "sky/engine/wtf/text/TextEncoding.h" |
| 75 | 74 |
| 76 namespace blink { | 75 namespace blink { |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 const CSSPropertyID* longhands = shorthand.properties(); | 393 const CSSPropertyID* longhands = shorthand.properties(); |
| 395 for (unsigned i = 0; i < shorthandLength; ++i) | 394 for (unsigned i = 0; i < shorthandLength; ++i) |
| 396 addProperty(longhands[i], value); | 395 addProperty(longhands[i], value); |
| 397 } | 396 } |
| 398 | 397 |
| 399 bool CSSPropertyParser::parseValue(CSSPropertyID propId) | 398 bool CSSPropertyParser::parseValue(CSSPropertyID propId) |
| 400 { | 399 { |
| 401 if (!isInternalPropertyAndValueParsingEnabledForMode(m_context.mode()) && is
InternalProperty(propId)) | 400 if (!isInternalPropertyAndValueParsingEnabledForMode(m_context.mode()) && is
InternalProperty(propId)) |
| 402 return false; | 401 return false; |
| 403 | 402 |
| 404 // We don't count the UA style sheet in our statistics. | |
| 405 if (m_context.useCounter()) | |
| 406 m_context.useCounter()->count(m_context, propId); | |
| 407 | |
| 408 if (!m_valueList) | 403 if (!m_valueList) |
| 409 return false; | 404 return false; |
| 410 | 405 |
| 411 CSSParserValue* value = m_valueList->current(); | 406 CSSParserValue* value = m_valueList->current(); |
| 412 | 407 |
| 413 if (!value) | 408 if (!value) |
| 414 return false; | 409 return false; |
| 415 | 410 |
| 416 if (inViewport()) { | 411 if (inViewport()) { |
| 417 // Allow @viewport rules from UA stylesheets even if the feature is disa
bled. | 412 // Allow @viewport rules from UA stylesheets even if the feature is disa
bled. |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 if (!list) | 591 if (!list) |
| 597 list = CSSValueList::createCommaSeparated(); | 592 list = CSSValueList::createCommaSeparated(); |
| 598 | 593 |
| 599 if (image) | 594 if (image) |
| 600 list->append(CSSCursorImageValue::create(image, hasHotSpot, hotS
pot)); | 595 list->append(CSSCursorImageValue::create(image, hasHotSpot, hotS
pot)); |
| 601 | 596 |
| 602 if (!consumeComma(m_valueList)) | 597 if (!consumeComma(m_valueList)) |
| 603 return false; | 598 return false; |
| 604 value = m_valueList->current(); | 599 value = m_valueList->current(); |
| 605 } | 600 } |
| 606 if (value && m_context.useCounter()) { | |
| 607 if (value->id == CSSValueWebkitZoomIn) | |
| 608 m_context.useCounter()->count(UseCounter::PrefixedCursorZoomIn); | |
| 609 else if (value->id == CSSValueWebkitZoomOut) | |
| 610 m_context.useCounter()->count(UseCounter::PrefixedCursorZoomOut)
; | |
| 611 } | |
| 612 if (list) { | 601 if (list) { |
| 613 if (!value) | 602 if (!value) |
| 614 return false; | 603 return false; |
| 615 if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibi
lity :/ | 604 if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibi
lity :/ |
| 616 list->append(cssValuePool().createIdentifierValue(CSSValuePointe
r)); | 605 list->append(cssValuePool().createIdentifierValue(CSSValuePointe
r)); |
| 617 else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitZo
omOut) || value->id == CSSValueCopy || value->id == CSSValueNone) | 606 else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitZo
omOut) || value->id == CSSValueCopy || value->id == CSSValueNone) |
| 618 list->append(cssValuePool().createIdentifierValue(value->id)); | 607 list->append(cssValuePool().createIdentifierValue(value->id)); |
| 619 m_valueList->next(); | 608 m_valueList->next(); |
| 620 parsedValue = list.release(); | 609 parsedValue = list.release(); |
| 621 break; | 610 break; |
| (...skipping 5521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6143 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 6132 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 6144 } | 6133 } |
| 6145 | 6134 |
| 6146 bool CSSPropertyParser::isSystemColor(int id) | 6135 bool CSSPropertyParser::isSystemColor(int id) |
| 6147 { | 6136 { |
| 6148 // FIXME(sky): remove | 6137 // FIXME(sky): remove |
| 6149 return false; | 6138 return false; |
| 6150 } | 6139 } |
| 6151 | 6140 |
| 6152 } // namespace blink | 6141 } // namespace blink |
| OLD | NEW |