Search completed in 0.94 seconds.
388 results for "platforms":
Your results are loading. Please wait...
Porting NSPR to Unix Platforms - Archive of obsolete content
porting instructions you can use different threading packages to implement nspr threads. ...
... porting instructions you can use different threading packages to implement nspr threads. ...
... porting instructions you can use different threading packages to implement nspr threads. ...
...And 3 more matches
Game distribution - Game development
advantages, such as: multiplatform bliss the technology itself is multiplatform, so you can write the code once and target multiple devices. this can range from low-end smartphones or tablets, through laptops and desktop computers, to smart tvs, watches or even a fridge if it can handle a modern enough browser. you don't need to have separate teams to work on the same title targeting different platforms with only one code base to worry about. you can spend more time and money on promotion and monetization. instant updates you don't have to wait several days to have your game's code updated. if your user finds a bug, you can quickly fix it, update the system and refresh the game on your server to provide players with the updated code almost instantly. direct link distribution and instant play ...
...'s something you will have to focus on if you truly want to succeed. mobile devices are where html5 technology can truly shine and show its advantages. there's no flash, and html5 is fully multiplatform. trying to compete with desktop games directly is very difficult. you can put your html5 games into the same arena (see native desktop, later on) and you should because it's good to diversify the platforms you support, but you have to remember that developers creating desktop games have years of experience, great tools and stable distribution channels. many html5 games will target different market segments than native desktop games, e.g. simple time killer games to be played while on the move rather than huge immersive experiences. such games are often designed to be played with two, or even one fi...
...n channels. many html5 games will target different market segments than native desktop games, e.g. simple time killer games to be played while on the move rather than huge immersive experiences. such games are often designed to be played with two, or even one finger, so you can hold the device, play the game and be able to use the second hand for whatever you currently need. saying this, desktop platforms can be used for distribution quite easily with the availability of wrappers that can help you prepare native builds of your game see packaging games. it's also nice to provide desktop controls for your games even if you're mostly targeting mobile. players are enjoying your games on any platform available, and desktop is one of them. plus, it is usually easier to build and test the game first on d...
...And 6 more matches
OS.File for the main thread
ed before each write. the default is true, i.e. opening a file for appending. specify append: false to open the file in regular mode. optionsoptional platform-specific options for opening the file. for advanced users only. most users will never have need of these options. to specify options, pass an object that may contain some of the following flags: unixflags (ignored under non-unix platforms) if specified, file opening flags, as per libc function open. if unspecified, build these flags from the contents of mode. you can build these flags from values os.constants.libc.o_*. unixmode (ignored under non-unix platforms) if specified, file creation mode, as per libc function open. if unspecified, files are created with a default mode of 0600 (file is private to the user, the user can r...
...f mode. you can build these flags from values os.constants.libc.o_*. unixmode (ignored under non-unix platforms) if specified, file creation mode, as per libc function open. if unspecified, files are created with a default mode of 0600 (file is private to the user, the user can read and write). you can build this mode from values os.constants.libc.s_i*. winshare (ignored under non-windows platforms) if specified, a sharing policy, as per windows function createfile. if unspecified, files are opened with a default sharing policy (file is not protected against being read/written/removed by another process or another use in the same process). ...
... (ignored under non-windows platforms) if specified, a sharing policy, as per windows function createfile. if unspecified, files are opened with a default sharing policy (file is not protected against being read/written/removed by another process or another use in the same process). you can build this policy from constants os.constants.win.file_share_*. winsecurity (ignored under non-windows platforms) if specified, a security policy, as per windows function createfile. if unspecified, no security attributes. winaccess (ignored under non-windows platforms) if specified, access mode, as per windows function createfile. this also requires option windisposition and this replaces argument mode. if unspecified, value is built from mode. ...
...And 6 more matches
Index
will no longer be able to get access to your private key, unless the attacker would also succeed in stealing the master password. now you might be interest in how to get the nss sources, building and testing nss. 3 building nss guide, nss, security this page has detailed information on how to build nss. because nss is a cross-platform library that builds on many different platforms and has many options, it may be complex to build. please read these instructions carefully before attempting to build. 4 cert_findcertbydercert nss no summary! 5 cert_findcertbyissuerandsn nss no summary! 6 certificate functions nss the public functions listed here are used to interact with certificate databases. 7 cryptogr...
...o be loaded using a jar file, which contains all of the required libraries and an installation script that describes how to install the module. the jar install script is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. ...
... to signtool. sample script for example, the pkcs #11 installer script could be in the file pk11install. if so, the metainfo file for signtool includes a line such as this: + pkcs11_install_script: pk11install the script must define the platform and version number, the module name and file, and any optional information like supported ciphers and mechanisms. ...
...And 5 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
ance the user interface by allowing 3rd parties to develop "themes" for your application. themes are simply collections of images and css which can augment or replace your current ui elements. xul provides an excellent answer for organizations with heterogeneous computing environments. customized xul applications with significant business logic can be written once, and used on the range of platforms that exist within the organization. in addition, if the organization maintains sophisticated, interactive websites, it will already possess a wealth of technical expertise that will be relevant for creating xul applications. in addition to the technologies already mentioned, we go even further by allowing you to even create your own custom interface widgets. don't feel limited by the widgets that...
...mpleted the application, such as a "history" menu item). xslt could be used to translate information from web services, rss, soap, or other xml-based languages and convert them into a form that you might display in your user interface. the gecko rendering engine gecko is the revolutionary rendering engine that offers advanced features for internet browsing anywhere across applications, computing platforms and devices. this innovation in browser technology offers small size, speed and industry leading standards support. gecko is the premier cross-platform, full-featured, mature and well-tested layout engine available, providing robust and high quality support for a massive array of standards. its ability to render web content correctly is exceptional. gecko consists roughly of an html parser and xm...
... and rendering. as personal connectivity expands from the desktop computer to new web-enabled products and devices, gecko is a browser engine that has been designed from the ground up to power a new generation of desktop browsers and browsing devices and to accelerate the growth and development of the next-generation internet. small, fast and standards compliant, gecko is easily embeddable across platforms in browsers, desktop applications and browsing devices and delivers full-functionality browsing to them all. innovative gecko technologies it supports make the development of browsers, applications and devices faster and easier than ever before. gecko is the first browser engine ever to deliver the full web standards support that developers have been calling for. this robust standards support for...
...And 4 more matches
The Firefox codebase: CSS Guidelines
will show on the left. write padding: 0 3px 4px; instead of padding: 0 3px 4px 3px;. this makes it more obvious that the padding is symmetrical (so rtl won't be an issue). note: see css logical properties and values for more information. testing to test for rtl layouts, you can go to about:config and set intl.uidirection to -1. ...
...e padding: 0 3px 4px; instead of padding: 0 3px 4px 3px;. this makes it more obvious that the padding is symmetrical (so rtl won't be an issue). note: see css logical properties and values for more information. testing to test for rtl layouts, you can go to about:config and set intl.uidirection to -1. ...
... for new css, when possible try to privilege using the shared directory, instead of writing the same css for the 3 platform specific directories, especially for large blocks of css. content css vs. theme css the following directories also contain css: browser/base/content/ toolkit/content/ these directories contai...
...And 4 more matches
NSS tools : modutil
ules can also be loaded using a jar file, which contains all of the required libraries and an installation script that describes how to install the module. the jar install script is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. ...
... a file that is passed to signtool. sample script for example, the pkcs #11 installer script could be in the file pk11install. if so, the metainfo file for signtool includes a line such as this: + pkcs11_install_script: pk11install the script must define the platform and version number, the module name and file, and any optional information like supported ciphers and mechanisms. ...
... the file pk11install. if so, the metainfo file for signtool includes a line such as this: + pkcs11_install_script: pk11install the script must define the platform and version number, the module name and file, and any optional information like supported ciphers and mechanisms. multiple platforms can be defined in a single install file. ...
...And 4 more matches
NSS tools : modutil
Mozilla › Projects › NSS › tools › modutil
o be loaded using a jar file, which contains all of the required libraries and an installation script that describes how to install the module. the jar install script is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. ...
... to signtool. sample script for example, the pkcs #11 installer script could be in the file pk11install. if so, the metainfo file for signtool includes a line such as this: + pkcs11_install_script: pk11install the script must define the platform and version number, the module name and file, and any optional information like supported ciphers and mechanisms. ...
...pk11install. if so, the metainfo file for signtool includes a line such as this: + pkcs11_install_script: pk11install the script must define the platform and version number, the module name and file, and any optional information like supported ciphers and mechanisms. multiple platforms can be defined in a single install file. ...
...And 4 more matches
Index - Archive of obsolete content
perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest browsers. or for "reasons," your company is required to use very old software and you need to build web content that runs on that software. ...
...b developer community needscontent, obsolete, web development no summary! 564 mozilla project presentations presentations this article provides links to presentations covering various aspects of the mozilla project. 565 mozprocess mozprocess provides python process management via an operating system and platform transparent interface to mozilla platforms of interest. mozprocess aims to provide the ability to robustly terminate a process (by timeout or otherwise), along with any child processes, on windows, os x, and linux. mozprocess utilizes and extends subprocess.popen to these ends. 566 mozprofile junk mozprofile is a python tool for creating and managing profiles for mozilla's applications (firefox, thunderbird, etc.). in...
...sers to advertise their capabilities to security tools. 604 plug-n-hack tools supported security, plugnhack 605 plugin architecture add-ons, developing mozilla, needstechnicalreview, needsupdate, plugins this page contains some notes on how plugins work internally in gecko. it is mainly of interest to gecko developers. 606 porting nspr to unix platforms nspr last modified 16 july 1998 607 priority content update: i've removed documents from this list that have been migrated into the wiki. the list of completed documents is available through the devedge page. 608 prism prism prism is a simple xulrunner-based browser that hosts web applications without the normal web browser user interface. pris...
...And 3 more matches
The Joy of XUL - Archive of obsolete content
c standard technologies featuring html 4.0; cascading style sheets (css) 1 and 2; document object model (dom) levels 1 and 2; javascript 1.5, including ecma-262 edition 3 (ecmascript); xml 1.0. platform portability like html, xul is designed to be platform-neutral, making applications easily portable to all of the operating systems on which mozilla runs. considering the broad range of platforms that currently support mozilla, this may be one of the most compelling features of xul as a technology for building applications. since xul provides an abstraction of user interface components, it delivers on the promise of write-once, run-anywhere. the user interface for all of mozilla's core applications (browser, messenger, address book, etc.) is written in xul with one single code base su...
...rt mozilla, this may be one of the most compelling features of xul as a technology for building applications. since xul provides an abstraction of user interface components, it delivers on the promise of write-once, run-anywhere. the user interface for all of mozilla's core applications (browser, messenger, address book, etc.) is written in xul with one single code base supporting all mozilla platforms. separation of presentation from application logic one of the major downfalls of most web applications is the tight coupling of user interface elements with client application logic. this poses a significant problem in team environments because the skills required to develop these two parts are often satisfied by different people. xul provides a clear separation among the clie...
...l and the implementation of the basic components matured, better ways were identified to simplify the composition of the ui. this led to increased screen drawing performance and reduced memory and disk footprint requirements of the application. the ui for the month and week views was practically rewritten while the application logic remained virtually unchanged. porting xul applications to other platforms is trivial.the calendar originated as a linux application with no consideration given to porting it to other platforms. but later, when the original developer (oeone corporation) contributed the source to the mozilla project, the calendar had to be migrated to the windows and macintosh platforms. the ui for the xul application required zero porting effort because it worked with almost no alterati...
...And 3 more matches
The Business Benefits of Web Standards - Archive of obsolete content
ct html (as opposed to the often-used transitional html markup), forces the designer not to use presentation tags in the html documents, naturally enforcing the separation of content from presentation. by locating all the style and design issues in one document - the style sheet - whole sites can be rethemed in one go. the blogging community are particularly dynamic in this respect where on many platforms including wordpress, textpattern and habari, the site theme is a complete and discrete entity in its own right. improved user experience: less bandwidth and fast loads html code is often much more compact (therefore easier to read and maintain) when used in conjunction with css. according to various reports, case studies, and andy king, author of speed up your web site: web site optimization, c...
...arch engines. in the same way that standards hugely reduce the concern we need to have for browser differences, they also reduce the differences between the way search engines rank pages. there should be little need to plunge into the increasing costs and uncertain quality and integrity of proprietary pay per click campaigns. ...
...o plunge into the increasing costs and uncertain quality and integrity of proprietary pay per click campaigns. increase website traffic maintain contact with your user on multiple platforms standards-based code and cross-platform go hand in hand. while some browsers have quirks that cause different behavior by platform, mozilla-based browsers are designed to behave identically on all supported platforms (mac, linux, unix, windows...) web content is increasingly being accessed by a growing number of user agents other than browsers, or by browsers on different platforms - for example mobile telephones. feed content such as rss and atom simply will not work without being implemented by following the requisite standard. assumptions about the user and their platform based on erroneous thinking abou...
...And 3 more matches
IME handling guide
ime is a helper application of a user's text input. it handles native key events before or after focused application (depending on the platform) and creates a composition string (a.k.a. preedit string), suggests a list of what the user attempts to input, commits composition string as a selected item off the list and commits composition string without any conversion. ...
...y conversion. ime is used by chinese, japanese, korean and taiwan users for inputting chinese characters because the number of them is beyond thousands and cannot be input from the keyboard directly. however, especially on mobile devices nowadays, ime is also used for inputting latin languages like autocomplete. additionally, ime may be used for handwriting systems or speech input systems on some platforms. if ime is available on focused elements, we call that state "enabled". if ime is not fully available(i.e., user cannot enable ime), we call this state "disabled". if ime is enabled but users use direct input mode (e.g., for inputting latin characters), we call it "ime is closed". otherwise, we call it "ime is open". (fyi: "open" is also called "active" or "turned on". "closed" is also called "...
..._text_decoration_style_* defined in nsstyleconsts.h. ui.imerawinputunderlinestyle ui.imeselectedrawtextunderlinestyle ui.imeconvertedtextunderlinestyle ui.imeselectedconvertedtextunderlinestyle underline width can be specified with "ui.imeunderlinerelativesize" pref. this affects all types of clauses. the value should be 100 or 200. 100 means normal width, 200 means double width. on some platforms, ime may support its own style for each clause. currently, this feature is supported in tsf mode of windows and on linux. the style information is stored in textrangestyle which is defined in textrange.h. it's a member of textrange. textrange is stored in mranges of widgetcompositionevent only when its message is ecompositionchange. lifetime of composition string when native ime notifies gecko ...
...And 3 more matches
NSS Tools modutil
ile, put it in a file that is passed to the netscape signing tool. sample script for example, the pkcs #11 installer script could be in the file pk11install. ...
...ash. a complex string must notinclude newlines or carriage returns.) outside of complex strings, all white space (for example, spaces, tabs, and carriage returns) is considered equal and is used only to delimit tokens. keys keys are case-insensitive. this section discusses the following keys: global keysper-platform keysper-file keys global keys forwardcompatible gives a list of platforms that are forward compatible. if the current platform cannot be found in the list of supported platforms, then the forwardcompatible list is checked for any platforms that have the same os and architecture in an earlier version. if one is found, its attributes are used for the current platform. platforms (required) gives a list of platforms. each entry in the list is itself a key-value pair: t...
...ns various attributes of the platform. the modulename, modulefile, and files attributes must be specified for each platform unless an equivalentplatform attribute is specified. the platform string is in the following format: system name:os release:architecture. the installer obtains these values from nspr. os release is an empty string on non-unix operating systems. ...
...And 3 more matches
64-bit Compatibility
this article focuses on hacking tracemonkey code generation (jstracer.cpp, jsregex.cpp) in ways that will work on both 32-bit and 64-bit jit backends. ...
... this article focuses on hacking tracemonkey code generation (jstracer.cpp, jsregex.cpp) in ways that will work on both 32-bit and 64-bit jit backends. ...
...the compiler can implicitly sign or zero extend operands with unintended side effects. ...
...And 3 more matches
nsIFile
he filesystem. inherits from: nsisupports last changed in gecko 30.0 (firefox 30.0 / thunderbird 30.0 / seamonkey 2.27) nsifile is the correct platform-agnostic way to specify a file; you should always use this instead of a string to ensure compatibility. with an nsifile you can navigate to ancestors or descendants without having to deal with the different path separators used on different platforms, query the state of any file or directory at the position represented by the nsifile and create, move or copy items in the filesystem. an nsifile can be retrieved by either instantiating an nsilocalfile using a platform specific path string or by using cross-platform locations retrieved from the directory service. all methods with string parameters have two forms. the preferred form operates on...
...onds to the permissions of the symbolic link referenced by this nsifile. if this nsifile does not reference a symbolic link, then the value of this attribute is undefined. changing the permissions of a nsifile operates on the underlying filesystem. as of gecko 1.7, changing the permissions of a non-existent file has undefined behavior. persistentdescriptor acstring on some platforms, the value of nsifile.path may be insufficient to uniquely identify the file on the local file system. the persistent descriptor is intended to be used whenever a nsifile needs to be serialized to disk and later recovered. this string is not intended for display to users. note: the value of the followlinks attribute is not encoded in the persistent descriptor. target astring ...
...value of the followlinks attribute is not encoded in the persistent descriptor. target astring this attribute exposes the full target of the nsifile - the full path with any symbolic links dereferenced. accessor to the string path. the native version of these strings are not guaranteed to be a usable path to pass to nspr or the c stdlib. there are problems that affect platforms on which a path does not fully specify a file because two volumes can have the same name (for example mac). this is solved by holding "private", native data in the nsifile implementation. this native data is lost when you convert to a string. do not pass to use with nspr or stdlib! read only. exceptions thrown ns_error_file_invalid_path indicates that this nsifile does not re...
...And 3 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
d you might want to take a look at this guide instead. on the other hand, if you are an experienced developer or team, and you know that you are going to build a large, complex extension, you would do well to consider the approach described in this article. one final note: i've only tried these techniques inside firefox, but they'll probably work more or less unchanged on other gecko-based platforms like thunderbird or seamonkey. if someone can confirm this and/or provide guidelines for what's different, i'll update the article to incorporate this information. bambi meets mozilla none of this is for the faint of heart. in particular, the initial step involves building mozilla, which is a huge - nay, gargantuan! - project. many intelligent developers have been driven to the brin...
...ion. bambi meets mozilla none of this is for the faint of heart. in particular, the initial step involves building mozilla, which is a huge - nay, gargantuan! - project. many intelligent developers have been driven to the brink of insanity trying to build it for the first time. if you're not an experienced c++ developer, i wouldn't even bother. stick to javascript. on windows platforms the first time i built mozilla i used this guide. i can't even remember why anymore, but i got stuck in a number of places, and the whole affair ended up taking far longer than i originally expected. much furniture was smashed, much hair torn out by the roots. here's a comprehensive looking guide that's gotten good reviews. follow every step methodically and you'll probably be alright. foc...
...f places, and the whole affair ended up taking far longer than i originally expected. much furniture was smashed, much hair torn out by the roots. here's a comprehensive looking guide that's gotten good reviews. follow every step methodically and you'll probably be alright. focus on the fact that once you get the build working, it'll probably work effortlessly from then on. maybe. on other platforms on other platforms, namely linux and macos, the process is much easier. all the tools for building are available built-in, and therefore all you have to do is run some commands in the terminal. you can find full instructions for almost any os here. structuring your project mozilla includes a number of complex extensions that are integrated into its build process. it has thus ...
...And 2 more matches
Mozilla release FAQ - Archive of obsolete content
u are using unix, use bash-family shells for the build because of the better control over redirection (in case you want to log errors and messages) if you are using win32, using the default shell cmd.exe (as opposed to 4dos or 4nt) will probably yield better results. ...
...ges) if you are using win32, using the default shell cmd.exe (as opposed to 4dos or 4nt) will probably yield better results. regarding compilation options, it would be good not to compile with optimization, because it's much slower to build, and on windows platforms, there's a bug in some versions of vc++ that makes mozilla crash in many common circumstances if compiled with optimization on. ...
...options, it would be good not to compile with optimization, because it's much slower to build, and on windows platforms, there's a bug in some versions of vc++ that makes mozilla crash in many common circumstances if compiled with optimization on. ...
...And 2 more matches
Leak-hunting strategies and tips
under trace-malloc or lsan or valgrind to find the leaks of smaller graphs of objects. (when i refer to the size of a graph of objects, i'm referring to the number of objects, not the size in bytes. ...
... i'm referring to the number of objects, not the size in bytes. ...
...y large leak, but the object graphs are small and easy to identify using gc-based leak detection.) what leak tools do we have? ...
...And 2 more matches
Index
avascript values. in addition to the interpreter, spidermonkey contains a just-in-time (jit) compiler, a garbage collector, code implementing the basic behavior of javascript values, a standard library implementing ecma 262-5.1 §15 with various extensions, and a few public apis. 528 64-bit compatibility spidermonkey the following types or typedefs are always 64-bit on 64-bit platforms, and 32-bit on 32-bit platforms: 529 bytecode descriptions spidermonkey this document is automatically generated from opcodes.h by make_opcode_doc.py. 530 bytecodes spidermonkey spidermonkey bytecodes are the canonical form of code representation that is used in the javascript engine. the javascript frontend constructs an ast from the source text, then em...
...for the release repository and click on the first sm(pkg) link you see. that will open a small window in the bottom left with a line like "artifact uploaded: mozjs-57.0.1.tar.bz2". 540 spidermonkey 1.8 spidermonkey spidermonkey 1.8 has one known significant regression from 1.7. 541 spidermonkey 1.8.5 spidermonkey spidermonkey 1.8.5 is supported on all the platforms where firefox 4 runs. 542 spidermonkey 1.8.7 spidermonkey draft in progress - this is a draft, and right now it's mostly just a copy of the 1.8.5 release notes. 543 spidermonkey 1.8.8 spidermonkey spidermonkey 1.8.8 is supported on all the platforms where firefox insert-actual-firefox-version-number-here runs. 544 spidermonkey 17 spidermonk...
...y 1.8.7 spidermonkey draft in progress - this is a draft, and right now it's mostly just a copy of the 1.8.5 release notes. 543 spidermonkey 1.8.8 spidermonkey spidermonkey 1.8.8 is supported on all the platforms where firefox insert-actual-firefox-version-number-here runs. 544 spidermonkey 17 spidermonkey spidermonkey 17 is supported on all the platforms where firefox 17 runs. 545 spidermonkey 24 spidermonkey spidermonkey 24 is supported on all the platforms where firefox 24 runs. compiling it requires a c++ compiler, and the jsapi can only be used from c++ code. (this change was motivated by garbage collector improvements, which lean quite heavily on c++'s support for raii through constructors and destructors.) if you are...
...And 2 more matches
XPCOM ABI
only applications which use this abi could use this xpcom component. ...
...only applications which use this abi could use this xpcom component. ...
...ic and has a certain abi. only applications which use this abi could use this xpcom component. to put it simply, an xpcom component built for a specific abi would only be compatible with firefox, thunderbird or other xulrunner application built for the same abi. ...
...And 2 more matches
Key Values - Web APIs
the tables below list the standard key values in various categories of key, with an explanation of what the key is typically used for. corresponding virtual keycodes for common platforms are included where available. learn how to use these key values in javascript using keyboardevent.key special values | modifier keys | whitespace keys | navigation keys | editing keys | ui keys | device keys | ime and composition keys | function keys | phone keys | multimedia keys | audio control keys | tv control keys | media controller keys | speech recognition keys | document keys | application selector keys | browser control keys | numeric keypad keys special values values of key which have special meanings other than identifying a specific key or character. keyboardevent.key value de...
...paste (0x1008ff6d) qt::key_paste (0x010000e2) "redo" redo the last action. appcommand_redo gdk_key_redo (0xff66) "undo" undo the last action. appcommand_undo gdk_key_undo (0xff65) [1] on keyboards without a dedicated del key, the mac generates the "delete" value when fn is pressed in tandem with delete (which is backspace on other platforms). [2] internet explorer (tested on release 9 and 11) and firefox 36 and earlier use "del" instead of "delete" for the del key. [3] internet explorer (tested on release 9 and 11) and firefox 36 and earlier generate the value "crsel" instead of "crsel" when the crsel key is pressed. [4] internet explorer (tested on release 9 and 11) and firefox 36 and earlier generate the value "exsel" instead o...
... the process key currently returns "unidentified" in firefox and internet explorer. google chrome returns the value of the key as if ime were not in use. [4] prior to firefox 37, these keys were "unidentified". [5] firefox generates the key value "altgraph" instead of "modechange". korean keyboards only these keys are only available on korean keyboards. there are other keys defined by various platforms for korean keyboards, but these are the most common and are the ones identified by the ui events specification. keyboardevent.key value description virtual keycode windows mac linux android "hangulmode" the hangul (korean character set) mode key, which toggles between hangul and english entry modes. vk_hangul (0x15) [1] gdk_key_hangul (0xff3...
...And 2 more matches
Source code directories overview - Archive of obsolete content
onverted to xpidl interfaces, the value of the public directory diminishes. src contains the bulk of the source code. tests contains c harnesses, html or xul that exercise this module. tools contains scripts for automatically generating certain source code and other special tools for building this module. there are also platform dependent subdirectories which contain source code for specific platforms. windows contains source code for windows 95, windows 98 and windows nt 4.0. mac contains source code for macos: both the powerpc and 68000 versions. gtk contains source code for gtk (a.k.a. the gimp toolkit) which runs on x-windows on unix. motif contains source code for motif, a toolkit which runs on x-windows on unix. os2 contains source code for os/2 warp. rhapsody contains source co...
...access (using various protocols such as http, ftp, gopher, castanet). this code is also known by the names, "netlib" and "necko." nsprpub contains c code for the cross platform "c" runtime library. the "c" runtime library contains basic non-visual c functions to allocate and deallocate memory, get the time and date, read and write files, handle threads and handling and compare strings across all platforms. this code is also known by the name, "nspr" and "netscape portable runtime". this code originated in mozilla classic. other-licenses contains code that does not fall under the mpl, including branding, libical and stubs for 7zip. parser contains the html parser and the xml parser (expat.). plugin contains code for the mrj plugin on mac. profile contains c interfaces, c code, xul and javascrip...
...r other decorations (which are contained by frames). this code serves to manipulate the individual content that it contains. for example, a scrolling view will find out the scroll bar positions and tell its content where to draw according the scroll bar thumbs. webshell contains c interfaces, c code, linux shell scripts and other files for embedding mozilla in other programs on various different platforms in various different ways (e.g. as plug-in, as activex component, as xpcom classes). widget contains c interfaces and code for platform independent controls (widgets), such as scroll bars, radio buttons and list boxes. xpcom contains the low-level c interfaces, c code, c code, a bit of assembly code and command line tools for implementing the basic machinery of xpcom components (which stands fo...
...and line tools for implementing the basic machinery of xpcom components (which stands for "cross platform component object model"). xpcom is the mechanism that allows mozilla to export interfaces and have them automatically available to javascript scripts, to microsoft com and to regular mozilla c code. some low-level xpcom classes and interfaces are also defined here (e.g. the event loop for all platforms). xpcom is compatible and very similar to microsoft com (although xpcom is cross-platform). xpfe contains the c interfaces, c code and xul for implementing the "cross platform front end." essentially, this is where the mozilla program starts and manages other components to accomplish tasks. this code contains very little platform dependent code; it relies on other components to provide platform ...
NSPR Release Engineering Guide - Archive of obsolete content
this paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms. nspr generally follows the iplanet product lifecycle. ...
... this paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms. nspr generally follows the iplanet product lifecycle. ...
......pr/include/prinit.h with release numbers build all targets, debug and optimized on all platforms using local directories run the test suite on all targets verify release numbers show up in binaries resolve testing anomalies tag the tree with nsprpub_release_x_y_z_beta beta release checkout a whole new tree using the tag from above build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z 1 run explode.pl run the test suite on all targets, using binaries & headers from shipped bits resolve testing anomalies tag the tree with nsprpub_release_x_y[_z] release candidate checkout a whole new tree u...
...copy /share/builds/componen...
Mobile accessibility - Learn web development
this article looks at mobile-specific accessibility considerations. prerequisites: basic computer literacy, a basic understanding of html, css, and javascript, and an understanding of the previous articles in the course. objective: to understand what problems exist with accessibility on mobile devices, and how to overcome them. ...
...bile devices. long gone are the days when mobile devices ran completely different web technologies to desktop browsers, forcing developers to use browser sniffing and serve them completely separate sites (although quite a few companies still detect usage of mobile devices and serve them a separate mobile domain). these days, mobile devices can usually handle fully-featured websites, and the main platforms even have screenreaders built in to enable visually impaired users to use them successfully. modern mobile browsers tend to have good support for wai-aria, too. to make a website accessible and usable on mobile, you just need to follow general good web design and accessibility best practices. there are some exceptions that need special consideration for mobile; the main ones are: control mec...
... desktops/laptops (mainly mouse/keyboard). user input — make user input requirements as painless as possible on mobile (e.g., in forms, keep typing to a minimum). responsive design — make sure layouts work on mobile, conserve image download sizes, and think about the provision of images for high-resolution screens. summary of screenreader testing on android and ios the most common mobile platforms have fully functional screen readers. these function in much the same way as desktop screenreaders, except they are largely operated using touch gestures rather than key combinations. let's look at the main two: talkback on android and voiceover on ios. android talkback the talkback screen reader is built into the android operating system. to turn it on, look up what phone model and android v...
...stead offer a <select> menu containing the most common options (which also helps with consistency in data entry), and offer an "other" option that displays a text field to type any outliers into. you can see a simple example of this idea in action in common-job-types.html (see the common jobs example live). it is also worth considering the use of html5 form input types such as the date on mobile platforms as they handle them well — both android and ios, for example, display usable widgets that fit well with the device experience. see html5-form-examples.html for some examples (see the html5 form examples live) — try loading these and manipulating them on mobile devices. for example: types number, tel, and email display suitable virtual keyboards for entering numbers/telephone numbers. type...
Named Shared Memory
ct is invalid and cannot be reused. pr_deletesharedmemory should be called before process termination. after you call pr_deletesharedmemory, any further use of the shared memory associated with the name may cause unpredictable results. filenames the name passed to pr_opensharedmemory should be a valid filename for a unix platform. pr_opensharedmemory creates file using the name passed in. some platforms may mangle the name before creating the file and the shared memory. the unix implementation may use sysv ipc shared memory, posix shared memory, or memory mapped files; the filename may be used to define the namespace. on windows, the name is significant, but there is no file associated with the name. no assumptions about the persistence of data in the named file should be made. depending on pla...
... named file should be made. depending on platform, the shared memory may be mapped onto system paging space and be discarded at process termination. all names provided to pr_opensharedmemory should be valid filename syntax or name syntax for shared memory for the target platform. referenced directories should have permissions appropriate for writing. ...
...be discarded at process termination. all names provided to pr_opensharedmemory should be valid filename syntax or name syntax for shared memory for the target platform. referenced directories should have permissions appropriate for writing. limits on shared memory resources different platforms have limits on both the number and size of shared memory resources. the default system limits on some platforms may be smaller than your requirements. these limits may be adjusted on some platforms either via boot-time options or by setting the size of the system paging space to accommodate more and/or larger shared memory segment(s). security considerations on unix platforms, depending on implementation, contents of the backing store for the shared memory can be exposed via the file system. set permissi...
...me options or by setting the size of the system paging space to accommodate more and/or larger shared memory segment(s). security considerations on unix platforms, depending on implementation, contents of the backing store for the shared memory can be exposed via the file system. set permissions and or access controls at create and attach time to ensure you get the desired security. on windows platforms, no special security measures are provided. named shared memory functions pr_opensharedmemory pr_attachsharedmemory pr_detachsharedmemory pr_closesharedmemory pr_deletesharedmemory ...
Build instructions
fined in the environment, e.g. (for posix shells), variable=value; export variable gmake target1 target2 here are some (not all) of the make variables that affect nss builds: build_opt: if set to 1, means do optimized non-debug build. default is debug, non-optimized build. use_debug_rtl: if set to 1, on windows, causes build with debug version of the c run-time library. ns_use_gcc: on platforms where gcc is not the native compiler, tells nss to build with gcc instead of the native compiler. default is to build with the native compiler. use_64: on platforms that support both 32-bit and 64-bit abis, tells nss to build for the 64-bit abi. default is 32-bit abi, except on platforms that do not support a 32-bit abi. moz_debug_symbols: tells nss to build with debug symbols, even in an optim...
...within that bash shell. for rhel-5, you need to use the new assembler. you can install the new assembler as root as follows: yum install binutils220 you can then use the new assembler by adding /usr/libexec/binutils220 to the beginning of your build path. this can be done in sh or bash as follows: export path=/usr/libexec/binutils220:$path the following build instructions should work for all platforms (with some platform-specific changes as noted). build instructions for recent versions (mercurial) clone the nspr and nss repositories. hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss if you want to build a releases other than the tips of these repositories, then switch to the release tags: cd nspr hg update nspr_4_9_5_rtm cd ../nss hg update...
...epositories, then switch to the release tags: cd nspr hg update nspr_4_9_5_rtm cd ../nss hg update nss_3_14_2_rtm cd .. set environment variables: if you want a non-debug optimized build, set build_opt=1 in your environment. otherwise, you get a debug build. on windows, if you want a debug build with the system's debug rtl libraries, set use_debug_rtl=1 in your environment. ...
... a non-debug optimized build, set build_opt=1 in your environment. otherwise, you get a debug build. on windows, if you want a debug build with the system's debug rtl libraries, set use_debug_rtl=1 in your environment. on unix platforms, except alpha/osf1, if you want a build for the system's 64-bit abi, set use_64=1 in your environment. by default, nss builds for the 32-bit environment on all platforms except alpha/osf1. to build with gcc on platforms other than linux and windows, you need to set two more environment variables: ns_use_gcc=1 no_mdupdate=1 for hp-ux, you must set the environment variable use_pthreads to 1. cd nss gmake nss_build_all the output of the build will be in the dist directory alongside the nspr and nss directories. for informati...
SpiderMonkey Internals
llocation request is made. js api users should call js_gc or js_maybegc between script executions or from the operation callback, as often as necessary. because the gc is exact, c/c++ applications must ensure that all live objects, strings, and numbers are gc-reachable. javascript values the type js::value represents a javascript value. the representation is 64 bits and uses nan-boxing on all platforms, although the exact nan-boxing format depends on the platform. nan-boxing is a technique based on the fact that in ieee-754 there are 2**53-2 different bit patterns that all represent nan. hence, we can encode any floating-point value as a c++ double (noting that javascript nan must be represented as one canonical nan format). other values are encoded as a value and a type tag: on x86, arm, an...
...act nan-boxing format depends on the platform. nan-boxing is a technique based on the fact that in ieee-754 there are 2**53-2 different bit patterns that all represent nan. hence, we can encode any floating-point value as a c++ double (noting that javascript nan must be represented as one canonical nan format). other values are encoded as a value and a type tag: on x86, arm, and similar 32-bit platforms, we use what we call "nunboxing", in which non-double values are a 32-bit type tag and a 32-bit payload, which is normally either a pointer or a signed 32-bit integer. there are a few special values: nullvalue(), undefinedvalue(), truevalue() and falsevalue(). on x64 and similar 64-bit platforms, pointers are longer than 32 bits, so we can't use the nunboxing format. instead, we use "punboxing",...
...age collector and tracing routines. jsinterp.*, jscntxt.*, jsinvoke.cpp the bytecode interpreter, and related functions such as call and allocstack, live in jsinterp.cpp. the jscontext constructor and destructor are factored out into jscntxt.cpp for minimal linking when the compiler part of js is split from the interpreter part into a separate program. jsinvoke.cpp is a build hack used on some platforms to build js_interpret under different compiler options from the rest of jsinterp.cpp. jsemit.*, jsopcode.tbl, jsopcode.*, jsparse.*, jsscan.*, jsscript.* compiler and decompiler modules. the jsopcode.tbl file is a c preprocessor source that defines almost everything there is to know about js bytecodes. see its major comment for how to use it. for now, a debugger will use it and its dependents s...
...e hash tables. these use multiplicative hash for strength reduction over division hash, yet with very good key distribution over power of two table sizes. jshash resolves collisions via chaining, so each entry burns a malloc and can fragment the heap. jsdhash uses open addressing. jslong.cpp, jslong.h 64-bit integer emulation, and compatible macros that use intrinsic c types, like long long, on platforms where they exist (most everywhere, these days). jsprf.* portable, buffer-overrun-resistant sprintf and friends. for no good reason save lack of time, the %e, %f, and %g formats cause your system's native sprintf, rather than js_dtoa(), to be used. this bug doesn't affect spidermonkey, because it uses its own js_dtoa() call in jsnum.cpp to convert from double to string, but it's a bug that we'll...
Cross-browser audio basics - Developer guides
html5 audio in more detail. audio html attributes we can specify a number of attributes with the audio tag to further determine the way audio is initialized. autoplay specifying autoplay will cause the audio to start playing as soon as possible and without any user interaction — in short, the audio will autoplay. <audio autoplay> ... </audio> note: this value is often ignored on mobile platforms, and its use is not recommended unless really necessary. auto-playing audio (and video) is usually really annoying. plus browsers have policies that will block autoplay entirely in many situations. see the autoplay guide for media and web audio apis for details. loop the loop attribute will ensure that upon getting to the end of the audio clip, the audio clip will loop back to the beginning an...
...play guide for media and web audio apis for details. loop the loop attribute will ensure that upon getting to the end of the audio clip, the audio clip will loop back to the beginning and start playing again. <audio loop> ... </audio> muted if you want the audio to start muted (no volume), add the muted attribute. <audio muted> ... </audio> note: this value is often ignored on mobile platforms. preload the preload attribute allows you to specify a preference for how the browser preloads the audio, in other words, which part of the file it downloads when the <audio> element is initialized, and before the play button is pressed. preload can take 3 different values: none: don't download anything before the play button is pressed. metadata: download the audio metadata; this is usua...
...dio metadata; this is usually the best option, as it allows you to access and display information such as audio length, and allow the browser to work out which audio file it should use. auto: download the whole audio file as soon as possible. this is generally not a good option unless you can guarantee your users will have a fast network connection. note: this value is often ignored on mobile platforms. <audio preload="auto"> ... </audio> controls we specify the controls attribute when we require the browser to provide us with its default playback controls. <audio controls> ... </audio> src as mentioned above, you can use the <source> element to specify one or more source audio files. alternatively, you can include the src attribute directly on the <audio> element to specify a single...
...flash-video.swf"> <param name="movie" value="mediaelement-flash-video.swf" /> <param name="flashvars" value="controls=true&isvideo=false&file=audiofile.mp3" /> </object> </audio> note: you should be aware that flash and silverlight code require that the user has the appropriate plugin installed, and that the browser cannot guarantee the security aspects of code running on those plugin platforms. these are also deprecated, and soon won't work in any modern browsers. manipulating the audio element with javascript in addition to being able to specify various attributes in html, the <audio> element comes complete with several properties and methods that you can manipulate via javascript. given the following html: <audio id="my-audio" src="audiofile.mp3"> ... </audio> you can grab ...
Codecs used by WebRTC - Web media technologies
aring vp8 using rtp (such as when using webrtc) is described in rfc 7741: rtp payload format for vp8 video. avc / h.264 support for avc's constrained baseline (cb) profile is required in all fully-compliant webrtc implementations. ...
...sometimes this simply means a parameter must (or must not) be supported. sometimes it means requiring a specific value for a parameter, or that a specific set of values be allowed. ...
...d capability), nor any other extensions to the g.711 standard are mandated by webrtc. due to its low sample rate and sample size, g.711 audio quality is generally considered poor by modern standards, even though it's roughly equivalent to what a landline telephone sounds like. it is generally used as a least common denominator to ensure that browsers can achieve an audio connection regardless of platforms and browsers, or as a fallback option in general. specifying and configuring codecs getting the supported codecs because a given browser and platform may have different availability among the potential codecs—and may have multiple profiles or levels supported for a given codec—the first step when configuring codecs for an rtcpeerconnection is to get the list of available codecs. to do this...
...worry about paying the license fees, which are typically focused more on the developers of the encoding and decoding software. warning: the information here does not constitute legal advice! be sure to confirm your exposure to liability before making any final decisions where potential exists for licensing issues. power needs and battery life another factor to consider—especially on mobile platforms—is the impact a codec may have on battery life. if a codec is handled in hardware on a given platform, that codec is likely to allow for much better battery life and less heat production. for example, safari for ios and ipados introduced webrtc with avc as the only supported video codec. avc has the advantage, on ios and ipados, of being able to be encoded and decoded in hardware. safari 12.1...
Using XPInstall to Install Plugins - Archive of obsolete content
api. the majority of this api is now deprecated and as of gecko 1.9 no longer available. extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest. in particular plugin developers should see how to package a plugin as an extension. xpinstall is a javascript-based installer technology that works across all the platforms that mozilla and netscape browsers based on mozilla (such as netscape 7) are deployed. it can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the browsing environment to launch a binary installer (the classic setup.exe experience on windows) or obliging the user to restart their browser. for plugin vendors who have already written a native cod...
...and then renaming it with the xpi file extension instead of the zip file extension. unlike native code installers (for example, files called setup.exe), the programming language for install operations in xpi is javascript. since the file format that contains the software and the install.js javascript file is a cross-platform file (zip) and since javascript is understood by mozilla browsers on all platforms, often one single xpi package can be deployed on all platforms. this is, in fact, how skins and themes are installed to mozilla browsers, changing their look and feel. this article focuses on how to install plugins. which browsers support xpinstall? currently, all mozilla browsers released by mozilla.org support xpinstall, and a family of browsers based on mozilla code support xpinstall. in pa...
...o windows. this is done via the created function, called function registerplid(). certainly, this script is windows-centric, but it is easy to port it to any other platform. easier, perhaps, since the lengthy win32 registry manipulation need not occur on linux or mac osx. the getfolder api provides you with enough "syntactic sugar" to determine other locations on the user's computer on different platforms and os's. a single install.js is often capable of running on many different platforms. some installation concerns this section gathers together some of the chief concerns about deploying xpi packages, notably: how ought a plugin download via xpi be initiated? and what about uninstalling plugins? triggering an xpinstall download with a triggerscript a trigger script is web-page delivered pie...
Tamarin Tracing Build Documentation - Archive of obsolete content
tamarin source versions the following instructions are for obtaining and building the tamarin tracing source code. ...
...one ... that's all. the avmplus executable is avmshell. for verbose build of tamarin, you can pass cppflags to make. $ make cppflags=-davmplus_verbose windows mobile to build for arm: $ python ../configure.py --target=arm-windows --enable-shell; make to build for thumb: $ python ../configure.py --target=thumb-windows --enable-shell; make platform-specific builds project files for specific platforms/ides (microsoft visual studio, xcode, etc) are included in the source tree under tamarin-tracing/platform, but are not formally supported. running tamarin compliance tests follow the same steps as the tamarin central instructions. http://developer.mozilla.org/en/docs...mpliance_tests running tamarin performance tests follow the same steps as the tamarin central instructions. http://developer.moz...
...ls. mercurial repository: give the location of the repository that will be used for the build. note: only repositories hosted on http://hg.mozilla.org/ are accepted. revision: specify the revision number that will be built. currently this only accepts the change number and not the hash. branch: which branch of tamarin the repository is based on, tamarin-central or tamarin-tracing. builders: which platforms will be compiled and tested. description: self explanatory check the status of the build @ http://tamarin-builds.mozilla.org/sandbox/ tryserver etiquette the sandbox is not a good substitute for running the regression tests locally to catch obvious problems. this is a shared resource, each request takes approximately 3+ hours to run so please use wisely. ...
Audio for Web games - Game development
atmosphere. web-based audio is maturing fast, but there are still many browser differences to navigate. we often need to decide which audio parts are essential to our games' experience and which are nice to have but not essential, and devise a strategy accordingly. this article provides a detailed guide to implementing audio for web games, looking at what works currently across as wide a range of platforms as possible. mobile audio caveats by far the most difficult platforms to provide web audio support for are mobile platforms. unfortunately these are also the platforms that people often use to play games. there are a couple of differences between desktop and mobile browsers that may have caused browser vendors to make choices that can make web audio difficult for game developers to work with. l...
...o work if the browser allows you to change volume (see below). also note that playing and immediately pausing your audio does not guarantee that a small piece of audio won't be played. note: adding a web app to your mobile's homescreen may change its capabilities. in the case of autoplay on ios, this appears to be the case currently. if possible, you should try your code on several devices and platforms to see how it works. volume programmatic volume control may be disabled in mobile browsers. the reason often given is that the user should be in control of the volume at the os level and this shouldn't be overridden. buffering and preloading likely as an attempt to mitigate runaway mobile network data use, we also often find that buffering is disabled before playback has been initiated. buff...
...g with sound effects for various things happening in the game. although the situation is soon going to get better with the adoption of the web audio api, the current most widely-supported method — using the vanilla <audio> element — leads to patchy results on mobile devices. element — results in patchy results on mobile devices. testing and support here's a table that shows what mobile platforms support the features talked about above. mobile support for web audio features mobile browser version concurrent play autoplay volume adjusting preload chrome (android) 69+ y y y y firefox (android) 62+ y y y y edge mobile y y y y opera mobile 46+ y y y y safari...
Gecko FAQ - Gecko Redirect 1
vendors fully support the open standards listed above so that they can have a rich, powerful formatting system and object model at their disposal, and "write once, view anywhere." gecko's robust support for these standards makes gecko the platform of choice for web content and web application developers worldwide. ...
... they can have a rich, powerful formatting system and object model at their disposal, and "write once, view anywhere." gecko's robust support for these standards makes gecko the platform of choice for web content and web application developers worldwide. are gecko's apis based on activex? com? javabeans? gecko is reusable on all platforms thanks to xpcom, a subset of com that works across platforms. com, developed by digital and later adopted by microsoft, is the de facto standard for modular interfaces on windows platforms. additionally, on the windows platform, gecko's xpcom interfaces are wrapped in an activex control that vb developers can utilize (activex wrappers are not available on other platforms because activex is a windows-only technology). a javabean wrapper is not currently u...
...pers are not available on other platforms because activex is a windows-only technology). a javabean wrapper is not currently under development, but there is nothing in gecko's architecture that precludes such development in the future. source code and documentation for these interfaces are available through mozilla.org. for future embedding api plans, see wikimo:mozilla 2:embedding apis. which platforms does gecko run on? gecko runs today on win32 (windows xp service pack 2, windows vista, windows 7, windows 8, windows 8.1, windows 10), mac os x 10.5 and later, and linux. oems and contributors from the net participating in mozilla.org are porting gecko to other platforms. such porting efforts are underway for solaris, hp/ux, aix, irix, os/2, openvms, beos, and amiga, among others. older versio...
Command line options
ance, not a new window in running instance, which allows multiple copies of application to be open at a time. firefox -new-instance -p "another profile" note: not available for windows, see bug 855899. -no-remote do not accept or send remote commands. implies -new-instance. firefox -no-remote -p "another profile" note: since firefox 9, this does really mean what its name implies on all platforms, i.e. instances created with this parameter do not accept or send remote commands, see bug 650078. that means that such instances won't be re-used. also when using this argument a new instance is created in any case. -override /path/to/override.ini load the specified override.ini file to override application.ini (browser/app/application.ini). this can be used to suppress the migration wizard a...
...manager and launch application with the profile named profile_name. useful for dealing with multiple profiles. firefox -p "joel user" note: profile_name is case sensitive. if you don't specify a profile name then the profile manager is opened instead. you must use an upper case p on linux with versions older than 7.x, as there lower case invokes purify mode (memory and leak detection). other platforms accept both upper and lower case. -profile "profile_path" start with the profile with the given path. firefox, thunderbird and seamonkey2.x only. "profile_path" can either be an absolute path ("/path/to/profile") or a relative path ("path/to/profile"). note: on mac os x specifying a relative path is not supported anymore from firefox 4.0 and up due to a regression, see bug 673955. browser...
... not permanently disabled in the extension manager data source). remote control -remote remote_command this feature was removed in firefox 36.0, restored in 36.0.1 and removed again in 39.0. see bug 1080319. execute the specified remote_command in an already running application process. firefox -remote "openurl(www.mozilla.org, new-tab)" this option is only available on x-windows unix platforms. miscellaneous -attach-console write messages for the debugging console into the window which launched the application instead of opening a new window for the debugging messages. only supported on the windows operating system. -console start application with a debugging console. note: windows only. -h or -help or -? print the list of all available command line options. note that on win...
JavaScript OS.Constants
lication data directory. winstartmenuprogsdir the path to the programs subdirectory in the user's start menu. macuserlibdir the path to the user's library directory. maclocalapplicationsdir the path to the local applications directory. os.constants.libc constants for interacting with libc. useful mostly for using js-ctypes to interact with the following platforms: macos x; android; linux; other variants of unix. os.constants.libc is available on all platforms, although some constants are not defined everywhere. before using a constant, you should check that it is defined. error values eacces permission denied eagain resource temporarily unavailable ebadf bad file descriptor eexist file exists ...
...able under windows) value too large to be stored in datatype. eperm operation not permitted erange result too large etimedout (not always available under windows) operation timed out. ewouldblock (not always available under windows) operation would block. exdev cross-device link opening files unix access rights defined on all platforms but meaningful only on unix. s_irwxu current user can read, write, execute the file. equivalent to s_irusr | s_iwusr | s_ixusr. s_irusr current user can read the file. s_iwusr current user can write (modify) the file. s_ixusr current user can execute the file. s_irwxg current group of the current user can read, write, execute the file. ...
... o_rsync o_shlock atomically obtain a shared lock. o_symlink allow opening of symbolic links. o_sync (linux only) open for purely synchronous access. o_trunc truncate the file. o_wronly open the file for write only. os.constants.win constants for interacting with the windows api. os.constants.win is undefined on non-windows platforms. useful mostly in conjunction with js-ctypes. (tbd) ...
Gecko Profiler FAQ
helpful. how do we know when profiler output is statistically significant (for comparing across runs / across machines)? [mstange] hard to say. prefer to do comparisons by measuring your timings with code instead of by inspecting profiles. always keep in mind that profiler overhead has the potential to skew the results. ...
... unless if you profile on windows you will never find those specific issues. ...
...ode calls into a windows api that requires loading a dll the first time you call it that takes 10s of milliseconds to finish, etc. unless if you profile on windows you will never find those specific issues. and when you get to the platform specific parts of the browser stack (such as graphics, media, etc.) then profiling on windows would be certainly a lot more valuable than on other platforms. should i profile known to be slow sites on slower hardware to get a better signal? [mstange] that’s probably a good idea. as long as the slower hardware is still capable enough that the profiler can successfully complete symbolication. [ehsan] performance issues are just much easier to spot on slower hardware, so if nothing else, using slower hardware will ...
Refcount tracing and balancing
refcount tracing and balancing are advanced techniques for tracking down leak of refcounted objects found with bloatview. the first step is to run firefox with refcount tracing enabled, which produces one or more log files. refcount tracing logs calls to addref and release, preferably for a particular set of classes, including call-stacks in symbolic form (on platforms that support this). refcount balancing is a follow-up step that analyzes the resulting log to help a developer figure out where refcounting went wrong. how to build for refcount tracing build with --enable-debug or --enable-logrefcnt. how to run with refcount tracing on there are several environment variables that can be used. first, you select one of three environment variables to choose what kind of logging you want. y...
...s without xpcom_mem_log_classes and/or xpcom_mem_log_objects, because without some filtering the logging will be completely useless due to how slow the browser will run and how large the logs it produces will be. xpcom_mem_comptr_log this environment variable enables logging of additions and releases of objects into nscomptrs. this requires c++ dynamic casts, so it is not supported on all platforms. ...
...this results in slower code, but at least you get some data about where the leaks might be occurring from. ...
Optimizing Applications For NSPR
this has proven to be quite challenging, a challenge that was met to a large degree, but there is always room for improvement. the casual client may not encounter a need to know the details of the shortcomings to the level described here, but if and when clients become more sophisticated, these issues will certainly surface. this memo is by no way complete. multiplatform do not call any blocking system call from a local thread. ...
... nt, this problem is especially obvious because the idle thread, which is in charge of driving the asynch io completion port, is also blocked. do not call blocking system calls from the primordial thread. create a global thread and call the system call in that thread, and have the primordial thread join that thread. nspr uses timer signals to implement thread preemption for local threads on some platforms. if all the software linked into the application is not ported to the nspr api, the application may fail because of threads being preempted during critical sections. to disable thread preemption call <tt>pr_disableclockinterrupts()</tt>during initialization. interrupting threads (via <tt>pr_interrupt()</tt>) on threads blocked in i/o functions is implemented to various degrees on different platf...
... linked into the application is not ported to the nspr api, the application may fail because of threads being preempted during critical sections. to disable thread preemption call <tt>pr_disableclockinterrupts()</tt>during initialization. interrupting threads (via <tt>pr_interrupt()</tt>) on threads blocked in i/o functions is implemented to various degrees on different platforms. the unix based platforms all implement the function though there may be up to a 5 second delay in processing the request. the mechanism used to implement <tt>pr_interrupt()</tt> on the pthreads versions of nspr is flawed. no failure attributable to the flaw has shown up in any tests or products - yet. the specific area surrounding pthread's continuation thread has been both observed and empirically proven faulty, and a ...
Introduction to Network Security Services
one loadable modules, not meant to be linked with directly: libfort.so/libfort.sl/fort32.dll provides support for hardware fortezza. libswft.so/libswft.sl/swft32.dll provides support for software fortezza. libnssckbi.so/libnssckbi.sl/nssckbi.dll defines the default set of trusted root certificates. support for ilp32 in nss 3.2 and later versions, there are two new shared libraries for the platforms hp-ux for parisc cpus and solaris for (ultra)sparc (not x86) cpus. these hp and solaris platforms allow programs that use the ilp32 program model to run on both 32-bit cpus and 64-bit cpus. the two libraries exist to provide optimal performance on each of the two types of cpus. these two extra shared libraries are not supplied on any other platforms. the names of these libraries are platform-dep...
... against these libraries, because they are dynamically loaded by nss at run time. linking the application against one or the other of these libraries may produce an application program that can only run on one type of cpu (e.g. only on 64-bit cpus, not on 32-bit cpus) or that doesn't use the more efficient 64-bit code on 64-bit cpus, which defeats the purpose of having these shared libraries. on platforms for which these shared libraries exist, nss 3.2 will fail if these shared libs are not present. so, an application must include these files in its distribution of nss shared libraries. these shared libraries should be installed in the same directory where the other nss shared libraries (such as libnss3.so) are installed. both shared libs should always be installed whether the target system has a ...
...ution of nss shared libraries. these shared libraries should be installed in the same directory where the other nss shared libraries (such as libnss3.so) are installed. both shared libs should always be installed whether the target system has a 32-bit cpu or a 64-bit cpu. nss will pick the right one for the local system at run time. note that nss 3.x is also available in the lp64 model for these platforms, but the lp64 model of nss 3.x does not have these two extra shared libraries. what you should already know before using nss, you should be familiar with the following topics: concepts and techniques of public-key cryptography the secure sockets layer (ssl) protocol the pkcs #11 standard for cryptographic token interfaces cross-platform development issues and techniques where to find mo...
NSS environment variables
not specify. nss_shared_db 3.12 nss_disable_arena_free_list string (any non-empty value) define this variable to get accurate leak allocation stacks when using leak reporting software. nss_memory_allocation 3.4 nss_disable_unload string (any non-empty value) disable unloading of dynamically loaded nss shared libraries during shutdown. necessary on some platforms to get correct function names when using leak reporting software. 3.11.8 nss_enable_audit boolean (1 to enable) enable auditing of activities of the nss cryptographic module in fips mode. audit data 3.11.2 nss_enable_pkix_verify boolean (any non-empty value to enable) use libpkix, rather than the old cert library, to verify certificates. 3.12 ...
...since 3.11. nss_force_fips boolean (1 to enable) allows enabling fips mode using nss_fips 3.24 os_target string (target os) for cross-compilation environments only, when the target os is not the default for the system on which the build is performed. values understood: win95 before 3.0 use_64 boolean (1 to enable) on platforms that has separate 32-bit and 64-bit abis, nss builds for the 32-bit abi by default. this tells nss to build for the 64-bit abi. before 3.0 use_debug_rtl boolean (1 to enable) on windows, msvc has options to build with a normal run time library or a debug run time library. this tells nss to build with the debug run time library. before 3.0 use_pthreads boolean ...
...t and 64-bit abis, nss builds for the 32-bit abi by default. this tells nss to build for the 64-bit abi. before 3.0 use_debug_rtl boolean (1 to enable) on windows, msvc has options to build with a normal run time library or a debug run time library. this tells nss to build with the debug run time library. before 3.0 use_pthreads boolean (1 to enable) on platforms where posix threads are available, but are not the os'es preferred threads library, this tells nss and nspr to build using pthreads. before 3.0 nss_no_pkcs11_bypass string (1 to enable) disables at compile-time the ns ssl code to bypass the pkcs11 layer. when set the sslbypass run-time variable won't take effect before 3.15 ...
SpiderMonkey 1.8.7
plements es-5 (ecma 262, 5th edition), and contains many new language and api features, described in detail below. please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. or, file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. ...
...it's the same language, just not as fast. migrating to spidermonkey 1.8.7 this covers migrating from version 1.8.5. see the 1.8.5 release notes for information on migrating from earlier versions. ...
....1 (gcc) 4.2.1 (apple inc. build 5574) to work around this issue, either upgrade your xcode or use an alternate version of gcc, such as the one that shipped with leopard. to select an alternate c++ compiler, invoke configure thus: cxx=/usr/bin/g++-4.0 /path/configure --my-configuration-options js-config the new configure-based build system does not correctly generate the js-config script on many platforms, nor when js-ctypes are enabled. if you are building your project with a gnu-make based build system, the following workaround can be integrated into your build system to generate the correct ldflags, with a strong likelihood that it will work with future versions when js-config is fixed: js_config ?= /path/to/js-config uname_system = $(shell uname -s) jsapi_ldflags = $(shell $...
SpiderMonkey 1.8.8
le faster jitted code. it also contains new language and api features described in detail below. please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. or file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. ...
...it's the same language, just not as fast. ...
...it's the same language, just not as fast. migrating to spidermonkey 1.8.8 the following features in earlier versions of spidermonkey have been dropped. ...
SpiderMonkey 17
pe inference to enable faster jitted code. it also contains new language and api features described in detail below. please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. or file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. ...
...it's the same language, just not as fast. ...
...it's the same language, just not as fast. migrating to spidermonkey 17 the following features in earlier versions of spidermonkey have been dropped. ...
SpiderMonkey 31
es with this release by posting in the mozilla.dev.tech.js-engine newsgroup. or file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. the download url is outdated and spidermonkey not release alone! get it here mozilla-esr31 you will find it in "firefox extended support release 31" package on hg release platform support spidermonkey 31 is supported on all the platforms where firefox 31 runs. compiling it requires a c++ compiler, and the jsapi can only be used from c++ code. if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010: msvc8/9 support has been dropped. spidermonkey 31 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase. it is supported...
...ompiler, and the jsapi can only be used from c++ code. if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010: msvc8/9 support has been dropped. spidermonkey 31 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase. it is supported on x86, x86_64, and arm architectures. on some other platforms (sparc, mips), the jit is provided but not supported. on all other platforms the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 31 the first change most embedders will notice is that spidermonkey must now be initialized before it can be used, using the newly-repurposed js_init method. ...
...ey apis as usual. once all jsapi operation has completed, the corresponding js_shutdown method uninitializes spidermonkey, cleaning up memory and allocations performed by js_init. it is not required to call js_shutdown at present, but it is strongly recommended: calling it may be required in a future spidermonkey release. javascript shell changes detail added/removed methods here... on posix platforms, building a threadsafe shell no longer requires nspr. embedders still need to build with nspr, as the new wrappers require using spidermonkey internal functions which are not exposed to the public api. known issues detail any known issues here... future direction ...insert details on future plans... spidermonkey embedders should be aware that mozilla has no plans to keep the jsapi, nor th...
AT APIs Support
progress still. but in the meantime it more up-to-date and contains more details than existed analogues for at-spi and msaa this documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software. we provide for them the support of these products on windows, linux/unix and os x platforms. accessible gecko gecko is a rendering engine that firefox, seamonkey, netscape and yelp use. gecko can render a variety of content, not just html and supports key web standards such as cascading style sheets, javascript and the w3c dom. gecko also handles the users keystrokes and mouse clicks. gecko is the core architecture that we are adding accessibility to, in order to support basic accessi...
...ications xul applications make full use of the gecko architecture, not only for html content, but also for the entire user interface. widgets such as menus, tab panels, tree views and dialogs are provided via an xml language called xul (extensible user-interface language). none of the user interface contains standard os controls. this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances). developing a xul window is not that different from developing a web page, but the elements available to add widgets are more powerful and designed to be similar to desktop widgets. examples of xul applications: firefox - web-browser thunderbird - email client seamonkey - web-browser, advanced e-mail and newsgroup client, irc chat client, and ...
...fficial releases. however most of described features are supported starting from gecko 1.9.0 (firefox 3.0). however it's preferable to grab the current build of firefox or any other gecko-based product to be up to dated: firefox recent builds thunderbird recent builds seamonkey recent builds determining if accessibility is enabled in a firefox accessibility is enabled on windows and linux platforms by default. as well you might find helpful the about:accessibilityenabled firefox extension. supported at apis at apis terms microsoft active accessibility (msaa) an api devised by microsoft so that accessibility aids can track what's going on inside the user interface of any software package that supports it. if you seriously need to understand msaa, you'll need to read the docs on msdn an...
xptcall FAQ
function whose job it is to use the typelib information to extract the parameters from the platform specific calling convention to build an array of variants to hold the parameters and then call an inherited method which can then do whatever it wants with the call. this code also does the platform specific cleanup as the call returns. this all works and is being used in mozilla today on numerous platforms. why can't xptcall just be implemented in c or c++? neither of these two facilities can be done in a fully cross platform way. nor can they generally be done fully in c or c++. let's take them one at a time to see why. the invoke facility requires code that can build and invoke an arbitrary call frame. the c++ compiler builds such call frames all the time. but the compiler builds frames custom...
... part way, but is just not enough. if anyone has credible ideas about how to get the required functionality in a cross platform way and/or without resorting to assembly code i'd love to hear about it. is xptcall a platform requirement for mozilla? yes. mozilla will not run properly without a functioning port of xptcall. non-functional stub code exists to allow building xptcall on non-supported platforms. ...
... about it. is xptcall a platform requirement for mozilla? yes. mozilla will not run properly without a functioning port of xptcall. non-functional stub code exists to allow building xptcall on non-supported platforms. but any browser feature that relies on xpconnect will fail. any platform that does not do xptcall is in trouble. we need to get moving on getting xptcall working everywhere! what platforms are supported? the growing list: porting status where can i find other resources? the code is at: xpcom/reflect/xptcall a new porting guide is at: https://developer.mozilla.org/en/xptcall_porting_guide pre-implementation proposals are here and here. original document information author(s): john bandhauer <jband@netscape.com> originally published: 02 september 1999 ...
Xptcall Porting Guide
overview xptcall is a library that supports both invoking methods on arbitrary xpcom objects and implementing classes whose objects can impersonate any xpcom interface. it does this using platform specific assembly language code. this code needs to be ported to all platforms that want to support xptcall (and thus mozilla). the tree mozilla/xpcom/reflect/xptcall +--public // exported headers +--src // core source | \--md // platform specific parts | +--mac // mac ppc | +--unix // all unix | \--win32 // win32 | +--test // simple tests to get started \--tests // full tests via api porters are free to create subdirectories under the base md directory for their given platforms and to integrate into the build system as appropriate for their platform. ...
...gy of: figure out how much stack space is needed for the params, make the space in a new frame, copy the params to that space, invoke the method, cleanup and return. c++ is used where appropriate, assembly language is used where necessary. inline assembly language is used here, but it is equally valid to use separate assembly language source files. porters can decide how best to do this for their platforms. the stubs functionality is more complex. the goal here is a class whose vtbl can look like the vtbl of any arbitrary xpcom interface. objects of this class can then be built to impersonate any xpcom object. the base interface for this is (from xptcall/public/xptcall.h): class nsxptcstubbase : public nsisupports { public: // include generated vtbl stub declarations. // these are virtual a...
... is (from xptcall/public/xptcall.h): class nsxptcstubbase : public nsisupports { public: // include generated vtbl stub declarations. // these are virtual and *also* implemented by this class.. #include "xptcstubsdecl.inc" // the following methods must be provided by inheritor of this class. ...
ctypes
, returntype[, argtype1, ...]); cdata int64(n); string libraryname(name); library open(libspec); ctype pointertype(typespec); ctype structtype(name[, fields]); cdata uint64(n); properties property type description errno number the value of the latest system error. similar to errno in libc, available on all platforms. cannot be set. winlasterror number|undefined the value of the latest windows error. similar to getlasterror under windows, available only for windows. cannot be set. constants abi constants these constants are used to specify the abi used to call a native function in the library. constant description default_abi corresponds to cdecl; standard libr...
...ll_abi used for calling functions declared with stdcall on windows. these functions' names are automatically mangled for you by js-ctypes. winapi_abi used for calling windows system functions. these are declared as stdcall on windows, but do not have mangled names like those used by stdcall_abi above. predefined data types primitive types these types behave the same on all platforms. type description int8_t signed 8-bit integer. uint8_t unsigned 8-bit integer. int16_t signed 16-bit integer. uint16_t unsigned 16-bit integer. int32_t signed 32-bit integer. uint32_t unsigned 32-bit integer. int64_t signed 64-bit integer. uint64_t unsigned 64-bit integer. float32...
...ng c type on the platform. int an integer type that behaves like the int c type on the platform. unsigned_int an unsigned integer type that behaves like the unsigned int c type on the platform. long a long integer type that behaves like the corresponding c type on the platform. note this automatically converts to an int64 javascript object on all platforms, since it's unknown whether this is a 32-bit or 64-bit value. this is done for compatibility's sake. unsigned_long an unsigned long integer type that behaves like the corresponding c type on the platform. note this automatically converts to a uint64 javascript object on all platforms, since it's unknown whether this is a 32-bit or 64-bit value. this is done for...
BeforeInstallPromptEvent - Web APIs
2px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">beforeinstallpromptevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor beforeinstallpromptevent() creates a new beforeinstallpromptevent. properties inherits properties from its parent, event. beforeinstallpromptevent.platforms read only returns an array of domstring items containing the platforms on which the event was dispatched. this is provided for user agents that want to present a choice of versions to the user such as, for example, "web" or "play" which would allow the user to chose between a web version or an android version. beforeinstallpromptevent.userchoice read only returns a promise that resolves to a...
...roid version. beforeinstallpromptevent.userchoice read only returns a promise that resolves to a domstring containing either "accepted" or "dismissed". ...
...rns a promise that resolves to a domstring containing either "accepted" or "dismissed". methods beforeinstallpromptevent.prompt() allows a developer to show the install prompt at a time of their own choosing. this method returns a promise. ...
Index - Web APIs
Web › API › Index
ent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key). in other words, this property returns a value which isn't altered by keyboard layout or the state of the modifier keys. 2208 keyboardevent: code values the following tables show what code values are used for each native scancode or virtual keycode on major platforms. because some browsers choose to interpret physical keys differently, there are some differences in which keys map to which codes. these tables show those variations when known. 2209 keyboardevent.ctrlkey api, dom, keyboardevent, property, read-only, reference the keyboardevent.ctrlkey read-only property returns a boolean that indicates if the control key was pressed (true) o...
... and layout. 2215 key values characters, dom, key codes, key values, keyboardevent, keycodes, keypad, keystrokes, meta, meta keys, modifier keys, modifiers, reference, ui events, events, keyboard, keys the tables below list the standard key values in various categories of key, with an explanation of what the key is typically used for. corresponding virtual keycodes for common platforms are included where available. 2216 keyboardevent.keycode api, dom, dom events, deprecated, keyboardevent, property, read-only, reference, keycode the deprecated keyboardevent.keycode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key. 2217 keyboardevent.keyidentifier api, dom, d...
... landing, notifications, permission, system the notifications api allows web pages to control the display of system notifications to the end user. these are outside the top-level browsing context viewport, so therefore can be displayed even when the user has switched tabs or moved to a different app. the api is designed to be compatible with existing notification systems, across different platforms. 2793 using the notifications api api, advanced, dom, guide, notifications, notifications api, push, tutorial the notifications api lets a web page or app send notifications that are displayed outside the page at the system level; this lets web apps send information to a user even if the application is idle or in the background. this article looks at the basics of using this ...
File I/O - Archive of obsolete content
r example a user profile directory). then you may use file.append("myfile.txt"); to make it point to myfile.txt inside that directory. note: avoid using dir.path+"\\"+"myfile.txt", as it is not cross-platform at all. using something like ((path.search(/\\/) != -1) ? path + "\\" : path + "/") + "myfile.txt"; is possible, but nsifile.append() is much easier to read and is guaranteed to work on all platforms. enumerating files in given directory the snippet below makes an array of nsifiles corresponding to sub-directories/"sub-files" of the given directory. you can tell files from folders by calling nsifile.isdirectory() and nsifile.isfile() methods on each entry. // file is the given directory (nsifile) var entries = file.directoryentries; var array = []; while(entries.hasmoreelements()) { var ...
...tstream.available()); }); read with content type hint it's useful to provide a content type hint to prevent the file system from doing a potentially expensive content type look up (which would be synchronous i/o). in this case an nsichannel object has to be explicitly created from the file: components.utils.import("resource://gre/modules/netutil.jsm"); // content type hint is useful on mobile platforms where the filesystem // would otherwise try to determine the content type. var channel = netutil.newchannel(file); channel.contenttype = "application/json"; netutil.asyncfetch(channel, function(inputstream, status) { ... }); writing to a file write a string this sample uses netutil.jsm and fileutils.jsm. components.utils.import("resource://gre/modules/netutil.jsm"); components.utils.impor...
Structure of an installable bundle - Archive of obsolete content
ons, and can normally only provide a chrome.manifest which registers the theme and a jar file. platform-specific files gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) removed support for platform-specific subdirectories, described below. instead, you need to use manifest flags, such as the os and abi flags, in your chrome manifest to specify components that should be loaded for specific platforms. for example: binary-component components/windows/mycomponent.dll abi=winnt_x86-msvc binary-component components/mac/mycomponent.dylib abi=darwin_x86-gcc3 binary-component components/mac/mycomponent64.dylib abi=darwin_x86_64-gcc3 binary-component components/linux/mycomponent.so abi=linux_x86-gcc3 this also means you can no longer have platform-specific preference files in your bundle. platfo...
...can no longer have platform-specific preference files in your bundle. platform-specific subdirectories: gecko 1.9.2.x and earlier note: platform-specific subdirectory support was removed in gecko 2.0. see the section platform-specific files to learn how to use platform-specific files. in some cases a single extension or application may wish to include binary component or plugins for multiple platforms, or theme authors might want to include multiple platform-specific jar files. to facilitate the first case, the extension/app loader has special sub-directories specifically for platform-specific files (starting with toolkit/gecko 1.8, firefox/thunderbird 1.5). the platform string is defined during the toolkit build process to a value unique for the combination of operating system, processor arch...
Modularization techniques - Archive of obsolete content
for which com support is currently widely available is windows. microsoft ships a com extension for the macintosh, but it's generally only installed with internet explorer or microsoft office. unix support for com is scarce. why not com on windows? because it's not a cross platform solution, and that's what we need. we're going to make every effort to make our interfaces compatible with com on platforms that support it, so it may not matter. but no promises, yet. what are the major differences? instead of microsoft's midl compiler, we are using a corba-compliant idl compiler, xpidl. it outputs nspr types when generating c++ headers. it also generates typelibraries that are not compatible with microsoft's .tlb format. xpcom uses these typelibraries to allow other languages, such as javascript, ...
...so generates typelibraries that are not compatible with microsoft's .tlb format. xpcom uses these typelibraries to allow other languages, such as javascript, to implement and call xpcom objects. we also do cross-thread proxying calls using the typelib and nspr's event queues. microsoft provides an extensive support infrastructure for com. this technology is built into windows, but not most other platforms. the technology can be licensed from microsoft, but for obvious reasons we are not going to be doing that. in house equivalents to the important elements of this technology will be developed as needed. links the component object model specification revision history feb 25, 1998, created oct 19, 1998, dusted off momentarily oct 10, 1999, added comments about xpidl, language-independentn...
Mozilla Application Framework - Archive of obsolete content
shows you every file in the repository as well as a line-by-line breakdown of who changed which line when in each file bonsai a web interface to the checkin log that you can query for checkins between certain dates, of certain files, or by certain developers. tinderbox our 24/7 build and test webtool that constantly builds, tests, and reports on the mozilla application suite on multiple platforms so you can see the state of the application at any given point in time. community a large, active development community that interacts via newsgroups, mailing lists, irc channels, and web sites. flexible licensing with three licenses to choose from (mpl, lgpl, and gpl) so you can develop both open source and proprietary applications and combine the mozilla framework with other libraries. d...
...he mozilla framework with other libraries. dozens of existing applications from both large and small development teams. did you know? the mozilla app framework can be used to build standalone desktop applications like komodo, apps that run on top of the mozilla application suite like mozblog, and web applications like the mozilla amazon browser. mozilla has been ported to more than a dozen platforms including windows (95, 98, nt, 2000, xp, ce), mac os x, linux, solaris, beos, openvms, os/2, aix, and hp-ux. you can build simple but powerful mozilla-based applications using just javascript and xul. original document information author(s): myk melez last updated date: march 3, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors...
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
tamarin-central rev 703:2cee46be9ce0 was declared stable on 12/02/08. the announcement sent to tamarin-devel can be read here. testing summary acceptance tests have passed on the following supported platforms: * windows, 32 & 64 bit * mac ox x ppc & intel, 32 bit * linux, 32 bit * windows mobile arm version asc-4200 of the actionscript compiler was used for all tests. performance testsuite time metric the following is a comparison of the current tamarin-central (tc-703) versus the prior build (tc-700) as well as current against the vm in flash player 10. the key takeaway is that the interpreter is much improved. osdefault-jitinterpretedaggressive jit mac (os/x 10.4 intel, ...
... recursive pcre testcases kills the stack on pocketpc builds ...
ContextMenus - Archive of obsolete content
text menu to apply to. one technique is to attach a context menu to an entire document area. for instance, the firefox browser applies a single context menu to the browser area which displays web pages. for example, the following will attach a context menu with the id 'contentareacontextmenu' to a browser element: <browser context="contentareacontextmenu"> indicating the default item on some platforms, one of the items in a context menu is marked as being a default operation. typically, this will cause the menuitem's label to appear in the context menu in bold. what constitutes the default item isn't specified, but is usually the operation carried out when the item was left-clicked or pressed normally, as opposed to context clicked. you can indicate this item, if it applies, using the default ...
...n the item was left-clicked or pressed normally, as opposed to context clicked. you can indicate this item, if it applies, using the default attribute. <menupopup id="link-menu"> <menuitem label="open link" default="true"/> <menuitem label="open in new window"/> <menuitem label="properties"/> </menupopup> the default attribute has been set to true on the first menu item ('open link'). on platforms that support it, it will be marked as a default item. on other platforms, the attribute will just be ignored and the menuitem will be displayed normally. naturally, it only makes sense to have one default item per context menu. note that the default attribute just affects how the item is displayed, it performs no other function itself. you will still need to associate code with the element to ha...
Menus - Archive of obsolete content
u" label="file"> ... </menu> <menu id="tools-menu" label="tools"> ... </menu> <menu id="help-menu" label="help"> ... </menu> </menubar> it's possible to place other elements on a menubar, but remember that they will not appear on a macintosh. so you should ensure that the functionality of these elements is avialable elsewhere. or, you could write code that handles multiple platforms in different ways. if you do place other elements on a menubar, you may wish to align them on the far side rather than next to the other menus. you can do this by adding a flexible spacer. <menubar id="sample-menubar"> <menu id="file-menu" label="file"> ... </menu> <spacer flex="1"/> <image src="logo.png"/> </menubar> in this example, a logo image is placed on the end of a menubar.
... menupopup should be placed as a direct child of the menu. the menu can also be opened by using the keyboard. the user can press a key to highlight the menu labels and navigate with the cursor keys. the key is different for each platform; on windows f10 can be used. another way is to add shortcut keys called access keys for each menu element to make it easier to access the menu commands. on some platforms, adding an access key will underline a letter in the menu label indicating the key to press. for this reason, the access key should always correspond to a character that appears in the menu label. to set an access key for a menu, use the accesskey attribute, as in the example below. <menu label="file" accesskey="f"/> this menu can then be opened by pressing the access key (typically in combin...
Special per-platform menu considerations - Archive of obsolete content
umber of items that pertain to the application. for instance, this is the proper place to put the menu items which open the application preferences and which quit the application. this can be accomplished by ensuring that certain common ids are set for the menu items that need to be placed on the application menu. on the mac, these menu items will be moved onto the application menu, but on other platforms, they will be left in their original locations. this makes it easier to write the same xul code for all platforms. here is a list of the menu item ids which are automatically handled. menu_filequitseparator the separator just before the quit/exit item. menu_filequititem the item which exits the application. menu_prefsseparator the separator just before the pre...
.... here is an example: <menubar> <menu label="tools"> <menupopup> <menuitem label="spell check"/> <menuitem id="menu_preferences" label="preferences" oncommand="window.opendialog('options.xul', '_new', 'chrome');"/> </menupopup> </menu> </menubar> this menu item will be placed on the application menu on the macintosh but left in the tools menu on other platforms. when moved to the application menu, the label and shortcut keys are overridden by platform conventions. however, regardless of the platform, the command event will be fired on the menu item when it is activated by the user. notes for firefox extension developers on the mac, some elements, once moved to the application menu, are no longer accessible from xul overlays or from javascript injected...
Using Spacers - Archive of obsolete content
« previousnext » in this section, we will find out how to add some spacing in between the elements we have created. adding spacers one of the problems with developing user interfaces is that each user has a different display. some users may have larger displays with higher resolutions and others may have lower resolutions. in addition, different platforms may have special requirements on the user interface. ...
...veloping user interfaces is that each user has a different display. some users may have larger displays with higher resolutions and others may have lower resolutions. in addition, different platforms may have special requirements on the user interface. if adding support for multiple languages, the text for one language may require more room than another. applications that need to support multiple platforms and languages usually have their windows laid out with lots of space to allow for this. some platforms and user interface toolkits provide components that are smart enough to resize and re-position themselves to fit the needs of the user. (java uses layout managers for example.) xul provides the capability for elements to position and resize automatically. as we've seen, the find files window has...
button - Archive of obsolete content
l button. group type: string group name buttons with type="radio" and the same value for their group attribute are put into the same group. only one button from each group can be checked at a time. if the user selects one the buttons, the others in the group are unchecked. icon mozilla 1.8 type: string this attribute should be used to set the usage for common buttons. some platforms display these buttons with a small icon indicating their usage. this should be used in place of the image attribute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. if you are using a button that matches one of these common usages, use the icon attribute...
... used in place of the image attribute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. if you are using a button that matches one of these common usages, use the icon attribute to indicate this. see the appearance of the different icons on some available platforms. image type: uri the uri of the image to appear on the element. if this attribute is empty or left out, no image appears. the position of the image is determined by the dir and orient attributes. label type: string the label that will appear on the element. if this is left out, no text appears. for an editable menuitem element the value of this attribute is copied to the me...
prefwindow - Archive of obsolete content
s | methods | related ] a specialized window used for preference dialogs. this element should be used in place of the window tag and should contain one or more prefpane elements. a row of buttons appears across the preference dialog, one for each prefpane. each pane will usually group together a set of related preferences. if there is only one prefpane, the navigation area will be hidden. on platforms where the convention is to apply changes immediately, the preferences are adjusted as soon as the user interface element is changed. on other platforms, the preferences are not applied until the dialog is closed. you can open a preference window using a window's opendialog method as with other dialogs. you can pass the id of a particular pane as the fourth argument to opendialog to open a specif...
...r more information). a true value for this preference makes the preference window apply immediately the user choices, without waiting for the dialog to close with ok. the second preference is browser.preferences.animatefadein, again a boolean preference. this one can be safely omitted in xulrunner-based applications but you can override the default behavior (true for mac os x and false for other platforms) setting it. for animatefadein to work properly, contents of prefpanes should be put into overlays. note for mac os x: a common way of opening modal windows on mac os x that are not attached as a sheet to the main window is to use nsiwindowwatcher.openwindow() with a null parentwindow. this does not work with prefwindows, breaking the general behavior of the window and in particular the list of...
Archived Mozilla and build documentation - Archive of obsolete content
develop and distribute cryptographic software, particularly for commercial sale or distribution, then you should consult an attorney with expertise in the particular laws and regulations that apply in your jurisdiction. mozprocess mozprocess provides python process management via an operating system and platform transparent interface to mozilla platforms of interest. mozprocess aims to provide the ability to robustly terminate a process (by timeout or otherwise), along with any child processes, on windows, os x, and linux. mozprocess utilizes and extends subprocess.popen to these ends. nanojit nanojit is a small, cross-platform c++ library that emits machine code. both the tamarin jit and the spidermonkey jit (a.
...eciate help with testing. plug-n-hack plug-n-hack (pnh) is a proposed standard from the mozilla security team for defining how security tools can interact with browsers in a more useful and usable way. plugin architecture this page contains some notes on how plugins work internally in gecko. it is mainly of interest to gecko developers. porting nspr to unix platforms last modified 16 july 1998 priority content update: i've removed documents from this list that have been migrated into the wiki. the list of completed documents is available through the devedge page. prism prism is a simple xulrunner-based browser that hosts web applications without the normal web browser user interface. prism is based on a concep...
2006-11-03 - Archive of obsolete content
compiling) on different machines. dale has discovered that there are other people who are experiencing the same issues as he is. he has also found a work around which is to use version 20040127-1 of sh.exe instead of the sh.exe version 20040127-3. fix host_libidl_libs originally posted on october 29th: gery gery claims to have discovered a problem when he compiles mozilla across different platforms when pkg_config is used. on november 1st peter weilbacher responded gery's question. he told gery to create a bug for this problem in bugzilla. on november 2nd gery replied with the bug number 358706. problems building browser's trunk on windows using vs 2005 originally posted on october 29th: ricardo sixel is trying to retrieve the trunk source code using the browser check out optio...
...erboxes. on october 30th boris zbarsky boris expresses his opinion about paul taking down one of the two build boxes that produces nightly builds for linux. on october 30th j. paul reed responds to boris with the following explanation on why he is taking down one of two the linux build servers. paul explains that his goal is to do only singular sets of builds where the coverage of all the platforms is constant. meetings there were no meetings this week. summarized by: vanessa miranda & mohammad tirtashi ...
External resources for plugin creation - Archive of obsolete content
, it is still a good idea to have an understanding of what is going on under the hood, regardless of the level of abstraction provided. framework: firebreath project home page project history description (from the project creators): firebreath is a cross-platform browser plugin framework written in c++. plugins created with firebreath work on all major browsers, including firefox 3.0 and later. platforms supported include windows, linux, and mac os x (intel). feature highlights include thread safety checks, unicode support (with std::wstring), activex support, built-in drawing model negotiation for mac, automatic type conversion (including javascript arrays and objects), advanced security features, and more. supported development environments are visual studio on windows, xcode on mac, and gcc o...
...lude windows, linux, and mac os x (intel). feature highlights include thread safety checks, unicode support (with std::wstring), activex support, built-in drawing model negotiation for mac, automatic type conversion (including javascript arrays and objects), advanced security features, and more. supported development environments are visual studio on windows, xcode on mac, and gcc on linux. all platforms rely on cmake for easy cross-platform builds. project: nixysa project home page description (from the home page): nixysa is a framework written in python to automatically generate glue code for npapi plugins (plugins for browsers such as google chrome or firefox), letting you easily expose c++ classes to javascript from a simple idl representation. nixysa was originally conceived for the needs of...
Samples and Test Cases - Archive of obsolete content
however, even if one cannot build the samples they can still be very valuable as code references. there is a guide to compiling the npruntime sample in visual studio. in addition to those samples, there are 2 more plugins in the tree that might be helpful. ...
...however, even if one cannot build the samples they can still be very valuable as code references. there is a guide to compiling the npruntime sample in visual studio. in addition to those samples, there are 2 more plugins in the tree that might be helpful. ...
Theme changes in Firefox 3 - Archive of obsolete content
the table lists both the changed xul file and the theme's corresponding css file that you might need to update. filename css file details changes to the default theme the table below lists changes made in the default theme for firefox 3; you can use this information as a starting point for figuring out the changes you need to make. all file list all platforms file description of change browser/themes/*/browser/browser.css the width of the drag and drop indicator is no longer calculated during the drag (tabbrowser.xml). instead a '-moz-margin-start' property must be added to .tab-drop-indicator-bar, with a value that is half of the width of the indicator image. also, the visibility of the indicator is now controlled by setting ...
...that the image is smaller. may or may not affect other mac themes that use it. browser/themes/pinstripe/browser/browser.css .tabbrowser-tab[first-tab="true"] > .tab-image-left no longer has a margin-left. instead .tabs-left now displayed and given the same width as the former margin-left. it was already done this way in winstripe. changes in browser --- changes in global all platforms the yellow background for the location bar has been deprecated; instead, themes should style the new #identity-box element depending on its verifieddomain/verifiedidentity class. the go button is now located inside the location bar, so the image for it (chrome://browser/skin/go-arrow.png) needs to be smaller. the rule that's needed to show and hide the go button and other location bar icons is:...
Index - Game development
atmosphere. web-based audio is maturing fast, but there are still many browser differences to navigate. we often need to decide which audio parts are essential to our games' experience and which are nice to have but not essential, and devise a strategy accordingly. this article provides a detailed guide to implementing audio for web games, looking at what works currently across as wide a range of platforms as possible. 27 crisp pixel art look with image-rendering 2d, 3d, css, canvas, games, javascript, webgl, image-rendering, pixel this article discusses a useful technique for giving your canvas/webgl games a crisp pixel art look, even on high definition monitors. 28 efficient animation for web games animation, games, javascript this article covers techniqu...
...your browser, install it from the firefox marketplace or check the source code of the demo along with all the other resources on the gamepad api content kit. 30 implementing game control mechanisms controls, desktop, gamepad, games, javascript, laptop, mobile, keyboard, mouse, touch one of html5's main advantages as a game development platform is the ability to run on various platforms and devices. streamlining cross device differences creates multiple challenges, not least when providing appropriate controls for different contexts. in this series of articles we will show you how you can approach building a game that can be played using touchscreen smartphones, mouse and keyboard, and also less common mechanisms such as gamepads. 31 desktop gamepad controls contr...
Game promotion - Game development
e games to follow a mandatory theme, so you can get creative around a theme if you are stuck for ideas. website and blog you should definitely create your own website containing all the information about your games, so people can see what you've worked on. the more information you can include the better — you should include screenshots, description, trailer, press kit, requirements, available platforms, support details and more. you'll get bonus points for allowing your users to directly play your games online — at least in demo form. also, you should do some work on seo to allow people to find your games more easily. you should also blog about everything related to your gamedev activities. write about your development process, nasty bugs you encounter, funny stories, lessons learned, and th...
...fect tool to make games visible to a broader audience if you have no budget and limited time. press you can try and reach the press about your game, but bear in mind that they get a tonne of requests like this every single day, so be humble and patient if they don't answer right away, and be polite when talking to them. be sure to check first if they are dealing with specific genres of games or platforms, so you don't send them something that is not relevant to them in the first place. if you're honest with your approach and your game is good, then you've got more of a chance of success. if you want to learn more about the etiquette of contacting the press you should definitely check out how to contact press - a great guide from pixel prospector, and the video game journaliser site curated by th...
Implementing game control mechanisms - Game development
streamlining cross device differences creates multiple challenges, not least when providing appropriate controls for different contexts. in this series of articles we will show you how you can approach building a game that can be played using touchscreen smartphones, mouse and keyboard, and also less common mechanisms such as gamepads. case study we'll be using the captain rogers: battle at andromeda demo as an example. ...
...right now, but it should be fairly easy to reuse the knowledge contained within these articles when building games in pure javascript or any other framework. if you're looking for a good introduction to phaser, then check the 2d breakout game using phaser tutorial. in the following articles we will show how to implement various different control mechanisms for captain rogers to support different platforms — from touch on mobile, through keyboard/mouse/gamepad on desktop, to more unconventional ones like tv remote, shouting to or waving your hand in front of the laptop, or squeezing bananas. setting up the environment let's start with a quick overview of the game's folder structure, javascript files and in-game states, so we know what's happening where. the game's folders look like this: as ...
Plug-in Development Overview - Gecko Plugin API Reference
mple, image/x-nwim. for more information about mime types, see these mime rfcs: rfc-2045: "multipurpose internet mail extensions (mime) part one: format of internet message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms. the following sections describe platform-specific discovery and registration: ms windows unix mac os x ms windows on windows, plug-ins are found according to the section how gecko finds plug-ins. to determine the mime types and file extensions that the plug-in handles, the browser normally uses the content of the registry entries for the plug-in described below in installation using the...
...cial code and additional files to make your plug-in scriptable as described in the previous section, the build process is quite straightforward. in addition to the dll that goes in the plugins folder, you must also place a type library and an extra header file in the appropriate places in your application directory. this section describes those extra scriptability steps in more detail. building, platforms, and compilers the header files and some basic examples for npapi plugins are found in the npapi-sdk project (google code). installing plug-ins plug-ins should not be installed into the firefox directory. the plug-in installer should either package the plug-in into an extension and install it using normal extension installation practices, or install the plug-in to the system standard install l...
Styling web forms - Learn web development
5; css wasn't released until late 1996, and wasn't supported very well by browsers for a few years after that. browsers relied on the underlying operating system to manage and render form controls. and even with css available to style html, browser vendors have historically been reluctant to make form controls stylable because users were so accustomed to the visual appearance of their respective platforms. but this has changed. website owners want form styles that fit in with their overall site design more than ever, and the web platform has changed to make this more possible. for some form widgets, it is still difficult to rebuild controls to make them stylable, but we can now use css to style many form features, though we do need to take extra care to ensure we don't break usability. not all w...
...ntrols to make them stylable, but we can now use css to style many form features, though we do need to take extra care to ensure we don't break usability. not all widgets are created equal when css is involved at present, some difficulties remain when using css with forms. these problems can be divided into three categories: the good some elements can be styled with few if any problems across platforms. these include the following elements: <form> <fieldset> and <legend> single-line text <input>s (e.g. type text, url, email...), except for <input type="search">. multi-line <textarea>s buttons (both <input> and <button>s) <label> <output> the bad some elements are more difficult to style, requiring more complex css or some more specific tricks: checkboxes and radio buttons <input...
Video and audio content - Learn web development
different selection of codecs. in order to maximize the likelihood that your web site or app will work on a user's browser, you may need to provide each media file you use in multiple formats. if your site and the user's browser don't share a media format in common, your media simply won't play. due to the intricacies of ensuring your app's media is viewable across every combination of browsers, platforms, and devices you wish to reach, choosing the best combination of codecs and container can be a complicated task. see choosing the right container in media container formats (file types) for help selecting the container file format best suited for your needs; similarly, see choosing a video codec in web video codec guide and choosing an audio codec in web audio codec guide for help selecting the f...
...bbit320.mp4">link to the video</a> instead.</p> </video> here we've taken the src attribute out of the actual <video> tag, and instead included separate <source> elements that point to their own sources. in this case the browser will go through the <source> elements and play the first one that it has the codec to support. including webm and mp4 sources should be enough to play your video on most platforms and browsers these days. each <source> element also has a type attribute. this is optional, but it is advised that you include it. the type attribute contains the mime type of the file specified by the <source>, and browsers can use the type to immediately skip videos they don't understand. iftype isn't included, browsers will load and try to play each file until they find one that works, which ...
Introduction to automated testing - Learn web development
ome, you'll be prompted to install a browser extension in a dialog titled "enable local testing" — click the install button to proceed. on other browsers you'll still be able to use some of the features (generally via flash), but you might not get the full experience. the basics: manual tests the browserstack live dashboard allows you to choose what device and browser you want to test on — platforms in the left column, devices on the right. when you mouse over or click on each device, you get a choice of browsers available on that device. clicking on one of those browser icons will load up your choice of platform/device/browser — choose one now, and give it a try. note: the blue device icon next to some of the mobile device choices signals that you will be testing on a real device; ...
...of other useful basic features under the more menu option: responsive: enter a url and press generate, and browserstack will load that url on multiple devices with different viewport sizes. within each device you can further adjust settings like monitor size, to get a good idea of how your site's layout works across different form factors. screenshots: enter a url, choose the browsers/devices/platforms you are interested in, then press generate screenshots — browserstack will take screenshots of your site in all those different browsers then make them available to you to view and download. advanced: the browserstack api browserstack also has a restful api that allows you to programmatically retrieve details of your account plan, sessions, builds, etc. it has several clients available to a...
Introduction to cross browser testing - Learn web development
he site should work entirely in the last few versions of the most popular desktop and mobile (ios, android, windows phone) browsers — this should include chrome (and opera as it is based on the same rendering engine as chrome), firefox, ie/edge, and safari. it should also provide an acceptable experience on ie 8 and 9, and be accessible with wcag aa compliance. now you know your target testing platforms, you should go back and review the required featureset and what technologies you are going to use. for example, if the e-commerce site owner wants a webgl-powered 3d tour of each product built into the product pages, they will need to accept that this just won't work in ie versions before 11. you'd have to agree to provide a version of the site without this feature to users of older ie versions. ...
...d the bug in a newer version. fixes/iteration once you've discovered a bug, you need to try to fix it. the first thing to do is to narrow down where the bug occurs as much as possible. get as much information as you can from the person reporting the bug — what platform(s), device(s), browser version(s), etc. try it on similar configurations (e.g. the same browser version on different desktop platforms, or a few different versions of the same browser on the same platform) to see how widely the bug persists. it might not be your fault — if a bug exists in a browser, then hopefully the vendor will rapidly fix it. it might have already been fixed — for example if a bug is present in firefox release 49, but it is no longer there in firefox nightly (version 52), then they have fixed it. if it i...
Setting up your own test automation environment - Learn web development
package or framework that will install webdriver and the bindings required to communicate with webdriver using this language, for example, java, c#, ruby, python, javascript (node), etc. see setting up a selenium-webdriver project for more details of selenium setups for different languages. different browsers require different drivers to allow webdriver to communicate with and control them. ...
... setting up selenium in node to start with, set up a new npm project, as discussed in setting up node and npm in the last chapter. call it something different, like selenium-test. next, we need to install a framework to allow us to work with selenium from inside node. ...
OSFile.jsm
out several seconds to execute operations that look trivial, such as closing a file, or checking when it was last modified. if the operation is called on the main thread, this means that the whole user experience is stuck for several seconds, which is quite bad. why is i/o efficiency important? i/o efficiency is all about minimizing the number of actual i/o calls. this is critical because some platforms have extremely slow storage (e.g. smartphones, tablets) and because, regardless of the platforms, doing too much i/o penalizes not just your application but potentially all the applications running on the system, which is quite bad for the user experience. finally, i/o is often expensive in terms of energy, so wasting i/o is wasting battery. consequently, one of the key design choices of os.file...
... running on the system, which is quite bad for the user experience. finally, i/o is often expensive in terms of energy, so wasting i/o is wasting battery. consequently, one of the key design choices of os.file is to provide operations that are low-level enough that they do not hide any i/o from the developer (which could cause the developer to perform more i/o than they think) and, since not all platforms have the same features, offer system-specific information that the developer can use to optimize his algorithms for a platform. using os.file ... from the main thread most uses of os.file are from the main thread. in this mode, main thread clients use the api to request off main thread file i/o. calling os.file from the main thread asynchronous, off-main thread file i/o, main thread api...
TimerFirings logging
e output before and after being post-processed by that script. 2088737280[7f606bf68140]: [30710] fn timer (one_shot 16 ms): [from dladdr] #0: ???[/home/njn/moz/mi1/o64/dist/bin/libxul.so +0x2144f94] 2088737280[7f606bf68140]: [30710] fn timer (one_shot 16 ms): [from dladdr] #0: mozilla::refreshdrivertimer::timertick(nsitimer*, void*) (/home/njn/moz/mi1/o64/layout/b third, on other platforms dladdr is not implemented or doesn't work well, and the output will look like the followin. 711637568[7f3219c48000]: [6835] fn timer (one_shot 16 ms): ???[dladdr is unimplemented or doesn't work well on this os] the ??? indicates that the function timer lacks an explicit name, and the comment within the square brackets explains why the fallback mechanism wasn't used. if an unannotated ...
...: [6835] fn timer (one_shot 16 ms): ???[dladdr is unimplemented or doesn't work well on this os] the ??? indicates that the function timer lacks an explicit name, and the comment within the square brackets explains why the fallback mechanism wasn't used. if an unannotated timer function appears frequently it is worth explicitly annotating it so that it will be usefully identified on other platforms. (running on mac or linux is obviously necessary to learn the timer function's name.) this is done by initializing it with initwithnamedfunccallback or initwithnameablefunccallback instead of initwithnamecallback. post-processing timerfirings logging quickly produces thousands of lines of output. this output needs post-processing for it to be useful. if the output is redirected to a file called...
Performance
different views to analyze the allocation characteristic. see also the documentation on leak-hunting strategies and tips. profiling and performance tools profiling with the developer tools profiler the profiler built into the developer tools has a high-level waterfall, detailed call tree, allocations and gc profiling, and flame graphs. it is available on all platforms and release channels, and also supports remote profiling b2g and fennec. profiling with the firefox profiler the firefox profiler is a good tool to start with, particularly for understanding where time is spent within c++ code in firefox. profiling with instruments how to use apple's instruments tool to profile mozilla code. profiling with xperf how to us...
...ommand-line utility in the mozilla codebase that uses the intel rapl interface to gather direct power estimates for the package, cores, gpu and memory. powermetrics (mac-only) powermetrics is a command-line utility that gathers and displays a wide range of global and per-process measurements, including cpu usage, gpu usage, and various wakeups frequencies. timerfirings logging (all platforms) timerfirings logging is a built-in logging mechanism that prints data on every time fired. activity monitor, battery status menu and top (mac-only) the battery status menu, activity monitor and top are three related mac tools that have major flaws but often consulted by users, and so are worth understanding. intel power gadget (windows, mac, linux) intel power gadget pro...
Preferences system
the system is implemented through a few xul elements and attributes. ...
...: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay. you should be careful to read the higs for the platforms you are targeting and use the xul preprocessor if necessary to set different window titles as appropriate. you should also be careful to specify the width of the window (in em) as appropriate using the preprocessor for each targeted platform, as well as the height (in em) for platforms where the window size does not change as the selected panel is changed (e.g. windows). usage in xulrunner applic...
About NSPR
hronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking. history a good portion of the library's purpose, and perhaps the primary purpose in the gromit environment, was to provide the underpinnings of the java vm, more or less mapping the sys layer that sun defined for the porting of the java vm to various platforms. nspr went beyond that requirement in some areas and since it was also the platform independent layer for most of the servers produced by netscape. it was expected and preferred that existing code be restructured and perhaps even rewritten in order to use the nspr api. it is not a goal to provide a platform for the porting into netscape of externally developed code. at the time of writing the cu...
...hat call immediately into the host operating system's offerings. linking support for linking (shared library loading and unloading) is part of nspr's feature set. in most cases this is simply a smoothing over of the facilities offered by the various platform providers. where it's headed nspr is applicable as a platform on which to write threaded applications that need to be ported to multiple platforms. the current implementation supports macintosh (ppc), win-32 (winnt, win9x) and 20 versions of unix and is still expanding. the basic api is stable and expected to remain that way. nspr is functionally complete and has entered a mode of sustaining engineering. as operating system vendors issue new releases of their operating systems, nspr will be moved forward to these new releases by interested...
Nonblocking IO In NSPR
on, the central thread invokes that io function on the file descriptor. creating a nonblocking socket only sockets can be made nonblocking. regular files always operate in blocking mode. this is not a serious constraint as one can assume that disk i/o never blocks. fundamentally, this constraint is due to the fact that nonblocking i/o and <tt>select()</tt> are only available to sockets on some platforms (e.g., winsock). in nspr, a new socket returned by <tt>pr_newtcpsocket()</tt> or <tt>pr_newudpsocket()</tt> is always created in blocking mode. one can make the new socket nonblocking by using <tt>pr_setsockopt()</tt> as in the example below (error checking is omitted for clarity): <tt>prfiledesc *sock;</tt> <tt>printn optval = 1;</tt> <tt>sock = pr_newtcpsocket();</tt> /* * make the socket nonb...
...king socket). the tcp connection on that socket has been closed (end of stream). these two cases can be distinguished by <tt>pr_poll()</tt>. if <tt>pr_poll()</tt> reports that the socket is readable (i.e., <tt>pr_poll_read</tt> is set in <tt>out_flags</tt>), and <tt>pr_available()</tt> returns 0, this means that the socket connection is closed. current status implemented across all supported platforms. original document information author: wan-teh chang last updated date: october 30, 1997 ...
Process Forking in NSPR
the threads provided in netscape portable runtime (nspr) are implemented using different mechanisms on the various platforms. on some platforms, nspr threads directly map one-to-one to the threads provided by the platform vendor, on other platforms nspr threads are basically user-level threads within a single process (with no kernel threads) and on still others nspr threads are user-level threads implemented on top of one or more kernel threads within single address space. nspr does not override the fork function and so, when fork is called from the nspr thread the results are different on the various platforms. all the threads present in the parent process may be replicated in the child process, only the calling thread may be replicated in the child process or only the calling kernel threa...
...n single address space. nspr does not override the fork function and so, when fork is called from the nspr thread the results are different on the various platforms. all the threads present in the parent process may be replicated in the child process, only the calling thread may be replicated in the child process or only the calling kernel thread may be replicated. so, to be consistent across all platforms, it is suggested that when using fork in a nspr thread; the exec function should be called in the child process. no nspr functions should be called in the child process before the exec call is made. original document information author: alan o. freier last updated date: 1998 ...
Introduction to NSPR
trained by the underlying operating system. therefore, priorities are not rigidly defined. for more information, see thread scheduling. in general, it's preferable to create local user threads with normal priority and let nspr take care of the details as appropriate for each host os. it's usually not necessary to create a global thread explicitly unless you are planning to port your code only to platforms that provide threading services with which you are familiar or unless the thread will be executing code that might directly call blocking os functions. threads can also have "per-thread-data" attached to them. each thread has a built-in per-thread error number and error string that are updated when nspr operations fail. it's also possible for nspr clients to define their own per-thread-data. for...
...cheduling, see threads. setting thread priorities the host operating systems supported by nspr differ widely in the mechanisms they use to support thread priorities. in general, an nspr thread of higher priority has a statistically better chance of running relative to threads of lower priority. however, because of the multiple strategies to provide execution vehicles for threads on various host platforms, priorities are not a clearly defined abstraction in nspr. at best they are intended to specify a preference with respect to the amount of cpu time that a higher-priority thread might expect relative to a lower-priority thread. this preference is still subject to resource availability, and must not be used in place of proper synchronization. for more information on thread synchronization, see nsp...
NSPR Types
some systems require emulation of 64-bit fields by using two 32-bit numeric fields bound in a structure. since the types (long long versus struct longlong) are not type compatible, nspr defines macros to manipulate 64-bit numeric fields. these macros are defined in prlong.h. conscientious use of these macros ensures portability of code to all the pla...
...rms treat 64-bit numeric fields in different ways. some systems require emulation of 64-bit fields by using two 32-bit numeric fields bound in a structure. since the types (long long versus struct longlong) are not type compatible, nspr defines macros to manipulate 64-bit numeric fields. these macros are defined in prlong.h. conscientious use of these macros ensures portability of code to all the platforms supported by nspr and still provides optimal behavior on those systems that treat long long values directly. print64 pruint64 floating-point number type the nspr floating-point type is always 64 bits. prfloat64 native os integer types these types are most appropriate for automatic variables. they are guaranteed to be at least 16 bits, though various architectures may define them to b...
NSS FAQ
Mozilla › Projects › NSS › FAQ
ger maintains sslref or makes it available. it was built as an example of an ssl implementation, not for creating production applications. nss was designed from the ground up for use by commercial developers. it provides a complete software development kit that uses the same architecture used to support security features in many client and server products from netscape and other companies. what platforms and development environments are supported? this section is out of date iplanet e-commerce solutions has certified nss 3.1 on 18 platforms, including aix 4.3, hp-ux 11.0, red hat linux 6.0, solaris (2.6 or later), windows nt (4.0 or later), and windows 2000. other contributors are in the process of certifying additional platforms. the nss 3.1 api requires c or c++ development environments. for...
...n, and client authentication) to help jump start the integration process. however, there is little or no documentation currently available for the rest of the nss api. if your application requires sophisticated certificate management, smart card support, or hardware acceleration, your integration effort will be more extensive. where can i download the nss tools? binary builds of nss for several platforms including the command-line tools can be downloaded from http://ftp.mozilla.org/pub/mozilla.o...y/nss/releases/. nspr, which you will need as well, can be downloaded from http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/. how can i learn more about tls? see https://developer.mozilla.org/docs/glossary/tls. licensing questions how is nss licensed? nss is available under the mozilla public l...
NSS 3.50 release notes
s 3.50 requires nspr 4.25 or newer. nss 3.50 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_50_rtm/src/ other releases are available in nss releases. notable changes in nss 3.50 verified primitives from hacl* were updated, bringing performance improvements for several platforms. note that intel processors with sse4 but without avx are currently unable to use the improved chacha20/poly1305 due to a build issue; such platforms will fall-back to less optimized algorithms. see bug 1609569 for details. updated dtls 1.3 implementation to draft-30. see bug 1599514 for details. added nist sp800-108 kbkdf - pkcs#11 implementation. see bug 1599603 for details. bugs...
... bug 1547639 - update zlib in nss to 1.2.11 bug 1609181 - detect arm (32-bit) cpu features on freebsd bug 1602386 - fix build on freebsd/powerpc* bug 1608151 - introduce nss_disable_altivec bug 1612623 - depend on nspr 4.25 bug 1609673 - fix a crash when nss is compiled without libnssdbm support, but the nssdbm shared object is availa...
SpiderMonkey Build Documentation
d system. to generate a compile_commands.json with the spidermonkey configure script, enable the compiledb backend, like this: /bin/sh ../configure.in <options> --enable-build-backends=compiledb,recursivemake (recursivemake is there as you'd likely also want to be able to build!) windows builds since version 28, threadsafe builds are the default, and should work out of the box on all posix platforms. hence, the following instructions should only be relevant if you're on windows or compiling an older version of spidermonkey. the mozillabuild batch file you used to open your shell (e.g. start-shell-msvc2013.bat or start-shell-msvc2013-x64.bat) determines whether the compiler toolchain will target 32-bit or 64-bit builds. to create a 64-bit build, note that you must configure with --target=x8...
...ion. using the js-config script in addition to the spidermonkey libraries, header files, and shell, the spidermonkey build also produces a shell script named js-config which other build systems can use to find out how to compile code using the spidermonkey apis, and how to link with the spidermonkey libraries. note: in spidermonkey 1.8.5, the js-config script is not generated properly on many platforms. if the instructions below do not work, you can try this workaround. when invoked with the --cflags option, js-config prints the flags that you should pass to the c compiler when compiling files that use the spidermonkey api. these flags ensure the compiler will find the spidermonkey header files. $ ./js-config --cflags # example output: -i/usr/local/include/js -i/usr/include/nspr when invoke...
SpiderMonkey 1.8.5
plements es-5 (ecma 262, 5th edition), and contains many new language and api features, described in detail below. please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. or, file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. —22 march 2011 platform support spidermonkey 1.8.5 is supported on all the platforms where firefox 4 runs. spidermonkey 1.8.5 includes a just-in-time compiler (jit) (several, actually) that compiles javascript to machine code, for a significant speed increase. it is supported only on x86, x86_64 and arm architectures. on other platforms, the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating...
....1 (gcc) 4.2.1 (apple inc. build 5574) to work around this issue, either upgrade your xcode or use an alternate version of gcc, such as the one that shipped with leopard. to select an alternate c++ compiler, invoke configure thus: cxx=/usr/bin/g++-4.0 /path/configure --my-configuration-options js-config the new configure-based build system does not correctly generate the js-config script on many platforms, nor when js-ctypes are enabled. if you are building your project with a gnu-make based build system, the following workaround can be integrated into your build system to generate the correct ldflags, with a strong likelihood that it will work with future versions when js-config is fixed: js_config ?= /path/to/js-config uname_system = $(shell uname -s) jsapi_ldflags = $(shell $(...
SpiderMonkey 24
h.js-engine newsgroup. or file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. — dec 16, 2013 the download url still available, but spidermonkey not release alone! get it here mozilla-esr24 if the download url is outdate you will find it in "firefox extended support release 24" package on hg release platform support spidermonkey 24 is supported on all the platforms where firefox 24 runs. compiling it requires a c++ compiler, and the jsapi can only be used from c++ code. (this change was motivated by garbage collector improvements, which lean quite heavily on c++'s support for raii through constructors and destructors.) if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010: msvc8/9 support has been dro...
...upport for raii through constructors and destructors.) if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010: msvc8/9 support has been dropped. spidermonkey 24 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase. it is supported on x86, x86_64, and arm architectures. on some other platforms (sparc, mips), the jit is provided but not supported. on all other platforms the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 24 spidermonkey now provides a fully c++ interface, so embedders relying on embeddability in c projects will have to convert to c++, or implement their own ad...
SpiderMonkey 38
se by posting in the mozilla.dev.tech.js-engine newsgroup. or file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. — sep 17, 2015 the download url is outdated and spidermonkey not release alone! get it here mozilla-esr38 you will find it in "firefox extended support release 38" package on hg release platform support spidermonkey 38 is supported on all the platforms where firefox 38 runs. compiling it requires a c++ compiler, and the jsapi can only be used from c++ code. if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010. spidermonkey 38 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase. it is supported on x86, x86_64, and arm architect...
...ns. compiling it requires a c++ compiler, and the jsapi can only be used from c++ code. if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010. spidermonkey 38 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase. it is supported on x86, x86_64, and arm architectures. on some other platforms (sparc, mips), the jit is provided but not supported. on all other platforms the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 38 .... xxx will need updating for actual new gc stuff at time! a major change to spidermonkey in 38 is that its apis support a moving garbage collector. t...
SpiderMonkey 45
and api features described in detail below. please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. or file bugs at bugzilla.mozilla.org under product: core, component: javascript engine. you may wish to make the bugs block bug 837921 (aliased as "sm.embedding"). — apr 14, 2016 platform support spidermonkey 45 is supported on all platforms able to run firefox 45. compiling it requires a c++ compiler, and the jsapi can only be used from c++ code. if you are compiling with microsoft's visual studio, note the minimum supported version is msvc 2013. spidermonkey 45 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase. it is supported on x86, x86_64, and arm architectures. ...
...fox 45. compiling it requires a c++ compiler, and the jsapi can only be used from c++ code. if you are compiling with microsoft's visual studio, note the minimum supported version is msvc 2013. spidermonkey 45 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase. it is supported on x86, x86_64, and arm architectures. on several other platforms (sparc, mips), the jit is provided but not supported. on remaining platforms the jit is disabled; javascript code runs in an interpreter, as it has in previous versions. it's the same language, just not as fast. migrating to spidermonkey 45 spidermonkey 45 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types; functions, and callback signatures, ha...
Bundling multiple binary components
his approach is to figure out all the methods imported from gecko and dynamically load the methods. create small wrappers for calling the methods, as you may need to thunk parameters depending on how much has changed between gecko versions. this means using something like loadlibrary / getprocaddress / freelibrary on windows. actually, nspr has portable versions of those features that work across platforms. this approach uses only one binary for each platform (win/mac/linux) but creates complexity in the binaries - loading the methods and creating the wrappers. the costs get higher if you have many methods that need to be loaded. stub loader this approach involves using a stub loader component. the stub component is an xpcom component itself and when registered by xpcom, the code would sniff the...
...gecko and os platform. the real components are not in the "components" folder, but are in a side folder ("libraries" in the sample). the real components are manually loaded and registered using the stub ("krealcomponent" in the sample). this approach uses one binary component for each version of gecko and platform, plus the stub loader component therefore, to support 2 gecko versions on three platforms, you need seven components (6 real components + 1 stub). on the other hand, this approach is much more simple than the dynamic loading approach. the stub component can be either binary or javascript, but it is far easier in javascript is cross-platform and does not have compile- or load- time compatibility problems. the gears project contains an example of a javascript-based stub loader. ...
nsIAppShell
istentoeventqueue( in nsieventqueue aqueue, in prbool alisten ); parameters aqueue the queue in question. alisten pr_true for a new queue wanting hooking up. pr_false for a queue wanting to be unhooked. resumenative() resumes the use of additional platform-specific methods to run() gecko events on the main application thread. calls to suspendnative() and resumenative may be nested. on some platforms this will be a no-op. void resumenative(); parameters none. run() enter an event loop. do not leave until exit() is called. void run(); parameters none. runinstablestate() allows running of a "synchronous section", in the form of an nsirunnable once the event loop has reached a "stable state". a stable state is reached when the currently executing task/event has finished, (see: webappapis.html#...
...nup(); parameters none. suspendnative() suspends the use of additional platform-specific methods (besides the nsiappshell->run() event loop) to run gecko events on the main application thread. under some circumstances these "additional methods" can cause gecko event handlers to be re-entered, sometimes leading to hangs and crashes. calls to suspendnative and resumenative() may be nested. on some platforms (those that do not use any "additional methods") this will be a no-op. does not (in itself) stop gecko events from being processed on the main application thread. but if the nsiappshell->run() event loop is blocked when this call is made, gecko events will stop being processed until resumenative() is called (even if a plugin or library is temporarily processing events on a nested event loop). voi...
nsIAppShellService
); note: prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindowinternal. attributes attribute type description applicationprovidedhiddenwindow boolean return true if the application hidden window was provided by the application. if it was not, the default hidden window was used. this will usually be false on all non-mac platforms. read only. hiddendomwindow nsidomwindow return the (singleton) application hidden window, automatically created and maintained by this appshellservice. read only. hiddenwindow nsixulwindow return the (singleton) application hidden window, automatically created and maintained by this appshellservice. read only. nativeappsupport nsinativeappsupport get...
...valarea() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) during application startup (and at other times!) we may temporarily encounter a situation where all application windows will be closed but we do not want to take this as a signal to quit the application. bracket the code where the last window could close with these. (and at application startup, on platforms that do not normally quit when the last window has closed, call enter once, but not exit) void enterlastwindowclosingsurvivalarea(); parameters none. exitlastwindowclosingsurvivalarea() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void exitlastwindowclosingsurvivalarea(); parameters none. native code only!gethiddenwindowandjscontext ...
nsIDOMWindowUtils
t, length and string of result are also computed with native line breaks. query_content_flag_use_xp_line_break 0x0001 one of values of aadditionalflags of sendquerycontentevent(). this flag must not be set with query_content_flag_use_native_line_break. when this is set, the aoffset and alength are offset and length in/of the content generated with xp line breaks (i.e., "\n" on all platforms). additionally, the offset, length and string of result are also computed with xp line breaks. this is more useful for javascript in chrome. query_content_flag_selection_spellcheck 0x0002 one of values of aadditionalflags of sendquerycontentevent(). query_content_flag_selection_ime_rawinput 0x0008 one of values of aadditionalflags of sendquerycontentevent(). ...
...f the content generated with native line breaks (e.g., "\r\n" on windows) selection_set_flag_use_xp_line_break 0x0001 one of values of aadditionalflags of sendselectionsetevent(). this flag must not be set with selection_set_flag_use_native_line_break. when this is set, the aoffset and alength are offset and length in/of the content generated with xp line breaks (i.e., "\n" on all platforms). this is more useful for javascript in chrome selection_set_flag_reverse 0x0002 one of values of aadditionalflags of sendselectionsetevent(). if this is set, the selection is set from aoffset + alength to aoffset. select_character 0 select_cluster 1 select_word 2 select_line 3 select_beginline 4 ...
nsILocalFile
f bytes available to non-superuser on the disk volume containing the nsilocalfile. read only. followlinks prbool determines whether or not the nsilocalfile will automatically resolve symbolic links. by default, this value is false on all non-unix systems. as of mozilla 1.7, this attribute is ignored on unix systems. persistentdescriptor acstring on some platforms, the value of nsifile.path may be insufficient to uniquely identify the file on the local file system. the persistent descriptor is intended to be used whenever a nsilocalfile needs to be serialized to disk and later recovered. this string is not intended for display to users. note: the value of the followlinks attribute is not encoded in the persistent descriptor. constants ...
...pr_rdonly, 0, &fd); if (ns_failed(rv)) return rv; char buf[512]; print32 n; while ((n = pr_read(fd, buf, sizeof(buf))) > 0) { // do something with n-byte block of data from file... } if (n < 0) rv = ns_error_unexpected; pr_close(fd); return rv; } reveal() ask the operating system to open the folder which contains this file or folder. this routine only works on platforms which support the ability to open a folder. see the note in the remarks below. void reveal(); parameters none. setrelativedescriptor() initializes the file to the location relative to fromfile using a string returned by getrelativedescriptor(). void setrelativedescriptor( in nsilocalfile fromfile, in acstring relativedesc ); parameters fromfile the file to which the descriptor is...
Drawing and Event Handling - Plugins
an np_port structure. getting information to receive information from the browser, the plug-in calls the npn_getvalue method. nperror npn_getvalue(npp instance, npnvariable variable, void *value); the instance parameter represents the current plug-in. unix and ms windows the queried information is returned in the variable parameter. this parameter is valid only for the unix and ms windows platforms. for unix, the values are either the current display (npnvxdisplay) or the application's context (npnvxtappcontext). for ms windows, the value is the native window on which the plug-in drawing occurs (npnvnetscapewindow). the value parameter contains the name of the plug-in. you can also use npn_getvalue to help create a menu or dialog box for a windowless plug-in. windowed plug-ins the brows...
...s. the plug-in can use this to deal with wm_command messages sent to it as a result of tracking the pop-up menu or modal dialog box. unix/x11 the value parameter for npn_getvalue must point to an xlib window. on successful return this will contain the browser toplevel window. use this window to set the wm_transient_for property on dialog boxes. event handling for windowless plug-ins on all platforms, platform-specific events are passed to windowless plug-ins through the npp_handleevent method. the plug-in must return true from npp_handleevent if it has handled the event and false if it has not. mac os uses this mechanism for both windowed and windowless plug-ins; on this platform, npp_handleevent is the only way the plug-in can receive events from its host application. int16 npp_handleevent...
Plug-in Basics - Plugins
plemented by gecko; the plug-in calls these functions. the names of all the browser functions in the api begin with npn_, for example, npn_write. data structures are plug-in-specific types defined for use in the plug-in api. the names of structures begin with np, for example, npwindow. all plug-in names in the api start with np. in general, the operation of all api functions is the same on all platforms. where this varies, the reference entry for the function in the reference section describes the difference. plug-ins and platform independence a plug-in is a dynamic code module that is native to the specific platform on which the browser is running. it is a code library, rather than an application or an applet, and runs only from the browser. although plug-ins are platform-specific, the plug-i...
... plug-ins and platform independence a plug-in is a dynamic code module that is native to the specific platform on which the browser is running. it is a code library, rather than an application or an applet, and runs only from the browser. although plug-ins are platform-specific, the plug-in api is designed to provide the maximum degree of flexibility and to be functionally consistent across all platforms. this guide notes platform-specific differences in coding for the ms windows, mac os x, and unix platforms. you can use the plug-in api to write plug-ins that are media type driven and provide high performance by taking advantage of native code. plug-ins give you an opportunity to seamlessly integrate platform-dependent code and enhance the gecko core functionality by providing support for new d...
Plug-in Development Overview - Plugins
mple, image/x-nwim. for more information about mime types, see these mime rfcs: rfc-2045: "multipurpose internet mail extensions (mime) part one: format of internet message bodies" rfc-2046: "multipurpose internet mail extensions (mime) part two: media types" rfc-4288: "media type specifications and registration procedures" there are some variations to how plug-ins are handled on different platforms. the following sections describe platform-specific discovery and registration: ms windows unix mac os x ms windows on windows, plug-ins are found according to the section how gecko finds plug-ins. to determine the mime types and file extensions that the plug-in handles, the browser normally uses the content of the registry entries for the plug-in described below in installation using the...
...cial code and additional files to make your plug-in scriptable as described in the previous section, the build process is quite straightforward. in addition to the dll that goes in the plugins folder, you must also place a type library and an extra header file in the appropriate places in your application directory. this section describes those extra scriptability steps in more detail. building, platforms, and compilers the header files and some basic examples for npapi plugins are found in the npapi-sdk project (google code). installing plug-ins plug-ins should not be installed into the firefox directory. the plug-in installer should either package the plug-in into an extension and install it using normal extension installation practices, or install the plug-in to the system standard install l...
Preferences System
the system is implemented through a few xul elements and attributes. ...
...: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay. you should be careful to read the higs for the platforms you are targeting and use the xul preprocessor if necessary to set different window titles as appropriate. you should also be careful to specify the width of the window (in em) as appropriate using the preprocessor for each targeted platform, as well as the height (in em) for platforms where the window size does not change as the selected panel is changed (e.g. windows). usage in xulrunner applic...
KeyboardEvent.getModifierState() - Web APIs
all modifiers (except "fnlock", "hyper", "super" and "symbol" which are defined after gecko implements this) are always supported for untrusted events on gecko. this doesn't depend on the platform. "accel" virtual modifier note: the "accel" virtual modifier has been effectively deprecated in current drafts of the dom3 events specification. getm...
...ardevent.ctrlkey or keyboardevent.metakey is true. in old implementations and outdated specifications, it returned true when a modifier which is the typical modifier key for the shortcut key is pressed. for example, on windows, pressing ctrl key may make it return true. however, on mac, pressing ⌘ command key may make it return true. note that which modifier key makes it return true depends on platforms, browsers, and user settings. for example, firefox users can customize this with a pref, "ui.key.accelkey". example // ignore if following modifier is active. if (event.getmodifierstate("fn") || event.getmodifierstate("hyper") || event.getmodifierstate("os") || event.getmodifierstate("super") || event.getmodifierstate("win") /* hack for ie */) { return; } // also ignore if tw...
KeyboardEvent - Web APIs
s what the dom level 3 specification says should happen. there are some caveats, however, as described below. auto-repeat on some gtk environments such as ubuntu 9.4 in some gtk-based environments, auto-repeat dispatches a native key-up event automatically during auto-repeat, and there's no way for gecko to know the difference between a repeated series of keypresses and an auto-repeat. on those platforms, then, an auto-repeat key will generate the following sequence of events: keydown keypress keyup keydown keypress keyup <<repeating until the user releases the key>> keyup in these environments, unfortunately, there's no way for web content to tell the difference between auto-repeating keys and keys that are just being pressed repeatedly. auto-repeat handling prior to gecko 5.0 befo...
...down keypress keyup <<repeating until the user releases the key>> keyup in these environments, unfortunately, there's no way for web content to tell the difference between auto-repeating keys and keys that are just being pressed repeatedly. auto-repeat handling prior to gecko 5.0 before gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2), keyboard handling was less consistent across platforms. windows auto-repeat behavior is the same as in gecko 4.0 and later. mac after the initial keydown event, only keypress events are sent until the keyup event occurs; the inter-spaced keydown events are not sent. linux the event behavior depends on the specific platform. it will either behave like windows or mac depending on what the native event model does. note: manually firing an even...
Setting up adaptive streaming media sources - Developer guides
dash+xml"> <!-- fallback --> <source src="my.mp4" type="video/mp4"> <source src="my.webm" type="video/webm"> </video> note: mpeg-dash playback relies on dash.js and browser support for media source extensions, see the latest dash.js reference player. hls encoding http live streaming (hls) is an http-based media streaming protocol implemented by apple. it's incorporated into ios and osx platforms and works well on mobile and desktop safari and most android devices with some caveats. media is usually encoded as mpeg-4 (h.264 video and aac audio) and packaged into an mpeg-2 transport stream, which is then broken into segments and saved as one or more .ts media files. apple provides tools to convert media files to the appropriate format. hls encoding tools ther are a number of useful tool...
... and packaged into an mpeg-2 transport stream, which is then broken into segments and saved as one or more .ts media files. apple provides tools to convert media files to the appropriate format. hls encoding tools ther are a number of useful tools available for hls encoding for hls live stream encoding adobe provide a media encoder for mac. the stream segmenter — provided by apple for mac platforms — takes a media stream from a local network and splits media into equally sized media files together with an index file. apple also provides a file segmenter for mac — which takes a suitably encoded file, splits it up and produces a index file, in a similar fashion to the stream segmenter. note: you can find more details about these tools at using http live streaming. index files (playl...
Authoring MathML - MathML
han javascript programs and can be more sophisticated e.g. have a much complete latex support or generate other formats like epub. you can keep compatibility with other tools to generate pdf e.g. you can use the same .tex source for both latex and latexml. cons: this requires to install programs on your computer, which may be a bit more difficult or they may not be available on all platforms. you must run the programs on your computer and have some kind of workflow to get the web pages at the end ; that may be a bit tedious. binary programs are not appropriate to integrate them in a mozilla extension or xul application. texzilla can be used from the command line and will essentially have the same support as itex2mml described below. however, the stream filter behavior is...
...l expressions, just do cat input.html | itex2mml > output.html there are even more sophisticated tools to convert arbitrary latex documents into html+mathml. for example tex4ht is often included in tex distributions and has an option to use mathml instead of png images. this command will generate an xhtml+mathml document foo.xml from a foo.tex latex source: mk4ht mzlatex foo.tex # linux/mac platforms mzlatex foo.tex # windows platform note that tex4ebook relies on tex4ht to generate epub documents. latexml is another tool that can generate html5 and epub documents. windows users can watch this video tutorial. given a foo.tex latex file, you can use these simple commands: latexmlc --dest foo.html foo.tex # generate a html5 document foo.html latexmlc --dest foo.epub foo.tex # g...
Web Performance
can allow for interactive and immersive web experiences — or it can significantly harm download time, render time, in-app performance, battery life, and user experience. this article outlines some javascript best practices that should be considered to ensure even complex content is as performant as possible. mobile performance with web access on mobile devices being so popular, and all mobile platforms having fully-fledged web browsers, but possibly limited bandwidth, cpu and battery life, it is important to consider the performance of your web content on these platforms. this article looks at mobile-specific performance considerations. using performance apis performance api this guide describes how to use the performance interfaces that are defined in the high-resolution time standa...
... properly, can allow for interactive and immersive web experiences ... or it can significantly harm download time, render time, in app performance, battery life, and user experience. this article outlines some javascript best practices that can ensure even complex content's performance is the highest possible. mobile performance with web access on mobile devices being so popular, and all mobile platforms having fully-fledged web browsers, but possibly limited bandwidth, cpu, and battery life, it is important to consider the performance of your web content on these platforms. this article also looks at mobile-specific performance considerations. web font performance an often overlooked aspect of performance landscape are web fonts. web fonts are more prominent in web design than ever, yet many d...
Introduction to progressive web apps - Progressive web apps (PWAs)
tions a fully-capable progressive web application should provide all of the following advantages to the user. discoverability the eventual aim is that web apps should have better representation in search engines, be easier to expose, catalog and rank, and have metadata usable by browsers to give them special capabilities. some of the capabilities have already been enabled on certain web-based platforms by proprietary technologies like open graph, which provides a format for specifying similar metadata in the html <head> block using <meta> tags. the relevant web standard here is the web app manifest, which defines features of an app such as name, icon, splash screen, and theme colors in a json-formatted manifest file. this is for use in contexts such as app listings and device home screens. in...
...shiny) experience to less capable browsers. we've been doing this for years with best practices such as progressive enhancement. by using progressive enhancement, pwas are cross-browser. this means developers should take into account the differences in implementation of some pwa features and technologies between different browser implementations. re-engageability one major advantage of native platforms is the ease with which users can be re-engaged by updates and new content, even when they aren't looking at the app or using their devices. modern web apps can now do this too, using new technologies such as service workers for controlling pages, the web push api for sending updates straight from server to app via a service worker, and the notifications api for generating system notifications to ...
The building blocks of responsive design - Progressive web apps (PWAs)
in essential components of responsive design, with some links to further information where necessary. for web developers, it is now fairly common to be called upon to create a web site or app that changes its user interface depending on the browser or device accessing the site to provide an optimized experience. one approach to this is to create different versions of your site/app for different platforms or browsers and serve them appropriately after detecting which browser or platform is looking at your site. but this is increasingly inefficient: browser sniffing is inherently error prone, and maintaining multiple copies of your code can turn out to be a nightmare. it is usually much better to create a single version of your code which doesn't care about what browser or platform is accessing th...
...tures the browser supports or what the values of certain browser features are, and then adjusts the code appropriately. this tends to be termed responsive design or adaptive design, two related but different approaches. this is much more reliable, more maintainable, and more future proof. you don't get caught in the situation of having to bring out more new site versions as more new browsers and platforms come out, and adjust code as feature support in existing browsers changes. there are disadvantages to this approach as well. if the content, layout, and functionality need to change greatly for different devices, it may not be such a good approach. also, taking an existing site and adding responsiveness to it, to make it mobile/tablet friendly, can be a lot more effort than just creating a separ...
WebAssembly Concepts - WebAssembly
make use of webassembly to confer massive performance advantages and new features while still making functionality easily available to web developers. webassembly goals webassembly is being created as an open standard inside the w3c webassembly community group with the following goals: be fast, efficient, and portable — webassembly code can be executed at near-native speed across different platforms by taking advantage of common hardware capabilities. be readable and debuggable — webassembly is a low-level assembly language, but it does have a human-readable text format (the specification for which is still being finalized) that allows code to be written, viewed, and debugged by hand. keep secure — webassembly is specified to be run in a safe, sandboxed execution environment. like othe...
... trying to use javascript for more intensive use cases like 3d games, virtual and augmented reality, computer vision, image/video editing, and a number of other domains that demand native performance (see webassembly use cases for more ideas). additionally, the cost of downloading, parsing, and compiling very large javascript applications can be prohibitive. mobile and other resource-constrained platforms can further amplify these performance bottlenecks. webassembly is a different language from javascript, but it is not intended as a replacement. instead, it is designed to complement and work alongside javascript, allowing web developers to take advantage of both languages' strong points: javascript is a high-level language, flexible and expressive enough to write web applications. it has man...
Alerts and Notifications - Archive of obsolete content
r an appropriate delay. it uses nsialertsservice. ...
Finding window handles - Archive of obsolete content
since mozilla tries to be as cross-platform as possible, it can be difficult to get the handle you need. note: starting in gecko 2.0, only the top level browser window has an hwnd. web content windows (in tabs) do not have their own hwnds. ...
Miscellaneous - Archive of obsolete content
itespace. it also collapses consecutive whitespaces into a single whitespace, and returns at most 150 characters, making it ideal to display text in context menus. it is defined at //github.com/realityripple/pale-moon/blob/master/palemoon/base/content/browser.js#l5113. note that it returns the empty string (""), not false, when nothing is selected. getbrowserselection() is not implemented on some platforms, such as thunderbird and songbird. see also http://mxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#4674 discovering which element in the loaded document has focus // focusedcontrol stores the focused field, or null if there is none. // this excludes textareas for simplicity, but onpageload() can easily be // modified to cycle through textareas as well. further enhancements wou...
Running applications - Archive of obsolete content
this page describes how to run other programs from your chrome javascript code, using mozilla xpcom interfaces. there are two ways to run programs. using nsiprocess the recommended way is to use the nsiprocess interface because it is crossplatform. using nsilocalfile.launch() this method is not implemented on all platforms, especially not on unix/linux! see nsilocalfile.launch() for details and make sure that all your target platforms support this method! this method has the same effect as if you double-clicked the file, so for executable files—it will just run the file without any parameters. for more information on nsifile/nsilocalfile, see file i/o. var file = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); file.
Deploying a Plugin as an Extension - Archive of obsolete content
an be placed in the install.rdf is called an updateurl. for example: <em:updateurl><http://www.rhapsody.com/update.rdf></em:updateurl> this url specifies an rdf file that can be used to tell firefox that there are updates available for your extension. this rdf file can be updated to indicate that an update to our extension/plugin is available. finally, if you want to package plugins for multiple platforms into a single extension, you can do that as well. there are two ways to do this. first, you can simply put all the files in the plugins directory. firefox will load the correct plugins based on the platform, simply because the plugins for other platforms won't load. if your plugin is for windows, don't forget add to version resources to your plugin's dll. also, supply mimetype and fileextents, wi...
Install Manifests - Archive of obsolete content
he application will refuse to install the add-on if it does not find a matching os/abi combination. this means that if all of the above examples would occur in one manifest, the add-on will install on any linux build of the application, regardless of its abi, but not on a windows cygwin build. there may be builds of firefox and thunderbird which do not "know" their abi (most likely ports to rare platforms, or non-official builds). these builds will refuse to install any add-on that requires a specific abi for their platform. this property was added for firefox/thunderbird 1.5. previous versions of these applications will ignore the restrictions and install the add-on regardless of the platform. translator the name(s) of translators. you may specify more than one of this value to specify multip...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
file.normal_file_type, 0666); the first parameter of the nsilocalfile.create() method gives the type of file to create. this is defined using constant properties—to create a normal file, use normal_file_type, to create a folder use directory_type. the second parameter gives the access privileges to that file using unix-style octal values. note: windows ignores the privileges parameter; other platforms may do so as well. the nsilocalfile object includes methods that return virtual state values for the current file, as shown in table 1. table 1: methods for checking file states method name description nsilocalfile.exists() determines whether or not the file exists. nsilocalfile.iswriteable() determines whether or not the file can be written to. nsi...
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
to an inconsistent appearance that is not obvious by looking at the individual files. it is easier to be able to edit all icons in one go. there is also a performance gain from using a single file. to get the region that corresponds to a specific state of an icon, the -moz-image-region css property is used. here are some examples of how the css for a toolbarbutton would look like on the 3 major platforms. this assumes that you've set the class xs-hw-toolbarbutton to all of your buttons. windows: /* the second and third selectors at the bottom are necessary to prevent conflicts with installed themes. */ toolbarbutton.xulschoolhello-toolbarbutton, window:not([active="true"]) toolbarbutton.xulschoolhello-toolbarbutton, toolbar[iconsize="small"] toolbarbutton.xulschoolhello-toolbarbutton { lis...
Appendix D: Loading Scripts - Archive of obsolete content
advantages, as well as its own quirks which may trap the unwary. below is an overview of the more common means of loading scripts, along with some of their primary advantages, disadvantages, quirks, and use cases. the examples below which make use of the services global assume that you're previously imported the services.jsm module. as this module only exists on firefox 4 and other gecko 2-based platforms, the services in question will have to be manually loaded on other platforms. <script> tags xul script tags are traditionally the primary means of loading scripts for extension developers. these tags are generally inserted into xul overlay files or other xul documents, after which they are automatically loaded into the context of the xul window in question and executed immediately and synch...
Getting Started with Firefox Extensions - Archive of obsolete content
below, you'll see a nice alert message (for some definitions of 'nice'). click on the ok button to close it. that's all the extension does. now let's take a closer look at it. extension contents you may have noticed that the extension file you installed is named xulschoolhello1.xpi. xpi (pronounced "zippy") stands for cross-platform installer, because the same installer file can work on all platforms firefox supports. xpis are simply zip files, but firefox recognizes the xpi extension and triggers the installation process when an xpi file is loaded. to look into the xpi file you need to download it first, not install it. if the server triggers an install when clicking on a link or button, what you need to do is right click on the install link, and choose the save link as... option. decompre...
Handling Preferences - Archive of obsolete content
mozilla applications are highly customizable. preferences are used to store settings and information to change their default behavior. to open the preferences window in firefox, select the following from the main menu: on windows, tools > options on mac, firefox > preferences on linux, edit > preferences note: keep in mind the usage of the terms "preferences" and "options" in different platforms. if you need to refer to the term "preference" in any of your locale files, you must change the string depending on the operating system. tip: you can use window.navigator.platform in your chrome code to figure out the operating system firefox is running on. you can use the hidden dom window in non-chrome code. firefox loads user preferences from a number of sources. each source is a js file t...
The Essentials of an Extension - Archive of obsolete content
there are two accepted standards for add-on ids. one is the email-like format in the hello world example, which should be something like <project-name>@<yourdomain>. the other standard practice is to use a generated uuid string, which is extremely unlikely to be duplicated. unix-based systems have a command line tool called uuidgen that generates uuids. there are also downloadable tools for all platforms that generate them. the enclosing brackets are just notation, and they're just common practice. as long as your id has some uniqueness to it, it's ok to use either form. <em:name>xul school hello world</em:name> <em:description>welcome to xul school!</em:description> <em:version>0.1</em:version> <em:creator>appcoast</em:creator> <em:homepageurl>https://developer.mozilla.org/docs/xul_school</em...
User Notifications and Alerts - Archive of obsolete content
tle, message, true, "", this, "xulschool hello message"); we pass this as an argument, assuming that this is an object that implements nsiobserver. we do this when we need to handle clicks on the alert box. the image can have any size, but it is recommended that you use a medium, fixed size. the main disadvantage of using alerts is that support for the alerts service is not guaranteed for all platforms and firefox versions. support for windows has existed since firefox 2. for mac os x, support was added on firefox 3, and only through a third-party tool called growl. on linux systems, we have confirmed that it works on firefox 3 on ubuntu linux, but we haven't tested all distributions and firefox versions. because of the inconsistent support and temporary nature of these alerts, we don't recomm...
Signing an XPI - Archive of obsolete content
ertificate to individuals (how ridiculous) so you may have to search hard to find one that will, and who also has a ca root authority installed in mozilla firefox. without the certificate-issuers ca root certificate mozilla firefox will not confirm the validity of your certificate to users who want to install your extension. ideally you want a certificate that has a root ca installed in all major platforms (microsoft windows, sun java, mozilla/netscape firefox/navigator, opera) so you only use one certificate for signing all your software, no matter which platform it is for. the cheapest universally supported (mozilla, java, microsoft) certificate seems to be the comodo instant-ssl offering. you can get a free certificate for open-source developers from unizeto certum, in 2010 it is a certum level...
Firefox addons developer guide - Archive of obsolete content
er template, but i don't think that's the case. certainly appendix 2 doesn't care what version of firefox you're using, since it's just about open source software licenses. ...
Index of archived content - Archive of obsolete content
new security model for web services new skin notes overview of how downloads work plug-n-hack plug-n-hack get involved plug-n-hack phase1 plug-n-hack phase2 plug-n-hack tools supported plugin architecture porting nspr to unix platforms priority content prism blogposts build bundlelibrary bundles configuration extensions faq hostwindow installer scripting styling proxy ui pydom rdf api rdf data...
List of Mozilla-Based Applications - Archive of obsolete content
software computer, easy and preinstalled” open mashups development tool openoffice.org office suite uses nss openswan implementation of ipsec for linux uses nss orca browser web browser gecko-based version of avant browser pale moon web browser optimized browser developed by moonchild productions for gnu/linux & windows platforms, originally forked from firefox palo suite excel extension uses prism partygaming online gaming product uses gecko pencil tool for making diagrams and gui prototyping available as a firefox extension or a standalone app pentaho bi suite commercial open source business intelligence uses xul and mozilla rhino persevere tools fo...
Automated testing tips and tricks - Archive of obsolete content
todo: check example code in to the tree somewhere how to quit the browser on all platforms window.close() of the last open window does not quit the application on mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///users/davel/work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul how to create a new profile from the command line first, use the -createprofile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${profile_di...
Tinderbox - Archive of obsolete content
ing engineers to fix breakage, checks tinderbox even more regularly. while it isn't difficult to load the tinderbox web page or sidebar, it would be useful to have an even quicker way to check tinderbox that doesn't require going to a web page, changing sidebars, or even having the sidebar open. although there are multiple tinderbox clients machines doing different kinds of builds (f.e. different platforms), most people only care about the overall situation, i.e. whether or not any clients have failed. by checking for build failures first and test failures second, we make sure to show users the worst possible situation, i.e. if any clients have failed to build, we will display a red icon that signifies a build failure; if all clients built successfully but some failed tests we will display an orang...
Creating a Release Tag - Archive of obsolete content
n32 and macintosh that aren't pulled by the normal script and need to be pulled by hand. the mini-branch is created so you can check in the build scripts with the necessary changes without touching the original branch. check out mozilla from the branch you want to tag. remember to also check out extra mac and win32 files that aren't normally checked out on linux or the tag won't build on those platforms. cvs co -r netscape_6_2_release mozilla/client.mk cd mozilla gmake -f client.mk checkout create a mini branch for the pull scripts on all three platforms so we can change them without changing anything on the original branch. cd .. cvs tag -b mozilla_0_9_4_1_release_mini_branch mozilla/client.mk delete the existing build scripts and repull them from the mini-branch you just cr...
Download Manager preferences - Archive of obsolete content
browser.download.folderlist indicates the default folder to download a file to. 0 indicates the desktop; 1 indicates the systems default downloads location; 2 indicates a custom (see: browser.download.dir) folder. in firefox 3 and earlier, the default is 0 (except on windows vista, where it's toggled to 1 on initial launch). in firefox 3.5 and seamonkey, the default is 1 on all platforms. for thunderbird, the default is 0. see also nsidownloadmanager nsidownload nsidownloadmanagerui ...
Documentation for BiDi Mozilla - Archive of obsolete content
capable of tasks such as reversing and shaping text, symmetric swapping, numeric translation, etc., no special text rendering is needed, though there may be a call to a native api to set the base text direction (for example settextalign on windows). for systems without bidi capabilities, the methods in nsiubidiutils are used. note that we are not affected by buggy bidi implementations on specific platforms, since the platform never sees a text fragment with mixed directionality, and is not expected to do anything more complicated than displaying left-to-right text from left to right or right-to-left text from right to left. in some circumstances, even on a platform with bidi capability, the layout code has to reverse text fragments or to allow for the fact that they are displayed in reverse. in ge...
Repackaging Firefox - Archive of obsolete content
the actual repackaging job itself. first, set the source directory by clicking its "choose" button. the source directory is a directory that contains the windows installer, mac disk image (.dmg), and/or linux tarball of the standard firefox that you wish to customize. second, set the destination directory to the directory into which you wish to save the customized installers. the "platforms" section lets you select the platforms for which you wish to generate customized installers. check the boxes next to each one you want to generate. make sure you have the standard firefox install package in the source directory for each of these. the names of the source installer packages for each platform that are included in your source directory will appear next to each checkbox. the repacka...
GRE - Archive of obsolete content
inux, but various distributors such as red hat have registered mozilla installations as if they were a gre. the mozilla suite never supported a gre on mac. xulrunner: the new gre xulrunner is the new version of the gre, which not only allows embedding but is capable of bootstrapping entire xul applications such as firefox. xulrunner supports or is planned to support embedding on all three major platforms (windows, mac, and linux). finding and using a gre from application code avoid linking directly against xpcom.dll if an application wishes to use the gre, it must take careful steps to ensure that it links against the proper libraries. if you link directly against xpcom.dll/libxpcom.so (xpcom.lib import lib), your application will not launch unless xpcom.dll is in your path. this prevents dyna...
Creating a Help Content Pack - Archive of obsolete content
d content pack. nc:datasources is a space-separated list of rdf datasources used in construction of the structure of referenced topics. generally, each item in the list will be a uri to an rdf file, but if you're more familiar with rdf you can also refer to a specific node within the rdf file using its rdf:id attribute. nc:platform (added in mozilla 1.8b2/firefox 1.1) when present specifies the platforms to which the information stored in the referenced data sources applies. this attribute is useful when some of your help contents only apply to one specific platform. if this attribute is omitted, the information in the data sources applies to all platforms. the attribute is a space-separated list of platform strings. strings recognized from 1.8 onward are win, mac, os2, and unix; more will be add...
Menu - Archive of obsolete content
Archive › Mozilla › Jetpack › UI › Menu
m icons either by default or at all. label string the label of the menuitem. menu jetpack.menu if defined, the menuitem expands into a submenu. mnemonic string a character that is used as the item's shortcut key while the menu is open. it should be one of the characters that appears in the item's label. on some platforms this character is underlined in the label. type string currently only "separator" is supported. if this property is undefined, the item is a normal menuitem. note that when type == "separator", any other properties (such as label) may be specified. fancy separators may behave differently on different platforms, however. xulid string the id...
Mozilla Crypto FAQ - Archive of obsolete content
used in the 1.3 release of psm, which will provide a complete open source implementation of ssl for mozilla. psm 1.3 will also provide support for mozilla users to obtain personal digital certificates and perform other pki-related functions. note that due to various implementation issues, psm support for mozilla on the macintosh is lagging somewhat behind psm support on windows, linux, and other platforms. also note that the nss developers are creating code for support of s/mime secure messages; however full s/mime support within mozilla will require further development, and may not be available until after the mozilla 1.0 release. finally, note that nss (and thus psm) can also be built using a licensed copy of the rsa bsafe crypto-c library (versions 4.1 or 5.0). iplanet e-commerce solutions has...
LIR - Archive of obsolete content
its operand is always a lir_calli, but one that specifies a function that returns a double. it indicates that the double result is returned via two 32-bit integer registers. the result is always used as the second operand of a lir_ii2d. ...
Reading textual data - Archive of obsolete content
is.readstring(4096, str); if (numchars != 0 /* eof */) var read_string = str.value; to read the entire stream and do something with the data: var str = {}; while (is.readstring(4096, str) != 0) { processdata(str.value); } don't forget to close the stream when you're done with it (is.close()). not doing so can cause problems if you try to rename or delete the file at a later time on some platforms. note that you may get less characters than you asked for, especially (but not only) at the end of the file (stream). unsupported byte sequences you can specify what should happen with byte sequences that do not correspond to a valid character. the last (4th) argument to init specifies which character they get replaced with; nsiconverterinputstream.default_replacement_character is u+fffd repla...
Tamarin Acceptance Testing - Archive of obsolete content
re that changes to the tamarin code base are high quality before submitting, all developers are required to complete the following steps. ...
Tamarin build documentation - Archive of obsolete content
tamarin source versions the following instructions are for obtaining and building the tamarin central source code. for instructions on tamarin tracing, please see tamarin tracing build documentation. supported platforms tamarin currently supports the following operating systems and/or architectures. windows 32 and 64 bit mac osx 10.4, 10.5 on ppc mac osx 10.5, 10.6 on intel linux 32 and 64 bit solaris 10 on sparc android 2.2 on arm windows mobile 6.5 mips (linux) sh4 (linux) getting the tamarin source the tamarin source resides in mercurial at tamarin central. active development source resides at tamarin redux. in this document replace instances of tamarin-central with tamarin-redux to operate in the redux repository. use the following command to create a copy of the tam...
Tamarin Build System Documentation - Archive of obsolete content
ow box at the bottom of a set of buildsteps to see the result of all of the buildsteps for a build and the time each buildstep took scroll down to see previous builds triggered at the bottom of the page click on the [next page] link to display more previous builds what are the goals of the build system (qos)? to provide quick and accurate results of building and testing tamarin on supported platforms and configurations to represent the build results in a clear and concise manor please give use feedback if you have any comments or suggestions to improve the build system how to add tests to the smokes? the list of smoke tests are located in the tamarin-repository, test/run-smokes.txt, assume the start directory is test format is cd testdir; command to run test above the test should be a # co...
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
on win-16, the thread's attempt to address the <tt>shareddata</tt> through the pointer shared will provide interesting (though always incorrect) results. it's difficult to tell exaclty where the updated <tt>counter</tt> is being stored. the only portable manner to write this program requires that the shared structure be allocated from the heap. well, that isn't so hard to remem...
Venkman Introduction - Archive of obsolete content
o. the interactive console also allows for execution of arbitrary javascript code. venkman's keyboard shortcuts are the same as leading visual debugging environments, and gdb users should be familiar with venkman's /break, /step, /next, /finish, /frame, and /where commands. on windows, the javascript debugger compares favorably with visual interdev and other large web development tools. on other platforms, including mac os and unix, it is alone in offering this degree of flexibility, depth, and power in a visual debugging environment. starting the debugger the javascript debugger is automatically pre-installed in mozilla 1.x but must be installed separately in firefox and other gecko-based products, such as thunderbird and netscape 7.x. fortunately, the xpinstall technology makes it possible to ...
When To Use ifdefs - Archive of obsolete content
t, the term is used more loosely to discuss any kind of conditional that differentiates between different build configurations. when are ifdefs used? there are three major kinds of ifdefs in use in the mozilla tree: platform/widget ifdefs, feature ifdefs, and application-specific ifdefs: platform/widget ifdefs the mozilla code will frequently need to differentiate between code for different platforms or widget sets. these ifdefs are generally always acceptable. the only time when they might be a problem is in cross-platform extension code and locales: since this code is downloaded on multiple platforms, platform-specific ifdefs are generally out of the question. for an example of platform-specfic ifdefs, see nscrt.h. feature ifdefs the mozilla code has many features that can be enabled or ...
Install Wizards (aka: Stub Installers) - Archive of obsolete content
more about the xpinstall and installer packages please refer to the annotated browser xpi installer and the xpinstall api reference. what do we mean by engine code? the xpinstall engine processes installer packages by reading instructions from their install scripts to extract files and take other install actions. the same xpinstall engine is used by the browser and the stub installers on all platforms. the xpinstall engine source resides at: <http://lxr.mozilla.org/seamonkey/sou...xpinstall/src/> what do we mean by stub installer? the install wizards used to install mozilla are lightweight stubs targeted to be around 200 kb disk footprint. users download the stub installers, choose which packages to install, choose the destination directory for the installation, and select from various othe...
gestalt - Archive of obsolete content
...
getFolder - Archive of obsolete content
p common" "win system" the "file:///" form is only valid when the subdirectory parameter is used. it must be in file: url format minus the "file:///" part. for example, mydir = getfolder("file:///", "c|/mysoftco/somedir"); note that forward slashes are used, regardless of the platform. the folders whose names start with "win", "mac", or "unix" are specific to those platforms. you should be careful about using one of those directories, as it makes your installation platform-specific. example to get an object representing the standard plug-ins directory, you would use this call: plugindir = getfolder("plugins"); ...
getWinProfile - Archive of obsolete content
er parameter, such as "royal/royal.ini". returns a winprofile object. description the getwinprofile method creates an object for manipulating the contents of a windows .ini file. once you have this object, you can call its methods to retrieve strings from the file or to add strings to the file. for information on the returned object, see winprofile. this method returns null on unix and macintosh platforms. example to edit the win.ini file, you would create a winprofile object with this call: var mywinprofileobj = getwinprofile (getfolder("windows"), "win.ini"); ...
getWinRegistry - Archive of obsolete content
...
setRootKey - Archive of obsolete content
method has the following parameter: key an integer representing a root key in the registry. returns nothing. description the setrootkey changes the root key. when you create a winreg object, it is set to access keys under the hkey_classes_root portion of the registry. if you want to access keys in another portion, you must use this method to change the root key. on 16-bit windows platforms, hkey_classes_root is the only valid value and this method does nothing. these root keys are represented as fields of the winreg object. the values you can use are: hkey_classes_root hkey_current_user hkey_local_machine hkey_users example to use the hkey_users section, use these statements: winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_users); ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
icle uses the installer script from browser.xpi install package as the basis for discussing xpi installations in general. this installer script is relatively short, but it exercises most of the important features of the xpinstall api, and it can easily be used as a template for other more general software installations. in this article, we use the unix install file, but the installers for all the platforms are quite similar, and you can easily take what you learn here and apply it to installations on any platform that mozilla supports. about browser.xpi browser.xpi is the xpi archive in which the main components of the mozilla browser are archived for installation. mozilla cross-platform installations use the xpi format as a way to organize, compress, and automate software installations and softw...
accesskey - Archive of obsolete content
« xul reference home attribute of: button, checkbox, caption, description, label, listitem, menu, menuitem, menulist, tab, radio, toolbarbutton, textbox accesskey type: character this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label attribute for the element. on non-macintosh platforms, the character on the element's label matching the accesskey is underlined. for example, when a menu labeled 'file' has an accesskey of 'f', the generated label will be 'file'. when the user presses a modifier key specific to the platform (eg, control* on windows, command* on macintosh) and the access key, the element will be focused and/or activated from anywhere in the window. on the macintosh, labels are never underli...
drawintitlebar - Archive of obsolete content
...
icon - Archive of obsolete content
Archive › Mozilla › XUL › Attribute › icon
« xul reference home icon mozilla 1.8 type: string this attribute should be used to set the usage for common buttons. some platforms display these buttons with a small icon indicating their usage. this should be used in place of the image attribute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. if you are using a button that matches one of these common usages, use the icon attribute to indicate this. see the appearance of the different icons on some available platforms. ...
modifiers - Archive of obsolete content
shift: the shift key. alt: the alt key. on the macintosh, this is the option key. on macintosh this can only be used in conjunction with another modifier, since alt+letter combinations are reserved for entering special characters in text. meta: the meta key. ...
resizer.type - Archive of obsolete content
« xul reference hometypetype: stringset this to the value "window" for a resizing grip that appears in the bottom corner of the window, used for resizing the window. as some platforms provide this resizing grip automatically, this type of resizer element will be hidden and ensure that the window does not get an extra resizer. ...
Accessing Files - Archive of obsolete content
s directory where xpcom components are installed. temp the temporary directory. you would store any temporary or cache files here. there are a number of other values that may be used, most of which are platform specific. for instance, on windows, the value 'strt' returns the start directory, where applications which run when the system starts up are placed. on other platforms, using this value will just result in an error. ...
Getting File Information - Archive of obsolete content
...
Introduction to XUL - Archive of obsolete content
hat's been done, and is a great deal of work. we intend to provide a subset of cross-platform functionality suitable for building network applications like browsers, leveraging the cross-platform functionality already built into gecko, mozilla's html layout engine. the term "cross-platform ui" is somewhat misleading. ui designers will be able to create ui descriptions which will work on multiple platforms. but proper ui descriptions which take into account various platforms' differing ideas about proper placement of such things as dialog buttons will require some platform-specific work. a single xul specification can only cross-platform to a degree. ui designers and build engineers will need to maintain separate, platform-specific versions of at least some xul documents. "xptoolkit" is rather syn...
Popup Guide - Archive of obsolete content
phiding and the popuphidden events are fired when a menu or popup is closed. for information about these events, see popup events. handling keys within popups for information about how keys are handled within menus and panels, see handling keys within popups. platform specific menu considerations see special per-platform menu considerations for some notes about handling menus on certain platforms, for instance creating the application menu on a macintosh. using popups in extensions extensions may add additional menuitems either to a menu on the menu bar or to the context menu. in addition, an extension may add an entirely new menu. for example, an extension might wish to add a new command on the tools menu to open a dialog specific to the extension. another common task is to create an ...
listbox.currentIndex - Archive of obsolete content
« xul reference currentindex type: integer set to the index of the currently focused item in the list. if no item is focused, the value will be -1. (or, on some platforms, typeof(listboxcurrentindex) will be undefined) in a single selection list, the current index will always be the same as the selected index. in a multiple selection list, the currently focused row may be modified by the user without changing the selection by pressing the control key and pressing the cursor keys to navigate. ...
Accesskey display rules - Archive of obsolete content
detail). xul elements display their accesskeys in their label automatically if it's necessary. this document describes the rules of generating a label text. xul elements don't display any accesskeys on mac xul elements don't display any accesskeys on mac. because macos x doesn't have the conception of accesskey function on its native widgets/applications. basic accesskey display rules on non-mac platforms, a character which is same as its accesskey is underlined. e.g., when an accesskey of "file" is 'f', the generated label will be "file". if a label has two or more characters which are same as its accesskey, the first character of them will be underlined. if a label doesn't have the character, xul elements append the accesskey character with parentheses. e.g., when an accesskey of "open" is 'a'...
Creating Dialogs - Archive of obsolete content
element should be used in place of the window element when creating a dialog. it provides the useful ability to construct up to four buttons along the bottom of the dialog forok,cancel, and so on. you do not need to include the xul for each button; however, you do need to supply code to perform the appropriate tasks when the user presses each button. this mechanism is necessary because different platforms have a specific order in which the buttons appear. example dialog source view <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" ondialogaccept="return dook();" ondialogcancel="r...
Open and Save Dialogs - Archive of obsolete content
function to set the file types that you wish to have displayed. fp.appendfilters(nsifilepicker.filterhtml | nsifilepicker.filterimages); fp.appendfilters(nsifilepicker.filtertext | nsifilepicker.filterall); the first example will add filters for html and for image files. the user will only be able to select those types of files. the manner in which this is done is platform specific. on some platforms, each filter will be separate and the user can choose between html files and image files. the second example will add filters for text files and for all files. the user therefore has the option to display text files only or all files. you can also use filterxml and filterxul to filter for xml and xul files respectively. if you would like to filter for custom files, you can use the appendfilter...
RDF Datasources - Archive of obsolete content
content-length http://home.netscape.com/nc-rdf#content-length the length of the file. lastmodifieddate http://home.netscape.com/nc-rdf#lastmodifieddate the date that url was last modified. extension http://home.netscape.com/nc-rdf#extension the extension of the file, including the period. this property is only available on platforms that use file extensions. possible files roots nc:filesroot top level of the filesystem (usually the list of drives) a file url by using a file url for the ref attribute, you can select a specific directory to be returned. for example, you might use file:///windows or files:///usr/local. the files datasource is an exampl...
Simple Menu Bars - Archive of obsolete content
an be placed separately. menupopup the popup box that appears when you click on the menu title. this box contains the list of menu commands. menuitem an individual command on a menu. this would be placed in a menupopup. menuseparator a separator bar on a menu. this would be placed in a menupopup. you can customize the menus on the menubar to have whatever you want on them on all platforms except the macintosh. this is because the macintosh has its own special menu along the top of the screen controlled by the system. although you can create custom menus, any special style rules or non-menu elements that you place on a menu may not be applied. you should keep this is mind when creating menus. example of a simple menu bar example 1 : source view <toolbox flex="1"> <menubar i...
Stacks and Decks - Archive of obsolete content
the stack larger. shadowing is very useful for creating the disabled appearance of buttons: example 2 : source view <stack style="background-color: #c0c0c0"> <description value="disabled" style="color: white; padding-left: 1px; padding-top: 1px;"/> <description value="disabled" style="color: grey;"/> </stack> this arrangement of text and shadow colors creates the disabled look under some platforms. note that events such as mouse clicks and keypresses are passed to the element on the top of the stack, that is, the last element in the stack. that means that buttons will only work properly as the last element of the stack. decks a deck element also lays out its children on top of each other much like the stack element, however decks only display one of their children at a time. this would ...
XUL Changes for Firefox 1.5 - Archive of obsolete content
n property the <dialog> binding now supports the defaultbutton property. setting this property changes the default button of the dialog. it can be set either to one of the buttons of the <dialog> binding (using their names); or to none - in which case no button is set to be the default. button: icon property the icon property on a button may be used to set stock icons on a button, used on some platforms. for instance <button icon="help"> will create a button with a help icon. this is used typically on gnome systems where possible values are: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. <menulist> items in a <menulist> support the description attribute to allow for extra de...
XUL Questions and Answers - Archive of obsolete content
are actually handled as strings. to convert them to integers use the parseint() javascript function. while the attributes are always strings per the dom specification, the properties will eventually be fixed to return the value with the correct type. using the "icon" attribute on a button from xulplanet.com reference: this attribute should be used to set the usage for common buttons. some platforms display these buttons with a small icon indicating their usage. this should be used in place of the image attribute. possible values include: accept, cancel, help, open, save, find, clear, yes, no, apply, close, print, add, remove, refresh, go-forward, go-back, properties, select-font, select-color, network. if you are using a button that matches one of these common usages, use the icon attribute...
The Implementation of the Application Object Model - Archive of obsolete content
the picture, then dialogs would have to be described using native widgetry (unless you're willing to design an html dialog system, which still wouldn't cut it without extending html), and communicator would have to ship with both widget sets. the native widgets would also be an issue for something like a gfx-toolbar, which would need to contain the native widgets and still look consistent on all platforms. the native widgets also wouldn't be fully css responsive, which would mean they might look strange when placed in a dialog or on a toolbar with a rendered background. of course you could always say that toolbars and dialogs just wouldn't be able to have backgrounds with different colors, but that leads into the next point. a staggering loss of functionality. an incredible array of features woul...
key - Archive of obsolete content
Archive › Mozilla › XUL › key
ype: string a label for the keyboard shortcut. this text would appear next to a menuitem label if that menuitem is associated with the key element via its key attribute. modifiers type: space-separated list of the values below a list of modifier keys that should be pressed to invoke the keyboard shortcut. multiple keys may be separated by spaces or commas. keys will map to other keys on platforms that do not have them. shift: the shift key. alt: the alt key. on the macintosh, this is the option key. on macintosh this can only be used in conjunction with another modifier, since alt+letter combinations are reserved for entering special characters in text. meta: the meta key. on the macintosh, this is the command key. control: the control key. os: windows logo key on windows, super o...
listbox - Archive of obsolete content
ute("value", myvalue) and getattribute("value") do not access or affect the contents displayed to the user. properties accessibletype type: integer a value indicating the type of accessibility object for the element. currentindex type: integer set to the index of the currently focused item in the list. if no item is focused, the value will be -1. (or, on some platforms, typeof(listboxcurrentindex) will be undefined) in a single selection list, the current index will always be the same as the selected index. in a multiple selection list, the currently focused row may be modified by the user without changing the selection by pressing the control key and pressing the cursor keys to navigate. currentitem type: listitem element returns the currently focused it...
panel - Archive of obsolete content
Archive › Mozilla › XUL › panel
ton is pressed, the panel will be displayed. a panel may also be opened via a script using the openpopup method. the panel is closed when the user clicks outside the panel, presses escape or when the panel's hidepopup method is called. warning: for firefox versions between 3.6 and 4.0, placing an iframe, browser or editor inside a panel is not supported. some features may work, but only on some platforms. for those versions of firefox, it is best to avoid child frames in a panel, if possible. this limitation was resolved as of firefox 4.0. attributes backdrag, close, consumeoutsideclicks, fade, flip, ignorekeys, label, left, level, noautofocus, noautohide, norestorefocus, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, titlebar, top, type properties accessibletype,...
resizer - Archive of obsolete content
e left. bottomright resized down and to the right. topleft resized up and to the left. topright resized up and to the right. element type: element to resize the id of the element that should be resized by the resizer. typetype: stringset this to the value "window" for a resizing grip that appears in the bottom corner of the window, used for resizing the window. as some platforms provide this resizing grip automatically, this type of resizer element will be hidden and ensure that the window does not get an extra resizer. inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbef...
richlistbox - Archive of obsolete content
e("value", myvalue) and getattribute("value") do not access or affect the contents displayed to the user. properties accessibletype type: integer a value indicating the type of accessibility object for the element. currentindex type: integer set to the index of the currently focused item in the list. if no item is focused, the value will be -1. (or, on some platforms, typeof(listboxcurrentindex) will be undefined) in a single selection list, the current index will always be the same as the selected index. in a multiple selection list, the currently focused row may be modified by the user without changing the selection by pressing the control key and pressing the cursor keys to navigate. currentitem type: listitem element returns the currently focused i...
treecol - Archive of obsolete content
on firefox 2.x and 3.x, all operating systems other than mac os x already use these styles by default. if targeting firefox for mac os x, be sure to use these styles but include your own checkbox image. however, chrome://global/skin/checkbox/cbox-check.gif is available in seamonkey on mac os x.. treechildren::-moz-tree-...
window - Archive of obsolete content
nt the find bar from being displayed when it's not supported by the content (such as in the add-ons manager tab). drawintitlebar type: boolean if this attribute is true, the top of the window's content area will begin at the top edge of the title bar, instead of below the title bar. this allows the window to draw in the title bar. this is supported only from window elements, and is ignored on platforms that don't support drawing into the title bar. fullscreenbutton type: boolean set this attribute to true to display a button in the window chrome to allow the user to switch the window into full screen mode. supported on mac os x 10.7 lion and later and on windows. the window receives a "fullscreen" event once the change has been made. height type: string (representing an integer) th...
Mozprocess - Archive of obsolete content
mozprocess aims to provide the ability to robustly terminate a process (by timeout or otherwise), along with any child processes, on windows, os x, and linux. mozprocess utilizes and extends subprocess.popen to these ends. ...
Gecko Compatibility Handbook - Archive of obsolete content
ts in a web page. in addition, internet explorer 4 and netscape navigator 4 use completely different methods of embedding third-party software into the browser. gecko is a cross-platform browser engine, compatible with a number of windows versions including windows xp, as well as mac and linux. because of gecko's cross-platform nature, functionality is generally very much the same on different platforms unlike internet explorer for mac and ie for windows, which are very different programs and so may behave quite differently from each other. quick compatibility test if your site uses netscape 4.x and microsoft proprietary technologies, see using web standards in your web pages for a quick tutorial on standards. this compatibility test will be most beneficial to sites using simple code or that h...
2006-11-24 - Archive of obsolete content
meetings none for this week ...
2006-10-20 - Archive of obsolete content
d to compile both public releases of firefox and xulrunner. on october 18th marcus responded to his original post and expanded on the original content of his question. marcus claims that when he builds firefox using centos he encounters crashes (segmentation faults) under linux distributions such as gentoo, suse and fedora. he also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't encounter any problems on the same machine. adding extension to extensions/ folder originally posted on oct 19th: christopher finke is currently learning how to compile firefox. though he has succeeded in building firefox he has so far failed to compile firefox with his own extensions of choice so that his custom build would have those extensions enabled...
2006-10-06 - Archive of obsolete content
rc2 testing update tim riley announced minimum tests for rc2 have been run and that rc2 is go for the final staging of the release. preed followed up and said that the checker was run and "build is go for launch". re: sunbird and lightning 0.3rc1 available sunbird and lightning 0.3rc1 is announced. this launches a (misguided?) discussion and comparison of sunbird and lightning to outlook. ...
2006-11-10 - Archive of obsolete content
that resources are available at o'reily, in the creating applications with mozilla section. benjamin smedberg has been "working on some xptcall refactoring which will allow us to expose xptcall via a frozen api (and c linkage)". he is looking for xptcall port maintainers to submit patches to bug 349002. matthew gertner wants to know if anyone has written code to paste images from the clipboard on platforms other than windows? as of the end of the week, there is no reply. harry is looking for help with create thread in javascript using nsithread. he wants to know how to create new threads using javascript for background download operations. neil deakin points out that "downloads and other network operations are always done in another thread so you shouldn't be creating one yourself". meetings no me...
NPAPI plugin developer guide - Archive of obsolete content
g custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure...
NPAnyCallbackStruct - Archive of obsolete content
contains information required during embedded mode printing. syntax typedef struct { int32 type; } npanycallbackstruct; fields the data structure has the following field: type always contains np_print. description callback structures are used to pass platform-specific information. the npanycallbackstruct structure contains information required by the platformprint field of the npembedprint structure during embedded mode printing. ...
NPP_HandleEvent - Archive of obsolete content
syntax #include <npapi.h> int16 npp_handleevent(npp instance, void* event); parameters the function has the following parameters: instance pointer to the current plug-in instance. event platform-specific value representing the event handled by the function. ...
NPSetWindowCallbackStruct - Archive of obsolete content
contains information about the plug-in's unix window environment. syntax typedef struct { int32 type; display* display; visual* visual; colormap colormap; unsigned int depth; } npsetwindowcallbackstruct; fields the data structure has the following fields: type always contains np_setwindow. display standard x toolkit attribute. pointer to the display structure that represents the browser-server connection. visual standard x toolkit attribute. ...
Security - Archive of obsolete content
ures is available from "digital signatures." introduction to sslthis document introduces the secure sockets layer (ssl) protocol. ssl has been universally accepted on the world wide web for authenticated and encrypted communication between clients and servers.nspr release engineering guidethis paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms.ssl and tlsthe secure sockets layer (ssl) and transport layer security (tls) protocols are universally accepted standards for authenticated and encrypted communication between clients and servers. both client and server authentication occur over ssl/tls. ...
New in JavaScript 1.1 - Archive of obsolete content
method of every object (was previously a built-in function); it evaluates a string of javascript code in the context of the specified object. math.random() now works on every platform. tostring(): added radix parameter, which specifies the base to use for representing numeric values. isnan() now works on every platform (not only unix anymore) parsefloat() and parseint() now return nan on all platforms, if the first character of the specified string cannot be converted to a number; in previous releases, it returned nan on solaris and irix and zero on all other platforms. ...
New in JavaScript 1.2 - Archive of obsolete content
eatures regular expressions signed scripts changed functionality in javascript 1.2 you can now nest functions within functions. number now converts a specified object to a number. number now produces nan rather than an error if x is a string that does not contain a well-formed numeric literal. string now converts a specified object to a string. array.prototype.sort() now works on all platforms. it no longer converts undefined elements to null and sorts them to the high end of the array. string.prototype.split() it can take a regular expression argument, as well as a fixed string, by which to split the object string. it can take a limit count so that it won't include trailing empty elements in the resulting array. string.prototype.substring(): no longer swaps index numbe...
RFE to the Custom Controls - Archive of obsolete content
xul documents for the following reason. xul, in many cases, is much better suited for application development than xhtml. therefore the control set may need to be more extensive to address the wider spectrum of requirements that a xul application will have on its controls. note: xul is a feature of mozilla only and custom control authors should be aware their controls won't work on other browser platforms. rfe put your requests here. output that shows the dom if output contains cdata section or text node and its data is any mozilla known language like xhtml/xul/svg then output should parse and display it (see bug 316817). output should show data in current locale format the bug 331585 address the issue. probably this feature should be implemented by adding a new custom control. input th...
Requests For Enhancement - Archive of obsolete content
Archive › Web › XForms › RFE
in xul documents for the following reasons: xul, in many cases, is much better suited for application development than xhtml. therefore the control set may need to be more extensive to address the wider spectrum of requirements that a xul application will have on its controls. xul is a feature of mozilla only and custom control authors should be aware their controls won't work on other browser platforms. enhancements of xforms elements if you find that none of the elements proposed by the xforms spec address your requirements, please post your usecase here. xforms extension ui this section should be for used for noting potiential ui improvements to the mozilla xforms extension. ...
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
rganization to quickly and easily debug issues. however, what xerox neglected to understand was that regardless of how powerful pilot and co-pilot was, the star workstation could not evolve with the times because it was proprietary. xerox was bound to a unique hardware platform and to a closed development operating system. and xerox chose to bypass multiple opportunities to port the code to other platforms, and to provide open-source code. consequently, xerox eventually had to shut down the production of their workstation development because of escalating manufacturing and developing costs and slowed sales. xerox’s biggest asset in the beginning became its weapon of destruction. they settled on a proprietary environment, and missed the opportunity to make their environment the benchmark – and ...
Archive of obsolete content
perhaps your target audience is people that are using older hardware, for example, and can't upgrade to the latest and greatest browsers. or for "reasons," your company is required to use very old software and you need to build web content that runs on that software. or perhaps you're just curious about the history of an obsolete feature or api, and how it worked. there are many reasons older documentation can be useful. ...
Anatomy of a video game - Game development
nt to be clear that any of the above, or none of them, could be best for your game. the correct decision entirely depends on the trade-offs that you are willing (and unwilling) to make. the concern is mostly with switching to another option. fortunately, i do not have any experience with this, but i have heard it is an excruciating game of whack-a-mole. an important thing to remember for managed platforms, like the web, is that your loop may stop execution for significant periods of time. this could occur when the user unselects your tab and the browser sleeps (or slows) its requestanimationframe callback interval. you have many ways to deal with this situation and this could depend on whether your game is single player or multiplayer. some choices are: consider the gap "a pause" and skip the t...
Desktop mouse and keyboard controls - Game development
we'll look at this below. ...
Techniques for game development - Game development
s animations, and javascript loops involving window.requestanimationframe. audio for web games audio is an important part of any game — it adds feedback and atmosphere. web-based audio is maturing fast, but there are still many browser differences to negotiate. this article provides a detailed guide to implementing audio for web games, looking at what works currently across as wide a range of platforms as possible. 2d collision detection a concise introduction to collision detection in 2d games. tilemaps tiles are a very popular technique in 2d games for building the game world. these articles provide an introduction to tilemaps and how to implement them with the canvas api. ...
Java - MDN Web Docs Glossary: Definitions of Web-related terms
iled, object-oriented, highly portable programming language. java is statically typed and features a similar syntax to c. it comes with a large library of readily usable functions, the java software development kit (sdk). programs are compiled only once ahead of time into a proprietary byte code and package format that runs inside the java virtual machine (jvm). the jvm is available across many platforms, which allows java programs to run almost everywhere without the need to be compiled or packaged again. this makes it a preferred language in many large enterprises with heterogenous landscapes, but may be perceived "heavy". learn more general knowledge java on wikipedia ...
Accessibility - Learn web development
level to improve accessibility. accessible multimedia another category of content that can create accessibility problems is multimedia — video, audio, and image content need to be given proper textual alternatives, so they can be understood by assistive technologies and their users. this article shows how. mobile accessibility with web access on mobile devices being so popular, and popular platforms such as ios and android having fully-fledged accessibility tools, it is important to consider the accessibility of your web content on these platforms. this article looks at mobile-specific accessibility considerations. assessments accessibility troubleshooting in the assessment for this module, we present to you a simple site with several accessibility issues that you need to diagnose an...
Debugging CSS - Learn web development
with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn the basics of what browser devtools are, and how to do simple inspection and editing of css. how to access browser devtools the article what are browser developer tools is an up-to-date guide explaining how to access the tools in various browsers and platforms. while you may choose to mostly develop in a particular browser, and therefore will become most familiar with the tools included in that browser, it is worth knowing how to access them in other browsers. this will help if you are seeing different rendering between multiple browsers. you will also find that browsers have chosen to focus on different areas when creating their devtools. for example...
How can we design for all types of users? - Learn web development
please provide a text transcript of the video/audio file. image compression some users may choose to display images, but still have limited bandwidth available, especially in developing countries and on mobile devices. if you want a successful website, please compress your images. there are various tools to help you, either online or local: installed software. imageoptim (mac), optipng (all platforms), pngcrush (dos, unix/linux) online tools. yahoo's smushit!, dynamic drive's online image optimizer (which can convert automatically from one format to another if it's more bandwidth-efficient) ...
How much does it cost to do something on the Web? - Learn web development
p client, as part of its file manager. windows explorer, nautilus (a common linux file manager), and the mac finder all include this functionality. however, people often choose dedicated (s)ftp clients to display local or remote directories side-by-side and store server passwords. if you want to install an (s)ftp client, there are several reliable and free options: for example, filezilla for all platforms, winscp for windows, cyberduck for mac or windows, and more. because ftp is inherently insecure, you should make sure to use sftp — the secure, encrypted version of ftp that most hosting sites you'll deal with these days will offer by default — or another secure solution like rsync over ssh. browsers you either already have a browser or can get one for free. if necessary, download firefox ...
What software do I need to build a website? - Learn web development
elopers including a ready-to-use virtual machine at modern.ie.) by all means run some tests on a real device, especially on real mobile devices. mobile device simulation is a new, evolving technology and less reliable than desktop simulation. mobile devices cost money, of course, so we suggest taking a look at the open device lab initiative. you can also share devices if you want to test on many platforms without spending too much. next steps some of this software is free, but not all of it. find out how much it costs to do something on the web. if you'd like to learn more about text editors, read our article about how to choose and install a text editor. if you're wondering how to publish your website on the web, look at "how to upload files to a web server". ...
Introduction to web APIs - Learn web development
vel scripting language built into browsers that allows you to implement functionality on web pages/apps. note that javascript is also available in other programming environments, such as node. browser apis — constructs built into the browser that sits on top of the javascript language and allows you to implement functionality more easily. third-party apis — constructs built into third-party platforms (e.g. twitter, facebook) that allow you to use some of those platform's functionality in your own web pages (for example, display your latest tweets on your web page). javascript libraries — usually one or more javascript files containing custom functions that you can attach to your web page to speed up or enable writing common functionality. examples include jquery, mootools and react. javas...
Web performance - Learn web development
perties that impact performance and suggested ways of handling styles to ensure performance is not negatively impacted. fonts and performance a look at whether you need to include external fonts and, if you do, how to include the fonts your design requires with the least impact on your sites performance. mobile performance with web access on mobile devices being so popular, and all mobile platforms having fully-fledged web browsers, but possibly limited bandwidth, cpu and battery life, it is important to consider the performance of your web content on these platforms. this article looks at mobile-specific performance considerations. focusing on performance there are many different things a developer can do to improve performance, but how fast is fast enough? how can you convince powers th...
Vue resources - Learn web development
end it by pressing ctrl + c in the terminal. next, run the npm run build (or yarn build) in the console. this will create a new dist directory containing all of your production ready files. to publish your site to the web, copy the contents of this folder to your hosting environment. note: the vue cli docs also include a specific guide on how to publish your app to many of the common hosting platforms. vue 3 vue 3 is a major release of the framework with a lot of major changes. it went into active beta in april, 2020. the biggest change is a new composition api that works as an alternative to the current property-based api. in this new api, a single setup() function is used on the component. only what you return from this function is available in your <template>s. you are required to be exp...
Handling common HTML and CSS problems - Learn web development
s example includes a simple link allowing you to download the video if even the html5 video player doesn't work, so at least the user can still access the video. html5 form elements also exhibit fallback qualities — html5 introduced some special <input> types for inputting specific information into forms, such as times, dates, colors, numbers, etc. these are very useful, particularly on mobile platforms, where providing a pain-free way of entering data is very important for the user experience. supporting platforms provide special ui widgets when these input types are used, such as a calendar widget for entering dates. the following example shows date and time inputs: <form> <div> <label for="date">enter a date:</label> <input id="date" type="date"> </div> <div> <label for="t...
Strategies for carrying out testing - Learn web development
so it isn't much good for completely new sites. but an analytics history can be useful for finding support stats to influence say a new version of a company's site, or new features you are adding to an existing site. if you have these available, they are far more accurate than global browser stats like those mentioned above. you may also consider using open source and privacy focussed analytics platforms like open web analytics and matomo. they expect you to self-host the analytics platform. setting up google analytics first of all, you'll need a google account. use this account to sign into google analytics. choose the google analytics (web) option, and click the sign up button. enter your web site/app details into the signup page. this is fairly intuitive to set up; the most important fi...
Deploying our app - Learn web development
ill at least make you aware of the need for testing, and will plant the seed that inspires you to go and learn more. although the test for this project does not include a test framework, as with all things in the front-end development world, there are a slew of framework options. the test itself isn't what is important. what is important is how the failure or success is handled. some deployment platforms will include a specific method for testing as part of their pipeline. products like github, gitlab, etc., all support running tests against individual commits. as this project is deploying to netlify, and netlify only asks about the build command, we will have to make the tests part of the build. if the test fails, the build fails, and netlify won’t deploy. let’s get started. go to yo...
Mozilla accessibility architecture
ase common implementations shared by html and xul implementations accessible/src/html/ document and html object implementations accessible/src/xul/ user interface and xul object implementations accessible/src/msaa/ windows implementations accessible/src/atk/ atk implementations, may eventually be used on platforms other than linux and unix accessible/src/mac/ empty implementations of platform-specific classes for os x. these implementatiosn may be filled later. accessible/src/other/ empty implementations of platform-specific classes so that builds don't fail on platforms currently not-supported where we put toolkit-specific code because atk and msaa are ...
Gecko info for Windows accessibility vendors
ed clients (support msaa) xul-based clients make full use of the gecko architecture, not only for html content, as well as for menus, dialogs and the entire user interface via an xml language called xul (extensible user-interface language). none of the user interface contains standard windows controls -- not even the menus! this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances). firefox (please use version 1.1 alpha builds or later) thunderbird (please use version 1.1 alpha builds or later) mozilla seamonkey (please use 1.8 alpha builds or later) how to find the content window and load the document screen readers need to find the content window so that they know where to start grabbing th...
Information for External Developers Dealing with Accessibility
ide a document for developers who need to support microsoft active accessibility (msaa) in a desktop application, in order to make it accessible with 3rd party assistive technologies, containing practical tips and the details of mozilla's implementation. accessibility api cross reference should be helpful at anyone looking at implementing accessibility api support for a product on multiple platforms. contains info on accessible roles, states and events. accessible toolkit checklist a list of what needs to be done for accessibility when building new toolkits, widget by widget. in addition, here is a list of official keyboard ui guidelines for each desktop: windows keys: guidelines on keyboard ui design and on implementing keyboard shortcuts: an excellent resource from microso...
Software accessibility: Where are we today?
are solution that can enable equality should by all rights be free of charge - an integral part of society's infrastructure. if no special hardware is required, why should a disabled person pay extra money to use the same software as everyone else? that said, there is still an important role for adaptive technology vendors in creating special services and hardware, or even proprietary software on platforms where that is appropriate. . the ideal situation would be for adaptive technology professionals to make money on rehab, trainingand support - something there is currently not enough of. each end user has a unique set problems, and in the open source world, providing highly customized solutions can be a business in itself. right now, gui's on linux are mostly not accessible. microsoft windows is s...
Frequently Asked Questions for Lightweight themes
nge the look of your firefox web browser. there are hundreds of thousands community-designed themes to choose from, with more added every day. start looking here for designs that fit your style. what kind of computers and operating systems do lightweight themes work with? lightweight themes work with any type of computer that has firefox installed. this includes mac, linux, windows, and android platforms. what can lightweight themes do? lightweight themes change the header area of your browser, including the tab text color and the background tab colors. you can easily preview a design and install it without needing to restart. installing lightweight themes how do i add lightweight themes to my firefox? in just a few seconds, you can install a theme and transform the look of your firefox we...
Chrome registration
onent component/mylib.so abi=linux_x86-gcc3 see xpcom abi for more details. platform (platform-specific packages) some packages are marked with a special flag indicating that they are platform specific. some parts of content, skin, and locales may be different based on the platform being run. these packages contain three different sets of files, for windows and os/2, macintosh, and unix-like platforms. for example, the order of the "ok" and "cancel" buttons in a dialog is different, as well as the names of some items. the "platform" modifier is only parsed for content registration; it is not recognized for locale or skin registration. however, it applies to content, locale, and skin parts of the package, when specified. to indicate that a package is platform-specific, add the "platform" modi...
Creating reftest-based unit tests
sole output. the reftest.list file can be named whatever you want, not necessarily reftest.list (but it has to end with .list). more to do create more reftests. new tests can be added to the reftest.list file, which can contain any number of tests. the file can include other things, but it does not get very complicated. keep in mind new tests should fit a 600x600 window so we can test on mobile platforms easier. here is an example. include ../other.list == foo.html bar.html != aaa.html bbb.html the first line, as one might expect, includes another manifest. the second line should look familiar. it says that foo.html and bar.html should produce visually identical output. the third line says that aaa.html and bbb.html should not produce visually identical output. more information on this file ca...
HTTP logging
ndings. older editors may have problems with this, but if you're using an even reasonably modern mac os x application to view the log, you won't have any problems. start logging using command line arguments since firefox 61 it's possible to start logging in a bit simpler way than setting environment variables: using command line arguments. here is an example for the windows platform, on other platforms we accept the same form of the arguments: if firefox is already running, exit out of it. open a command prompt. on windows xp, you can find the "run..." command in the start menu's "all programs" submenu. on all newer versions of windows, you can hold down the windows key and press "r". copy and paste the following line into the "run" command window and then press enter: for 32-bit windows...
Building Firefox with Debug Symbols
this is enabled by default so unless you have explcitly disabled it your build you should include symbols. ...
Makefiles - Best practices and suggestions
file gathering. platform specific - avoid this logic whenever possible. code as little platform specific logic within a makefile as possible, a conditional and compiler flags at most should be needed. for ex use defines within sources to shift platform logic into your source code. if a unit test is platform specific write your makefile so it can be used on all platforms but only do work on the specific hardware or class of hardware. for classes of hardware (unix/windows) place your makefile in a subdirectory, unix/makefile.in always include dependencies when creating a target initial make call should always be the workhorse: build, generate, deploy, install, etc. all subsequent make calls must become a nop unl...
How Mozilla's build system works
ed_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkxultree_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkxulgrid_s.$(lib_suffix) \ $(null) include $(topsrcdir)/config/rules.mk shared_library_libs is set to a list of static libraries, which should be linked into this shared library. note the use of lib_prefix and lib_suffix to make this work on all platforms. building jar files jar files are used for packaging chrome files (xul, javascript, and css). for more information on jar packaging, see this document. here, we will only cover how to set up a makefile to package jars. below is an example: depth = ../../../.. topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk...
Eclipse CDT
his will give you a list of the issues in the problems tab at the bottom of the window where you can double-click to jump to the location of any given issue. many of the parser errors are the result of the headers are only parsed once issue, while others are the result of eclipse trying to do its best to process files that are not built under your configuration (e.g. files compiled only on other platforms) and that therefore have no build output parser data associated with them. if you are trying to dig into a particular parser errors to figure out what it's about, here are a few things you can try: select your project in the project explorer, then from the context menu select "index > search for unresolved includes". for problematic source files, select the file in the project explorer and f...
Contributing to the Mozilla code base
ixed your very first bug, and the open web is stronger for it. but don't stop now. go back to step 1, as there is plenty more to do. your mentor might suggest a new bug for you to work on, or find one that interests you. now that you've got your first bug fixed you should request level 1 access to the repository to push to the try server and get automated feedback about your changes on multiple platforms. after fixing a nontrivial number of bugs you should request level 3 access so you can land your own code after it has been reviewed. more information we're in the process of improving information on this page for newcomers to the project. we'll be integrating some information from these pages soon, but until then you may find them interesting in their current form: a guide to learning the m...
Working with Mozilla source code
e guidelines and documentation for how to create and update xpcom interfaces. the firefox codebase: css guidelines this document contains guidelines defining how css inside the firefox codebase should be written, it is notably relevant for firefox front-end engineers. svg cleanup guide guidelines and best practices for shipping new svgs. try servers mozilla products build on at least three platforms. if you don't have access to them all, you can use the try servers to test your patches and make sure the tests pass. creating a patch once you've made a change to the mozilla code, the next step (after making sure it works) is to create a patch and submit it for review. this article needs to be updated fully for mercurial. getting commit access to the source code feel ready to join the few, ...
Firefox
with broad compatibility, the latest in web technologies, and powerful development tools, firefox is a great choice for both web developers and end users. firefox is an open source project; much of the code is contributed by our huge community of volunteers. here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics. ...
Overview of Mozilla embedding APIs
webbrowser exposes access to the system clipboard via the nsiclipboardcommands interface. this interface supports cut/copy/paste operations on the current selection within the webbrowser window. printing (not yet implemented) printing the contents of a domwindow within a webbrowser is a two step process. first, the printer and page options are collected via the nsiprintoptions interface. on most platforms this involves displaying a native print dialog box. once all of the options have been set, the nsiwebbrowserprint interface is used to print the contents of the desired domwindow. searching searching within a nswebbrowser is controlled via the nsiwebbrowserfind interface. the search is always performed within the domwindow which currently has the focus. focus management focus managment within the...
Gecko SDK
note: you can subscribe to a calendar of the firefox release schedule. also, you can view the schedule on the web. unpack the sdk tarball to some suitable location. issues with the os x sdk if you need to use the xpidl utility to compile idl files on os x, it's likely that you will receive a strange error when running the tool th...
Gecko Keypress Event
om shortcut keys. if gecko doesn't replace the charcode with an ascii character, the web application developers would need to consider all non-latin keyboard layouts (arabic, greek, hebrew, russian, etc.). the charcode value depends on the state of capslock and numlock (except they are currently ignored if alt (option) is down on mac - see bug 432953). there are also some differences between the platforms, as described in the following sections. windows the charcode is replaced only when ctrl is down but alt is not down. if the os-provided character cannot be entered without using the ctrl key, then, gecko does not replace the character. e.g., ctrl+shift+'2' on persian keyboard layout inputs a zwnj, though shift+'2' inputs '@', and so, if gecko were to replace the charcode in this case, users w...
Hacking with Bonsai
hacking mozilla with bonsai bonsai was originally created to solve the problem of tree instability. the original navigator code base had large sections that were shared across multiple platforms. many times, code checked in would compile or run on a handful of platforms. also, with as many as 100 engineers, it was very difficult to determine what happened in the tree that caused the instability. bonsai was created to solve these problems. the process everyone who checks into the tree, joins a group called "the hook" at 8:00 am pst every weekday morning, the source tree is closed. the build team will then pull the 8:00 am tree, and build it on a subset of the platforms, linux, win32 & macppc. at 10:00 am, everyone who is on the hook is available in case the build breaks eventually, the tree...
How to add a build-time test
the test program from the "check" target in the makefile. (example to run the testcookie program) in the test program: if the test fails, exit with a non-zero status and/or print the string "fail" to stdout if the test passes, exit with a zero status and don't print the string "fail" (bonus points for printing "pass" :) ) write the test so that you expect it to pass on all platforms, since if the test fails, the tree will go orange (once we've set this up - see bug 352240 for status). for example, to add an xpcshell test to a module, do the following: copy tools/test-harness/xpcshell-simple/example to yourmoduledir/tests_type, wheretests_type is something that describes your tests. you can of course use unit or test if you're not feeling creative. in <tt>yourmoduledir...
Implementing QueryInterface
the aggregated objects, which may then return wrong interfaces. one more reason to avoid aggregation specifically, and complicated hierarchies in general. the ns_get_iid macro you can use the ns_get_iid macro instead of typing out the full getiid expression. in general, i disapprove of macros except in cases where the macro must expand to different text in different situations, e.g., different platforms, debugging vs. non-debugging, et al. in such cases macros are indispensible. in other cases macros may help some people but often cloud the issues for others. they always make the program source more fragile. in this case the macro is for convenience only, so i don't recommend it, but i do offer it up as an alternative. // ... if ( aiid.equals(ns_get_iid(nsix)) ) foundinterface =...
Mozilla Framework Based on Templates (MFBT)
document primarily attempts to direct readers to the correct file to read those comments. feel free to file a documentation bug if you think this approach could be improved, and feel free to make improvements to this document if you see them. functionality types and type manipulation standardinteger.h implements the <stdint.h> interface. (the <stdint.h> standard header is not available on all platforms and so cannot be used directly. this header also provides a useful "hook" for embeddings that must customize the types underlying the fixed-size integer types.) types.h includes standardinteger.h and further provides size_t. checkedint.h implements checked integers. they behave like integers, but safely check for integer overflow and divide-by-zero. useful for input validation. floatingpoint.h...
Basics
vel="0"> <mn>2</mn><mo>+</mo><mo mathvariant="bold">...</mo> </mstyle> </mfrac> </mrow> </mstyle> </mfrac> </mrow> </mstyle> </mfrac> </mrow> </mstyle> </mfrac> </mrow> </mstyle> </mfrac> </mrow> </math> </button> </div> for more information about mathml in mozilla, see the mathml project page. there are links to more samples, screenshots and instructions on how to download fonts for various platforms. these fonts are required to view other examples beyond the basic constructions illustrated here. mathml background image html content <div class="background"></div> <math display="block"> <mrow> <msub> <mi>z</mi> <mi>&alpha;</mi> </msub> <mrow> <mo>(</mo> <mi>f</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mrow> <mn>2</mn> <mi>i</mi> <mo>&thinspace;</mo> <mi>cos</mi> <mo>(</mo> ...
Fonts for Mozilla 2.0's MathML engine
r you need to install additional fonts and to follow the instructions below. you may also want to check out the mozilla mathml torture test to test your installation against concrete examples. on windows: use this mathml fonts installer. on mac os x lion (10.7) and higher versions, stix fonts are already installed and can be used for mathml. on most linux distributions and similar open source platforms, you can install math fonts (stix, asana or mathjax fonts) from your package manager or get them from this zip archive. on android, firefox os and other platforms where the instructions above do not work: install the mathml-fonts add-on. this requires gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) or higher. overview mathematical formulas make use of various symbols represented b...
Updates
complete and improve it! may 8, 2007 mozilla ceo speaks out on the future of firefox: the complete 8,000 word interview. interview to the apc magazine where mitchell baker mentions roger sidje's work on mathml. june 5, 2002 mozilla 1.0 released "by virtue of embedding gecko, mozilla 1.0 and products based on mozilla code support more web standards, more deeply, more consistently across more platforms than any others. mozilla 1.0 features full support for html 4.0, xml 1.0, resource description framework (rdf), cascading style sheets level 1 (css1), and the w3c document object model level 1 (dom1) [...] as well as support for display of mathematical equations using mathml." december 7, 2001 status report october 2000 the first international mathml conference april 14, 2000 status report ...
MathML Accessibility in Mozilla
we started exposing generic accessible objects for mathml in bug 920547 and so these can be retrieved by nvda starting with gecko 27.0 (firefox 27.0 / thunderbird 27.0 / seamonkey 2.24). mozilla and nvda developers essentially do not have control on how mathematical formulas are read, please contact design science for any inquiries. mac: mathml support is provided by voiceover. ...
Mozilla DOM Hacking Guide
ementation, nsidomdomimplementation) dom_classinfo_map_entry(nsidomdomimplementation) dom_classinfo_map_end the interface1, interface2, ... arguments are the name of the interfaces implemented by the dom object and exposed to javascript. the internal interfaces should not be a part of this list. #include the relevant files to make it build, tweak the makefiles, etc. make sure it builds on all platforms! :-p if you used an already existing scriptable helper class, then all you need to do is build, nuke components.reg (if you build optimized) and run. everything should work well. if you want to use a new scriptable helper class, you will have to implement it as well. how to override the default behavior of xpconnect on dom objects xpconnect implements default behaviors for xpcom objects in g...
Mozilla Development Tools
variable names. bonsai bonsai is tree control (get it?). it is our home-grown web-based tool for watching the up-to-the-minute goings-on in our cvs repository (viewing checkins and log messages, reading diffs, etc.) tinderbox tinderbox is for knowing when the tree is in flames. it is our home-grown web-based tool for watching the progress of the continuous builds that we run on multiple platforms. it is how we are able to tell when a checkin has broken the build on some platform, and how we know which person needs to be viciously flogged. bugzilla bugzilla is where developers can report bugs in the mozilla source releases, and browse an online database of already-reported bugs. doctor doctor is a web interface to cvs. it lets developers and others edit pages on the mozilla.org w...
Are We Slim Yet
al years tracked memory usage across builds on the (now defunct) website areweslimyet.com. it used the same infrastructure as about:memory to measure memory usage on a predefined snapshot of alexa top 100 pages known as tp5. since firefox transitioned to using multiple processes by default, we moved awsy into the taskcluster infrastructure. this allowed us to run measurements on all branches and platforms. the results are posted to perfherder where we can track regressions automatically. as new processes are added to firefox we want to make sure their memory usage is also tracked by awsy. to this end we request that memory reporting be integrated into any new process before it is enabled on nightly. ...
Build Metrics
build system and tracked by perfherder. num_constructors number of static constructors found by the compiler in the firefox c++ codebase. lower is better. static constructors are undesirable because their initialization imposes an unavoidable time penalty every time firefox is started. installer size size in bytes of the firefox installer. lower is better here, especially on space-restricted platforms like android. build times amount of time it takes to build firefox in automation on a specific platform / configuration. lower is better. compiler warnings number of compiler warnings detected during a build. lower is better. due to the way the build system works, compiler warnings are not consistently detected. so the value may fluctuate from build to build even if the number of compiler wa...
BloatView
those configurations are located in testing/mozharness/configs/. the most likely configs you'll want to modify are listed below: linux: unittests/linux_unittest.py mac: unittests/mac_unittest.py windows: unittests/win_unittest.py android: android/androidarm_4_3.py how to instrument your objects for bloatview first, if your object is an xpcom object and you use the...
DMD
. you can analyze these files (either gzipped or not) using dmd.py. on nightly firefox, dmd.py is included in the distribution. for instance on os x, it is located in the directory /applications/firefox nightly.app/contents/resources/. for nightly, symbolication will fail, but you can at least get some information. in a local build, dmd.py will be located in the directory $objdir/dist/bin/. some platforms (linux, mac, android) require stack fixing, which adds missing filename, function name and line number information. this will occur automatically the first time you run dmd.py on the output file. this can take 10s of seconds or more to complete. (this will fail if your build does not contain symbols. however, if you have crash reporter symbols for your build -- as tryserver builds do -- you can u...
JS::PerfMeasurement
igrations .cpu_migrations migrations of the profiled thread from one cpu core to another these events map directly to "generic events" in the linux 2.6.31+ <linux/perf_event.h> interface, and so unfortunately are a little vague in their specification; for instance, we can't tell you exactly which level of cache you get misses for if you measure cache_misses. we also can't guarantee that all platforms will support all event types, once we have more than one back end for this interface. here is the complete c++-level api: perfmeasurement::eventmask this is an enumeration defining all of the bit mask values in the above table. you bitwise-or the ones you want together and pass them to the constructor. perfmeasurement::all in a constructor call, this special value means "measure everything that...
Memory reporting
how big it is (via moz_malloc_usable_size). all this is probably not what you'd expect, but the above functions have the following crucial features. they let you measure the mystring object itself or not as necessary. this is important because sometimes an object might be embedded in another object that is measured separately. and the names make it clear exactly what is being measured. on platforms that allow it, they count the actual memory in use, including "slop" bytes caused by the heap allocator rounding up request sizes (a.k.a. internal fragmentation). if slop bytes aren't measured they'll end up in about:memory's heap-unclassified entry, which is bad. the size is not computed analytically. for example, sizeof doesn't appear anywhere. this is a good thing, because computing sizes ana...
TraceMalloc
ry allocation that has not been deallocated by shutdown. some of these are false positives, allocations that are truly needed until shutdown. ideally, these would be freed explicitly, to make it easier to find real leaks using the shutdown log. here is a how-to for analyzing the shutdown log, taken from the tinderbox leak builds. this example is for macos; small modifications are needed for other platforms. # run application with shutdown logging # note: tinderbox leak tests use: python leaktest.py -- --trace-malloc malloc.log --shutdown-leaks=sdleak.log # note 2: it appears that the shutdown log is not recorded if --trace-malloc is given the - argument. build/dist/minefield.app/contents/macos/firefox --trace-malloc /dev/null --shutdown-leaks=sdleak.log # convert raw log to text representation of c...
about:memory
274.99 mb ── resident 251.47 mb ── resident-unique 1,103.64 mb ── vsize some measurements of note are as follows. "resident". physical memory usage. if you want a single measurement to summarize memory usage, this is probably the best one. "vsize". virtual memory usage. this is often much higher than any other measurement (particularly on mac). it only really matters on 32-bit platforms such as win32. there is also "vsize-max-contiguous" (not measured on all platforms, and not shown in this example), which indicates the largest single chunk of available virtual address space. if this number is low, it's likely that memory allocations will fail due to lack of virtual address space quite soon. various graphics-related measurements ("gfx-*"). the measurements taken vary between pl...
A guide to searching crash reports
on", we get search results with two facet tabs. the first of these is a "platform facet" tab, with results like those shown in the following screenshot. this has the same columns as the "signature facet" tab we saw earlier, except for the "bugs" column, because that is a special column that only applies to the signature facet. this tab shows the distribution of crash reports across the various platforms. crash reports always include a platform field (though it may be empty if something has gone wrong) and so the percentages add up to 100. grouping by "moz crash reason" the second facet tab is a "moz crash reason facet" tab, with results like those shown in the following screenshot. this immediately shows which moz_crash calls are being hit frequently by users. only a subset of crash reports...
NSPR Contributor Guide
re nspr library, for example: libnspr4.dll nspr is mostly complete. new apis are driven mostly by the os vendors as they add new features. should you decide that there's something that nspr does not cover that should be covered, let's talk. your proposed api should encapsulate a relatively low level capability as would be found in a system call or libc. your new feature must be implemented on all platforms supported by nspr. when you consider a new api for nspr ask yourself if your proposed feature can implement it across all platforms supported by nspr. if several platforms cannot be made to implement your api, then it is not a good candidate for inclusion in nspr. before you begin what may be a substantial effort in making a candidate feature for nspr, talk to us. we may tell you that you have a ...
Anonymous Shared Memory
mory, as in: the child process inherits the shared memory. compare the file-mapped anonymous shared memory to to a named shared memory described in prshm.h. the intent is to provide a shared memory that is accessbile only by parent and child processes. ... it's a security thing. depending on the underlying platform, the file-mapped shared memory may be backed by a file. ... surprise! ... on some platforms, no real file backs the shared memory. on platforms where the shared memory is backed by a file, the file's name in the filesystem is visible to other processes for only the duration of the creation of the file, hopefully a very short time. this restricts processes that do not inherit the shared memory from opening the file and reading or writing its contents. further, when all processes using an...
Atomic Operations
this chapter describes the global functions you use to perform atomic operations. the functions define a portable api that may be reliably used in any environment. since not all operating environments provide access to such functions, their performance may vary considerably. atomic operations functions the api defined for the atomic functions is consistent across all supported platforms. however, the implementation may vary greatly, and hence the performance. on systems that do not provide direct access to atomic operators, nspr emulates the capabilities by using its own locking mechanisms. for such systems, nspr performs atomic operations just as efficiently as the client could. therefore, to preserve portability, it is recommended that clients use the nspr api for atomic operations. these fun...
Dynamic Library Linking
mbolandlibrary returns, funcptr is the value of the function pointer you want to look up, and the variable lib references the main executable program. you can then call pr_findsymbol on lib to look up other symbols defined in the main program. remember to call pr_unloadlibrary(lib) to close the library handle when you are done. platform notes to use the dynamic library loading functions on some platforms, certain environment variables must be set at run time, and you may need to link your executable programs using special linker options. this section summarizes these platform idiosyncrasies. for more information, consult the man pages for ld and dlopen (or shl_load on hp-ux) for unix, and the loadlibrary documentation for win32. dynamic library search path exporting symbols from the main exe...
IPC Semaphores
this chapter describes the nspr api for using interprocess communication semaphores. nspr provides an interprocess communication mechanism using a counting semaphore model similar to that which is provided in unix and windows platforms. note: see also named shared memory ipc semaphore functions ipc semaphore functions pr_opensemaphore pr_waitsemaphore pr_postsemaphore pr_closesemaphore pr_deletesemaphore ...
Long Long (64-bit) Integers
her the compiler for the target platform supports 64-bit integers. for a specific target platform, if 64-bit integers are supported for that platform, define have_long_long at compile time. 64-bit integer types nspr provides two types to represent 64-bit integers: print64 pruint64 64-bit integer functions the api defined for the 64-bit integer functions is consistent across all supported platforms. limits and initialization relational operators logical operators arithmetic operators shift operators conversion operators ...
PRHostEnt
many of the network address functions. all addresses are passed in host order and returned in network order (suitable for use in system calls). use the network address functions to manipulate the prhostent structure. to make the transition to ip version 6 easier, it's best to treat prhostent as an opaque structure. note winsock.h defines h_addrtype and h_length as a 16-bit field, whereas other platforms treat it as a 32-bit field. the #ifdef in the structure allows direct assignment of the prhostent structure. ...
PRInt16
guaranteed to be a signed 16-bit integer on all platforms. syntax #include <prtypes.h> typedefdefinition print16; ...
PRInt32
syntax #include <prtypes.h> typedefdefinition print32; description may be defined as an int or a long, depending on the platform. ...
PRInt64
syntax #include <prtypes.h> typedef definition print64; description may be defined in several different ways, depending on the platform. ...
PRInt8
guaranteed to be a signed 8-bit integer on all platforms. syntax #include <prtypes.h> typedef definition print8; ...
PRNetAddr
familiar berkeley socket interface, although this fact should not be relied upon. the raw member of the union is equivalent to struct sockaddr, the inet member is equivalent to struct sockaddr_in, and if the binary is built with ipv6 support, the ipv6 member is equivalent to struct sockaddr_in6. (note that prnetaddr does not have the length field that is present in struct sockaddr_in on some unix platforms.) the macros pr_af_inet, pr_af_inet6, pr_inaddr_any, pr_inaddr_loopback are defined if prio.h is included. pr_inaddr_any and pr_inaddr_loopback are special ipv4 addresses in host byte order, so they must be converted to network byte order before being assigned to the inet.ip field. ...
PRThreadPriority
of high urgency but short duration. pr_priority_urgent highest priority. only one thread at a time typically has this priority. pr_priority_last placeholder description in general, an nspr thread of higher priority has a statistically better chance of running relative to threads of lower priority. however, because of the multiple strategies nspr uses to implement threading on various host platforms, nspr priorities are not precisely defined. at best they are intended to specify a preference in the amount of cpu time that a higher-priority thread might expect relative to a lower-priority thread. this preference is still subject to resource availability and must not be used in place of proper synchronization. see also setting thread priorities. ...
PRUint16
guaranteed to be an unsigned 16-bit integer on all platforms. syntax #include <prtypes.h> typedefdefinition pruint16; ...
PRUint32
syntax #include <prtypes.h> typedefdefinition pruint32; description may be defined as an unsigned int or an unsigned long, depending on the platform. ...
PRUint64
syntax #include <prtypes.h> typedef definition pruint64; description may be defined in several different ways, depending on the platform. for syntax details for each platform, see prtypes.h. ...
PRUint8
there is no type equivalent to a plain char. ...
PR_Available
values: if the function completes successfully, it returns the number of bytes that are available for reading. for a normal file, these are the bytes beyond the current file pointer. if the function fails, it returns the value -1. the error code can then be retrieved via pr_geterror. description pr_available works on normal files and sockets. pr_available does not work with pipes on win32 platforms. see also if the number of bytes available for reading is out of the range of a 32-bit integer, use pr_available64. ...
PR_Available64
alues: if the function completes successfully, it returns the number of bytes that are available for reading. for a normal file, these are the bytes beyond the current file pointer. if the function fails, it returns the value -1. the error code can then be retrieved via pr_geterror. description pr_available64 works on normal files and sockets. pr_available does not work with pipes on win32 platforms. see also if the number of bytes available for reading is within the range of a 32-bit integer, use pr_available. ...
PR_EXTERN
totypes for functions or variables that are to be exported from a shared library. syntax #include <prtypes.h> pr_extern(type)prototype description pr_extern is used to define externally visible routines and globals. for syntax details for each platform, see prtypes.h. the macro includes the proper specifications to declare the target extern and set up other required linkages. warning: some platforms do not allow the use of the underscore character (_) as the first character of an exported symbol. ...
PR_IMPLEMENT
used to define implementations of symbols that are to be exported from a shared library. syntax #include <prtypes.h> pr_implement(type)implementation description pr_implement is used to define implementations of externally visible routines and globals. for syntax details for each platform, see prtypes.h. warning: some platforms do not allow the use of the underscore character (_) as the first character of an exported symbol. ...
PR_MkDir
printn mode); parameters the function has the following parameters: name the name of the directory to be created. all the path components up to but not including the leaf component must already exist. mode the access permission bits of the file mode of the new directory if the file is created when pr_create_file is on. caveat: the mode parameter is currently applicable only on unix platforms. it may be applicable to other platforms in the future. possible values include the following: 00400. read by owner. 00200. write by owner. 00100. search by owner. 00040. read by group. 00020. write by group. 00010. search by group. 00004. read by others. 00002. write by others. 00001. search by others. returns if successful, pr_success. if unsuccessful, pr_failure. the actu...
PR_Open
ysically updated. pr_excl 0x80 with pr_create_file, if the file does not exist, the file is created. if the file already exists, no action and null is returned. mode when pr_create_file flag is set and the file is created, these flags define the access permission bits of the newly created file. this feature is currently only applicable on unix platforms. it is ignored by any other platform but it may apply to other platforms in the future. possible values of the mode parameter are listed in the table below. name value description pr_irwxu 0700 read, write, execute/search by owner. pr_irusr 0400 read permission, owner. pr_iwusr 0200 write permission, owner. ...
PR_OpenAnonFileMap
rfilemapprotect prot ); parameters the function has the following parameters: dirname a pointer to a directory name that will contain the anonymous file. size the size of the shared memory. prot how the shared memory is mapped. returns pointer to prfilemap or null on error. description if the shared memory already exists, a handle is returned to that shared memory object. on unix platforms, pr_openanonfilemap uses dirname as a directory name, without the trailing '/', to contain the anonymous file. a filename is generated for the name. on windows platforms, dirname is ignored. ...
PR_ReadDir
en directory. flags specifies which directory entries, if any, to skip. values can include the following: pr_skip_none. do not skip any files. pr_skip_dot. skip the directory entry "." representing the current directory. pr_skip_dot_dot. skip the directory entry ".." representing the parent directory. pr_skip_both. skip both "." and ".." pr_skip_hidden. skip hidden files. on windows platforms and the mac os, this value identifies files with the "hidden" attribute set. on unix platform, this value identifies files whose names begin with a period ("."). returns a pointer to the next entry in the directory. if the end of the directory is reached or an error occurs, null. the reason can be retrieved via pr_geterror. description pr_readdir returns a pointer to a directory entr...
Building NSS
please read these instructions carefully before attempting to build. build environment nss needs a c and c++ compiler. it has minimal dependencies, including only standard c and c++ libraries, plus zlib. for building, you also need make. ideally, also install gyp and ninja and put them on your path. this is recommended, as the build is faster and more reliable. ...
Build instructions for JSS 4.3.x
ready to build jss. follow these steps: switch to the appropriate directory and check out jss from the root of your source tree. cvs co -r jss_4_3_1_rtm mozilla/security/jss or cvs co -r jss_4_3_rtm mozilla/security/jss setup environment variables needed for compiling java source. the java_home variable indicates the directory containing your java sdk installation. note, on windows platforms it is best to have java_home set to a directory path that doest not have spaces. unix setenv java_home /usr/local/jdk1.5.0 (or wherever your jdk is installed) windows set java_home=c:\programs\jdk1.5.0 (or wherever your jdk is installed) windows (cygnus) java_home=/cygdrive/c/programs/jdk1.5.0 (or wherever your jdk is installed) export java_home windows build c...
Using JSS
Mozilla › Projects › NSS › JSS › Using JSS
rypto, pkcs #11, and utilities http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases ssl3 nss ssl library smime3 nss s/mime functions and types nssckbi pkcs #11 module containing built-in root ca certificates. optional. freebl_* processor-specific optimized big-number arithmetic library. not present on all platforms. more information... fort fortezza support. optional swft pkcs #11 module implementing fortezza in software. optional. if you built jss from source, you have these libraries in the mozilla/dist/<platform>/lib directory of your build tree. if you are downloading binaries, get them from the binary release locations in the above table. you need ...
NSS 3.12.9 release notes
bug 536485: crash during ssl handshake in [@ intel_aes_decrypt_cbc_256] bug 444367: nss 3.12 softoken returns the certificate type of a certificate object as ckc_x_509_attr_cert. bug 620908: certutil -t -d "sql:." dumps core bug 584257: need a way to expand partial private keys. bug 596798: win_rand.c (among others) us...
NSS_3.12_release_notes.html
data pointed by certvaloutparam array in case of error bug 426450: pkix_pl_hashtable_remove leaks hashtable key object bug 429230: memory leak in pkix_checkcert function bug 392696: fix copyright boilerplate in all new pkix code bug 300928: integrate libpkix to nss bug 303457: extensions newly supported in libpkix must be marked supported bug 331096: nss softoken must detect forks on all unix-ish platforms bug 390710: certnameconstraintstemplate is incorrect bug 416928: der decode error on this policy extension bug 375019: cache-enable pkix_ocspchecker_check bug 391454: libpkix does not honor nss's override trust flags bug 403682: cert_pkixverifycert never succeeds bug 324744: add generation of policy extensions to certutil bug 390973: add long option names to secu_parsecommandline bug 161326: need...
NSS 3.14.2 release notes
tel. if compiled on linux systems in 64-bit mode, nss will include runtime detection to check if the platform supports aes-ni and pclmulqdq. if so, nss uses the optimized code path, reducing the cpu cycles per byte to 1/20 of what was required before the patch (https://bugzilla.mozilla.org/show_bug.cgi?id=805604 and https://crypto.stanford.edu/realworldcrypto/slides/gueron.pdf). support for other platforms, such as windows, will follow in a future nss release. (https://bugzilla.mozilla.org/show_bug.cgi?id=540986) sqlite has been updated to 3.7.15. note: please apply the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=837799 if you build nss with the system sqlite library and your system sqlite library is older than 3.7.15. bug 816853 - when using libpkix for certificate validation, applic...
NSS 3.24 release notes
leading value for certificates that might be used for signing rather than key exchange. update sslauthtype to define a larger number of authentication key types. deprecate the member attribute authalgorithm of type sslciphersuiteinfo. instead, applications should use the newly added attribute authtype. rename ssl_auth_rsa to ssl_auth_rsa_decrypt. add a shared library (libfreeblpriv3) on linux platforms that define freebl_lowhash. remove most code related to ssl v2, including the ability to actively send a sslv2-compatible client hello. however, the server-side implementation of the ssl/tls protocol still supports processing of received v2-compatible client hello messages. disable (by default) nss support in optimized builds for logging ssl/tls key material to a logfile if the sslkeylogfile en...
NSS 3.36.6 release notes
tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_36_6_rtm/src/ new in nss 3.36.6 new functionality no new functionality is introduced in this release. this is a patch release to fix cve-2018-12404 bugs fixed in nss 3.36.6 bug 1485864 - cache side-channel variant of the bleichenbacher attack (cve-2018-12404) bug 1389967 and bug 1448748 - fixes for mingw on x64 platforms. compatibility nss 3.36.6 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.36.6 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis to the functions listed in nss public functions will remain compatible with future versions of ...
NSS 3.37.3 release notes
.37.3 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/security/nss/releases/nss_3_37_3_rtm/src/ new in nss 3.37.3 new functionality no new functionality is introduced in this release. this is a patch release to fix regression bugs. bugs fixed in nss 3.37.3 bug 1459739 - fix build on armv6/armv7 and other platforms. bug 1461731 - fix crash on macos related to authentication tokens, e.g. pk11or webauthn. compatibility nss 3.37.3 shared libraries are backward compatible with all older nss 3.x shared libraries. a program linked with older nss 3.x shared libraries will work with nss 3.37.3 shared libraries without recompiling or relinking. furthermore, applications that restrict their use of nss apis...
NSS 3.55 release notes
curity group (nisec) at tampere university. pk11_findcertinslot is added. with this function, a given slot can be queried with a der-encoded certificate, providing performance and usability improvements over other mechanisms. see bug 1649633 for more details. dtls 1.3 implementation is updated to draft-38. see bug 1647752 for details. nspr dependency updated to 4.27. known issues on some platforms, using the makefile builds fails to locate seccomon.h; ensure you are using make all rather than just make. another potential workaround is to use the gyp-based build.sh script. if this affects you, please help us narrow down the cause in bug 1653975. bugs fixed in nss 3.55 bug 1631583 (cve-2020-6829, cve-2020-12400) - replace p384 and p521 with new, verifiable implementations from fiat-cry...
nss tech note6
chk/softokn3.chk. the following applies to nss 3.8 through 3.10 : on 32-bit solaris sparc (i.e., not x86, and not 64-bit sparc) and 32-bit hp-ux pa-risc (i.e., not itanium, and not 64-bit pa-risc), there are two more .chk files: libfreebl_pure32_3.chk and libfreebl_hybrid_3.chk. the following applies to nss 3.11 : the low-level freebl cryptographic code has been separated from softoken on all platforms. even on platforms for which there is only one implementation of freebl, there is now a separate freebl shared library. the freebl library implements a private interface internal to nss. on 32-bit windows and 32-bit os/2, this shared library is called freebl3.dll, and the corresponding .chk file is called freebl3.chk . on 32-bit solaris x86, 64-bit solaris x64 (amd64), 32-bit linux x86, 64-bit l...
Overview of NSS
server products from oracle (formerly sun java enterprise system), including oracle communications messaging server and oracle directory server enterprise edition. suse linux enterprise server supports nss and the mod_nss ssl module for the apache web server. nss includes a framework to which developers and oems can contribute patches, such as assembler code, to optimize performance on their platforms. nss 3.x has been certified on 18 platforms. for more detailed information about nss, see wiki.mozilla.org and nss faq. source code for a java interface to nss is available in the mozilla cvs tree. for details, see network security services for java. nss makes use of netscape portable runtime (nspr), a platform-neutral open-source api for system functions designed to facilitate cross-platform ...
PKCS11 FAQ
Mozilla › Projects › NSS › PKCS11 › FAQ
ection is based on where the key involved is currently stored. if the token that has your private keys doesn't also do symmetric operations, for example, it's likely that the internal token will end up doing the symmetric operations. is the pkcs #11 module supplied with nss accessible through a shared library? yes, the token is call softokn3 (softokn3.dll on windows, libsoftokn3.so on most unix platforms). the nss softokn3 is not a complete pkcs #11 module, it was implemented only to support nss, though other products have managed to get it to work in their environment. there are a number of bugs against softoken's non-compliance, but these bugs have lower priority than fixing nss's non-complient uses of pkcs #11 or adding new features to nss. if multiple pkcs #11 modules are loaded, how does ns...
Installation guide
7 extra_shared_libs += -wl,-rpath,'$$origin/../lib' 58 endif 59 endif for example, if you install certutil in /foo/bar/nss/bin and the .so's in /foo/bar/nss/lib, then you only need to add /foo/bar/nss/bin to your path; you don't need to set ld_library_path. the libraries you need to install are listed below. nspr: libnspr4.so libplds4.so libplc4.so nss: (note the use of * for libfreebl -- some platforms have multiple ones) libfreebl*3.so libfreebl*3.chk libsoftokn3.so libsoftokn3.chk libnss3.so libsmime3.so libssl3.so libnssckbi.so ...
modutil-tasks.html
nss security tools: modutil tasks newsgroup: mozilla.dev.tech.crypto task list the jar installation script is very fragile with respect to platform definitions (especially version numbers). a fix was made for "hpux b.11.00," but issues may still arise for platforms like "linux 2.2.12-20." documentation needs to be explicit about the use of fo ...
NSS_3.12.3_release_notes.html
bug 464406: fix signtool regressions bug 465270: uninitialised value in ...
NSS Tools certutil
targeted instead. the key and certificate management process generally begins with creating keys in the key database, then generating and managing certificates in the certificate database. this document discusses certificate and key database management. for information security module database management, see using the security module database tool. availability see the release notes for the platforms this tool is available on. syntax to run the certificate database tool, type the command certutil option [arguments ] where options and arguments are combinations of the options and arguments listed in the following section. each command takes one option. each option may take zero or more arguments. to see a usage string, issue the command without options, or with the -h option. options and ...
NSS Tools crlutil
tabase(see certutil tool) and continues with certificates expiration or revocation. this document discusses certificate revocation list management. for information on security module database management, see using the security module database tool. for information on certificate and key database management, see using the certificate database tool. availability see the release notes for the platforms this tool is available on. syntax to run the certificate revocation list management tool, type the command crlutil option [arguments] where options and arguments are combinations of the options and arguments listed in the following section. each command takes one option. each option may take zero or more arguments. to see a usage string, issue the command without options, or with the -h ...
NSS Tools modutil-tasks
nss security tools: modutil tasks newsgroup: mozilla.dev.tech.crypto task list the jar installation script is very fragile with respect to platform definitions (especially version numbers). a fix was made for "hpux b.11.00," but issues may still arise for platforms like "linux 2.2.12-20." documentation needs to be explicit about the use of fo ...
NSS Tools pk12util
oup: mozilla.dev.tech.crypto the pkcs #12 utility makes sharing of certificates among enterprise server 3.x and any server (netscape products or non-netscape products) that supports pkcs#12 possible. the tool allows you to import certificates and keys from pkcs #12 files into nss or export them and also list certificates and keys in such files. availability see the release notes for the platforms this tool is available on. synopsis pk12util -i p12file [-h tokenname] [-v] [common-options] or pk12util -o p12file -n certname [-c keycipher] [-c certcipher] [-m | --key_len keylen] [-n | --cert_key_len certkeylen] [common-options] or pk12util -l p12file [-h tokenname] [-r] [common-options] where [common-options] = [-d dir] [-p dbprefix] [-k slotpasswordfile | -k slotpassword] [-w p12f...
Network Security Services
introduction to ssl introduces the ssl protocol, including information about cryptographic ciphers supported by ssl and the steps involved in the ssl handshake. getting started nss releases this page contains information about the current and past releases of nss. get the source code and build it instructions on how to build nss on the different supported platforms. nss apis introduction to network security services provides an overview of the nss libraries and what you need to know to use them. nss ssl public functions summarizes the ssl apis exported by the nss shared libraries. nss ssl reference api used to invoke ssl operations. nss api guidelines explains how the libraries and code are organized, ...
The Necko HTTP module
tly asked questions. caching faq this document gives an overview of how http caching is implemented in necko. it answers some of the common questions concerning what is cached and for how long. http cache (v2) describes in detail the api and the implementation details of the content (http, but not only) cache. http logging this document describes how to enable http logging for various platforms. original document information last updated date: may 12, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details ...
Multithreading in Necko
write to a nsioutputstream) on a background thread. the implementation of the stream should be blocking; however, there is limited support for non-blocking streams. cached page loads, file url loads, and jar url loads all utilize the file transport service. the jar protocol handler, for rexample, passes a special nsiinputstream impl that does gzip decoding on the fly. dns thread (0-1) on most platforms dns requests a processed on a background thread. however, the details of the implementation are heavily platform dependent. for example, on xp_win an invisible window is created with a message pump on a background thread for processing wsa asynchronous dns events. in this way, necko takes advantage of the platforms specific routines for dns lookups. the default implementation does not spawn a wor...
Rebranding SpiderMonkey (1.8.5)
g_file: $(pkg_config_files) those two lines should be modified to read back: install:: $brand.pc @echo pkg_config_file: $brand.pc note: while it is possible to automate the manual editing process, this has been discouraged due to the fact that these files are automatically generated and very little constant data can be depended upon. it also allows these instructions to apply to a wide range platforms without introducing more software dependencies. save the file and exit the editor. you may now perform the build and installation of your custom branded spidermonkey library: make note: depending on your system you may need administrative rights to perform the installation: make install the following information isn't technically needed for using your library but it will help other applications...
Creating JavaScript tests
test the performance of engine features in the test suite. please keep in mind that the javascript test suite is run on a wide variety of wildly varying hardware plaforms, from phones all the way up to servers. even tests that check for polynomial time complexity will start to fail in a few years when they have sped up enough to run faster than the granularity of the os scheduler or when run on platforms with higher latencies than your development workstation. these tests will also show up as infrequent oranges on our heavily loaded test machines, lowering the value of our test suite for everyone. just don't do it, it's never worth it. do not add performance tests to the test suite. it is not generally even possible to tell if the speed of any particular feature is going to be important in the ...
FOSS
getting started here. ...
Getting SpiderMonkey source code
getting the latest spidermonkey source code from mercurial the mercurial repository at https://hg.mozilla.org/mozilla-central/ hosts the latest spidermonkey sources. mercurial is also known as hg. the following command line downloads the entire mozilla repository, including the full change history and a lot of ...
Garbage collection
ap (chunkbitmap), a bitmap of decommitted arenas, and a chunk header (chunkinfo). the chunkinfo contains a list of unallocated arenas, starting at chunkinfo::freearenashead and linked through arenaheader::next. the chunkinfo also contains some basic stats, such as the number of free arenas. arena an arena is an internal unit of memory allocation. an arena is one page (4096 bytes on almost all platforms) and contains an arenaheader, a few pad bytes, and then an array of aligned elements. all elements in an arena have the same allocation kind and size. every arena maintains a list of free spans, starting at arenaheader::firstfreespanoffets. the last cell in each free span (except the last one) holds a freespan for the next free span. free span struct freespan represents a contiguous sequence o...
jsdouble
c floating-point number type. it is defined to be a 64-bit, ieee 754 compliant type. see ecma 262-3 §8.5. arithmetic on jsdouble values in c should behave exactly like the floating-point arithmetic in javascript, except that c and javascript may treat not-a-number values differently. implementation note: spidermonkey has had several bugs involving details of floating-point arithmetic on various platforms. controlling the behavior of floating-point arithmetic is very architecture- and system-specific, and can be hard to get right. help in the form of test cases, commentary, and patches is always appreciated. ...
Profiling SpiderMonkey
produces its own shared library, even in libxul and static builds. make -c my-obj-dir/js/src other ways to profile for linux, there are global jprof functions available. see the documentation on the --enable-jprof mozconfig option. we're working to add support for other profilers, such as oprofile, intel vtune, and callgrind. when we have js scriptable profiling options available for all tier 1 platforms, we'll look at adding global start/stop profiling functions. if you'd like to profile something at a higher level of detail than the js shark functions allow, there are corresponding c functions available at the bottom of jsdbgapi.h. costs of thread safety currently, threadsafe spidermonkey costs us 10-15% on some benchmarks vs. a non-threadsafe js shell. if you're looking to investigate that, bu...
Shell global objects
ode and its cached content. the cache entry is filled and read by the evaluate function by using it in place of the source, and by setting savebytecode and loadbytecode options. printprofilerevents() register a callback with the profiler that prints javascript profiler events to stderr. callback is only registered if profiling is enabled. enablesinglestepprofiling() this function will fail on platforms that don't support single-step profiling (currently everything but arm-simulator). when enabled, at every instruction a backtrace will be recorded and stored in an array. adjacent duplicate backtraces are discarded. disablesinglestepprofiling() return the array of backtraces recorded by enablesinglestepprofiling. enablespsprofiling() enables sps instrumentation and corresponding assertions, w...
Web Replay
sted with the infrastructure. porting almost all implementation work so far has been on macos. windows port work is underway, but is not yet working. the difficulties are in figuring out the set of system library apis to intercept, in getting the memory management and dirty memory parts of the rewind infrastructure to work, and in handling the different graphics and ipc pathways on different platforms. comparison with other projects there is lots of existing work in this area. the closest projects are rr, webkit's replay project, and microsoft's time-travel debugger. compared to rr: this should work on all platforms and architectures supported by gecko, though with substantial port work required. this will be part of gecko itself, rather than a separate tool, which means both that deve...
Secure Development Guidelines
ons create wrappers or replacements for standard functions with a bad design libc function name reason to ban it strcpy, strcat, gets, sprintf, vsprintf no bounds checking. strncpy does not guarantee \0 termination. strncat confusing size argument; can write 1 byte beyond the size. snprintf, vsnprintf return value differs on various platforms. alloca never use this. calling alloca() with a user-controlled size == game over. use malloc() instead. using the mozilla api use c++ strings so c strings are possible mozilla c safe string handling apis similar to libc str*cpy and str*cat some are potentially dangerous function name comments pl_strcpy, pl_strcat these functions don't verify whe...
Handling Mozilla Security Bugs
aphically-based or otherwise) to mozilla, although obviously many of the same people will be involved in both sets of activities. background security vulnerabilities are different from other bugs, because their consequences are potentially so severe: users' private information (including financial information) could be exposed, users' data could be destroyed, and users' systems could be used as platforms for attacks on other systems. thus people have strong feelings about how security-related bugs are handled, and in particular about the degree to which information about such bugs is publicly disclosed. the mozilla project is a public software development project, and thus we have an inherent bias towards openness. in particular, we understand and acknowledge the concerns of those who believe th...
Gecko Roles
cko. role constants are defined in the nsiaccessiblerole interface. role_nothing used when the accessible item doesn't have a strongly defined role. role_titlebar represents a title or caption bar for a window. used by msaa only, this is supported automatically by microsoft windows. role_menubar represents the menu bar (positioned beneath the title bar of a window on most platforms or at the top of the screen on mac os x) from which menus are selected by the user. role_scrollbar represents a vertical or horizontal scroll bar, which is part of the client area or used in a control. role_grip represents a special mouse pointer, which allows a user to manipulate user interface elements such as windows. for example, a user clicks and drags a sizing grip in the lo...
Accessibility API Implementation Details
se pages contain documentation on mozilla specific implementation details of assistive technology apis. at apis supportthis documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software. we provide for them the support of these products on windows, linux/unix and os x platforms.at developmentthe accessibility of computer software has seen drastic improvements over the past two decades. this article (from 2007) reviews the progress and technology as it has developed. xforms accessibilitythis article provides a quick guide to how accessibility is handled in gecko for xforms.xul accessibilitythis article shows how xul control elements are mapped to accessibility api. i...
XML Extras
the xml extras module contains several features that allow developers to treat xml as data i.e. not as just another document format. the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users. the xml extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds. feature status feature status xmlserializer available xmlhttprequest available domparser (string and stream input source) available web services with soap and wsdl no longer available from gecko 1.9/firefox 3. xml persistence fixptr and xpointer available since 1.4alpha in the core mozilla. moved to xml extras...
An Overview of XPCOM
erface feature of the nsisupports interface is for: it allows clients to find and access different interfaces based on their needs. in c++, you can use a fairly advanced feature known as a dynamic_cast<>, which throws an exception if the shape object is not able to be cast to a circle. but enabling exceptions and rtti may not be an option because of performance overhead and compatibility on many platforms, so xpcom does things differently. exceptions in xpcom c++ exceptions are not supported directly by xpcom. instead all exceptions must be handled within a given component, before crossing interface boundaries. in xpcom, all interface methods should return an nsresult error value (see the xpcom api reference for a listing of these error codes). these error code results become the "exceptions" t...
Starting WebLock
.. } if (buf) free(buf); the first line of the code calls queryinterface on thefile, and if that succeeds assigns the new interface pointer to localfile. if the queryinterface call fails, localfile will have a value of null. note that the out parameter of the method getfilesize is a 64-bit integer. the type of this variable is print64, but this type is not represented as a primitive on all platforms. on some platforms, print64 is a struct with two fields - a high and a low 32-bit integer. so operations on this type must use special macros that do the right thing on each platform. on windows or linux, for example, it is possible to multiply a print64 by a long like this: print64 x = 1, y = 2; y = x * 2; however, this same snippet will not compile on a platform like macintosh os 9, where yo...
Mozilla internal string guide
erals, converting implicitly to const nsstring& the benefits of the user-defined literals may seem unclear, given that nsdependentcstring will also wrap a string value in an nscstring. the advantage of the user-defined literals is that the length of these strings is calculated at compile time, so the string does not need to be scanned at runtime to determine its length. nowadays, all supported platforms have 16-bit literals using u""_ns, so we longer need to rely on macros for portability. // call init(const char16_t*) - bad signature, will need to do runtime length calculation inside init(l"start value"); // bad - l"..." is not portable! init(ns_convertasciitoutf16("start value").get()); // bad - runtime ascii->utf-16 conversion! init(u"start value"); // less bad, portable and no runtime conve...
Index
Mozilla › Tech › XPCOM › Index
ork in both firefox 2 and firefox 3, even if the interfaces have changed in the interim. 92 working with out parameters add-ons, extensions, xpcom:language bindings, xpconnect no summary! 93 xpcom abi xpcom xpcom abi is the binary interface of xpcom components. while xpcom components written in a scripting language (such as javascript) can be moved across platforms (such as windows and os x) without adaptation, those written in a compiled language (such as c++) require recompilation when moving to a different platform. often, compiled xpcom components are called 'binary' or 'native'. 94 xpcom thread synchronization thread_synchronization, threads, xpcom xpcom thread synchronization primitives have the same semantics as those in nspr, an...
Components.utils.import
such as jslint which reports compiler errors for the above, components.utils["import"](url [, scope]); parameters url a string of the url of the script to be loaded. the url must point to a file on the disk, possibly in a jar. scope an optional object to import onto; if omitted, the global object is used. under boot2gecko, the scope is not optional. if your code is meant to work on all platforms, you should always provide a scope. in case of doubt, this is generally a good scope. return value the module's global object. use of the return value is discouraged since it grants access to the module's internal properties which are not part of its public api. import throws if it encounters an error (like a syntax error) in the file it reads. example components.utils.import("resource...
nsIAlertsService
al a name for the notification; this is not displayed in the alert. however, certain notification systems (such as growl on mac os x) allow the user to disable alerts by name. this name is used in that configuration panel. on android the name is hashed and used as a notification id. dir optional bidi override for the title. valid values are "auto", "ltr" or "rtl". only available on supported platforms. lang optional language of title and text of the alert. only available on supported platforms. data optional the value of the cookie parameter passed to showalertnotification. principal optional the principal of the page that created the alert. used for ipc security checks, and to determine whether the alert is actionable. inprivatebrowsing optional controls the image loading behavior. i...
nsIBinaryInputStream
idlscriptable this interface allows consumption of primitive data types from a "binary stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutputstream. this might be used, for example, to implement network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms. inherits from: nsiinputstream last changed in gecko 1.7 method overview pruint8 read8(); pruint16 read16(); pruint32 read32(); pruint64 read64(); unsigned long readarraybuffer(in pruint32 alength, in jsval aarraybuffer); prbool readboolean(); void readbytearray(in pruint32 alength, [array, size_is(alength), retval] out pruint8 ...
nsIBinaryOutputStream
naryoutputstream.idlscriptable this interface allows writing of primitive data types (integers, floating-point values, booleans, and so on.) to a stream in a binary, untagged, fixed-endianness format. this might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms. output is written in big-endian order (high-order byte first), as this is traditional network order. inherits from: nsioutputstream last changed in gecko 1.7 method overview void setoutputstream(in nsioutputstream aoutputstream); void write8(in pruint8 abyte); void write16(in pruint16 a16); void write32(in pruint32 a32); void write64(in pruint64 a64); void writeboolean(in prboo...
nsIClipboard
ties the clipboard and notifies the clipboard owner. it empties the "logical" clipboard. it does not clear the native clipboard. void emptyclipboard( in long awhichclipboard ); parameters awhichclipboard specifies the clipboard to which this operation applies. forcedatatoclipboard() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) some platforms support deferred notification for putting data on the clipboard this method forces the data onto the clipboard in its various formats this may be used if the application going away. void forcedatatoclipboard( in long awhichclipboard ); parameters awhichclipboard specifies the clipboard to which this operation applies. getdata() this method retrieves data from the clipboard into a tran...
nsIDOMXULLabeledControlElement
ment last changed in gecko 1.7 attributes attribute type description accesskey domstring this should be set to a character that is used as a shortcut key. this should be one of the characters that appears in the label for the element. when the user presses the appropriate modifier and the access key, the element will be focused and/or activated from anywhere in the window. on non-macintosh platforms, the character on the element's label matching the access key is underlined. note: the access key is copied to any associated label element. command domstring this property reflects the element's command attribute. crop domstring this property reflects the element's crop attribute. image domstring this property reflects the element's image attribute. label domstring this property reflects...
nsIDebug
ng aline); methods abort() requests the process to trigger a fatal abort. void abort( in string afile, in long aline ); parameters afile file containing abort request. aline line number of abort request. assertion() shows an assertion and triggers optional behavior based on the xpcom_debug_break environment variable, defaulting to calling break() on windows and os/2 and warning on other platforms. void assertion( in string astr, in string aexpr, in string afile, in long aline ); parameters astr assertion message. aexpr expression that failed. afile file containing assertion. aline line number of assertion. break() requests the software break into a debugger. if no debugger is running then this usually results in a program crash. however, on windows a dialog is first presented g...
getFile
rue, this lets the directory service cache results to improve the performance of directory lookups. if false, then the directory service will not cache the results of this method. symbolic names the list of symbolic names is subject to change, so be sure to take a look at the xpcom/io/nsdirectoryservicedefs.h file for the version of gecko you're working with for the latest list. available on all platforms these symbolic names are available on all platforms (although, of course, they may refer to different physical paths on the storage device). c constant string value notes ns_os_home_dir "home" ns_os_temp_dir "tmpd" ns_os_current_working_dir "curworkd" ns_os_desktop_dir "desk" otherwise same as home ns_os...
nsIEnvironment
value returns the value of the env variable. an empty string will be returned when the env variable does not exist or when the value itself is an empty string - please use exists() to probe whether the env variable exists or not. exists() check the existence of an environment variable. this method checks whether an environment variable is present in the environment or not. note: * for unix/linux platforms we follow the unix definition: an environment variable exists when getenv() returns a non-null value. an environment variable does not exist when getenv() returns null. for non-unix/linux platforms we have to fall back to a "portable" definition (which is incorrect for unix/linux!!!!) which simply checks whether the string returned by get() is empty or not. boolean exists( in astring aname...
nsIFilePicker
tion addtorecentdocs boolean if true, the file is added to the operating system's "recent documents" list (if the operating system has one; nothing happens if there is no such concept on the user's platform). this attribute has no effect if private browsing mode is in effect. defaultextension astring the extension for the type of files you want to work with. on some platforms, this is automatically appended to filenames the user enters, if required. specify it without a leading dot, for example "jpg". defaultstring astring the filename, including extension, that should be suggested to the user as a default. this should be set before calling open() or show(). exceptions thrown ns_error_failure if you try to read this attribute. ...
nsIFileProtocolHandler
dir( in nsifile file ); parameters file the nsifile to convert. return value corresponding url string. the resulting string may contain url-escaped characters. geturlspecfromfile() converts the nsifile to the corresponding url string. if the nsifile is a local file, then the result will be a file:// url string. the resulting string may contain url-escaped characters. note: under some platforms this is a lossy conversion. note: callers should use geturlspecfromactualfile() if possible, for performance reasons. autf8string geturlspecfromfile( in nsifile file ); parameters file the nsifile to convert. return value corresponding url string. the resulting string may contain url-escaped characters. newfileuri() this method constructs a new file uri. nsiuri newfileuri( in ns...
nsIMemoryReporterManager
ystem level ones not covered by memory reporters. this reporter is special-cased because it is interesting, and is moderately difficult to compute in javascript. -1 means unknown. read only. resident print64 gets the resident size (that is rss, physical memory used). this reporter is special-cased because it is interesting, is available on all platforms, and returns a meaningful result on all common platforms. -1 means unknown. read only. methods enumeratemultireporters() returns an enumerator for looking at the installed memory multi-reporters. nsisimpleenumerator enumeratemultireporters(); parameters none. return value an enumerator of nsimemorymultireporters that are currently registered. enumeratereporters() returns an enumerator ...
nsIPrintingPrompt
intprogressparams, out boolean notifyonopen); methods showpagesetup() shows the print progress dialog. void showpagesetup( in nsiprintsettings printsettings, in nsiobserver aobs ); parameters printsettings printsettings for page setup. aobs optional an observer to know if the contents of the print settings object has changed while the dialog is being shown. for example, some platforms may implement an "apply" button. showprintdialog() show the print dialog. void showprintdialog( in nsiwebbrowserprint webbrowserprint, in nsiprintsettings printsettings ); parameters webbrowserprint represents the document to be printed. printsettings printsettings for print "job". showprogress() shows the print progress dialog. void showprogress( in nsiwebbrowserprint webbr...
nsIProcess
th blocking disabled. read only. location nsifile the location of the executable file on disk. read only. gecko 1.9.1 note this attribute is no longer implemented as of gecko 1.9.1, and is removed entirely in gecko 1.9.2. pid unsigned long the process id of the process. this value is only available after the process has started; in addition, some platforms may not offer this value at all. read only. processname string the name of the process. read only. gecko 1.9.1 note this attribute is no longer implemented as of gecko 1.9.1, and is removed entirely in gecko 1.9.2. processsignature unsigned long the process signature. read only. gecko 1.9.1 note this attribute is no longer implement...
nsIScreen
long the screen's color depth; this is the number of bits used to represent a color. read only. pixeldepth long the screen's pixel depth; this is the number of bits used to represent a pixel. read only. rotation unsigned long the screen's current rotation; you may set this to any of the values listed in screen rotation constants. this will only have an effect on platforms that support screen rotation. gecko 1.9.2 note starting in gecko 1.9.2, gecko running on microsoft windows reports 24 bits per pixel instead of 32 bits per pixel on 8-bits per color component displays, since this is typically what the caller is actually looking for. constants screen brightness constants constant value description brightness_dim 0 the scr...
nsIXULRuntime
only. widgettoolkit autf8string a string tag identifying the target widget toolkit in use. this is taken from the moz_widget_toolkit configure variable. read only. xpcomabi autf8string a string tag identifying the binary abi of the current processor and compiler vtable. this is taken from the target_xpcom_abi configure variable. it may not be available on all platforms, especially unusual processor or compiler combinations. the result takes the form <processor>-<compilerabi>, for example: x86-msvc ppc-gcc3. this value should almost always be used in combination with os. may throw ns_error_not_available. read only. constants process type constants constant value description process_type_default 0 the defau...
nsIXULWindow
down the road any other object that supports being a docshelltreeitem query accordingly to determine the capabilities. read only. xulbrowserwindow nsixulbrowserwindow provides access to the xulbrowserwindow object offering a way for the browser to update the user interface of the enclosing xul window. zlevel unsigned long one of the z level constants below. on some platforms, windows with a higher zlevel will be kept above windows with a lower zlevel. constants constant value description lowestz 0 loweredz 4 the z level of an independent window opened with the "alwayslowered" chrome flag. normalz 5 the default z level of an independent window. raisedz 6 the z level of an independent ...
Performance
isit in this example, you can see that it is not using an index, so this query would be slow. you can download the command line tool from the sqlite download page. be sure you have a version of the command line tool that is at least as recent as what mozilla uses. as of april 10, 2006, mozilla uses sqlite 3.3.4, but the latest precompiled version of the command line tools is not available for all platforms. this will lead to errors that say "database is encrypted" because the tool is not able to recognize the file format. you may want to check the sqlite_version definition in db/sqlite3/src/sqlite3.h for the current version if you are having problems. caching sqlite has a cache of database pages in memory. it keeps pages associated with the current transaction so it can roll them back, and it also ...
Storage
a statement. mozistoragestatementwrapper storage statement wrapper mozistorageservice storage service storage:performance how to get your database connection performing well. storage inspector extension makes it easy to view any sqlite database files in the current profile. sqlite syntax query language understood by sqlite sqlite database browser is a capable free tool available for many platforms. it can be handy for examining existing databases and testing sql statements. sqlite manager extension helps manage sqlite database files on your computer. ...
Using nsIDirectoryService
o need to tell the system of the location of dlls that are linked against. this aspect of file location is not related to nsidirectoryservice, but needs mention here. on the macintosh, these dlls are the shared libs in the "essential files" directory. you need to include an alias in your application that points to this directory and the resource id of this alias goes into your 'cfrg' resource. on platforms which use path environment variables, you will need to set one of these paths to the /bin directory. application level nsappdirectoryservicedefs.h the first group listed is for locations that are relative to the application: for instance, the name and location of the chrome folder, or the default location of user profiles. the nsidirectoryserviceprovider which normally provides these locations is...
XPCOM tasks
ant to transition the primary apis toward the standard. p2 our various enumerator classes should be made compatible with the enumerators from the standard c library, so that we can apply the standard algorithms to our containers. this is probably best done with a c wrapper around an xpcom enumerator. p2 do we still require our own version of quicksort? and if so, can we narrow it to only those platforms that need it? p3 we need to check for aggregation in createinstance(). see bug 16763 p3 improve the performance of the registry. explore the idea of using a separate registry. 5.1 if the build hierarchy were fixed, the registry could exploit expat and dbm. it could avoid implementing its own file format and io; and in many cases, possibly avoid calling into components for registration. in any ...
Xptcall Porting Status
de) <font color="white">done</font> bsd/os x86 bert driehuis <bert_driehuis@nl.compuware.com> unix (same as linux 86 code) bert contributed patches that *should* do the right thing for all the unixish-x86 versions of this code for gcc 2.7 or 2.8 vs. egcs 1.1. he notes that the vtbl scheme is different. he is hoping that others will help test the changes using these two compilers on the various platforms where this same code is used. bert's details <font color="white">done</font> mac ppc roger lawrence <rogerl@netscape.com>, patrick beard <beard@netscape.com> mac (passing tests and checked in) <font color="white">done</font> solaris sparc roger lawrence <rogerl@netscape.com>, chris mcafee <mcafee@netscape.com> unix this is checked in and working. <font color="white">done</font> solaris ...
XPCOM
if the interfaces have changed in the interim.working with out parameterswrappedjsobjectwrappedjsobject is a property sometimes available on xpconnect wrappers. when available, it lets you access the javascript object hidden by the wrapper.xpcom abixpcom abi is the binary interface of xpcom components. while xpcom components written in a scripting language (such as javascript) can be moved across platforms (such as windows and os x) without adaptation, those written in a compiled language (such as c++) require recompilation when moving to a different platform. often, compiled xpcom components are called 'binary' or 'native'.xpcom category image-sniffing-servicesin versions of firefox prior to firefox 3, extensions could add decoders for new image types. however, such decoders relied on servers send...
Mozilla technologies
d and viewed online using searchfox, a fast indexed search engine that runs on aws.xml extrasthe xml extras module contains several features that allow developers to treat xml as data i.e. not as just another document format. the module is structured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users. the xml extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds.xpcomxpcom is a cross platform component object model, similar to microsoft com. it has multiple language bindings, allowing xpcom components to be used and implemented in javascript, java, and python in addition to c++.xpidlxpidl is an interface description language used to specify xpcom interface classes.xray vi...
Standard OS Libraries
gtk+ the gtk+ toolkit can also be used. the list of the exposed symbols/functions can be found here: gnome developer :: gtk+ reference manual. example: ... // placeholder - example soon to come x11 x11 runs primarily on unix® and unix-like operating systems like linux, all of the bsd variants, sun solaris both native 32 and 64 bit support, solaris x86, mac os x (via darwin) as well as other platforms like os/2 and cygwin. there are updates that happen to x11; at the time of this writing, the latest version is 4.4.0. information on all releases can be found on its official page x11 resources. syntax and variable types are found on the documentation pages linked from this page. for example the documentation for v4.4.0 is seen here: x11 manual pages: section 3. example: xquerypointer get mouse...
js-ctypes reference
ese distinctions are crucial, and understanding them will alleviate much of the confusion surrounding js-ctypes. calling a type constructor will return a ctype. calling a ctype will return a cdata. you declare the arguments and return value of a native function with ctype objects. you call a native function with cdata objects. other features error-handling js-ctypes supports both errno (on all platforms) and getlasterror (on windows platforms). callbacks you can pass regular javascript functions as callbacks to native functions. see the callbacks page for details. 64-bit integer handling because javascript number objects can't directly represent every possible 64-bit integer value, js-ctypes provides new types for these. see int64 and uint64. ...
Mozilla
blic channels, the irc server was shut down. git moved here: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html hacking with bonsai bonsai was originally created to solve the problem of tree instability. the original navigator code base had large sections that were shared across multiple platforms. many times, code checked in would compile or run on a handful of platforms. also, with as many as 100 engineers, it was very difficult to determine what happened in the tree that caused the instability. bonsai was created to solve these problems. how mozilla determines mime types all data handling in mozilla is based on the mime type of ...
Version, UI, and Status Information - Plugins
his version support the windowless feature? */ if (netscape_minor < npvers_has_windowless) { /* plug-in is running in a version of the navigator */ /* that does not support windowless plug-ins. */ return false; } else /* plug-in is running in a navigator version */ /* that has windowless support */ return true; } detecting windowless support on other platforms browser implementations on other platforms did not have windowless plug-in support at the time it was added to ms windows and mac os x, so a different method must be used to detect whether the browser provides support. bool has_windowless() { npbool supportswindowless = false; nperror ret = npn_getvalue(instance, npnvsupportswindowless, &supportswindowless); return ret == nperr_no_er...
Gecko Plugin API Reference - Plugins
g custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and destruction initialization instance creation instance destruction shutdown initialize and shutdown example drawing and event handling the npwindow structure...
Accessibility Inspector - Firefox Developer Tools
ity-relevant attributes that are applied to the item. this can include style-related attributes such as margin-left and text-indent, and other useful states for accessibility information, such as draggable and level (e.g., what heading level is it, in the case of headings). for a full list of possible attributes, see gecko object attributes. note: the exposed information is the same across all platforms — the inspector exposes gecko's accessibility tree, rather than information from the platform accessibility layer. keyboard controls the accessibility tab is fully keyboard-accessible: you can tab between the turn off accessibility features button and left and right panels. when one of the panels is focused, you can move the focus up and down items using the up and down arrow keys, and u...
Introduction to DOM Inspector - Firefox Developer Tools
s to find the name and location of particular icon being used in the user interface, which is not an easy task otherwise. if you're inspecting a chrome document, as you select nodes in the dom nodes viewer, the rendered versions of those nodes are highlighted in the user interface itself. (note that there are bugs which prevent the flasher from dom inspector apis from working correctly on certain platforms.) if you inspect the main browser window, for example, and select nodes in the dom nodes viewer (other than the elements which have no visible ui as is the case with the endless list of script elements that are loaded into browser.xul), you will see the various parts of the browser interface being highlighted with a blinking red border. you can traverse the structure and go from the topmost part...
Element: click event - Web APIs
. usage notes the mouseevent object passed into the event handler for click has its detail property set to the number of times the target was clicked. in other words, detail will be 2 for a double-click, 3 for triple-click, and so forth. this counter resets after a short interval without any clicks occurring; the specifics of how long that interval is may vary from browser to browser and across platforms. the interval is also likely to be affected by user preferences; for example, accessibility options may extend this interval to make it easier to perform multiple clicks with adaptive interfaces. internet explorer internet explorer 8 & 9 suffer from a bug where elements with a computed background-color of transparent that are overlaid on top of other element(s) won't receive click events. any c...
Checking when a deadline is due - Web APIs
ovide a reasonable user experience on mobile devices, and to cut down on ambiguities, i decided to create an html form with: a text input for entering a title for your to-do list. this is the least avoidable bit of user typing. number inputs for the hour and minute parts of the deadline. on browsers that support type="number", you get a nice little up and down arrow number picker. on mobile platforms you tend to get a numeric keypad for entering data, which is helpful. on others you just get a standard text input, which is okay. <select> elements for inputting the day, month and year of the deadline. because these values are the most ambiguous for users to enter (7, sunday, sun? 04, 4, april, apr? 2013, '13, 13?), i decided the best solution was to give them a choice to pick from, which also...
KeyboardEvent: code values - Web APIs
the reason is that some browsers choose to interpret physical keys differently, there are some differences in which keys map to which codes. these tables show those variations when known. code values code values on windows this table shows the windows scan codes representing keys and the keyboardevent.code values which correspond to those hardware keys. only keys which generate scan codes on windows are listed. ...
NavigatorID.appVersion - Web APIs
rsion information about the browser. example alert('your browser version is reported as ' + navigator.appversion); notes the window.navigator.useragent property may also contain the version number (for example "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape 6/6.1"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties. the window.navigator.appversion, window.navigator.appname and window.navigator.useragent properties have been used in "browser sniffing" code: scripts that attempt to find out what kind of browser you are using and adjust pages accordingly. this lead to the current situation, where browsers had to ret...
Notification - Web APIs
constructor notification() creates a new instance of the notification object. properties static properties these properties are available only on the notification object itself. ...
NotificationAction - Web APIs
properties instance properties these properties are available only on instances of the notification object. ...
Notifications API - Web APIs
note: this feature is available in web workers. the notifications api allows web pages to control the display of system notifications to the end user. these are outside the top-level browsing context viewport, so therefore can be displayed even when the user has switched tabs or moved to a different app. the api is designed to be compatible with existing notification systems, across different platforms. concepts and usage on supported platforms, showing a system notification generally involves two things. first, the user needs to grant the current origin permission to display system notifications, which is generally done when the app or site initialises, using the notification.requestpermission() method. this should be done in response to a user gesture, such as clicking a button, for example...
Using the Payment Request API - Web APIs
this article is a guide to making use of the payment request api, with examples and suggested best practices. the basics of making a payment this section details the basics of using the payment request api to make a payment. note: the code snippets from this section are from our feature detect support demo. creating a new payment request object a payment request always starts with the creation of a new paymentrequest object — using the paymentrequest() constructor. ...
TransformStream - Web APIs
.textencoder.encode(string(chunk))) break }, flush() { /* do any destructor work here */ } } class anytou8stream extends transformstream { constructor() { super({...transformcontent, textencoder: new textencoder()}) } } polyfilling textencoderstream and textdecoderstream note that this is deprecated by the native constructors. this is intended as a polyfill for unsupported platforms. const tes = { start(){this.encoder = new textencoder()}, transform(chunk, controller) { controller.enqueue(this.encoder.encode(chunk)) } } let _jstes_wm = new weakmap(); /* info holder */ class jstextencoderstream extends transformstream { constructor() { let t = {...tes} super(t) _jstes_wm.set(this, t) } get encoding() {return _jstes_wm.get(this).encoder.encoding} ...
WebGL best practices - Web APIs
ation step. (rpaf explainer) this allows as much time as possible for rendering each frame. devicepixelratio and high-dpi rendering handling devicepixelratio != 1.0 is tricky. while the common approach is to set canvas.width = width * devicepixelratio, this will cause moire artifacts with non-integer values of devicepixelratio, as is common with ui scaling on windows, as well as zooming on all platforms. instead, we can use non-integer values for css's top/bottom/left/right to fairly reliably 'pre-snap' our canvas to whole integer device coordinates. demo: https://jdashg.github.io/misc/webgl/device-pixel-presnap.html resizeobserver and 'device-pixel-content-box' on supporting browsers (chromium?), resizeobserver can be used with 'device-pixel-content-box' to request a callback that includes ...
WebGL: 2D and 3D graphics for the web - Web APIs
Web › API › WebGL API
te for webgl at the khronos group. webgl fundamentals a basic tutorial with fundamentals of webgl. webgl playground an online tool for creating and sharing webgl projects. good for quick prototyping and experimenting. webgl academy an html/javascript editor with tutorials to learn basics of webgl programming. webgl stats a site with statistics about webgl capabilities in browsers on different platforms. libraries glmatrix is a javascript matrix and vector library for high-performance webgl apps. philogl is a webgl framework for data visualization, creative coding, and game development. pixi.js is a fast, open-source 2d webgl renderer. playcanvas is an open-source game engine. sylvester is an open-source library for manipulating vectors and matrices. not optimized for webgl but extremel...
Using bounded reference spaces - Web APIs
the boundary is then defined using an array of 2d coordinates, specifying only the x and z components since y is always 0. these points go around the room in a clockwise direction. note that if the underlying platform defines a fixed room-scale origin and boundary, it may initialize any uninitialized values to match that predefined information; this is not unexpected behavior for users of these platforms. the space inside the boundary is then the user's safe movement area, within which they are tracked and their movements replicated into the virtual world. although the user's xr system may provide automated detection and protection against exiting the safe area, it is always good practice to handle this yourself, watching for collisions between the user's position and the boundary of the world, ...
Fundamentals of WebXR - Web APIs
the appropriate session mode string for the kind of session you want to create. virtual reality in a vr environment, the entire image is digitally created by your app or site, from foreground objects all the way to the background or skybox. your frame drawing code will have to redraw every pixel of each view during each frame in order to avoid the potential of artifacts being left behind. some platforms may provide previously-cleared frames to you, while others may optimize performance by not erasing the framebuffers in order to avoid having to touch each pixel twice per frame. there are two vr session modes available in webxr: inline and immersive. the former, specified by the session mode string inline, presents the rendered scene within the context of a document in a web browser, and doesn't...
Lighting a WebXR setting - Web APIs
ly, you should try to avoid having virtual objects that are themselves light sources, unless you're prepared to create code that can cast that lighting onto the real world setting. casting light onto real-world objects is essentially the opposite of casting shadows. it can be done, but is not as widely implemented. lighting estimation lighting estimation is a technique used by augmented reality platforms to attempt to match the lighting of the virtual objects in the scene to the lighting of the real world surrounding the viewer. this involves the collection of data that may come from various sensors (including the accelerometer and compass, if available), cameras, and potentially others. other data is collected using the geolocation api, and then all this data is put through algorithms and machin...
Web audio spatialization basics - Web APIs
s can be hard to manipulate sometimes and depending on your use case it can take some time to get them right. note: there are slight differences in the way the audio spatialization sounds across different browsers. the panner node does some very involved maths under the hood; there are a number of tests here so you can keep track of the status of the inner workings of this node across different platforms. again, you can check out the final demo here, and the final source code is here. there is also a codepen demo too. if you are working with 3d games and/or webxr it's a good idea to harness a 3d library to create such functionality, rather than trying to do this all yourself from first principles. we rolled our own in this article to give you an idea of how it works, but you'll save a lot of t...
Window.devicePixelRatio - Web APIs
icepixelratio changes (which can happen, for example, if the user drags the window to a display with a different pixel density). see the example below. syntax value = window.devicepixelratio; value a double-precision floating-point value indicating the ratio of the display's resolution in physical pixels to the resolution in css pixels. a value of 1 indicates a classic 96 dpi (76 dpi on some platforms) display, while a value of 2 is expected for hidpi/retina displays. other values may be returned as well in the case of unusually low resolution displays or, more often, when a screen has a higher pixel depth than simply double the standard resolution of 96 or 76 dpi. examples correcting resolution in a <canvas> a <canvas> can appear too blurry on retina screens. use window.devicepixelratio t...
Privileged features - Web APIs
minimize system command icon in the titlebar and it will be minimizable. any non-dialog window is always minimizable and minimizable=no will be ignored. dependent if on, the new window is said to be dependent of its parent window. a dependent window closes when its parent window closes. a dependent window is minimized on the windows task bar only when its parent window is minimized. on windows platforms, a dependent window does not show on the task bar. a dependent window also stays in front of the parent window. dependent windows are not implemented on macos x, this option will be ignored. the dependent feature is currently under revision to be removed (bug 214867) in msie 6, the nearest equivalent to this feature is the showmodelessdialog() method. chrome if on, the page is loaded as wind...
Browser Differences - Web APIs
ie 5.0 and 5.5 (both windows) supported only the working draft of xslt, and thus are not compatible with xslt 1.0 stylesheets. ...
Accessibility
c level to improve accessibility. accessible multimedia another category of content that can create accessibility problems is multimedia — video, audio, and image content need to be given proper textual alternatives so they can be understood by assistive technologies and their users. this article shows how. mobile accessibility with web access on mobile devices being so popular, and popular platforms such as ios and android having fully-fledged accessibility tools, it is important to consider the accessibility of your web content on these platforms. this article looks at mobile-specific accessibility considerations. other documentation understanding the web content accessibility guidelines this set of articles provides quick explanations to help you understand the steps that need to...
Using URL values for the cursor property - CSS: Cascading Style Sheets
tage-valued) height and width on its root svg node. javascript, css animation, and declarative smil inside an svg image are ignored; you can't use svg to create an animated cursor, for example. in gecko (firefox) the limit of the cursor size is 128×128px. larger cursor images are ignored. however, you should limit yourself to the size 32×32 for maximum compatibility with operating systems and platforms. (due to a bug in gecko 1.9.2-1.9.2.6, firefox 3.6-3.6.6 on windows limits to 32×32px. this is fixed in later versions.) translucent cursors are not supported on windows releases earlier than xp. this is a limitation of the operating system. transparency works on all platforms. url values as cursors are supported in windows, os/2, and linux (when using gtk+ 2.4 or better) releases of mozilla.
animation-delay - CSS: Cascading Style Sheets
nted with the vendor prefix: -webkit-edge full support 12firefox full support 16notes full support 16notes notes before firefox 57, firefox does not repaint elements outside the viewport that are animated into the viewport with a delay. this bug affects only some platforms, such as windows. full support 49prefixed prefixed implemented with the vendor prefix: -webkit- full support 44prefixed disabled prefixed implemented with the vendor prefix: -webkit-disabled from version 44: this feature is behind the layout.css.prefixes.webkit preference (needs to be set to true). to change...
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
ebkit-appearance: caret; } <div>lorem</div> firefox chrome safari edge checkbox-container div { color: black; -moz-appearance: checkbox-container; -webkit-appearance: checkbox-container; } <div>lorem</div> firefox the element is drawn like a container for a checkbox, which may include a prelighting background effect under certain platforms. normally it would contain a label and a checkbox. checkbox-label div { color: black; -moz-appearance: checkbox-label; -webkit-appearance: checkbox-label; } <div>lorem</div> firefox checkmenuitem div { color: black; height: 20px; -moz-appearance: checkmenuitem; -webkit-appearance: checkmenuitem; } <div>lorem</div> ...
scrollbar-width - CSS: Cascading Style Sheets
-width: auto; scrollbar-width: thin; scrollbar-width: none; /* global values */ scrollbar-width: inherit; scrollbar-width: initial; scrollbar-width: unset; values <scrollbar-width> defines the width of the scrollbar as a keyword. it must be one of the following values: auto the default scrollbar width for the platform. thin a thin scrollbar width variant on platforms that provide that option, or a thinner scrollbar than the default platform scrollbar width. none no scrollbar shown, however the element will still be scrollable. note: user agents must apply any scrollbar-width value set on the root element to the viewport. accessibility concerns use this property with caution — setting scrollbar-width to thin or none can ma...
WAI ARIA Live Regions/API Support - Developer guides
or properties where the container-[name] attribute has not been set, the at must have code to fall back on the default value as defined in the w3c spec. determining if event was from user input all events will now provide information about whether the event was caused by user input, or was something that the web page caused. this information is retrieved differently on each platform, because some platforms use asynchronous events. in iaccessible2, this is retrieved from the object attribute "event-from-input", which will be set to "true" or "false". if it is not present, then something went wrong and mozilla was not able to provide this information. this information is available only for event_show, event_hide, ia2_event_text_inserted and ia2_event_text_removed. for atk/at-spi, this information is ...
Audio and Video Delivery - Developer guides
ich may be useful. consider this html: <video> <source id="mp4_src" src="video.mp4" type='video/mp4; codecs="avc1.42e01e, mp4a.40.2"'> </source> <source id="3gp_src" src="video.3gp" type='video/3gpp; codecs="mp4v.20.8, samr"'> </source> <source id="ogg_src" src="video.ogv" type='video/ogv; codecs="theora, vorbis"'> </source> </video> since firefox doesn't support mp4 and 3gp on some platforms due to their patent-encumbered nature, the <source> elements with the ids "mp4_src" and "3gp_src" will receive error events before the ogg resource is loaded. the sources are tried in the order in which they appear, and once one loads successfully, the remaining sources aren't tried at all. checking whether the browser supports the supplied formats use the following verified sources within your...
A hybrid approach - Developer guides
the benefits of a responsive design, a hybrid approach may be your best bet. decisions like these are at the heart of mobile web development: be specific about what you would like to accomplish, and pick a practical approach while being aware of the tradeoffs. good luck! approaches to mobile web development see the following articles for background and other approaches to developing for mobile platforms. what is mobile-friendliness? separate sites responsive design original document information this article was originally published on 27 june 2011, on the mozilla webdev blog as "approaches to mobile web development part 4 – a hybrid approach", by jason grlicky. ...
Separate sites for mobile and desktop - Developer guides
ickr. in fact, mozilla picked this strategy for the mobile versions of addons.mozilla.org (amo) and support.mozilla.org (sumo). if you’d like to see the source code behind an example of this approach in action, feel free to check out the github repository for amo or sumo. approaches to mobile web development see the following articles for background and other approaches to developing for mobile platforms. what is mobile-friendliness? responsive design a hybrid approach original document information this article was originally published on 13 may 2011, on the mozilla webdev blog as "approaches to mobile web development part 2 – separate sites", by jason grlicky. ...
Mobile Web Development - Developer guides
Web › Guide › Mobile
different content to each type of device. if you do this, make sure your algorithm is correct, and you aren't serving the wrong type of content to a device because you don't understand a particular browser's user agent string. see this guide to using the user agent string to determine device type. test on multiple browsers test your web site on multiple browsers. this means testing on multiple platforms — at least ios and android. test mobile safari on the iphone using the ios simulator test opera and firefox using the android sdk. see these additional instructions for running firefox for android using the android emulator. ...
<input type="time"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › time
server. if your server-side code fails to validate the data it receives, disaster could strike when improperly-formatted data is submitted (or data which is too large, of the wrong type, and so forth). handling browser support as mentioned above, safari and a few other, less common, browsers don't yet support time inputs natively. in general, otherwise, support is good — especially on mobile platforms, which tend to have very nice user interfaces for specifying a time value. for example, the time picker on chrome for android looks like this: browsers that don't support time inputs gracefully degrade to a text input, but this creates problems both in terms of consistency of user interface (the presented control will be different), and data handling. the second problem is the more serious; a...
<input type="week"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › week
rver-side code fails to validate the data it receives, disaster could strike when improperly-formatted data is submitted (or data which is too large, of the wrong type, and so forth). handling browser support as mentioned above, the major problem with using week inputs right now is browser support: safari and firefox don't support it on desktop, and old versions of ie don't support it. mobile platforms such as android and ios make really good use of such input types, providing specialist ui controls that make it really easy to select values in a touchscreen environment. for example, the week picker on chrome for android looks like this: non-supporting browsers gracefully degrade to a text input, but this creates problems both in terms of consistency of user interface (the presented control w...
<link>: The External Resource Link element - HTML: Hypertext Markup Language
Web › HTML › Element › link
linked to is related to the containing document. as you'll see from our link types reference, there are many different kinds of relationship. there are a number of other common types you'll come across. for example, a link to the site's favicon: <link rel="icon" href="favicon.ico"> there are a number of other icon rel values, mainly used to indicate special icon types for use on various mobile platforms, e.g.: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-icon-114.png" type="image/png"> the sizes attribute indicates the icon size, while the type contains the mime type of the resource being linked. these provide useful hints to allow the browser to choose the most appropriate icon available. you can also provide a media type or query inside a media attribute; this ...
Browser detection using the user agent - HTTP
ko. gecko puts the gecko version number in the comment part of the user agent after the rv: string. from gecko 14 for the mobile version and gecko 17 for the desktop version, it also puts this value in the gecko/version token (previous version put there the build date, then a fixed date called the geckotrail). os the operating system is given in most user agent strings (although not web-focused platforms like firefox os), but the format varies a lot. it is a fixed string between two semi-colons, in the comment part of the user agent. these strings are specific for each browser. they indicate the os, but also often its version and information on the relying hardware (32 or 64 bits, or intel/ppc for mac). like in all cases, these strings may change in the future, one should use them only in conjun...
Feature-Policy: screen-wake-lock - HTTP
the http feature-policy header screen-wake-lock directive controls whether the current document is allowed to use screen wake lock api to indicate that device should not dim or turn off the screen. note: in earlier specification drafts this directive was called wake-lock. syntax feature-policy: screen-wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. ...
Feature-Policy: wake-lock - HTTP
the http feature-policy header wake-lock directive controls whether the current document is allowed to use wake lock api to indicate that device should not enter power-saving mode. note: latest drafts of screen wake lock api defines screen-wake-lock directive. syntax feature-policy: wake-lock <allowlist>; <allowlist> an allowlist is a list of origins that takes one or more of the following values, separated by spaces: *: the feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin. ...
Large-Allocation - HTTP
ons can prevent firefox from using this new, faster, multiprocess architecture. if you have one of these addons installed, then we will continue to use the old single process architecuture for compatibility, and cannot handle the large-allocation header. this page would be loaded in a new process due to a large-allocation header, however large-allocation process creation is disabled on non-win32 platforms. firefox currently only supports the large-allocation header in our 32-bit windows builds, as memory fragmentation is not an issue in 64-bit builds. if you are running a non-win32 version of firefox, this error will appear. this check can be disabled with the "dom.largeallocation. forceenable" boolean preferece in about:config. specifications not part of any current specifications. an expl...
Firefox user agent string reference - HTTP
ct team and denote versions with new features (eg: v1.1, 1.2, etc). the third digit is incremented with regular version tags (about every 6 weeks) for security updates, and the fourth is owned by the oem. firefox web runtime the web runtime uses the same user agent string as desktop firefox. other gecko-based browsers these are some sample ua strings from other gecko-based browsers on various platforms. note that many of these have not yet been released on gecko 2.0! browser gecko user agent string firefox for maemo (nokia n900) mozilla/5.0 (maemo; linux armv7l; rv:10.0.1) gecko/20100101 firefox/10.0.1 fennec/10.0.1 camino on mac mozilla/5.0 (macintosh; intel mac os x 10.5; rv:2.0.1) gecko/20100101 firefox/4.0.1 camino/2.2.1 seamonkey on windows...
Array.prototype.copyWithin() - JavaScript
...
Promise.any() - JavaScript
s with the value from that promise. if no promises in the iterable fulfil (if all of the given promises are rejected), then the returned promise is rejected with an aggregateerror, a new subclass of error that groups together individual errors. essentially, this method is the opposite of promise.all(). warning! the promise.any() method is experimental and not fully supported by all browsers and platforms. it is currently in stage 4 of the tc39 process. syntax promise.any(iterable); parameters iterable an iterable object, such as an array. return value an already resolved promise if the iterable passed is empty. an asynchronously resolved promise if the iterable passed contains no promises. a pending promise in all other cases. this returned promise is then resolved/rejected async...
RegExp - JavaScript
e regular expression pattern. let re = /(\w+)\s(\w+)/ let str = 'john smith' let newstr = str.replace(re, '$2, $1') console.log(newstr) this displays "smith, john". using regular expression to split lines with different line endings/ends of line/line breaks the default line ending varies depending on the platform (unix, windows, etc.). the line splitting provided in this example works on all platforms. let text = 'some text\nand some more\r\nand yet\rthis is the end' let lines = text.split(/\r\n|\r|\n/) console.log(lines) // logs [ 'some text', 'and some more', 'and yet', 'this is the end' ] note that the order of the patterns in the regular expression matters. using regular expression on multiple lines let s = 'please yes\nmake my day!' s.match(/yes.*day/); // returns null s.match(/yes...
SharedArrayBuffer() constructor - JavaScript
the sharedarraybuffer() constructor is used to create a sharedarraybuffer object representing a generic, fixed-length raw binary data buffer, similar to the arraybuffer object. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
typeof - JavaScript
// functions typeof function() {} === 'function'; typeof class c {} === 'function'; typeof math.sin === 'function'; typeof null // this stands since the beginning of javascript typeof null === 'object'; in the first implementation of javascript, javascript values were represented as a type tag and a value. the type tag for objects was 0. null was represented as the null pointer (0x00 in most platforms). consequently, null had 0 as type tag, hence the "object" typeof return value. (reference) a fix was proposed for ecmascript (via an opt-in), but was rejected. it would have resulted in typeof null === 'null'. using new operator // all constructor functions, with the exception of the function constructor, will always be typeof 'object' let str = new string('string'); let num = new number(100)...
for...of - JavaScript
in these cases, the iterator is closed. function* foo(){ yield 1; yield ...
Web video codec guide - Web media technologies
not require license fees for streaming internet video in avc format as long as the video is free for end users. non-web browser implementations of webrtc (any implementation which doesn't include the javascript apis) are required to support avc as a codec in webrtc calls. while web browsers are not required to do so, some do. in html content for web browsers, avc is broadly compatible and many platforms support hardware encoding and decoding of avc media. however, be aware of its licensing requirements before choosing to use avc in your project! supported bit rates varies by level supported frame rates varies by level; up to 300 fps is possible compression lossy dct-based algorithm, though it's possible to create lossless macroblocks within the image ...
Guide to streaming audio and video - Web media technologies
u use while performing the streaming to bring out the best quality and performance possible. <<<...xxxxxx...>>> protocols in addition to the configuration of the server and the streaming code, there are sometimes special protocols which can be used to optimize performance. https live streaming https live streaming (hls) is a protocol developed by apple and supported by safari on all of their platforms. hls may also be supported in other environments, although in some cases this support is conditional. for example, because many web sites' mobile-specific content assume that mobile browsers support hls, firefox for android does as well, in order to avoid strange compatibility errors from occurring due to this assumption being incorrect. the desktop version of android, however, does not support ...
Add to Home screen - Progressive web apps (PWAs)
necessary files. the service worker is registered against the site with the final code block in the index.js file. we then cache all the site's assets using the cache api, and serve them from the cache instead of the network using the code in the sw.js file. a2hs on desktop while originally intended to improve user experience on mobile oses, there is movement to make pwas installable on desktop platforms too. note: at the time of writing, the functionality described below was only supported in newer versions of chrome — by default on windows, and behind the #enable-desktop-pwas flag on macos. adding an install button to make our pwa installable on desktop, we first added a button to our document to allow users to do the installation — this isn't made available automatically on desktop ap...
XML introduction - XML: Extensible Markup Language
xml (extensible markup language) is a markup language similar to html, but without predefined tags to use. instead, you define your own tags designed specifically for your needs. this is a powerful way to store data in a format that can be stored, searched, and shared. most importantly, since the fundamental format of xml is standardized, if you share or transmit xml across systems or platforms, either locally or over the internet, the recipient can still parse the data due to the standardized xml syntax. there are many languages based on xml, including xhtml, mathml, svg, xul, xbl, rss, and rdf. you can also define your own. structure of an xml document this sub-article in process writing... whole structure xml and xml based languages built on tags. xml declaration xml - declaratio...