Bug 167843

Summary: Simple line layout: Use simplified text measuring when possible.
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, commit-queue, esprehn+autocc, glenn, koivisto, kondapallykalyan, mmaxfield, rniwa, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews112 for mac-elcapitan
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

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.