solved Bug 1033630

Request to review and merge solution for Bug 1033630.
please fix spacing here, for example;
else {
    textNode = value || 0;
    ....
}
^ notice 4 space indentation inside of block, new line for terminating } and space between else and {.  Please do this throughout the entire set of changes.