Changeset 19578 in webkit


Ignore:
Timestamp:
Feb 12, 2007 10:07:26 AM (17 years ago)
Author:
antti
Message:

LayoutTests:

Reviewed by Darin

  • fast/images/imagemap-case-expected.checksum: Added.
  • fast/images/imagemap-case-expected.png: Added.
  • fast/images/imagemap-case-expected.txt: Added.
  • fast/images/imagemap-case.html: Added.

WebCore:

Reviewed by Darin.


Make imagemap names case insensitive in HTML mode

  • dom/Document.cpp: (WebCore::Document::getImageMap):
  • html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseMappedAttribute):
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r19577 r19578  
     12007-02-12  Antti Koivisto  <antti@apple.com>
     2
     3        Reviewed by Darin
     4
     5        - test for Imagemap not clickable in www.toptenbooks.net/
     6        http://bugs.webkit.org/show_bug.cgi?id=12738
     7
     8        * fast/images/imagemap-case-expected.checksum: Added.
     9        * fast/images/imagemap-case-expected.png: Added.
     10        * fast/images/imagemap-case-expected.txt: Added.
     11        * fast/images/imagemap-case.html: Added.
     12
    1132007-02-12  Geoffrey Garen  <ggaren@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r19573 r19578  
     12007-02-12  Antti Koivisto  <antti@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        - fixed Imagemap not clickable in www.toptenbooks.net/
     6        http://bugs.webkit.org/show_bug.cgi?id=12738
     7       
     8        Make imagemap names case insensitive in HTML mode
     9
     10        * dom/Document.cpp:
     11        (WebCore::Document::getImageMap):
     12        * html/HTMLMapElement.cpp:
     13        (WebCore::HTMLMapElement::parseMappedAttribute):
     14
    1152007-02-12  Maciej Stachowiak  <mjs@apple.com>
    216
  • trunk/WebCore/dom/Document.cpp

    r19538 r19578  
    24822482        return 0;
    24832483    int hashPos = URL.find('#');
    2484     AtomicString name = (hashPos < 0 ? URL : URL.substring(hashPos + 1)).impl();
    2485     return m_imageMapsByName.get(name.impl());
     2484    String name = (hashPos < 0 ? URL : URL.substring(hashPos + 1)).impl();
     2485    AtomicString mapName = hMode == XHtml ? name : name.lower();
     2486    return m_imageMapsByName.get(mapName.impl());
    24862487}
    24872488
  • trunk/WebCore/html/HTMLMapElement.cpp

    r17426 r19578  
    8787        }
    8888        doc->removeImageMap(this);
    89         m_name = attr->value();
    90         if (m_name[0] == '#') {
    91             String mapName(m_name.domString().copy());
     89        String mapName = attr->value();
     90        if (mapName[0] == '#')
    9291            mapName.remove(0, 1);
    93             m_name = mapName;
    94         }
     92        m_name = doc->htmlMode() == Document::XHtml ? mapName : mapName.lower();
    9593        doc->addImageMap(this);
    9694    } else
Note: See TracChangeset for help on using the changeset viewer.