gecko-dev | Firefox Gecko integration with Web Speech API

 by   andrenatal C++ Version: Current License: Non-SPDX

kandi X-RAY | gecko-dev Summary

kandi X-RAY | gecko-dev Summary

gecko-dev is a C++ library. gecko-dev has no bugs, it has no vulnerabilities and it has low support. However gecko-dev has a Non-SPDX License. You can download it from GitHub.

An explanation of the Mozilla Source Code Directory Structure and links to project pages with documentation can be found at:.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              gecko-dev has a low active ecosystem.
              It has 6 star(s) with 3 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              gecko-dev has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of gecko-dev is current.

            kandi-Quality Quality

              gecko-dev has no bugs reported.

            kandi-Security Security

              gecko-dev has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              gecko-dev has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              gecko-dev releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gecko-dev
            Get all kandi verified functions for this library.

            gecko-dev Key Features

            No Key Features are available at this moment for gecko-dev.

            gecko-dev Examples and Code Snippets

            No Code Snippets are available at this moment for gecko-dev.

            Community Discussions

            QUESTION

            How and what does Firefox (Hunspell) do to clean text before spellchecking words?
            Asked 2020-Jun-19 at 17:30

            I am trying to clean text in the exact way that Firefox does before spell checking individual words for a Firefox extension I'm building (my addon uses nspell, a JavaScript implementation of Hunspell, since Firefox doesn't expose the Hunspell instance it uses via the extension API).

            I've looked at the Firefox gecko cloned codebase, i.e. in the mozSpellChecker.h file and other related files by searching for "spellcheck" but I cannot seem to find out how they are cleaning text.

            Reverse engineering it has been a major PITA, I have this so far:

            ...

            ANSWER

            Answered 2020-Jun-19 at 17:30

            I believe you want the functions in mozInlineSpellWordUtil.cpp.

            From the header:

            Source https://stackoverflow.com/questions/62290285

            QUESTION

            Gecko - CSS layout border radius - Javascript conversion
            Asked 2020-May-26 at 21:09

            I'm trying to get the exact formula in order to compute CSS border-radius property in a canvas. I've already tried and have an example in javascript (see below), but with no success.

            Its seems that the browser is still adding some adaptations in order to ajust the borders. And i'm unable to identify them. So i've checked the sources of the Gecko layout engine, but i'm not sure where i can find this formula (in the sources).

            It may be in layout/painting/nsCSSRenderingBorders.cpp, but there's still a lot of code and it's C++ (i've no skills into that language)

            See Gecko repository : https://github.com/mozilla/gecko-dev

            So, if anyone could help me in order to achieve this adaptation, or give me the blocks of code which are computing border-radius "arcs, orientation ?" (in gecko) i'll be able to do that.

            Javascript/HTML snippet (current, close from good adaptation)

            (RED SHAPE = Canvas shape, GREEN SHAPE = HTML shape)

            I'm using this function to draw the shape : ctx.constructor.prototype.fillRoundedRect

            And this function in order to get close from the browser adaptation : correctRadius

            As you will see, im getting this result when TopLEFT, TopRight and BottomLEFT sliders are at max value. The browser (green) is rendering it perfectly, and mine is bad (red).

            See snippet below

            ...

            ANSWER

            Answered 2018-Jan-27 at 12:05

            The issue is with your correctRadius function. As you can see you are re-calculating value more than once which is incorrect.

            Let's take an example with TopLeft, TopRight and BottomLeft set at max values (100px):

            1) You will consider the first condition and you will update your values like this:

            TopLeft = 50px | TopRight = 50px (these are correct values)

            2) Now you will consider the third condition as you have TL+TB (100px + 50px) > h (100px) and you will update the values like this:

            TopLeft = 25px | BottomLeft 75px (these are wrong values and the correct ones should be 50px for both)

            So you don't have to calculate values separately, you should consider all of them and do only one calculation for each side depending on initial values.

            The idea is to consider the max value of the difference between two adjacent side. Let's consider the same example above and make 3 different values like this:

            TL = 100px | TR = 90px | BL = 100px | BR = 0px

            TL is adjacent to TR and BL:

            • Considering TR we will have 190px > 100px and thus TL = 45px
            • Considering BL we will have 200px > 100px and this TL = 50px

            So we should consider the max value which is 50px. We do the same for the other sides.

            Here is the full code:

            Source https://stackoverflow.com/questions/48466238

            QUESTION

            Javascript - Gecko border radius adaptation on HTML Canvas (CSS border-radius)
            Asked 2018-Jan-28 at 23:15

            I'm trying to figure out how to reproduce the behavior of the "border-radius" css property into an HTML canvas.

            So i've already done something in Javascript in order to compute the correct borders of a given shape, using a specific radius (for each corner).

            Here is the previous question if needed : Gecko - CSS layout border radius - Javascript conversion

            I've managed to get close from the browser adaptation but there's still an issue, and it seems that it's the last, and the hard part!

            Let's take an example in order to explain you the problem

            Take a shape of 100px width & 100px height. Now apply the following radius to each corner :

            • Top left : 37px
            • Top right : 100px
            • Bottom right : 1px
            • Bottom left : 100px

            So the css style for this will be border-radius : 37px 100px 1px 100px

            Now let's consider using the code below in order to draw this shape in a canvas.

            By using the function correctRadius(r, w, h) in order to avoid bad shapes, each corners will be computed like that :

            => {tl: 18.5, tr: 81.5, br: 0.5, bl: 81.5}

            Here is a visual of this :

            You will be able to test it in the following snippet

            As you can see, the browser shape (green) is overlapped with the canvas shape (brown + 'pink' due to opacity). I've put some opacity on it in order to check the bad corners (pink).

            The brown shape do not fit properly into the green shape, the top left corner is getting out of the base, and the bottom left and top right corners don't fit the green shape.

            I've already tried to fix that but with no success, and also looked the sources of the Gecko layout engine (https://github.com/mozilla/gecko-dev) in this file : layout/painting/nsCSSRenderingBorders.cpp, but haven't found anything + i have no skills in C++

            If anyone could help me to figure this out, or give me some advice, i'll be able to fix this and get the borders working

            ...

            ANSWER

            Answered 2018-Jan-28 at 23:15

            Found the solution !

            We just need to compute a scaleRatio :

            First, we get the maxRadiusWidth (r.tl + r.tr, r.bl + r.br) & maxRadiusHeight (r.tl + r.bl, r.tr + r.br)

            and then a widthRatio = (w / maxRadiusWidth) & heightRatio = (h / maxRadiusHeight) with the size of the shape (WIDTH & HEIGHT)

            Then we take the lower of theses two variables : Math.min(Math.min(widthRatio, heightRatio), 1) in order to not get out of the shape & we make sure that the ratio is below 1.

            Finally, we simply need to multiply each corner by this ratio in order to get the correct size !

            Source https://stackoverflow.com/questions/48478497

            QUESTION

            Parameterized includes
            Asked 2017-Dec-06 at 14:36

            In a few C programs (for example in gecko) I've noticed an idiom whereby a program will temporarily define a macro, then include a file which uses that macro, then undefine the macro. Here's a trivial example:

            speak.c:

            ...

            ANSWER

            Answered 2017-Dec-06 at 14:36

            This is a variant of what are often called X macros.

            Further reading

            Source https://stackoverflow.com/questions/47676723

            QUESTION

            Detect Firefox IndexedDB or Web Storage storage limit, without filling up the disk?
            Asked 2017-May-05 at 02:22

            I'd like to use IndexedDB to process a lot of data. Too much data to fit in memory. To do this, I would like to use Firefox's IndexedDB persistent storage, which allows me to store more than 2GB worth of data (Firefox apparently has a limit of 2GB imposed on non-persistent storage).

            However, I've run into an issue. Firefox does not appear to be imposing a limit on the amount of data I can store in persistent storage. In fact, if I leave the following sample running, it will apparently run until the disk is full!

            Sample (Online) (Must be run in Firefox!):

            ...

            ANSWER

            Answered 2017-May-04 at 18:07

            Note the line in the MDN article:

            Temporary data storage does not elicit any user prompts, but there are Storage limits.

            It could be clearer, but it means Storage limits ONLY apply to temporary storage. So, the global limit and group limit are not in effect for persistent storage.

            You can consider switching to temporary storage. But if you need persistent then you may be out of luck until Firefox implements navigator.storageQuota or navigator.storageManager, whichever is settled on.

            Source https://stackoverflow.com/questions/43725895

            QUESTION

            Why does git log --since not include the commits that I expect?
            Asked 2017-Jan-07 at 08:58

            I wanted to get a list of all my commits to a repository since the start of the year. I tried with the obvious command, but it doesn't include any of them:

            ...

            ANSWER

            Answered 2017-Jan-07 at 06:39

            For better or worse (me, I'm in the "worse" camp), git defaults to the current time of day when you specify a date. Try --since='midnight 2016-12-20'

            ... okay. I haven't deciphered the code yet, but this looks awfully good for it:

            Source https://stackoverflow.com/questions/41517489

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install gecko-dev

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/andrenatal/gecko-dev.git

          • CLI

            gh repo clone andrenatal/gecko-dev

          • sshUrl

            git@github.com:andrenatal/gecko-dev.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link