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

Issue 1348363004: Add consumeInteger/consumeLength (Closed)

Created:
5 years, 3 months ago by rwlbuis
Modified:
5 years, 2 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, dglazkov+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add consumeInteger/consumeLength Add consumeInteger/consumeLength and make use of them to convert word-spacing, letter-spacing and tab-size. BUG=499780 Committed: https://crrev.com/9ef67bebf05c04671cbf1aa782d4adf8d3cfab26 Cr-Commit-Position: refs/heads/master@{#351483}

Patch Set 1 #

Patch Set 2 : First stab #

Patch Set 3 : Fix build #

Total comments: 4

Patch Set 4 : add calc support #

Patch Set 5 : Convert tab-size to test calc better #

Patch Set 6 : Move non-neg check #

Patch Set 7 : Make this a chromium project #

Patch Set 8 : Retry #

Total comments: 3

Patch Set 9 : Address review comments round I #

Patch Set 10 : round II #

Total comments: 3

Patch Set 11 : Address review comments #

Patch Set 12 : Add back calcFunction calls #

Total comments: 2

Patch Set 13 : Add CalcParseScope and tests #

Total comments: 5

Patch Set 14 : Patch for landing #

Messages

Total messages: 32 (5 generated)
rwlbuis
PTAL. I did a first stab at implementing consumeNumericValue as we discussed in a previous ...
5 years, 3 months ago (2015-09-18 22:00:40 UTC) #2
Timothy Loh
IMO calc() should be pretty easy to wire up since we just return a different ...
5 years, 3 months ago (2015-09-22 13:54:25 UTC) #3
rwlbuis
On 2015/09/22 13:54:25, Timothy Loh wrote: > IMO calc() should be pretty easy to wire ...
5 years, 3 months ago (2015-09-22 22:06:19 UTC) #4
rwlbuis
> > PTAL! :) Note that latest CL is now applicable post-merge.
5 years, 3 months ago (2015-09-24 22:47:05 UTC) #6
alancutter (OOO until 2018)
https://codereview.chromium.org/1348363004/diff/160001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1348363004/diff/160001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode182 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:182: static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> consumeNumericValue(CSSParserTokenRange& range, CSSPropertyParser::Units unitflags, CSSParserMode cssParserMode) After ...
5 years, 2 months ago (2015-09-25 04:13:06 UTC) #7
Timothy Loh
On 2015/09/25 04:13:06, alancutter wrote: > Places that currently use validUnit(FLength | FNumber) would use ...
5 years, 2 months ago (2015-09-25 04:40:00 UTC) #8
Timothy Loh
https://codereview.chromium.org/1348363004/diff/160001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1348363004/diff/160001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode186 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:186: CSSParserTokenRange args = consumeFunction(range); BTW this will advance the ...
5 years, 2 months ago (2015-09-25 04:44:33 UTC) #9
rwlbuis
On 2015/09/25 04:44:33, Timothy Loh wrote: > https://codereview.chromium.org/1348363004/diff/160001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp > File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): > > https://codereview.chromium.org/1348363004/diff/160001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode186 ...
5 years, 2 months ago (2015-09-27 21:03:20 UTC) #10
rwlbuis
On 2015/09/25 04:40:00, Timothy Loh wrote: > On 2015/09/25 04:13:06, alancutter wrote: > > Places ...
5 years, 2 months ago (2015-09-27 21:04:22 UTC) #11
rwlbuis
On 2015/09/25 04:13:06, alancutter wrote: > After discussing with timloh we decided that splitting up ...
5 years, 2 months ago (2015-09-27 21:07:40 UTC) #12
alancutter (OOO until 2018)
> I implemented a subset of above, PTAL. I think we can introduce the others ...
5 years, 2 months ago (2015-09-27 23:13:38 UTC) #13
rwlbuis
On 2015/09/27 23:13:38, alancutter wrote: > https://codereview.chromium.org/1348363004/diff/200001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp > File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): > > https://codereview.chromium.org/1348363004/diff/200001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode144 > ...
5 years, 2 months ago (2015-09-28 14:03:02 UTC) #14
rwlbuis
On 2015/09/28 14:03:02, rwlbuis wrote: > PTAL. Ouch, I noticed that consumeFunction calls were lacking ...
5 years, 2 months ago (2015-09-28 21:54:23 UTC) #15
alancutter (OOO until 2018)
lgtm with nit and comment. https://codereview.chromium.org/1348363004/diff/240001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1348363004/diff/240001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode133 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:133: if (token.numericValueType() == NumberValueType ...
5 years, 2 months ago (2015-09-28 23:40:04 UTC) #16
Timothy Loh
On 2015/09/27 21:03:20, rwlbuis wrote: > On 2015/09/25 04:44:33, Timothy Loh wrote: > > > ...
5 years, 2 months ago (2015-09-29 00:21:58 UTC) #17
Timothy Loh
On 2015/09/29 00:21:58, Timothy Loh wrote: > On 2015/09/27 21:03:20, rwlbuis wrote: > > On ...
5 years, 2 months ago (2015-09-29 00:22:28 UTC) #18
alancutter (OOO until 2018)
> CSSParserTokenRange& m_originalRange; s/m_originalRange/m_sourceRange/ > ValueRange m_valueRange; The ValueRange will be stored in CSSCalcValue, no ...
5 years, 2 months ago (2015-09-29 00:54:36 UTC) #19
rwlbuis
On 2015/09/29 00:21:58, Timothy Loh wrote: > > Is it really a problem in this ...
5 years, 2 months ago (2015-09-29 02:47:20 UTC) #20
alancutter (OOO until 2018)
On 2015/09/29 at 02:47:20, rob.buis wrote: > Sounds good. Follow up patch or this one? ...
5 years, 2 months ago (2015-09-29 03:07:08 UTC) #21
rwlbuis
On 2015/09/29 03:07:08, alancutter wrote: > On 2015/09/29 at 02:47:20, rob.buis wrote: > > Sounds ...
5 years, 2 months ago (2015-09-29 21:43:32 UTC) #23
Timothy Loh
lgtm with last couple of comments https://codereview.chromium.org/1348363004/diff/280001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1348363004/diff/280001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode149 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:149: return cssValuePool().createValue(m_calcValue->doubleValue(), CSSPrimitiveValue::UnitType::Number); ...
5 years, 2 months ago (2015-09-30 00:36:47 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1348363004/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1348363004/300001
5 years, 2 months ago (2015-09-30 02:05:04 UTC) #27
alancutter (OOO until 2018)
https://codereview.chromium.org/1348363004/diff/280001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right): https://codereview.chromium.org/1348363004/diff/280001/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp#newcode129 third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:129: class CalcParseScope { STACK_ALLOCATED(); Minor naming nit. I think ...
5 years, 2 months ago (2015-09-30 02:07:35 UTC) #28
alancutter (OOO until 2018)
5 years, 2 months ago (2015-09-30 02:07:37 UTC) #29
commit-bot: I haz the power
Committed patchset #14 (id:300001)
5 years, 2 months ago (2015-09-30 03:37:44 UTC) #30
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/9ef67bebf05c04671cbf1aa782d4adf8d3cfab26 Cr-Commit-Position: refs/heads/master@{#351483}
5 years, 2 months ago (2015-09-30 03:38:52 UTC) #31
rwlbuis
5 years, 2 months ago (2015-09-30 13:31:10 UTC) #32
Message was sent while issue was closed.
On 2015/09/30 02:07:35, alancutter wrote:
>
https://codereview.chromium.org/1348363004/diff/280001/third_party/WebKit/Sou...
> File third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp (right):
> 
>
https://codereview.chromium.org/1348363004/diff/280001/third_party/WebKit/Sou...
> third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:129: class
> CalcParseScope {
> STACK_ALLOCATED();
> 
> Minor naming nit. I think we originally planned to have something happen in
the
> destructor of this class hence where the Scope part of the name suggestion
came
> from. Since it doesn't actually have a destructor I'd just call it CalcParser
> and consider pulling the parsing logic in CSSCalculationValue.cpp into it in a
> future patch.
> 
>
https://codereview.chromium.org/1348363004/diff/280001/third_party/WebKit/Sou...
> third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp:141:
> PassRefPtrWillBeRawPtr<CSSPrimitiveValue> releaseValue()
> I think consumeValue() and consumeNumber() are more accurate names for what
> these functions do.
> Also they should both return nullptr if !m_calcValue and not update the
> m_sourceRange.

Sorry, I only saw this when I woke up this morning :)
Seems like Yutak addressed the STACK_ALLOCATED issue. The other ones I am
addressing in:
https://codereview.chromium.org/1369353002/

I'll make sure to note it in the description.

Powered by Google App Engine
This is Rietveld 408576698