Changeset 142054 in webkit
- Timestamp:
- Feb 6, 2013 4:41:07 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142053 r142054 1 2013-02-06 Ojan Vafai <ojan@chromium.org> 2 3 display:none file upload button crashes 4 https://bugs.webkit.org/show_bug.cgi?id=109102 5 6 Reviewed by Levi Weintraub. 7 8 * fast/forms/file/display-none-upload-button-expected.txt: Added. 9 * fast/forms/file/display-none-upload-button.html: Added. 10 Tests that we don't crash. Also exposes a bug that the baseline and height of 11 the input don't include the height of the filename text. 12 1 13 2013-02-06 Stephen Chenney <schenney@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r142051 r142054 1 2013-02-06 Ojan Vafai <ojan@chromium.org> 2 3 display:none file upload button crashes 4 https://bugs.webkit.org/show_bug.cgi?id=109102 5 6 Reviewed by Levi Weintraub. 7 8 Test: fast/forms/file/display-none-upload-button.html 9 10 * rendering/RenderFileUploadControl.cpp: 11 (WebCore::nodeWidth): 12 (WebCore::RenderFileUploadControl::paintObject): 13 Having an upload button doesn't mean we have a rendered upload button. 14 Null check the renderer before trying to access it. 15 1 16 2013-02-06 Dirk Schulze <dschulze@adobe.com> 2 17 -
trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp
r139329 r142054 90 90 static int nodeWidth(Node* node) 91 91 { 92 return node? node->renderBox()->pixelSnappedWidth() : 0;92 return (node && node->renderBox()) ? node->renderBox()->pixelSnappedWidth() : 0; 93 93 } 94 94 … … 137 137 else 138 138 textX = contentLeft + contentWidth() - buttonAndIconWidth - font.width(textRun); 139 140 LayoutUnit textY = 0; 139 141 // We want to match the button's baseline 140 RenderButton* buttonRenderer = toRenderButton(button->renderer());141 142 // FIXME: Make this work with transforms. 142 LayoutUnit textY = paintOffset.y() + buttonRenderer->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine); 143 if (RenderButton* buttonRenderer = toRenderButton(button->renderer())) 144 textY = paintOffset.y() + buttonRenderer->baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine); 145 else 146 textY = baselinePosition(AlphabeticBaseline, true, HorizontalLine, PositionOnContainingLine); 143 147 144 148 paintInfo.context->setFillColor(style()->visitedDependentColor(CSSPropertyColor), style()->colorSpace());
Note: See TracChangeset
for help on using the changeset viewer.