Bug 135452

Summary: REGRESSION: Search highlight is broken in RTL multicolumn content
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: Layout and RenderingAssignee: Andrei Bucur <abucur>
Status: RESOLVED FIXED    
Severity: Normal CC: abucur, commit-queue, esprehn+autocc, glenn, hyatt, koivisto, kondapallykalyan, mihnea, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test case
none
Patch none

Description Ryosuke Niwa 2014-07-30 22:59:00 PDT
Created attachment 235808 [details]
test case

Reproduction steps:
1. Open the attached file in the nightly build of WebKit
2. Find "hello" via Cmd+F.

Expected result:
"hello" is highlighted

Actual result:
The yellow highlight shows up on the left of "hello".
Comment 1 Ryosuke Niwa 2014-07-30 23:08:08 PDT
The problem here is that RenderMultiColumnFlowThread::mapFromFlowToRegion doesn't add the layer offset when computing the translation offset despite the fact RenderMultiColumnSet::columnTranslationForOffset returns an offset from the layer's top left corner.

This is in contract to RenderLayer::collectFragments.  It calls RenderMultiColumnSet::collectLayerFragments, which also returns an offset from the layer's top left corner, but it adds the layer offset so everything is fine there.
Comment 2 Andrei Bucur 2014-07-31 08:37:37 PDT
I found the issue and I have a fix. Working on the patch ATM.
Comment 3 Andrei Bucur 2014-07-31 10:37:04 PDT
Created attachment 235829 [details]
Patch
Comment 4 WebKit Commit Bot 2014-07-31 12:51:08 PDT
Comment on attachment 235829 [details]
Patch

Clearing flags on attachment: 235829

Committed r171882: <http://trac.webkit.org/changeset/171882>
Comment 5 WebKit Commit Bot 2014-07-31 12:51:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Simon Fraser (smfr) 2014-07-31 15:42:02 PDT
<rdar://problem/17802531>
Comment 7 Ryosuke Niwa 2014-07-31 19:22:47 PDT
*** Bug 135453 has been marked as a duplicate of this bug. ***