This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13829 - Ensure that hiliteColor is the innermost style applied
Summary: Ensure that hiliteColor is the innermost style applied
Status: NEW
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-18 18:08 UTC by Aryeh Gregor
Modified: 2011-09-28 21:19 UTC (History)
2 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-08-18 18:08:28 UTC
See: https://bugs.webkit.org/show_bug.cgi?id=21679

I'm adding the following fontSize tests:

        ["6", '<span style=background-color:aqua>[foo]</span>'],
        ["6", '<span style=background-color:aqua>foo[bar]baz</span>'],
        ["6", '[foo<span style=background-color:aqua>bar</span>baz]'],

And the following hiliteColor tests:

        '<font size=6>[foo]</font>',
        '<span style=font-size:xx-large>[foo]</span>',
        '<font size=6>foo[bar]baz</font>',
        '<span style=font-size:xx-large>foo[bar]baz</span>',
        '[foo<font size=6>bar</font>baz]',
        '[foo<span style=font-size:xx-large>bar</span>baz]',

In many cases, the highlight is visually not high enough in the markup that the spec produces.  We get things like <span style="background-color: teal">foo<font size=6>bar</font>baz</span>, and the background doesn't get higher to match the increased height of "bar".

I think the correct fix is to change the effective value algorithm so that it returns a special value like "mixed" if this case is detected.  That way, any descendants that have this problem will have the algorithm applied to them again.
Comment 1 Aryeh Gregor 2011-08-18 18:09:58 UTC
Tests added: http://aryeh.name/gitweb.cgi?p=editing;a=commitdiff;h=d7d54085
Comment 2 Aryeh Gregor 2011-08-28 16:59:12 UTC
Ryosuke pointed out at the face-to-face that changing the effective value algorithm isn't enough.  We also need to add extra save/restore checks whenever fontSize changes.  This should still be doable, though.
Comment 3 Aryeh Gregor 2011-08-29 18:27:19 UTC
He also pointed out that you have to do it on delete too, and perhaps other places.  Should still be doable.  We just need to make sure we're saving and restoring values as often as necessary.
Comment 4 Aryeh Gregor 2011-09-28 21:19:42 UTC
This is trickier than I thought.  Just changing the effective command value is bad, because it will affect the value of queryCommandValue().  Something subtler is needed, and perhaps more special.