|
|
DescriptionTable rowspan cell's height resize when percent element present in the cell.
Override logical content height was not reset for rowspan cells.
R=jchaffraix@chromium.org
BUG=445253
Committed: https://crrev.com/be1c5d2f7ce999ed4d49b4aecaf1e929d738fc04
Cr-Commit-Position: refs/heads/master@{#369127}
Patch Set 1 #Patch Set 2 : Layout test added #Patch Set 3 : Updated expected file and layout test expectation #Patch Set 4 : Changed Layout test and expectation #
Total comments: 8
Patch Set 5 : Review comments addressed #Patch Set 6 : Expectation changed. #Patch Set 7 : Layout test expectation changed. #
Total comments: 8
Patch Set 8 : Refector code and Layout test reduced. #
Total comments: 4
Patch Set 9 : #
Messages
Total messages: 66 (30 generated)
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/1
a.suchit@chromium.org changed reviewers: + eae@chromium.org, eseidel@chromium.org, esprehn@chromium.org
suchit.agrawal@gmail.com changed reviewers: + suchit.agrawal@gmail.com
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/20001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/40001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/60001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
I did not understand, why is MAC getting different row/col height than linux/Win. Is there an issue with MAC port ?
a.suchit@chromium.org changed reviewers: + dsinclair@chromium.org
a.suchit@chromium.org changed reviewers: - dsinclair@chromium.org, eseidel@chromium.org, esprehn@chromium.org
a.suchit@chromium.org changed reviewers: + dsinclair@chromium.org, mstensho@opera.com - a.suchit@chromium.org, eae@chromium.org, suchit.agrawal@gmail.com
Sorry about the delay - I missed this somehow. I'd like to focus on the test (it has serious issues) before reading the code changes. https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:11: function funcToRunAfterUIUpdate() Instead of this machinery (setTimeout, funcToRunAfterUIUpdate), couldn't you just add a script at the end of the document that does document.body.offsetTop to trigger layout, followed by the DOM change that you want to do, followed by checkLayout() (instead of doing it via body onload)? https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:13: document.getElementById("ta").rowSpan=2; I cannot find any element named #ta. Simply resizing the window causes the table to grow, though, so maybe just setting a new width on the table would suffice to reproduce the bug. https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:16: <body onload="checkLayout('tr');"> Can you do checkLayout("table") instead? checkLayout() inserts a block next to the specified objects here, so it will mess up the layout (block next to table-row) for no good reason.
a.suchit@chromium.org changed reviewers: + a.suchit@chromium.org
https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:11: function funcToRunAfterUIUpdate() On 2015/12/04 14:10:10, mstensho wrote: > Instead of this machinery (setTimeout, funcToRunAfterUIUpdate), couldn't you > just add a script at the end of the document that does document.body.offsetTop > to trigger layout, followed by the DOM change that you want to do, followed by > checkLayout() (instead of doing it via body onload)? I am able to move the checkLayout() after the DOM changes but I did not get how to do the re-layout trigger method just using document.body.offsetTop in the script added in the end. Plz help. https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:13: document.getElementById("ta").rowSpan=2; On 2015/12/04 14:10:10, mstensho wrote: > I cannot find any element named #ta. Simply resizing the window causes the table > to grow, though, so maybe just setting a new width on the table would suffice to > reproduce the bug. sorry for mistake. I needs to add for text area td element. https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:16: <body onload="checkLayout('tr');"> On 2015/12/04 14:10:10, mstensho wrote: > Can you do checkLayout("table") instead? checkLayout() inserts a block next to > the specified objects here, so it will mess up the layout (block next to > table-row) for no good reason. checklayout("table") can be used. Thanks
https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:11: function funcToRunAfterUIUpdate() On 2016/01/08 14:12:50, a.suchit2 wrote: > On 2015/12/04 14:10:10, mstensho wrote: > > Instead of this machinery (setTimeout, funcToRunAfterUIUpdate), couldn't you > > just add a script at the end of the document that does document.body.offsetTop > > to trigger layout, followed by the DOM change that you want to do, followed by > > checkLayout() (instead of doing it via body onload)? > > I am able to move the checkLayout() after the DOM changes but I did not get how > to do the re-layout trigger method just using document.body.offsetTop in the > script added in the end. Plz help. I actually think it's easier if you just upload a new patch set with what you have, even if it doesn't work. Maybe then I can figure out what this is about.
The CQ bit was checked by a.suchit@samsung.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/80001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/80001
https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/60001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:11: function funcToRunAfterUIUpdate() On 2016/01/08 19:22:10, mstensho wrote: > On 2016/01/08 14:12:50, a.suchit2 wrote: > > On 2015/12/04 14:10:10, mstensho wrote: > > > Instead of this machinery (setTimeout, funcToRunAfterUIUpdate), couldn't you > > > just add a script at the end of the document that does > document.body.offsetTop > > > to trigger layout, followed by the DOM change that you want to do, followed > by > > > checkLayout() (instead of doing it via body onload)? > > > > I am able to move the checkLayout() after the DOM changes but I did not get > how > > to do the re-layout trigger method just using document.body.offsetTop in the > > script added in the end. Plz help. > > I actually think it's easier if you just upload a new patch set with what you > have, even if it doesn't work. Maybe then I can figure out what this is about. I am able to do it. Fixed all review comments. thanks
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/100001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/120001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
Please review. I am not getting that why is Mac have different table height than linux/windows.
https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:15: <td></td> Do you really want two TD elements here? That would give you three columns, since the second TD in the first row spans two rows. https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/platform/mac/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/platform/mac/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:3: td { font: 15px/1 Ahem } Better come up with a test that passes on all platforms, rather than this platform specific test. Maybe using 20px/1 here would solve the problem? https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/platform/mac/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:11: <td rowspan="2" id="ta"><textarea style='height:100%;'>Text area text</textarea></td> Also, textarea sets font on its own, so your Ahem isn't inherited. Maybe add "textarea" to the selector above? https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/layout/LayoutTableSection.cpp (right): https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/core/layout/LayoutTableSection.cpp:793: if (cell->hasOverrideLogicalContentHeight()) { Yeah, I suppose this was missing for rowspanned cells. But rather than duplicating this code (the same incantations are found a few lines further below), could you refactor the code so that it won't be necessary?
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/140001
https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:15: <td></td> On 2016/01/12 10:06:41, mstensho wrote: > Do you really want two TD elements here? That would give you three columns, > since the second TD in the first row spans two rows. Only 1 td is enough in first row. https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/platform/mac/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/platform/mac/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:3: td { font: 15px/1 Ahem } On 2016/01/12 10:06:41, mstensho wrote: > Better come up with a test that passes on all platforms, rather than this > platform specific test. Maybe using 20px/1 here would solve the problem? changed and trying. https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/platform/mac/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:11: <td rowspan="2" id="ta"><textarea style='height:100%;'>Text area text</textarea></td> On 2016/01/12 10:06:41, mstensho wrote: > Also, textarea sets font on its own, so your Ahem isn't inherited. Maybe add > "textarea" to the selector above? Done. https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/layout/LayoutTableSection.cpp (right): https://codereview.chromium.org/1396493005/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/core/layout/LayoutTableSection.cpp:793: if (cell->hasOverrideLogicalContentHeight()) { On 2016/01/12 10:06:41, mstensho wrote: > Yeah, I suppose this was missing for rowspanned cells. But rather than > duplicating this code (the same incantations are found a few lines further > below), could you refactor the code so that it won't be necessary? Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:10: <td rowspan="2" id="ta"><textarea style='height:100%;'>Text area text</textarea></td> If you're still having trouble, try to add "border:none; padding:0; margin:0;" to the textarea. https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/layout/LayoutTableSection.cpp (right): https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/layout/LayoutTableSection.cpp:730: static void ResetOverrideLoicalContentHeightIfNeeded(LayoutTableCell* cell) That wasn't quite what I had in mind. Since updateBaselineForCell() is also duplicated, I was thinking of something like this: rowSpanCells.append(cell); lastRowSpanCell = cell; - - // Find out the baseline. The baseline is set on the first row in a rowSpan. - updateBaselineForCell(cell, r, baselineDescent); - } - continue; } - ASSERT(cell->rowSpan() == 1); - if (cell->hasOverrideLogicalContentHeight()) { cell->clearIntrinsicPadding(); cell->clearOverrideSize(); cell->forceChildLayout(); } - m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + cell->logicalHeightForRowSizing()); + if (cell->rowSpan() == 1) { + m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + cell->logicalHeightForRowSizing()); // Find out the baseline. updateBaselineForCell(cell, r, baselineDescent);
https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Lay... File third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html (right): https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Lay... third_party/WebKit/LayoutTests/fast/table/table-rowspan-cell-override-logical-content-height-reset-issue.html:10: <td rowspan="2" id="ta"><textarea style='height:100%;'>Text area text</textarea></td> On 2016/01/12 19:18:13, mstensho wrote: > If you're still having trouble, try to add "border:none; padding:0; margin:0;" > to the textarea. Now, It is not needed. It is working. Thanks https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/layout/LayoutTableSection.cpp (right): https://codereview.chromium.org/1396493005/diff/140001/third_party/WebKit/Sou... third_party/WebKit/Source/core/layout/LayoutTableSection.cpp:730: static void ResetOverrideLoicalContentHeightIfNeeded(LayoutTableCell* cell) On 2016/01/12 19:18:13, mstensho wrote: > That wasn't quite what I had in mind. Since updateBaselineForCell() is also > duplicated, I was thinking of something like this: > > rowSpanCells.append(cell); > lastRowSpanCell = cell; > - > - // Find out the baseline. The baseline is set on the > first row in a rowSpan. > - updateBaselineForCell(cell, r, baselineDescent); > - } > - continue; > } > > - ASSERT(cell->rowSpan() == 1); > - > if (cell->hasOverrideLogicalContentHeight()) { > cell->clearIntrinsicPadding(); > cell->clearOverrideSize(); > cell->forceChildLayout(); > } > > - m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + > cell->logicalHeightForRowSizing()); > + if (cell->rowSpan() == 1) { > + m_rowPos[r + 1] = std::max(m_rowPos[r + 1], m_rowPos[r] + > cell->logicalHeightForRowSizing()); > > // Find out the baseline. > updateBaselineForCell(cell, r, baselineDescent); Done.
The CQ bit was checked by a.suchit@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/160001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm. One typo in the commit comment that you could fix. Past tense of "reset" is "reset", not "reseted".
Description was changed from ========== Table rowspan cell's height resize when percent element present in the cell. Override logical content height was not reseted for rowspan cells. R=jchaffraix@chromium.org BUG=445253 ========== to ========== Table rowspan cell's height resize when percent element present in the cell. Override logical content height was not reset for rowspan cells. R=jchaffraix@chromium.org BUG=445253 ==========
On 2016/01/13 09:53:36, mstensho wrote: > lgtm. > > One typo in the commit comment that you could fix. Past tense of "reset" is > "reset", not "reseted". Done. Thanks
The CQ bit was checked by a.suchit@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1396493005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1396493005/160001
Message was sent while issue was closed.
Description was changed from ========== Table rowspan cell's height resize when percent element present in the cell. Override logical content height was not reset for rowspan cells. R=jchaffraix@chromium.org BUG=445253 ========== to ========== Table rowspan cell's height resize when percent element present in the cell. Override logical content height was not reset for rowspan cells. R=jchaffraix@chromium.org BUG=445253 ==========
Message was sent while issue was closed.
Committed patchset #9 (id:160001)
Message was sent while issue was closed.
Description was changed from ========== Table rowspan cell's height resize when percent element present in the cell. Override logical content height was not reset for rowspan cells. R=jchaffraix@chromium.org BUG=445253 ========== to ========== Table rowspan cell's height resize when percent element present in the cell. Override logical content height was not reset for rowspan cells. R=jchaffraix@chromium.org BUG=445253 Committed: https://crrev.com/be1c5d2f7ce999ed4d49b4aecaf1e929d738fc04 Cr-Commit-Position: refs/heads/master@{#369127} ==========
Message was sent while issue was closed.
Patchset 9 (id:??) landed as https://crrev.com/be1c5d2f7ce999ed4d49b4aecaf1e929d738fc04 Cr-Commit-Position: refs/heads/master@{#369127} |