Inline style parsing #49

Closed
wants to merge 235 commits into
from
Commits on Apr 9, 2012
  1. Origination.

    toolness committed Apr 9, 2012
  2. minor wording change

    toolness committed Apr 9, 2012
  3. Changed the spec so an element node's parseInfo has openTag and close…

    toolness committed Apr 9, 2012
    …Tag property intervals, rather than just start/end for the whole element and its contents.
  4. added more tests

    toolness committed Apr 9, 2012
Commits on Apr 10, 2012
  1. Added demo.

    toolness committed Apr 10, 2012
  2. CSS tweaks to demo

    toolness committed Apr 10, 2012
  3. more CSS tweaks

    toolness committed Apr 10, 2012
  4. attribute parsing works now

    toolness committed Apr 10, 2012
Commits on Apr 11, 2012
  1. swapped-in the new tokenizer

    toolness committed Apr 11, 2012
  2. turned the tokenizer into a parser; the lexing+parsing stages are now…

    toolness committed Apr 11, 2012
    … unified to (hopefully) provide better error feedback, and possibly easier to understand code.
  3. minor rewording of exception

    toolness committed Apr 11, 2012
  4. more TODOs

    toolness committed Apr 11, 2012
  5. another TODO

    toolness committed Apr 11, 2012
  6. TODO rewordings

    toolness committed Apr 11, 2012
  7. Changed the way parsing errors are reported a bit. Also added MISMATC…

    toolness committed Apr 11, 2012
    …HED_CLOSE_TAG error type.
  8. fixed a ParseError bug and added decent feedback for the MISMATCHED_C…

    toolness committed Apr 11, 2012
    …LOSE_TAG error in the demo.
  9. Added Slowparse.findError() to make spec document shorter, and API ea…

    toolness committed Apr 11, 2012
    …sier to use for just error reporting.
  10. changed ParseError format yet again. It's now decoupled from any gene…

    toolness committed Apr 11, 2012
    …rated DOM nodes, and is pure JSON... not sure if that's a good idea or not, but it seems like we might want to use this in situations where we're not generating a DOM.
  11. tag name of ParseErrors is retrieved via e.g. error.openTag.name inst…

    toolness committed Apr 11, 2012
    …ead of error.openTagName.
Commits on Apr 12, 2012
  1. added an intro to the spec.

    toolness committed Apr 12, 2012
  2. minor capitalization change

    toolness committed Apr 12, 2012
  3. Factored out all the verbose ParseError.parseInfo-generating code int…

    toolness committed Apr 12, 2012
    …o a separate object, ParseErrorBuilders.
  4. added UNQUOTED_ATTR_VALUE error. Less information is reported in this…

    toolness committed Apr 12, 2012
    … one, but hopefully that's ok for now.
  5. UNTERMINATED_CLOSE_TAG now applies regardless of whether the close ta…

    toolness committed Apr 12, 2012
    …g is at the end of the stream or not.
Commits on Apr 13, 2012
  1. refactored tests a bit

    toolness committed Apr 13, 2012
  2. added support for basic named character entity references lt, gt, quo…

    toolness committed Apr 13, 2012
    …t, and amp. no support for numeric character entity references yet. the parsing, like .innerHTML, is quite forgiving, b/c if it wasn't, lots of technically invalid HTML would fail--e.g. URLs with multiple querystring args in text or attribute values.
  3. updated slowparse with CSS parsing

    Mike Kamermans
    Mike Kamermans committed Apr 13, 2012
Commits on Apr 14, 2012
Commits on Apr 16, 2012
  1. finished up preliminary CSS parsing

    Mike Kamermans
    Mike Kamermans committed Apr 16, 2012
  2. Merge remote branch 'pomax/gh-pages' into pomax-css-parsing. However,…

    toolness committed Apr 16, 2012
    … I simply reverted demo/index.html to its state in commit 3d7cc70 rather than merging pomax's changes from 5562fa3 because merging the two revisions was very complicated and pomax's changes to the file were minor. They can be re-merged in a separate pull request.
    
    Conflicts:
    	demo/index.html
    	slowparse.js
    	test/index.html
  3. added HTML element knowledge, changed the gobbling for tagnames to \w…

    Mike Kamermans
    Mike Kamermans committed Apr 16, 2012
    …\d rather than \w to accomodate h1...h6
  4. Merge pull request #2 from Pomax/gh-pages

    toolness committed Apr 16, 2012
    html updates
  5. turned CSS errors into nice errors

    Mike Kamermans
    Mike Kamermans committed Apr 16, 2012
  6. in editor, offending text in malformed HTML/CSS is now highlighted by…

    toolness committed Apr 16, 2012
    … default; user does not have to mouseover 'here'.
  7. like INVALID_TAG_NAME, INVALID_CSS_PROPERTY_NAME now reports the name…

    toolness committed Apr 16, 2012
    … of the CSS property.
Commits on Apr 17, 2012
  1. added hacktionary data, though it doesn't yet contain docs on attribu…

    toolness committed Apr 17, 2012
    …tes. in editor, html/css suggestions now show blurbs from hacktionary.
  2. Added more extensive parseInfo structure to a <style> element's text …

    toolness committed Apr 17, 2012
    …node. Right now the implementation isn't great, but I'm mostly going for correctness in the tests--once we have a good test suite, we can start refactoring the implementation to be cleaner.
  3. added another CSS test.

    toolness committed Apr 17, 2012
  4. more CSS tests, one fix.

    toolness committed Apr 17, 2012
  5. added TODO to CSSParser.

    toolness committed Apr 17, 2012
Commits on Apr 18, 2012
  1. added a TODO to editor.

    toolness committed Apr 18, 2012
  2. modified TODO in editor.

    toolness committed Apr 18, 2012
  3. highlight relevant parts of code that we're giving help on as the use…

    toolness committed Apr 18, 2012
    …r moves cursor through text.
  4. minor CSS tweak to editor

    toolness committed Apr 18, 2012
  5. add support for parsing basic HTML5 doctype (but not generalized doct…

    toolness committed Apr 18, 2012
    …ypes). Also added stream.match() for strings.
  6. Regression test for #6.

    toolness committed Apr 18, 2012
Commits on Apr 20, 2012
  1. updated slowparse with much better CSS error reporting, and source do…

    Mike Kamermans
    Mike Kamermans committed Apr 20, 2012
    …cumentation. still need to update the spec/unit tests
  2. updated spec

    Mike Kamermans
    Mike Kamermans committed Apr 20, 2012
  3. fixed up slowparse so that it passes unit tests, fixes in error messa…

    Mike Kamermans
    Mike Kamermans committed Apr 20, 2012
    …ges and spec to match
  4. typo fixes

    Mike Kamermans
    Mike Kamermans committed Apr 20, 2012
  5. Merge pull request #16 from Pomax/gh-pages

    toolness committed Apr 20, 2012
    early pull request for updated slowparse/errors
Commits on Apr 23, 2012
  1. Changed the comment docs up to (but not including) the Stream class t…

    toolness committed Apr 23, 2012
    …o be more docco/literate-programming-friendly.
  2. docco-ified CSSParser.

    toolness committed Apr 23, 2012
  3. rogue semi-color

    Mike Kamermans
    Mike Kamermans committed Apr 23, 2012
  4. added css comment unit test

    Mike Kamermans
    Mike Kamermans committed Apr 23, 2012
  5. css comments unit test

    Mike Kamermans
    Mike Kamermans committed Apr 23, 2012
  6. Merge branch 'pomax-gh-pages' into gh-pages, docco-ified some of the …

    toolness committed Apr 23, 2012
    …comments.
    
    Conflicts:
    	slowparse.js
  7. bugfix for incorrect error signal on an empty declaration block that …

    Mike Kamermans
    Mike Kamermans committed Apr 23, 2012
    …is not 'empty' due to comments only
  8. Inlined HTMLParser._parseQuotedAttributeValue(), since it was only us…

    toolness committed Apr 23, 2012
    …ed once and just made the code harder to understand.
  9. Rearranged the ordering of HTMLParser function definitions to make th…

    toolness committed Apr 23, 2012
    …e workings of the class easier to understand.
  10. fixed broken CSS unit test and added another 'MISSING_CSS_SELECTOR wo…

    toolness committed Apr 23, 2012
    …rks after comment' test.
Commits on Apr 24, 2012
  1. added very basic publish/remix functionality courtesy of webpagemaker…

    toolness committed Apr 24, 2012
    …api.vcap.mozillalabs.com.
  2. restyled editor page

    Mike Kamermans
    Mike Kamermans committed Apr 24, 2012
  3. made things work on IE, Chrome and Firefox

    Mike Kamermans
    Mike Kamermans committed Apr 24, 2012
  4. IE specific CSS filter

    Mike Kamermans
    Mike Kamermans committed Apr 24, 2012
  5. upstream gh-page sync

    Pomax committed Apr 24, 2012
  6. Merge pull request #19 from Pomax/gh-pages

    toolness committed Apr 24, 2012
    restyled editor page
Commits on Apr 25, 2012
  1. Merge pull request #22 from Pomax/gh-pages

    toolness committed Apr 25, 2012
    fixed vendor prefix CSS being rejected
  2. Added .gitignore.

    toolness committed Apr 25, 2012
  3. Parsing of self-closing tags for void elements now works. Added SELF_…

    toolness committed Apr 25, 2012
    …CLOSING_NON_VOID_ELEMENT error for the other tags. This fixes #23.
Commits on Apr 26, 2012
  1. The editor now only checks for HTML errors and refreshes the preview …

    toolness committed Apr 26, 2012
    …300 milliseconds after the most recent user keypress. This is how lovebomb.me etc. work and it's particularly helpful for making the app feel responsive. For our error reporting, it's also nice because it means that "errors" the user doesn't need to see won't be shown if they type fast enough, as the user is "correcting" their errors before Slowparse is called upon to evaluate the HTML.
Commits on Apr 27, 2012
  1. Added a plugin/extension called `noscript.slowparse.js` which adds a …

    toolness committed Apr 27, 2012
    …`NoscriptDOMBuilder` class that can be used to pre-emptively warn the user that their JS won't be honored. It's not intended as a sanitizer--merely as a way to provide real-time feedback to users that their JS will be stripped.
  2. Parsing of HTML is now case-insensitive, and lowercased names of tags…

    toolness committed Apr 27, 2012
    …/attrs are passed to DOMBuilder.
  3. split out all the utility functions from test-slowparse.js into a sep…

    toolness committed Apr 27, 2012
    …arate file, testing-utils.js.
  4. The editor now provides instant feedback to users when they try addin…

    toolness committed Apr 27, 2012
    …g the most common forms of JavaScript to their page, and directs them to jsbin/jsfiddle if they really need JS support.
  5. Added a test to make sure that code in <script> tags isn't accidental…

    toolness committed Apr 27, 2012
    …ly executed during parsing. (It's only executed if the generated document fragment is appended to the document.)
  6. Merge pull request #26 from Pomax/gh-pages

    toolness committed Apr 27, 2012
    this should fix @font-face failures
Commits on Apr 30, 2012
  1. Replaced noscript.slowparse.js with tree-inspectors.js. The new libra…

    toolness committed Apr 30, 2012
    …ry just contains utility functions for inspecting the DOM tree generated by slowparse, and has no hard dependencies on slowparse--clients of it, like the editor, can trivially use the .parseInfo property of nodes returned by an inspector to map back to the original source code if necessary.
    
    This is nice because it means that Slowparse doesn't need to expose DOMBuilder; instead, the TreeWalkers use the DOM API to do everything they need.
  2. comment parsing fix due to firefox rejecting createComment('--') and …

    U-MICHIELKAMECC18\Pomax U-MICHIELKAMECC18\Pomax
    U-MICHIELKAMECC18\Pomax authored and U-MICHIELKAMECC18\Pomax committed Apr 30, 2012
    …variations
  3. Merge pull request #31 from Pomax/gh-pages

    toolness committed Apr 30, 2012
    fix for "--" parsing in comments
  4. add regression test for #32.

    toolness committed Apr 30, 2012
  5. Added a simple optional 'error detectors' argument to Slowparse.HTML …

    toolness committed Apr 30, 2012
    …which allows some kinds of error detection to be optional.
    
    Added TreeInspectors.forbidJS, which is	an error detector that reports when forbidden JS policies are violated.
  6. error name title in spec.html is now set to the expected error type r…

    toolness committed Apr 30, 2012
    …ather than the real one.
Commits on May 1, 2012
  1. Removed demo, spec, and editor's dependency on underscore.js by embed…

    toolness committed May 1, 2012
    …ding its template functionality in errors.jquery.js (as our error message logic is the only thing that requires templating).
  2. Moved the specification and its dependencies to the 'spec' directory.…

    toolness committed May 1, 2012
    … Among other things, this makes the specification "production" code whose utility libraries, particularly errors.jquery.js, can be used by clients. (Everything in 'demo' is still experimental hacked-together stuff.)
  3. added better exception messages to jQuery.fn.fillError() and a test s…

    toolness committed May 1, 2012
    …uite for errors.jquery.js.
  4. Added jQuery.errorTemplates and removed jQuery.loadMany(). jQuery.fn.…

    toolness committed May 1, 2012
    …fillError() now takes an optional second argument.
  5. better error feedback for specification tests. They now also test to …

    toolness committed May 1, 2012
    …make sure that each error spec has a friendly error message that executes properly.
  6. test-spec.js now delegates all testing to the specification iframe on…

    toolness committed May 1, 2012
    …ce it's done loading. Putting the test logic closer to the spec-generating code should help ensure that the two don't go out of sync, since the spec-generating code doesn't really have a public API that's expected to be maintained.
Commits on May 7, 2012
  1. For unknown html tag/css property error messages, include a link to l…

    toolness committed May 7, 2012
    …ists of HTML5 tags/CSS3 properties so users aren't left hanging.
Commits on May 8, 2012
Commits on May 11, 2012
  1. added apostrophe-quoted attribute parsing to slowparse. Also deleted …

    Pomax committed May 11, 2012
    …an obsolete spec.html
Commits on May 13, 2012
Commits on May 14, 2012
  1. Merge pull request #34 from Pomax/gh-pages

    Pomax committed May 14, 2012
    added ' parsing for attributes
  2. typo O_O

    Pomax committed May 14, 2012
Commits on May 15, 2012
  1. Merge pull request #35 from Pomax/gh-pages

    toolness committed May 15, 2012
    made accidental css nesting detectable (a { p { ...)
Commits on May 19, 2012
Commits on May 22, 2012
Commits on May 26, 2012
  1. adding MPL2 license

    davidascher committed May 26, 2012
Commits on May 28, 2012
  1. made slowparse take note of HTML in CSS context, throwing a new HTML_…

    Pomax committed May 28, 2012
    …CODE_IN_CSS_BLOCK error
Commits on May 29, 2012
  1. changed interval start/end marking in CSS context so that leading/tra…

    Pomax committed May 29, 2012
    …iling comments are not taken into account
Commits on May 30, 2012
  1. Merge pull request #40 from Pomax/gh-pages

    Pomax committed May 30, 2012
    merged after PR by jbuck
Commits on Jun 15, 2012
Commits on Jun 16, 2012
Commits on Jun 19, 2012
  1. temp commit for future work

    Pomax committed Jun 19, 2012
Commits on Jun 20, 2012
  1. Merge pull request #1 from toolness/textarea-cdata

    Pomax committed Jun 20, 2012
    Textarea cdata test fix
  2. Merge pull request #45 from Pomax/textarea-cdata

    toolness committed Jun 20, 2012
    added CDATA intepreting, rather than markup parsing, for textarea content
Commits on Jun 21, 2012
  1. html5!

    Pomax committed Jun 21, 2012
Commits on Jun 22, 2012
  1. added test cases

    Pomax committed Jun 22, 2012
Commits on Jun 26, 2012
Commits on Jun 27, 2012
  1. additional testing for SVG

    Pomax committed Jun 27, 2012
Commits on Jul 10, 2012
Commits on Jul 27, 2012
  1. Merge pull request #47 from Pomax/svg-enabled

    toolness committed Jul 27, 2012
    Svg enabled
Commits on Aug 28, 2012
  1. first stab

    Pomax committed Aug 28, 2012
Commits on Aug 29, 2012
  1. rogue space

    Pomax committed Aug 29, 2012