Changeset 212482 in webkit


Ignore:
Timestamp:
Feb 16, 2017 3:58:34 PM (7 years ago)
Author:
Alan Bujtas
Message:

Simple line layout: Add forced line layout info to coverage print.
https://bugs.webkit.org/show_bug.cgi?id=168470

Reviewed by Simon Fraser.

This is about potential vs. actual coverage:

Simple line layout potential coverage: 65.05%
Simple line layout actual coverage: 46.60%
Forced line layout blocks: 4 content length: 57(18.45%)

Not testable.

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r212481 r212482  
     12017-02-16  Zalan Bujtas  <zalan@apple.com>
     2
     3        Simple line layout: Add forced line layout info to coverage print.
     4        https://bugs.webkit.org/show_bug.cgi?id=168470
     5
     6        Reviewed by Simon Fraser.
     7
     8        This is about potential vs. actual coverage:
     9
     10        Simple line layout potential coverage: 65.05%
     11        Simple line layout actual coverage: 46.60%
     12        Forced line layout blocks: 4 content length: 57(18.45%)
     13
     14        Not testable.
     15
     16        * rendering/SimpleLineLayout.cpp:
     17        (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
     18
    1192017-02-16  Anders Carlsson  <andersca@apple.com>
    220
  • trunk/Source/WebCore/rendering/SimpleLineLayout.cpp

    r212468 r212482  
    13401340    unsigned unsupportedTextLength = 0;
    13411341    unsigned numberOfUnsupportedLeafBlocks = 0;
     1342    unsigned supportedButForcedToLineLayoutTextLength = 0;
     1343    unsigned numberOfSupportedButForcedToLineLayoutLeafBlocks = 0;
    13421344    for (const auto* flow : leafRenderers) {
    13431345        auto flowLength = textLengthForSubtree(*flow);
    13441346        textLength += flowLength;
    13451347        auto reasons = canUseForWithReason(*flow, IncludeReasons::All);
    1346         if (reasons == NoReason)
     1348        if (reasons == NoReason) {
     1349            if (flow->lineLayoutPath() == RenderBlockFlow::ForceLineBoxesPath) {
     1350                supportedButForcedToLineLayoutTextLength += flowLength;
     1351                ++numberOfSupportedButForcedToLineLayoutLeafBlocks;
     1352            }
    13471353            continue;
     1354        }
    13481355        ++numberOfUnsupportedLeafBlocks;
    13491356        unsupportedTextLength += flowLength;
     
    13571364    }
    13581365    stream << "---------------------------------------------------\n";
    1359     stream << "Number of text blocks: total(" <<  leafRenderers.size() << ") non-simple(" << numberOfUnsupportedLeafBlocks << ")\nText length: total(" <<
     1366    stream << "Number of blocks: total(" <<  leafRenderers.size() << ") non-simple(" << numberOfUnsupportedLeafBlocks << ")\nContent length: total(" <<
    13601367        textLength << ") non-simple(" << unsupportedTextLength << ")\n";
    13611368    for (const auto reasonEntry : flowStatistics) {
     
    13631370        stream << ": " << (float)reasonEntry.value / (float)textLength * 100 << "%\n";
    13641371    }
    1365     stream << "simple line layout coverage: " << (float)(textLength - unsupportedTextLength) / (float)textLength * 100 << "%\n";
    1366     stream << "---------------------------------------------------\n";
     1372    if (supportedButForcedToLineLayoutTextLength) {
     1373        stream << "Simple line layout potential coverage: " << (float)(textLength - unsupportedTextLength) / (float)textLength * 100 << "%\n\n";
     1374        stream << "Simple line layout actual coverage: " << (float)(textLength - unsupportedTextLength - supportedButForcedToLineLayoutTextLength) / (float)textLength * 100 << "%\nForced line layout blocks: " << numberOfSupportedButForcedToLineLayoutLeafBlocks << " content length: " << supportedButForcedToLineLayoutTextLength << "(" << (float)supportedButForcedToLineLayoutTextLength / (float)textLength * 100 << "%)";
     1375    } else
     1376        stream << "Simple line layout coverage: " << (float)(textLength - unsupportedTextLength) / (float)textLength * 100 << "%";
     1377    stream << "\n---------------------------------------------------\n";
    13671378    WTFLogAlways("%s", stream.release().utf8().data());
    13681379}
Note: See TracChangeset for help on using the changeset viewer.