Diff
Modified: trunk/Source/WebCore/ChangeLog (205010 => 205011)
--- trunk/Source/WebCore/ChangeLog 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/ChangeLog 2016-08-26 13:29:31 UTC (rev 205011)
@@ -1,3 +1,34 @@
+2016-08-26 Per Arne Vollan <[email protected]>
+
+ [Win] Warning fixes.
+ https://bugs.webkit.org/show_bug.cgi?id=161077
+
+ Reviewed by Brent Fulgham.
+
+ * css/CSSGrammar.y.includes:
+ * css/RuleFeature.cpp:
+ (WebCore::makeAttributeSelectorKey):
+ * editing/TextIterator.cpp:
+ (WebCore::SearchBuffer::SearchBuffer):
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::textToFragment):
+ * html/MediaElementSession.h:
+ * platform/URL.cpp:
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ * platform/network/HTTPParsers.cpp:
+ (WebCore::parseHTTPHeader):
+ * rendering/InlineIterator.h:
+ (WebCore::InlineIterator::clear):
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::FlexBoxIterator::reset):
+ * rendering/RenderText.cpp:
+ (WebCore::RenderText::secureText):
+ * rendering/mathml/RenderMathMLToken.cpp:
+ (WebCore::mathVariant):
+ * style/InlineTextBoxStyle.cpp:
+ (WebCore::visualOverflowForDecorations):
+ * xml/XPathGrammar.y:
+
2016-08-26 Nael Ouedraogo <[email protected]>
Make custom constructors consistent with generated bindings code
Modified: trunk/Source/WebCore/css/CSSGrammar.y.includes (205010 => 205011)
--- trunk/Source/WebCore/css/CSSGrammar.y.includes 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/css/CSSGrammar.y.includes 2016-08-26 13:29:31 UTC (rev 205011)
@@ -45,6 +45,11 @@
using namespace WebCore;
using namespace HTMLNames;
+#if COMPILER(MSVC)
+// See https://msdn.microsoft.com/en-us/library/1wea5zwe.aspx
+#pragma warning(disable: 4701)
+#endif
+
#define YYMALLOC fastMalloc
#define YYFREE fastFree
Modified: trunk/Source/WebCore/css/RuleFeature.cpp (205010 => 205011)
--- trunk/Source/WebCore/css/RuleFeature.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/css/RuleFeature.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -87,7 +87,7 @@
static RuleFeatureSet::AttributeRules::SelectorKey makeAttributeSelectorKey(const CSSSelector& selector)
{
bool caseInsensitive = selector.attributeValueMatchingIsCaseInsensitive();
- unsigned matchAndCase = static_cast<unsigned>(selector.match()) << 1 | caseInsensitive;
+ unsigned matchAndCase = static_cast<unsigned>(selector.match()) << 1 | (caseInsensitive ? 1 : 0);
return std::make_pair(selector.attributeCanonicalLocalName().impl(), std::make_pair(selector.value().impl(), matchAndCase));
}
Modified: trunk/Source/WebCore/editing/TextIterator.cpp (205010 => 205011)
--- trunk/Source/WebCore/editing/TextIterator.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/editing/TextIterator.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -2004,7 +2004,7 @@
if ((m_options & AtWordStarts) && targetLength) {
UChar32 targetFirstCharacter;
- U16_GET(m_target, 0, 0, targetLength, targetFirstCharacter);
+ U16_GET(m_target, 0, 0u, targetLength, targetFirstCharacter);
// Characters in the separator category never really occur at the beginning of a word,
// so if the target begins with such a character, we just ignore the AtWordStart option.
if (isSeparator(targetFirstCharacter)) {
Modified: trunk/Source/WebCore/html/HTMLElement.cpp (205010 => 205011)
--- trunk/Source/WebCore/html/HTMLElement.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/html/HTMLElement.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -434,7 +434,7 @@
for (unsigned start = 0, length = text.length(); start < length; ) {
// Find next line break.
- UChar c;
+ UChar c = 0;
unsigned i;
for (i = start; i < length; i++) {
c = text[i];
Modified: trunk/Source/WebCore/html/MediaElementSession.h (205010 => 205011)
--- trunk/Source/WebCore/html/MediaElementSession.h 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/html/MediaElementSession.h 2016-08-26 13:29:31 UTC (rev 205011)
@@ -79,7 +79,7 @@
void mediaEngineUpdated(const HTMLMediaElement&);
// Restrictions to modify default behaviors.
- enum BehaviorRestrictionFlags {
+ enum BehaviorRestrictionFlags : unsigned {
NoRestrictions = 0,
RequireUserGestureForLoad = 1 << 0,
RequireUserGestureForVideoRateChange = 1 << 1,
Modified: trunk/Source/WebCore/platform/URL.cpp (205010 => 205011)
--- trunk/Source/WebCore/platform/URL.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/platform/URL.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -396,7 +396,7 @@
// Returns the index of the first index in string |s| of any of the characters
// in |toFind|. |toFind| should be a null-terminated string, all characters up
// to the null will be searched. Returns int if not found.
-const unsigned notFoundUnsigned = -1;
+const unsigned notFoundUnsigned = std::numeric_limits<unsigned>::max();
static unsigned findFirstOf(StringView string, unsigned startPosition, const char* target)
{
unsigned length = string.length();
Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (205010 => 205011)
--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -68,6 +68,11 @@
#include "PlatformCALayerWin.h"
#endif
+#if COMPILER(MSVC)
+// See https://msdn.microsoft.com/en-us/library/1wea5zwe.aspx
+#pragma warning(disable: 4701)
+#endif
+
namespace WebCore {
// The threshold width or height above which a tiled layer will be used. This should be
Modified: trunk/Source/WebCore/platform/network/HTTPParsers.cpp (205010 => 205011)
--- trunk/Source/WebCore/platform/network/HTTPParsers.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -670,7 +670,7 @@
Vector<char> value;
bool foundFirstNameChar = false;
- const char* namePtr;
+ const char* namePtr = nullptr;
size_t nameSize = 0;
nameStr = StringView();
Modified: trunk/Source/WebCore/rendering/InlineIterator.h (205010 => 205011)
--- trunk/Source/WebCore/rendering/InlineIterator.h 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/rendering/InlineIterator.h 2016-08-26 13:29:31 UTC (rev 205011)
@@ -68,7 +68,7 @@
{
setRenderer(nullptr);
setOffset(0);
- setNextBreakablePosition(-1);
+ setNextBreakablePosition(std::numeric_limits<unsigned>::max());
}
void moveToStartOf(RenderObject& object)
{
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (205010 => 205011)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -60,7 +60,7 @@
void reset()
{
m_currentChild = nullptr;
- m_ordinalIteration = -1;
+ m_ordinalIteration = std::numeric_limits<unsigned>::max();
}
RenderBox* first()
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (205010 => 205011)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -1201,7 +1201,7 @@
return;
UChar characterToReveal = 0;
- unsigned revealedCharactersOffset;
+ unsigned revealedCharactersOffset = 0;
if (SecureTextTimer* timer = secureTextTimers().get(this)) {
// We take the offset out of the timer to make this one-shot. We count on this being called only once.
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp (205010 => 205011)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -325,7 +325,7 @@
// The Unicode mathematical blocks are divided into four segments: Latin, Greek, numbers and Arabic.
// In the case of the first three baseChar represents the relative order in which the characters are encoded in the Unicode mathematical block, normalised to the first character of that sequence.
- UChar32 baseChar;
+ UChar32 baseChar = 0;
enum CharacterType {
Latin,
Greekish,
@@ -446,7 +446,7 @@
return baseChar + mathBoldUpperAlpha + multiplier * (mathItalicUpperAlpha - mathBoldUpperAlpha);
}
- UChar32 tempChar;
+ UChar32 tempChar = 0;
UChar32 newChar;
if (varType == Arabic) {
// The Arabic mathematical block is not continuous, nor does it have a monotonic mapping to the unencoded characters, requiring the use of a lookup table.
Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (205010 => 205011)
--- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2016-08-26 13:29:31 UTC (rev 205011)
@@ -113,9 +113,9 @@
return GlyphOverflow();
float strokeThickness = textDecorationStrokeThickness(lineStyle.fontSize());
- float controlPointDistance;
+ float controlPointDistance = 0;
float step;
- float wavyOffset;
+ float wavyOffset = 0;
TextDecorationStyle decorationStyle = lineStyle.textDecorationStyle();
float height = lineStyle.fontCascade().fontMetrics().floatHeight();
Modified: trunk/Source/WebCore/xml/XPathGrammar.y (205010 => 205011)
--- trunk/Source/WebCore/xml/XPathGrammar.y 2016-08-26 10:54:51 UTC (rev 205010)
+++ trunk/Source/WebCore/xml/XPathGrammar.y 2016-08-26 13:29:31 UTC (rev 205011)
@@ -34,6 +34,11 @@
#include "XPathPath.h"
#include "XPathVariableReference.h"
+#if COMPILER(MSVC)
+// See https://msdn.microsoft.com/en-us/library/1wea5zwe.aspx
+#pragma warning(disable: 4701)
+#endif
+
#define YYMALLOC fastMalloc
#define YYFREE fastFree