the caption has the wrong width
Created attachment 114130 [details] Patch
Comment on attachment 114130 [details] Patch r=me, but you should put RenderTableCaption to a file of its own.
This won't build on the bots as it depends on 71244 which I haven't landed yet, sorry for the upcoming bug spam.
Committed r100473: <http://trac.webkit.org/changeset/100473>
Created attachment 115490 [details] Patch for WebCore.xcodeproj Here's the necessary patch to WebCore.xcodeproj/project.pbxproj to allow the new file to build on Mac. Tested by building WebKit on Snow Leopard. I strongly recommend assembling a new, complete patch and uploading it to this bug. It was confusing that the patch landed differed significantly from this one -- and the EWS would have caught the build failure.
This was rolled out in https://bugs.webkit.org/show_bug.cgi?id=72534 / http://trac.webkit.org/changeset/100473 .
Created attachment 115615 [details] Patch
Created attachment 115617 [details] Patch
Comment on attachment 115617 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115617&action=review > Source/WebCore/rendering/RenderTable.h:256 > + mutable Vector<RenderTableCaption*> m_captions; Do we need the mutable here? (asking as you are modifying some code that would love such neat changes) > Source/WebCore/rendering/RenderTableCaption.cpp:23 > +using namespace std; This is unneeded. > Source/WebCore/rendering/RenderTableCaption.cpp:38 > + RenderBlock* cb = containingBlock(); I don't think it is guaranteed for your containing block to be the table (using some absolute or fixed positioning for example). In this case, you are changing the behavior of the table caption without having some tests AFAICT. > Source/WebCore/rendering/RenderTableCaption.h:33 > + virtual bool isTableCaption() const { return true; } Should be private to catch unneeded checks. > Source/WebCore/rendering/RenderTableCaption.h:40 > +} Please implement the other cast methods, especially the one that catches unneeded casts.
Comment on attachment 115617 [details] Patch Attachment 115617 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10516018 New failing tests: tables/mozilla/marvin/backgr_position-table.html tables/mozilla/core/captions.html tables/mozilla/marvin/backgr_simple-table-column-group.html tables/mozilla/bugs/bug1302.html fast/replaced/width100percent-textarea.html tables/mozilla/marvin/backgr_layers-opacity.html tables/mozilla/bugs/bug5838.html tables/mozilla/marvin/backgr_simple-table-cell.html tables/mozilla/bugs/bug1163-1.html
Created attachment 116258 [details] Patch
(In reply to comment #9) > > Source/WebCore/rendering/RenderTableCaption.cpp:38 > > + RenderBlock* cb = containingBlock(); > > I don't think it is guaranteed for your containing block to be the table (using some absolute or fixed positioning for example). > In this case, you are changing the behavior of the table caption without having some tests AFAICT. Right, I've added some tests for absolutely positioned captions but I'm not sure I've captured the use-case you envisage here.
Comment on attachment 116258 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116258&action=review > Right, I've added some tests for absolutely positioned captions but I'm not sure I've captured the use-case you envisage here. The test cases makes sense and cover what I had in mind, thanks! > Source/WebCore/ChangeLog:7 > + This is missing the tests that you added in LayoutTests! > LayoutTests/ChangeLog:15 > + Affected tables/mozilla tests are rebaselined in a follow-up patch. s/are/will be/. I am assuming those rebaselines are small and inconsequential (like some minor pixel / dump differences). Make sure you post the updates on this bug for people to follow those. > LayoutTests/fast/css/caption-width-absolute-position-offset-top.htm:1 > +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> For custom tests, we really prefer HTML5 doctype: <!DOCTYPE html>
Created attachment 120005 [details] Patch
Comment on attachment 120005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120005&action=review Too bad your change confuses the EWS. The previous changes passed the EWS so I am inclined to trust this patch is as good. > Source/WebCore/rendering/RenderTable.cpp:120 > + m_captions.append(toRenderTableCaption(child)); There are several other callsites in RenderTable.cpp that are checking: child->isRenderBlock() && child->style()->display() == TABLE_CAPTION They should be modified too. There is also one in RenderTheme.cpp that should be patched. > Source/WebCore/rendering/RenderTableCaption.h:34 > + virtual LayoutUnit containingBlockLogicalWidthForContent() const; > + > +private: > + virtual bool isTableCaption() const { return true; } You should use the new OVERRIDE keyword for those 2 functions. > Source/WebCore/rendering/RenderTableCaption.h:43 > +inline const RenderTableCaption* toRenderTableCaption(const RenderObject* object) Nit: inline is not needed here as anything in a header is inlined by default. That said better to be sure sometimes.
Comment on attachment 120005 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=120005&action=review > Source/WebCore/rendering/RenderTableCaption.h:32 > + Thinking again: don't we want to have our own renderName() here? If that doesn't make you rebaseline / disable a lot more tests, I would rather have it added sooner rather than later!
(In reply to comment #15) > (From update of attachment 120005 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=120005&action=review > > Too bad your change confuses the EWS. The previous changes passed the EWS so I am inclined to trust this patch is as good. Yes, that's annoying. I need to be sure it compiles on Mac before I commit. So hopefully it can pass the commit queues.
Created attachment 120678 [details] Patch
Comment on attachment 120678 [details] Patch Attachment 120678 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10931025 New failing tests: fast/css/bidi-override-in-anonymous-block.html
Created attachment 120844 [details] Rebaselined results on Chromium Linux
(In reply to comment #16) > (From update of attachment 120005 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=120005&action=review > > > Source/WebCore/rendering/RenderTableCaption.h:32 > > + > > Thinking again: don't we want to have our own renderName() here? If that doesn't make you rebaseline / disable a lot more tests, I would rather have it added sooner rather than later! This will rebaseline about 60 extra tests so I'll do it separately.
Committed r103875: <http://trac.webkit.org/changeset/103875>