WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
110063
Ensure margins in table captions contributes to minimum table width
https://bugs.webkit.org/show_bug.cgi?id=110063
Summary
Ensure margins in table captions contributes to minimum table width
Robert Hogan
Reported
2013-02-17 14:06:43 PST
..
Attachments
Patch
(94.29 KB, patch)
2013-02-19 12:35 PST
,
Robert Hogan
no flags
Details
Formatted Diff
Diff
Patch
(94.18 KB, patch)
2013-02-19 23:35 PST
,
Robert Hogan
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Robert Hogan
Comment 1
2013-02-19 12:35:57 PST
Created
attachment 189144
[details]
Patch
WebKit Review Bot
Comment 2
2013-02-19 12:42:22 PST
Attachment 189144
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css2.1/20110323/margin-right-applies-to-015-expected.html', u'LayoutTests/css2.1/20110323/margin-right-applies-to-015.htm', u'LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.png', u'LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png', u'LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/core/captions1-expected.txt', u'LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/core/captions2-expected.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/rendering/RenderTable.cpp']" exit_code: 1 LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png:0: Have to enable auto props in the subversion config file (/home/alancutter/.subversion/config "enable-auto-props = yes"). Have to set the svn:mime-type in the subversion config file (/home/alancutter/.subversion/config "*.png = svn:mime-type=image/png"). [image/png] [5] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 3
2013-02-19 13:39:32 PST
Comment on
attachment 189144
[details]
Patch
Attachment 189144
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://queues.webkit.org/results/16621932
New failing tests: tables/mozilla_expected_failures/core/captions2.html tables/mozilla_expected_failures/core/captions1.html css2.1/20110323/margin-right-applies-to-015.htm
WebKit Review Bot
Comment 4
2013-02-19 17:08:33 PST
Comment on
attachment 189144
[details]
Patch
Attachment 189144
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/16616968
New failing tests: css2.1/20110323/margin-right-applies-to-015.htm
Robert Hogan
Comment 5
2013-02-19 23:35:38 PST
Created
attachment 189254
[details]
Patch
WebKit Review Bot
Comment 6
2013-02-19 23:40:49 PST
Attachment 189254
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/css2.1/20110323/margin-right-applies-to-015-expected.html', u'LayoutTests/css2.1/20110323/margin-right-applies-to-015.htm', u'LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions1-expected.png', u'LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png', u'LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/core/captions1-expected.txt', u'LayoutTests/platform/chromium-win/tables/mozilla_expected_failures/core/captions2-expected.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/rendering/RenderTable.cpp']" exit_code: 1 LayoutTests/platform/chromium-linux/tables/mozilla_expected_failures/core/captions2-expected.png:0: Have to enable auto props in the subversion config file (/home/alancutter/.subversion/config "enable-auto-props = yes"). Have to set the svn:mime-type in the subversion config file (/home/alancutter/.subversion/config "*.png = svn:mime-type=image/png"). [image/png] [5] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 7
2013-02-20 00:22:51 PST
Comment on
attachment 189254
[details]
Patch
Attachment 189254
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://queues.webkit.org/results/16657127
New failing tests: tables/mozilla_expected_failures/core/captions2.html tables/mozilla_expected_failures/core/captions1.html
Build Bot
Comment 8
2013-02-21 02:56:13 PST
Comment on
attachment 189254
[details]
Patch
Attachment 189254
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/16646942
New failing tests: tables/mozilla_expected_failures/core/captions2.html tables/mozilla_expected_failures/core/captions1.html
Radar WebKit Bug Importer
Comment 9
2024-01-14 22:03:39 PST
<
rdar://problem/120990942
>
Ahmad Saleem
Comment 10
2025-03-23 02:06:52 PDT
It compiles and progress WPT test case but it makes below legit failures: tables/mozilla_expected_failures/core/captions2.html tables/mozilla_expected_failures/core/captions1.html Changes to make it compiles: Webkit Source:
https://github.com/WebKit/WebKit/blob/b2323ec6eaf613835bbaf8964d6e6d53b5310653/Source/WebCore/rendering/RenderTable.cpp#L947
and make `containingBlockLogicalWidthForContent` public -
https://github.com/WebKit/WebKit/blob/b2323ec6eaf613835bbaf8964d6e6d53b5310653/Source/WebCore/rendering/RenderTableCaption.h#L40
It might be something about this FIXME:
https://github.com/WebKit/WebKit/blob/b2323ec6eaf613835bbaf8964d6e6d53b5310653/Source/WebCore/rendering/RenderTable.cpp#L426
(// FIXME: Collapse caption margin.) Change: for (unsigned i = 0; i < m_captions.size(); i++) m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth()); m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, m_minPreferredLogicalWidth); To: for (unsigned i = 0; i < m_captions.size(); i++) { LayoutUnit availableLogicalWidth = m_captions[i]->containingBlockLogicalWidthForContent(); LayoutUnit marginStart = minimumValueForLength(m_captions[i]->style().marginStart(), availableLogicalWidth); LayoutUnit marginEnd = minimumValueForLength(m_captions[i]->style().marginEnd(), availableLogicalWidth); m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth()); m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, m_minPreferredLogicalWidth); }
Ahmad Saleem
Comment 11
2025-11-27 23:37:16 PST
``` for (unsigned i = 0; i < m_captions.size(); i++) { LayoutUnit captionMinWidth = m_captions[i]->minPreferredLogicalWidth(); // Only add fixed margins during preferred width calculation auto& captionStyle = m_captions[i]->style(); if (auto fixedMarginStart = captionStyle.marginStart().tryFixed()) captionMinWidth += fixedMarginStart->resolveZoom(captionStyle.usedZoomForLength()); if (auto fixedMarginEnd = captionStyle.marginEnd().tryFixed()) captionMinWidth += fixedMarginEnd->resolveZoom(captionStyle.usedZoomForLength()); m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, captionMinWidth); } m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, m_minPreferredLogicalWidth); ``` This fixes and compile and don't have to do `public` -> `private` and also noted that we need to rebase line these two: tables/mozilla_expected_failures/core/captions2.html tables/mozilla_expected_failures/core/captions1.html I noticed images from post-change vs Blink current and noticed that our text was not getting contained and with above one, it does and match Blink, so it is just rebase line issue. We need to import relevant WPT test though, which progresses.
Ahmad Saleem
Comment 12
2025-11-27 23:47:43 PST
Pull request:
https://github.com/WebKit/WebKit/pull/54541
EWS
Comment 13
2025-11-29 10:09:18 PST
Committed
303642@main
(0d389e7c6ac1): <
https://commits.webkit.org/303642@main
> Reviewed commits have been landed. Closing PR #54541 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug