summaryrefslogtreecommitdiffstats
path: root/WebCore/css/CSSParser.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/css/CSSParser.h')
-rw-r--r--WebCore/css/CSSParser.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/WebCore/css/CSSParser.h b/WebCore/css/CSSParser.h
index d1a5a43..271e98e 100644
--- a/WebCore/css/CSSParser.h
+++ b/WebCore/css/CSSParser.h
@@ -28,6 +28,7 @@
#include "CSSParserValues.h"
#include "CSSSelectorList.h"
#include "MediaQuery.h"
+#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/Vector.h>
@@ -39,6 +40,7 @@ namespace WebCore {
class CSSRule;
class CSSRuleList;
class CSSSelector;
+ class CSSStyleRule;
class CSSStyleSheet;
class CSSValue;
class CSSValueList;
@@ -53,10 +55,12 @@ namespace WebCore {
class CSSParser {
public:
+ typedef HashMap<CSSStyleRule*, std::pair<unsigned, unsigned> > StyleRuleRanges;
+
CSSParser(bool strictParsing = true);
~CSSParser();
- void parseSheet(CSSStyleSheet*, const String&);
+ void parseSheet(CSSStyleSheet*, const String&, StyleRuleRanges* ruleRangeMap = 0);
PassRefPtr<CSSRule> parseRule(CSSStyleSheet*, const String&);
PassRefPtr<CSSRule> parseKeyframeRule(CSSStyleSheet*, const String&);
bool parseValue(CSSMutableStyleDeclaration*, int propId, const String&, bool important);
@@ -207,7 +211,7 @@ namespace WebCore {
Vector<CSSSelector*>* reusableSelectorVector() { return &m_reusableSelectorVector; }
- void updateLastSelectorLine() { m_lastSelectorLine = m_line; }
+ void updateLastSelectorLineAndPosition();
void clearProperties();
@@ -238,6 +242,12 @@ namespace WebCore {
AtomicString m_defaultNamespace;
// tokenizer methods and data
+ unsigned m_ruleBodyStartOffset;
+ unsigned m_ruleBodyEndOffset;
+ StyleRuleRanges* m_ruleRanges;
+ void markRuleBodyStart();
+ void markRuleBodyEnd();
+ void resetRuleBodyMarks() { m_ruleBodyStartOffset = m_ruleBodyEndOffset = 0; }
int lex(void* yylval);
int token() { return yyTok; }
UChar* text(int* length);