DESCRIPTION

Bug 491334 - [CSS] Improve CSS Engine performance

 - Change return from true to false to respect w3 norm.

Change-Id: Ibde824705cf36de63248deb0badd19c8b3020ba1
Signed-off-by: Kaylin Fischer xxx@xxx.xxx


COMMENTS

author: Kaylin Fischer
date: 2016-12-01 15:12:45.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-12-01 15:12:52.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11381/

-------------------------------------
author: Jayvion Booth
date: 2016-12-01 15:15:49.000000000

Patch Set 1: Code-Review-1

please also add a JUnit test for the return value showing your issue.

-------------------------------------
author: Brenden Conley
date: 2016-12-01 16:24:40.000000000

Patch Set 1: Verified-1

Build Failed 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/11381/ : FAILURE

-------------------------------------
author: Teagan Marsh
date: 2016-12-01 16:29:39.000000000

Patch Set 1: Code-Review-1

(1 comment)

Line:130, bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/sac/CSSAttributeConditionImpl.java -> This doesn't seem right: the extracts from CSS 2 and 3:

>  E[foo] : Matches any E element with the "foo" attribute set (whatever the value).
> 
> In CSS3 [2] we have this definition:
> 
>   E[foo] : an E element with a "foo" attribute.

Here we have `hasAttribute(x) == true` — so we have a "foo" attribute — but no value set since `val == null`.

-------------------------------------
author: Kaylin Fischer
date: 2016-12-01 16:51:07.000000000

Patch Set 1:

(1 comment)

Thanks for the reply. See comment below.

Line:130, bundles/org.eclipse.e4.ui.css.core/src/org/eclipse/e4/ui/css/core/impl/sac/CSSAttributeConditionImpl.java -> as it's not set the match should return false no ? (with CSS2). Before the previous change that was this behavoirs.
see test from papyrus: https://hudson.eclipse.org/papyrus/view/Oxygen%20(Master)/job/Papyrus-Master-Tests/2768/testReport/junit/org.eclipse.papyrus.infra.gmfdiag.css.tests.tests/CSSNamedElementsTest/testUntypedReference/

-------------------------------------
author: Teagan Marsh
date: 2016-12-02 15:54:20.000000000

Patch Set 1:

It has the attribute, but the value is set to null.  It's like `input[checked]` matching `<input type="checkbox" checked>`: the attribute is there, but it has no value.

Is there a concrete problem where this is causing problems?  This change was brought in as a micro-optimization, and the interpretation seems consistent to me.  I'd prefer not to change it unless we can show it has a negative impact on working code with no workaround.

-------------------------------------
author: Kaylin Fischer
date: 2016-12-05 08:31:12.000000000

Patch Set 1:

It's just that I wondering if it's normal that the behavoir have changed on a performance bug? If not I will just change JUnit tests that have been triggered due to the "return true".

-------------------------------------
author: Kaylin Fischer
date: 2017-02-14 08:26:43.000000000

Abandoned

So we will change Papyrus test to be compliant with the new behavior. Thanks for the review.

-------------------------------------
