Bug 168783 - Simple line layout: Adjust RunResolver::lineIndexForHeight with line struts.
Summary: Simple line layout: Adjust RunResolver::lineIndexForHeight with line struts.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-02-23 09:50 PST by zalan
Modified: 2017-02-23 12:14 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.74 KB, patch)
2017-02-23 10:02 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (3.74 KB, patch)
2017-02-23 10:28 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2017-02-23 09:50:28 PST
Struts push lines down so the lineIndex = y / m_lineHeight is not correct anymore.
Comment 1 Radar WebKit Bug Importer 2017-02-23 09:50:56 PST
<rdar://problem/30676449>
Comment 2 zalan 2017-02-23 10:02:32 PST
Created attachment 302525 [details]
Patch
Comment 3 Antti Koivisto 2017-02-23 10:08:48 PST
Comment on attachment 302525 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=302525&action=review

> Source/WebCore/rendering/SimpleLineLayoutResolver.cpp:147
> +    if (!m_layout.hasLineStruts())
> +        return lineIndexCandidate;

Could we factor the struts case to a function so that the common case stays clean? Something like

if (m_layout.hasLineStruts())
   return adjustLineIndexForStruts(lineIndexCandidate,...);

return lineIndexCandidate;
Comment 4 zalan 2017-02-23 10:28:15 PST
Created attachment 302530 [details]
Patch
Comment 5 WebKit Commit Bot 2017-02-23 11:27:05 PST
The commit-queue encountered the following flaky tests while processing attachment 302530 [details]:

editing/spelling/spellcheck-async.html bug 160571 (authors: g.czajkowski@samsung.com and mark.lam@apple.com)
The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2017-02-23 11:27:10 PST
The commit-queue encountered the following flaky tests while processing attachment 302530 [details]:

The commit-queue is continuing to process your patch.
Comment 7 WebKit Commit Bot 2017-02-23 12:13:40 PST
The commit-queue encountered the following flaky tests while processing attachment 302530 [details]:

editing/spelling/spellcheck-async.html bug 160571 (authors: g.czajkowski@samsung.com and mark.lam@apple.com)
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2017-02-23 12:14:11 PST
Comment on attachment 302530 [details]
Patch

Clearing flags on attachment: 302530

Committed r212912: <http://trac.webkit.org/changeset/212912>
Comment 9 WebKit Commit Bot 2017-02-23 12:14:16 PST
All reviewed patches have been landed.  Closing bug.