Changeset 132834 in webkit


Ignore:
Timestamp:
Oct 29, 2012 12:00:41 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[CSSOM] Extraneous whitespace in CSSImportRule.cssText
https://bugs.webkit.org/show_bug.cgi?id=100657

Patch by Glenn Adams <glenn@skynav.com> on 2012-10-29
Reviewed by Simon Fraser.

Source/WebCore:

Remove extraneous whitespace when serializing CSSImportRule.cssText when
media list is empty.

Test: cssom/cssimportrule-media.html

  • css/CSSImportRule.cpp:

(WebCore::CSSImportRule::cssText):
Don't append extra whitespace if mediaText is empty.

LayoutTests:

Test (from CSS WG) that checks serializion of CSSImportRule.cssText.

  • http/tests/css/shared-stylesheet-mutation-expected.txt:
  • http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt:

Fix expected output to match removal of extraneous space.

  • cssom/cssimportrule-media-expected.txt: Added.
  • cssom/cssimportrule-media.html: Added.
  • cssom/resources/import.css: Added.
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r132827 r132834  
     12012-10-29  Glenn Adams  <glenn@skynav.com>
     2       
     3        [CSSOM] Extraneous whitespace in CSSImportRule.cssText
     4        https://bugs.webkit.org/show_bug.cgi?id=100657
     5
     6        Reviewed by Simon Fraser.
     7
     8        Test (from CSS WG) that checks serializion of CSSImportRule.cssText.
     9
     10        * http/tests/css/shared-stylesheet-mutation-expected.txt:
     11        * http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt:
     12        Fix expected output to match removal of extraneous space.
     13
     14        * cssom/cssimportrule-media-expected.txt: Added.
     15        * cssom/cssimportrule-media.html: Added.
     16        * cssom/resources/import.css: Added.
     17
    1182012-10-29  Zan Dobersek  <zandobersek@gmail.com>
    219
  • trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-expected.txt

    r116291 r132834  
    189189
    190190@charset "utf-8";
    191 @import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D") ;
     191@import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D");
    192192#testdiv { background-color: green; }
    193193@media all {
  • trunk/LayoutTests/http/tests/css/shared-stylesheet-mutation-preconstruct-expected.txt

    r116291 r132834  
    189189
    190190@charset "utf-8";
    191 @import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D") ;
     191@import url("data:text/css;charset=utf-8,%23testdiv%7Bbackground-color%3Agreen%20!important%7D");
    192192#testdiv { background-color: green; }
    193193@media all {
  • trunk/Source/WebCore/ChangeLog

    r132823 r132834  
     12012-10-29  Glenn Adams  <glenn@skynav.com>
     2
     3        [CSSOM] Extraneous whitespace in CSSImportRule.cssText
     4        https://bugs.webkit.org/show_bug.cgi?id=100657
     5
     6        Reviewed by Simon Fraser.
     7
     8        Remove extraneous whitespace when serializing CSSImportRule.cssText when
     9        media list is empty.
     10
     11        Test: cssom/cssimportrule-media.html
     12
     13        * css/CSSImportRule.cpp:
     14        (WebCore::CSSImportRule::cssText):
     15        Don't append extra whitespace if mediaText is empty.
     16
    1172012-10-29  Arnaud Renevier  <a.renevier@sisa.samsung.com>
    218
  • trunk/Source/WebCore/css/CSSImportRule.cpp

    r128762 r132834  
    7070
    7171    if (m_importRule->mediaQueries()) {
    72         result.append(' ');
    73         result.append(m_importRule->mediaQueries()->mediaText());
     72        String mediaText = m_importRule->mediaQueries()->mediaText();
     73        if (!mediaText.isEmpty()) {
     74            result.append(' ');
     75            result.append(mediaText);
     76        }
    7477    }
    7578    result.append(';');
Note: See TracChangeset for help on using the changeset viewer.