Changeset 280381 in webkit
- Timestamp:
- Jul 28, 2021, 7:01:53 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/editing/apply-relative-font-style-change-crash-001-expected.txt (added)
-
LayoutTests/fast/editing/apply-relative-font-style-change-crash-001.html (added)
-
LayoutTests/fast/editing/apply-relative-font-style-change-crash-002-expected.txt (added)
-
LayoutTests/fast/editing/apply-relative-font-style-change-crash-002.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/PositionIterator.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r280378 r280381 1 2021-07-28 Frédéric Wang <fwang@igalia.com> 2 3 Crash in ApplyStyleCommand::applyRelativeFontStyleChange 4 https://bugs.webkit.org/show_bug.cgi?id=226926 5 6 Reviewed by Ryosuke Niwa. 7 8 Add regression tests. 9 10 * fast/editing/apply-relative-font-style-change-crash-001-expected.txt: Added. 11 * fast/editing/apply-relative-font-style-change-crash-001-expected.txt: Added. 12 * fast/editing/apply-relative-font-style-change-crash-002.html: Added. 13 * fast/editing/apply-relative-font-style-change-crash-002.html: Added. 14 1 15 2021-07-28 Fujii Hironori <Hironori.Fujii@sony.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r280376 r280381 1 2021-07-28 Frédéric Wang <fwang@igalia.com> 2 3 Crash in ApplyStyleCommand::applyRelativeFontStyleChange 4 https://bugs.webkit.org/show_bug.cgi?id=226926 5 6 Reviewed by Ryosuke Niwa. 7 8 In r179944 and r180050, special handling was added for display: grid/flex nodes in 9 Position::isCandidate in order to make them editable but the same logic was not added in 10 PositionIterator::isCandidate. This patch fixes that inconsistency as well as the 11 corresponding debug ASSERT and release nullptr dereference. 12 13 Tests: fast/editing/apply-relative-font-style-change-crash-001.html 14 fast/editing/apply-relative-font-style-change-crash-002.html 15 16 * dom/PositionIterator.cpp: 17 (WebCore::PositionIterator::isCandidate const): Handle flexbox and grid. 18 1 19 2021-07-27 Joonghun Park <jh718.park@samsung.com> 2 20 -
trunk/Source/WebCore/dom/PositionIterator.cpp
r271635 r280381 33 33 #include "HTMLNames.h" 34 34 #include "RenderBlockFlow.h" 35 #include "RenderFlexibleBox.h" 36 #include "RenderGrid.h" 35 37 #include "RenderText.h" 36 38 … … 165 167 return (atStartOfNode() || atEndOfNode()) && !Position::nodeIsUserSelectNone(m_anchorNode->parentNode()); 166 168 167 if (!is<HTMLHtmlElement>(*m_anchorNode) && is<RenderBlockFlow>(*renderer)) {168 RenderBlockFlow& block = downcast<RenderBlockFlow>(*renderer);169 if (!is<HTMLHtmlElement>(*m_anchorNode) && (is<RenderBlockFlow>(*renderer) || is<RenderGrid>(*renderer) || is<RenderFlexibleBox>(*renderer))) { 170 auto& block = downcast<RenderBlock>(*renderer); 169 171 if (block.logicalHeight() || is<HTMLBodyElement>(*m_anchorNode)) { 170 172 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(block))
Note:
See TracChangeset
for help on using the changeset viewer.