Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove HTMLPreElement.wrap IDL attribute
Remove HTMLPreElement.wrap IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=249965

Reviewed by Alexey Shvayka.

This patch is to align WebKit with Gecko / Firefox, Blink / Chromium and web-specification.

Merge - https://src.chromium.org/viewvc/blink?view=rev&revision=179131

This patch remove "wrap" from IDL file of the "Pre" element and align WebKit with web
standards. It was removed from Blink in 2014.

* Source/WebCore/html/HTMLPreElement.idl: Remove 'wrap'
* LayoutTests/fast/dom/boolean-attribute-reflection.html: Rebaselined
* LayoutTests/fast/dom/boolean-attribute-reflection-expected.txt: Rebaselined

Canonical link: https://commits.webkit.org/258445@main
  • Loading branch information
Ahmad-S792 authored and Ahmad Saleem committed Jan 4, 2023
1 parent 941d50e commit e053000
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Expand Up @@ -79,10 +79,6 @@ PASS e = make('option'); e.removeAttribute('selected'); e.defaultSelected is fal
PASS e = make('option'); e.setAttribute('selected', ''); e.defaultSelected is true
PASS e = make('option'); e.setAttribute('selected', 'x'); e.defaultSelected = false; e.getAttribute('selected') is null
PASS e = make('option'); e.setAttribute('selected', 'x'); e.defaultSelected = true; e.getAttribute('selected') is ''
PASS e = make('pre'); e.removeAttribute('wrap'); e.wrap is false
PASS e = make('pre'); e.setAttribute('wrap', ''); e.wrap is true
PASS e = make('pre'); e.setAttribute('wrap', 'x'); e.wrap = false; e.getAttribute('wrap') is null
PASS e = make('pre'); e.setAttribute('wrap', 'x'); e.wrap = true; e.getAttribute('wrap') is ''
PASS e = make('script'); e.removeAttribute('defer'); e.defer is false
PASS e = make('script'); e.setAttribute('defer', ''); e.defer is true
PASS e = make('script'); e.setAttribute('defer', 'x'); e.defer = false; e.getAttribute('defer') is null
Expand Down
4 changes: 1 addition & 3 deletions LayoutTests/fast/dom/boolean-attribute-reflection.html
@@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
Expand All @@ -27,7 +27,6 @@
[ "object", "declare" ],
[ "ol", "compact" ],
[ "option", "defaultSelected", "selected" ],
[ "pre", "wrap" ],
[ "script", "defer" ],
[ "select", "multiple" ],
[ "td", "noWrap" ],
Expand Down Expand Up @@ -66,6 +65,5 @@
"''");
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions Source/WebCore/html/HTMLPreElement.idl
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006, 2010 Apple Inc. All right reserved.
* Copyright (C) 2006-2023 Apple Inc. All right reserved.
* Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
*
* This library is free software; you can redistribute it and/or
Expand All @@ -18,14 +18,14 @@
* Boston, MA 02110-1301, USA.
*/

// https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
// https://html.spec.whatwg.org/#the-pre-element

[
Exposed=Window
] interface HTMLPreElement : HTMLElement {
// FIXME: DOM spec says that width should be of type DOMString
// see http://bugs.webkit.org/show_bug.cgi?id=8992
[CEReactions=NotNeeded, Reflect] attribute long width;

// Extensions
[CEReactions=NotNeeded, Reflect] attribute boolean wrap;
};

0 comments on commit e053000

Please sign in to comment.