void MediaQueryBlockWatcher::handleToken(const CSSParserToken& token)
{
    if (token.blockType() == CSSParserToken::BlockStart) {
        ++m_blockLevel;
    } else if (token.blockType() == CSSParserToken::BlockEnd) {
        ASSERT(m_blockLevel);
        --m_blockLevel;
    }
}
Exemplo n.º 2
0
void MediaQueryParser::handleBlocks(const CSSParserToken& token)
{
    if (token.blockType() == CSSParserToken::BlockStart
        && (token.type() != LeftParenthesisToken || m_blockWatcher.blockLevel()))
            m_state = SkipUntilBlockEnd;
}
Exemplo n.º 3
0
void MediaQueryParser::skipUntilBlockEnd(CSSParserTokenType type, const CSSParserToken& token)
{
    if (token.blockType() == CSSParserToken::BlockEnd && !m_blockWatcher.blockLevel())
        m_state = SkipUntilComma;
}