aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-25 08:14:09 -0500
committerGitHub <noreply@github.com>2016-07-25 08:14:09 -0500
commit2de3b119a961942943280fa280c50a7a814de583 (patch)
tree3017730e5bae175b205480f2e9cddbd128346a1d /components/script/dom/window.rs
parent521f8c013524b64daefc9c34c46263868f902de4 (diff)
parent06142b37b85371d92005ee38da7e6c752ab43be8 (diff)
downloadservo-2de3b119a961942943280fa280c50a7a814de583.tar.gz
servo-2de3b119a961942943280fa280c50a7a814de583.zip
Auto merge of #12588 - UK992:tinyfiledialogs, r=jdm
Support tinyfiledialogs on Windows <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [X] These changes do not require tests because only add support for Windows <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12588) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 2237514bd3d..f28f823dab4 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -95,7 +95,7 @@ use task_source::networking::NetworkingTaskSource;
use task_source::user_interaction::UserInteractionTaskSource;
use time;
use timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle, OneshotTimers, TimerCallback};
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
use tinyfiledialogs::{self, MessageBoxIcon};
use url::Url;
use util::geometry::{self, MAX_RECT};
@@ -361,14 +361,14 @@ impl Window {
}
}
-#[cfg(any(target_os = "macos", target_os = "linux"))]
+#[cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
fn display_alert_dialog(message: &str) {
tinyfiledialogs::message_box_ok("Alert!", message, MessageBoxIcon::Warning);
}
-#[cfg(not(any(target_os = "macos", target_os = "linux")))]
+#[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]
fn display_alert_dialog(_message: &str) {
- // tinyfiledialogs not supported on Windows
+ // tinyfiledialogs not supported on Android
}
// https://html.spec.whatwg.org/multipage/#atob