Bump html5 so that jsdom becomes an optional dep.

Merged upstream in,
https://github.com/aredridel/html5/pull/93

Changes to the selser output are most likely due to,
https://github.com/aredridel/html5/pull/88

Change-Id: I5b409022c05c308b09d3b6d10ea45894a40e5edb
Don't encapsulate when fosterbox is in transclusion.

Fixes a regression introduced in
1dba828d7eddf9f00aea6b47242ecfc4aedcdd07.

Change-Id: I2ebf49406276eeed1c46830b150fccafda5640d3
Minor code tweak.

Change-Id: I50b6f0f54026663561b55f48973eb91266a2cf67
Use just the 'Parsoid/0.1' user agent so that we don't distort stats

We don't want to distort the browser stats at
http://stats.wikimedia.org/wikimedia/squids/SquidReportClients.htm, so don't
masquerade as Firefox.

Change-Id: I26349e7751368f943c1b5e07f98100f5715463a7
Use table's tsr info for encapsulating transclusion meta.

The earlier implementation searched the table's siblings for tsr[0] to
avoid the case where the table's tsr[1] wasn't present.

However, since d05894f170ba8e9a712099d3e6e6cd48ff53808d, encapsulation
doesn't happen when the foster box, and thus the table, are in the
transclusion. So, tsr[1] should always be available.

Fixes regression introduced in 1dba828d7eddf9f00aea6b47242ecfc4aedcdd07.

Change-Id: I2da552b102c666f4942f07b1ac56163552d2a401
Merge "Use table's tsr info for encapsulating transclusion meta."
Add a test for DSR update bug.

The issue was fixed in ef177673207c211e554dbb32cba2ed278a40c53f.

Change-Id: If0b912e8f8c5227dc87b8cd95c5ce6deec98874e
Merge "Add a test for DSR update bug."
Use html5 release.

Change-Id: I3540b529bcec1f83b8e32e96f5814f2cbb2a6c04
(Bug 48570) Fix subtle selser bug handling separator-only nodes

* When the original source for an element node whose content
  was entirely made up of separator text, selser duplicated the
  separator in leading and trailing separators. This manifested
  in the various bug reports around an extra space before links
  and colons (which introduces an &nbsp; <span> which exhibits
  this separator-only node behavior and causes the single-space
  duplication reported in the bug reports).

* This patch also fixes 11 additional selser tests.

Change-Id: Ibbc97e2eeb93fff56beb3fdc9cb2875ceb3e100b
Tweaks to tokenizing and bug fixes for escaping of behavior switches

* While debugging RT failures on en:Duke_of_Aveiro because of
  excessive nowiki escaping, discovered that escaping was getting
  tripped by behavior switch tokenizing. Then discovered that the
  existing wikitext escaping was completely missing escaping
  for magic-words.

* This patch adds escaping for text that would parse as magic words.
  In addition, it also adds checks to not trip on magic-word-like
  syntax which fixes the RT problems on en:Duke_of_Aveiro

* Added new parser tests for this behavior.

* Cleaned up debugging/tracing for wikitext escaping.
* Added tracing of wikitext escaping logic (--trace wt-escape)
* Added tracing to spit out tokenizer tokens only (--trace peg-tokens)

* Most RT failures on en:Duke_of_Aveiro are now fixed -- the remaining
  issue will be investigated in a new patch since it doesn't seem
  related to behavior switch handling.

Change-Id: Icef5d313f380261502da7fcbddc4e48c304b64d9
Eliminate redundant work in the quote minimization pass

* Quote minimization code was doing redundant passes over the
  same dom-tree when skipping over text nodes -- in the worst
  case, this used to cause exponential behavior.

* Cleaned up the min_a and min_b flags to more accurately reflect
  progress when DOM has not changed because of combine or swap.

* This fixes serialization times on pl:Zarazowate and it:Poposaurus
  which used to take 944 and 569 secs respectively in rt-testing.

Change-Id: I901034e70ba0c88e3ede61c517b62c85ea80226e
Change perfstat size:domserialized to size:wikitext.

- Show the perfstats for the correct last 10 commits, instead of the first 10.
- Protect against null perfstats, which can happen when renaming or adding
new ones.

Change-Id: Ic0949385ac7ed8829479437bc5e493438d707765
Clean up inTransclusion flags.

Bug: 54355
Change-Id: I0fa30ea9cac7bd0d1050964cedd9f45d9dab4c3a
Merge "(Bug 48570) Fix subtle selser bug handling separator-only nodes"
Merge "Eliminate redundant work in the quote minimization pass"
Further reduce redundant work in the quote-minimization pass.

We were still revisiting an entire subtree after a merge/combine, even
though the grandchildren of the node in question were all unmodified.
Be more careful about recursion when we revisit nodes, since we know
that the children are all properly minimized at that point.

Change-Id: If8c48c4dbf30975d41843c61d16618bc2bdc951f
Merge "Tweaks to tokenizing and bug fixes for escaping of behavior switches"
Fix parserTests.js --filter

In node 0.10, we get a bunch of "recursive invocation of process.nextTick, use
setImmediate" errors on console when we use --filter.  Switch to setImmediate
to make node happy, and add a compatibility thunk in core-upgrade.js so that
we still work fine on node 0.8 as well.

Change-Id: I55679b2144bf71e6093bd77507e426ce4250989a
Merge "Further reduce redundant work in the quote-minimization pass."