dperini (Diego Perini)

Name
Diego Perini
Email
Company
NWBOX
Location
Verona - Italy
Member Since
Jul 15, 2008 (about 1 year)

Following 0 githubbers and watching 5 repositories view all →

Public Repositories (2)

  • nwmatcher

    Fast Javascript CSS Selector Engine and Matcher

    legend

    Last updated Thu Dec 03 18:24:05 -0800 2009

  • nwevents

    Javascript Event Manager for handlers, listeners and delegates

    legend

    Last updated Thu Sep 03 08:16:37 -0700 2009

Public Activity feed

dperini pushed to master at dperini/nwmatcher Thu Dec 03 18:24:05 -0800 2009
HEAD is 32a8e3d7811a3d2db72ae1604eb002422f0fadb8
  • Diego Perini committed 32a8e3d7:
    avoid querying XML documents by id also if they seems to exposes an usable GEBID method
dperini pushed to master at dperini/nwmatcher Thu Dec 03 18:04:35 -0800 2009
HEAD is 49fd657e2e34c7b9a593d5a835428f46f8ac2db1
  • Diego Perini committed 49fd657e:
    added back an optimization (corrected) that was removed previously, fixed a minor problem with the attributeCaseMap, fixed a jslint warning correctly identifing a problem in 'byClass()' about a variable declaration hiding arguments
dperini pushed to master at dperini/nwmatcher Thu Dec 03 17:24:10 -0800 2009
HEAD is 81e2e4c08f952ec5d818e09fadae593774372475
  • Diego Perini committed 81e2e4c0:
    changed isQuirks and isXML to both be dynamic methods depending on passed host and have related isQuirksMode and isXMLDocument variables to keep state, added an extra check on child/descendants to avoid stepping up to document, do not save compiledSelectors for extraneous document types (XML/SVG)
dperini commented on dperini/nwmatcher Thu Dec 03 04:14:31 -0800 2009
Comment in 143f6dd:

you are not very useful, missing browser name, version, operating system and name of the specific failing test.
I tested on the unit tests I have, which are known to be good. No errors at all.

dperini commented on dperini/nwmatcher Thu Dec 03 03:37:10 -0800 2009
Comment in 9f8a083:

I don't know where you are looking at but this commit is exactly about what you said. To avoid returning results bound to local document static detection.
This is just one part though...I can't throw in all the commits at once with a shovel, I have to go for a dropper, implementors are using my code.

dperini commented on dperini/nwmatcher Thu Dec 03 03:31:18 -0800 2009
Comment in 5a03aba:

nothing has changed, just added a boolen, the indentation diffs makes it seems big, it is about the same size it was and avoid the use of "this" keyword which was my objective.

dperini pushed to master at dperini/nwmatcher Wed Dec 02 20:08:03 -0800 2009
HEAD is f325b4bd571e61743b785c88037d4bb806f0426c
  • Diego Perini committed f325b4bd:
    fixed wrong optimization in returning elements in previous commit
dperini pushed to master at dperini/nwmatcher Wed Dec 02 19:35:28 -0800 2009
HEAD is 9f8a083606f7aaeb99d3473edb29f7eaab0d97a2
  • Diego Perini committed 9f8a0836:
    removed static INSENSITIVE_TABLE in favor of a more dynamic method 'getAttributeCaseMap' to detect the document type
dperini pushed to master at dperini/nwmatcher Wed Dec 02 18:48:52 -0800 2009
HEAD is 18af0b2a0a0217874e7c989a833a10a33f4d09dc
  • Diego Perini committed 18af0b2a:
    moved 'data' arguments as last parameter for both the 'select()' and the 'match()' public method, changed also in internal calls to 'native_api'
dperini pushed to master at dperini/nwmatcher Wed Dec 02 18:15:41 -0800 2009
HEAD is 5041a8580d2681236c63af7b9b75a6b091a0e9c0
  • Diego Perini committed 5041a858:
    minor improvement in 'match()' method getting 'doc' and 'root' references
dperini pushed to master at dperini/nwmatcher Wed Dec 02 18:00:31 -0800 2009
HEAD is 1eaa59e0daa37e0fe9e374e5a48f81796e234cd4
  • Diego Perini committed 1eaa59e0:
    reinserted optimization for IE on 'nodeName' resolver, now XML is checked and the expression adjusted adequately (case sensitive)
dperini pushed to master at dperini/nwmatcher Wed Dec 02 17:00:17 -0800 2009
HEAD is dbfe504886908301afdd8bedd62a7e920fd67af8
  • Diego Perini committed dbfe5048:
    slightly moved blocks of code to avoid checking several times the 'done' flag, 'done' signals that the selection has ended but result conversion may still be needed
dperini pushed to master at dperini/nwmatcher Wed Dec 02 16:14:11 -0800 2009
HEAD is 623e17eccccee520c7502c9226217e10a1e7e2de
  • Diego Perini committed 623e17ec:
    reordered pseudos exclusion in RE_BUGGY_QSAPI regexp, moved ':selected' and ':contains' at the end, removed match for negated attribute values '!=' for consistency with 'client_api' since it is not standard and alternatives exists
dperini pushed to master at dperini/nwmatcher Wed Dec 02 15:50:27 -0800 2009
HEAD is 5a03abad57efe0c987da6b80c7ca8b0433ee2a2a
  • Diego Perini committed 5a03abad:
    made setQSA work again from user space by short-circuiting 'select_qsa', changed 'select_qsa' to use NodeList methods and 'push()' to get element references which is normally faster in newer browsers having QSA, minor shortening in the 'one' element case
dperini pushed to master at dperini/nwmatcher Wed Dec 02 14:40:29 -0800 2009
HEAD is 949e341aebd9906023ff4b555248f6eac19eac6d
  • Diego Perini committed 949e341a:
    retouched byClass again to avoid having duplicate code and still maintain the speed, renamed variable again for consistency with other methods, removed a space
dperini commented on dperini/nwmatcher Wed Dec 02 14:29:11 -0800 2009
Comment in 0889a9e:

jdalton,
dynamic properties shouldn't exist in the XML file itself, only in it's HTML/XHTML representation/transformation.
There is no ":active" element nor ":focus", ":hover", ":disabled", ":enabled" and so on...

These are just HTML/XHTML properties. The isXML() method, currently, is there to avoid creating problems in user code.

dperini pushed to master at dperini/nwmatcher Wed Dec 02 14:01:22 -0800 2009
HEAD is 1225db86ba8850ba779a8f919a5c9b5fc1f416e8
  • Diego Perini committed 1225db86:
    fixed a couple of jslint warnings
dperini pushed to master at dperini/nwmatcher Wed Dec 02 13:59:40 -0800 2009
HEAD is d4bfd97a030ce5101f4feba466e467c509e940c9
  • Diego Perini committed d4bfd97a:
    improved granularity of RE_SIMPLE_SELECTOR (jdalton)
dperini pushed to master at dperini/nwmatcher Wed Dec 02 11:48:12 -0800 2009
HEAD is 143f6dd70e119087b0234ff390b6ea5275a0e146
  • Diego Perini committed 143f6dd7:
    no need to exclude QSA for XML documents, seems to work well enough for most use cases
dperini pushed to master at dperini/nwmatcher Wed Dec 02 11:35:01 -0800 2009
HEAD is c185e3d5890d0d1ea07a699e72bca2a89a0f67e4
  • Diego Perini committed c185e3d5:
    fixed 'lang' resolver to take in account any parent having the 'lang' attribute set (jdalton)
dperini pushed to master at dperini/nwmatcher Wed Dec 02 11:19:58 -0800 2009
HEAD is b33a7aff10c55e8fae3e8728379dcdda2f5c3965
  • Diego Perini committed b33a7aff:
    removed a couple of optimizations on compiled functions that are not strictly necessary for now
dperini pushed to master at dperini/nwmatcher Wed Dec 02 11:11:37 -0800 2009
HEAD is 41e2aac1bd0d738d6cc30fb4799ac3ea635b2bc2
  • Diego Perini committed 41e2aac1:
    removed currently unused code 'BUGGY_GEBID', 'BUGGY_DOM_LENGTH', 'isDisconnected', 'getDocumentType' and a related regular expression, they will be reintroduced in upcoming versions if necessary
dperini pushed to master at dperini/nwmatcher Wed Dec 02 10:59:47 -0800 2009
HEAD is bafeb51aa021986eadd57413a9dfe7acdef89d9a
  • Diego Perini committed bafeb51a:
    forked version 1.3.0, will remove unused code in master to freeze 1.2.0 for release
dperini pushed to master at dperini/nwmatcher Wed Dec 02 05:40:46 -0800 2009
HEAD is 0889a9e9e39ab40c1490cdda6304cfed8dd2197d
  • Diego Perini committed 0889a9e9:
    added resolver for the CSS3 'lang' pseudo-class, tweaked 'active', 'hover' to avoid XML documents, tweaked 'target' to check 'location' before using it and be more precise on the check for the 'href' property, removed unneeded cast to boolean in 'visited'
dperini pushed to master at dperini/nwmatcher Wed Dec 02 04:19:15 -0800 2009
HEAD is 9862353d06ec3401e711095b2c48ae8bc83e6bc4
  • Diego Perini committed 9862353d:
    changed variable name from 'element' to 'node' in get/hasAttribute to be consistent with what it contains, removed unneeded 'toLowerCase()' since get/hasAttribute are case-insensitive on attribute names (jdalton)
dperini pushed to master at dperini/nwmatcher Tue Dec 01 18:28:41 -0800 2009
HEAD is 3caae6c1b5aa1cc40e1500a2d01ee8e2fb67c803
  • Diego Perini committed 3caae6c1:
    added doctype detection to the ID resolver since properties may not be accessible on some host, use 'getAttribute' on those hosts
dperini pushed to master at dperini/nwmatcher Tue Dec 01 17:43:22 -0800 2009
HEAD is 0deae4ef15d0ae5ac50623bb08bba2875fc120d8
  • Diego Perini committed 0deae4ef:
    improved detection of correct insensitivity table to use, catches more cases for the parsed document type like HTML5, should probably be transformed in a method too
dperini pushed to master at dperini/nwmatcher Tue Dec 01 12:37:33 -0800 2009
HEAD is 798787eeecd91bd0e2672f57cab059b2901996b3
  • Diego Perini committed 798787ee:
    added document type detection in TAG resolver for sensitive nodeName match in XML documents
dperini commented on dperini/nwmatcher Tue Dec 01 12:24:26 -0800 2009
Comment in b94ea05:

It will fail the test for XML on IE. As said in IE the XMLDocument always contains both the "body" property and the "body" element/tag.

dperini commented on dperini/nwmatcher Tue Dec 01 11:58:34 -0800 2009
Comment in b94ea05:

The BODY property always exist... in IE also if no BODY tag is sent.

Don't get what you are testing.... if IE says the truth or what ?

dperini commented on dperini/nwmatcher Tue Dec 01 11:43:02 -0800 2009
Comment in b94ea05:

jdalton, in this way you just test if the 'body' property is available on the document host, not if the HTML contains a BODY tag. An HTML page not including the BODY is a perfectly valid HTML page not just an XML page as you assume. So I prefer to use what the browser makes available.

Even if you do it later, after "onload", it would be a missed assumption if no BODY tag is sent in the document.

Don't be fooled into thinking that IE is correct by in inserting the BODY tag automatically even for XML documents.

Use at least another browser out of IE for testing. ;-)

dperini commented on dperini/nwmatcher Tue Dec 01 11:32:06 -0800 2009
Comment in 123c748:

I didn't mean you shouldn't use 'this' keyword in general.
With good reasons I don't want to use it just in NWMatcher that's all. I use 'this' keyword very well in NWEvents for example.
Also for the same reasons in NWMatcher I avoid all reference to 'NW' and/or 'NW.Dom' and this is what makes it work in every environment I could test up to now. Even in FuseJS.

For the Slick tests I don't use them currently but I plan to include them too in my own repo as soon as they are in an usable state.

dperini commented on dperini/nwmatcher Tue Dec 01 10:01:32 -0800 2009
Comment in 8282c88:

It is to avoid declaring a new variable...

I could just call the argument "node" and it will acquire meaning in both places, for minification I opted to leave it as it was "element".

dperini commented on dperini/nwmatcher Tue Dec 01 09:57:34 -0800 2009
Comment in bdcae84:

jdalton,
I too wished it was so easy as you said. Have you tried it or are you just going by memory ?
Try what you say, on http://www.w3.org both with Firefox and Safari newest versions.
I am not saying who is correct, they just give different results from you feature test.
So I am just pondering other alternatives that work. It is not used yet.

It obviously depend ... it makes a difference if we want to guess from nodes in the document or if we are interested in the state of the DOM after the document has been parsed (the latter will tell if the browser have bugs).

dperini commented on dperini/nwmatcher Tue Dec 01 09:43:40 -0800 2009
Comment in b94ea05:

jdalton,
a first look in your code:

notHTML = !('body' in doc),

tells me that it is only checked once and the check is done when 'body' is not there yet ... So the 'notHTML' will not be set as you expect.
This means that in your code all selection will use the guessed default of the main document where NWMatcher was loaded first.

I still have a couplke of these things to sort out in my code ... working on it.

'body' is forbidden too for feature testing (it is not yet available), but it can be done in a lazy loading environment if you wish ;-)