Changeset 209756 in webkit
- Timestamp:
- Dec 13, 2016 8:08:04 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r209754 r209756 1 2016-12-13 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r198990): Safari - Cannot edit content inside <details> in wysiwyg editor 4 https://bugs.webkit.org/show_bug.cgi?id=165757 5 6 Reviewed by Andreas Kling. 7 8 * editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt: 9 * fast/html/details-edit-expected.txt: Added. 10 * fast/html/details-edit.html: Added. 11 1 12 2016-12-13 Per Arne Vollan <pvollan@apple.com> 2 13 -
trunk/LayoutTests/editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt
r198990 r209756 1 1 Pass. 2 3 2 WebKit didn't Crash. 4 -
trunk/Source/WebCore/ChangeLog
r209752 r209756 1 2016-12-13 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r198990): Cannot edit content inside <details> in wysiwyg editor 4 https://bugs.webkit.org/show_bug.cgi?id=165757 5 6 Reviewed by Andreas Kling. 7 8 Test: fast/html/details-edit.html 9 10 -webkit-user-modify is reset on shadow boundary so it doesn't go through <details> shadow tree. 11 12 * css/StyleResolver.cpp: 13 (WebCore::StyleResolver::styleForElement): 14 (WebCore::StyleResolver::pseudoStyleForElement): 15 (WebCore::StyleResolver::styleForPage): 16 (WebCore::StyleResolver::applyMatchedProperties): 17 * dom/Node.cpp: 18 (WebCore::computeEditabilityFromComputedStyle): 19 (WebCore::Node::computeEditability): 20 21 Make -webkit-user-modify (which we would want to get rid of completely eventually) have no effect in shadow trees. 22 Check for contenteditable directly instead. 23 24 * html/HTMLInputElement.cpp: 25 (WebCore::HTMLInputElement::createInnerTextStyle): 26 * html/HTMLTextAreaElement.cpp: 27 (WebCore::HTMLTextAreaElement::createInnerTextStyle): 28 * html/shadow/TextControlInnerElements.cpp: 29 * rendering/RenderFlowThread.cpp: 30 (WebCore::RenderFlowThread::createFlowThreadStyle): 31 * rendering/RenderLayer.cpp: 32 (WebCore::RenderLayer::calculateClipRects): 33 * rendering/RenderListItem.cpp: 34 (WebCore::RenderListItem::styleDidChange): 35 * rendering/style/RenderStyle.cpp: 36 (WebCore::RenderStyle::createAnonymousStyleWithDisplay): 37 (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle): 38 (WebCore::RenderStyle::inheritFrom): 39 40 Let -webkit-user-modify inherit through shadow boundary as normal. 41 42 * rendering/style/RenderStyle.h: 43 1 44 2016-12-12 Darin Adler <darin@apple.com> 2 45 -
trunk/Source/WebCore/css/StyleResolver.cpp
r209666 r209756 394 394 if (state.parentStyle()) { 395 395 state.setStyle(RenderStyle::createPtr()); 396 state.style()->inheritFrom( state.parentStyle(), isAtShadowBoundary(element) ? RenderStyle::AtShadowBoundary : RenderStyle::NotAtShadowBoundary);396 state.style()->inheritFrom(*state.parentStyle()); 397 397 } else { 398 398 state.setStyle(defaultStyleForElement()); … … 606 606 if (m_state.parentStyle()) { 607 607 state.setStyle(RenderStyle::createPtr()); 608 state.style()->inheritFrom( m_state.parentStyle());608 state.style()->inheritFrom(*m_state.parentStyle()); 609 609 } else { 610 610 state.setStyle(defaultStyleForElement()); … … 656 656 657 657 m_state.setStyle(RenderStyle::createPtr()); 658 m_state.style()->inheritFrom( m_state.rootElementStyle());658 m_state.style()->inheritFrom(*m_state.rootElementStyle()); 659 659 660 660 PageRuleCollector collector(m_state, m_ruleSets); … … 1339 1339 // If the cache item parent style has identical inherited properties to the current parent style then the 1340 1340 // resulting style will be identical too. We copy the inherited properties over from the cache and are done. 1341 state.style()->inheritFrom( cacheItem->renderStyle.get());1341 state.style()->inheritFrom(*cacheItem->renderStyle); 1342 1342 1343 1343 // Unfortunately the link status is treated like an inherited property. We need to explicitly restore it. -
trunk/Source/WebCore/dom/Node.cpp
r209683 r209756 702 702 return Editability::ReadOnly; 703 703 704 if (document().frame() && document().frame()->page() && document().frame()->page()->isEditable() && !containingShadowRoot()) 704 if (isInShadowTree()) 705 return HTMLElement::editabilityFromContentEditableAttr(*this); 706 707 if (document().frame() && document().frame()->page() && document().frame()->page()->isEditable()) 705 708 return Editability::CanEditRichly; 706 709 -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r208985 r209756 1949 1949 { 1950 1950 auto textBlockStyle = RenderStyle::create(); 1951 textBlockStyle.inheritFrom( &style);1951 textBlockStyle.inheritFrom(style); 1952 1952 adjustInnerTextStyle(style, textBlockStyle); 1953 1953 -
trunk/Source/WebCore/html/HTMLTextAreaElement.cpp
r209145 r209756 570 570 { 571 571 auto textBlockStyle = RenderStyle::create(); 572 textBlockStyle.inheritFrom( &style);572 textBlockStyle.inheritFrom(style); 573 573 adjustInnerTextStyle(style, textBlockStyle); 574 574 textBlockStyle.setDisplay(BLOCK); -
trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp
r208985 r209756 79 79 { 80 80 auto innerContainerStyle = RenderStyle::createPtr(); 81 innerContainerStyle->inheritFrom( shadowHostStyle);81 innerContainerStyle->inheritFrom(*shadowHostStyle); 82 82 83 83 innerContainerStyle->setFlexGrow(1); -
trunk/Source/WebCore/rendering/RenderFlowThread.cpp
r208985 r209756 72 72 { 73 73 auto newStyle = RenderStyle::create(); 74 newStyle.inheritFrom( parentStyle);74 newStyle.inheritFrom(*parentStyle); 75 75 newStyle.setDisplay(BLOCK); 76 76 newStyle.setPosition(AbsolutePosition); -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r209697 r209756 6936 6936 { 6937 6937 auto newStyle = RenderStyle::create(); 6938 newStyle.inheritFrom( &renderer().style());6938 newStyle.inheritFrom(renderer().style()); 6939 6939 6940 6940 // Map in our transform. -
trunk/Source/WebCore/rendering/RenderListItem.cpp
r209617 r209756 80 80 // The marker always inherits from the list item, regardless of where it might end 81 81 // up (e.g., in some deeply nested line box). See CSS3 spec. 82 newStyle.inheritFrom( &style());82 newStyle.inheritFrom(style()); 83 83 if (!m_marker) { 84 84 m_marker = createRenderer<RenderListMarker>(*this, WTFMove(newStyle)).leakPtr(); -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r209666 r209756 113 113 { 114 114 auto newStyle = create(); 115 newStyle.inheritFrom( &parentStyle);115 newStyle.inheritFrom(parentStyle); 116 116 newStyle.inheritUnicodeBidiFrom(&parentStyle); 117 117 newStyle.setDisplay(display); … … 124 124 125 125 auto style = create(); 126 style.inheritFrom( &pseudoStyle);126 style.inheritFrom(pseudoStyle); 127 127 return style; 128 128 } … … 268 268 } 269 269 270 void RenderStyle::inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary isAtShadowBoundary) 271 { 272 if (isAtShadowBoundary == AtShadowBoundary) { 273 // Even if surrounding content is user-editable, shadow DOM should act as a single unit, and not necessarily be editable 274 EUserModify currentUserModify = userModify(); 275 rareInheritedData = inheritParent->rareInheritedData; 276 setUserModify(currentUserModify); 277 } else 278 rareInheritedData = inheritParent->rareInheritedData; 279 inherited = inheritParent->inherited; 280 inherited_flags = inheritParent->inherited_flags; 281 282 if (m_svgStyle != inheritParent->m_svgStyle) 283 m_svgStyle.access()->inheritFrom(inheritParent->m_svgStyle.get()); 270 void RenderStyle::inheritFrom(const RenderStyle& inheritParent) 271 { 272 rareInheritedData = inheritParent.rareInheritedData; 273 inherited = inheritParent.inherited; 274 inherited_flags = inheritParent.inherited_flags; 275 276 if (m_svgStyle != inheritParent.m_svgStyle) 277 m_svgStyle.access()->inheritFrom(inheritParent.m_svgStyle.get()); 284 278 } 285 279 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r208705 r209756 511 511 StyleSelfAlignmentData resolvedJustifySelf(const RenderStyle& parentStyle, ItemPosition normalValueBehaviour) const; 512 512 513 enum IsAtShadowBoundary { 514 AtShadowBoundary, 515 NotAtShadowBoundary, 516 }; 517 518 void inheritFrom(const RenderStyle* inheritParent, IsAtShadowBoundary = NotAtShadowBoundary); 513 void inheritFrom(const RenderStyle& inheritParent); 519 514 void copyNonInheritedFrom(const RenderStyle*); 520 515
Note: See TracChangeset
for help on using the changeset viewer.