Summary: | Links are unresponsive when they have { visibility: visible } and are contained in a { visibility: hidden } inline parent element | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Jim Dabell <jim> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | grundleborg, jim, kde |
Priority: | NOR | ||
Version: | 3.5 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Testcase
Testcase for bug #149018 Patch |
Description
Jim Dabell
2007-08-20 05:24:22 UTC
Created attachment 21435 [details]
Testcase
Created attachment 21436 [details] Testcase for bug #149018 Works as expected in Opera 9, Firefox 2 and Safari 2. Created attachment 21583 [details]
Patch
Here is a quick patch that fixes the bug.
The problem is that lines are not hittest when inlines are hidden. This
actually looks like a regression, since the commented code above would have
been working. Germain?
- if (/*hitTestAction != HitTestChildrenOnly &&*/ !inside && style()->visibility() != HIDDEN) {
+ if (/*hitTestAction != HitTestChildrenOnly &&*/ !inside ) {
yes indeed, visibility is tested at the linebox level now (e.g in InlineFlowBox::nodeAtPoint). It's a left over from how we did hit test before so it should be removed as well as the commented pieces (very untidy... must have forgot to clean that file before commit).
- if (inside && element()) {
+ if (inside && element() && style()->visibility() != HIDDEN) {
I hope we can soon remove this trailing block making post-hittest corrections (also the same is present in RenderText). I never quite understood what they were supposed to fix (inline blocks unduly stealing the inner node? mmh). They came from WC, and WC got rid of them eventually.
> The problem is that lines are not hittest when inlines are hidden. This
> actually looks like a regression, since the commented code above would have
> been working. Germain?
yes, if visibility was handled in the corresponding Render{Text/Image/etc.}::nodeAtPoint, it was probably working.
IIRC, overiding visibility from hidden to visible in children doesn't work everywhere (cf. wrong optimization in RenderLayer).
SVN commit 1046454 by ggarand: don't stop testing the inner line boxes if the parent inline is visibility:hidden. Inner children might override visibility. patch by Allan Sandfeld Jensen BUG: 149018 M +3 -9 render_inline.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1046454 |