[webkit-reviews] review granted: [Bug 194318] Web Inspector: Styles: PropertiesChanged shouldn't fire when old and new text are both empty : [Attachment 361249] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 5 17:05:36 PST 2019


Devin Rousso <drousso at apple.com> has granted Nikita Vasilyev
<nvasilyev at apple.com>'s request for review:
Bug 194318: Web Inspector: Styles: PropertiesChanged shouldn't fire when old
and new text are both empty
https://bugs.webkit.org/show_bug.cgi?id=194318

Attachment 361249: Patch

https://bugs.webkit.org/attachment.cgi?id=361249&action=review




--- Comment #2 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 361249
  --> https://bugs.webkit.org/attachment.cgi?id=361249
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=361249&action=review

rs=me

> LayoutTests/inspector/css/modify-css-property-race.html:14
> +	   let height = parseInt(element.style.height) + 1;

oops :P

> LayoutTests/inspector/css/modify-css-property-race.html:72
> +		       InspectorTest.expectGreaterThan(heightNumber, 11,
"Height should be greater than 11px.");

Rather than compare the hardcoded 10 and 11, you could save a
`previousHeightNumber` and ensure that the first one is greater than 10 and the
second one is greater than `previousHeightNumber` (and change the text to say
"Height should have increased from 10px" so you don't have to log the actual
increased value).

> LayoutTests/inspector/css/modify-css-property-race.html:77
> +		       InspectorTest.expectGreaterThanOrEqual(heightNumber,
101, "Height should be greater or equal 101px.");

Ditto (72).


More information about the webkit-reviews mailing list