shadow-dom: Fixed indent style and performance improvement

Reflects the comment of the review of PR #140 and #157.
Merge pull request #210 from summerwind/submission/summerwind

shadow-dom: Fixed indent style and performance improvement