aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/post_build_commands.py
diff options
context:
space:
mode:
authorAdam Casey <adamncasey@gmail.com>2016-05-04 14:37:51 +0100
committerUK992 <urbankrajnc92@gmail.com>2016-06-07 14:38:51 +0200
commit64c5c3ee9d0523b65d21d863a6920161ec2d16fd (patch)
tree7c3c93af462263cb8e3ddc4199415694e3694ffe /python/servo/post_build_commands.py
parentbc52617d3351d64cfd1479c5088b591370529f59 (diff)
downloadservo-64c5c3ee9d0523b65d21d863a6920161ec2d16fd.tar.gz
servo-64c5c3ee9d0523b65d21d863a6920161ec2d16fd.zip
Only enable borderless browserhtml window on OSX.
Pass browserhtml path as relative path to avoid a mingw->windows path conversion
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r--python/servo/post_build_commands.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index 7781689d32b..33bbca0f19b 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -23,7 +23,7 @@ from mach.decorators import (
Command,
)
-from servo.command_base import CommandBase, cd, call, check_call
+from servo.command_base import CommandBase, cd, call, check_call, is_windows, is_macosx
def read_file(filename, if_exists=False):
@@ -131,7 +131,15 @@ class PostBuildCommands(CommandBase):
if browserhtml_path is None:
print("Could not find browserhtml package; perhaps you haven't built Servo.")
return 1
- args = args + ['-w', '-b',
+
+ if is_macosx():
+ # Enable borderless on OSX
+ args = args + ['-b']
+ elif is_windows():
+ # Convert to a relative path to avoid mingw -> Windows path conversions
+ browserhtml_path = path.relpath(browserhtml_path, os.getcwd())
+
+ args = args + ['-w',
'--pref', 'dom.mozbrowser.enabled',
'--pref', 'dom.forcetouch.enabled',
'--pref', 'shell.quit-on-escape.enabled=false',