Created attachment 42005[details]
Test Case
See the attachment.
Expected: The bottom of the inline block should be aligned with the bottom of the text.
Actual: The baseline of the inline block is aligned with the bottom of the text.
The condition at WebCore/rendering/InlineFlowBox.cpp line 493 doesn't seem to be enough.
!isReplaced() should be !IsReplaced() || style()->display() == INLINE_BLOCK.
yutak, could you attach the patch to this bug?
Comment on attachment 42306[details]
Fix alignment of vertical-align: text-bottom inside an inline-block.
Missing binary file in patch. This patch cannot physically be landed.
(In reply to comment #3)
> (From update of attachment 42306[details])
> Missing binary file in patch. This patch cannot physically be landed.
Sorry for that, I'll add it.
Comment on attachment 43272[details]
Fix alignment of vertical-align: text-bottom inside an inline-block. (v2)
> - if (!isReplaced()) // lineHeight - baselinePosition is always 0 for replaced elements, so don't bother wasting time in that case.
> + if (!isReplaced() || style()->display() == INLINE_BLOCK) // lineHeight - baselinePosition is always 0 for replaced elements, so don't bother wasting time in that case.
We'll need someone more familiar with the rendering code to review the substance of this patch. But the comment needs to be changed. It's now definitely wrong.
(In reply to comment #6)
> (From update of attachment 43272[details])
> > - if (!isReplaced()) // lineHeight - baselinePosition is always 0 for replaced elements, so don't bother wasting time in that case.
> > + if (!isReplaced() || style()->display() == INLINE_BLOCK) // lineHeight - baselinePosition is always 0 for replaced elements, so don't bother wasting time in that case.
>
> We'll need someone more familiar with the rendering code to review the
> substance of this patch. But the comment needs to be changed. It's now
> definitely wrong.
Sure - I'll fix this. Thanks for your review!
Created attachment 46546[details]
calculate bottom using JS
I cannot determine if the code change is correct either (maybe we can ask Dan to review the code change?). Two comments on the layout tests. I'm not sure, but I guess this can be tested by dumpAsText(). Please see the attachment. I think no red should be seen in passing tests. How about changing the color of underline of the inner span?
(In reply to comment #10)
> I cannot determine if the code change is correct either (maybe we can ask Dan
> to review the code change?). Two comments on the layout tests. I'm not sure,
> but I guess this can be tested by dumpAsText(). Please see the attachment. I
> think no red should be seen in passing tests. How about changing the color of
> underline of the inner span?
Thank you for your suggestion. Sounds convincing. I'd like to fix the test.
Created attachment 46636[details]
Test case for display: inline-table + vertical-align: baseline
Ah, that specification was for display: inline-table + vertical-align: baseline.
So display: inline-table + vertical-align: text-bottom works fine.
(In reply to comment #21)
> Created an attachment (id=49190) [details]
> Patch (v5: apply hamaji's comment)
The change for the test looks good, thanks for the fix!
mitz, could you check the updated patch?
2009-10-28 01:11 PDT, HIRANO Takahito
2009-11-02 00:16 PST, Yuta Kitamura
2009-11-02 00:17 PST, Yuta Kitamura
2009-11-16 00:24 PST, Yuta Kitamura
2009-11-18 02:00 PST, Yuta Kitamura
2010-01-14 01:28 PST, Shinichiro Hamaji
2010-01-14 18:49 PST, Yuta Kitamura
2010-01-14 19:09 PST, HIRANO Takahito
2010-01-14 19:13 PST, HIRANO Takahito
2010-01-14 21:41 PST, Yuta Kitamura
2010-02-22 00:40 PST, Yuta Kitamura