Changeset 61052 in webkit


Ignore:
Timestamp:
Jun 11, 2010 6:28:18 PM (14 years ago)
Author:
mjs@apple.com
Message:

2010-06-11 Maciej Stachowiak <mjs@apple.com>

Reviewed by Ojan Vafai.

Implement HTML5 hidden attribute
https://bugs.webkit.org/show_bug.cgi?id=40511

Test: fast/html/hidden-attr.html


Note: I used the mapped attribute mechanism for this instead of a rule in the UA stylesheet
to avoid a performance hit from adding a global attribute rule to the UA stylesheet.

  • html/HTMLElement.cpp: (WebCore::HTMLElement::mapToEntry): Pick up hidden as a global mapped attribute. (WebCore::HTMLElement::parseMappedAttribute): Map hidden attribute to display: none.

2010-06-11 Maciej Stachowiak <mjs@apple.com>

Reviewed by Ojan Vafai.

Implement HTML5 hidden attribute
https://bugs.webkit.org/show_bug.cgi?id=40511

  • fast/html/hidden-attr-expected.txt: Added.
  • fast/html/hidden-attr.html: Added. Test static and dynamic cases of hidden attribute.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61051 r61052  
     12010-06-11  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Implement HTML5 hidden attribute
     6        https://bugs.webkit.org/show_bug.cgi?id=40511
     7
     8        * fast/html/hidden-attr-expected.txt: Added.
     9        * fast/html/hidden-attr.html: Added. Test static and dynamic cases of hidden attribute.
     10
    1112010-06-11  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/WebCore/ChangeLog

    r61050 r61052  
     12010-06-11  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Ojan Vafai.
     4
     5        Implement HTML5 hidden attribute
     6        https://bugs.webkit.org/show_bug.cgi?id=40511
     7
     8        Test: fast/html/hidden-attr.html
     9       
     10        Note: I used the mapped attribute mechanism for this instead of a rule in the UA stylesheet
     11        to avoid a performance hit from adding a global attribute rule to the UA stylesheet.
     12
     13        * html/HTMLElement.cpp:
     14        (WebCore::HTMLElement::mapToEntry): Pick up hidden as a global mapped attribute.
     15        (WebCore::HTMLElement::parseMappedAttribute): Map hidden attribute to display: none.
     16
    1172010-06-10  Abhishek Arya  <inferno@chromium.org>
    218
  • trunk/WebCore/html/HTMLElement.cpp

    r60624 r61052  
    130130bool HTMLElement::mapToEntry(const QualifiedName& attrName, MappedAttributeEntry& result) const
    131131{
    132     if (attrName == alignAttr ||
    133         attrName == contenteditableAttr) {
     132    if (attrName == alignAttr
     133        || attrName == contenteditableAttr
     134        || attrName == hiddenAttr) {
    134135        result = eUniversal;
    135136        return false;
     
    154155        else
    155156            addCSSProperty(attr, CSSPropertyTextAlign, attr->value());
     157    } else if (attr->name() == hiddenAttr) {
     158        addCSSProperty(attr, CSSPropertyDisplay, CSSValueNone);
    156159    } else if (attr->name() == contenteditableAttr) {
    157160        setContentEditable(attr);
Note: See TracChangeset for help on using the changeset viewer.