RESOLVED FIXED Bug 88197
ASSERTION FAILED: ASSERT(!isPercentageIntrinsicSize) in RenderReplaced::computeIntrinsicRatioInformationForRenderBox
https://bugs.webkit.org/show_bug.cgi?id=88197
Summary ASSERTION FAILED: ASSERT(!isPercentageIntrinsicSize) in RenderReplaced::compu...
Daniel Bates
Reported 2012-06-03 13:21:55 PDT
Consider a file with the following markup: <style>svg { max-height:5%; }</style> <svg></svg> Opening this file will cause ASSERT(!isPercentageIntrinsicSize) to fail in RenderReplaced::computeIntrinsicRatioInformationForRenderBox(), <http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderReplaced.cpp?rev=117697#L293>.
Attachments
Example (Will cause assertion failure) (49 bytes, text/html)
2012-06-03 13:23 PDT, Daniel Bates
no flags
patch (3.42 KB, patch)
2012-06-05 14:39 PDT, Joe Thomas
dbates: commit-queue-
Patch-Updated (3.90 KB, patch)
2012-06-05 17:13 PDT, Joe Thomas
no flags
Daniel Bates
Comment 1 2012-06-03 13:23:05 PDT
Created attachment 145493 [details] Example (Will cause assertion failure) For convenience, a file that contains the markup described in the bug description.
Joe Thomas
Comment 2 2012-06-05 08:59:30 PDT
Looks to me like the assertion ASSERT(!isPercentageIntrinsicSize) is not correct as RenderSVGRoot::computeIntrinsicRatioInformation sets isPercentageIntrinsicSize to true while it handles width/height of Percentage types. I will make a patch to remove this.
Joe Thomas
Comment 3 2012-06-05 14:39:59 PDT
Daniel Bates
Comment 4 2012-06-05 16:11:23 PDT
Comment on attachment 145870 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=145870&action=review > Source/WebCore/ChangeLog:9 > + ASSERT(!isPercentageIntrinsicSize) is not correct as RenderSVGRoot::computeIntrinsicRatioInformation sets isPercentageIntrinsicSize > + to true while it handles width/height of Percentage types. It's an undocumented convention that we wrap long lines in change log entries. I suggest adding a new line character after "RenderSVGRoot::computeIntrinsicRatioInformation" in line 8 such that we move the phrase "sets isPercentageIntrinsicSize" onto line 9. You may also want to consider adding a remark that explains that RenderSVGRoot extends RenderReplaced so as to more explicitly imply that RenderSVGRoot overrides RenderReplaced::computeIntrinsicRatioInformation(). Nit: Percentage => percentage (as it's not a proper noun) > Source/WebCore/rendering/RenderReplaced.cpp:-293 > - ASSERT(!isPercentageIntrinsicSize); Would it make sense to assert !isPercentageIntrinsicSize when intrinsicRatio is non-zero? > LayoutTests/ChangeLog:9 > + ASSERT(!isPercentageIntrinsicSize) is not correct as RenderSVGRoot::computeIntrinsicRatioInformation sets isPercentageIntrinsicSize > + to true while it handles width/height of Percentage types. Ditto. > LayoutTests/svg/in-html/svg-assert-failure-percentage.html:7 > +<svg style= "max-height:5%"> </svg> Nit: There's a space after the '=' in this line. I suggest we remove this space so as to be consistent with the spacing (or lack of) on the left side of the equality sign. > LayoutTests/svg/in-html/svg-assert-failure-percentage.html:8 > +NO Assert! This output message isn't formatted well. On another note, maybe the following text would be more description: This test PASSED if it doesn't cause an assertion failure.
Joe Thomas
Comment 5 2012-06-05 17:13:32 PDT
Created attachment 145899 [details] Patch-Updated Review comments incorporated
Joe Thomas
Comment 6 2012-06-05 17:16:04 PDT
(In reply to comment #4) > (From update of attachment 145870 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=145870&action=review > Thanks for the review. > > Source/WebCore/ChangeLog:9 > > + ASSERT(!isPercentageIntrinsicSize) is not correct as RenderSVGRoot::computeIntrinsicRatioInformation sets isPercentageIntrinsicSize > > + to true while it handles width/height of Percentage types. > > It's an undocumented convention that we wrap long lines in change log entries. I suggest adding a new line character after "RenderSVGRoot::computeIntrinsicRatioInformation" in line 8 such that we move the phrase "sets isPercentageIntrinsicSize" onto line 9. You may also want to consider adding a remark that explains that RenderSVGRoot extends RenderReplaced so as to more explicitly imply that RenderSVGRoot overrides RenderReplaced::computeIntrinsicRatioInformation(). > > Nit: Percentage => percentage > (as it's not a proper noun) > Done > > Source/WebCore/rendering/RenderReplaced.cpp:-293 > > - ASSERT(!isPercentageIntrinsicSize); > > Would it make sense to assert !isPercentageIntrinsicSize when intrinsicRatio is non-zero? > Yes, I think that is better. Changed. > > LayoutTests/ChangeLog:9 > > + ASSERT(!isPercentageIntrinsicSize) is not correct as RenderSVGRoot::computeIntrinsicRatioInformation sets isPercentageIntrinsicSize > > + to true while it handles width/height of Percentage types. > > Ditto. > > > LayoutTests/svg/in-html/svg-assert-failure-percentage.html:7 > > +<svg style= "max-height:5%"> </svg> > > Nit: There's a space after the '=' in this line. I suggest we remove this space so as to be consistent with the spacing (or lack of) on the left side of the equality sign. > > > LayoutTests/svg/in-html/svg-assert-failure-percentage.html:8 > > +NO Assert! > > This output message isn't formatted well. On another note, maybe the following text would be more description: > > This test PASSED if it doesn't cause an assertion failure. Done.
Daniel Bates
Comment 7 2012-06-05 17:24:17 PDT
Comment on attachment 145899 [details] Patch-Updated Thanks Joe for updating the patch. Looks reasonable to me.
WebKit Review Bot
Comment 8 2012-06-05 23:53:26 PDT
Comment on attachment 145899 [details] Patch-Updated Clearing flags on attachment: 145899 Committed r119565: <http://trac.webkit.org/changeset/119565>
WebKit Review Bot
Comment 9 2012-06-05 23:53:32 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.