mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update GPUObjectBase webidl and cleanup valid flags
This commit is contained in:
parent
3216209506
commit
cdc0a75fe4
20 changed files with 229 additions and 251 deletions
|
@ -6,7 +6,7 @@ use crate::dom::bindings::cell::DomRefCell;
|
|||
use crate::dom::bindings::codegen::Bindings::GPUShaderModuleBinding::GPUShaderModuleMethods;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::str::USVString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use dom_struct::dom_struct;
|
||||
use webgpu::WebGPUShaderModule;
|
||||
|
@ -14,7 +14,7 @@ use webgpu::WebGPUShaderModule;
|
|||
#[dom_struct]
|
||||
pub struct GPUShaderModule {
|
||||
reflector_: Reflector,
|
||||
label: DomRefCell<Option<DOMString>>,
|
||||
label: DomRefCell<Option<USVString>>,
|
||||
shader_module: WebGPUShaderModule,
|
||||
}
|
||||
|
||||
|
@ -43,12 +43,12 @@ impl GPUShaderModule {
|
|||
|
||||
impl GPUShaderModuleMethods for GPUShaderModule {
|
||||
/// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
|
||||
fn GetLabel(&self) -> Option<DOMString> {
|
||||
fn GetLabel(&self) -> Option<USVString> {
|
||||
self.label.borrow().clone()
|
||||
}
|
||||
|
||||
/// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
|
||||
fn SetLabel(&self, value: Option<DOMString>) {
|
||||
fn SetLabel(&self, value: Option<USVString>) {
|
||||
*self.label.borrow_mut() = value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue