Changeset 255448 in webkit
- Timestamp:
- Jan 30, 2020 12:59:52 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r255441 r255448 1 2020-01-30 Doug Kelly <dougk@apple.com> 2 3 Crash in RenderElement::selectionPseudoStyle with detail element set to display: contents 4 https://bugs.webkit.org/show_bug.cgi?id=206705 5 6 Reviewed by Zalan Bujtas. 7 8 * fast/css/display-contents-detail-selection-expected.txt: Added. 9 * fast/css/display-contents-detail-selection.html: Added. 10 1 11 2020-01-30 Truitt Savell <tsavell@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r255439 r255448 1 2020-01-30 Doug Kelly <dougk@apple.com> 2 3 Crash in RenderElement::selectionPseudoStyle with detail element set to display: contents 4 https://bugs.webkit.org/show_bug.cgi?id=206705 5 6 Reviewed by Zalan Bujtas. 7 8 Check the element for a valid renderer before calling getUncachedPseudoStyle(), and if the 9 element is set to "display: contents", walk up to the parent element until we're at the root 10 or the element is not set to "display: contents". 11 12 Test: fast/css/display-contents-detail-selection.html 13 14 * rendering/RenderElement.cpp: 15 (WebCore::RenderElement::selectionPseudoStyle const): 16 1 17 2020-01-30 Ryan Haddad <ryanhaddad@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderElement.cpp
r254187 r255448 1414 1414 if (ShadowRoot* root = element()->containingShadowRoot()) { 1415 1415 if (root->mode() == ShadowRootMode::UserAgent) { 1416 if (Element* shadowHost = element()->shadowHost()) 1417 return shadowHost->renderer()->getUncachedPseudoStyle({ PseudoId::Selection }); 1416 auto* currentElement = element()->shadowHost(); 1417 // When an element has display: contents, this element doesn't have a renderer 1418 // and its children will render as children of the parent element. 1419 while (currentElement && currentElement->hasDisplayContents()) 1420 currentElement = currentElement->parentElement(); 1421 if (currentElement && currentElement->renderer()) 1422 return currentElement->renderer()->getUncachedPseudoStyle({ PseudoId::Selection }); 1418 1423 } 1419 1424 }
Note: See TracChangeset
for help on using the changeset viewer.