Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 17287012: Replace hasAttribute with the check for actual value (Closed)

Created:
7 years, 6 months ago by mrunal
Modified:
7 years, 6 months ago
Reviewers:
pdr., Stephen Chennney
CC:
blink-reviews, shans, alancutter (OOO until 2018), eae+blinkwatch, leviw+renderwatch, dstockwell, f(malita), jchaffraix+rendering, darktears, pdr, Stephen Chennney, Steve Block
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Replace hasAttribute with the check for actual value This change replaces the use of hasAttribute() by a better and correct approach, to check if the actual value is greater than or equal to zero. This patch also includes a Ref Test which demonstrates the setting of attribute within a 'use' tag to test the changed code path. BUG=235256 R=pdr@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152911

Patch Set 1 #

Patch Set 2 : Updated the ref test after reviewer's comments #

Patch Set 3 : Replace '>=' with '=' to fix layout test failures #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -2 lines) Patch
A LayoutTests/svg/animations/use-set-attribute-width-height.html View 1 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/svg/animations/use-set-attribute-width-height-expected.html View 1 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGViewportContainer.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
mrunal
Please take a look.
7 years, 6 months ago (2013-06-19 23:28:34 UTC) #1
Stephen Chennney
The test need to be re-written with the following features: 1. No text, as it ...
7 years, 6 months ago (2013-06-20 17:57:12 UTC) #2
mrunal
@Stephen - thanks for your comments. I have updated the test.
7 years, 6 months ago (2013-06-20 21:14:44 UTC) #3
Stephen Chennney
lgtm
7 years, 6 months ago (2013-06-20 21:49:47 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mrunal.kapade@intel.com/17287012/4001
7 years, 6 months ago (2013-06-20 21:50:09 UTC) #5
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=10338
7 years, 6 months ago (2013-06-20 23:35:02 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mrunal.kapade@intel.com/17287012/4001
7 years, 6 months ago (2013-06-21 17:48:19 UTC) #7
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=10475
7 years, 6 months ago (2013-06-21 19:04:38 UTC) #8
mrunal
Looks like the Layout Test failures were genuine. I have updated the patch to check ...
7 years, 6 months ago (2013-06-21 21:35:41 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mrunal.kapade@intel.com/17287012/26001
7 years, 6 months ago (2013-06-21 21:36:34 UTC) #10
commit-bot: I haz the power
Change committed as 152911
7 years, 6 months ago (2013-06-22 00:38:44 UTC) #11
pdr.
On 2013/06/21 21:35:41, mrunal wrote: > Looks like the Layout Test failures were genuine. I ...
7 years, 6 months ago (2013-06-22 18:07:33 UTC) #12
mrunal
> Please wait for a second LGTM if there are code changes involved. > > ...
7 years, 6 months ago (2013-06-24 21:37:55 UTC) #13
pdr.
On 2013/06/24 21:37:55, mrunal wrote: > > Please wait for a second LGTM if there ...
7 years, 6 months ago (2013-06-25 15:38:29 UTC) #14
mrunal
7 years, 6 months ago (2013-06-25 21:15:56 UTC) #15
Message was sent while issue was closed.
> Not to worry at all; we have the codereview tool to catch this :) Let not roll
> out the patch, but do you mind doing a second patch to fix this one?
Do I have to revert the patch or will you? If I have to, how do I do it?
 
> > Your concern is valid. I thought about it now and I don't see any other way
to
> > check if the attribute was set. I tried using useElement->heightIsValid()
but
> it
> > always returns false. Is there another flag to indicate the attribute has
been
> > set? Problem over here is we cannot distinguish between if the zero is the
> > initial value or the value set later.
> 
> What about just removing the check entirely and always setting the viewport
> size?
I don't think that solves the problem either, especially if the width and height
values are not specified on use attribute at all.
In that case it will use default 0 value for width and height.

Powered by Google App Engine
This is Rietveld 408576698