Diff
Modified: trunk/LayoutTests/ChangeLog (86753 => 86754)
--- trunk/LayoutTests/ChangeLog 2011-05-18 12:56:22 UTC (rev 86753)
+++ trunk/LayoutTests/ChangeLog 2011-05-18 13:32:07 UTC (rev 86754)
@@ -1,3 +1,19 @@
+2011-05-18 Alexander Pavlov <[email protected]>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: model-based CSS editing does not update @import-ed stylesheet resources
+ https://bugs.webkit.org/show_bug.cgi?id=60966
+
+ * inspector/styles/resources/styles-new-API-1.css:
+ * inspector/styles/resources/styles-new-API-2.css: Copied from LayoutTests/inspector/styles/resources/styles-new-API-1.css.
+ (@page):
+ (@page :first):
+ (#absent-id):
+ (@font-face):
+ (body):
+ * inspector/styles/styles-new-API-expected.txt:
+
2011-05-18 Zoltan Horvath <[email protected]>
Reviewed by Csaba Osztrogonác.
@@ -11746,7 +11762,7 @@
[Chromium] Mark css2.1/t140201-c533-bgimage-00-a.html as crash on Linux, Win Debug
https://bugs.webkit.org/show_bug.cgi?id=58995
- Accidentally indicated MAC instead of WIN.
+ Accidentally indicated MAC instead of WIN.
* platform/chromium/test_expectations.txt:
@@ -11806,8 +11822,8 @@
[Chromium] Rebaseline some border-related tests on Mac
https://bugs.webkit.org/show_bug.cgi?id=58985
- Most likely related to http://trac.webkit.org/changeset/84341/
- "background color of elements with border-radius shows around outer edge of border at corners"
+ Most likely related to http://trac.webkit.org/changeset/84341/
+ "background color of elements with border-radius shows around outer edge of border at corners"
* platform/chromium-mac-leopard/fast/forms/menulist-clip-expected.png:
* platform/chromium-mac-leopard/fast/forms/menulist-narrow-width-expected.png:
@@ -11857,8 +11873,8 @@
[Chromium] Rebaseline fast/repaint/trailing-floats-root-line-box-overflow fast/canvas/webgl/css-webkit-canvas fast/canvas/webgl/css-webkit-canvas-repaint
https://bugs.webkit.org/show_bug.cgi?id=58978
- Windows bots are now generating baselines, so include them.
- fast/repaint/trailing-floats-root-line-box-overflow looks like correct output.
+ Windows bots are now generating baselines, so include them.
+ fast/repaint/trailing-floats-root-line-box-overflow looks like correct output.
* platform/chromium-mac/fast/repaint/trailing-floats-root-line-box-overflow-expected.png: Added.
* platform/chromium-win/fast/canvas/webgl/css-webkit-canvas-expected.png: Added.
@@ -12735,8 +12751,8 @@
[Chromium] Mark animations/play-state.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=58880
- See also existing chromium bug:
- http://code.google.com/p/chromium/issues/detail?id=76609
+ See also existing chromium bug:
+ http://code.google.com/p/chromium/issues/detail?id=76609
* platform/chromium/test_expectations.txt:
@@ -12747,8 +12763,8 @@
[Chromium] Mark tables/mozilla/bugs/bug28341.html as flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=58879
- See also existing chromium bug:
- http://code.google.com/p/chromium/issues/detail?id=32231
+ See also existing chromium bug:
+ http://code.google.com/p/chromium/issues/detail?id=32231
* platform/chromium/test_expectations.txt:
@@ -12759,8 +12775,8 @@
[Chromium] Mark svg/text/font-size-below-point-five.svg as flaky on Linux, Mac
https://bugs.webkit.org/show_bug.cgi?id=58878
- See also existing chromium bug:
- http://code.google.com/p/chromium/issues/detail?id=74710
+ See also existing chromium bug:
+ http://code.google.com/p/chromium/issues/detail?id=74710
* platform/chromium/test_expectations.txt:
@@ -12771,8 +12787,8 @@
[Chromium] Mark layout test editing/execCommand/delete-empty-container.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=58877
- Chromium bug filed.
- http://code.google.com/p/chromium/issues/detail?id=79854
+ Chromium bug filed.
+ http://code.google.com/p/chromium/issues/detail?id=79854
* platform/chromium/test_expectations.txt:
@@ -12807,8 +12823,8 @@
[Chromium] Reenable layout test canvas/philip/tests/2d.gradient.interpolate.outside.html
https://bugs.webkit.org/show_bug.cgi?id=58873
- Fixed in Chromium r81956.
- http://code.google.com/p/chromium/issues/detail?id=79725
+ Fixed in Chromium r81956.
+ http://code.google.com/p/chromium/issues/detail?id=79725
* platform/chromium/test_expectations.txt:
Modified: trunk/LayoutTests/inspector/styles/resources/styles-new-API-1.css (86753 => 86754)
--- trunk/LayoutTests/inspector/styles/resources/styles-new-API-1.css 2011-05-18 12:56:22 UTC (rev 86753)
+++ trunk/LayoutTests/inspector/styles/resources/styles-new-API-1.css 2011-05-18 13:32:07 UTC (rev 86754)
@@ -1,3 +1,5 @@
+@import url(styles-new-API-2.css);
+
@page { margin: 2cm } /* All margins set to 2cm */
@page :first {
Copied: trunk/LayoutTests/inspector/styles/resources/styles-new-API-2.css (from rev 86753, trunk/LayoutTests/inspector/styles/resources/styles-new-API-1.css) (0 => 86754)
--- trunk/LayoutTests/inspector/styles/resources/styles-new-API-2.css (rev 0)
+++ trunk/LayoutTests/inspector/styles/resources/styles-new-API-2.css 2011-05-18 13:32:07 UTC (rev 86754)
@@ -0,0 +1,25 @@
+@import url(styles-new-API-1.css);
+
+@page { margin: 2cm } /* All margins set to 2cm */
+
+@page :first {
+ margin-top: 10cm /* Top margin on first page 10cm */
+}
+
+@media screen {
+
+#absent-id {
+}
+
+@font-face {
+ font-family: 'TheFont';
+ src: url('font.url');
+ font-weight: normal;
+ font-style: normal;
+}
+
+body {
+ property: imported-media-screen-stylesheet;
+}
+
+}
Property changes: trunk/LayoutTests/inspector/styles/resources/styles-new-API-2.css
Added: svn:executable
Added: svn:eol-style
Modified: trunk/LayoutTests/inspector/styles/styles-new-API-expected.txt (86753 => 86754)
--- trunk/LayoutTests/inspector/styles/styles-new-API-expected.txt 2011-05-18 12:56:22 UTC (rev 86753)
+++ trunk/LayoutTests/inspector/styles/styles-new-API-expected.txt 2011-05-18 13:32:07 UTC (rev 86754)
@@ -22,6 +22,10 @@
rule
body: []
+['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
+
+rule
+body: []
['font-size':'12px'] @[5-21] active
['foo':'bar !
@@ -185,6 +189,74 @@
['border-bottom-width':'0px'] @[undefined-undefined] style
['border-left-width':'0px'] @[undefined-undefined] style
+StyleSheet: '@import url(styles-new-API-2.css);
+
+@page { margin: 2cm } /* All margins set to 2cm */
+
+@page :first {
+ margin-top: 10cm /* Top margin on first page 10cm */
+}
+
+@media screen {
+
+#absent-id {
+}
+
+@font-face {
+ font-family: 'TheFont';
+ src: url('font.url');
+ font-weight: normal;
+ font-style: normal;
+}
+
+body {
+ property: imported-media-screen-stylesheet;
+}
+
+}
+'
+
+rule
+#absent-id: []
+
+rule
+body: []
+['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
+
+StyleSheet: '@import url(styles-new-API-1.css);
+
+@page { margin: 2cm } /* All margins set to 2cm */
+
+@page :first {
+ margin-top: 10cm /* Top margin on first page 10cm */
+}
+
+@media screen {
+
+#absent-id {
+}
+
+@font-face {
+ font-family: 'TheFont';
+ src: url('font.url');
+ font-weight: normal;
+ font-style: normal;
+}
+
+body {
+ property: imported-media-screen-stylesheet;
+}
+
+}
+'
+
+rule
+#absent-id: []
+
+rule
+body: []
+['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
+
StyleSheet: '
/* An inline stylesheet */
@@ -274,6 +346,10 @@
rule
body: []
+['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
+
+rule
+body: []
['font-size':'12px'] @[5-21] active
['foo':'bar !
Modified: trunk/Source/WebCore/ChangeLog (86753 => 86754)
--- trunk/Source/WebCore/ChangeLog 2011-05-18 12:56:22 UTC (rev 86753)
+++ trunk/Source/WebCore/ChangeLog 2011-05-18 13:32:07 UTC (rev 86754)
@@ -1,3 +1,17 @@
+2011-05-18 Alexander Pavlov <[email protected]>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: model-based CSS editing does not update @import-ed stylesheet resources
+ https://bugs.webkit.org/show_bug.cgi?id=60966
+
+ Imported stylesheets didn't use to be returned by InspectorCSSAgent.
+
+ * inspector/InspectorCSSAgent.cpp:
+ (WebCore::InspectorCSSAgent::getAllStyleSheets):
+ (WebCore::InspectorCSSAgent::collectStyleSheets):
+ * inspector/InspectorCSSAgent.h:
+
2011-05-18 Pavel Feldman <[email protected]>
Reviewed by Yury Semikhatsky.
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (86753 => 86754)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2011-05-18 12:56:22 UTC (rev 86753)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp 2011-05-18 13:32:07 UTC (rev 86754)
@@ -28,6 +28,7 @@
#if ENABLE(INSPECTOR)
#include "CSSComputedStyleDeclaration.h"
+#include "CSSImportRule.h"
#include "CSSMutableStyleDeclaration.h"
#include "CSSPropertyNames.h"
#include "CSSPropertySourceData.h"
@@ -267,10 +268,8 @@
StyleSheetList* list = (*it)->styleSheets();
for (unsigned i = 0; i < list->length(); ++i) {
StyleSheet* styleSheet = list->item(i);
- if (styleSheet->isCSSStyleSheet()) {
- InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(static_cast<CSSStyleSheet*>(styleSheet));
- (*styleInfos)->pushObject(inspectorStyleSheet->buildObjectForStyleSheetInfo());
- }
+ if (styleSheet->isCSSStyleSheet())
+ collectStyleSheets(static_cast<CSSStyleSheet*>(styleSheet), styleInfos->get());
}
}
}
@@ -417,6 +416,20 @@
return static_cast<Element*>(node);
}
+void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, InspectorArray* result)
+{
+ InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(static_cast<CSSStyleSheet*>(styleSheet));
+ result->pushObject(inspectorStyleSheet->buildObjectForStyleSheetInfo());
+ for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) {
+ StyleBase* styleBase = styleSheet->item(i);
+ if (styleBase->isImportRule()) {
+ StyleBase* importedStyleSheet = static_cast<CSSImportRule*>(styleBase)->styleSheet();
+ if (importedStyleSheet && importedStyleSheet->isCSSStyleSheet())
+ collectStyleSheets(static_cast<CSSStyleSheet*>(importedStyleSheet), result);
+ }
+ }
+}
+
InspectorStyleSheet* InspectorCSSAgent::bindStyleSheet(CSSStyleSheet* styleSheet)
{
RefPtr<InspectorStyleSheet> inspectorStyleSheet = m_cssStyleSheetToInspectorStyleSheet.get(styleSheet);
Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.h (86753 => 86754)
--- trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2011-05-18 12:56:22 UTC (rev 86753)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.h 2011-05-18 13:32:07 UTC (rev 86754)
@@ -84,6 +84,7 @@
InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element);
Element* elementForId(ErrorString*, int nodeId);
+ void collectStyleSheets(CSSStyleSheet*, InspectorArray*);
InspectorStyleSheet* bindStyleSheet(CSSStyleSheet*);
InspectorStyleSheet* viaInspectorStyleSheet(Document*, bool createIfAbsent);