Changeset 86754 in webkit


Ignore:
Timestamp:
May 18, 2011 6:32:07 AM (13 years ago)
Author:
apavlov@chromium.org
Message:

2011-05-18 Alexander Pavlov <apavlov@chromium.org>

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 Alexander Pavlov <apavlov@chromium.org>

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:
Location:
trunk
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r86753 r86754  
     12011-05-18  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: model-based CSS editing does not update @import-ed stylesheet resources
     6        https://bugs.webkit.org/show_bug.cgi?id=60966
     7
     8        * inspector/styles/resources/styles-new-API-1.css:
     9        * inspector/styles/resources/styles-new-API-2.css: Copied from LayoutTests/inspector/styles/resources/styles-new-API-1.css.
     10        (@page):
     11        (@page :first):
     12        (#absent-id):
     13        (@font-face):
     14        (body):
     15        * inspector/styles/styles-new-API-expected.txt:
     16
    1172011-05-18  Zoltan Horvath  <zoltan@webkit.org>
    218
     
    1174711763        https://bugs.webkit.org/show_bug.cgi?id=58995
    1174811764
    11749         Accidentally indicated MAC instead of WIN.
     11765        Accidentally indicated MAC instead of WIN.
    1175011766
    1175111767        * platform/chromium/test_expectations.txt:
     
    1180711823        https://bugs.webkit.org/show_bug.cgi?id=58985
    1180811824
    11809         Most likely related to http://trac.webkit.org/changeset/84341/
    11810         "background color of elements with border-radius shows around outer edge of border at corners"
     11825        Most likely related to http://trac.webkit.org/changeset/84341/
     11826        "background color of elements with border-radius shows around outer edge of border at corners"
    1181111827
    1181211828        * platform/chromium-mac-leopard/fast/forms/menulist-clip-expected.png:
     
    1185811874        https://bugs.webkit.org/show_bug.cgi?id=58978
    1185911875
    11860         Windows bots are now generating baselines, so include them.
    11861         fast/repaint/trailing-floats-root-line-box-overflow looks like correct output.
     11876        Windows bots are now generating baselines, so include them.
     11877        fast/repaint/trailing-floats-root-line-box-overflow looks like correct output.
    1186211878
    1186311879        * platform/chromium-mac/fast/repaint/trailing-floats-root-line-box-overflow-expected.png: Added.
     
    1273612752        https://bugs.webkit.org/show_bug.cgi?id=58880
    1273712753
    12738         See also existing chromium bug:
    12739         http://code.google.com/p/chromium/issues/detail?id=76609
     12754        See also existing chromium bug:
     12755        http://code.google.com/p/chromium/issues/detail?id=76609
    1274012756
    1274112757        * platform/chromium/test_expectations.txt:
     
    1274812764        https://bugs.webkit.org/show_bug.cgi?id=58879
    1274912765
    12750         See also existing chromium bug:
    12751         http://code.google.com/p/chromium/issues/detail?id=32231
     12766        See also existing chromium bug:
     12767        http://code.google.com/p/chromium/issues/detail?id=32231
    1275212768
    1275312769        * platform/chromium/test_expectations.txt:
     
    1276012776        https://bugs.webkit.org/show_bug.cgi?id=58878
    1276112777
    12762         See also existing chromium bug:
    12763         http://code.google.com/p/chromium/issues/detail?id=74710
     12778        See also existing chromium bug:
     12779        http://code.google.com/p/chromium/issues/detail?id=74710
    1276412780
    1276512781        * platform/chromium/test_expectations.txt:
     
    1277212788        https://bugs.webkit.org/show_bug.cgi?id=58877
    1277312789
    12774         Chromium bug filed.
    12775         http://code.google.com/p/chromium/issues/detail?id=79854
     12790        Chromium bug filed.
     12791        http://code.google.com/p/chromium/issues/detail?id=79854
    1277612792
    1277712793        * platform/chromium/test_expectations.txt:
     
    1280812824        https://bugs.webkit.org/show_bug.cgi?id=58873
    1280912825
    12810         Fixed in Chromium r81956.
    12811         http://code.google.com/p/chromium/issues/detail?id=79725
     12826        Fixed in Chromium r81956.
     12827        http://code.google.com/p/chromium/issues/detail?id=79725
    1281212828
    1281312829        * platform/chromium/test_expectations.txt:
  • trunk/LayoutTests/inspector/styles/resources/styles-new-API-1.css

    r82713 r86754  
     1@import url(styles-new-API-2.css);
     2
    13@page { margin: 2cm } /* All margins set to 2cm */
    24
  • trunk/LayoutTests/inspector/styles/resources/styles-new-API-2.css

    • Property svn:executable set to *
    r86753 r86754  
     1@import url(styles-new-API-1.css);
     2
    13@page { margin: 2cm } /* All margins set to 2cm */
    24
  • trunk/LayoutTests/inspector/styles/styles-new-API-expected.txt

    r78535 r86754  
    1616['margin-bottom':'8px'] @[undefined-undefined] style
    1717['margin-left':'8px'] @[undefined-undefined] style
     18
     19rule
     20body: []
     21['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
    1822
    1923rule
     
    186190['border-left-width':'0px'] @[undefined-undefined] style
    187191
     192StyleSheet: '@import url(styles-new-API-2.css);
     193
     194@page { margin: 2cm } /* All margins set to 2cm */
     195
     196@page :first {
     197  margin-top: 10cm    /* Top margin on first page 10cm */
     198}
     199
     200@media screen {
     201
     202#absent-id {
     203}
     204
     205@font-face {
     206    font-family: 'TheFont';
     207    src: url('font.url');
     208    font-weight: normal;
     209    font-style: normal;
     210}
     211
     212body {
     213    property: imported-media-screen-stylesheet;
     214}
     215
     216}
     217'
     218
     219rule
     220#absent-id: []
     221
     222rule
     223body: []
     224['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
     225
     226StyleSheet: '@import url(styles-new-API-1.css);
     227
     228@page { margin: 2cm } /* All margins set to 2cm */
     229
     230@page :first {
     231  margin-top: 10cm    /* Top margin on first page 10cm */
     232}
     233
     234@media screen {
     235
     236#absent-id {
     237}
     238
     239@font-face {
     240    font-family: 'TheFont';
     241    src: url('font.url');
     242    font-weight: normal;
     243    font-style: normal;
     244}
     245
     246body {
     247    property: imported-media-screen-stylesheet;
     248}
     249
     250}
     251'
     252
     253rule
     254#absent-id: []
     255
     256rule
     257body: []
     258['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
     259
    188260StyleSheet: '
    189261
     
    268340['margin-bottom':'8px'] @[undefined-undefined] style
    269341['margin-left':'8px'] @[undefined-undefined] style
     342
     343rule
     344body: []
     345['property':'imported-media-screen-stylesheet' non-parsed] @[5-48] active
    270346
    271347rule
  • trunk/Source/WebCore/ChangeLog

    r86752 r86754  
     12011-05-18  Alexander Pavlov  <apavlov@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: model-based CSS editing does not update @import-ed stylesheet resources
     6        https://bugs.webkit.org/show_bug.cgi?id=60966
     7
     8        Imported stylesheets didn't use to be returned by InspectorCSSAgent.
     9
     10        * inspector/InspectorCSSAgent.cpp:
     11        (WebCore::InspectorCSSAgent::getAllStyleSheets):
     12        (WebCore::InspectorCSSAgent::collectStyleSheets):
     13        * inspector/InspectorCSSAgent.h:
     14
    1152011-05-18  Pavel Feldman  <pfeldman@google.com>
    216
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp

    r84148 r86754  
    2929
    3030#include "CSSComputedStyleDeclaration.h"
     31#include "CSSImportRule.h"
    3132#include "CSSMutableStyleDeclaration.h"
    3233#include "CSSPropertyNames.h"
     
    268269        for (unsigned i = 0; i < list->length(); ++i) {
    269270            StyleSheet* styleSheet = list->item(i);
    270             if (styleSheet->isCSSStyleSheet()) {
    271                 InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(static_cast<CSSStyleSheet*>(styleSheet));
    272                 (*styleInfos)->pushObject(inspectorStyleSheet->buildObjectForStyleSheetInfo());
    273             }
     271            if (styleSheet->isCSSStyleSheet())
     272                collectStyleSheets(static_cast<CSSStyleSheet*>(styleSheet), styleInfos->get());
    274273        }
    275274    }
     
    416415    }
    417416    return static_cast<Element*>(node);
     417}
     418
     419void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, InspectorArray* result)
     420{
     421    InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(static_cast<CSSStyleSheet*>(styleSheet));
     422    result->pushObject(inspectorStyleSheet->buildObjectForStyleSheetInfo());
     423    for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) {
     424        StyleBase* styleBase = styleSheet->item(i);
     425        if (styleBase->isImportRule()) {
     426            StyleBase* importedStyleSheet = static_cast<CSSImportRule*>(styleBase)->styleSheet();
     427            if (importedStyleSheet && importedStyleSheet->isCSSStyleSheet())
     428                collectStyleSheets(static_cast<CSSStyleSheet*>(importedStyleSheet), result);
     429        }
     430    }
    418431}
    419432
  • trunk/Source/WebCore/inspector/InspectorCSSAgent.h

    r83962 r86754  
    8585    InspectorStyleSheetForInlineStyle* asInspectorStyleSheet(Element* element);
    8686    Element* elementForId(ErrorString*, int nodeId);
     87    void collectStyleSheets(CSSStyleSheet*, InspectorArray*);
    8788
    8889    InspectorStyleSheet* bindStyleSheet(CSSStyleSheet*);
Note: See TracChangeset for help on using the changeset viewer.