Closed
Bug 253572
Opened 20 years ago
Closed 20 years ago
[EVENTTARG]Block links not block when next to float in a float layout
Categories
(Core :: Layout: Block and Inline, defect, P2)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha3
People
(Reporter: ac, Assigned: bzbarsky)
References
()
Details
Attachments
(2 files)
4.73 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
3.28 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 The URL shows a cut-down version of a layout template in use at http://nomensa.com, and uses links in a list that have been given display: block. When next to the content section, these links are not block, i.e. they have a small hit-area of just the text. Reproducible: Always Steps to Reproduce: 1. Go to the page and view. Actual Results: The links next to the content are not block, the links below the content (usually none except in this text case) display the expected behavior. Expected Results: Displayed all the links in the navigation as block-elements.
Assignee | ||
Comment 1•20 years ago
|
||
Interesting. Somehow the "wrap2" div (the nested float) is ending up _above_ the floated menu (at least for GetFrameForPoint() purposes). That's wrong.... The problem seems to be in nsBlockFrame::GetFrameForPoint in the NS_FRAME_PAINT_LAYER_FLOATS case. We're clicking the background of a block-level child of a floated child. So the FOREGROUND search in the floatList comes up empty. Then we do a FLOATS search in the floatList, which recurses into checking floats, including their backgrounds. So the FLOATS search in the floatList finds the _background_ of the float-within-a-float. Then we never do a BACKGROUND search in the floatList, since we found something.... Isn't the right thing to do here to do the FOREGROUND/FLOATS/BACKGROUND checks on each item in the floatList before moving on to the next one?
Yes. The easy way to describe it is that GetFrameForPoint should do exactly the reverse of what Paint does.
Reporter | ||
Comment 3•20 years ago
|
||
You make it sound like a fairly easy to understand thing. (As someone who knows vitually nothing about coding a browser, or 'painting' ;) Does that mean it is easy to fix, or are there a whole truck-load of other things to consider? (NB: I do have a vested interest in seeing it work, although I think others will as well, due to an Alistapart article on this type of layout.)
Assignee | ||
Comment 4•20 years ago
|
||
Assignee | ||
Comment 5•20 years ago
|
||
Comment on attachment 155389 [details] [diff] [review] Patch This creates a new paint layer (ALL) and makes GetFrameForPoint know about it and deal. The changes to the nsFramePaintLayer enum are not strictly needed, but it made sense to me to make the whole thing a bitfield given the introduction of NS_FRAME_PAINT_LAYER_ALL.
Attachment #155389 -
Flags: superreview?(roc)
Attachment #155389 -
Flags: review?(roc)
Assignee | ||
Updated•20 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Attachment #155389 -
Flags: superreview?(roc)
Attachment #155389 -
Flags: superreview+
Attachment #155389 -
Flags: review?(roc)
Attachment #155389 -
Flags: review+
In the nsBlockFrame.cpp changes, you could have used the third of the three statements you removed as a basis (the one beginning with |return| rather than |rv =| and removed the additional if (NS_OK == rv) { return NS_OK; }
Assignee | ||
Updated•20 years ago
|
Assignee: nobody → bzbarsky
Priority: -- → P2
Target Milestone: --- → mozilla1.8alpha3
Assignee | ||
Comment 7•20 years ago
|
||
Checked in (and the change David mentions in comment 6 also checked in) for 1.8a3.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 8•20 years ago
|
||
Wow, that's some code... break after return, else after return... Maybe next time someone touches that :-)
Reporter | ||
Comment 9•20 years ago
|
||
The test case will disappear from the server, so attaching this original page for future checks.
Reporter | ||
Comment 10•20 years ago
|
||
This bug seems to be back in the preview release, is that because it is using an older build or because the fix has been undone?
Assignee | ||
Comment 11•20 years ago
|
||
Firefox PR1 is using the 1.7 branch, which branched off the trunk in April; about 4 months before this bug was fixed.
Summary: Block links not block when next to float in a float layout → [EVENTTARG]Block links not block when next to float in a float layout
You need to log in
before you can comment on or make changes to this bug.
Description
•