Bug 266879

Summary: Make "Outdent" command to respect CSS display property
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Ahmad Saleem
Reported 2023-12-25 06:39:37 PST
Hi Team, While going through Blink's commit, I came across following commit, which I think can be merged: Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/73a2d635d5779e1092de3d26e4ee33d758d46444 WebKit Commit: https://github.com/WebKit/WebKit/blob/b2da34277e48164f292542ed493e1c4177fba7ce/Source/WebCore/editing/IndentOutdentCommand.cpp#L47 Below compiles and don't regress anything in 'WPT' (selection / editing etc.): // Returns true if `node` is UL, OL, or BLOCKQUOTE with "display:block". // "Outdent" command considers <BLOCKQUOTE style="display:inline"> makes // indentation. static bool isListOrIndentBlockquote(const Node& node) { const auto& element = dynamicDowncast<HTMLElement>(node); if (!element) return false; if (!node.renderer() || !node.renderer()->isRenderBlock()) return false; return node.hasTagName(ulTag) || node.hasTagName(olTag) || node.hasTagName(blockquoteTag); } ____ Just wanted to raise to get input, if we can fix it. Thanks!
Attachments
Ahmad Saleem
Comment 1 2023-12-25 06:41:17 PST
*** Bug 266880 has been marked as a duplicate of this bug. ***
Ahmad Saleem
Comment 2 2023-12-25 06:41:38 PST
It could be potential optimization as well to early return if it is not 'HTML' document and also if it does not have any renderer.
Radar WebKit Bug Importer
Comment 3 2024-01-01 06:40:14 PST
Note You need to log in before you can comment on or make changes to this bug.