Changeset 212482 in webkit
- Timestamp:
- Feb 16, 2017 3:58:34 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r212481 r212482 1 2017-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 1 19 2017-02-16 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebCore/rendering/SimpleLineLayout.cpp
r212468 r212482 1340 1340 unsigned unsupportedTextLength = 0; 1341 1341 unsigned numberOfUnsupportedLeafBlocks = 0; 1342 unsigned supportedButForcedToLineLayoutTextLength = 0; 1343 unsigned numberOfSupportedButForcedToLineLayoutLeafBlocks = 0; 1342 1344 for (const auto* flow : leafRenderers) { 1343 1345 auto flowLength = textLengthForSubtree(*flow); 1344 1346 textLength += flowLength; 1345 1347 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 } 1347 1353 continue; 1354 } 1348 1355 ++numberOfUnsupportedLeafBlocks; 1349 1356 unsupportedTextLength += flowLength; … … 1357 1364 } 1358 1365 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(" << 1360 1367 textLength << ") non-simple(" << unsupportedTextLength << ")\n"; 1361 1368 for (const auto reasonEntry : flowStatistics) { … … 1363 1370 stream << ": " << (float)reasonEntry.value / (float)textLength * 100 << "%\n"; 1364 1371 } 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"; 1367 1378 WTFLogAlways("%s", stream.release().utf8().data()); 1368 1379 }
Note: See TracChangeset
for help on using the changeset viewer.