Use ContainerNode::hasChildren() instead of firstChild() in conditionals

Use ContainerNode::hasChildren() instead of firstChild() in conditionals to
increase code readability a bit.

R=rob.buis@samsung.com

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179061 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move Node::lastDescendantOrSelf() to NodeTraversal and rename to lastWithinOrSelf()

Move Node::lastDescendantOrSelf() to NodeTraversal and rename to
lastWithinOrSelf() as this is a node traversal utility function and it avoids
code duplication with NodeTraversal::lastWithin().

R=esprehn@chromium.org, adamk@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179062 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove some setHasCustomStyleCallbacks calls

These calls do nothing and in fact cause extra cycles
in Element::styleForRenderer().

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179063 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove Traversal<Element> specializations for lastWithin() / previous()

Remove Traversal<Element> template specializations for lastWithin() /
previous() as they are now identical to the generic implementations after
r178540.

R=esprehn@chromium.org, abarth@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179064 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove stray comment about ConvertableToTraceFormat

The functions have been converted to ConvertableToTraceFormat
since this comment was introduced but it wasn't removed.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179065 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: Remove Document* pointers in objects

This CL replaces Document* pointers in objects with Member<Document>s.

- Move TextAutosizer to oilpan's heap.
- Move FastTextAutosizer to oilpan's heap.
- Make FastBulider STACK_ALLOCATED.
- Make ViewportStyleResolver::m_document a Member.

BUG=340522

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179066 bbb929c8-8fbe-4397-9dbb-9b2b20218538