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

Issue 1160463004: Check if length isSpecified before accessing. (Closed)

Created:
5 years, 7 months ago by dsinclair
Modified:
5 years, 7 months ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

Check if length isSpecified before accessing. When calculating the minimumValueForLength we have to make sure that the provided value is specified before using. BUG=478265 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195919

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -2 lines) Patch
A LayoutTests/fast/table/tr-min-content-crash.html View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/table/tr-min-content-crash-expected.txt View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutTableSection.cpp View 1 2 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
dsinclair
PTAL.
5 years, 7 months ago (2015-05-26 15:17:55 UTC) #2
Julien - ping for review
lgtm https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/tr-min-content-crash-expected.txt File LayoutTests/fast/table/tr-min-content-crash-expected.txt (right): https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/tr-min-content-crash-expected.txt#newcode1 LayoutTests/fast/table/tr-min-content-crash-expected.txt:1: Test passes if it does not CRASH in ...
5 years, 7 months ago (2015-05-26 16:06:37 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1160463004/40001
5 years, 7 months ago (2015-05-26 17:24:09 UTC) #6
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://src.chromium.org/viewvc/blink?view=rev&revision=195919
5 years, 7 months ago (2015-05-26 18:36:17 UTC) #7
dsinclair
5 years, 7 months ago (2015-05-27 15:20:07 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/...
File LayoutTests/fast/table/tr-min-content-crash-expected.txt (right):

https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/...
LayoutTests/fast/table/tr-min-content-crash-expected.txt:1: Test passes if it
does not CRASH in debug.
On 2015/05/26 at 16:06:37, Julien Chaffraix - PST wrote:
> The output should include what are you testing. I would advise to put also a
link to the bug.

Done.

https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/...
File LayoutTests/fast/table/tr-min-content-crash.html (right):

https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/...
LayoutTests/fast/table/tr-min-content-crash.html:3: .min { height:
-webkit-min-content; }
On 2015/05/26 at 16:06:37, Julien Chaffraix - PST wrote:
> min-content would also work (and it's not prefixed).
> 
> We should add tests for max-content and -webkit-fit-content too.


The test does not crash if I use min-content.

https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/...
LayoutTests/fast/table/tr-min-content-crash.html:12: tr =
document.createElementNS("http://www.w3.org/1999/xhtml", "tr");
On 2015/05/26 at 16:06:37, Julien Chaffraix - PST wrote:
> No need for NameSpace here, createElement should work.

Done.

https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/...
LayoutTests/fast/table/tr-min-content-crash.html:13: tr.setAttribute("class",
"min");
On 2015/05/26 at 16:06:37, Julien Chaffraix - PST wrote:
> tr.style.height = "-webkit-min-content"; (eliminates the style sheet which is
just noise)

Done.

https://codereview.chromium.org/1160463004/diff/20001/LayoutTests/fast/table/...
LayoutTests/fast/table/tr-min-content-crash.html:15:
document.documentElement.appendChild(tr);
On 2015/05/26 at 16:06:37, Julien Chaffraix - PST wrote:
> I really think we should just have the element already in the tree (we can
keep the <style> element in this case) instead of doing an artificial
appendChild.

Done.

https://codereview.chromium.org/1160463004/diff/20001/Source/core/layout/Layo...
File Source/core/layout/LayoutTableSection.cpp (right):

https://codereview.chromium.org/1160463004/diff/20001/Source/core/layout/Layo...
Source/core/layout/LayoutTableSection.cpp:730: m_rowPos[r + 1] =
std::max(m_rowPos[r], 0);
On 2015/05/26 at 16:06:37, Julien Chaffraix - PST wrote:
> We should probably put a comment about why it's OK to ignore the other values.
The reason is that the row already accounts for the cell's intrinsic logical
height (the other values should never show up here).

Done.

Powered by Google App Engine
This is Rietveld 408576698