forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance <input type=color>: infrastructure for alpha and colorspace a…
…ttributes https://bugs.webkit.org/show_bug.cgi?id=281213 rdar://137663314 Reviewed by NOBODY (OOPS!). Add the necessary infrastructure for whatwg/html#10456. In particular: - Support the alpha and colorspace attributes behind a preference. - When the preference is enabled vastly expand the CSS color parsing and serialization capabilities of <input type=color>. A future change will adjust the UI accordingly and add the necessary tests. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/html/ColorInputType.cpp: (WebCore::colorParsingParameters): (WebCore::parseColorValue): (WebCore::serializeColorValue): (WebCore::ColorInputType::fallbackValue const): (WebCore::ColorInputType::sanitizeValue const): (WebCore::ColorInputType::valueAsColor const): (WebCore::ColorInputType::typeMismatchFor const): (WebCore::ColorInputType::didChooseColor): (WebCore::ColorInputType::suggestedColors const): (WebCore::ColorInputType::selectColor): * Source/WebCore/html/HTMLAttributeNames.in: * Source/WebCore/html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::alpha): (WebCore::HTMLInputElement::colorSpace): (WebCore::HTMLInputElement::setColorSpace): * Source/WebCore/html/HTMLInputElement.h: * Source/WebCore/html/HTMLInputElement.idl:
- Loading branch information
Showing
6 changed files
with
121 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2006, 2010 Apple Inc. All rights reserved. | ||
* Copyright (C) 2006-2024 Apple Inc. All rights reserved. | ||
* Copyright (C) 2006 Samuel Weinig <[email protected]> | ||
* Copyright (C) 2012 Samsung Electronics. All rights reserved. | ||
* | ||
|
@@ -25,10 +25,12 @@ | |
Exposed=Window | ||
] interface HTMLInputElement : HTMLElement { | ||
[CEReactions=NotNeeded, Reflect] attribute DOMString accept; | ||
[EnabledBySetting=InputTypeColorEnhancementsEnabled, CEReactions=NotNeeded, Reflect] attribute boolean alpha; | ||
[CEReactions=NotNeeded, Reflect] attribute DOMString alt; | ||
[CEReactions=NotNeeded] attribute [AtomString] DOMString autocomplete; | ||
[CEReactions=NotNeeded, Reflect=checked] attribute boolean defaultChecked; | ||
attribute boolean checked; | ||
[EnabledBySetting=InputTypeColorEnhancementsEnabled, CEReactions=NotNeeded] attribute [AtomString] DOMString colorSpace; | ||
[CEReactions=NotNeeded, Reflect] attribute DOMString dirName; | ||
[CEReactions=NotNeeded, Reflect] attribute boolean disabled; | ||
readonly attribute HTMLFormElement form; | ||
|