Changeset 53680 in webkit


Ignore:
Timestamp:
Jan 21, 2010 10:53:14 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-21 Tony Chang <tony@chromium.org>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=25501
Remove empty font tags when applying a style to a content editable
region.

  • editing/execCommand/change-font.html: Added.
  • editing/execCommand/change-font-expected.txt: Added.

2010-01-21 Tony Chang <tony@chromium.org>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=25501
Remove empty font tags when applying a style to a content editable
region.

Test: editing/execCommand/change-font.html

  • editing/ApplyStyleCommand.cpp: (WebCore::isEmptyFontTag):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53676 r53680  
     12010-01-21  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=25501
     6        Remove empty font tags when applying a style to a content editable
     7        region.
     8
     9        * editing/execCommand/change-font.html: Added.
     10        * editing/execCommand/change-font-expected.txt: Added.
     11
    1122010-01-21  Fumitoshi Ukai  <ukai@chromium.org>
    213
  • trunk/WebCore/ChangeLog

    r53674 r53680  
     12010-01-21  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=25501
     6        Remove empty font tags when applying a style to a content editable
     7        region.
     8
     9        Test: editing/execCommand/change-font.html
     10
     11        * editing/ApplyStyleCommand.cpp:
     12        (WebCore::isEmptyFontTag):
     13
    1142010-01-21  Joe Mason  <jmason@rim.com>
    215
  • trunk/WebCore/editing/ApplyStyleCommand.cpp

    r50177 r53680  
    303303    const Element *elem = static_cast<const Element *>(node);
    304304    NamedNodeMap *map = elem->attributes(true); // true for read-only
    305     return (!map || map->length() == 1) && elem->getAttribute(classAttr) == styleSpanClassString();
     305    if (!map)
     306        return true;
     307    return map->isEmpty() || (map->length() == 1 && elem->getAttribute(classAttr) == styleSpanClassString());
    306308}
    307309
Note: See TracChangeset for help on using the changeset viewer.