Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Issue 2162863002: Add StringView constructor that takes a ref to save a branch in CSSTokenizerInputStream::rangeAt (Closed)

Created:
4 years, 5 months ago by esprehn
Modified:
4 years, 5 months ago
Reviewers:
haraken, Timothy Loh
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-wtf_chromium.org, chromium-reviews, dglazkov+blink, Mikhail, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/9d4b30269e660985f657126b21e7ace229ec2e07 Cr-Commit-Position: refs/heads/master@{#406375}

Patch Set 1 #

Patch Set 2 : typo. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -7 lines) Patch
M third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h View 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp View 1 chunk +0 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringView.h View 1 2 chunks +18 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/wtf/text/StringViewTest.cpp View 1 chunk +56 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (12 generated)
esprehn
4 years, 5 months ago (2016-07-19 08:40:21 UTC) #9
haraken
LGTM
4 years, 5 months ago (2016-07-19 19:56:05 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2162863002/20001
4 years, 5 months ago (2016-07-19 20:41:07 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-19 20:48:34 UTC) #15
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 20:48:36 UTC) #16
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 20:50:31 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/9d4b30269e660985f657126b21e7ace229ec2e07
Cr-Commit-Position: refs/heads/master@{#406375}

Powered by Google App Engine
This is Rietveld 408576698