Changeset 213440 in webkit
- Timestamp:
- Mar 5, 2017, 6:48:20 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LayoutTests/ChangeLog ¶
r213438 r213440 1 2017-03-05 Simon Fraser <simon.fraser@apple.com> 2 3 Avoid backing store for layers with empty text nodes in a few more cases 4 https://bugs.webkit.org/show_bug.cgi?id=169185 5 6 Reviewed by Dan Bernstein. 7 8 inline-block-no-backing.html enhanced to have a layer with non-collapsible whitespace (an ). 9 10 Rebaselined other tests. 11 12 * compositing/backing/inline-block-no-backing-expected.txt: 13 * compositing/backing/inline-block-no-backing.html: 14 * compositing/iframes/page-cache-layer-tree-expected.txt: 15 * css3/blending/blend-mode-clip-accelerated-blending-canvas-expected.txt: 16 * platform/ios-simulator-wk2/compositing/backing/inline-block-no-backing-expected.txt: 17 * platform/ios-simulator-wk2/compositing/iframes/page-cache-layer-tree-expected.txt: 18 1 19 2017-03-05 Chris Dumez <cdumez@apple.com> 2 20 -
TabularUnified trunk/LayoutTests/compositing/backing/inline-block-no-backing-expected.txt ¶
r173293 r213440 1 1 2 2 3 3 (GraphicsLayer … … 8 8 (bounds 800.00 600.00) 9 9 (contentsOpaque 1) 10 (children 310 (children 4 11 11 (GraphicsLayer 12 12 (position 18.00 18.00) … … 15 15 (children 2 16 16 (GraphicsLayer 17 (position 1 0.00 10.00)17 (position 18.00 10.00) 18 18 (bounds 120.00 120.00) 19 19 ) … … 52 52 ) 53 53 ) 54 (GraphicsLayer 55 (position 570.00 18.00) 56 (bounds 160.00 320.00) 57 (children 2 58 (GraphicsLayer 59 (position 10.00 10.00) 60 (bounds 120.00 120.00) 61 ) 62 (GraphicsLayer 63 (position 10.00 154.00) 64 (bounds 120.00 120.00) 65 ) 66 ) 67 ) 54 68 ) 55 69 ) -
TabularUnified trunk/LayoutTests/compositing/backing/inline-block-no-backing.html ¶
r173293 r213440 43 43 </head> 44 44 <body> 45 <div class="composited container"> 46 <img class="composited child" src="../resources/apple.jpg"> 47 <img class="composited child" src="../resources/apple.jpg"> 48 </div> 45 49 <div class="composited container"> 46 50 <img class="composited child" src="../resources/apple.jpg"> -
TabularUnified trunk/LayoutTests/compositing/iframes/page-cache-layer-tree-expected.txt ¶
r209932 r213440 62 62 (position 8.00 274.00) 63 63 (bounds 784.00 224.00) 64 (drawsContent 1)65 64 (children 1 66 65 (GraphicsLayer -
TabularUnified trunk/LayoutTests/css3/blending/blend-mode-clip-accelerated-blending-canvas-expected.txt ¶
r168356 r213440 11 11 (bounds 100.00 100.00) 12 12 (contentsOpaque 1) 13 (drawsContent 1)14 13 (children 1 15 14 (GraphicsLayer -
TabularUnified trunk/LayoutTests/platform/ios-simulator-wk2/compositing/backing/inline-block-no-backing-expected.txt ¶
r177052 r213440 1 1 2 2 3 3 (GraphicsLayer … … 8 8 (bounds 800.00 600.00) 9 9 (contentsOpaque 1) 10 (children 310 (children 4 11 11 (GraphicsLayer 12 12 (position 18.00 18.00) … … 15 15 (children 2 16 16 (GraphicsLayer 17 (position 1 0.00 10.00)17 (position 18.00 10.00) 18 18 (bounds 120.00 120.00) 19 19 (drawsContent 1) … … 58 58 ) 59 59 ) 60 (GraphicsLayer 61 (position 570.00 18.00) 62 (bounds 160.00 320.00) 63 (children 2 64 (GraphicsLayer 65 (position 10.00 10.00) 66 (bounds 120.00 120.00) 67 (drawsContent 1) 68 ) 69 (GraphicsLayer 70 (position 10.00 155.00) 71 (bounds 120.00 120.00) 72 (drawsContent 1) 73 ) 74 ) 75 ) 60 76 ) 61 77 ) -
TabularUnified trunk/LayoutTests/platform/ios-simulator-wk2/compositing/iframes/page-cache-layer-tree-expected.txt ¶
r194063 r213440 62 62 (position 8.00 277.00) 63 63 (bounds 784.00 225.00) 64 (drawsContent 1)65 64 (children 1 66 65 (GraphicsLayer -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r213439 r213440 1 2017-03-05 Simon Fraser <simon.fraser@apple.com> 2 3 Avoid backing store for layers with empty text nodes in a few more cases 4 https://bugs.webkit.org/show_bug.cgi?id=169185 5 6 Reviewed by Dan Bernstein. 7 8 In hasPaintingNonLayerDescendants() we can check whether the RenderText's linesBoundingBox() 9 is empty to avoid backing store in a few more cases. Also use containsOnlyWhitespace() rather 10 than isAllCollapsibleWhitespace(), because there's no need for backing store for non-selectable 11 whitespace text. 12 13 Covered by existing tests. 14 15 * rendering/RenderLayer.cpp: 16 (WebCore::RenderLayer::calculateClipRects): 17 1 18 2017-03-05 Chris Dumez <cdumez@apple.com> 2 19 -
TabularUnified trunk/Source/WebCore/rendering/RenderLayer.cpp ¶
r213149 r213440 6593 6593 if (++siblingCount > maxSiblingCount) 6594 6594 return true; 6595 6595 6596 6596 if (is<RenderText>(child)) { 6597 bool isSelectable = renderer.style().userSelect() != SELECT_NONE; 6598 if (isSelectable || !downcast<RenderText>(child).isAllCollapsibleWhitespace()) 6597 const auto& renderText = downcast<RenderText>(child); 6598 if (renderText.linesBoundingBox().isEmpty()) 6599 continue; 6600 6601 if (renderer.style().userSelect() != SELECT_NONE) 6602 return true; 6603 6604 if (!renderText.text()->containsOnlyWhitespace()) 6599 6605 return true; 6600 6606 }
Note:
See TracChangeset
for help on using the changeset viewer.