Diff
Modified: trunk/LayoutTests/ChangeLog (181388 => 181389)
--- trunk/LayoutTests/ChangeLog 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/LayoutTests/ChangeLog 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1,3 +1,18 @@
+2015-03-11 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r181367.
+ https://bugs.webkit.org/show_bug.cgi?id=142581
+
+ Caused crashes on the debug bots (Requested by cdumez on
+ #webkit).
+
+ Reverted changeset:
+
+ "Web Inspector: CSS parser errors in the console should
+ include column numbers"
+ https://bugs.webkit.org/show_bug.cgi?id=114313
+ http://trac.webkit.org/changeset/181367
+
2015-03-11 Myles C. Maxfield <mmaxfi...@apple.com>
Inline block children do not have correct baselines if their children are also block elements
Deleted: trunk/LayoutTests/inspector-protocol/console/warnings-errors-expected.txt (181388 => 181389)
--- trunk/LayoutTests/inspector-protocol/console/warnings-errors-expected.txt 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/LayoutTests/inspector-protocol/console/warnings-errors-expected.txt 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1,25 +0,0 @@
-CONSOLE MESSAGE: line 1: error script
-CONSOLE MESSAGE: line 1: warn script
-CONSOLE MESSAGE: line 5: error script
-CONSOLE MESSAGE: line 6: warn script
-CONSOLE MESSAGE: line 15: TypeError: undefined is not an object (evaluating '[].x.x')
-CONSOLE MESSAGE: line 17: warn 1
-CONSOLE MESSAGE: line 17: error 1
-CONSOLE MESSAGE: line 18: error 2
-Tests that CSS/_javascript_ errors and warnings are sent to the console with line and column information.
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"warnings-errors.html:5:20"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"warnings-errors.html:6:14"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"warnings-errors.html:7:7"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"warnings-errors.html:9:8"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:1:7"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:1:29"}
-{"source":"css","level":"warning","text":"Invalid CSS property declaration at: *","location":"errors.css:4:5"}
-{"source":"console-api","level":"error","text":"error script","location":"errors.js:1:14","parameters":[{"type":"string"}]}
-{"source":"console-api","level":"warning","text":"warn script","location":"errors.js:1:44","parameters":[{"type":"string"}]}
-{"source":"console-api","level":"error","text":"error script","location":"errors.js:5:18","parameters":[{"type":"string"}]}
-{"source":"console-api","level":"warning","text":"warn script","location":"errors.js:6:17","parameters":[{"type":"string"}]}
-{"source":"_javascript_","level":"error","text":"TypeError: undefined is not an object (evaluating '[].x.x')","location":"warnings-errors.html:15:18"}
-{"source":"console-api","level":"warning","text":"warn 1","location":"warnings-errors.html:17:13","parameters":[{"type":"string"}]}
-{"source":"console-api","level":"error","text":"error 1","location":"warnings-errors.html:17:38","parameters":[{"type":"string"}]}
-{"source":"console-api","level":"error","text":"error 2","location":"warnings-errors.html:18:17","parameters":[{"type":"string"}]}
-
Deleted: trunk/LayoutTests/inspector-protocol/console/warnings-errors.html (181388 => 181389)
--- trunk/LayoutTests/inspector-protocol/console/warnings-errors.html 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/LayoutTests/inspector-protocol/console/warnings-errors.html 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1,46 +0,0 @@
-<html>
-<head>
-<script type="text/_javascript_" src=""
-<link rel="stylesheet" href=""
- <style> div { * color: red; }</style>
-<style>div { * color: red; }
-div { * color: red; }
- div {
- *
- color:
- red;
- }
-</style>
-<script src="" type="text/_javascript_" charset="utf-8"></script>
- <script> [].x.x </script>
-<script>
-console.warn("warn 1"); console.error("error 1");
- console.error("error 2");
-</script>
-<script>
-function test()
-{
- InspectorTest.importScript("../../../../inspector-protocol/resources/console-helper.js");
-
- InspectorTest.sendCommand("Console.enable", {});
-
- var consoleMessageCount = 0;
- const expectedConsoleMessages = 15;
-
- InspectorTest.eventHandler["Console.messageAdded"] = function(messageObject)
- {
- var simplifiedMessage = ConsoleHelper.simplifiedConsoleMessage(messageObject);
- InspectorTest.log(JSON.stringify(simplifiedMessage));
-
- if (++consoleMessageCount === expectedConsoleMessages)
- InspectorTest.completeTest();
- }
-}
-</script>
-</head>
-<body _onload_="runTest()">
-<p>
-Tests that CSS/_javascript_ errors and warnings are sent to the console with line and column information.<br>
-</p>
-</body>
-</html>
Deleted: trunk/LayoutTests/inspector-protocol/resources/errors.css (181388 => 181389)
--- trunk/LayoutTests/inspector-protocol/resources/errors.css 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/LayoutTests/inspector-protocol/resources/errors.css 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1,7 +0,0 @@
-div { * color: red; } div { * color: red; }
-
-div {
- *
- color:
- red;
-}
Deleted: trunk/LayoutTests/inspector-protocol/resources/errors.js (181388 => 181389)
--- trunk/LayoutTests/inspector-protocol/resources/errors.js 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/LayoutTests/inspector-protocol/resources/errors.js 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1,9 +0,0 @@
-console.error("error script"); console.warn("warn script");
-
-
-function foo() {
- console.error("error script");
- console.warn("warn script");
-}
-
-foo();
Modified: trunk/Source/WebCore/ChangeLog (181388 => 181389)
--- trunk/Source/WebCore/ChangeLog 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/ChangeLog 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1,3 +1,18 @@
+2015-03-11 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r181367.
+ https://bugs.webkit.org/show_bug.cgi?id=142581
+
+ Caused crashes on the debug bots (Requested by cdumez on
+ #webkit).
+
+ Reverted changeset:
+
+ "Web Inspector: CSS parser errors in the console should
+ include column numbers"
+ https://bugs.webkit.org/show_bug.cgi?id=114313
+ http://trac.webkit.org/changeset/181367
+
2015-03-11 Myles C. Maxfield <mmaxfi...@apple.com>
Inline block children do not have correct baselines if their children are also block elements
Modified: trunk/Source/WebCore/css/CSSParser.cpp (181388 => 181389)
--- trunk/Source/WebCore/css/CSSParser.cpp 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2015-03-11 15:58:13 UTC (rev 181389)
@@ -331,9 +331,6 @@
, m_lineNumber(0)
, m_tokenStartLineNumber(0)
, m_lastSelectorLineNumber(0)
- , m_columnOffsetForLine(0)
- , m_sheetStartLineNumber(0)
- , m_sheetStartColumnNumber(0)
, m_allowImportRules(true)
, m_allowNamespaceDeclarations(true)
#if ENABLE(CSS_DEVICE_ADAPTATION)
@@ -432,7 +429,7 @@
m_lexFunc = &CSSParser::realLex<UChar>;
}
-void CSSParser::parseSheet(StyleSheetContents* sheet, const String& string, int startLineNumber, int startColumnNumber, RuleSourceDataList* ruleSourceDataResult, bool logErrors)
+void CSSParser::parseSheet(StyleSheetContents* sheet, const String& string, int startLineNumber, RuleSourceDataList* ruleSourceDataResult, bool logErrors)
{
setStyleSheet(sheet);
m_defaultNamespace = starAtom; // Reset the default namespace.
@@ -443,9 +440,6 @@
m_logErrors = logErrors && sheet->singleOwnerDocument() && !sheet->baseURL().isEmpty() && sheet->singleOwnerDocument()->page();
m_ignoreErrorsInDeclaration = false;
m_lineNumber = startLineNumber;
- m_columnOffsetForLine = 0;
- m_sheetStartLineNumber = startLineNumber;
- m_sheetStartColumnNumber = startColumnNumber;
setupParser("", string, "");
cssyyparse(this);
sheet->shrinkToFit();
@@ -10489,19 +10483,10 @@
{
Location location;
location.lineNumber = m_tokenStartLineNumber;
- location.columnNumber = tokenStartOffset() - m_columnOffsetForLine;
-
- ASSERT(location.lineNumber >= 0);
- ASSERT(location.columnNumber >= 0);
-
- if (m_tokenStartLineNumber == m_sheetStartLineNumber)
- location.columnNumber += m_sheetStartColumnNumber;
-
if (is8BitSource())
location.token.init(tokenStart<LChar>(), currentCharacter<LChar>() - tokenStart<LChar>());
else
location.token.init(tokenStart<UChar>(), currentCharacter<UChar>() - tokenStart<UChar>());
-
return location;
}
@@ -11595,12 +11580,9 @@
// Might start with a '\n'.
--currentCharacter<SrcCharacterType>();
do {
- if (*currentCharacter<SrcCharacterType>() == '\n') {
+ if (*currentCharacter<SrcCharacterType>() == '\n')
++m_lineNumber;
- ++currentCharacter<SrcCharacterType>();
- m_columnOffsetForLine = currentCharacterOffset();
- } else
- ++currentCharacter<SrcCharacterType>();
+ ++currentCharacter<SrcCharacterType>();
} while (*currentCharacter<SrcCharacterType>() <= ' ' && (typesOfASCIICharacters[*currentCharacter<SrcCharacterType>()] == CharacterWhiteSpace));
break;
@@ -11668,12 +11650,8 @@
if (*currentCharacter<SrcCharacterType>() == '*') {
++currentCharacter<SrcCharacterType>();
while (currentCharacter<SrcCharacterType>()[0] != '*' || currentCharacter<SrcCharacterType>()[1] != '/') {
- if (*currentCharacter<SrcCharacterType>() == '\n') {
+ if (*currentCharacter<SrcCharacterType>() == '\n')
++m_lineNumber;
- ++currentCharacter<SrcCharacterType>();
- m_columnOffsetForLine = currentCharacterOffset();
- continue;
- }
if (*currentCharacter<SrcCharacterType>() == '\0') {
// Unterminated comments are simply ignored.
currentCharacter<SrcCharacterType>() -= 2;
@@ -11891,15 +11869,14 @@
{
if (!isLoggingErrors())
return;
-
StringBuilder builder;
switch (error) {
case PropertyDeclarationError:
builder.appendLiteral("Invalid CSS property declaration at: ");
break;
+
default:
builder.appendLiteral("Unexpected CSS token: ");
- break;
}
if (location.token.is8Bit())
@@ -11907,7 +11884,7 @@
else
builder.append(location.token.characters16(), location.token.length());
- logError(builder.toString(), location.lineNumber, location.columnNumber);
+ logError(builder.toString(), location.lineNumber);
m_ignoreErrorsInDeclaration = true;
}
@@ -11917,10 +11894,11 @@
return m_logErrors && !m_ignoreErrorsInDeclaration;
}
-void CSSParser::logError(const String& message, int lineNumber, int columnNumber)
+void CSSParser::logError(const String& message, int lineNumber)
{
+ // FIXME: <http://webkit.org/b/114313> CSS parser console message errors should include column numbers.
PageConsoleClient& console = m_styleSheet->singleOwnerDocument()->page()->console();
- console.addMessage(MessageSource::CSS, MessageLevel::Warning, message, m_styleSheet->baseURL().string(), lineNumber + 1, columnNumber + 1);
+ console.addMessage(MessageSource::CSS, MessageLevel::Warning, message, m_styleSheet->baseURL().string(), lineNumber + 1, 0);
}
PassRefPtr<StyleRuleKeyframes> CSSParser::createKeyframesRule(const String& name, std::unique_ptr<Vector<RefPtr<StyleKeyframe>>> popKeyframes)
Modified: trunk/Source/WebCore/css/CSSParser.h (181388 => 181389)
--- trunk/Source/WebCore/css/CSSParser.h 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/css/CSSParser.h 2015-03-11 15:58:13 UTC (rev 181389)
@@ -105,7 +105,7 @@
WEBCORE_EXPORT ~CSSParser();
- void parseSheet(StyleSheetContents*, const String&, int startLineNumber, int startColumnNumber, RuleSourceDataList*, bool logErrors);
+ void parseSheet(StyleSheetContents*, const String&, int startLineNumber = 0, RuleSourceDataList* = nullptr, bool = false);
PassRefPtr<StyleRuleBase> parseRule(StyleSheetContents*, const String&);
PassRefPtr<StyleKeyframe> parseKeyframeRule(StyleSheetContents*, const String&);
bool parseSupportsCondition(const String&);
@@ -464,8 +464,6 @@
inline unsigned tokenStartOffset();
inline UChar tokenStartChar();
- inline unsigned currentCharacterOffset();
-
template <typename CharacterType>
inline bool isIdentifierStart();
@@ -595,11 +593,7 @@
int m_lineNumber;
int m_tokenStartLineNumber;
int m_lastSelectorLineNumber;
- int m_columnOffsetForLine;
- int m_sheetStartLineNumber;
- int m_sheetStartColumnNumber;
-
bool m_allowImportRules;
bool m_allowNamespaceDeclarations;
@@ -648,7 +642,7 @@
};
bool isLoggingErrors();
- void logError(const String& message, int lineNumber, int columnNumber);
+ void logError(const String& message, int lineNumber);
bool validateCalculationUnit(ValueWithCalculation&, Units);
@@ -692,7 +686,6 @@
struct CSSParser::Location {
int lineNumber;
- int columnNumber;
CSSParserString token;
};
@@ -721,13 +714,6 @@
return m_tokenStart.ptr16 - m_dataStart16.get();
}
-inline unsigned CSSParser::currentCharacterOffset()
-{
- if (is8BitSource())
- return m_currentCharacter8 - m_dataStart8.get();
- return m_currentCharacter16 - m_dataStart16.get();
-}
-
inline UChar CSSParser::tokenStartChar()
{
if (is8BitSource())
Modified: trunk/Source/WebCore/css/StyleSheetContents.cpp (181388 => 181389)
--- trunk/Source/WebCore/css/StyleSheetContents.cpp 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/css/StyleSheetContents.cpp 2015-03-11 15:58:13 UTC (rev 181389)
@@ -291,7 +291,7 @@
String sheetText = cachedStyleSheet->sheetText(&hasValidMIMEType);
CSSParser p(parserContext());
- p.parseSheet(this, sheetText, 0, 0, nullptr, true);
+ p.parseSheet(this, sheetText, 0, 0, true);
// If we're loading a stylesheet cross-origin, and the MIME type is not standard, require the CSS
// to at least start with a syntactically valid CSS rule.
@@ -316,13 +316,13 @@
bool StyleSheetContents::parseString(const String& sheetText)
{
- return parseStringAtLineAndColumn(sheetText, 0, 0, false);
+ return parseStringAtLine(sheetText, 0, false);
}
-bool StyleSheetContents::parseStringAtLineAndColumn(const String& sheetText, int startLineNumber, int startColumnNumber, bool createdByParser)
+bool StyleSheetContents::parseStringAtLine(const String& sheetText, int startLineNumber, bool createdByParser)
{
CSSParser p(parserContext());
- p.parseSheet(this, sheetText, startLineNumber, startColumnNumber, nullptr, createdByParser);
+ p.parseSheet(this, sheetText, startLineNumber, 0, createdByParser);
return true;
}
Modified: trunk/Source/WebCore/css/StyleSheetContents.h (181388 => 181389)
--- trunk/Source/WebCore/css/StyleSheetContents.h 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/css/StyleSheetContents.h 2015-03-11 15:58:13 UTC (rev 181389)
@@ -62,7 +62,7 @@
void parseAuthorStyleSheet(const CachedCSSStyleSheet*, const SecurityOrigin*);
WEBCORE_EXPORT bool parseString(const String&);
- bool parseStringAtLineAndColumn(const String&, int startLineNumber, int startColumnNumber, bool createdByParser);
+ bool parseStringAtLine(const String&, int startLineNumber, bool);
bool isCacheable() const;
Modified: trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp (181388 => 181389)
--- trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/dom/InlineStyleSheetOwner.cpp 2015-03-11 15:58:13 UTC (rev 181389)
@@ -35,10 +35,10 @@
InlineStyleSheetOwner::InlineStyleSheetOwner(Document& document, bool createdByParser)
: m_isParsingChildren(createdByParser)
, m_loading(false)
- , m_startTextPosition(WTF::OrdinalNumber::beforeFirst(), WTF::OrdinalNumber::beforeFirst())
+ , m_startLineNumber(WTF::OrdinalNumber::beforeFirst())
{
if (createdByParser && document.scriptableDocumentParser() && !document.isInDocumentWrite())
- m_startTextPosition = document.scriptableDocumentParser()->textPosition();
+ m_startLineNumber = document.scriptableDocumentParser()->textPosition().m_line;
}
InlineStyleSheetOwner::~InlineStyleSheetOwner()
@@ -123,7 +123,7 @@
if (!isValidCSSContentType(element, m_contentType))
return;
- if (!document.contentSecurityPolicy()->allowInlineStyle(document.url(), m_startTextPosition.m_line))
+ if (!document.contentSecurityPolicy()->allowInlineStyle(document.url(), m_startLineNumber))
return;
RefPtr<MediaQuerySet> mediaQueries;
@@ -144,7 +144,7 @@
m_sheet = CSSStyleSheet::createInline(element, URL(), document.inputEncoding());
m_sheet->setMediaQueries(mediaQueries.release());
m_sheet->setTitle(element.title());
- m_sheet->contents().parseStringAtLineAndColumn(text, m_startTextPosition.m_line.zeroBasedInt(), m_startTextPosition.m_column.zeroBasedInt(), m_isParsingChildren);
+ m_sheet->contents().parseStringAtLine(text, m_startLineNumber.zeroBasedInt(), m_isParsingChildren);
m_loading = false;
Modified: trunk/Source/WebCore/dom/InlineStyleSheetOwner.h (181388 => 181389)
--- trunk/Source/WebCore/dom/InlineStyleSheetOwner.h 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/dom/InlineStyleSheetOwner.h 2015-03-11 15:58:13 UTC (rev 181389)
@@ -57,7 +57,7 @@
bool m_isParsingChildren;
bool m_loading;
- WTF::TextPosition m_startTextPosition;
+ WTF::OrdinalNumber m_startLineNumber;
AtomicString m_contentType;
AtomicString m_media;
RefPtr<CSSStyleSheet> m_sheet;
Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (181388 => 181389)
--- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1106,7 +1106,7 @@
RefPtr<StyleSheetContents> newStyleSheet = StyleSheetContents::create();
auto ruleSourceDataResult = std::make_unique<RuleSourceDataList>();
- createCSSParser(m_pageStyleSheet->ownerDocument())->parseSheet(newStyleSheet.get(), m_parsedStyleSheet->text(), 0, 0, ruleSourceDataResult.get(), false);
+ createCSSParser(m_pageStyleSheet->ownerDocument())->parseSheet(newStyleSheet.get(), m_parsedStyleSheet->text(), 0, ruleSourceDataResult.get());
m_parsedStyleSheet->setSourceData(WTF::move(ruleSourceDataResult));
return m_parsedStyleSheet->hasSourceData();
}
Modified: trunk/Source/WebInspectorUI/ChangeLog (181388 => 181389)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-03-11 15:58:13 UTC (rev 181389)
@@ -1,3 +1,18 @@
+2015-03-11 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r181367.
+ https://bugs.webkit.org/show_bug.cgi?id=142581
+
+ Caused crashes on the debug bots (Requested by cdumez on
+ #webkit).
+
+ Reverted changeset:
+
+ "Web Inspector: CSS parser errors in the console should
+ include column numbers"
+ https://bugs.webkit.org/show_bug.cgi?id=114313
+ http://trac.webkit.org/changeset/181367
+
2015-03-11 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: Reload after Global Search results in empty Resources Sidebar.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js (181388 => 181389)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js 2015-03-11 14:52:04 UTC (rev 181388)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js 2015-03-11 15:58:13 UTC (rev 181389)
@@ -199,7 +199,6 @@
{
// ConsoleMessage stack trace line numbers are one-based.
lineNumber = lineNumber ? lineNumber - 1 : 0;
- columnNumber = columnNumber ? columnNumber - 1 : 0;
return WebInspector.linkifyLocation(url, lineNumber, columnNumber, "console-message-url");
},