Changeset 18523 in webkit


Ignore:
Timestamp:
Jan 2, 2007 6:12:09 AM (17 years ago)
Author:
weinig
Message:

LayoutTests:

Reviewed by Darin.

Testcases for http://bugs.webkit.org/show_bug.cgi?id=3360

  • fast/forms/input-align-expected.checksum: Added.
  • fast/forms/input-align-expected.png: Added.
  • fast/forms/input-align-expected.txt: Added.
  • fast/forms/input-align-image-expected.checksum: Added.
  • fast/forms/input-align-image-expected.png: Added.
  • fast/forms/input-align-image-expected.txt: Added.
  • fast/forms/input-align-image.html: Added.
  • fast/forms/input-align.html: Added.

WebCore:

Reviewed by Darin.

Patch for http://bugs.webkit.org/show_bug.cgi?id=3360
align="right" on a text input aligns the input field to the right

Don't map align if input type is not 'image'.

Test: fast/forms/input-align-image.html
Test: fast/forms/input-align.html

  • WebCore.xcodeproj/project.pbxproj:
  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setInputType): (WebCore::HTMLInputElement::mapToEntry): (WebCore::HTMLInputElement::parseMappedAttribute):
Location:
trunk
Files:
8 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r18522 r18523  
     12007-01-02  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        Testcases for http://bugs.webkit.org/show_bug.cgi?id=3360
     6
     7        * fast/forms/input-align-expected.checksum: Added.
     8        * fast/forms/input-align-expected.png: Added.
     9        * fast/forms/input-align-expected.txt: Added.
     10        * fast/forms/input-align-image-expected.checksum: Added.
     11        * fast/forms/input-align-image-expected.png: Added.
     12        * fast/forms/input-align-image-expected.txt: Added.
     13        * fast/forms/input-align-image.html: Added.
     14        * fast/forms/input-align.html: Added.
     15
    1162007-01-02  Nikolas Zimmermann  <zimmermann@kde.org>
    217
  • trunk/WebCore/ChangeLog

    r18521 r18523  
     12007-01-02  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Darin.
     4
     5        Patch for http://bugs.webkit.org/show_bug.cgi?id=3360
     6        align="right" on a text input aligns the input field to the right
     7
     8        Don't map align if input type is not 'image'.
     9
     10        Test: fast/forms/input-align-image.html
     11        Test: fast/forms/input-align.html
     12
     13        * WebCore.xcodeproj/project.pbxproj:
     14        * html/HTMLInputElement.cpp:
     15        (WebCore::HTMLInputElement::setInputType):
     16        (WebCore::HTMLInputElement::mapToEntry):
     17        (WebCore::HTMLInputElement::parseMappedAttribute):
     18
    1192007-01-02  Nikolas Zimmermann  <zimmermann@kde.org>
    220
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r18521 r18523  
    78637863                                A871DE1F0A152AC800B12A68 /* HTMLFrameElement.h */,
    78647864                                855542950AA4938800BA89F2 /* HTMLFrameElement.idl */,
     7865                                14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */,
     7866                                14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */,
     7867                                93E2425E0B2B509500C732A1 /* HTMLFrameOwnerElement.cpp */,
    78657868                                93E241FE0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h */,
    7866                                 93E2425E0B2B509500C732A1 /* HTMLFrameOwnerElement.cpp */,
    78677869                                A871DE220A152AC800B12A68 /* HTMLFrameSetElement.cpp */,
    78687870                                A871DE1C0A152AC800B12A68 /* HTMLFrameSetElement.h */,
     
    80018003                                BCCD74E40A4C8DDF005FDA6D /* HTMLViewSourceDocument.cpp */,
    80028004                                BCCD74DB0A4C8D35005FDA6D /* HTMLViewSourceDocument.h */,
    8003                                 14FFE31B0AE1963300136BF5 /* HTMLFrameElementBase.h */,
    8004                                 14FFE31C0AE1963300136BF5 /* HTMLFrameElementBase.cpp */,
    80058005                        );
    80068006                        path = html;
  • trunk/WebCore/html/HTMLInputElement.cpp

    r18384 r18523  
    77 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
    88 *           (C) 2006 Alexey Proskuryakov (ap@nypop.com)
     9 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
    910 *
    1011 * This library is free software; you can redistribute it and/or
     
    322323                if (MappedAttribute* width = map->getAttributeItem(widthAttr))
    323324                    attributeChanged(width, false);
     325                if (MappedAttribute* align = map->getAttributeItem(alignAttr))
     326                    attributeChanged(align, false);
    324327            }
    325328
     
    660663        return false;
    661664    }
    662    
     665
    663666    if (attrName == alignAttr) {
    664         result = eReplaced; // Share with <img> since the alignment behavior is the same.
    665         return false;
    666     }
    667    
     667        if (inputType() == IMAGE) {
     668            // Share with <img> since the alignment behavior is the same.
     669            result = eReplaced;
     670            return false;
     671        }
     672    }
     673
    668674    return HTMLElement::mapToEntry(attrName, result);
    669675}
     
    733739        addCSSLength(attr, CSS_PROP_MARGIN_RIGHT, attr->value());
    734740    } else if (attr->name() == alignAttr) {
    735         addHTMLAlignment(attr);
     741        if (inputType() == IMAGE)
     742            addHTMLAlignment(attr);
    736743    } else if (attr->name() == widthAttr) {
    737744        if (respectHeightAndWidthAttrs())
Note: See TracChangeset for help on using the changeset viewer.