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

Issue 252743004: A thread safe CSS calc parser for sizes (Closed)

Created:
6 years, 7 months ago by Yoav Weiss
Modified:
6 years, 7 months ago
CC:
blink-reviews, kenneth.christiansen, ed+blinkwatch_opera.com, ojan, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis, alancutter (OOO until 2018)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

A thread safe CSS calc parser for sizes The sizes attribute parsing requires calc() parsing and evaluation. This CL adds a thread safe calc parser (for unsigned length values). BUG=357586 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172992

Patch Set 1 #

Patch Set 2 : removed linespace #

Total comments: 1

Patch Set 3 : Spec alignment. Renamed to SizesCalcParser. #

Patch Set 4 : Pass mediaValues to SizesCalcParser #

Patch Set 5 : Enable calc() inside sizes #

Patch Set 6 : Revert last patch, will include it in a separate commit #

Total comments: 2

Patch Set 7 : Review nits #

Total comments: 4

Patch Set 8 : Fixed review comments. Added tests. Fixed bugs. #

Patch Set 9 : Fixed link issues #

Patch Set 10 : Removed CSSCalc tests that assert #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -47 lines) Patch
M Source/build/scripts/make_mediaquery_tokenizer_codepoints.py View 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/core.gypi View 1 2 5 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/css/MediaValues.h View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -1 line 0 comments Download
M Source/core/css/MediaValues.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
M Source/core/css/MediaValuesCached.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/MediaValuesCached.cpp View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/css/MediaValuesDynamic.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/MediaValuesDynamic.cpp View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/css/parser/MediaConditionTest.cpp View 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/parser/MediaQueryParser.h View 5 2 chunks +2 lines, -5 lines 0 comments Download
M Source/core/css/parser/MediaQueryParser.cpp View 5 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/parser/MediaQueryToken.h View 1 2 3 4 5 6 7 3 chunks +25 lines, -23 lines 0 comments Download
M Source/core/css/parser/MediaQueryToken.cpp View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
M Source/core/css/parser/MediaQueryTokenizer.h View 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/parser/MediaQueryTokenizer.cpp View 5 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/css/parser/SizesAttributeParser.h View 5 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/parser/SizesAttributeParser.cpp View 5 4 chunks +10 lines, -10 lines 0 comments Download
A Source/core/css/parser/SizesCalcParser.h View 1 2 3 4 5 6 7 1 chunk +59 lines, -0 lines 0 comments Download
A Source/core/css/parser/SizesCalcParser.cpp View 1 2 3 4 5 6 7 8 1 chunk +214 lines, -0 lines 0 comments Download
A Source/core/css/parser/SizesCalcParserTest.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +136 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Yoav Weiss
6 years, 7 months ago (2014-04-28 19:00:44 UTC) #1
eseidel
So currently our calc parsing is not thread-safe? As in via the bison? And this ...
6 years, 7 months ago (2014-04-28 19:05:53 UTC) #2
Yoav Weiss
On 2014/04/28 19:05:53, eseidel wrote: > So currently our calc parsing is not thread-safe? As ...
6 years, 7 months ago (2014-04-28 19:59:52 UTC) #3
eseidel
Is the plan to switch to your new calc parser on the main thread too?
6 years, 7 months ago (2014-04-28 22:39:52 UTC) #4
eseidel
This looks fine to me. I would like Alan or Mike to take a look ...
6 years, 7 months ago (2014-04-29 04:50:07 UTC) #5
Mike Lawther (Google)
I don't understand why this needs to be threadsafe in media query parsing, but I ...
6 years, 7 months ago (2014-04-29 06:29:16 UTC) #6
Yoav Weiss
On 2014/04/29 04:50:07, eseidel wrote: > This looks fine to me. I would like Alan ...
6 years, 7 months ago (2014-04-29 07:09:39 UTC) #7
Yoav Weiss
On 2014/04/29 06:29:16, Mike Lawther (Google) wrote: > I don't understand why this needs to ...
6 years, 7 months ago (2014-04-29 07:16:13 UTC) #8
Yoav Weiss
On 2014/04/29 07:16:13, Yoav Weiss wrote: > On 2014/04/29 06:29:16, Mike Lawther (Google) wrote: > ...
6 years, 7 months ago (2014-04-29 08:43:18 UTC) #9
Yoav Weiss
I've aligned the implementation according to the spec, and minimized its coverage. It now only ...
6 years, 7 months ago (2014-04-29 10:02:29 UTC) #10
eseidel
OK, so this is sizes-only. Our options are either to teach the existing calc implementation ...
6 years, 7 months ago (2014-04-29 17:30:36 UTC) #11
Yoav Weiss
On 2014/04/29 17:30:36, eseidel wrote: > OK, so this is sizes-only. Our options are either ...
6 years, 7 months ago (2014-04-29 19:32:01 UTC) #12
alancutter (OOO until 2018)
Would you be able to add a test to check that we get the same ...
6 years, 7 months ago (2014-04-30 04:02:17 UTC) #13
Yoav Weiss
On 2014/04/30 04:02:17, alancutter wrote: > Would you be able to add a test to ...
6 years, 7 months ago (2014-04-30 13:55:46 UTC) #14
Yoav Weiss
The CQ bit was checked by yoav@yoav.ws
6 years, 7 months ago (2014-04-30 14:48:51 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoav@yoav.ws/252743004/160001
6 years, 7 months ago (2014-04-30 14:49:14 UTC) #16
commit-bot: I haz the power
6 years, 7 months ago (2014-04-30 15:27:59 UTC) #17
Message was sent while issue was closed.
Change committed as 172992

Powered by Google App Engine
This is Rietveld 408576698