Changeset 86695 in webkit


Ignore:
Timestamp:
May 17, 2011 12:26:11 PM (13 years ago)
Author:
andreas.kling@nokia.com
Message:

2011-05-17 Andreas Kling <kling@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

Area element doesn't update region when dynamically altered.
https://bugs.webkit.org/show_bug.cgi?id=54636

  • fast/images/imagemap-dynamic-area-updates-expected.txt: Added.
  • fast/images/imagemap-dynamic-area-updates.html: Added.
  • fast/images/script-tests/imagemap-dynamic-area-updates.js: Added. (setArea): (checkForArea):

2011-05-17 Andreas Kling <kling@webkit.org>

Reviewed by Kenneth Rohde Christiansen.

Area element doesn't update region when dynamically altered.
https://bugs.webkit.org/show_bug.cgi?id=54636

Recompute the clickable region after the "shape" or "coords" attribute
of an area element is changed.

Test: fast/images/imagemap-dynamic-area-updates.html

  • html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::parseMappedAttribute): (WebCore::HTMLAreaElement::invalidateCachedRegion):
  • html/HTMLAreaElement.h:
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r86693 r86695  
     12011-05-17  Andreas Kling  <kling@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Area element doesn't update region when dynamically altered.
     6        https://bugs.webkit.org/show_bug.cgi?id=54636
     7
     8        * fast/images/imagemap-dynamic-area-updates-expected.txt: Added.
     9        * fast/images/imagemap-dynamic-area-updates.html: Added.
     10        * fast/images/script-tests/imagemap-dynamic-area-updates.js: Added.
     11        (setArea):
     12        (checkForArea):
     13
    1142011-05-09  Luiz Agostini  <luiz.agostini@openbossa.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r86693 r86695  
     12011-05-17  Andreas Kling  <kling@webkit.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Area element doesn't update region when dynamically altered.
     6        https://bugs.webkit.org/show_bug.cgi?id=54636
     7
     8        Recompute the clickable region after the "shape" or "coords" attribute
     9        of an area element is changed.
     10
     11        Test: fast/images/imagemap-dynamic-area-updates.html
     12
     13        * html/HTMLAreaElement.cpp:
     14        (WebCore::HTMLAreaElement::parseMappedAttribute):
     15        (WebCore::HTMLAreaElement::invalidateCachedRegion):
     16        * html/HTMLAreaElement.h:
     17
    1182011-05-09  Luiz Agostini  <luiz.agostini@openbossa.org>
    219
  • trunk/Source/WebCore/html/HTMLAreaElement.cpp

    r80779 r86695  
    6464        else if (equalIgnoringCase(attr->value(), "rect"))
    6565            m_shape = Rect;
     66        invalidateCachedRegion();
    6667    } else if (attr->name() == coordsAttr) {
    6768        m_coords = newCoordsArray(attr->value().string(), m_coordsLen);
     69        invalidateCachedRegion();
    6870    } else if (attr->name() == altAttr || attr->name() == accesskeyAttr) {
    6971        // Do nothing.
    7072    } else
    7173        HTMLAnchorElement::parseMappedAttribute(attr);
     74}
     75
     76void HTMLAreaElement::invalidateCachedRegion()
     77{
     78    m_lastSize = IntSize(-1, -1);
    7279}
    7380
  • trunk/Source/WebCore/html/HTMLAreaElement.h

    r78261 r86695  
    6262    enum Shape { Default, Poly, Rect, Circle, Unknown };
    6363    Path getRegion(const IntSize&) const;
     64    void invalidateCachedRegion();
    6465
    6566    OwnPtr<Path> m_region;
Note: See TracChangeset for help on using the changeset viewer.