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

Issue 209503003: Convert MediaQueryTokenizer's codepoints array to be static data (Closed)

Created:
6 years, 9 months ago by Yoav Weiss
Modified:
6 years, 9 months ago
CC:
blink-reviews, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis, Timothy Loh
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Convert MediaQueryTokenizer's codepoints array to be static data. Since there's no reason that the MediaQueryTokenizer's codepoints array would be created dynamically, I've created it here as an initialized array. I used the build scripts to do that. BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170074

Patch Set 1 #

Patch Set 2 : Compiles on g++. Cleaner codePoints array #

Patch Set 3 : Newline at end of generated file #

Total comments: 3

Patch Set 4 : Refactored python code #

Total comments: 3

Patch Set 5 : Fix review nits #

Total comments: 1

Patch Set 6 : Dynamic file name in comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -48 lines) Patch
A Source/build/scripts/make_mediaquery_tokenizer_codepoints.py View 1 2 3 4 5 1 chunk +85 lines, -0 lines 0 comments Download
M Source/core/core_generated.gyp View 1 chunk +16 lines, -0 lines 0 comments Download
M Source/core/css/parser/MediaQueryTokenizer.h View 1 3 chunks +2 lines, -5 lines 0 comments Download
M Source/core/css/parser/MediaQueryTokenizer.cpp View 1 2 chunks +5 lines, -43 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Yoav Weiss
As we discussed, I've turned the codepoints array to an initialized one, to avoid dynamically ...
6 years, 9 months ago (2014-03-23 09:07:43 UTC) #1
eseidel
I wonder if there is template technology that we should use here. Overall this looks ...
6 years, 9 months ago (2014-03-23 15:35:03 UTC) #2
eseidel
I really appreciate you doing this btw. Every time we have one of these heap-allocated ...
6 years, 9 months ago (2014-03-23 15:35:58 UTC) #3
Yoav Weiss
On 2014/03/23 15:35:03, eseidel wrote: > I wonder if there is template technology that we ...
6 years, 9 months ago (2014-03-23 15:39:56 UTC) #4
Yoav Weiss
On 2014/03/23 15:39:56, Yoav Weiss wrote: > On 2014/03/23 15:35:03, eseidel wrote: > > I ...
6 years, 9 months ago (2014-03-23 17:19:22 UTC) #5
Nils Barth (inactive)
Pythonicness tips to make the code a bit more legible. https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py File Source/build/scripts/make_mediaquery_tokenizer_codepoints.py (right): https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py#newcode54 ...
6 years, 9 months ago (2014-03-24 01:34:23 UTC) #6
Nils Barth (inactive)
On 2014/03/23 17:19:22, Yoav Weiss wrote: > (Does Rietveld have a way to upload attachments ...
6 years, 9 months ago (2014-03-24 01:48:37 UTC) #7
Timothy Loh
https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py File Source/build/scripts/make_mediaquery_tokenizer_codepoints.py (right): https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py#newcode54 Source/build/scripts/make_mediaquery_tokenizer_codepoints.py:54: if c in ['\n', '\r', '\t', '\f', ' ']: ...
6 years, 9 months ago (2014-03-24 03:22:19 UTC) #8
Nils Barth (inactive)
https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py File Source/build/scripts/make_mediaquery_tokenizer_codepoints.py (right): https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py#newcode54 Source/build/scripts/make_mediaquery_tokenizer_codepoints.py:54: if c in ['\n', '\r', '\t', '\f', ' ']: ...
6 years, 9 months ago (2014-03-24 03:24:26 UTC) #9
Yoav Weiss
On 2014/03/24 03:24:26, Nils Barth wrote: > https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py > File Source/build/scripts/make_mediaquery_tokenizer_codepoints.py (right): > > https://codereview.chromium.org/209503003/diff/40001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py#newcode54 ...
6 years, 9 months ago (2014-03-24 09:53:30 UTC) #10
Nils Barth (inactive)
Few nits/tips, but otherwise Python looks great! https://codereview.chromium.org/209503003/diff/60001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py File Source/build/scripts/make_mediaquery_tokenizer_codepoints.py (right): https://codereview.chromium.org/209503003/diff/60001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py#newcode25 Source/build/scripts/make_mediaquery_tokenizer_codepoints.py:25: codepoints = ...
6 years, 9 months ago (2014-03-25 02:51:46 UTC) #11
Yoav Weiss
On 2014/03/25 02:51:46, Nils Barth wrote: > Few nits/tips, but otherwise Python looks great! > ...
6 years, 9 months ago (2014-03-26 09:07:31 UTC) #12
Nils Barth (inactive)
https://codereview.chromium.org/209503003/diff/70001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py File Source/build/scripts/make_mediaquery_tokenizer_codepoints.py (right): https://codereview.chromium.org/209503003/diff/70001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py#newcode15 Source/build/scripts/make_mediaquery_tokenizer_codepoints.py:15: // Auto-generated by make_mediaquery_tokenizer_codepoints.py This is fragile to renaming; ...
6 years, 9 months ago (2014-03-26 09:13:38 UTC) #13
Yoav Weiss
On 2014/03/26 09:13:38, Nils Barth wrote: > https://codereview.chromium.org/209503003/diff/70001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py > File Source/build/scripts/make_mediaquery_tokenizer_codepoints.py (right): > > https://codereview.chromium.org/209503003/diff/70001/Source/build/scripts/make_mediaquery_tokenizer_codepoints.py#newcode15 ...
6 years, 9 months ago (2014-03-26 09:25:36 UTC) #14
eseidel
rslgtm.
6 years, 9 months ago (2014-03-26 15:23:47 UTC) #15
Yoav Weiss
The CQ bit was checked by yoav@yoav.ws
6 years, 9 months ago (2014-03-26 15:25:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoav@yoav.ws/209503003/180001
6 years, 9 months ago (2014-03-26 15:25:08 UTC) #17
commit-bot: I haz the power
6 years, 9 months ago (2014-03-26 17:55:22 UTC) #18
Message was sent while issue was closed.
Change committed as 170074

Powered by Google App Engine
This is Rietveld 408576698