WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
63368
RenderTextFragment should have regular children instead of magical first-letter child
https://bugs.webkit.org/show_bug.cgi?id=63368
Summary
RenderTextFragment should have regular children instead of magical first-lett...
Ryosuke Niwa
Reported
2011-06-24 17:31:59 PDT
There are numerous bugs and security vulnerabilities due to first-letter / RenderTextFragment being so exotic to the rest of render objects. We should make RenderTextFragment act like the rest of rendering objects. Namely, it should own regular children instead of holding a special pointer for first-letter. This will fix almost all crashes and bugs related to first-letter in WebCore/editing.
Attachments
WIP patch.
(6.83 KB, patch)
2012-06-14 00:59 PDT
,
Antaryami Pandia (apandia)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Levi Weintraub
Comment 1
2011-06-24 17:54:47 PDT
Yesssss! This was the conclusion I drew in my own frustration dealing with first-letter and editing. Seeing these problems continue to crop up really drives the issue home. I'm happy to work on this.
Abhishek Arya
Comment 2
2011-06-24 20:22:25 PDT
Thanks a lot Levi and Ryosuke.
Ryosuke Niwa
Comment 3
2011-06-25 16:21:47 PDT
There are 2 possible approaches: 1. Keep RenderTextFragment inherit from RenderText. In this approach, RenderTextFragment will act like RenderText and we can work-around most of issues in editing by adding a method to return the entire text instead "everything but first letter". The problem with this approach is that renderes of inline text boxes will still be that of internal RenderText unless we wrap renderer() as well. 2. Make RenderTextFragment a render inline. In this approach, we'll reimplement first-letter and act like anonymous node that contains two RenderText. There are a lot of uncertainlies and risks but the biggest problem is that Text DOM nodes's renderer() will no longer return RenderText. It might complicate many logics in editing and accessibility in addition to rendering, hit testing, and caret rendering, etc...
Levi Weintraub
Comment 4
2011-06-27 11:15:45 PDT
I talked with Ryosuke about this a bit. In my opinion, the first approach is viable and worthy of a proof of concept to make sure it's not out of the scope we think it is. I worry option 2 would be too invasive, kind of like getting the current first-letter implementation to work properly :)
Antaryami Pandia (apandia)
Comment 5
2012-06-14 00:59:45 PDT
Created
attachment 147509
[details]
WIP patch. Basic WIP patch.
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