Diff
Modified: trunk/Source/WebCore/ChangeLog (185592 => 185593)
--- trunk/Source/WebCore/ChangeLog 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/ChangeLog 2015-06-16 17:45:12 UTC (rev 185593)
@@ -1,3 +1,36 @@
+2015-06-16 Alex Christensen <achristen...@webkit.org>
+
+ Remove some unused values.
+ https://bugs.webkit.org/show_bug.cgi?id=145997
+
+ Reviewed by Gyuyoung Kim.
+
+ This patch should have no change in behavior.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::computeBestScrollOffset):
+ (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
+ (WebCore::AccessibilityObject::scrollToGlobalPoint):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
+ * html/canvas/WebGL2RenderingContext.cpp:
+ (WebCore::WebGL2RenderingContext::validateTexFuncData):
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore::WebGLRenderingContext::validateTexFuncData):
+ * platform/graphics/StringTruncator.cpp:
+ (WebCore::leftTruncateToBuffer):
+ * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+ (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::localSelectionRect):
+ * rendering/RenderElement.cpp:
+ (WebCore::RenderElement::anchorRect):
+ * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
+ (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
+ * rendering/svg/SVGTextQuery.cpp:
+ (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
+ Remove unused values.
+
2015-06-16 Youenn Fablet <youenn.fab...@crf.canon.fr> and Xabier Rodriguez Calvar <calva...@igalia.com>
[Streams API] Calling controller.error() should trigger storing an undefined error
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (185592 => 185593)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -2321,10 +2321,8 @@
// Note that the return value represents the ideal new scroll offset.
// This may be out of range - the calling function should clip this
// to the available range.
-static int computeBestScrollOffset(int currentScrollOffset,
- int subfocusMin, int subfocusMax,
- int objectMin, int objectMax,
- int viewportMin, int viewportMax) {
+static int computeBestScrollOffset(int currentScrollOffset, int subfocusMin, int objectMin, int objectMax, int viewportMin, int viewportMax)
+{
int viewportSize = viewportMax - viewportMin;
// If the focus size is larger than the viewport size, shrink it in the
@@ -2332,12 +2330,8 @@
if (objectMax - objectMin > viewportSize) {
// Subfocus must be within focus:
subfocusMin = std::max(subfocusMin, objectMin);
- subfocusMax = std::min(subfocusMax, objectMax);
// Subfocus must be no larger than the viewport size; favor top/left.
- if (subfocusMax - subfocusMin > viewportSize)
- subfocusMax = subfocusMin + viewportSize;
-
if (subfocusMin + viewportSize > objectMax)
objectMin = objectMax - viewportSize;
else {
@@ -2424,12 +2418,12 @@
int desiredX = computeBestScrollOffset(
scrollPosition.x(),
- objectRect.x() + subfocus.x(), objectRect.x() + subfocus.maxX(),
+ objectRect.x() + subfocus.x(),
objectRect.x(), objectRect.maxX(),
0, scrollVisibleRect.width());
int desiredY = computeBestScrollOffset(
scrollPosition.y(),
- objectRect.y() + subfocus.y(), objectRect.y() + subfocus.maxY(),
+ objectRect.y() + subfocus.y(),
objectRect.y(), objectRect.maxY(),
0, scrollVisibleRect.height());
@@ -2476,13 +2470,13 @@
int desiredX = computeBestScrollOffset(
0,
+ objectRect.x(),
objectRect.x(), objectRect.maxX(),
- objectRect.x(), objectRect.maxX(),
point.x(), point.x());
int desiredY = computeBestScrollOffset(
0,
+ objectRect.y(),
objectRect.y(), objectRect.maxY(),
- objectRect.y(), objectRect.maxY(),
point.y(), point.y());
outer->scrollTo(IntPoint(desiredX, desiredY));
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (185592 => 185593)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2015-06-16 17:45:12 UTC (rev 185593)
@@ -3604,7 +3604,6 @@
NSRange range = {0, 0};
bool rangeSet = false;
NSRect rect = NSZeroRect;
- bool rectSet = false;
// basic parameter validation
if (!m_object || !attribute || !parameter)
@@ -3634,17 +3633,16 @@
else if ([parameter isKindOfClass:[NSDictionary self]])
dictionary = parameter;
- else if ([parameter isKindOfClass:[NSValue self]] && strcmp([(NSValue*)parameter objCType], @encode(NSPoint)) == 0) {
+ else if ([parameter isKindOfClass:[NSValue self]] && !strcmp([(NSValue*)parameter objCType], @encode(NSPoint))) {
pointSet = true;
point = [(NSValue*)parameter pointValue];
- } else if ([parameter isKindOfClass:[NSValue self]] && strcmp([(NSValue*)parameter objCType], @encode(NSRange)) == 0) {
+ } else if ([parameter isKindOfClass:[NSValue self]] && !strcmp([(NSValue*)parameter objCType], @encode(NSRange))) {
rangeSet = true;
range = [(NSValue*)parameter rangeValue];
- } else if ([parameter isKindOfClass:[NSValue self]] && strcmp([(NSValue*)parameter objCType], @encode(NSRect)) == 0) {
- rectSet = true;
+ } else if ([parameter isKindOfClass:[NSValue self]] && !strcmp([(NSValue*)parameter objCType], @encode(NSRect)))
rect = [(NSValue*)parameter rectValue];
- } else {
+ else {
// Attribute type is not supported. Allow super to handle.
return [super accessibilityAttributeValue:attribute forParameter:parameter];
}
Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (185592 => 185593)
--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -1969,7 +1969,7 @@
}
if (pixels->byteLength() < totalBytesRequired) {
if (m_unpackAlignment != 1) {
- error = m_context->computeImageSizeInBytes(format, type, width, height, 1, &totalBytesRequired, 0);
+ m_context->computeImageSizeInBytes(format, type, width, height, 1, &totalBytesRequired, 0);
if (pixels->byteLength() == totalBytesRequired) {
synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "ArrayBufferView not big enough for request with UNPACK_ALIGNMENT > 1");
return false;
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (185592 => 185593)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -901,7 +901,7 @@
}
if (pixels->byteLength() < totalBytesRequired) {
if (m_unpackAlignment != 1) {
- error = m_context->computeImageSizeInBytes(format, type, width, height, 1, &totalBytesRequired, 0);
+ m_context->computeImageSizeInBytes(format, type, width, height, 1, &totalBytesRequired, 0);
if (pixels->byteLength() == totalBytesRequired) {
synthesizeGLError(GraphicsContext3D::INVALID_OPERATION, functionName, "ArrayBufferView not big enough for request with UNPACK_ALIGNMENT > 1");
return false;
Modified: trunk/Source/WebCore/platform/graphics/StringTruncator.cpp (185592 => 185593)
--- trunk/Source/WebCore/platform/graphics/StringTruncator.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/platform/graphics/StringTruncator.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -172,7 +172,7 @@
NonSharedCharacterBreakIterator it(string);
unsigned adjustedStartIndex = startIndex;
- startIndex = boundedTextBreakFollowing(it, startIndex, length - startIndex);
+ boundedTextBreakFollowing(it, startIndex, length - startIndex);
// Strip single character after ellipsis character, when that character is preceded by a space
if (adjustedStartIndex < length && string[adjustedStartIndex] != space
Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm (185592 => 185593)
--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm 2015-06-16 17:45:12 UTC (rev 185593)
@@ -1191,7 +1191,6 @@
// Set up a QTVideoRenderer to use, but one that doesn't register for
// update callbacks. That way, it won't bother us asking to repaint.
createQTVideoRenderer(QTVideoRendererModeDefault);
- qtVideoRenderer = m_qtVideoRenderer.get();
}
paint(context, r);
}
Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (185592 => 185593)
--- trunk/Source/WebCore/rendering/InlineTextBox.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -271,8 +271,6 @@
String hyphenatedStringBuffer;
bool respectHyphen = ePos == m_len && hasHyphen();
TextRun textRun = constructTextRun(lineStyle, font, respectHyphen ? &hyphenatedStringBuffer : 0);
- if (respectHyphen)
- endPos = textRun.length();
LayoutRect selectionRect = LayoutRect(LayoutPoint(logicalLeft(), selectionTop), LayoutSize(m_logicalWidth, selectionHeight));
// Avoid computing the font width when the entire line box is selected as an optimization.
Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (185592 => 185593)
--- trunk/Source/WebCore/rendering/RenderElement.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -1719,17 +1719,8 @@
LayoutRect RenderElement::anchorRect() const
{
FloatPoint leading, trailing;
- bool foundLeading = getLeadingCorner(leading);
- bool foundTrailing = getTrailingCorner(trailing);
-
- // If we've found one corner, but not the other,
- // then we should just return a point at the corner that we did find.
- if (foundLeading != foundTrailing) {
- if (foundLeading)
- foundTrailing = foundLeading;
- else
- foundLeading = foundTrailing;
- }
+ getLeadingCorner(leading);
+ getTrailingCorner(trailing);
FloatPoint upperLeft = leading;
FloatPoint lowerRight = trailing;
Modified: trunk/Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp (185592 => 185593)
--- trunk/Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -179,7 +179,6 @@
bool measureText = positionType != NonWhitespace || !m_style.collapseWhitespace;
if (measureText) {
float textWidth = this->textWidth(currentPosition, nextPosition, xPosition);
- xPosition += textWidth;
width += textWidth;
} else if (startPosition < nextPosition)
width = m_style.spaceWidth;
Modified: trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp (185592 => 185593)
--- trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp 2015-06-16 17:36:08 UTC (rev 185592)
+++ trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp 2015-06-16 17:45:12 UTC (rev 185593)
@@ -213,15 +213,11 @@
return;
if (lastPositionOffset != -1 && lastPositionOffset - positionOffset > 1) {
- if (alterStartPosition && startPosition > lastPositionOffset && startPosition < static_cast<int>(positionOffset)) {
+ if (alterStartPosition && startPosition > lastPositionOffset && startPosition < static_cast<int>(positionOffset))
startPosition = lastPositionOffset;
- alterStartPosition = false;
- }
- if (alterEndPosition && endPosition > lastPositionOffset && endPosition < static_cast<int>(positionOffset)) {
+ if (alterEndPosition && endPosition > lastPositionOffset && endPosition < static_cast<int>(positionOffset))
endPosition = positionOffset;
- alterEndPosition = false;
- }
}
}