[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
apavlov at chromium.org
apavlov at chromium.org
Wed Dec 22 16:29:57 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 49035d32d6c6cb2c0c34a3b792d3ac6b6d858c3a
Author: apavlov at chromium.org <apavlov at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 24 18:45:53 2010 +0000
2010-11-24 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
Web Inspector: Crash when inspecting http://alphaarnhem.nl/beta/
https://bugs.webkit.org/show_bug.cgi?id=50025
@font-face rules were improperly handled by source data extractor.
WebCore:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::markRuleBodyStart):
(WebCore::CSSParser::markPropertyStart):
(WebCore::CSSParser::markPropertyEnd):
* css/CSSParser.h:
LayoutTests:
* inspector/resources/styles-new-API-1.css:
(@font-face):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index de19485..5ccead7 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-24 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Crash when inspecting http://alphaarnhem.nl/beta/
+ https://bugs.webkit.org/show_bug.cgi?id=50025
+
+ * inspector/resources/styles-new-API-1.css:
+ (@font-face):
+
2010-11-24 Cris Neckar <cdn at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/inspector/resources/styles-new-API-1.css b/LayoutTests/inspector/resources/styles-new-API-1.css
index 7679ae8..a36b137 100755
--- a/LayoutTests/inspector/resources/styles-new-API-1.css
+++ b/LayoutTests/inspector/resources/styles-new-API-1.css
@@ -9,6 +9,13 @@
#absent-id {
}
+ at font-face {
+ font-family: 'TheFont';
+ src: url('font.url');
+ font-weight: normal;
+ font-style: normal;
+}
+
body {
property: imported-media-screen-stylesheet;
}
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a3cfe54..c83eb20 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-24 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Crash when inspecting http://alphaarnhem.nl/beta/
+ https://bugs.webkit.org/show_bug.cgi?id=50025
+
+ @font-face rules were improperly handled by source data extractor.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::CSSParser):
+ (WebCore::CSSParser::parseDeclaration):
+ (WebCore::CSSParser::createStyleRule):
+ (WebCore::CSSParser::markRuleBodyStart):
+ (WebCore::CSSParser::markPropertyStart):
+ (WebCore::CSSParser::markPropertyEnd):
+ * css/CSSParser.h:
+
2010-11-24 Cris Neckar <cdn at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index 3d22897..487512b 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -141,6 +141,7 @@ CSSParser::CSSParser(bool strictParsing)
, m_hasFontFaceOnlyValues(false)
, m_hadSyntacticallyValidCSSRule(false)
, m_defaultNamespace(starAtom)
+ , m_inStyleRuleOrDeclaration(false)
, m_selectorListRange(0, 0)
, m_ruleBodyRange(0, 0)
, m_propertyRange(UINT_MAX, UINT_MAX)
@@ -341,6 +342,7 @@ bool CSSParser::parseDeclaration(CSSMutableStyleDeclaration* declaration, const
if (styleSourceData) {
m_currentRuleData = CSSRuleSourceData::create();
m_currentRuleData->styleSourceData = CSSStyleSourceData::create();
+ m_inStyleRuleOrDeclaration = true;
}
setupParser("@-webkit-decls{", string, "} ");
@@ -368,6 +370,7 @@ bool CSSParser::parseDeclaration(CSSMutableStyleDeclaration* declaration, const
if (styleSourceData) {
*styleSourceData = m_currentRuleData->styleSourceData.release();
m_currentRuleData = 0;
+ m_inStyleRuleOrDeclaration = false;
}
return ok;
}
@@ -5474,6 +5477,7 @@ CSSRule* CSSParser::createStyleRule(Vector<CSSSelector*>* selectors)
m_ruleRangeMap->set(result, m_currentRuleData.release());
m_currentRuleData = CSSRuleSourceData::create();
m_currentRuleData->styleSourceData = CSSStyleSourceData::create();
+ m_inStyleRuleOrDeclaration = false;
}
}
resetSelectorListMarks();
@@ -5627,6 +5631,7 @@ void CSSParser::markRuleBodyStart()
++offset; // Skip the rule body opening brace.
if (offset > m_ruleBodyRange.start)
m_ruleBodyRange.start = offset;
+ m_inStyleRuleOrDeclaration = true;
}
void CSSParser::markRuleBodyEnd()
@@ -5638,11 +5643,15 @@ void CSSParser::markRuleBodyEnd()
void CSSParser::markPropertyStart()
{
+ if (!m_inStyleRuleOrDeclaration)
+ return;
m_propertyRange.start = yytext - m_data;
}
void CSSParser::markPropertyEnd(bool isImportantFound, bool isPropertyParsed)
{
+ if (!m_inStyleRuleOrDeclaration)
+ return;
unsigned offset = yytext - m_data;
if (*yytext == ';') // Include semicolon into the property text.
++offset;
diff --git a/WebCore/css/CSSParser.h b/WebCore/css/CSSParser.h
index 1da20b7..acf97f2 100644
--- a/WebCore/css/CSSParser.h
+++ b/WebCore/css/CSSParser.h
@@ -230,6 +230,7 @@ namespace WebCore {
AtomicString m_defaultNamespace;
// tokenizer methods and data
+ bool m_inStyleRuleOrDeclaration;
SourceRange m_selectorListRange;
SourceRange m_ruleBodyRange;
SourceRange m_propertyRange;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list