Bug 166753 - Text highlight causes Yoon Gothic webfont to reflow.
Summary: Text highlight causes Yoon Gothic webfont to reflow.
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-01-05 21:04 PST by zalan
Modified: 2017-01-06 15:30 PST (History)
8 users (show)

See Also:


Attachments
Patch (7.48 KB, patch)
2017-01-05 22:17 PST, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (554.00 KB, application/zip)
2017-01-06 00:39 PST, Build Bot
no flags Details
Patch (7.79 KB, patch)
2017-01-06 10:48 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (7.80 KB, patch)
2017-01-06 11:20 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (7.63 KB, patch)
2017-01-06 14:53 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-01-05 21:04:19 PST
Simple line layout does not honor CJK keep-all word wrapping.
Comment 1 zalan 2017-01-05 21:04:37 PST
rdar://problem/29778563
Comment 2 zalan 2017-01-05 22:17:34 PST
Created attachment 298176 [details]
Patch
Comment 3 Build Bot 2017-01-06 00:39:20 PST
Comment on attachment 298176 [details]
Patch

Attachment 298176 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2842403

Number of test failures exceeded the failure limit.
Comment 4 Build Bot 2017-01-06 00:39:24 PST
Created attachment 298180 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 5 zalan 2017-01-06 08:20:09 PST
(In reply to comment #3)
> Comment on attachment 298176 [details]
> Patch
> 
> Attachment 298176 [details] did not pass mac-wk2-ews (mac-wk2):
> Output: http://webkit-queues.webkit.org/results/2842403
> 
> Number of test failures exceeded the failure limit.
It looks more like an EWS failure -> "Failed to run PrettyPatch, see error log."
Comment 6 zalan 2017-01-06 10:48:14 PST
Created attachment 298215 [details]
Patch
Comment 7 zalan 2017-01-06 11:20:47 PST
Created attachment 298217 [details]
Patch
Comment 8 Darin Adler 2017-01-06 13:44:42 PST
Comment on attachment 298217 [details]
Patch

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

> Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp:133
> +    auto nextBreakablePositionForSegment = [this] (unsigned startPosition, bool breakNBSP, bool keepAllWordsForCJK) {
> +        if (keepAllWordsForCJK) {
> +            if (breakNBSP)
> +                return nextBreakablePositionKeepingAllWords(m_lineBreakIterator, startPosition);
> +            return nextBreakablePositionKeepingAllWordsIgnoringNBSP(m_lineBreakIterator, startPosition);
> +        }
> +
> +        if (m_lineBreakIterator.isLooseCJKMode()) {
> +            if (breakNBSP)
> +                return nextBreakablePositionLoose(m_lineBreakIterator, startPosition);
> +            return nextBreakablePositionIgnoringNBSPLoose(m_lineBreakIterator, startPosition);
> +        }
> +        
> +        if (breakNBSP)
> +            return WebCore::nextBreakablePosition(m_lineBreakIterator, startPosition);
> +        return nextBreakablePositionIgnoringNBSP(m_lineBreakIterator, startPosition);
> +    };

Seems like this could be done with a pointer-to-member function instead of a lambda.
Comment 9 zalan 2017-01-06 14:53:04 PST
Created attachment 298229 [details]
Patch
Comment 10 zalan 2017-01-06 14:54:32 PST
or since I only need the lazyiterator from 'this', I could just come up with a static function.
Comment 11 WebKit Commit Bot 2017-01-06 15:30:08 PST
Comment on attachment 298229 [details]
Patch

Clearing flags on attachment: 298229

Committed r210456: <http://trac.webkit.org/changeset/210456>
Comment 12 WebKit Commit Bot 2017-01-06 15:30:15 PST
All reviewed patches have been landed.  Closing bug.