Title: [163402] trunk/Source/WebCore
- Revision
- 163402
- Author
- [email protected]
- Date
- 2014-02-04 13:52:25 -0800 (Tue, 04 Feb 2014)
Log Message
[OSX] Limit progress bar's dimensions to ushort
https://bugs.webkit.org/show_bug.cgi?id=128019
Wordaround a crash in Quartz until <rdar://problem/15855086> is fixed.
Patch by Benjamin Poulain <[email protected]> on 2014-02-04
Reviewed by Sam Weinig.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::progressBarRectForBounds):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (163401 => 163402)
--- trunk/Source/WebCore/ChangeLog 2014-02-04 21:50:25 UTC (rev 163401)
+++ trunk/Source/WebCore/ChangeLog 2014-02-04 21:52:25 UTC (rev 163402)
@@ -1,3 +1,15 @@
+2014-02-04 Benjamin Poulain <[email protected]>
+
+ [OSX] Limit progress bar's dimensions to ushort
+ https://bugs.webkit.org/show_bug.cgi?id=128019
+
+ Wordaround a crash in Quartz until <rdar://problem/15855086> is fixed.
+
+ Reviewed by Sam Weinig.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::progressBarRectForBounds):
+
2014-02-04 Anders Carlsson <[email protected]>
Rename StringImpl::getCharacters to StringImpl::characters
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (163401 => 163402)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2014-02-04 21:50:25 UTC (rev 163401)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2014-02-04 21:52:25 UTC (rev 163402)
@@ -987,18 +987,21 @@
IntRect RenderThemeMac::progressBarRectForBounds(const RenderObject* renderObject, const IntRect& bounds) const
{
+ // Workaround until <rdar://problem/15855086> is fixed.
+ int maxDimension = static_cast<int>(std::numeric_limits<ushort>::max());
+ IntRect progressBarBounds(bounds.x(), bounds.y(), std::min(bounds.width(), maxDimension), std::min(bounds.height(), maxDimension));
if (NoControlPart == renderObject->style().appearance())
- return bounds;
+ return progressBarBounds;
float zoomLevel = renderObject->style().effectiveZoom();
NSControlSize controlSize = controlSizeForFont(&renderObject->style());
IntSize size = progressBarSizes()[controlSize];
size.setHeight(size.height() * zoomLevel);
- size.setWidth(bounds.width());
+ size.setWidth(progressBarBounds.width());
// Now inflate it to account for the shadow.
- IntRect inflatedRect = bounds;
- if (bounds.height() <= minimumProgressBarHeight(&renderObject->style()))
+ IntRect inflatedRect = progressBarBounds;
+ if (progressBarBounds.height() <= minimumProgressBarHeight(&renderObject->style()))
inflatedRect = inflateRect(inflatedRect, size, progressBarMargins(controlSize), zoomLevel);
return inflatedRect;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes