Diff
Modified: trunk/Source/WebCore/ChangeLog (188182 => 188183)
--- trunk/Source/WebCore/ChangeLog 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/ChangeLog 2015-08-08 03:06:52 UTC (rev 188183)
@@ -1,3 +1,47 @@
+2015-08-07 Zalan Bujtas <[email protected]>
+
+ Move painting functions from RenderObject to RenderElement.
+ https://bugs.webkit.org/show_bug.cgi?id=147764
+
+ Reviewed by Simon Fraser.
+
+ Ideally they should live in RenderBoxModelObject, but the current SVG architecture makes is difficult
+ to move them there.
+
+ No change in functionality.
+
+ * platform/graphics/FloatRect.h:
+ (WebCore::FloatRect::FloatRect):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintOneBorderSide):
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::drawLineForBoxSide):
+ (WebCore::RenderElement::paintFocusRing):
+ (WebCore::RenderElement::paintOutline):
+ * rendering/RenderElement.h:
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::paintOutline):
+ (WebCore::RenderInline::paintOutlineForLine):
+ * rendering/RenderMultiColumnSet.cpp:
+ (WebCore::RenderMultiColumnSet::paintColumnRules):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::drawLineForBoxSide): Deleted.
+ (WebCore::RenderObject::paintFocusRing): Deleted.
+ (WebCore::RenderObject::paintOutline): Deleted.
+ * rendering/RenderObject.h:
+ * rendering/RenderTableCell.cpp:
+ (WebCore::RenderTableCell::paintCollapsedBorders):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::paintRowGroupBorder):
+ * rendering/RenderTheme.h:
+ (WebCore::RenderTheme::paintMenuListButtonDecorations):
+ * rendering/RenderThemeIOS.h:
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
+ * rendering/RenderThemeMac.h:
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
+
2015-08-07 James Craig <[email protected]>
REGRESSION(r184722) AX: WebKit video playback toolbar removed from DOM; no longer accessible to VoiceOver
Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp (188182 => 188183)
--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -874,7 +874,7 @@
adjustMenuListStyle(styleResolver, style, element);
}
-bool RenderThemeEfl::paintMenuListButtonDecorations(const RenderObject& object, const PaintInfo& info, const FloatRect& rect)
+bool RenderThemeEfl::paintMenuListButtonDecorations(const RenderBox& object, const PaintInfo& info, const FloatRect& rect)
{
return paintMenuList(object, info, rect);
}
Modified: trunk/Source/WebCore/platform/efl/RenderThemeEfl.h (188182 => 188183)
--- trunk/Source/WebCore/platform/efl/RenderThemeEfl.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/platform/efl/RenderThemeEfl.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -127,7 +127,7 @@
virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
Modified: trunk/Source/WebCore/platform/graphics/FloatRect.h (188182 => 188183)
--- trunk/Source/WebCore/platform/graphics/FloatRect.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/platform/graphics/FloatRect.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -62,6 +62,8 @@
: m_location(location), m_size(size) { }
FloatRect(float x, float y, float width, float height)
: m_location(FloatPoint(x, y)), m_size(FloatSize(width, height)) { }
+ FloatRect(const FloatPoint& topLeft, const FloatPoint& bottomRight)
+ : m_location(topLeft), m_size(FloatSize(bottomRight.x() - topLeft.x(), bottomRight.y() - topLeft.y())) { }
WEBCORE_EXPORT FloatRect(const IntRect&);
static FloatRect narrowPrecision(double x, double y, double width, double height);
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -1479,9 +1479,7 @@
mitreAdjacentSide1 = false;
mitreAdjacentSide2 = false;
}
-
- drawLineForBoxSide(graphicsContext, sideRect.x(), sideRect.y(), sideRect.maxX(), sideRect.maxY(), side, colorToPaint, edgeToRender.style(),
- mitreAdjacentSide1 ? adjacentEdge1.widthForPainting() : 0, mitreAdjacentSide2 ? adjacentEdge2.widthForPainting() : 0, antialias);
+ drawLineForBoxSide(*graphicsContext, sideRect, side, colorToPaint, edgeToRender.style(), mitreAdjacentSide1 ? adjacentEdge1.widthForPainting() : 0, mitreAdjacentSide2 ? adjacentEdge2.widthForPainting() : 0, antialias);
}
}
Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderElement.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -31,6 +31,7 @@
#include "CursorList.h"
#include "ElementChildIterator.h"
#include "EventHandler.h"
+#include "FocusController.h"
#include "Frame.h"
#include "FrameSelection.h"
#include "HTMLBodyElement.h"
@@ -1783,4 +1784,339 @@
return current;
}
+void RenderElement::drawLineForBoxSide(GraphicsContext& graphicsContext, const FloatRect& rect, BoxSide side, Color color, EBorderStyle borderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias) const
+{
+ float x1 = rect.x();
+ float x2 = rect.maxX();
+ float y1 = rect.y();
+ float y2 = rect.maxY();
+ float thickness;
+ float length;
+ if (side == BSTop || side == BSBottom) {
+ thickness = y2 - y1;
+ length = x2 - x1;
+ } else {
+ thickness = x2 - x1;
+ length = y2 - y1;
+ }
+ // FIXME: We really would like this check to be an ASSERT as we don't want to draw empty borders. However
+ // nothing guarantees that the following recursive calls to drawLineForBoxSide will have non-null dimensions.
+ if (!thickness || !length)
+ return;
+
+ float deviceScaleFactor = document().deviceScaleFactor();
+ if (borderStyle == DOUBLE && (thickness * deviceScaleFactor) < 3)
+ borderStyle = SOLID;
+
+ const RenderStyle& style = this->style();
+ switch (borderStyle) {
+ case BNONE:
+ case BHIDDEN:
+ return;
+ case DOTTED:
+ case DASHED: {
+ bool wasAntialiased = graphicsContext.shouldAntialias();
+ StrokeStyle oldStrokeStyle = graphicsContext.strokeStyle();
+ graphicsContext.setShouldAntialias(antialias);
+ graphicsContext.setStrokeColor(color, style.colorSpace());
+ graphicsContext.setStrokeThickness(thickness);
+ graphicsContext.setStrokeStyle(borderStyle == DASHED ? DashedStroke : DottedStroke);
+ graphicsContext.drawLine(roundPointToDevicePixels(LayoutPoint(x1, y1), deviceScaleFactor), roundPointToDevicePixels(LayoutPoint(x2, y2), deviceScaleFactor));
+ graphicsContext.setShouldAntialias(wasAntialiased);
+ graphicsContext.setStrokeStyle(oldStrokeStyle);
+ break;
+ }
+ case DOUBLE: {
+ float thirdOfThickness = ceilToDevicePixel(thickness / 3, deviceScaleFactor);
+ ASSERT(thirdOfThickness);
+
+ if (!adjacentWidth1 && !adjacentWidth2) {
+ StrokeStyle oldStrokeStyle = graphicsContext.strokeStyle();
+ graphicsContext.setStrokeStyle(NoStroke);
+ graphicsContext.setFillColor(color, style.colorSpace());
+
+ bool wasAntialiased = graphicsContext.shouldAntialias();
+ graphicsContext.setShouldAntialias(antialias);
+
+ switch (side) {
+ case BSTop:
+ case BSBottom:
+ graphicsContext.drawRect(snapRectToDevicePixels(x1, y1, length, thirdOfThickness, deviceScaleFactor));
+ graphicsContext.drawRect(snapRectToDevicePixels(x1, y2 - thirdOfThickness, length, thirdOfThickness, deviceScaleFactor));
+ break;
+ case BSLeft:
+ case BSRight:
+ graphicsContext.drawRect(snapRectToDevicePixels(x1, y1, thirdOfThickness, length, deviceScaleFactor));
+ graphicsContext.drawRect(snapRectToDevicePixels(x2 - thirdOfThickness, y1, thirdOfThickness, length, deviceScaleFactor));
+ break;
+ }
+
+ graphicsContext.setShouldAntialias(wasAntialiased);
+ graphicsContext.setStrokeStyle(oldStrokeStyle);
+ } else {
+ float adjacent1BigThird = ceilToDevicePixel(adjacentWidth1 / 3, deviceScaleFactor);
+ float adjacent2BigThird = ceilToDevicePixel(adjacentWidth2 / 3, deviceScaleFactor);
+
+ float offset1 = floorToDevicePixel(fabs(adjacentWidth1) * 2 / 3, deviceScaleFactor);
+ float offset2 = floorToDevicePixel(fabs(adjacentWidth2) * 2 / 3, deviceScaleFactor);
+
+ float mitreOffset1 = adjacentWidth1 < 0 ? offset1 : 0;
+ float mitreOffset2 = adjacentWidth1 > 0 ? offset1 : 0;
+ float mitreOffset3 = adjacentWidth2 < 0 ? offset2 : 0;
+ float mitreOffset4 = adjacentWidth2 > 0 ? offset2 : 0;
+
+ FloatRect paintBorderRect;
+ switch (side) {
+ case BSTop:
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset1, y1, (x2 - mitreOffset3) - (x1 + mitreOffset1), thirdOfThickness), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset2, y2 - thirdOfThickness, (x2 - mitreOffset4) - (x1 + mitreOffset2), thirdOfThickness), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+ break;
+ case BSLeft:
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x1, y1 + mitreOffset1, thirdOfThickness, (y2 - mitreOffset3) - (y1 + mitreOffset1)), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x2 - thirdOfThickness, y1 + mitreOffset2, thirdOfThickness, (y2 - mitreOffset4) - (y1 + mitreOffset2)), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+ break;
+ case BSBottom:
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset2, y1, (x2 - mitreOffset4) - (x1 + mitreOffset2), thirdOfThickness), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset1, y2 - thirdOfThickness, (x2 - mitreOffset3) - (x1 + mitreOffset1), thirdOfThickness), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+ break;
+ case BSRight:
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x1, y1 + mitreOffset2, thirdOfThickness, (y2 - mitreOffset4) - (y1 + mitreOffset2)), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+
+ paintBorderRect = snapRectToDevicePixels(LayoutRect(x2 - thirdOfThickness, y1 + mitreOffset1, thirdOfThickness, (y2 - mitreOffset3) - (y1 + mitreOffset1)), deviceScaleFactor);
+ drawLineForBoxSide(graphicsContext, paintBorderRect, side, color, SOLID,
+ adjacent1BigThird, adjacent2BigThird, antialias);
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ }
+ case RIDGE:
+ case GROOVE: {
+ EBorderStyle s1;
+ EBorderStyle s2;
+ if (borderStyle == GROOVE) {
+ s1 = INSET;
+ s2 = OUTSET;
+ } else {
+ s1 = OUTSET;
+ s2 = INSET;
+ }
+
+ float adjacent1BigHalf = ceilToDevicePixel(adjacentWidth1 / 2, deviceScaleFactor);
+ float adjacent2BigHalf = ceilToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
+
+ float adjacent1SmallHalf = floorToDevicePixel(adjacentWidth1 / 2, deviceScaleFactor);
+ float adjacent2SmallHalf = floorToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
+
+ float offset1 = 0;
+ float offset2 = 0;
+ float offset3 = 0;
+ float offset4 = 0;
+
+ if (((side == BSTop || side == BSLeft) && adjacentWidth1 < 0) || ((side == BSBottom || side == BSRight) && adjacentWidth1 > 0))
+ offset1 = floorToDevicePixel(adjacentWidth1 / 2, deviceScaleFactor);
+
+ if (((side == BSTop || side == BSLeft) && adjacentWidth2 < 0) || ((side == BSBottom || side == BSRight) && adjacentWidth2 > 0))
+ offset2 = ceilToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
+
+ if (((side == BSTop || side == BSLeft) && adjacentWidth1 > 0) || ((side == BSBottom || side == BSRight) && adjacentWidth1 < 0))
+ offset3 = floorToDevicePixel(fabs(adjacentWidth1) / 2, deviceScaleFactor);
+
+ if (((side == BSTop || side == BSLeft) && adjacentWidth2 > 0) || ((side == BSBottom || side == BSRight) && adjacentWidth2 < 0))
+ offset4 = ceilToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
+
+ float adjustedX = ceilToDevicePixel((x1 + x2) / 2, deviceScaleFactor);
+ float adjustedY = ceilToDevicePixel((y1 + y2) / 2, deviceScaleFactor);
+ // Quads can't use the default snapping rect functions.
+ x1 = roundToDevicePixel(x1, deviceScaleFactor);
+ x2 = roundToDevicePixel(x2, deviceScaleFactor);
+ y1 = roundToDevicePixel(y1, deviceScaleFactor);
+ y2 = roundToDevicePixel(y2, deviceScaleFactor);
+
+ switch (side) {
+ case BSTop:
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(x1 + offset1, y1), FloatPoint(x2 - offset2, adjustedY)), side, color, s1, adjacent1BigHalf, adjacent2BigHalf, antialias);
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(x1 + offset3, adjustedY), FloatPoint(x2 - offset4, y2)), side, color, s2, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
+ break;
+ case BSLeft:
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(x1, y1 + offset1), FloatPoint(adjustedX, y2 - offset2)), side, color, s1, adjacent1BigHalf, adjacent2BigHalf, antialias);
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(adjustedX, y1 + offset3), FloatPoint(x2, y2 - offset4)), side, color, s2, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
+ break;
+ case BSBottom:
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(x1 + offset1, y1), FloatPoint(x2 - offset2, adjustedY)), side, color, s2, adjacent1BigHalf, adjacent2BigHalf, antialias);
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(x1 + offset3, adjustedY), FloatPoint(x2 - offset4, y2)), side, color, s1, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
+ break;
+ case BSRight:
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(x1, y1 + offset1), FloatPoint(adjustedX, y2 - offset2)), side, color, s2, adjacent1BigHalf, adjacent2BigHalf, antialias);
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(adjustedX, y1 + offset3), FloatPoint(x2, y2 - offset4)), side, color, s1, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
+ break;
+ }
+ break;
+ }
+ case INSET:
+ case OUTSET:
+ calculateBorderStyleColor(borderStyle, side, color);
+ FALLTHROUGH;
+ case SOLID: {
+ StrokeStyle oldStrokeStyle = graphicsContext.strokeStyle();
+ ASSERT(x2 >= x1);
+ ASSERT(y2 >= y1);
+ if (!adjacentWidth1 && !adjacentWidth2) {
+ // Turn off antialiasing to match the behavior of drawConvexPolygon();
+ // this matters for rects in transformed contexts.
+ graphicsContext.setStrokeStyle(NoStroke);
+ graphicsContext.setFillColor(color, style.colorSpace());
+ bool wasAntialiased = graphicsContext.shouldAntialias();
+ graphicsContext.setShouldAntialias(antialias);
+ graphicsContext.drawRect(snapRectToDevicePixels(x1, y1, x2 - x1, y2 - y1, deviceScaleFactor));
+ graphicsContext.setShouldAntialias(wasAntialiased);
+ graphicsContext.setStrokeStyle(oldStrokeStyle);
+ return;
+ }
+
+ // FIXME: These roundings should be replaced by ASSERT(device pixel positioned) when all the callers have transitioned to device pixels.
+ x1 = roundToDevicePixel(x1, deviceScaleFactor);
+ y1 = roundToDevicePixel(y1, deviceScaleFactor);
+ x2 = roundToDevicePixel(x2, deviceScaleFactor);
+ y2 = roundToDevicePixel(y2, deviceScaleFactor);
+
+ FloatPoint quad[4];
+ switch (side) {
+ case BSTop:
+ quad[0] = FloatPoint(x1 + std::max<float>(-adjacentWidth1, 0), y1);
+ quad[1] = FloatPoint(x1 + std::max<float>(adjacentWidth1, 0), y2);
+ quad[2] = FloatPoint(x2 - std::max<float>(adjacentWidth2, 0), y2);
+ quad[3] = FloatPoint(x2 - std::max<float>(-adjacentWidth2, 0), y1);
+ break;
+ case BSBottom:
+ quad[0] = FloatPoint(x1 + std::max<float>(adjacentWidth1, 0), y1);
+ quad[1] = FloatPoint(x1 + std::max<float>(-adjacentWidth1, 0), y2);
+ quad[2] = FloatPoint(x2 - std::max<float>(-adjacentWidth2, 0), y2);
+ quad[3] = FloatPoint(x2 - std::max<float>(adjacentWidth2, 0), y1);
+ break;
+ case BSLeft:
+ quad[0] = FloatPoint(x1, y1 + std::max<float>(-adjacentWidth1, 0));
+ quad[1] = FloatPoint(x1, y2 - std::max<float>(-adjacentWidth2, 0));
+ quad[2] = FloatPoint(x2, y2 - std::max<float>(adjacentWidth2, 0));
+ quad[3] = FloatPoint(x2, y1 + std::max<float>(adjacentWidth1, 0));
+ break;
+ case BSRight:
+ quad[0] = FloatPoint(x1, y1 + std::max<float>(adjacentWidth1, 0));
+ quad[1] = FloatPoint(x1, y2 - std::max<float>(adjacentWidth2, 0));
+ quad[2] = FloatPoint(x2, y2 - std::max<float>(-adjacentWidth2, 0));
+ quad[3] = FloatPoint(x2, y1 + std::max<float>(-adjacentWidth1, 0));
+ break;
+ }
+
+ graphicsContext.setStrokeStyle(NoStroke);
+ graphicsContext.setFillColor(color, style.colorSpace());
+ graphicsContext.drawConvexPolygon(4, quad, antialias);
+ graphicsContext.setStrokeStyle(oldStrokeStyle);
+ break;
+ }
+ }
}
+
+void RenderElement::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const RenderStyle& style)
+{
+ ASSERT(style.outlineStyleIsAuto());
+
+ Vector<IntRect> focusRingRects;
+ addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer);
+#if PLATFORM(MAC)
+ bool needsRepaint;
+ paintInfo.context->drawFocusRing(focusRingRects, style.outlineWidth(), style.outlineOffset(), document().page()->focusController().timeSinceFocusWasSet(), needsRepaint);
+ if (needsRepaint)
+ document().page()->focusController().setFocusedElementNeedsRepaint();
+#else
+ paintInfo.context->drawFocusRing(focusRingRects, style.outlineWidth(), style.outlineOffset(), style.visitedDependentColor(CSSPropertyOutlineColor));
+#endif
+}
+
+void RenderElement::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRect)
+{
+ if (!hasOutline())
+ return;
+
+ RenderStyle& styleToUse = style();
+ LayoutUnit outlineWidth = styleToUse.outlineWidth();
+
+ int outlineOffset = styleToUse.outlineOffset();
+
+ // Only paint the focus ring by hand if the theme isn't able to draw it.
+ if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
+ paintFocusRing(paintInfo, paintRect.location(), styleToUse);
+
+ if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
+ addPDFURLRect(paintInfo, paintRect.location());
+
+ if (styleToUse.outlineStyleIsAuto() || styleToUse.outlineStyle() == BNONE)
+ return;
+
+ IntRect inner = snappedIntRect(paintRect);
+ inner.inflate(outlineOffset);
+
+ IntRect outer = snappedIntRect(inner);
+ outer.inflate(outlineWidth);
+
+ // FIXME: This prevents outlines from painting inside the object. See bug 12042
+ if (outer.isEmpty())
+ return;
+
+ EBorderStyle outlineStyle = styleToUse.outlineStyle();
+ Color outlineColor = styleToUse.visitedDependentColor(CSSPropertyOutlineColor);
+
+ GraphicsContext& graphicsContext = *paintInfo.context;
+ bool useTransparencyLayer = outlineColor.hasAlpha();
+ if (useTransparencyLayer) {
+ if (outlineStyle == SOLID) {
+ Path path;
+ path.addRect(outer);
+ path.addRect(inner);
+ graphicsContext.setFillRule(RULE_EVENODD);
+ graphicsContext.setFillColor(outlineColor, styleToUse.colorSpace());
+ graphicsContext.fillPath(path);
+ return;
+ }
+ graphicsContext.beginTransparencyLayer(static_cast<float>(outlineColor.alpha()) / 255);
+ outlineColor = Color(outlineColor.red(), outlineColor.green(), outlineColor.blue());
+ }
+
+ int leftOuter = outer.x();
+ int leftInner = inner.x();
+ int rightOuter = outer.maxX();
+ int rightInner = inner.maxX();
+ int topOuter = outer.y();
+ int topInner = inner.y();
+ int bottomOuter = outer.maxY();
+ int bottomInner = inner.maxY();
+
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(leftOuter, topOuter), FloatPoint(leftInner, bottomOuter)), BSLeft, outlineColor, outlineStyle, outlineWidth, outlineWidth);
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(leftOuter, topOuter), FloatPoint(rightOuter, topInner)), BSTop, outlineColor, outlineStyle, outlineWidth, outlineWidth);
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(rightInner, topOuter), FloatPoint(rightOuter, bottomOuter)), BSRight, outlineColor, outlineStyle, outlineWidth, outlineWidth);
+ drawLineForBoxSide(graphicsContext, FloatRect(FloatPoint(leftOuter, bottomInner), FloatPoint(rightOuter, bottomOuter)), BSBottom, outlineColor, outlineStyle, outlineWidth, outlineWidth);
+
+ if (useTransparencyLayer)
+ graphicsContext.endTransparencyLayer();
+}
+
+}
Modified: trunk/Source/WebCore/rendering/RenderElement.h (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderElement.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderElement.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -208,6 +208,7 @@
void setIsCSSAnimating(bool b) { m_isCSSAnimating = b; }
const RenderElement* enclosingRendererWithTextDecoration(TextDecoration, bool firstLine) const;
+ void drawLineForBoxSide(GraphicsContext&, const FloatRect&, BoxSide, Color, EBorderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias = false) const;
protected:
enum BaseTypeFlags {
@@ -264,6 +265,9 @@
unsigned renderBlockFlowLineLayoutPath() const { return m_renderBlockFlowLineLayoutPath; }
bool renderBlockFlowHasMarkupTruncation() const { return m_renderBlockFlowHasMarkupTruncation; }
+ void paintFocusRing(PaintInfo&, const LayoutPoint&, const RenderStyle&);
+ void paintOutline(PaintInfo&, const LayoutRect&);
+
private:
RenderElement(ContainerNode&, Ref<RenderStyle>&&, unsigned baseTypeFlags);
void node() const = delete;
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -1555,7 +1555,7 @@
RenderStyle& styleToUse = style();
// Only paint the focus ring by hand if the theme isn't able to draw it.
if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
- paintFocusRing(paintInfo, paintOffset, &styleToUse);
+ paintFocusRing(paintInfo, paintOffset, styleToUse);
if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
addPDFURLRect(paintInfo, paintOffset);
@@ -1614,11 +1614,11 @@
IntRect pixelSnappedNextLine = snappedIntRect(paintOffset.x() + nextline.x(), 0, nextline.width(), 0);
// left edge
- drawLineForBoxSide(graphicsContext,
- pixelSnappedBox.x() - outlineWidth,
- pixelSnappedBox.y() - (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? outlineWidth : 0),
- pixelSnappedBox.x(),
- pixelSnappedBox.maxY() + (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? outlineWidth : 0),
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(pixelSnappedBox.x() - outlineWidth,
+ pixelSnappedBox.y() - (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? outlineWidth : 0)),
+ FloatPoint(pixelSnappedBox.x(),
+ pixelSnappedBox.maxY() + (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.maxX() - 1) <= thisline.x() ? outlineWidth : 0))),
BSLeft,
outlineColor, outlineStyle,
(lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.maxX() - 1) <= thisline.x() ? outlineWidth : -outlineWidth),
@@ -1626,11 +1626,11 @@
antialias);
// right edge
- drawLineForBoxSide(graphicsContext,
- pixelSnappedBox.maxX(),
- pixelSnappedBox.y() - (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? outlineWidth : 0),
- pixelSnappedBox.maxX() + outlineWidth,
- pixelSnappedBox.maxY() + (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? outlineWidth : 0),
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(pixelSnappedBox.maxX(),
+ pixelSnappedBox.y() - (lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? outlineWidth : 0)),
+ FloatPoint(pixelSnappedBox.maxX() + outlineWidth,
+ pixelSnappedBox.maxY() + (nextline.isEmpty() || nextline.maxX() <= thisline.maxX() || (thisline.maxX() - 1) <= nextline.x() ? outlineWidth : 0))),
BSRight,
outlineColor, outlineStyle,
(lastline.isEmpty() || lastline.maxX() < thisline.maxX() || (thisline.maxX() - 1) <= lastline.x() ? outlineWidth : -outlineWidth),
@@ -1638,32 +1638,32 @@
antialias);
// upper edge
if (thisline.x() < lastline.x())
- drawLineForBoxSide(graphicsContext,
- pixelSnappedBox.x() - outlineWidth,
- pixelSnappedBox.y() - outlineWidth,
- std::min(pixelSnappedBox.maxX() + outlineWidth, (lastline.isEmpty() ? 1000000 : pixelSnappedLastLine.x())),
- pixelSnappedBox.y(),
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(pixelSnappedBox.x() - outlineWidth,
+ pixelSnappedBox.y() - outlineWidth),
+ FloatPoint(std::min(pixelSnappedBox.maxX() + outlineWidth, (lastline.isEmpty() ? 1000000 : pixelSnappedLastLine.x())),
+ pixelSnappedBox.y())),
BSTop, outlineColor, outlineStyle,
outlineWidth,
(!lastline.isEmpty() && paintOffset.x() + lastline.x() + 1 < pixelSnappedBox.maxX() + outlineWidth) ? -outlineWidth : outlineWidth,
antialias);
if (lastline.maxX() < thisline.maxX())
- drawLineForBoxSide(graphicsContext,
- std::max(lastline.isEmpty() ? -1000000 : pixelSnappedLastLine.maxX(), pixelSnappedBox.x() - outlineWidth),
- pixelSnappedBox.y() - outlineWidth,
- pixelSnappedBox.maxX() + outlineWidth,
- pixelSnappedBox.y(),
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(std::max(lastline.isEmpty() ? -1000000 : pixelSnappedLastLine.maxX(), pixelSnappedBox.x() - outlineWidth),
+ pixelSnappedBox.y() - outlineWidth),
+ FloatPoint(pixelSnappedBox.maxX() + outlineWidth,
+ pixelSnappedBox.y())),
BSTop, outlineColor, outlineStyle,
(!lastline.isEmpty() && pixelSnappedBox.x() - outlineWidth < paintOffset.x() + lastline.maxX()) ? -outlineWidth : outlineWidth,
outlineWidth, antialias);
if (thisline.x() == thisline.maxX())
- drawLineForBoxSide(graphicsContext,
- pixelSnappedBox.x() - outlineWidth,
- pixelSnappedBox.y() - outlineWidth,
- pixelSnappedBox.maxX() + outlineWidth,
- pixelSnappedBox.y(),
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(pixelSnappedBox.x() - outlineWidth,
+ pixelSnappedBox.y() - outlineWidth),
+ FloatPoint(pixelSnappedBox.maxX() + outlineWidth,
+ pixelSnappedBox.y())),
BSTop, outlineColor, outlineStyle,
outlineWidth,
outlineWidth,
@@ -1671,32 +1671,32 @@
// lower edge
if (thisline.x() < nextline.x())
- drawLineForBoxSide(graphicsContext,
- pixelSnappedBox.x() - outlineWidth,
- pixelSnappedBox.maxY(),
- std::min(pixelSnappedBox.maxX() + outlineWidth, !nextline.isEmpty() ? pixelSnappedNextLine.x() + 1 : 1000000),
- pixelSnappedBox.maxY() + outlineWidth,
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(pixelSnappedBox.x() - outlineWidth,
+ pixelSnappedBox.maxY()),
+ FloatPoint(std::min(pixelSnappedBox.maxX() + outlineWidth, !nextline.isEmpty() ? pixelSnappedNextLine.x() + 1 : 1000000),
+ pixelSnappedBox.maxY() + outlineWidth)),
BSBottom, outlineColor, outlineStyle,
outlineWidth,
(!nextline.isEmpty() && paintOffset.x() + nextline.x() + 1 < pixelSnappedBox.maxX() + outlineWidth) ? -outlineWidth : outlineWidth,
antialias);
if (nextline.maxX() < thisline.maxX())
- drawLineForBoxSide(graphicsContext,
- std::max(!nextline.isEmpty() ? pixelSnappedNextLine.maxX() : -1000000, pixelSnappedBox.x() - outlineWidth),
- pixelSnappedBox.maxY(),
- pixelSnappedBox.maxX() + outlineWidth,
- pixelSnappedBox.maxY() + outlineWidth,
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(std::max(!nextline.isEmpty() ? pixelSnappedNextLine.maxX() : -1000000, pixelSnappedBox.x() - outlineWidth),
+ pixelSnappedBox.maxY()),
+ FloatPoint(pixelSnappedBox.maxX() + outlineWidth,
+ pixelSnappedBox.maxY() + outlineWidth)),
BSBottom, outlineColor, outlineStyle,
(!nextline.isEmpty() && pixelSnappedBox.x() - outlineWidth < paintOffset.x() + nextline.maxX()) ? -outlineWidth : outlineWidth,
outlineWidth, antialias);
if (thisline.x() == thisline.maxX())
- drawLineForBoxSide(graphicsContext,
- pixelSnappedBox.x() - outlineWidth,
- pixelSnappedBox.maxY(),
- pixelSnappedBox.maxX() + outlineWidth,
- pixelSnappedBox.maxY() + outlineWidth,
+ drawLineForBoxSide(*graphicsContext,
+ FloatRect(FloatPoint(pixelSnappedBox.x() - outlineWidth,
+ pixelSnappedBox.maxY()),
+ FloatPoint(pixelSnappedBox.maxX() + outlineWidth,
+ pixelSnappedBox.maxY() + outlineWidth)),
BSBottom, outlineColor, outlineStyle,
outlineWidth,
outlineWidth,
Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -620,7 +620,7 @@
LayoutUnit ruleTop = isHorizontalWritingMode() ? paintOffset.y() + borderTop() + paddingTop() : paintOffset.y() + ruleLogicalLeft - ruleThickness / 2 + ruleAdd;
LayoutUnit ruleBottom = isHorizontalWritingMode() ? ruleTop + contentHeight() : ruleTop + ruleThickness;
IntRect pixelSnappedRuleRect = snappedIntRect(ruleLeft, ruleTop, ruleRight - ruleLeft, ruleBottom - ruleTop);
- drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRect.x(), pixelSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRect.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, antialias);
+ drawLineForBoxSide(*paintInfo.context, pixelSnappedRuleRect, boxSide, ruleColor, ruleStyle, 0, 0, antialias);
}
ruleLogicalLeft = currLogicalLeftOffset;
@@ -651,7 +651,7 @@
for (unsigned i = 1; i < colCount; i++) {
ruleRect.move(step);
IntRect pixelSnappedRuleRect = snappedIntRect(ruleRect);
- drawLineForBoxSide(paintInfo.context, pixelSnappedRuleRect.x(), pixelSnappedRuleRect.y(), pixelSnappedRuleRect.maxX(), pixelSnappedRuleRect.maxY(), boxSide, ruleColor, ruleStyle, 0, 0, antialias);
+ drawLineForBoxSide(*paintInfo.context, pixelSnappedRuleRect, boxSide, ruleColor, ruleStyle, 0, 0, antialias);
}
}
}
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -32,7 +32,6 @@
#include "EventHandler.h"
#include "FloatQuad.h"
#include "FlowThreadController.h"
-#include "FocusController.h"
#include "FrameSelection.h"
#include "FrameView.h"
#include "GeometryUtilities.h"
@@ -708,271 +707,6 @@
return downcast<RenderBlock>(parent);
}
-void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, float x1, float y1, float x2, float y2,
- BoxSide side, Color color, EBorderStyle borderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias) const
-{
- float deviceScaleFactor = document().deviceScaleFactor();
- float thickness;
- float length;
- if (side == BSTop || side == BSBottom) {
- thickness = y2 - y1;
- length = x2 - x1;
- } else {
- thickness = x2 - x1;
- length = y2 - y1;
- }
- if (borderStyle == DOUBLE && (thickness * deviceScaleFactor) < 3)
- borderStyle = SOLID;
-
- // FIXME: We really would like this check to be an ASSERT as we don't want to draw empty borders. However
- // nothing guarantees that the following recursive calls to drawLineForBoxSide will have non-null dimensions.
- if (!thickness || !length)
- return;
-
- const RenderStyle& style = this->style();
- switch (borderStyle) {
- case BNONE:
- case BHIDDEN:
- return;
- case DOTTED:
- case DASHED: {
- bool wasAntialiased = graphicsContext->shouldAntialias();
- StrokeStyle oldStrokeStyle = graphicsContext->strokeStyle();
- graphicsContext->setShouldAntialias(antialias);
- graphicsContext->setStrokeColor(color, style.colorSpace());
- graphicsContext->setStrokeThickness(thickness);
- graphicsContext->setStrokeStyle(borderStyle == DASHED ? DashedStroke : DottedStroke);
- graphicsContext->drawLine(roundPointToDevicePixels(LayoutPoint(x1, y1), deviceScaleFactor), roundPointToDevicePixels(LayoutPoint(x2, y2), deviceScaleFactor));
- graphicsContext->setShouldAntialias(wasAntialiased);
- graphicsContext->setStrokeStyle(oldStrokeStyle);
- break;
- }
- case DOUBLE: {
- float thirdOfThickness = ceilToDevicePixel(thickness / 3, deviceScaleFactor);
- ASSERT(thirdOfThickness);
-
- if (adjacentWidth1 == 0 && adjacentWidth2 == 0) {
- StrokeStyle oldStrokeStyle = graphicsContext->strokeStyle();
- graphicsContext->setStrokeStyle(NoStroke);
- graphicsContext->setFillColor(color, style.colorSpace());
-
- bool wasAntialiased = graphicsContext->shouldAntialias();
- graphicsContext->setShouldAntialias(antialias);
-
- switch (side) {
- case BSTop:
- case BSBottom:
- graphicsContext->drawRect(snapRectToDevicePixels(x1, y1, length, thirdOfThickness, deviceScaleFactor));
- graphicsContext->drawRect(snapRectToDevicePixels(x1, y2 - thirdOfThickness, length, thirdOfThickness, deviceScaleFactor));
- break;
- case BSLeft:
- case BSRight:
- graphicsContext->drawRect(snapRectToDevicePixels(x1, y1, thirdOfThickness, length, deviceScaleFactor));
- graphicsContext->drawRect(snapRectToDevicePixels(x2 - thirdOfThickness, y1, thirdOfThickness, length, deviceScaleFactor));
- break;
- }
-
- graphicsContext->setShouldAntialias(wasAntialiased);
- graphicsContext->setStrokeStyle(oldStrokeStyle);
- } else {
- float adjacent1BigThird = ceilToDevicePixel(adjacentWidth1 / 3, deviceScaleFactor);
- float adjacent2BigThird = ceilToDevicePixel(adjacentWidth2 / 3, deviceScaleFactor);
-
- float offset1 = floorToDevicePixel(fabs(adjacentWidth1) * 2 / 3, deviceScaleFactor);
- float offset2 = floorToDevicePixel(fabs(adjacentWidth2) * 2 / 3, deviceScaleFactor);
-
- float mitreOffset1 = adjacentWidth1 < 0 ? offset1 : 0;
- float mitreOffset2 = adjacentWidth1 > 0 ? offset1 : 0;
- float mitreOffset3 = adjacentWidth2 < 0 ? offset2 : 0;
- float mitreOffset4 = adjacentWidth2 > 0 ? offset2 : 0;
-
- FloatRect paintBorderRect;
- switch (side) {
- case BSTop:
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset1, y1, (x2 - mitreOffset3) - (x1 + mitreOffset1), thirdOfThickness), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
-
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset2, y2 - thirdOfThickness, (x2 - mitreOffset4) - (x1 + mitreOffset2), thirdOfThickness), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
- break;
- case BSLeft:
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x1, y1 + mitreOffset1, thirdOfThickness, (y2 - mitreOffset3) - (y1 + mitreOffset1)), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
-
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x2 - thirdOfThickness, y1 + mitreOffset2, thirdOfThickness, (y2 - mitreOffset4) - (y1 + mitreOffset2)), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
- break;
- case BSBottom:
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset2, y1, (x2 - mitreOffset4) - (x1 + mitreOffset2), thirdOfThickness), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
-
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset1, y2 - thirdOfThickness, (x2 - mitreOffset3) - (x1 + mitreOffset1), thirdOfThickness), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
- break;
- case BSRight:
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x1, y1 + mitreOffset2, thirdOfThickness, (y2 - mitreOffset4) - (y1 + mitreOffset2)), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
-
- paintBorderRect = snapRectToDevicePixels(LayoutRect(x2 - thirdOfThickness, y1 + mitreOffset1, thirdOfThickness, (y2 - mitreOffset3) - (y1 + mitreOffset1)), deviceScaleFactor);
- drawLineForBoxSide(graphicsContext, paintBorderRect.x(), paintBorderRect.y(), paintBorderRect.maxX(), paintBorderRect.maxY(), side, color, SOLID,
- adjacent1BigThird, adjacent2BigThird, antialias);
- break;
- default:
- break;
- }
- }
- break;
- }
- case RIDGE:
- case GROOVE: {
- EBorderStyle s1;
- EBorderStyle s2;
- if (borderStyle == GROOVE) {
- s1 = INSET;
- s2 = OUTSET;
- } else {
- s1 = OUTSET;
- s2 = INSET;
- }
-
- float adjacent1BigHalf = ceilToDevicePixel(adjacentWidth1 / 2, deviceScaleFactor);
- float adjacent2BigHalf = ceilToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
-
- float adjacent1SmallHalf = floorToDevicePixel(adjacentWidth1 / 2, deviceScaleFactor);
- float adjacent2SmallHalf = floorToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
-
- float offset1 = 0;
- float offset2 = 0;
- float offset3 = 0;
- float offset4 = 0;
-
- if (((side == BSTop || side == BSLeft) && adjacentWidth1 < 0) || ((side == BSBottom || side == BSRight) && adjacentWidth1 > 0))
- offset1 = floorToDevicePixel(adjacentWidth1 / 2, deviceScaleFactor);
-
- if (((side == BSTop || side == BSLeft) && adjacentWidth2 < 0) || ((side == BSBottom || side == BSRight) && adjacentWidth2 > 0))
- offset2 = ceilToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
-
- if (((side == BSTop || side == BSLeft) && adjacentWidth1 > 0) || ((side == BSBottom || side == BSRight) && adjacentWidth1 < 0))
- offset3 = floorToDevicePixel(fabs(adjacentWidth1) / 2, deviceScaleFactor);
-
- if (((side == BSTop || side == BSLeft) && adjacentWidth2 > 0) || ((side == BSBottom || side == BSRight) && adjacentWidth2 < 0))
- offset4 = ceilToDevicePixel(adjacentWidth2 / 2, deviceScaleFactor);
-
- float adjustedX = ceilToDevicePixel((x1 + x2) / 2, deviceScaleFactor);
- float adjustedY = ceilToDevicePixel((y1 + y2) / 2, deviceScaleFactor);
- /// Quads can't use the default snapping rect functions.
- x1 = roundToDevicePixel(x1, deviceScaleFactor);
- x2 = roundToDevicePixel(x2, deviceScaleFactor);
- y1 = roundToDevicePixel(y1, deviceScaleFactor);
- y2 = roundToDevicePixel(y2, deviceScaleFactor);
-
- switch (side) {
- case BSTop:
- drawLineForBoxSide(graphicsContext, x1 + offset1, y1, x2 - offset2, adjustedY, side, color, s1, adjacent1BigHalf, adjacent2BigHalf, antialias);
- drawLineForBoxSide(graphicsContext, x1 + offset3, adjustedY, x2 - offset4, y2, side, color, s2, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
- break;
- case BSLeft:
- drawLineForBoxSide(graphicsContext, x1, y1 + offset1, adjustedX, y2 - offset2, side, color, s1, adjacent1BigHalf, adjacent2BigHalf, antialias);
- drawLineForBoxSide(graphicsContext, adjustedX, y1 + offset3, x2, y2 - offset4, side, color, s2, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
- break;
- case BSBottom:
- drawLineForBoxSide(graphicsContext, x1 + offset1, y1, x2 - offset2, adjustedY, side, color, s2, adjacent1BigHalf, adjacent2BigHalf, antialias);
- drawLineForBoxSide(graphicsContext, x1 + offset3, adjustedY, x2 - offset4, y2, side, color, s1, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
- break;
- case BSRight:
- drawLineForBoxSide(graphicsContext, x1, y1 + offset1, adjustedX, y2 - offset2, side, color, s2, adjacent1BigHalf, adjacent2BigHalf, antialias);
- drawLineForBoxSide(graphicsContext, adjustedX, y1 + offset3, x2, y2 - offset4, side, color, s1, adjacent1SmallHalf, adjacent2SmallHalf, antialias);
- break;
- }
- break;
- }
- case INSET:
- case OUTSET:
- calculateBorderStyleColor(borderStyle, side, color);
- FALLTHROUGH;
- case SOLID: {
- StrokeStyle oldStrokeStyle = graphicsContext->strokeStyle();
- ASSERT(x2 >= x1);
- ASSERT(y2 >= y1);
- if (!adjacentWidth1 && !adjacentWidth2) {
- // Turn off antialiasing to match the behavior of drawConvexPolygon();
- // this matters for rects in transformed contexts.
- graphicsContext->setStrokeStyle(NoStroke);
- graphicsContext->setFillColor(color, style.colorSpace());
- bool wasAntialiased = graphicsContext->shouldAntialias();
- graphicsContext->setShouldAntialias(antialias);
- graphicsContext->drawRect(snapRectToDevicePixels(x1, y1, x2 - x1, y2 - y1, deviceScaleFactor));
- graphicsContext->setShouldAntialias(wasAntialiased);
- graphicsContext->setStrokeStyle(oldStrokeStyle);
- return;
- }
-
- // FIXME: These roundings should be replaced by ASSERT(device pixel positioned) when all the callers transitioned to device pixels.
- x1 = roundToDevicePixel(x1, deviceScaleFactor);
- y1 = roundToDevicePixel(y1, deviceScaleFactor);
- x2 = roundToDevicePixel(x2, deviceScaleFactor);
- y2 = roundToDevicePixel(y2, deviceScaleFactor);
-
- FloatPoint quad[4];
- switch (side) {
- case BSTop:
- quad[0] = FloatPoint(x1 + std::max<float>(-adjacentWidth1, 0), y1);
- quad[1] = FloatPoint(x1 + std::max<float>(adjacentWidth1, 0), y2);
- quad[2] = FloatPoint(x2 - std::max<float>(adjacentWidth2, 0), y2);
- quad[3] = FloatPoint(x2 - std::max<float>(-adjacentWidth2, 0), y1);
- break;
- case BSBottom:
- quad[0] = FloatPoint(x1 + std::max<float>(adjacentWidth1, 0), y1);
- quad[1] = FloatPoint(x1 + std::max<float>(-adjacentWidth1, 0), y2);
- quad[2] = FloatPoint(x2 - std::max<float>(-adjacentWidth2, 0), y2);
- quad[3] = FloatPoint(x2 - std::max<float>(adjacentWidth2, 0), y1);
- break;
- case BSLeft:
- quad[0] = FloatPoint(x1, y1 + std::max<float>(-adjacentWidth1, 0));
- quad[1] = FloatPoint(x1, y2 - std::max<float>(-adjacentWidth2, 0));
- quad[2] = FloatPoint(x2, y2 - std::max<float>(adjacentWidth2, 0));
- quad[3] = FloatPoint(x2, y1 + std::max<float>(adjacentWidth1, 0));
- break;
- case BSRight:
- quad[0] = FloatPoint(x1, y1 + std::max<float>(adjacentWidth1, 0));
- quad[1] = FloatPoint(x1, y2 - std::max<float>(adjacentWidth2, 0));
- quad[2] = FloatPoint(x2, y2 - std::max<float>(-adjacentWidth2, 0));
- quad[3] = FloatPoint(x2, y1 + std::max<float>(-adjacentWidth1, 0));
- break;
- }
-
- graphicsContext->setStrokeStyle(NoStroke);
- graphicsContext->setFillColor(color, style.colorSpace());
- graphicsContext->drawConvexPolygon(4, quad, antialias);
- graphicsContext->setStrokeStyle(oldStrokeStyle);
- break;
- }
- }
-}
-
-void RenderObject::paintFocusRing(PaintInfo& paintInfo, const LayoutPoint& paintOffset, RenderStyle* style)
-{
- ASSERT(style->outlineStyleIsAuto());
-
- Vector<IntRect> focusRingRects;
- addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer);
-#if PLATFORM(MAC)
- bool needsRepaint;
- paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), document().page()->focusController().timeSinceFocusWasSet(), needsRepaint);
- if (needsRepaint)
- document().page()->focusController().setFocusedElementNeedsRepaint();
-#else
- paintInfo.context->drawFocusRing(focusRingRects, style->outlineWidth(), style->outlineOffset(), style->visitedDependentColor(CSSPropertyOutlineColor));
-#endif
-}
-
void RenderObject::addPDFURLRect(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
Vector<IntRect> focusRingRects;
@@ -990,73 +724,6 @@
paintInfo.context->setURLForRect(node->document().completeURL(href), snappedIntRect(urlRect));
}
-void RenderObject::paintOutline(PaintInfo& paintInfo, const LayoutRect& paintRect)
-{
- if (!hasOutline())
- return;
-
- RenderStyle& styleToUse = style();
- LayoutUnit outlineWidth = styleToUse.outlineWidth();
-
- int outlineOffset = styleToUse.outlineOffset();
-
- // Only paint the focus ring by hand if the theme isn't able to draw it.
- if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
- paintFocusRing(paintInfo, paintRect.location(), &styleToUse);
-
- if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse))
- addPDFURLRect(paintInfo, paintRect.location());
-
- if (styleToUse.outlineStyleIsAuto() || styleToUse.outlineStyle() == BNONE)
- return;
-
- IntRect inner = snappedIntRect(paintRect);
- inner.inflate(outlineOffset);
-
- IntRect outer = snappedIntRect(inner);
- outer.inflate(outlineWidth);
-
- // FIXME: This prevents outlines from painting inside the object. See bug 12042
- if (outer.isEmpty())
- return;
-
- EBorderStyle outlineStyle = styleToUse.outlineStyle();
- Color outlineColor = styleToUse.visitedDependentColor(CSSPropertyOutlineColor);
-
- GraphicsContext* graphicsContext = paintInfo.context;
- bool useTransparencyLayer = outlineColor.hasAlpha();
- if (useTransparencyLayer) {
- if (outlineStyle == SOLID) {
- Path path;
- path.addRect(outer);
- path.addRect(inner);
- graphicsContext->setFillRule(RULE_EVENODD);
- graphicsContext->setFillColor(outlineColor, styleToUse.colorSpace());
- graphicsContext->fillPath(path);
- return;
- }
- graphicsContext->beginTransparencyLayer(static_cast<float>(outlineColor.alpha()) / 255);
- outlineColor = Color(outlineColor.red(), outlineColor.green(), outlineColor.blue());
- }
-
- int leftOuter = outer.x();
- int leftInner = inner.x();
- int rightOuter = outer.maxX();
- int rightInner = inner.maxX();
- int topOuter = outer.y();
- int topInner = inner.y();
- int bottomOuter = outer.maxY();
- int bottomInner = inner.maxY();
-
- drawLineForBoxSide(graphicsContext, leftOuter, topOuter, leftInner, bottomOuter, BSLeft, outlineColor, outlineStyle, outlineWidth, outlineWidth);
- drawLineForBoxSide(graphicsContext, leftOuter, topOuter, rightOuter, topInner, BSTop, outlineColor, outlineStyle, outlineWidth, outlineWidth);
- drawLineForBoxSide(graphicsContext, rightInner, topOuter, rightOuter, bottomOuter, BSRight, outlineColor, outlineStyle, outlineWidth, outlineWidth);
- drawLineForBoxSide(graphicsContext, leftOuter, bottomInner, rightOuter, bottomOuter, BSBottom, outlineColor, outlineStyle, outlineWidth, outlineWidth);
-
- if (useTransparencyLayer)
- graphicsContext->endTransparencyLayer();
-}
-
#if PLATFORM(IOS)
// This function is similar in spirit to RenderText::absoluteRectsForRange, but returns rectangles
// which are annotated with additional state which helps iOS draw selections in its unique way.
Modified: trunk/Source/WebCore/rendering/RenderObject.h (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderObject.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -857,10 +857,7 @@
RespectImageOrientationEnum shouldRespectImageOrientation() const;
- void drawLineForBoxSide(GraphicsContext*, float x1, float y1, float x2, float y2, BoxSide, Color, EBorderStyle, float adjbw1, float adjbw2, bool antialias = false) const;
protected:
- void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*);
- void paintOutline(PaintInfo&, const LayoutRect&);
void addPDFURLRect(PaintInfo&, const LayoutPoint&);
Node& nodeForNonAnonymous() const { ASSERT(!isAnonymous()); return m_node; }
Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderTableCell.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -1244,7 +1244,7 @@
for (CollapsedBorder* border = borders.nextBorder(); border; border = borders.nextBorder()) {
if (border->borderValue.isSameIgnoringColor(*table()->currentBorderValue()))
- drawLineForBoxSide(graphicsContext, border->x1, border->y1, border->x2, border->y2, border->side,
+ drawLineForBoxSide(*graphicsContext, FloatRect(FloatPoint(border->x1, border->y1), FloatPoint(border->x2, border->y2)), border->side,
border->borderValue.color(), border->style, 0, 0, antialias);
}
}
Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderTableSection.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -1120,7 +1120,7 @@
rect.intersect(paintInfo.rect);
if (rect.isEmpty())
return;
- drawLineForBoxSide(paintInfo.context, rect.x(), rect.y(), rect.x() + rect.width(), rect.y() + rect.height(), side, style().visitedDependentColor(borderColor), borderStyle, 0, 0, antialias);
+ drawLineForBoxSide(*paintInfo.context, rect, side, style().visitedDependentColor(borderColor), borderStyle, 0, 0, antialias);
}
int RenderTableSection::offsetLeftForRowGroupBorder(RenderTableCell* cell, const LayoutRect& rowGroupRect, unsigned row)
Modified: trunk/Source/WebCore/rendering/RenderTheme.h (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderTheme.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderTheme.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -307,7 +307,7 @@
virtual bool paintMenuListDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const;
- virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) { return true; }
+ virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) { return true; }
virtual bool paintPushButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
virtual bool paintSquareButtonDecorations(const RenderObject&, const PaintInfo&, const IntRect&) { return true; }
Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeGtk.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -860,7 +860,7 @@
return false;
}
-bool RenderThemeGtk::paintMenuListButtonDecorations(const RenderObject& object, const PaintInfo& info, const FloatRect& rect)
+bool RenderThemeGtk::paintMenuListButtonDecorations(const RenderBox& object, const PaintInfo& info, const FloatRect& rect)
{
return paintMenuList(object, info, rect);
}
Modified: trunk/Source/WebCore/rendering/RenderThemeGtk.h (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeGtk.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeGtk.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -130,7 +130,7 @@
virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
- virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
virtual void adjustSearchFieldResultsDecorationPartStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual bool paintSearchFieldResultsDecorationPart(const RenderObject&, const PaintInfo&, const IntRect&) override;
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -72,7 +72,7 @@
virtual bool paintTextAreaDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
virtual void adjustSliderTrackStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm 2015-08-08 03:06:52 UTC (rev 188183)
@@ -613,7 +613,7 @@
adjustInputElementButtonStyle(style, static_cast<HTMLInputElement&>(*element));
}
-bool RenderThemeIOS::paintMenuListButtonDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
+bool RenderThemeIOS::paintMenuListButtonDecorations(const RenderBox& box, const PaintInfo& paintInfo, const FloatRect& rect)
{
RenderStyle& style = box.style();
float borderTopWidth = style.borderTopWidth();
@@ -643,7 +643,7 @@
float separator = clip.maxX() - MenuListButtonPaddingRight;
- box.drawLineForBoxSide(paintInfo.context, separator - borderTopWidth, clip.y(), separator, clip.maxY(), BSRight, style.visitedDependentColor(CSSPropertyBorderTopColor), style.borderTopStyle(), 0, 0);
+ box.drawLineForBoxSide(*paintInfo.context, FloatRect(FloatPoint(separator - borderTopWidth, clip.y()), FloatPoint(separator, clip.maxY())), BSRight, style.visitedDependentColor(CSSPropertyBorderTopColor), style.borderTopStyle(), 0, 0);
FloatRect buttonClip(separator - adjustTop, clip.y() - adjustTop, MenuListButtonPaddingRight + adjustTop + adjustRight, clip.height() + adjustTop + adjustBottom);
@@ -662,7 +662,7 @@
// Paint Indicators.
- if (box.isMenuList() && downcast<HTMLSelectElement>(box.node())->multiple()) {
+ if (box.isMenuList() && downcast<HTMLSelectElement>(box.element())->multiple()) {
int size = 2;
int count = 3;
int padding = 3;
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.h (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeMac.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -131,7 +131,7 @@
virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
virtual void adjustMenuListStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
virtual void adjustProgressBarStyle(StyleResolver&, RenderStyle&, Element*) const override;
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2015-08-08 03:06:52 UTC (rev 188183)
@@ -1285,7 +1285,7 @@
}
}
-bool RenderThemeMac::paintMenuListButtonDecorations(const RenderObject& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
+bool RenderThemeMac::paintMenuListButtonDecorations(const RenderBox& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
{
IntRect bounds = IntRect(rect.x() + renderer.style().borderLeftWidth(),
rect.y() + renderer.style().borderTopWidth(),
Modified: trunk/Source/WebCore/rendering/RenderThemeWin.cpp (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeWin.cpp 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.cpp 2015-08-08 03:06:52 UTC (rev 188183)
@@ -747,7 +747,7 @@
drawControl(paintInfo.context, renderer, theme, ThemeData(part, determineState(renderer)), IntRect(rect));
- return paintMenuListButtonDecorations(renderer, paintInfo, FloatRect(rect));
+ return paintMenuListButtonDecorations(downcast<RenderBox>(renderer), paintInfo, FloatRect(rect));
}
void RenderThemeWin::adjustMenuListStyle(StyleResolver& styleResolver, RenderStyle& style, Element* e) const
@@ -787,7 +787,7 @@
style.setWhiteSpace(PRE);
}
-bool RenderThemeWin::paintMenuListButtonDecorations(const RenderObject& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
+bool RenderThemeWin::paintMenuListButtonDecorations(const RenderBox& renderer, const PaintInfo& paintInfo, const FloatRect& rect)
{
// FIXME: Don't make hardcoded assumptions about the thickness of the textfield border.
int borderThickness = haveTheme ? 1 : 2;
Modified: trunk/Source/WebCore/rendering/RenderThemeWin.h (188182 => 188183)
--- trunk/Source/WebCore/rendering/RenderThemeWin.h 2015-08-08 02:14:43 UTC (rev 188182)
+++ trunk/Source/WebCore/rendering/RenderThemeWin.h 2015-08-08 03:06:52 UTC (rev 188183)
@@ -87,7 +87,7 @@
virtual bool paintMenuList(const RenderObject&, const PaintInfo&, const FloatRect&) override;
virtual void adjustMenuListButtonStyle(StyleResolver&, RenderStyle&, Element*) const override;
- virtual bool paintMenuListButtonDecorations(const RenderObject&, const PaintInfo&, const FloatRect&) override;
+ virtual bool paintMenuListButtonDecorations(const RenderBox&, const PaintInfo&, const FloatRect&) override;
virtual bool paintSliderTrack(const RenderObject&, const PaintInfo&, const IntRect&) override;
virtual bool paintSliderThumb(const RenderObject&, const PaintInfo&, const IntRect&) override;