Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: mozmaster
Commits on Mar 17, 2015
  1. @joewalker

    runat-1128988: Remove unused argument

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  2. @joewalker
  3. @joewalker

    runat-1128988: Be defensive about domSheet.ownerNode

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  4. @joewalker

    runat-1128988: Use undefined for the value when !blankIsValid

    joewalker authored
    When blank isn't valid it's important that we have a value of undefined
    so that the isDataRequired calculation works, which seems broken. I'm
    not going to dig deeply into fixing it now though.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  5. @joewalker

    runat-1128988: Pass on blankIsValid to delegate children

    joewalker authored
    I'm not sure we'll ever actually need to double-remote a type, but just
    in case we should pass on the data that's needed.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  6. @joewalker

    runat-1128988: 2 minor fixes

    joewalker authored
    Used value in delegate type, and format fix in cli.js
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  7. @joewalker

    runat-1128988: Fix tests that we broke recently

    joewalker authored
    Pass 'context' to resource tests.
    Narrow down the Node breakage in the JS tests.
    More remote values are not available and shouldn't be tested for
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  8. @joewalker

    runat-1128988: Replace windowHolder with environment

    joewalker authored
    windowHolder was flawed in that there was only one per JS loader, but
    we needed one for each command line.
    
    The theory of 'environment' was that it wasn't owned by GCLI. It was
    provided by the implementor of GCLI for the commands. This breaks that
    by requiring that 'window' have a special value (if we're going to use
    the node/nodelist/resource/javascript types) Given the complexities of
    alternative solutions, this seems like an ok trade-off.
    
    This commit is implementation only. Next we're going to fix tests.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  9. @joewalker

    runat-1128988: Remove onEnter/onLeave/onChange notification

    joewalker authored
    The idea was that we could highlight nodes when command line cursor was
    'inside' the relevant argument. But it's not working for several
    reasons:
    * It needs remoting (and this could be a perf issue)
    * We've not hooked it up to the new multiple node highlighter
    * The requirement to have context.environment.window hooked up is making
      things worse
    
    So I'm disabling it here.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  10. @joewalker

    runat-1128988: Remove 'with' from the template engine

    joewalker authored
    Slightly sad to replace 3 simple lines of code with 7 complex lines of
    code that need 14 lines of commentary to explain them. Some module
    loaders force everything into strict mode so just leaving off
    'use strict' wasn't an option any more.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  11. @joewalker

    runat-1128988: Having functions called 'eval' seems dangerous

    joewalker authored
    I tried using GCLI from babel and it didn't like to have functions
    called 'eval'. It looks legal under ES5 'strict mode' to me, but I don't
    think eval is a good name all the same.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
Commits on Mar 13, 2015
  1. @joewalker
  2. @joewalker

    runat-1128988: Minor comment clarification

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  3. @joewalker

    runat-1128988: Stop caching the results of getBlank()

    joewalker authored
    nodelist types have a blank value that is an empty NodeList, and a
    NodeList is tied to a document which can change (by navigation) so we
    need to ask call getBlank() whenever we want the defaultValue.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  4. @joewalker

    runat-1128988: Remote fixes for note and delegate types

    joewalker authored
    Firstly the nodelist type tried to instansiate itself across the remote
    interface, which was never going to work. Now it uses the 'remote' type
    to proxy the type functions.
    
    There is a special 'blank' conversion for types. parse() is async but
    lots of the time we're effectively doing parse('') and making that case
    async spreads the async virus to lots of places that it doesn't need to
    be. So there's a getBlank() shortcut that is sync.
    
    In almost all cases blank means 'INCOMPLETE' with an undefined value
    (see [1] for the default implementation). But there are exceptions like
    nodelist, where blank means an empty NodeList (which could be VALID)
    
    So we add a blankIsValid property to the remote type which defaults to
    false, so you get the default getBlank() behavior. But for nodelists
    we set this to true, so we get the correct VALID / empty NodeList
    behavior.
    
    [1]: https://github.com/joewalker/gcli/blob/585f7b83953de5c0faeb9fb187b55ab6171c3d03/lib/gcli/types/types.js#L1007
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  5. @joewalker

    runat-1128988: Use platform promises instead of deprected-sync-thenables

    joewalker authored
    Having done s/.then(null, /.catch(/g we're kind of nudged into this
    because deprected-sync-thenables doesn't support .catch(). We've been
    using DOM promises on the web for a while so I'm not too worried about
    the implications of these being async.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  6. @joewalker

    runat-1128988: A better check for overtaken keyboard events.

    joewalker authored
    Perhaps we should get rid of 'updated' if the alternative is so simple,
    and works in more cases.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  7. @joewalker

    runat-1128988: 2 more ".then(null, " → ".catch("

    joewalker authored
    Missed last time because we did them on the master branch. These files
    are only on the mozilla branch.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  8. @joewalker

    runat-1128988: Update comments: textChanged is no longer an event

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
Commits on Mar 12, 2015
  1. @joewalker

    runat-1128988: Replace increment/decrement with nudge in inputter.js

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  2. @joewalker
  3. @joewalker

    runat-1128988: 2 places to make types more robust

    joewalker authored
    delegate.stringify does something better than die if it gets undefined.
    We url.parse checks if environment.window exists without accessing it.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  4. @joewalker
  5. @joewalker

    runat-1128988: Refactor util.promiseEach

    joewalker authored
    The whole onFailure thing wasn't needed, and we can chain the promises
    onto each other rather than manually running a loop. Half the LOC.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  6. @joewalker

    runat-1128988: Tests on 'node' type should access the NodeList properly

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  7. @joewalker

    runat-1128988: Max line length = 80 chars. Wrap.

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  8. @joewalker

    runat-1128988: Fix misspelled attribute. Matters in an xhtml document

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  9. @joewalker

    runat-1128988: Sync helpers.js with Firefox

    joewalker authored
    Someone had added an assert.ok, and we protect ourselves against null
    DOM nodes in checking test output
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  10. @joewalker

    runat-1128988: Update the function to convert GCLI -> Mochitests

    joewalker authored
    2 Changes:
    - s/*function/function*/
    - Use a <div> rather than a <p> (some tests assume this)
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  11. @joewalker

    runat-1128988: Pass Errors through protocol.js correctly

    joewalker authored
    In Output.toJson we were assuming that `JSON.stringify(new Error('x'))`
    would give us something useful. It actually just gives `{}`, so we
    manually extract the properties of a standard Error.
    
    We were using `error:true` to denote an error, but this was conflicting
    with a special property in protocol.js, so we're using isError instead.
    (Commands that fail are considered non-exceptional. Exceptions in GCLI
    are for when GCLI itself fails)
    
    The converters now need to cope with errors that are objects that look
    like Errors (but not actually errors).
    
    In the process of debugging this I refactored the code that kicks off
    a remote execution in system.js.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
Commits on Mar 11, 2015
  1. @joewalker

    runat-1128988: Remove test files appropriate for web/node but not Fir…

    joewalker authored
    …efox
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
  2. @joewalker
  3. @joewalker

    runat-1128988: Remove uses of contentWindow from FFDisplay code

    joewalker authored
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
Commits on Mar 10, 2015
  1. @joewalker

    runat-1128988: Replace document/globalObject with windowHolder

    joewalker authored
    Previously each time we navigated to a new page we'd have to update the
    document/global in GCLI. A windowHolder which uses a getter property to
    dynamically return the correct document/global is much easier to use.
    
    We're using windowHolder rather than documentHolder simply because you
    could confuse a documentHolder and a window, but you can't confuse a
    windowHolder and a document so easily.
    
    The javascript type isn't used in Firefox. It wasn't clear that the
    donteval test was working properly, and I didn't want to invest time to
    it right now, so we're skipping those tests.
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
Commits on Mar 6, 2015
  1. @joewalker

    runat-1128988: Clarify comment

    joewalker authored
    Fix for
    joewalker@bc82016#commitcomment-10060854
    
    Signed-off-by: Joe Walker <jwalker@mozilla.com>
Something went wrong with that request. Please try again.