Specs: Define when needsLayout is reset (also, some unrelated markdown fixes)

Review URL: https://codereview.chromium.org/732243002