Bug 167843 - Simple line layout: Use simplified text measuring when possible.
Summary: Simple line layout: Use simplified text measuring when possible.
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-04 16:02 PST by zalan
Modified: 2017-02-06 11:08 PST (History)
12 users (show)

See Also:


Attachments
Patch (67.95 KB, patch)
2017-02-04 16:20 PST, zalan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews112 for mac-elcapitan (3.00 MB, application/zip)
2017-02-04 18:19 PST, Build Bot
no flags Details
Patch (68.98 KB, patch)
2017-02-05 08:52 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (68.99 KB, patch)
2017-02-05 08:59 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (15.96 KB, patch)
2017-02-05 17:05 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (16.03 KB, patch)
2017-02-06 08:42 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (17.48 KB, patch)
2017-02-06 09:24 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-04 16:02:29 PST
Measuring simple text is simple.
Comment 1 Radar WebKit Bug Importer 2017-02-04 16:03:13 PST
<rdar://problem/30364907>
Comment 2 zalan 2017-02-04 16:20:16 PST
Created attachment 300644 [details]
Patch
Comment 3 Jon Lee 2017-02-04 16:30:08 PST
Comment on attachment 300644 [details]
Patch

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

> Source/WebCore/ChangeLog:11
> +        Performance test is added.

...and what does it show?
Comment 4 zalan 2017-02-04 16:32:02 PST
(In reply to comment #3)
> Comment on attachment 300644 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=300644&action=review
> 
> > Source/WebCore/ChangeLog:11
> > +        Performance test is added.
> 
> ...and what does it show?
oh the changelog is not ready. This is only for EWS.
(it shows how long it takes to layout the content in milliseconds)
Comment 5 Build Bot 2017-02-04 18:19:14 PST
Comment on attachment 300644 [details]
Patch

Attachment 300644 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3005928

New failing tests:
fast/text/font-variant-ligatures.html
fast/text/system-font-features.html
http/tests/misc/acid3.html
css3/font-variant-font-face-override.html
Comment 6 Build Bot 2017-02-04 18:19:19 PST
Created attachment 300653 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 7 zalan 2017-02-05 08:52:00 PST
Created attachment 300664 [details]
Patch
Comment 8 zalan 2017-02-05 08:59:40 PST
Created attachment 300665 [details]
Patch
Comment 9 zalan 2017-02-05 17:05:30 PST
Created attachment 300678 [details]
Patch
Comment 10 zalan 2017-02-06 08:42:59 PST
Created attachment 300723 [details]
Patch
Comment 11 zalan 2017-02-06 09:24:24 PST
Created attachment 300727 [details]
Patch
Comment 12 Antti Koivisto 2017-02-06 09:26:53 PST
Comment on attachment 300727 [details]
Patch

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

> Source/WebCore/platform/graphics/WidthCache.h:133
> +    {
> +        if (MemoryPressureHandler::singleton().isUnderMemoryPressure())
> +            return nullptr;
> +
> +        if (static_cast<unsigned>(text.length()) > SmallStringKey::capacity())
> +            return nullptr;
> +
> +        if (m_countdown > 0) {
> +            --m_countdown;
> +            return nullptr;
> +        }

Could we factor these tests into a function shared with the other add()?
Comment 13 zalan 2017-02-06 10:42:50 PST
(In reply to comment #12)
> Comment on attachment 300727 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=300727&action=review
> 
> > Source/WebCore/platform/graphics/WidthCache.h:133
> > +    {
> > +        if (MemoryPressureHandler::singleton().isUnderMemoryPressure())
> > +            return nullptr;
> > +
> > +        if (static_cast<unsigned>(text.length()) > SmallStringKey::capacity())
> > +            return nullptr;
> > +
> > +        if (m_countdown > 0) {
> > +            --m_countdown;
> > +            return nullptr;
> > +        }
> 
> Could we factor these tests into a function shared with the other add()?
Only the first 2 checks could be merged and the slow path has the length() check as the last one and I assume the order is fine-tuned.
Let me address this in a follow-up patch.
Comment 14 WebKit Commit Bot 2017-02-06 11:08:10 PST
Comment on attachment 300727 [details]
Patch

Clearing flags on attachment: 300727

Committed r211738: <http://trac.webkit.org/changeset/211738>
Comment 15 WebKit Commit Bot 2017-02-06 11:08:16 PST
All reviewed patches have been landed.  Closing bug.