Summary: | Crash rendering <meter/> with percent padding | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | James Kozianski <koz> | ||||||||||||
Component: | Layout and Rendering | Assignee: | James Kozianski <koz> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | commit-queue, jamesr, morrita, noel.gordon, tkent, webkit.review.bot | ||||||||||||
Priority: | P2 | ||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | All | ||||||||||||||
OS: | All | ||||||||||||||
Attachments: |
|
Created attachment 66318 [details]
Stack trace
The crash is caused by a null dereference of containingBlock() in RenderBoxModelObject::paddingTop(). RenderMeter queries its size when determining whether it needs to be layed out, but initially it has no containing block, hence the null dereference. I'll write a patch to make RenderMeter always request layout so this query never occurs. Created attachment 66338 [details]
Proposed patch
Attachment 66338 [details] did not pass style-queue:
Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/ChangeLog:8: Line contains tab character. [whitespace/tab] [5]
Total errors found: 1 in 5 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 66338 [details]
Proposed patch
Hi, thank you for doing this!
The change looks OK in general. Please fix what the bot claims.
You can use WebKitTools/Scripts/check-webkit-style
to correct coding convention errors before the bot bites us.
For the test, are we OK even for other than padding?
Having size-based properties like margin, width, height would be helpful.
For ChangeLog, please mention what caused the crash briefly.
Created attachment 66339 [details]
Proposed patch
Comment on attachment 66338 [details]
Proposed patch
r- for the style error.
The second patch seems not to answer Morita-san's requests.
> For the test, are we OK even for other than padding?
> Having size-based properties like margin, width, height would be helpful.
>
> For ChangeLog, please mention what caused the crash briefly.
Comment on attachment 66339 [details]
Proposed patch
See comment above.
Created attachment 66684 [details]
Proposed patch
Looks fine for me. Comment on attachment 66684 [details]
Proposed patch
OK.
Comment on attachment 66684 [details] Proposed patch Clearing flags on attachment: 66684 Committed r66864: <http://trac.webkit.org/changeset/66864> All reviewed patches have been landed. Closing bug. |
Created attachment 66312 [details] Reproduction WebKit crashes when trying to render a <meter> element that has percentage padding, eg: <meter style="padding: 1%;" /> Test case attached.