Bug 109274

Summary: [CSSRegions] Text highlight in regions is wrong
Product: WebKit Reporter: Mihnea Ovidenie <mihnea>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: jfernandez, rego, WebkitBugTracker
Priority: P2 Keywords: AdobeTracked
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Wrong paint for selection in region
none
Correct painted selection outside the region
none
Patch none

Description Mihnea Ovidenie 2013-02-08 01:51:41 PST
If you search for a word inside a region, the highlighted selection is painted wrong, as opposed to the case where the highlighted word is outside the region, see attached images.
Comment 1 Mihnea Ovidenie 2013-02-08 01:53:02 PST
Created attachment 187269 [details]
Wrong paint for selection in region
Comment 2 Mihnea Ovidenie 2013-02-08 01:53:48 PST
Created attachment 187270 [details]
Correct painted selection outside the region
Comment 3 Javier Fernandez 2013-08-13 14:02:44 PDT
Well, I had to apply the patch posted at bug 117631 but I can confirm this bug is not reproducible in the Gtk+ port.
Comment 4 Mihnea Ovidenie 2013-08-27 08:09:01 PDT
(In reply to comment #3)
> Well, I had to apply the patch posted at bug 117631 but I can confirm this bug is not reproducible in the Gtk+ port.

Looks like it does not repro from nightly r151344.
Comment 5 Mihnea Ovidenie 2013-08-27 12:43:31 PDT
Fixed by http://trac.webkit.org/changeset/151309, i believe it deserves a test.
Comment 6 Manuel Rego Casasnovas 2013-09-04 15:43:38 PDT
Created attachment 210503 [details]
Patch
Comment 7 Mihnea Ovidenie 2013-09-23 08:34:04 PDT
(In reply to comment #6)
> Created an attachment (id=210503) [details]
> Patch

Actually, the problem is the way the focus ring around the searched text is painted. I don't think that your test is testing that.

Here is the original sample i used to reproduce the problem:
<html>
    <head>
        <style>
            #article { -webkit-flow-into: flow; }
            #region { -webkit-flow-from: flow; width: 100px; height: 100px; position: absolute; top: 10px; left: 10px; }
        </style>
    </head>
    <body>
        <div id="article">Text inside article</div>
        <div id="region"></div>
    </body>
</html>

I am not sure how to test the focus ring though.
Comment 8 Manuel Rego Casasnovas 2013-10-01 04:43:51 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > Created an attachment (id=210503) [details] [details]
> > Patch
> 
> Actually, the problem is the way the focus ring around the searched text is painted. I don't think that your test is testing that.

Focus ring seems to be something particular from Mac port.

> I am not sure how to test the focus ring though.

Sorry but I don't know how to test it either :-(
Comment 9 Manuel Rego Casasnovas 2014-04-23 03:03:08 PDT
Comment on attachment 210503 [details]
Patch

Clearing flags.