Bug 69773 - CSS 2.1 failure: border-spacing-applies-to-015.htm
Summary: CSS 2.1 failure: border-spacing-applies-to-015.htm
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robert Hogan
URL:
Keywords:
Depends on:
Blocks: 47141
  Show dependency treegraph
 
Reported: 2011-10-10 11:34 PDT by Robert Hogan
Modified: 2011-11-14 12:41 PST (History)
3 users (show)

See Also:


Attachments
Patch (669.71 KB, patch)
2011-10-11 11:52 PDT, Robert Hogan
no flags Details | Formatted Diff | Diff
Patch (669.84 KB, patch)
2011-11-01 14:13 PDT, Robert Hogan
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hogan 2011-10-10 11:34:53 PDT
WebKit only allows one caption per table.
Comment 1 Robert Hogan 2011-10-11 11:52:03 PDT
Created attachment 110553 [details]
Patch
Comment 2 Dave Hyatt 2011-11-01 11:36:45 PDT
Comment on attachment 110553 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=110553&action=review

> Source/WebCore/rendering/RenderTable.cpp:203
> +        if (node())
> +          node()->setNeedsStyleRecalc();

Funny looking indentation here.

> Source/WebCore/rendering/RenderTable.cpp:738
> -                    recalcCaption(toRenderBlock(child));
> +                    toRenderBlock(child)->setNeedsLayout(true);

Why do you even need to mark it as needing layout? Can't you just yank this code completely?
Comment 3 Robert Hogan 2011-11-01 14:13:35 PDT
Created attachment 113214 [details]
Patch
Comment 4 Dave Hyatt 2011-11-02 11:29:37 PDT
Comment on attachment 113214 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=113214&action=review

> Source/WebCore/rendering/RenderTable.cpp:1196
> -            if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption)) {
> +            if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || m_captions.contains(child))) {

Seems like it would be faster instead of asking if the child is contained in a Vector (which has to crawl the whole vector) to just say:

(child->isTableSection() || (child->isRenderBlock() && child->style()->display() == TABLE_CAPTION))
Comment 5 Dave Hyatt 2011-11-02 11:32:58 PDT
Comment on attachment 113214 [details]
Patch

r=me
Comment 6 Robert Hogan 2011-11-14 12:41:44 PST
Committed r100177: <http://trac.webkit.org/changeset/100177>