From jira-events at lists.jboss.org Wed Feb 15 18:03:36 2012 Content-Type: multipart/mixed; boundary="===============0879428123633207213==" MIME-Version: 1.0 From: Viacheslav Kabanovich (JIRA) To: jbosstools-issues at lists.jboss.org Subject: [jbosstools-issues] [JBoss JIRA] (JBIDE-10127) Resolve selector in open-on of style class in VPE Date: Wed, 15 Feb 2012 18:03:36 -0500 Message-ID: <580805889.2130.1329347016413.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1008310898.69435.1320798645231.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============0879428123633207213== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/JBIDE-10127?page=3Dcom.atlassian.jira= .plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D12666914#= comment-12666914 ] = Viacheslav Kabanovich commented on JBIDE-10127: ----------------------------------------------- 1. There can be more than one attributes for node selector. Rule {code} [title=3D"y"][id=3D"3"] p input.styleA {color: #FF0000} {code} says that some node should have both attributes title=3D"y" and id=3D"3". Compare to the rule {code} [title=3D"y"] [id=3D"3"] p input.styleA {color: #FF0000} {code} that says that node should have title=3D"y" and some its descendent should = have id=3D"3". 2. Algorithm that computes the best rule makes errors. For example, if in stylesheet given in description, two last rules are swit= ched: {code} [title=3D"y"] p input.styleA {color: #00CCFF} div p input.styleA {color: #CC00FF} {code} then last case in the example html will be incorrectly resolved. The implemented comparing algorithm assumes that 'longer' CSSAxis[] is alwa= ys preferable. That is not so. I think that the correct algorithm should co= mpare 'restrictive power' of the first element, then proceed to the second,= etc. The 'restrictive power' of the element may be illustrated by these ex= amples {code} div[title=3D"y"][id=3D"3] > [title=3D"y"][id=3D"3] > [title=3D"y"] > div div.styleX > div[title=3D"m"] {code} = > Resolve selector in open-on of style class in VPE > ------------------------------------------------- > > Key: JBIDE-10127 > URL: https://issues.jboss.org/browse/JBIDE-10127 > Project: Tools (JBoss Tools) > Issue Type: Feature Request > Components: jsp/jsf/xml source editing > Affects Versions: 3.3.0.M3 > Reporter: Viacheslav Kabanovich > Assignee: Viacheslav Kabanovich > Fix For: 3.3.0.Beta1 > > > EXECUTE: Create style sheet: > {code} > .styleA {color: #FF0000} > .styleA .styleB {color: #FF8000} > div.styleA {color: #FF0080} > div[title=3D"x"].styleA {color: #0000FF} > p input.styleA {color: #CCAA00} > div p input.styleA {color: #CC00FF} > [title=3D"y"] p input.styleA {color: #00CCFF} > {code} > EXECUTE: Create html: > {code} > > > Hello! = > > > = >

> .styleA {color: #FF0000} >

= >

> .styleA {color: #FF0000} >
> .styleA .styleB {color: #FF8000} >

>
> div.styleA {color: #FF0080} >
= >
> div[title=3D"x"].styleA {color: #0000FF} >
= >

> >

>
>

> >

>
= >
>
>

> >

>
>
= > > > {code} > ASSERT: Style opened at each class=3D"styleA" should be the same as text = value in element. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.jboss.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============0879428123633207213==--