mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
The HTML specification defines the 'width' and 'height' attributes as dimension attributes for the embedded content and images (img, iframe, embed, object, video, source, input with image type) https://html.spec.whatwg.org/multipage/#dimension-attributes and for the tables (table, col, colgroup, thead, tbody, tfoot, tr, td, th) even these attributes are marked as obsolete. And UA are expected to use these 'width' and 'height' attributes as style presentational hints for the rendering. The embedded content and images: https://html.spec.whatwg.org/multipage/#dimRendering The tables: https://html.spec.whatwg.org/multipage/#tables-2:the-table-element-4 Added missing 'width' and/or 'height' reflected IDL attributes: - conformant 'unsigned long' IDL attributes for the 'img, source, video' (with new macro 'make_dimension_uint*) - obsolete 'DOMString' IDL attributes for the 'td, th, col, colgroup' Moved the `fn attribute_affects_presentational_hints()` from Element to specific HTML and SVG elements with attributes which affects presentational hints for rendering. Testing: Improvements in the following tests - html/dom/idlharness.https.html - html/dom/reflection-embedded.html - html/dom/reflection-tabular.html - html/rendering/replaced-elements/attributes-for-embedded-content-and-images/picture-aspect-ratio.html Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
// https://html.spec.whatwg.org/multipage/#htmliframeelement
|
|
[Exposed=Window]
|
|
interface HTMLIFrameElement : HTMLElement {
|
|
[HTMLConstructor] constructor();
|
|
|
|
[CEReactions]
|
|
attribute USVString src;
|
|
[CEReactions, SetterThrows]
|
|
attribute (TrustedHTML or DOMString) srcdoc;
|
|
|
|
[CEReactions]
|
|
attribute DOMString name;
|
|
|
|
[SameObject, PutForwards=value]
|
|
readonly attribute DOMTokenList sandbox;
|
|
// [CEReactions]
|
|
// attribute boolean seamless;
|
|
[CEReactions]
|
|
attribute boolean allowFullscreen;
|
|
[CEReactions] attribute DOMString width;
|
|
[CEReactions]
|
|
attribute DOMString referrerPolicy;
|
|
[CEReactions] attribute DOMString height;
|
|
readonly attribute Document? contentDocument;
|
|
readonly attribute WindowProxy? contentWindow;
|
|
|
|
// also has obsolete members
|
|
};
|
|
|
|
// https://html.spec.whatwg.org/multipage/#HTMLIFrameElement-partial
|
|
partial interface HTMLIFrameElement {
|
|
// [CEReactions]
|
|
// attribute DOMString align;
|
|
// [CEReactions]
|
|
// attribute DOMString scrolling;
|
|
[CEReactions]
|
|
attribute DOMString frameBorder;
|
|
// [CEReactions]
|
|
// attribute DOMString longDesc;
|
|
|
|
// [CEReactions, LegacyNullToEmptyString]
|
|
// attribute DOMString marginHeight;
|
|
// [CEReactions, LegacyNullToEmptyString]
|
|
// attribute DOMString marginWidth;
|
|
};
|