Bug 13237

Summary: anchor tag is not rendered without text content, works in Firefox with CSS background-image
Product: WebKit Reporter: Jake Logan <j>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, bhagyalaxmi.dash, hyatt
Priority: P2 Keywords: InRadar
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
anchor tag reduction
none
This file contains the patch for bug-id 13237.
hyatt: review-
test firefox
none
test csv safari none

Description Jake Logan 2007-03-30 15:23:45 PDT
Please see attached reduction. It has two instances of the anchor tag, both with a background image set via CSS. The first has no text inside the tag, the other does. Both render in Firefox, WebKit does not render the first since is has no text, ignoring the background image CSS.
Comment 1 Jake Logan 2007-03-30 15:24:27 PDT
Created attachment 13896 [details]
anchor tag reduction
Comment 2 Dave Hyatt 2007-03-30 16:13:24 PDT
We skip empty inlines that are within ignored whitespace.  This is being debated in CSS2.1 right now but the spec will probably say we should render it.

Comment 3 Jake Logan 2007-06-04 15:24:38 PDT
May be related to: http://bugs.webkit.org/show_bug.cgi?id=13995
Comment 4 Bhagyalaxmi Dash 2007-07-23 16:02:03 PDT
Created attachment 15654 [details]
This file contains the patch for bug-id 13237.

There 5 layout tests failing with this fix.
But, these are valid failure cases considering the bug in hand.

The following 5 test cases are failing in the layout test.

(1) fast/dom/onerror-img.html
(2) fast/forms/access-key.html
(3) fast/lists/markers-in-selection.html
(4) tables/mozilla/other/wa_table_thtd_rowspan.html
(5) tables/mozilla/other/wa_table_tr_align.html
Comment 5 Darin Adler 2007-07-23 16:04:05 PDT
If the changes in layout tests are correct, then the patch should include updated test results.
Comment 6 Bhagyalaxmi Dash 2007-07-23 16:28:11 PDT
(In reply to comment #5)
> If the changes in layout tests are correct, then the patch should include
> updated test results.
> 

Darin, I did not understand what you have stated above.
I have not modified any existing Layout test.
I have added one layout test specific to this bug.
My patch includes this test case and the expected.txt for the same.

How do I include the updated test results for the 5 test cases, discussed in Comment#4, in my patch ?
Comment 7 David Kilzer (:ddkilzer) 2007-07-23 23:26:30 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > If the changes in layout tests are correct, then the patch should include
> > updated test results.
> 
> Darin, I did not understand what you have stated above.
> I have not modified any existing Layout test.
> I have added one layout test specific to this bug.
> My patch includes this test case and the expected.txt for the same.
> 
> How do I include the updated test results for the 5 test cases, discussed in
> Comment#4, in my patch ?

If the test results are different, you may run the WebKit tests using:

WebKitTools/Scripts/run-webkit-tests --reset-results

Comment 8 Dave Hyatt 2007-07-24 04:04:58 PDT
Comment on attachment 15654 [details]
This file contains the patch for bug-id 13237.

This is completely wrong.
Comment 9 Dave Hyatt 2007-07-24 04:05:36 PDT
There is absolutely no reason to add special-case "anchor element" code to bidi.cpp.
Comment 10 Dave Hyatt 2007-07-24 04:08:06 PDT
offsetLeft/Top are relative to your offsetParent.  I would guess we had offsetParent wrong.  The goal here is to match IE.  What does IE return here?

Comment 11 David Kilzer (:ddkilzer) 2007-07-24 07:37:17 PDT
(In reply to comment #10)
> offsetLeft/Top are relative to your offsetParent.  I would guess we had
> offsetParent wrong.  The goal here is to match IE.  What does IE return here?

I believe that comment was meant for Bug 14722.

Comment 12 Bhagyalaxmi Dash 2007-07-25 14:37:45 PDT
(In reply to comment #10)
> offsetLeft/Top are relative to your offsetParent.  I would guess we had
> offsetParent wrong.  The goal here is to match IE.  What does IE return here?
> 

I don't understand how offsetLeft/Top/Parent affect this bug. Could you please explain more on it ?

IE doesn't render properly to this scenario. It leaves an empty space(without a boundary) for the empty anchor element, where as it renders a box to the anchor tag having some text inside.

Firefox renders a box of minimal width for an empty anchor tag and renders a box of required width if an anchor element has some content within.
Comment 13 Bhagyalaxmi Dash 2007-07-25 15:21:08 PDT
(In reply to comment #10)
> offsetLeft/Top are relative to your offsetParent.  I would guess we had
> offsetParent wrong.  The goal here is to match IE.  What does IE return here?
> 

Dave, was your comment intended for bug #13237 or for bug #14722 ? David Kilzer thinks you may have accidentally posted comment #10 to bug #13237.

If your comment was intended for bug #14722, should the behavior for bug #13237 match IE or Firefox? (for SAP we need the behavior to match Firefox)
Comment 14 Darin Adler 2007-08-09 15:16:54 PDT
<rdar://problem/5399614>
Comment 15 Darin Adler 2007-10-25 08:41:53 PDT
*** Bug 13995 has been marked as a duplicate of this bug. ***
Comment 16 Beth Dakin 2007-10-30 11:05:14 PDT
Fixed with r27254.
Comment 17 Jake Logan 2008-02-21 15:46:11 PST
Created attachment 19263 [details]
test firefox
Comment 18 Jake Logan 2008-02-21 15:53:50 PST
Created attachment 19264 [details]
test csv safari