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

Issue 227043007: CSS Length calculation with MediaValues (Closed)

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

Description

CSS Length calculation with MediaValues BUG=357586

Patch Set 1 #

Patch Set 2 : Rebased and removed sizes stuff #

Patch Set 3 : Rebase #

Total comments: 9

Patch Set 4 : computeLength using both MediaValues and CSSToLengthConversionData behind an interface #

Patch Set 5 : Fix debug compile issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -100 lines) Patch
M Source/core/css/CSSCalculationValue.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/css/CSSCalculationValue.cpp View 1 2 3 3 chunks +7 lines, -7 lines 0 comments Download
A Source/core/css/CSSLengthData.h View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
M Source/core/css/CSSPrimitiveValue.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/css/CSSPrimitiveValue.cpp View 1 2 3 4 3 chunks +30 lines, -31 lines 0 comments Download
M Source/core/css/CSSToLengthConversionData.h View 1 2 3 3 chunks +16 lines, -7 lines 0 comments Download
M Source/core/css/CSSToLengthConversionData.cpp View 1 2 3 5 chunks +44 lines, -0 lines 0 comments Download
M Source/core/css/MediaQueryEvaluator.cpp View 1 2 3 6 chunks +9 lines, -30 lines 0 comments Download
M Source/core/css/MediaQueryEvaluatorTest.cpp View 1 chunk +6 lines, -1 line 0 comments Download
M Source/core/css/MediaValues.h View 1 2 3 6 chunks +36 lines, -3 lines 0 comments Download
M Source/core/css/MediaValues.cpp View 1 2 3 10 chunks +150 lines, -16 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Yoav Weiss
This CL makes sure that MediaValues is used for length calculations in the MediaQueryParser, making ...
6 years, 8 months ago (2014-04-08 06:51:33 UTC) #1
eseidel
6 years, 8 months ago (2014-04-08 16:41:37 UTC) #2
eseidel
I find this CSSToLengthConversionData thing kinda scary. #1 that it mutates style as a side-effect ...
6 years, 8 months ago (2014-04-08 16:43:37 UTC) #3
eseidel
I think this is generally OK. Please see my comments below. Lets give the other ...
6 years, 8 months ago (2014-04-08 16:51:28 UTC) #4
esprehn
Are you using RenderStyle from another thread? https://codereview.chromium.org/227043007/diff/40001/Source/core/css/CSSToLengthConversionData.cpp File Source/core/css/CSSToLengthConversionData.cpp (right): https://codereview.chromium.org/227043007/diff/40001/Source/core/css/CSSToLengthConversionData.cpp#newcode53 Source/core/css/CSSToLengthConversionData.cpp:53: CSSToLengthConversionData::CSSToLengthConversionData(const MediaValues* ...
6 years, 8 months ago (2014-04-08 17:40:38 UTC) #5
Yoav Weiss
On 2014/04/08 17:40:38, esprehn wrote: > Are you using RenderStyle from another thread? No. MediaValues ...
6 years, 8 months ago (2014-04-08 21:51:34 UTC) #6
esprehn
On 2014/04/08 21:51:34, Yoav Weiss wrote: > ... > https://codereview.chromium.org/227043007/diff/40001/Source/core/css/CSSToLengthConversionData.h#newcode80 > > Source/core/css/CSSToLengthConversionData.h:80: const MediaValues* ...
6 years, 8 months ago (2014-04-08 21:59:04 UTC) #7
Yoav Weiss
I've uploaded a new patchset that decouples MediaValues from CSSToLengthConversionData, and add a single interface ...
6 years, 8 months ago (2014-04-09 14:09:55 UTC) #8
eseidel
I think this is interesting as long as it doesn't hurt perf. Length-related functions tend ...
6 years, 8 months ago (2014-04-09 16:28:29 UTC) #9
Yoav Weiss
On 2014/04/09 16:28:29, eseidel wrote: > I think this is interesting as long as it ...
6 years, 8 months ago (2014-04-09 16:31:23 UTC) #10
esprehn
On 2014/04/09 16:31:23, Yoav Weiss wrote: > On 2014/04/09 16:28:29, eseidel wrote: > > I ...
6 years, 8 months ago (2014-04-09 16:38:16 UTC) #11
Yoav Weiss
6 years, 8 months ago (2014-04-11 13:17:40 UTC) #12
On 2014/04/09 16:38:16, esprehn wrote:
> On 2014/04/09 16:31:23, Yoav Weiss wrote:
> > On 2014/04/09 16:28:29, eseidel wrote:
> > > I think this is interesting as long as it doesn't hurt perf. 
Length-related
> > > functions tend to be super hot. :)
> > 
> > Any suggested perf tests to test this on?
> 
> We can't make this change, applyMatchedProperties is super hot and we can't
make
> all the length conversions it does (which is lots) virtual. You just added
> thousands of virtual calls during page load on typical pages.
> 
> You can try html-full-render.

Abandoning this approach, due to the performance concerns.

Powered by Google App Engine
This is Rietveld 408576698