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

Issue 2286543002: Add Length::isPercent and use it in tables. (Closed)

Created:
4 years, 3 months ago by dgrogan
Modified:
4 years, 3 months ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Length::isPercent and use it in tables We could previously crash when a td had a calc height with a percent. Rename Length::hasPercent -> Length::isPercentOrCalc, which affects many files. Our code was confused: it called Length::percent after checking Length::hasPercent, but Length::hasPercent returns true for calc lengths which don't have a legitimate percent. This failed a DCHECK in debug but can cause crashes in release. The only logic change is in LayoutTableSection.cpp. BUG=631413 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/9258f7b0502c95dd9cf3cf4756416fc180b42278 Cr-Commit-Position: refs/heads/master@{#416715}

Patch Set 1 : only layout test #

Patch Set 2 : and code changes #

Total comments: 3

Patch Set 3 : rename hasPercent -> isPercentOrCalc #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -108 lines) Patch
A third_party/WebKit/LayoutTests/fast/table/integer-overflow-crash.html View 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/table/integer-overflow-crash-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/animation/CSSFontSizeInterpolationType.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/animation/LengthPropertyFunctions.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 8 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 13 chunks +22 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 2 3 5 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFileUploadControl.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutImage.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutInline.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutListBox.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMenuList.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutReplaced.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutSlider.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTable.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTableSection.cpp View 1 2 8 chunks +9 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextControl.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/TableLayoutAlgorithmAuto.cpp View 1 2 13 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/layout/TableLayoutAlgorithmFixed.cpp View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/TextAutosizer.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/line/RootInlineBox.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/GridLength.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGLengthContext.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/Length.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/transforms/TranslateTransformOperation.h View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 26 (12 generated)
dgrogan
Hi Alan, Warning -- naive patch ahead. We briefly talked about tables and calc lengths ...
4 years, 3 months ago (2016-08-26 00:27:18 UTC) #2
alancutter (OOO until 2018)
Warning: Naive review ahead. LGTM, not using a meaningless integer as a percentage when calc() ...
4 years, 3 months ago (2016-08-29 03:34:37 UTC) #3
dgrogan
mstensho, could you take a look?
4 years, 3 months ago (2016-08-31 20:07:04 UTC) #5
mstensho (USE GERRIT)
I don't really understand how calc() works in Length, and why it should be treated ...
4 years, 3 months ago (2016-08-31 20:30:33 UTC) #6
dgrogan
On 2016/08/31 20:30:33, mstensho wrote: > I don't really understand how calc() works in Length, ...
4 years, 3 months ago (2016-08-31 22:03:42 UTC) #7
mstensho (USE GERRIT)
On 2016/08/31 22:03:42, dgrogan wrote: > On 2016/08/31 20:30:33, mstensho wrote: > > I don't ...
4 years, 3 months ago (2016-09-01 05:56:06 UTC) #8
alancutter (OOO until 2018)
Renaming hasPercent() to be more descriptive and distinct from isPercent() SGTM.
4 years, 3 months ago (2016-09-02 04:18:11 UTC) #9
dgrogan
eae, could you take advantage of your extensive OWNER reach and review this? It's actually ...
4 years, 3 months ago (2016-09-06 17:43:56 UTC) #13
eae
LGTM
4 years, 3 months ago (2016-09-06 17:49:14 UTC) #14
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/2286543002/40001
4 years, 3 months ago (2016-09-06 17:51:44 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_android/builds/123939) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 3 months ago (2016-09-06 17:55:19 UTC) #20
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/2286543002/60001
4 years, 3 months ago (2016-09-06 18:12:07 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-06 20:43:18 UTC) #24
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 20:46:33 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/9258f7b0502c95dd9cf3cf4756416fc180b42278
Cr-Commit-Position: refs/heads/master@{#416715}

Powered by Google App Engine
This is Rietveld 408576698