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
27660
createMarkup does not handle CSS properly
https://bugs.webkit.org/show_bug.cgi?id=27660
Summary
createMarkup does not handle CSS properly
Ryosuke Niwa
Reported
2009-07-24 11:59:57 PDT
Created
attachment 33458
[details]
Demonstrates the bug using InsertOrderedList createMarkup adds span with style, which is directly taken from CSSMutableDeclaration class. But this causes the following problems: 1. -webkit-text-decorations-in-effect hasn't been converted to text-decoration. 2. It produces CSS regardless of whether StyleWithCSS is on or not.
Attachments
Demonstrates the bug using InsertOrderedList
(638 bytes, text/html)
2009-07-24 11:59 PDT
,
Ryosuke Niwa
no flags
Details
fixes the bug but may worsen the bug 26483
(20.31 KB, patch)
2009-07-24 21:05 PDT
,
Ryosuke Niwa
justin.garcia
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Seidel (no email)
Comment 1
2009-07-24 12:21:38 PDT
This is also not a P1. Please see
http://webkit.org/quality/bugpriorities.html
.
Ryosuke Niwa
Comment 2
2009-07-24 17:40:24 PDT
Changing specialCommonAncestor turned out to be rather challenging because of /LayoutTests/editing/deleting/pruning-after-merge-2.html. In this test, we have <div id="test" contenteditable="true"><div>foo</div><div style="border: 1px solid blue; padding: 5px"><b><div style="border: 1px solid red; padding: 5px">bar</div></b></div></div> and we try to delete both div's that surrounds "bar". But allowing specialCommonAncestor to be any presentational node (u, s, strike, i, em, b, & strong) causes this div be included in the fragment. However, this is malformed HTML to begin with since we are allowing block element inside an inline element. Should we delete the inner div? Or should we delete b between div's?
Ryosuke Niwa
Comment 3
2009-07-24 17:41:32 PDT
editing/deleting/delete-3857753-fix.html and editing/pasteboard/display-block-on-spans.html will also require rebaseline but that will be nothing but improvement.
Ryosuke Niwa
Comment 4
2009-07-24 21:05:34 PDT
Created
attachment 33483
[details]
fixes the bug but may worsen the
bug 26483
Eric Seidel (no email)
Comment 5
2009-07-26 23:59:34 PDT
Comment on
attachment 33483
[details]
fixes the bug but may worsen the
bug 26483
Isn't this patch doing two separate things? It looks like the addStyleMarkup change is just code-cleanup, and is very easy to r+. The isElementPresentational usage change seems to be a functional change. Can we separate these two changes into separate patches, or am I missing something?
Ryosuke Niwa
Comment 6
2009-07-27 01:16:09 PDT
As you mentioned, I'm making two changes: 1. Addition of addStyleMarkup 2. Modification of isElementPresentational (=elementHasTextDecorationProperty) But they are inseparable in that fixing the bug requires me changing isElementPresentational which means I need to add the first ASSERT of addStyleMarkup in three places to signify that -webkit-text-decorations-in-effect isn't passed to the style. On the other hand, if I were to make addStyleMarkup first, I need to ensure that -webkit-text-decorations-in-effect isn't passed to the style because that's what the function must assume. But this means I need to fix elementHasTextDecorationProperty beforehand. But I could make this change first if you really want me to separate the patch.
Justin Garcia
Comment 7
2009-07-27 13:40:38 PDT
Comment on
attachment 33483
[details]
fixes the bug but may worsen the
bug 26483
No need to separate the patch, it's rather small. + // All text-decoration-related elements should have been treated as special ancestor Small typo. Should read "as special ancestors". + DEFINE_STATIC_LOCAL(const String, divCloseTag, ("</div>")); + DEFINE_STATIC_LOCAL(const String, styleSpanOpen, ("<span class=\"" AppleStyleSpanClass "\" style=\"")); + DEFINE_STATIC_LOCAL(const String, styleSpanClose, ("</span>")); I'd name it "divClose" for consistency. r=me
Ryosuke Niwa
Comment 8
2009-07-27 17:57:10 PDT
Landed in
http://trac.webkit.org/changeset/46446
John Sullivan
Comment 9
2009-12-14 10:25:51 PST
The assertion added in this patch is firing in a case involving copying link text --
https://bugs.webkit.org/show_bug.cgi?id=32525
.
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