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 25086004: offsetWidth on a table cell with fixed width is wrong (Closed)

Created:
7 years, 2 months ago by eseidel
Modified:
7 years, 2 months ago
CC:
blink-reviews, leviw_travelin_and_unemployed, Julien - ping for review, esprehn
Visibility:
Public.

Description

offsetWidth on a table cell with fixed width is wrong TableCell's width is layout dependent, even when specified via width: Npx in CSS. Hopefully there are not other cases which are missing from this optimization. This code is very fragile as written. We should make this a white-list instead of a black-list for this optimization. BUG=290399 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=158467

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
A LayoutTests/fast/table/table-cell-offset-width.html View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/table/table-cell-offset-width-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderBox.cpp View 1 chunk +3 lines, -1 line 2 comments Download

Messages

Total messages: 9 (0 generated)
pdr
LGTM, and +1 to making this optimization more robust in the future.
7 years, 2 months ago (2013-09-27 19:23:49 UTC) #1
eseidel
Layout reviewers, activate! This is for a stable-blocker. Please carefully consider if there are other ...
7 years, 2 months ago (2013-09-27 19:24:18 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/25086004/1
7 years, 2 months ago (2013-09-27 19:28:36 UTC) #3
eseidel
Committed patchset #1 manually as r158467 (presubmit successful).
7 years, 2 months ago (2013-09-27 19:34:11 UTC) #4
eae
https://codereview.chromium.org/25086004/diff/1/Source/core/rendering/RenderBox.cpp File Source/core/rendering/RenderBox.cpp (right): https://codereview.chromium.org/25086004/diff/1/Source/core/rendering/RenderBox.cpp#newcode425 Source/core/rendering/RenderBox.cpp:425: || isTableCell(); This should probably be isTableCell() && !table->isFixedLayout()
7 years, 2 months ago (2013-09-27 19:56:56 UTC) #5
Julien - ping for review
https://codereview.chromium.org/25086004/diff/1/Source/core/rendering/RenderBox.cpp File Source/core/rendering/RenderBox.cpp (right): https://codereview.chromium.org/25086004/diff/1/Source/core/rendering/RenderBox.cpp#newcode425 Source/core/rendering/RenderBox.cpp:425: || isTableCell(); On 2013/09/27 19:56:56, eae wrote: > This ...
7 years, 2 months ago (2013-09-27 20:03:54 UTC) #6
eae
On 2013/09/27 20:03:54, Julien Chaffraix wrote: > https://codereview.chromium.org/25086004/diff/1/Source/core/rendering/RenderBox.cpp > File Source/core/rendering/RenderBox.cpp (right): > > https://codereview.chromium.org/25086004/diff/1/Source/core/rendering/RenderBox.cpp#newcode425 ...
7 years, 2 months ago (2013-09-27 20:05:27 UTC) #7
eseidel
I tried: <table><tbody style="width: 10px"><td style="font: Ahem;">FAIL</td><tbody></table> <script> if (window.testRunner) testRunner.dumpAsText(); var width = document.getElementsByTagName('tbody')[0].offsetWidth; ...
7 years, 2 months ago (2013-09-27 20:13:52 UTC) #8
eseidel
7 years, 2 months ago (2013-09-27 20:39:49 UTC) #9
Message was sent while issue was closed.
I've attempted to clean up the code a bit more in
https://codereview.chromium.org/25048006

It's now pretty clear that this is turned on for all of RenderBlockFlow, which
is probably much more than is safe.

Powered by Google App Engine
This is Rietveld 408576698