Add StringView constructor that takes a ref to save a branch in CSSTokenizerInputStream::rangeAt.
CSSTokenizerInputStream never has a null m_string so the null check in StringView's
constructor is just waste. It also makes the code bigger if we were to inline the
function since we need both the null (clear()) and the non-null (set()) code from
StringView.
Lets introduce a StringView constructor set that takes a StringImpl& and then
use it in CSSTokenizerInputStream::rangeAt() allowing us to skip the branch.
I then also made the function inline.
BUG=615174,605792
Review-Url: https://codereview.chromium.org/2162863002
Cr-Commit-Position: refs/heads/master@{#406375}
4 files changed