WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
71203
REGRESSION(
r96870
): WebKit generates background: transparent on blogger.com
https://bugs.webkit.org/show_bug.cgi?id=71203
Summary
REGRESSION(r96870): WebKit generates background: transparent on blogger.com
Ryosuke Niwa
Reported
2011-10-30 21:59:09 PDT
It appears that one of my changesets to markup.cpp / ReplaceSelectionCommand.cpp introduced a regression.
Attachments
demo
(447 bytes, text/html)
2011-10-30 21:59 PDT
,
Ryosuke Niwa
no flags
Details
fixes the bug
(4.65 KB, patch)
2011-10-30 23:23 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Added ojan's test case also fixed a bug
(9.04 KB, patch)
2011-10-31 15:08 PDT
,
Ryosuke Niwa
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2011-10-30 21:59:47 PDT
Created
attachment 113011
[details]
demo
Ryosuke Niwa
Comment 2
2011-10-30 23:23:38 PDT
Created
attachment 113014
[details]
fixes the bug
Ojan Vafai
Comment 3
2011-10-31 08:42:39 PDT
Comment on
attachment 113014
[details]
fixes the bug Does this do the right thing for the following case? <div contentEditable> foo <div style="background: transparent">bar</div> baz </div> If you select bar and copy-paste it within the contentEditable element, should we maintain the transparent background?
Ryosuke Niwa
Comment 4
2011-10-31 09:30:04 PDT
(In reply to
comment #3
)
> (From update of
attachment 113014
[details]
) > Does this do the right thing for the following case? > > <div contentEditable> > foo > <div style="background: transparent">bar</div> > baz > </div> > > If you select bar and copy-paste it within the contentEditable element, should we maintain the transparent background?
We should not.
Ojan Vafai
Comment 5
2011-10-31 11:59:27 PDT
What about copy-pasting "foo" in the following case? Both the original and the copy-pasted foo should have a transparent background, right? Does that work with the following code? If so, can you add a test for this case as well? <style> .foo { background: blue; } </style> <div contentEditable> a<span class=foo style="background:transparent">foo</span>b </div>
Ryosuke Niwa
Comment 6
2011-10-31 12:03:15 PDT
(In reply to
comment #5
)
> What about copy-pasting "foo" in the following case? Both the original and the copy-pasted foo should have a transparent background, right? Does that work with the following code? If so, can you add a test for this case as well? > > <style> > .foo { > background: blue; > } > </style> > <div contentEditable> > a<span class=foo style="background:transparent">foo</span>b > </div>
Sure. Let me add that as a test.
Ryosuke Niwa
Comment 7
2011-10-31 15:08:10 PDT
Created
attachment 113089
[details]
Added ojan's test case also fixed a bug
Ojan Vafai
Comment 8
2011-10-31 16:21:44 PDT
Comment on
attachment 113089
[details]
Added ojan's test case also fixed a bug View in context:
https://bugs.webkit.org/attachment.cgi?id=113089&action=review
> Source/WebCore/editing/EditingStyle.cpp:1090 > - computedStyle->removePropertiesInElementDefaultStyle(element); > + if (!computedStyle->m_mutableStyle->getPropertyCSSValue(CSSPropertyBackgroundColor)) > + computedStyle->m_mutableStyle->setProperty(CSSPropertyBackgroundColor, CSSValueTransparent); > + > + removePropertiesInStyle(computedStyle->m_mutableStyle.get(), styleFromMatchedRules.get());
This changes from removing styleFromMatchedRules using AllButEmptyCSSRules to styleFromMatchedRules using UAAndUserCSSRules. Is that correct? Should 1087-1088 just be in removePropertiesInElementDefaultStyle? Sorry, I don't know this code well enough to know if this is the right change.
Ryosuke Niwa
Comment 9
2011-10-31 16:25:11 PDT
(In reply to
comment #8
)
> (From update of
attachment 113089
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=113089&action=review
> > > Source/WebCore/editing/EditingStyle.cpp:1090 > > - computedStyle->removePropertiesInElementDefaultStyle(element); > > + if (!computedStyle->m_mutableStyle->getPropertyCSSValue(CSSPropertyBackgroundColor)) > > + computedStyle->m_mutableStyle->setProperty(CSSPropertyBackgroundColor, CSSValueTransparent); > > + > > + removePropertiesInStyle(computedStyle->m_mutableStyle.get(), styleFromMatchedRules.get()); > > This changes from removing styleFromMatchedRules using AllButEmptyCSSRules to styleFromMatchedRules using UAAndUserCSSRules. Is that correct?
Yes. That was a bug. Without this change, we'll end up removing background: transparent in your test case.
Ryosuke Niwa
Comment 10
2011-11-01 17:37:20 PDT
Any reviewers?
Ryosuke Niwa
Comment 11
2011-11-01 17:44:51 PDT
Yay! Thanks for the review.
Ryosuke Niwa
Comment 12
2011-11-02 09:22:50 PDT
Comment on
attachment 113089
[details]
Added ojan's test case also fixed a bug Clearing flags on attachment: 113089 Committed
r99067
: <
http://trac.webkit.org/changeset/99067
>
Ryosuke Niwa
Comment 13
2011-11-02 09:22:55 PDT
All reviewed patches have been landed. Closing bug.
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