diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-09 12:15:52 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-09 12:16:06 +0100 |
commit | de4f791e30be4e4239b381c11745ffa4d87ddb8b (patch) | |
tree | 885e3a5d6670828b454cf676b4d42f78e28b1f0e /Source/WebCore/rendering | |
parent | b022df48697d40cdabdeafb2c29bb14fe489b6fe (diff) | |
download | qtwebkit-de4f791e30be4e4239b381c11745ffa4d87ddb8b.tar.gz |
Imported WebKit commit e2c32e2f53e02d388e70b9db88b91d8d9d28fc84 (http://svn.webkit.org/repository/webkit/trunk@133952)
Revert back to an older snapshot that should build on ARM
Diffstat (limited to 'Source/WebCore/rendering')
7 files changed, 22 insertions, 26 deletions
diff --git a/Source/WebCore/rendering/ExclusionPolygon.cpp b/Source/WebCore/rendering/ExclusionPolygon.cpp index 21beac1ec..efb6acddb 100644 --- a/Source/WebCore/rendering/ExclusionPolygon.cpp +++ b/Source/WebCore/rendering/ExclusionPolygon.cpp @@ -190,13 +190,13 @@ static inline bool getVertexIntersectionVertices(const EdgeIntersection& interse if ((intersection.type == VertexMinY && (thisEdge.vertex1().y() < thisEdge.vertex2().y())) || (intersection.type == VertexMaxY && (thisEdge.vertex1().y() > thisEdge.vertex2().y()))) { - prevVertex = polygon.vertexAt(thisEdge.previousEdge().vertexIndex1); + prevVertex = polygon.vertexAt(thisEdge.previousEdge().vertexIndex2); thisVertex = polygon.vertexAt(thisEdge.vertexIndex1); nextVertex = polygon.vertexAt(thisEdge.vertexIndex2); } else { prevVertex = polygon.vertexAt(thisEdge.vertexIndex1); thisVertex = polygon.vertexAt(thisEdge.vertexIndex2); - nextVertex = polygon.vertexAt(thisEdge.nextEdge().vertexIndex2); + nextVertex = polygon.vertexAt(thisEdge.nextEdge().vertexIndex1); } return true; @@ -219,7 +219,7 @@ static bool compareEdgeIntersectionX(const EdgeIntersection& intersection1, cons return (x1 == x2) ? intersection1.type < intersection2.type : x1 < x2; } -void ExclusionPolygon::computeXIntersections(float y, bool isMinY, Vector<ExclusionInterval>& result) const +void ExclusionPolygon::computeXIntersections(float y, Vector<ExclusionInterval>& result) const { Vector<ExclusionPolygon::EdgeInterval> overlappingEdges; m_edgeTree.allOverlaps(ExclusionPolygon::EdgeInterval(y, y, 0), overlappingEdges); @@ -265,19 +265,19 @@ void ExclusionPolygon::computeXIntersections(float y, bool isMinY, Vector<Exclus } if (evenOddCrossing) { - bool edgeCrossing = thisIntersection.type == Normal; - if (!edgeCrossing) { + bool edgeCrossing = false; + if (thisIntersection.type == Normal || !inside || index == intersections.size() - 1) + edgeCrossing = true; + else { FloatPoint prevVertex; FloatPoint thisVertex; FloatPoint nextVertex; if (getVertexIntersectionVertices(thisIntersection, prevVertex, thisVertex, nextVertex)) { - if (nextVertex.y() == y) - edgeCrossing = (isMinY) ? prevVertex.y() > y : prevVertex.y() < y; - else if (prevVertex.y() == y) - edgeCrossing = (isMinY) ? nextVertex.y() > y : nextVertex.y() < y; + if (prevVertex.y() == y) + edgeCrossing = (thisVertex.x() > prevVertex.x()) ? nextVertex.y() > y : nextVertex.y() < y; else - edgeCrossing = true; + edgeCrossing = (nextVertex.y() != y); } } if (edgeCrossing) @@ -331,8 +331,8 @@ void ExclusionPolygon::getExcludedIntervals(float logicalTop, float logicalHeigh float y2 = maxYForLogicalLine(logicalTop, logicalHeight); Vector<ExclusionInterval> y1XIntervals, y2XIntervals; - computeXIntersections(y1, true, y1XIntervals); - computeXIntersections(y2, false, y2XIntervals); + computeXIntersections(y1, y1XIntervals); + computeXIntersections(y2, y2XIntervals); Vector<ExclusionInterval> mergedIntervals; mergeExclusionIntervals(y1XIntervals, y2XIntervals, mergedIntervals); @@ -358,8 +358,8 @@ void ExclusionPolygon::getIncludedIntervals(float logicalTop, float logicalHeigh float y2 = maxYForLogicalLine(logicalTop, logicalHeight); Vector<ExclusionInterval> y1XIntervals, y2XIntervals; - computeXIntersections(y1, true, y1XIntervals); - computeXIntersections(y2, false, y2XIntervals); + computeXIntersections(y1, y1XIntervals); + computeXIntersections(y2, y2XIntervals); Vector<ExclusionInterval> commonIntervals; intersectExclusionIntervals(y1XIntervals, y2XIntervals, commonIntervals); diff --git a/Source/WebCore/rendering/ExclusionPolygon.h b/Source/WebCore/rendering/ExclusionPolygon.h index 647eb172e..ce7a23c0d 100644 --- a/Source/WebCore/rendering/ExclusionPolygon.h +++ b/Source/WebCore/rendering/ExclusionPolygon.h @@ -68,7 +68,7 @@ public: virtual void getIncludedIntervals(float logicalTop, float logicalHeight, SegmentList&) const OVERRIDE; private: - void computeXIntersections(float y, bool isMinY, Vector<ExclusionInterval>&) const; + void computeXIntersections(float y, Vector<ExclusionInterval>&) const; void computeEdgeIntersections(float minY, float maxY, Vector<ExclusionInterval>&) const; unsigned findNextEdgeVertexIndex(unsigned vertexIndex1, bool clockwise) const; @@ -102,7 +102,7 @@ struct ExclusionPolygonEdge { const ExclusionPolygonEdge& previousEdge() const { ASSERT(polygon && polygon->numberOfEdges() > 1); - return polygon->edgeAt((edgeIndex + polygon->numberOfEdges() - 1) % polygon->numberOfEdges()); + return polygon->edgeAt((edgeIndex + polygon->numberOfEdges() - 2) % polygon->numberOfEdges()); } const ExclusionPolygonEdge& nextEdge() const diff --git a/Source/WebCore/rendering/FixedTableLayout.cpp b/Source/WebCore/rendering/FixedTableLayout.cpp index e75764ac7..2a08ad6b5 100644 --- a/Source/WebCore/rendering/FixedTableLayout.cpp +++ b/Source/WebCore/rendering/FixedTableLayout.cpp @@ -199,7 +199,7 @@ void FixedTableLayout::computePreferredLogicalWidths(LayoutUnit& minWidth, Layou // In this example, the two inner tables should be as large as the outer table. // We can achieve this effect by making the maxwidth of fixed tables with percentage // widths be infinite. - if (m_table->style()->logicalWidth().isPercent() && maxWidth < tableMaxWidth) + if (m_table->document()->inQuirksMode() && m_table->style()->logicalWidth().isPercent() && maxWidth < tableMaxWidth) maxWidth = tableMaxWidth; } diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp index b5b456b3a..f026d02d6 100644 --- a/Source/WebCore/rendering/RenderLayerCompositor.cpp +++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp @@ -2590,9 +2590,7 @@ const FixedPositionViewportConstraints RenderLayerCompositor::computeFixedViewpo ASSERT(layer->isComposited()); FrameView* frameView = m_renderView->frameView(); - LayoutRect viewportRect = frameView->visibleContentRect(); - viewportRect.setLocation(toPoint(frameView->scrollOffsetForFixedPosition())); FixedPositionViewportConstraints constraints = FixedPositionViewportConstraints(); diff --git a/Source/WebCore/rendering/RenderTextControlMultiLine.cpp b/Source/WebCore/rendering/RenderTextControlMultiLine.cpp index f40994326..92d002829 100644 --- a/Source/WebCore/rendering/RenderTextControlMultiLine.cpp +++ b/Source/WebCore/rendering/RenderTextControlMultiLine.cpp @@ -59,7 +59,7 @@ float RenderTextControlMultiLine::getAvgCharWidth(AtomicString family) // Since Lucida Grande is the default font, we want this to match the width // of Courier New, the default font for textareas in IE, Firefox and Safari Win. // 1229 is the avgCharWidth value in the OS/2 table for Courier New. - if (family == "Lucida Grande") + if (family == AtomicString("Lucida Grande")) return scaleEmToUnits(1229); return RenderTextControl::getAvgCharWidth(family); diff --git a/Source/WebCore/rendering/RenderTextControlSingleLine.cpp b/Source/WebCore/rendering/RenderTextControlSingleLine.cpp index c7f075a4b..967fb2acc 100644 --- a/Source/WebCore/rendering/RenderTextControlSingleLine.cpp +++ b/Source/WebCore/rendering/RenderTextControlSingleLine.cpp @@ -283,7 +283,7 @@ float RenderTextControlSingleLine::getAvgCharWidth(AtomicString family) // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and // IE for some encodings (in IE, the default font is encoding specific). // 901 is the avgCharWidth value in the OS/2 table for MS Shell Dlg. - if (family == "Lucida Grande") + if (family == AtomicString("Lucida Grande")) return scaleEmToUnits(901); return RenderTextControl::getAvgCharWidth(family); @@ -304,7 +304,7 @@ LayoutUnit RenderTextControlSingleLine::preferredContentWidth(float charWidth) c // of MS Shell Dlg, the default font for textareas in Firefox, Safari Win and // IE for some encodings (in IE, the default font is encoding specific). // 4027 is the (xMax - xMin) value in the "head" font table for MS Shell Dlg. - if (family == "Lucida Grande") + if (family == AtomicString("Lucida Grande")) maxCharWidth = scaleEmToUnits(4027); else if (hasValidAvgCharWidth(family)) maxCharWidth = roundf(style()->font().primaryFont()->maxCharWidth()); diff --git a/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp b/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp index 7b420c835..6e9079535 100644 --- a/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp +++ b/Source/WebCore/rendering/RenderThemeChromiumCommon.cpp @@ -49,10 +49,8 @@ bool RenderThemeChromiumCommon::supportsDataListUI(const AtomicString& type) #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) bool RenderThemeChromiumCommon::supportsCalendarPicker(const AtomicString& type) { - // FIXME: We'd like to support datetime, and datetime-local too. - return type == InputTypeNames::date() - || type == InputTypeNames::month() - || type == InputTypeNames::week(); + // FIXME: We'd like to support datetime, datetime-local, month, and week too. + return type == InputTypeNames::date(); } #endif |