Closed Bug 1280149 Opened 5 years ago Closed 5 years ago

Modal highlighting doesn't work in some iframes

Categories

(Toolkit :: Find Toolbar, defect)

50 Branch
defect
Not set
normal
Points:
5

Tracking

()

VERIFIED FIXED
mozilla50
Iteration:
51.3 - Sep 19
Tracking Status
firefox49 --- unaffected
firefox50 --- unaffected
firefox51 --- disabled
firefox52 --- verified

People

(Reporter: u123541, Assigned: mikedeboer)

References

(Blocks 1 open bug)

Details

(Keywords: nightly-community, regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20160611030214

Steps to reproduce:

Went to http://claws-mail.org/documentation.php?section=general
and tried to find "pass" via Ctrl+f


Actual results:

"pass" appeared in a box with yellow background; but nowhere near that string in the page's text.  Several other white borderless boxes also appear.  Virtually impossible to find...


Expected results:

Find should align with the found text.
Blocks: 384458
Status: UNCONFIRMED → NEW
Ever confirmed: true
The random white boxes and pass in the wrong position is a duplicate of bug 1279682.

Only half the page is dimmed which is a duplicate of bug 1279681. Only about half the page is dimmed for me which makes it an extreme test case.
Bug 1279742 will fix these issues as well, because it's using a different method of building rectangles to cut out of the dimmed background.
Depends on: 1279742
Component: Untriaged → Find Toolbar
Product: Firefox → Toolkit
Target Milestone: --- → mozilla50
This problem still exists...
(In reply to Mike de Boer [:mikedeboer] from comment #4)
> This problem still exists...

Does it? I can no longer replicate this.
I can reproduce the problem on Nightly50.0a1.

https://hg.mozilla.org/mozilla-central/rev/c2da34d96746288b5fee27bf6542a12c9f410988
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 ID:20160626030213
Feature has been backed out so not tracking these bugs for 50.
Blocks: 1291278
Bulk update to find bar bugs that won't be in 50 (according to https://bugzilla.mozilla.org/show_bug.cgi?id=1279695#c4 and local testing).
Summary: find quite confused → Modal highlighting doesn't work in some iframes
Assignee: nobody → mdeboer
Status: NEW → ASSIGNED
Iteration: --- → 51.3 - Sep 12
Points: --- → 5
Comment on attachment 8786376 [details]
Bug 1280149 - rework and fix the positioning for range rects to work better with iframes and try better to not draw rects that are not visible from the top document. This basically means to leverage the Geometry.jsm API more and better.

https://reviewboard.mozilla.org/r/75344/#review73278

::: toolkit/modules/FinderHighlighter.jsm:1069
(Diff revision 2)
>        if (dict.unconditionalRepaintRequested) {
>          dict.unconditionalRepaintRequested = false;
>          this._repaintHighlightAllMask(window);
> -        return;
> -      }
> +      // !unconditional.
> +      } else if (dict.modalHighlightRectsMap.size && pageContentChanged) {
> -
> -      let { width, height } = this._getWindowDimensions(window);
> -      if (!dict.modalHighlightRectsMap.size ||
> -          (Math.abs(dict.lastWindowDimensions.width - width) < kContentChangeThresholdPx &&
> -           Math.abs(dict.lastWindowDimensions.height - height) < kContentChangeThresholdPx)) {
> -        return;
> -      }
> -
> -      this.iterator.restart(this.finder);
> -      dict.lastWindowDimensions = { width, height };
> -      this._repaintHighlightAllMask(window);
> +        this._repaintHighlightAllMask(window);
> +      }

Can these two sections be merged? Can we always set dict.unconditionalRepaintRequested = false?

if (dict.unconditionalRepaintRequested ||
    (dict.modalHighlightRectsMap.size && pageContentChanged)) {
  dict.unconditionalRepatinRequested = false;
  this._repaintHighlightAllMask(window);
}

::: toolkit/modules/FinderHighlighter.jsm:1072
(Diff revision 2)
> +        this.iterator.restart(this.finder);
> +
>        if (dict.unconditionalRepaintRequested) {
>          dict.unconditionalRepaintRequested = false;
>          this._repaintHighlightAllMask(window);
> -        return;
> +      // !unconditional.

This comment should be removed.
Attachment #8786376 - Flags: review?(jaws) → review+
Pushed by mdeboer@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb40070e2bf6
rework and fix the positioning for range rects to work better with iframes and try better to not draw rects that are not visible from the top document. This basically means to leverage the Geometry.jsm API more and better. r=jaws
https://hg.mozilla.org/mozilla-central/rev/cb40070e2bf6
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
I cannot reproduce this issue because of bug 1305420 .
This should be verified when bug 1305420 will be fixed.
Depends on: 1305420
Verified fixed using the the latest Nightly 52.0a1 (Build ID:20161005030211) on Windows 10, Ubuntu 14.04 and Mac OS X 10.10.

What I observed is that the highlight for matching terms is visible outside the iframe area and moves when you scroll. For this issue I filled bug 1308187
Status: RESOLVED → VERIFIED
Based on comment 6 from bug 1303248 setting status-51 disabled and based on comment 17 setting status-52 to verified
You need to log in before you can comment on or make changes to this bug.