[Webkit-unassigned] [Bug 14845] Frame's noResize attribute can not be set by JavaScript

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 26 23:15:30 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=14845


Daniel Bates <dbates at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dbates at webkit.org




--- Comment #17 from Daniel Bates <dbates at webkit.org>  2011-03-26 23:15:30 PST ---
> I've never seen this convention before:
> m_noResize = !attr->isNull();

This conventions comes up when handling HTML boolean attributes (e.g. disabled, checked). By section 2.5.2 of the HTML5 spec <http://www.w3.org/TR/html5/common-microsyntaxes.html#boolean-attributes> the "presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value."

> I didn't realize that parseMappedAttribute was called when an attribute was removed?

Yes, it is called when an attribute is removed. One such call chain is via Element.removeAttribute():

WebCore::jsElementPrototypeFunctionRemoveAttribute() => WebCore::Element::removeAttribute() => WebCore::NamedNodeMap::removeNamedItem(const String& name, ExceptionCode& ec) => NamedNodeMap::removeNamedItem(const QualifiedName& name, ExceptionCode& ec) => WebCore::NamedNodeMap::removeAttribute() =>  WebCore::StyledElement::attributeChanged() => WebCore::HTMLFrameElement::parseMappedAttribute()

Similar call chains exist when removing the attribute via the Web Inspector.

> 
> I also don't see how attr->isNull() will return true when noResize="false"?

It should not return true. We want to disallow frame resize for this case by section 2.5.2 of the HTML5 spec <http://www.w3.org/TR/html5/common-microsyntaxes.html#boolean-attributes>.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list