aboutsummaryrefslogtreecommitdiffstats
path: root/ports/libsimpleservo/api/src
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-07-28 03:02:44 -0400
committerGitHub <noreply@github.com>2020-07-28 03:02:44 -0400
commit0ce3ad5a4bba228f617e7d4bf3b34b39684dc3d9 (patch)
tree67712522e9f5dc730e3190a1f2ee8538f73b51bc /ports/libsimpleservo/api/src
parent870812d8955649645f82841ee4bd3c5db454423a (diff)
parentf030162ec3cdbe08b6a94869e0b25c11a9d433aa (diff)
downloadservo-0ce3ad5a4bba228f617e7d4bf3b34b39684dc3d9.tar.gz
servo-0ce3ad5a4bba228f617e7d4bf3b34b39684dc3d9.zip
Auto merge of #27417 - jdm:clear-reload, r=Manishearth
Make reload button clear the network cache. The developer workflow in FxR is frustrating right now because of bugs like https://github.com/servo/servo/issues/24385. To allow us to put out a new release soon that addresses this papercut, these changes make the reload button clear the network cache in FxR. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (kind of) #26411. - [x] These changes do not require tests because can't test FxR.
Diffstat (limited to 'ports/libsimpleservo/api/src')
-rw-r--r--ports/libsimpleservo/api/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/ports/libsimpleservo/api/src/lib.rs b/ports/libsimpleservo/api/src/lib.rs
index a05df67317f..f3fd0078108 100644
--- a/ports/libsimpleservo/api/src/lib.rs
+++ b/ports/libsimpleservo/api/src/lib.rs
@@ -356,6 +356,13 @@ impl ServoGlue {
}
/// Reload the page.
+ pub fn clear_cache(&mut self) -> Result<(), &'static str> {
+ info!("clear_cache");
+ let event = WindowEvent::ClearCache;
+ self.process_event(event)
+ }
+
+ /// Reload the page.
pub fn reload(&mut self) -> Result<(), &'static str> {
info!("reload");
let browser_id = self.get_browser_id()?;