コード例 #1
0
void MediaQueryBlockWatcher::handleToken(const MediaQueryToken& token)
{
    if (token.blockType() == MediaQueryToken::BlockStart) {
        ++m_blockLevel;
    } else if (token.blockType() == MediaQueryToken::BlockEnd) {
        ASSERT(m_blockLevel);
        --m_blockLevel;
    }
}
コード例 #2
0
void MediaQueryParser::handleBlocks(const MediaQueryToken& token)
{
    if (token.blockType() == MediaQueryToken::BlockStart
        && (token.type() != LeftParenthesisToken || m_blockWatcher.blockLevel()))
            m_state = SkipUntilBlockEnd;
}
コード例 #3
0
void MediaQueryParser::skipUntilBlockEnd(MediaQueryTokenType type, const MediaQueryToken& token)
{
    if (token.blockType() == MediaQueryToken::BlockEnd && !m_blockWatcher.blockLevel())
        m_state = SkipUntilComma;
}