mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 14:44:26 +00:00
Bug 780035 - Don't cache font-style as CSS; r=ehsan
This commit is contained in:
parent
12a886bcb1
commit
76825e9b05
@ -7107,8 +7107,9 @@ nsHTMLEditRules::CacheInlineStyles(nsIDOMNode *aNode)
|
||||
{
|
||||
bool isSet = false;
|
||||
nsAutoString outValue;
|
||||
if (!useCSS)
|
||||
{
|
||||
// Don't use CSS for <font size>, we don't support it usefully (bug 780035)
|
||||
if (!useCSS || (mCachedStyles[j].tag == nsGkAtoms::font &&
|
||||
mCachedStyles[j].attr.EqualsLiteral("size"))) {
|
||||
mHTMLEditor->IsTextPropertySetByContent(aNode, mCachedStyles[j].tag,
|
||||
&(mCachedStyles[j].attr), nullptr,
|
||||
isSet, &outValue);
|
||||
|
@ -79,6 +79,7 @@ MOCHITEST_FILES = \
|
||||
test_bug738366.html \
|
||||
test_bug757371.html \
|
||||
test_bug767684.html \
|
||||
test_bug780035.html \
|
||||
$(NULL)
|
||||
|
||||
ifneq (mobile,$(MOZ_BUILD_APP))
|
||||
|
22
editor/libeditor/html/tests/test_bug780035.html
Normal file
22
editor/libeditor/html/tests/test_bug780035.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=780035
|
||||
-->
|
||||
<title>Test for Bug 780035</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=780035">Mozilla Bug 780035</a>
|
||||
<div contenteditable style="font-size: 13.3333px"></div>
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(function() {
|
||||
document.querySelector("div").focus();
|
||||
document.execCommand("stylewithcss", false, true);
|
||||
sendKey("ENTER");
|
||||
sendChar("x");
|
||||
is(document.querySelector("div").innerHTML, "x<br>",
|
||||
"No <font> tag should be generated");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user