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

Issue 10383163: Merge 116693 - Crash in computedCSSPadding* functions due to RenderImage::imageDimensionsChanged ca… (Closed)

Created:
8 years, 7 months ago by Julien - ping for review
Modified:
8 years, 7 months ago
Reviewers:
jchaffraix
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Visibility:
Public.

Description

Merge 116693 - Crash in computedCSSPadding* functions due to RenderImage::imageDimensionsChanged called during attachment https://bugs.webkit.org/show_bug.cgi?id=85912 Reviewed by Eric Seidel. Source/WebCore: Tests: fast/images/link-body-content-imageDimensionChanged-crash.html fast/images/script-counter-imageDimensionChanged-crash.html The bug comes from CSS generated images that could end up calling imageDimensionsChanged during attachment. As the rest of the code (e.g. computedCSSPadding*) would assumes that we are already inserted in the tree, we would crash. The solution is to bail out in this case as newly inserted RenderObject will trigger layout later on and properly handle what we would be doing as part of imageDimensionChanged (the only exception being updating our intrinsic size which should be done as part of imageDimensionsChanged). * rendering/RenderImage.cpp: (WebCore::RenderImage::imageDimensionsChanged): LayoutTests: * fast/images/link-body-content-imageDimensionChanged-crash-expected.txt: Added. * fast/images/link-body-content-imageDimensionChanged-crash.html: Added. * fast/images/script-counter-imageDimensionChanged-crash-expected.txt: Added. * fast/images/script-counter-imageDimensionChanged-crash.html: Added. TBR=jchaffraix@webkit.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=116968

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -16 lines) Patch
A + LayoutTests/fast/images/link-body-content-imageDimensionChanged-crash.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/images/link-body-content-imageDimensionChanged-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/images/script-counter-imageDimensionChanged-crash.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/images/script-counter-imageDimensionChanged-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/rendering/RenderImage.cpp View 1 chunk +24 lines, -20 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Julien - ping for review
8 years, 7 months ago (2012-05-14 18:00:46 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698