mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
auto merge of #4157 : nkdalmia/servo/master, r=jdm
Changes * Implemented Storage Task * Used Storage Task in methods of storage.rs * Updated webstorage test expectations Pending Changes: * Handle Storage Event * Throw QuotaExceededError in case of failure for method setItem * localStorage as alias of sessionStorage
This commit is contained in:
commit
0d2251510f
31 changed files with 347 additions and 109 deletions
|
@ -28,6 +28,8 @@ use servo_msg::constellation_msg;
|
||||||
use servo_net::image_cache_task::{ImageCacheTask, ImageCacheTaskClient};
|
use servo_net::image_cache_task::{ImageCacheTask, ImageCacheTaskClient};
|
||||||
use servo_net::resource_task::ResourceTask;
|
use servo_net::resource_task::ResourceTask;
|
||||||
use servo_net::resource_task;
|
use servo_net::resource_task;
|
||||||
|
use servo_net::storage_task::StorageTask;
|
||||||
|
use servo_net::storage_task;
|
||||||
use servo_util::geometry::{PagePx, ViewportPx};
|
use servo_util::geometry::{PagePx, ViewportPx};
|
||||||
use servo_util::opts;
|
use servo_util::opts;
|
||||||
use servo_util::task::spawn_named;
|
use servo_util::task::spawn_named;
|
||||||
|
@ -60,6 +62,9 @@ pub struct Constellation<LTF, STF> {
|
||||||
/// A channel through which messages can be sent to the developer tools.
|
/// A channel through which messages can be sent to the developer tools.
|
||||||
devtools_chan: Option<DevtoolsControlChan>,
|
devtools_chan: Option<DevtoolsControlChan>,
|
||||||
|
|
||||||
|
/// A channel through which messages can be sent to the storage task.
|
||||||
|
storage_task: StorageTask,
|
||||||
|
|
||||||
/// A list of all the pipelines. (See the `pipeline` module for more details.)
|
/// A list of all the pipelines. (See the `pipeline` module for more details.)
|
||||||
pipelines: HashMap<PipelineId, Rc<Pipeline>>,
|
pipelines: HashMap<PipelineId, Rc<Pipeline>>,
|
||||||
|
|
||||||
|
@ -311,7 +316,8 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
||||||
image_cache_task: ImageCacheTask,
|
image_cache_task: ImageCacheTask,
|
||||||
font_cache_task: FontCacheTask,
|
font_cache_task: FontCacheTask,
|
||||||
time_profiler_chan: TimeProfilerChan,
|
time_profiler_chan: TimeProfilerChan,
|
||||||
devtools_chan: Option<DevtoolsControlChan>)
|
devtools_chan: Option<DevtoolsControlChan>,
|
||||||
|
storage_task: StorageTask)
|
||||||
-> ConstellationChan {
|
-> ConstellationChan {
|
||||||
let (constellation_port, constellation_chan) = ConstellationChan::new();
|
let (constellation_port, constellation_chan) = ConstellationChan::new();
|
||||||
let constellation_chan_clone = constellation_chan.clone();
|
let constellation_chan_clone = constellation_chan.clone();
|
||||||
|
@ -324,6 +330,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
||||||
resource_task: resource_task,
|
resource_task: resource_task,
|
||||||
image_cache_task: image_cache_task,
|
image_cache_task: image_cache_task,
|
||||||
font_cache_task: font_cache_task,
|
font_cache_task: font_cache_task,
|
||||||
|
storage_task: storage_task,
|
||||||
pipelines: HashMap::new(),
|
pipelines: HashMap::new(),
|
||||||
navigation_context: NavigationContext::new(),
|
navigation_context: NavigationContext::new(),
|
||||||
next_pipeline_id: PipelineId(0),
|
next_pipeline_id: PipelineId(0),
|
||||||
|
@ -365,6 +372,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
||||||
self.image_cache_task.clone(),
|
self.image_cache_task.clone(),
|
||||||
self.font_cache_task.clone(),
|
self.font_cache_task.clone(),
|
||||||
self.resource_task.clone(),
|
self.resource_task.clone(),
|
||||||
|
self.storage_task.clone(),
|
||||||
self.time_profiler_chan.clone(),
|
self.time_profiler_chan.clone(),
|
||||||
self.window_size,
|
self.window_size,
|
||||||
script_pipeline,
|
script_pipeline,
|
||||||
|
@ -470,6 +478,7 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
|
||||||
self.devtools_chan.as_ref().map(|chan| {
|
self.devtools_chan.as_ref().map(|chan| {
|
||||||
chan.send(devtools_traits::ServerExitMsg);
|
chan.send(devtools_traits::ServerExitMsg);
|
||||||
});
|
});
|
||||||
|
self.storage_task.send(storage_task::Exit);
|
||||||
self.font_cache_task.exit();
|
self.font_cache_task.exit();
|
||||||
self.compositor_proxy.send(ShutdownComplete);
|
self.compositor_proxy.send(ShutdownComplete);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ use servo_msg::constellation_msg::{LoadData, WindowSizeData};
|
||||||
use servo_net::image_cache_task::ImageCacheTask;
|
use servo_net::image_cache_task::ImageCacheTask;
|
||||||
use gfx::font_cache_task::FontCacheTask;
|
use gfx::font_cache_task::FontCacheTask;
|
||||||
use servo_net::resource_task::ResourceTask;
|
use servo_net::resource_task::ResourceTask;
|
||||||
|
use servo_net::storage_task::StorageTask;
|
||||||
use servo_util::time::TimeProfilerChan;
|
use servo_util::time::TimeProfilerChan;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
@ -52,6 +53,7 @@ impl Pipeline {
|
||||||
image_cache_task: ImageCacheTask,
|
image_cache_task: ImageCacheTask,
|
||||||
font_cache_task: FontCacheTask,
|
font_cache_task: FontCacheTask,
|
||||||
resource_task: ResourceTask,
|
resource_task: ResourceTask,
|
||||||
|
storage_task: StorageTask,
|
||||||
time_profiler_chan: TimeProfilerChan,
|
time_profiler_chan: TimeProfilerChan,
|
||||||
window_size: WindowSizeData,
|
window_size: WindowSizeData,
|
||||||
script_pipeline: Option<Rc<Pipeline>>,
|
script_pipeline: Option<Rc<Pipeline>>,
|
||||||
|
@ -80,6 +82,7 @@ impl Pipeline {
|
||||||
constellation_chan.clone(),
|
constellation_chan.clone(),
|
||||||
failure.clone(),
|
failure.clone(),
|
||||||
resource_task.clone(),
|
resource_task.clone(),
|
||||||
|
storage_task.clone(),
|
||||||
image_cache_task.clone(),
|
image_cache_task.clone(),
|
||||||
devtools_chan,
|
devtools_chan,
|
||||||
window_size);
|
window_size);
|
||||||
|
|
|
@ -37,6 +37,7 @@ pub mod data_loader;
|
||||||
pub mod image_cache_task;
|
pub mod image_cache_task;
|
||||||
pub mod local_image_cache;
|
pub mod local_image_cache;
|
||||||
pub mod resource_task;
|
pub mod resource_task;
|
||||||
|
pub mod storage_task;
|
||||||
mod sniffer_task;
|
mod sniffer_task;
|
||||||
|
|
||||||
/// An implementation of the [Fetch spec](http://fetch.spec.whatwg.org/)
|
/// An implementation of the [Fetch spec](http://fetch.spec.whatwg.org/)
|
||||||
|
|
165
components/net/storage_task.rs
Normal file
165
components/net/storage_task.rs
Normal file
|
@ -0,0 +1,165 @@
|
||||||
|
/* 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 http://mozilla.org/MPL/2.0/. */
|
||||||
|
use std::comm::{channel, Receiver, Sender};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
use std::collections::TreeMap;
|
||||||
|
use url::Url;
|
||||||
|
|
||||||
|
use servo_util::str::DOMString;
|
||||||
|
use servo_util::task::spawn_named;
|
||||||
|
|
||||||
|
/// Request operations on the storage data associated with a particular url
|
||||||
|
pub enum StorageTaskMsg {
|
||||||
|
/// gets the number of key/value pairs present in the associated storage data
|
||||||
|
Length(Sender<u32>, Url),
|
||||||
|
|
||||||
|
/// gets the name of the key at the specified index in the associated storage data
|
||||||
|
Key(Sender<Option<DOMString>>, Url, u32),
|
||||||
|
|
||||||
|
/// gets the value associated with the given key in the associated storage data
|
||||||
|
GetItem(Sender<Option<DOMString>>, Url, DOMString),
|
||||||
|
|
||||||
|
/// sets the value of the given key in the associated storage data
|
||||||
|
/// TODO throw QuotaExceededError in case of error
|
||||||
|
SetItem(Sender<bool>, Url, DOMString, DOMString),
|
||||||
|
|
||||||
|
/// removes the key/value pair for the given key in the associated storage data
|
||||||
|
RemoveItem(Sender<bool>, Url, DOMString),
|
||||||
|
|
||||||
|
/// clears the associated storage data by removing all the key/value pairs
|
||||||
|
Clear(Sender<bool>, Url),
|
||||||
|
|
||||||
|
/// shut down this task
|
||||||
|
Exit
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Handle to a storage task
|
||||||
|
pub type StorageTask = Sender<StorageTaskMsg>;
|
||||||
|
|
||||||
|
pub trait StorageTaskFactory {
|
||||||
|
fn new() -> StorageTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl StorageTaskFactory for StorageTask {
|
||||||
|
/// Create a StorageTask
|
||||||
|
fn new() -> StorageTask {
|
||||||
|
let (chan, port) = channel();
|
||||||
|
spawn_named("StorageManager", proc() {
|
||||||
|
StorageManager::new(port).start();
|
||||||
|
});
|
||||||
|
chan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct StorageManager {
|
||||||
|
port: Receiver<StorageTaskMsg>,
|
||||||
|
data: HashMap<String, TreeMap<DOMString, DOMString>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl StorageManager {
|
||||||
|
fn new(port: Receiver<StorageTaskMsg>) -> StorageManager {
|
||||||
|
StorageManager {
|
||||||
|
port: port,
|
||||||
|
data: HashMap::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl StorageManager {
|
||||||
|
fn start(&mut self) {
|
||||||
|
loop {
|
||||||
|
match self.port.recv() {
|
||||||
|
Length(sender, url) => {
|
||||||
|
self.length(sender, url)
|
||||||
|
}
|
||||||
|
Key(sender, url, index) => {
|
||||||
|
self.key(sender, url, index)
|
||||||
|
}
|
||||||
|
SetItem(sender, url, name, value) => {
|
||||||
|
self.set_item(sender, url, name, value)
|
||||||
|
}
|
||||||
|
GetItem(sender, url, name) => {
|
||||||
|
self.get_item(sender, url, name)
|
||||||
|
}
|
||||||
|
RemoveItem(sender, url, name) => {
|
||||||
|
self.remove_item(sender, url, name)
|
||||||
|
}
|
||||||
|
Clear(sender, url) => {
|
||||||
|
self.clear(sender, url)
|
||||||
|
}
|
||||||
|
Exit => {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn length(&self, sender: Sender<u32>, url: Url) {
|
||||||
|
let origin = self.get_origin_as_string(url);
|
||||||
|
sender.send(self.data.get(&origin).map_or(0u, |entry| entry.len()) as u32);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn key(&self, sender: Sender<Option<DOMString>>, url: Url, index: u32) {
|
||||||
|
let origin = self.get_origin_as_string(url);
|
||||||
|
sender.send(self.data.get(&origin)
|
||||||
|
.and_then(|entry| entry.keys().nth(index as uint))
|
||||||
|
.map(|key| key.clone()));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn set_item(&mut self, sender: Sender<bool>, url: Url, name: DOMString, value: DOMString) {
|
||||||
|
let origin = self.get_origin_as_string(url);
|
||||||
|
if !self.data.contains_key(&origin) {
|
||||||
|
self.data.insert(origin.clone(), TreeMap::new());
|
||||||
|
}
|
||||||
|
|
||||||
|
let updated = self.data.get_mut(&origin).map(|entry| {
|
||||||
|
if entry.get(&origin).map_or(true, |item| item.as_slice() != value.as_slice()) {
|
||||||
|
entry.insert(name.clone(), value.clone());
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}).unwrap();
|
||||||
|
|
||||||
|
sender.send(updated);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_item(&self, sender: Sender<Option<DOMString>>, url: Url, name: DOMString) {
|
||||||
|
let origin = self.get_origin_as_string(url);
|
||||||
|
sender.send(self.data.get(&origin)
|
||||||
|
.and_then(|entry| entry.get(&name))
|
||||||
|
.map(|value| value.to_string()));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn remove_item(&mut self, sender: Sender<bool>, url: Url, name: DOMString) {
|
||||||
|
let origin = self.get_origin_as_string(url);
|
||||||
|
sender.send(self.data.get_mut(&origin)
|
||||||
|
.map_or(false, |entry| entry.remove(&name).is_some()));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn clear(&mut self, sender: Sender<bool>, url: Url) {
|
||||||
|
let origin = self.get_origin_as_string(url);
|
||||||
|
sender.send(self.data.get_mut(&origin)
|
||||||
|
.map_or(false, |entry| {
|
||||||
|
if !entry.is_empty() {
|
||||||
|
entry.clear();
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}}));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_origin_as_string(&self, url: Url) -> String {
|
||||||
|
let mut origin = "".to_string();
|
||||||
|
origin.push_str(url.scheme.as_slice());
|
||||||
|
origin.push_str("://");
|
||||||
|
url.domain().map(|domain| origin.push_str(domain.as_slice()));
|
||||||
|
url.port().map(|port| {
|
||||||
|
origin.push_str(":");
|
||||||
|
origin.push_str(port.to_string().as_slice());
|
||||||
|
});
|
||||||
|
origin.push_str("/");
|
||||||
|
origin
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,58 +4,117 @@
|
||||||
|
|
||||||
use dom::bindings::codegen::Bindings::StorageBinding;
|
use dom::bindings::codegen::Bindings::StorageBinding;
|
||||||
use dom::bindings::codegen::Bindings::StorageBinding::StorageMethods;
|
use dom::bindings::codegen::Bindings::StorageBinding::StorageMethods;
|
||||||
use dom::bindings::global::GlobalRef;
|
use dom::bindings::global::{GlobalRef, GlobalField};
|
||||||
use dom::bindings::js::{JSRef, Temporary};
|
use dom::bindings::js::{JSRef, Temporary};
|
||||||
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
|
||||||
|
use dom::bindings::error::Fallible;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
use servo_net::storage_task::StorageTask;
|
||||||
|
use servo_net::storage_task::StorageTaskMsg;
|
||||||
|
use std::comm::channel;
|
||||||
|
use url::Url;
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct Storage {
|
pub struct Storage {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
|
global: GlobalField,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Storage {
|
impl Storage {
|
||||||
fn new_inherited() -> Storage {
|
fn new_inherited(global: &GlobalRef) -> Storage {
|
||||||
Storage {
|
Storage {
|
||||||
reflector_: Reflector::new(),
|
reflector_: Reflector::new(),
|
||||||
|
global: GlobalField::from_rooted(global),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new(global: GlobalRef) -> Temporary<Storage> {
|
pub fn new(global: &GlobalRef) -> Temporary<Storage> {
|
||||||
reflect_dom_object(box Storage::new_inherited(), global, StorageBinding::Wrap)
|
reflect_dom_object(box Storage::new_inherited(global), *global, StorageBinding::Wrap)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn Constructor(global: &GlobalRef) -> Fallible<Temporary<Storage>> {
|
||||||
|
Ok(Storage::new(global))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_url(&self) -> Url {
|
||||||
|
let global_root = self.global.root();
|
||||||
|
let global_ref = global_root.root_ref();
|
||||||
|
global_ref.get_url()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn get_storage_task(&self) -> StorageTask {
|
||||||
|
let global_root = self.global.root();
|
||||||
|
let global_ref = global_root.root_ref();
|
||||||
|
global_ref.as_window().storage_task()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> StorageMethods for JSRef<'a, Storage> {
|
impl<'a> StorageMethods for JSRef<'a, Storage> {
|
||||||
fn Length(self) -> u32 {
|
fn Length(self) -> u32 {
|
||||||
0
|
let (sender, receiver) = channel();
|
||||||
|
|
||||||
|
self.get_storage_task().send(StorageTaskMsg::Length(sender, self.get_url()));
|
||||||
|
receiver.recv()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Key(self, index: u32) -> Option<DOMString> {
|
fn Key(self, index: u32) -> Option<DOMString> {
|
||||||
|
let (sender, receiver) = channel();
|
||||||
|
|
||||||
//Return null for out of range index
|
self.get_storage_task().send(StorageTaskMsg::Key(sender, self.get_url(), index));
|
||||||
if index >= self.Length() {
|
receiver.recv()
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
return None;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn GetItem(self, key: DOMString) -> Option<DOMString> {
|
fn GetItem(self, name: DOMString) -> Option<DOMString> {
|
||||||
if key.is_empty() {
|
let (sender, receiver) = channel();
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
return None;
|
self.get_storage_task().send(StorageTaskMsg::GetItem(sender, self.get_url(), name));
|
||||||
|
receiver.recv()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn NamedGetter(self, key: DOMString, found: &mut bool) -> Option<DOMString> {
|
fn NamedGetter(self, name: DOMString, found: &mut bool) -> Option<DOMString> {
|
||||||
let item = self.GetItem(key);
|
let item = self.GetItem(name);
|
||||||
*found = item.is_some();
|
*found = item.is_some();
|
||||||
item
|
item
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn SetItem(self, name: DOMString, value: DOMString) {
|
||||||
|
let (sender, receiver) = channel();
|
||||||
|
|
||||||
|
self.get_storage_task().send(StorageTaskMsg::SetItem(sender, self.get_url(), name, value));
|
||||||
|
if receiver.recv() {
|
||||||
|
//TODO send notification
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn NamedSetter(self, name: DOMString, value: DOMString) {
|
||||||
|
self.SetItem(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn NamedCreator(self, name: DOMString, value: DOMString) {
|
||||||
|
self.SetItem(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn RemoveItem(self, name: DOMString) {
|
||||||
|
let (sender, receiver) = channel();
|
||||||
|
|
||||||
|
self.get_storage_task().send(StorageTaskMsg::RemoveItem(sender, self.get_url(), name));
|
||||||
|
if receiver.recv() {
|
||||||
|
//TODO send notification
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn NamedDeleter(self, name: DOMString) {
|
||||||
|
self.RemoveItem(name);
|
||||||
|
}
|
||||||
|
|
||||||
fn Clear(self) {
|
fn Clear(self) {
|
||||||
|
let (sender, receiver) = channel();
|
||||||
|
|
||||||
|
self.get_storage_task().send(StorageTaskMsg::Clear(sender, self.get_url()));
|
||||||
|
if receiver.recv() {
|
||||||
|
//TODO send notification
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,9 @@ interface Storage {
|
||||||
|
|
||||||
getter DOMString? getItem(DOMString name);
|
getter DOMString? getItem(DOMString name);
|
||||||
|
|
||||||
//setter creator void setItem(DOMString name, DOMString value);
|
setter creator void setItem(DOMString name, DOMString value);
|
||||||
|
|
||||||
//deleter not supported yet
|
deleter void removeItem(DOMString name);
|
||||||
//deleter void removeItem(DOMString name);
|
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
};
|
};
|
||||||
|
|
|
@ -127,3 +127,10 @@ partial interface Window {
|
||||||
void gc();
|
void gc();
|
||||||
};
|
};
|
||||||
Window implements OnErrorEventHandlerForWindow;
|
Window implements OnErrorEventHandlerForWindow;
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/webstorage.html#dom-sessionstorage
|
||||||
|
[NoInterfaceObject]
|
||||||
|
interface WindowSessionStorage {
|
||||||
|
readonly attribute Storage sessionStorage;
|
||||||
|
};
|
||||||
|
Window implements WindowSessionStorage;
|
||||||
|
|
|
@ -20,6 +20,7 @@ use dom::location::Location;
|
||||||
use dom::navigator::Navigator;
|
use dom::navigator::Navigator;
|
||||||
use dom::performance::Performance;
|
use dom::performance::Performance;
|
||||||
use dom::screen::Screen;
|
use dom::screen::Screen;
|
||||||
|
use dom::storage::Storage;
|
||||||
use layout_interface::NoQuery;
|
use layout_interface::NoQuery;
|
||||||
use page::Page;
|
use page::Page;
|
||||||
use script_task::{ExitWindowMsg, ScriptChan, TriggerLoadMsg, TriggerFragmentMsg};
|
use script_task::{ExitWindowMsg, ScriptChan, TriggerLoadMsg, TriggerFragmentMsg};
|
||||||
|
@ -30,6 +31,7 @@ use timers::{Interval, NonInterval, TimerId, TimerManager};
|
||||||
use servo_msg::compositor_msg::ScriptListener;
|
use servo_msg::compositor_msg::ScriptListener;
|
||||||
use servo_msg::constellation_msg::LoadData;
|
use servo_msg::constellation_msg::LoadData;
|
||||||
use servo_net::image_cache_task::ImageCacheTask;
|
use servo_net::image_cache_task::ImageCacheTask;
|
||||||
|
use servo_net::storage_task::StorageTask;
|
||||||
use servo_util::str::{DOMString,HTML_SPACE_CHARACTERS};
|
use servo_util::str::{DOMString,HTML_SPACE_CHARACTERS};
|
||||||
|
|
||||||
use js::jsapi::JS_EvaluateUCScript;
|
use js::jsapi::JS_EvaluateUCScript;
|
||||||
|
@ -62,6 +64,7 @@ pub struct Window {
|
||||||
navigation_start: u64,
|
navigation_start: u64,
|
||||||
navigation_start_precise: f64,
|
navigation_start_precise: f64,
|
||||||
screen: MutNullableJS<Screen>,
|
screen: MutNullableJS<Screen>,
|
||||||
|
session_storage: MutNullableJS<Storage>,
|
||||||
timers: TimerManager
|
timers: TimerManager
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +109,10 @@ impl Window {
|
||||||
pub fn get_url(&self) -> Url {
|
pub fn get_url(&self) -> Url {
|
||||||
self.page().get_url()
|
self.page().get_url()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn storage_task(&self) -> StorageTask {
|
||||||
|
self.page().storage_task.clone()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://www.whatwg.org/html/#atob
|
// http://www.whatwg.org/html/#atob
|
||||||
|
@ -208,6 +215,14 @@ impl<'a> WindowMethods for JSRef<'a, Window> {
|
||||||
self.location.get().unwrap()
|
self.location.get().unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn SessionStorage(self) -> Temporary<Storage> {
|
||||||
|
if self.session_storage.get().is_none() {
|
||||||
|
let session_storage = Storage::new(&global::Window(self));
|
||||||
|
self.session_storage.assign(Some(session_storage));
|
||||||
|
}
|
||||||
|
self.session_storage.get().unwrap()
|
||||||
|
}
|
||||||
|
|
||||||
fn Console(self) -> Temporary<Console> {
|
fn Console(self) -> Temporary<Console> {
|
||||||
if self.console.get().is_none() {
|
if self.console.get().is_none() {
|
||||||
let console = Console::new(global::Window(self));
|
let console = Console::new(global::Window(self));
|
||||||
|
@ -412,6 +427,7 @@ impl Window {
|
||||||
navigation_start: time::get_time().sec as u64,
|
navigation_start: time::get_time().sec as u64,
|
||||||
navigation_start_precise: time::precise_time_s(),
|
navigation_start_precise: time::precise_time_s(),
|
||||||
screen: Default::default(),
|
screen: Default::default(),
|
||||||
|
session_storage: Default::default(),
|
||||||
timers: TimerManager::new()
|
timers: TimerManager::new()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ use servo_msg::compositor_msg::ScriptListener;
|
||||||
use servo_msg::constellation_msg::{ConstellationChan, WindowSizeData};
|
use servo_msg::constellation_msg::{ConstellationChan, WindowSizeData};
|
||||||
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
||||||
use servo_net::resource_task::ResourceTask;
|
use servo_net::resource_task::ResourceTask;
|
||||||
|
use servo_net::storage_task::StorageTask;
|
||||||
use servo_util::geometry::{Au, MAX_RECT};
|
use servo_util::geometry::{Au, MAX_RECT};
|
||||||
use servo_util::geometry;
|
use servo_util::geometry;
|
||||||
use servo_util::str::DOMString;
|
use servo_util::str::DOMString;
|
||||||
|
@ -86,6 +87,9 @@ pub struct Page {
|
||||||
/// Associated resource task for use by DOM objects like XMLHttpRequest
|
/// Associated resource task for use by DOM objects like XMLHttpRequest
|
||||||
pub resource_task: ResourceTask,
|
pub resource_task: ResourceTask,
|
||||||
|
|
||||||
|
/// A handle for communicating messages to the storage task.
|
||||||
|
pub storage_task: StorageTask,
|
||||||
|
|
||||||
/// A handle for communicating messages to the constellation task.
|
/// A handle for communicating messages to the constellation task.
|
||||||
pub constellation_chan: ConstellationChan,
|
pub constellation_chan: ConstellationChan,
|
||||||
|
|
||||||
|
@ -137,6 +141,7 @@ impl Page {
|
||||||
layout_chan: LayoutChan,
|
layout_chan: LayoutChan,
|
||||||
window_size: WindowSizeData,
|
window_size: WindowSizeData,
|
||||||
resource_task: ResourceTask,
|
resource_task: ResourceTask,
|
||||||
|
storage_task: StorageTask,
|
||||||
constellation_chan: ConstellationChan,
|
constellation_chan: ConstellationChan,
|
||||||
js_context: Rc<Cx>) -> Page {
|
js_context: Rc<Cx>) -> Page {
|
||||||
let js_info = JSPageInfo {
|
let js_info = JSPageInfo {
|
||||||
|
@ -165,6 +170,7 @@ impl Page {
|
||||||
fragment_name: DOMRefCell::new(None),
|
fragment_name: DOMRefCell::new(None),
|
||||||
last_reflow_id: Cell::new(0),
|
last_reflow_id: Cell::new(0),
|
||||||
resource_task: resource_task,
|
resource_task: resource_task,
|
||||||
|
storage_task: storage_task,
|
||||||
constellation_chan: constellation_chan,
|
constellation_chan: constellation_chan,
|
||||||
children: DOMRefCell::new(vec!()),
|
children: DOMRefCell::new(vec!()),
|
||||||
damaged: Cell::new(false),
|
damaged: Cell::new(false),
|
||||||
|
|
|
@ -55,6 +55,7 @@ use servo_msg::constellation_msg::{Released};
|
||||||
use servo_msg::constellation_msg;
|
use servo_msg::constellation_msg;
|
||||||
use servo_net::image_cache_task::ImageCacheTask;
|
use servo_net::image_cache_task::ImageCacheTask;
|
||||||
use servo_net::resource_task::ResourceTask;
|
use servo_net::resource_task::ResourceTask;
|
||||||
|
use servo_net::storage_task::StorageTask;
|
||||||
use servo_util::geometry::to_frac_px;
|
use servo_util::geometry::to_frac_px;
|
||||||
use servo_util::smallvec::{SmallVec1, SmallVec};
|
use servo_util::smallvec::{SmallVec1, SmallVec};
|
||||||
use servo_util::task::spawn_named_with_send_on_failure;
|
use servo_util::task::spawn_named_with_send_on_failure;
|
||||||
|
@ -262,6 +263,7 @@ impl ScriptTaskFactory for ScriptTask {
|
||||||
constellation_chan: ConstellationChan,
|
constellation_chan: ConstellationChan,
|
||||||
failure_msg: Failure,
|
failure_msg: Failure,
|
||||||
resource_task: ResourceTask,
|
resource_task: ResourceTask,
|
||||||
|
storage_task: StorageTask,
|
||||||
image_cache_task: ImageCacheTask,
|
image_cache_task: ImageCacheTask,
|
||||||
devtools_chan: Option<DevtoolsControlChan>,
|
devtools_chan: Option<DevtoolsControlChan>,
|
||||||
window_size: WindowSizeData)
|
window_size: WindowSizeData)
|
||||||
|
@ -279,6 +281,7 @@ impl ScriptTaskFactory for ScriptTask {
|
||||||
control_port,
|
control_port,
|
||||||
constellation_chan,
|
constellation_chan,
|
||||||
resource_task,
|
resource_task,
|
||||||
|
storage_task,
|
||||||
image_cache_task,
|
image_cache_task,
|
||||||
devtools_chan,
|
devtools_chan,
|
||||||
window_size);
|
window_size);
|
||||||
|
@ -310,6 +313,7 @@ impl ScriptTask {
|
||||||
control_port: Receiver<ConstellationControlMsg>,
|
control_port: Receiver<ConstellationControlMsg>,
|
||||||
constellation_chan: ConstellationChan,
|
constellation_chan: ConstellationChan,
|
||||||
resource_task: ResourceTask,
|
resource_task: ResourceTask,
|
||||||
|
storage_task: StorageTask,
|
||||||
img_cache_task: ImageCacheTask,
|
img_cache_task: ImageCacheTask,
|
||||||
devtools_chan: Option<DevtoolsControlChan>,
|
devtools_chan: Option<DevtoolsControlChan>,
|
||||||
window_size: WindowSizeData)
|
window_size: WindowSizeData)
|
||||||
|
@ -332,6 +336,7 @@ impl ScriptTask {
|
||||||
|
|
||||||
let page = Page::new(id, None, layout_chan, window_size,
|
let page = Page::new(id, None, layout_chan, window_size,
|
||||||
resource_task.clone(),
|
resource_task.clone(),
|
||||||
|
storage_task,
|
||||||
constellation_chan.clone(),
|
constellation_chan.clone(),
|
||||||
js_context.clone());
|
js_context.clone());
|
||||||
|
|
||||||
|
@ -652,6 +657,7 @@ impl ScriptTask {
|
||||||
LayoutChan(layout_chan.downcast_ref::<Sender<layout_interface::Msg>>().unwrap().clone()),
|
LayoutChan(layout_chan.downcast_ref::<Sender<layout_interface::Msg>>().unwrap().clone()),
|
||||||
window_size,
|
window_size,
|
||||||
parent_page.resource_task.clone(),
|
parent_page.resource_task.clone(),
|
||||||
|
parent_page.storage_task.clone(),
|
||||||
self.constellation_chan.clone(),
|
self.constellation_chan.clone(),
|
||||||
self.js_context.borrow().as_ref().unwrap().clone())
|
self.js_context.borrow().as_ref().unwrap().clone())
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,6 +29,7 @@ use servo_msg::constellation_msg::{LoadData, SubpageId, Key, KeyState, KeyModifi
|
||||||
use servo_msg::compositor_msg::ScriptListener;
|
use servo_msg::compositor_msg::ScriptListener;
|
||||||
use servo_net::image_cache_task::ImageCacheTask;
|
use servo_net::image_cache_task::ImageCacheTask;
|
||||||
use servo_net::resource_task::ResourceTask;
|
use servo_net::resource_task::ResourceTask;
|
||||||
|
use servo_net::storage_task::StorageTask;
|
||||||
use servo_util::smallvec::SmallVec1;
|
use servo_util::smallvec::SmallVec1;
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
|
|
||||||
|
@ -102,6 +103,7 @@ pub trait ScriptTaskFactory {
|
||||||
constellation_msg: ConstellationChan,
|
constellation_msg: ConstellationChan,
|
||||||
failure_msg: Failure,
|
failure_msg: Failure,
|
||||||
resource_task: ResourceTask,
|
resource_task: ResourceTask,
|
||||||
|
storage_task: StorageTask,
|
||||||
image_cache_task: ImageCacheTask,
|
image_cache_task: ImageCacheTask,
|
||||||
devtools_chan: Option<DevtoolsControlChan>,
|
devtools_chan: Option<DevtoolsControlChan>,
|
||||||
window_size: WindowSizeData)
|
window_size: WindowSizeData)
|
||||||
|
|
|
@ -44,6 +44,8 @@ use servo_net::image_cache_task::ImageCacheTask;
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
use servo_net::resource_task::new_resource_task;
|
use servo_net::resource_task::new_resource_task;
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
|
use servo_net::storage_task::StorageTaskFactory;
|
||||||
|
#[cfg(not(test))]
|
||||||
use gfx::font_cache_task::FontCacheTask;
|
use gfx::font_cache_task::FontCacheTask;
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
use servo_util::time::TimeProfiler;
|
use servo_util::time::TimeProfiler;
|
||||||
|
@ -113,6 +115,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
|
||||||
ImageCacheTask::new(resource_task.clone(), shared_task_pool)
|
ImageCacheTask::new(resource_task.clone(), shared_task_pool)
|
||||||
};
|
};
|
||||||
let font_cache_task = FontCacheTask::new(resource_task.clone());
|
let font_cache_task = FontCacheTask::new(resource_task.clone());
|
||||||
|
let storage_task = StorageTaskFactory::new();
|
||||||
let constellation_chan = Constellation::<layout::layout_task::LayoutTask,
|
let constellation_chan = Constellation::<layout::layout_task::LayoutTask,
|
||||||
script::script_task::ScriptTask>::start(
|
script::script_task::ScriptTask>::start(
|
||||||
compositor_proxy_for_constellation,
|
compositor_proxy_for_constellation,
|
||||||
|
@ -120,7 +123,8 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
|
||||||
image_cache_task,
|
image_cache_task,
|
||||||
font_cache_task,
|
font_cache_task,
|
||||||
time_profiler_chan_clone,
|
time_profiler_chan_clone,
|
||||||
devtools_chan);
|
devtools_chan,
|
||||||
|
storage_task);
|
||||||
|
|
||||||
// Send the URL command to the constellation.
|
// Send the URL command to the constellation.
|
||||||
let cwd = os::getcwd();
|
let cwd = os::getcwd();
|
||||||
|
|
|
@ -8184,9 +8184,6 @@
|
||||||
[Window interface: operation createImageBitmap(ImageBitmapSource,long,long,long,long)]
|
[Window interface: operation createImageBitmap(ImageBitmapSource,long,long,long,long)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Window interface: attribute sessionStorage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Window interface: attribute localStorage]
|
[Window interface: attribute localStorage]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -8526,9 +8523,6 @@
|
||||||
[Window interface: calling createImageBitmap(ImageBitmapSource,long,long,long,long) on window with too few arguments must throw TypeError]
|
[Window interface: calling createImageBitmap(ImageBitmapSource,long,long,long,long) on window with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Window interface: window must inherit property "sessionStorage" with the proper type (123)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Window interface: window must inherit property "localStorage" with the proper type (124)]
|
[Window interface: window must inherit property "localStorage" with the proper type (124)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -9477,12 +9471,6 @@
|
||||||
[Storage interface object length]
|
[Storage interface object length]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Storage interface: operation setItem(DOMString,DOMString)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Storage interface: operation removeItem(DOMString)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[StorageEvent interface: existence and properties of interface object]
|
[StorageEvent interface: existence and properties of interface object]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
[event_session_key.html]
|
[event_session_key.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
expected: TIMEOUT
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
[event_session_newvalue.html]
|
[event_session_newvalue.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
expected: TIMEOUT
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
[event_session_oldvalue.html]
|
[event_session_oldvalue.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
expected: TIMEOUT
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
[event_session_url.html]
|
[event_session_url.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
expected: TIMEOUT
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,11 @@
|
||||||
[idlharness.html]
|
[idlharness.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Window interface: attribute sessionStorage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Window interface: attribute localStorage]
|
[Window interface: attribute localStorage]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Storage interface object length]
|
[Storage interface object length]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Storage interface: operation setItem(DOMString,DOMString)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Storage interface: operation removeItem(DOMString)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Storage must be primary interface of window.localStorage]
|
[Storage must be primary interface of window.localStorage]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -15,21 +15,6 @@
|
||||||
[Should throw TypeError for function "function () { localStorage.removeItem(); }".]
|
[Should throw TypeError for function "function () { localStorage.removeItem(); }".]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Should throw TypeError for function "function () { sessionStorage.key(); }".]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Should throw TypeError for function "function () { sessionStorage.getItem(); }".]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Should throw TypeError for function "function () { sessionStorage.setItem(); }".]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Should throw TypeError for function "function () { sessionStorage.setItem("a"); }".]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Should throw TypeError for function "function () { sessionStorage.removeItem(); }".]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Should throw TypeError for function "function () { new StorageEvent(); }".]
|
[Should throw TypeError for function "function () { new StorageEvent(); }".]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
[storage_session_builtins.html]
|
[storage_session_builtins.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
[Web Storage]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[storage_session_clear.html]
|
|
||||||
type: testharness
|
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[storage_session_getitem.html]
|
|
||||||
type: testharness
|
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[storage_session_getitem_js.html]
|
[storage_session_getitem_js.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
[array access should be correct]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
[storage_session_in_js.html]
|
[storage_session_in_js.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Storage 1]
|
[Web Storage 1]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[storage_session_index_js.html]
|
[storage_session_index_js.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
[Web Storage 3]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[storage_session_key.html]
|
|
||||||
type: testharness
|
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[storage_session_length.html]
|
|
||||||
type: testharness
|
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[storage_session_removeitem.html]
|
|
||||||
type: testharness
|
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[storage_session_removeitem_js.html]
|
[storage_session_removeitem_js.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
[Web Storage 1]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[storage_session_setitem.html]
|
|
||||||
type: testharness
|
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +1,41 @@
|
||||||
[storage_session_setitem_js.html]
|
[storage_session_setitem_js.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage]
|
[Web Storage 2]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 3]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 4]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 5]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 6]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 7]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 8]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 9]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 10]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 11]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 12]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 13]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Web Storage 14]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue