Changeset 106623 in webkit


Ignore:
Timestamp:
Feb 2, 2012 8:51:18 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Support 'disabled' attribute on SVGStyleElement
https://bugs.webkit.org/show_bug.cgi?id=52130

Source/WebCore:

Adding disabled property to SVGStyleElement, which
mirrors the functionality added to HTMLStyleElement
for DOM1. The disabled property reflects and sets
the disabled state of its style sheet.

Based off of patch for bug 25287

Patch by Bear Travis <betravis@adobe.com> on 2012-02-02
Reviewed by Dirk Schulze.

Test: svg/dom/SVGStyleElement/disable-svg-style-element.html

  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::disabled):
(WebCore):
(WebCore::SVGStyleElement::setDisabled):

  • svg/SVGStyleElement.h:

(SVGStyleElement):

  • svg/SVGStyleElement.idl:

LayoutTests:

Test the disabled property of an svg style element.
Based off of the patch for bug 25287.

Patch by Bear Travis <betravis@adobe.com> on 2012-02-02
Reviewed by Dirk Schulze.

  • svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt: Added.
  • svg/dom/SVGStyleElement/disable-svg-style-element.html: Added.
  • svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js: Added.

(createStyle):

Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106621 r106623  
     12012-02-02  Bear Travis  <betravis@adobe.com>
     2
     3        Support 'disabled' attribute on SVGStyleElement
     4        https://bugs.webkit.org/show_bug.cgi?id=52130
     5
     6        Test the disabled property of an svg style element.
     7        Based off of the patch for bug 25287.
     8
     9        Reviewed by Dirk Schulze.
     10
     11        * svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt: Added.
     12        * svg/dom/SVGStyleElement/disable-svg-style-element.html: Added.
     13        * svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js: Added.
     14        (createStyle):
     15
    1162012-02-02  Raymond Toy  <rtoy@chromium.org>
    217
  • trunk/Source/WebCore/ChangeLog

    r106622 r106623  
     12012-02-02  Bear Travis  <betravis@adobe.com>
     2
     3        Support 'disabled' attribute on SVGStyleElement
     4        https://bugs.webkit.org/show_bug.cgi?id=52130
     5
     6        Adding disabled property to SVGStyleElement, which
     7        mirrors the functionality added to HTMLStyleElement
     8        for DOM1. The disabled property reflects and sets
     9        the disabled state of its style sheet.
     10
     11        Based off of patch for bug 25287
     12
     13        Reviewed by Dirk Schulze.
     14
     15        Test: svg/dom/SVGStyleElement/disable-svg-style-element.html
     16
     17        * svg/SVGStyleElement.cpp:
     18        (WebCore::SVGStyleElement::disabled):
     19        (WebCore):
     20        (WebCore::SVGStyleElement::setDisabled):
     21        * svg/SVGStyleElement.h:
     22        (SVGStyleElement):
     23        * svg/SVGStyleElement.idl:
     24
    1252012-02-02  Hayato Ito  <hayato@chromium.org>
    226
  • trunk/Source/WebCore/svg/SVGStyleElement.cpp

    r103296 r106623  
    5050{
    5151    return adoptRef(new SVGStyleElement(tagName, document, createdByParser));
     52}
     53
     54bool SVGStyleElement::disabled() const
     55{
     56    if (!m_sheet)
     57        return false;
     58   
     59    return m_sheet->disabled();
     60}
     61
     62void SVGStyleElement::setDisabled(bool setDisabled)
     63{
     64    if (CSSStyleSheet* styleSheet = sheet())
     65        styleSheet->setDisabled(setDisabled);
    5266}
    5367
  • trunk/Source/WebCore/svg/SVGStyleElement.h

    r87867 r106623  
    3838    using StyleElement::sheet;
    3939
     40    bool disabled() const;
     41    void setDisabled(bool);
     42                         
    4043    virtual const AtomicString& type() const;
    4144    void setType(const AtomicString&, ExceptionCode&);
  • trunk/Source/WebCore/svg/SVGStyleElement.idl

    r92237 r106623  
    3131    ] SVGStyleElement : SVGElement,
    3232                                                  SVGLangSpace {
     33                 attribute boolean disabled;
    3334                 attribute DOMString type
    3435                     setter raises(DOMException);
Note: See TracChangeset for help on using the changeset viewer.