Changeset 110632 in webkit


Ignore:
Timestamp:
Mar 13, 2012 4:00:15 PM (12 years ago)
Author:
tomz@codeaurora.org
Message:

Alternate xml-stylesheets with no title are loaded, in violation of the CSSOM draft
https://bugs.webkit.org/show_bug.cgi?id=77549

Patch by Dave Tharp <dtharp@codeaurora.org> on 2012-03-13
Reviewed by David Hyatt.

Source/WebCore:

Amended code to ignore alternate stylesheets that do not have a title attribute.

Test: fast/css/xml-stylesheet-alternate-no-title.xhtml

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::checkStyleSheet):

LayoutTests:

Added new text test, modified existing test: added title attribute to alternate stylesheet.

  • fast/css/xml-stylesheet-alternate-no-title-expected.txt: Added.
  • fast/css/xml-stylesheet-alternate-no-title.xhtml: Added.
  • fast/css/xml-stylesheet-alternate-processing.xhtml:
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r110628 r110632  
     12012-03-13  Dave Tharp  <dtharp@codeaurora.org>
     2
     3        Alternate xml-stylesheets with no title are loaded, in violation of the CSSOM draft
     4        https://bugs.webkit.org/show_bug.cgi?id=77549
     5
     6        Reviewed by David Hyatt.
     7
     8        Added new text test, modified existing test: added title attribute to alternate stylesheet.
     9
     10        * fast/css/xml-stylesheet-alternate-no-title-expected.txt: Added.
     11        * fast/css/xml-stylesheet-alternate-no-title.xhtml: Added.
     12        * fast/css/xml-stylesheet-alternate-processing.xhtml:
     13
    1142012-03-13  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/LayoutTests/fast/css/xml-stylesheet-alternate-processing.xhtml

    r31664 r110632  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <?xml-stylesheet href="resources/xml-stylesheet-pi-not-in-prolog.css" type="text/css" alternate="yes"?>
     2<?xml-stylesheet href="resources/xml-stylesheet-pi-not-in-prolog.css" type="text/css" alternate="yes" title="alt1"?>
    33<?xml-stylesheet href="resources/xml-stylesheet-pi-not-in-prolog.css" type="text/css" alternate="no"?>
    44<?xml-stylesheet href="resources/xml-stylesheet-pi-not-in-prolog.css" type="text/css"?>
  • trunk/Source/WebCore/ChangeLog

    r110629 r110632  
     12012-03-13  Dave Tharp  <dtharp@codeaurora.org>
     2
     3        Alternate xml-stylesheets with no title are loaded, in violation of the CSSOM draft
     4        https://bugs.webkit.org/show_bug.cgi?id=77549
     5
     6        Reviewed by David Hyatt.
     7
     8        Amended code to ignore alternate stylesheets that do not have a title attribute.
     9
     10        Test: fast/css/xml-stylesheet-alternate-no-title.xhtml
     11
     12        * dom/ProcessingInstruction.cpp:
     13        (WebCore::ProcessingInstruction::checkStyleSheet):
     14
    1152012-03-13  Levi Weintraub  <leviw@chromium.org>
    216
  • trunk/Source/WebCore/dom/ProcessingInstruction.cpp

    r106418 r110632  
    135135        m_media = attrs.get("media");
    136136
     137        if (m_alternate && m_title.isEmpty())
     138            return;
     139
    137140        if (href.length() > 1 && href[0] == '#') {
    138141            m_localHref = href.substring(1);
Note: See TracChangeset for help on using the changeset viewer.