WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
261984
[Performance Optimization] Skip non-text SVG elements in Most{For/Back}wardCaretPosition
https://bugs.webkit.org/show_bug.cgi?id=261984
Summary
[Performance Optimization] Skip non-text SVG elements in Most{For/Back}wardCa...
Ahmad Saleem
Reported
2023-09-22 16:25:43 PDT
Hi Team, While going through Blink bug, I came across another potential issue, which we face as well and we are slow: Test Case (Copy paste from crbug.com/822312): 1. Access website
http://cwsdemo.hexagonusfederal.com/cwe
2. Click Open 3. Click Choose File 4. Browse to 5672-1.svg (attached) 5. Click open 6. Click Insert Item 7. Click Text 8. Click in map 9. "New Text" should be placed in the map What is the expected behavior? Immediate placement of default text. What went wrong? Depending on the size of the SVG file it takes seconds to minutes to place the text in the map with the last two official builds of Chrome. ___ Blink Commit:
https://chromium.googlesource.com/chromium/src.git/+/8e793a18ec6358414ffc337b336c93d4f6061c91
GitHub WebKit Source:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/Position.cpp#L715
&
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/Position.cpp#L823
__ Just wanted to raise so we can track and see if we can apply this optimization without any regression. Haven't tried fixing on my local build (Xcode 15 curse on macOS Ventura - waiting for Sonoma). Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-09-29 16:26:15 PDT
<
rdar://problem/116261189
>
Ahmad Saleem
Comment 2
2023-09-30 15:07:43 PDT
Need two headers - #include "SVGTextElement.h" #include "SVGElementTypeHelpers.h" and then following compiles: if (currentNode.isSVGElement() && !is<SVGTextElement>(currentNode)) continue;
EWS
Comment 3
2023-09-30 19:02:45 PDT
Committed
268699@main
(13274cf68d90): <
https://commits.webkit.org/268699@main
> Reviewed commits have been landed. Closing PR #18464 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug