Bug 71193 - vertical-lr writing mode doesn't correctly take line-height into account in standards mode
Summary: vertical-lr writing mode doesn't correctly take line-height into account in s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ojan Vafai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-30 12:56 PDT by Ojan Vafai
Modified: 2022-02-20 16:32 PST (History)
5 users (show)

See Also:


Attachments
testcase (431 bytes, text/html)
2011-10-30 12:56 PDT, Ojan Vafai
no flags Details
Patch (7.20 KB, patch)
2011-10-30 20:57 PDT, Ojan Vafai
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2011-10-30 12:56:00 PDT
Created attachment 112999 [details]
testcase

In the test case you should se only a blue box.
Comment 1 Ojan Vafai 2011-10-30 14:52:09 PDT
Same thing happens with horizontal-bt.
Comment 2 Ojan Vafai 2011-10-30 14:56:49 PDT
I think InlineFlowBox::flipLinesInBlockDirection might be doing the wrong thing...but I'm not totally clear on how to fix it.
Comment 3 Ojan Vafai 2011-10-30 20:57:24 PDT
Created attachment 113010 [details]
Patch
Comment 4 Ojan Vafai 2011-10-30 20:59:23 PDT
Comment on attachment 113010 [details]
Patch

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

Not totally convinced this patch is correct, but I think it's roughly heading in the right direction and the tests pass. :)

> Source/WebCore/rendering/InlineFlowBox.cpp:703
> +        LayoutUnit oldTop = logicalTop();
>          if (renderer()->style()->isFlippedLinesWritingMode())
> -            flipLinesInBlockDirection(lineTopIncludingMargins, lineBottomIncludingMargins);
> +            flipLinesInBlockDirection(lineTopIncludingMargins, max(lineBottom, lineBottomIncludingMargins));

I'm not 100% sure it makes sense to move this above the if-statement below, but we need this lineBottom for the child linebox in flipLinesInBlockDirection.

> Source/WebCore/rendering/InlineFlowBox.cpp:726
> +            LayoutUnit currBottom = max(lineBottom, curr->logicalTop() + curr->logicalHeight());
> +            curr->setLogicalTop(currBottom - (curr->logicalTop() - lineTop) - curr->logicalHeight());

This is the part that actually fixes the bug.
Comment 5 WebKit Review Bot 2011-10-30 21:21:59 PDT
Comment on attachment 113010 [details]
Patch

Attachment 113010 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10242663

New failing tests:
fast/block/positioning/vertical-lr/002.html
Comment 6 Ojan Vafai 2013-04-08 10:54:03 PDT
Comment on attachment 113010 [details]
Patch

Removing from the review queue as I won't be around to commit this.
Comment 7 zalan 2022-02-20 16:32:29 PST
This is now fixed in r290229.