Diff
Modified: releases/WebKitGTK/webkit-2.8/Source/WTF/ChangeLog (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WTF/ChangeLog 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WTF/ChangeLog 2015-07-06 08:26:36 UTC (rev 186315)
@@ -1,3 +1,13 @@
+2015-05-19 Chris Dumez <[email protected]>
+
+ Mark static variables as const when possible
+ https://bugs.webkit.org/show_bug.cgi?id=145161
+
+ Reviewed by Andreas Kling.
+
+ * wtf/dtoa.cpp:
+ (WTF::pow5mult):
+
2015-03-03 Anders Carlsson <[email protected]>
Remove unused compression code
Modified: releases/WebKitGTK/webkit-2.8/Source/WTF/wtf/dtoa.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WTF/wtf/dtoa.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WTF/wtf/dtoa.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -367,7 +367,7 @@
static ALWAYS_INLINE void pow5mult(BigInt& b, int k)
{
- static int p05[3] = { 5, 25, 125 };
+ static const int p05[3] = { 5, 25, 125 };
if (int i = k & 3)
multadd(b, p05[i - 1], 0);
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-07-06 08:26:36 UTC (rev 186315)
@@ -1,3 +1,80 @@
+2015-05-19 Chris Dumez <[email protected]>
+
+ Mark static variables as const when possible
+ https://bugs.webkit.org/show_bug.cgi?id=145161
+
+ Reviewed by Andreas Kling.
+
+ * Modules/mediasession/WebMediaSessionManager.cpp:
+ * Modules/mediasource/SourceBuffer.cpp:
+ * Modules/webdatabase/SQLException.cpp:
+ * dom/DOMCoreException.cpp:
+ * inspector/NetworkResourcesData.cpp:
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::urlForLogging):
+ * page/AutoscrollController.cpp:
+ * page/Page.cpp:
+ * platform/RuntimeApplicationChecksIOS.mm:
+ (WebCore::applicationIsAdSheet):
+ (WebCore::applicationIsMobileMail):
+ (WebCore::applicationIsMobileSafari):
+ (WebCore::applicationIsDumpRenderTree):
+ (WebCore::applicationIsWebApp):
+ (WebCore::applicationIsOkCupid):
+ (WebCore::applicationIsFacebook):
+ (WebCore::applicationIsEpicurious):
+ (WebCore::applicationIsDaijisenDictionary):
+ (WebCore::applicationIsNASAHD):
+ (WebCore::applicationIsMASH):
+ (WebCore::applicationIsTheEconomistOnIPhone):
+ (WebCore::applicationIsWebProcess):
+ (WebCore::applicationIsIBooksOnIOS):
+ * platform/audio/HRTFElevation.cpp:
+ * platform/audio/mac/AudioHardwareListenerMac.cpp:
+ (WebCore::processIsRunningPropertyDescriptor):
+ (WebCore::outputDevicePropertyDescriptor):
+ * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ * platform/graphics/mac/FontCacheMac.mm:
+ (WebCore::toCoreTextFontWeight):
+ (WebCore::toAppKitFontWeight):
+ (WebCore::toNSFontWeight):
+ * platform/mac/ScrollAnimatorMac.mm:
+ (supportsUIStateTransitionProgress):
+ (supportsExpansionTransitionProgress):
+ (supportsContentAreaScrolledInDirection):
+ * platform/mac/ScrollbarThemeMac.mm:
+ * platform/mac/WebCoreNSURLExtras.mm:
+ (WebCore::dataForURLComponentType):
+ * platform/mock/ScrollbarThemeMock.cpp:
+ * platform/text/icu/UTextProviderLatin1.cpp:
+ * platform/text/ios/LocalizedDateCache.mm:
+ (WebCore::LocalizedDateCache::calculateMaximumWidth):
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::matchedEndLine):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
+ * rendering/RenderFrameBase.cpp:
+ (WebCore::shouldExpandFrame):
+ * rendering/RenderTableSection.cpp:
+ * rendering/RenderThemeIOS.mm:
+ (WebCore::getInsetGradient):
+ (WebCore::getShineGradient):
+ (WebCore::getShadeGradient):
+ (WebCore::getConvexGradient):
+ (WebCore::getConcaveGradient):
+ (WebCore::getSliderTrackGradient):
+ (WebCore::getReadonlySliderTrackGradient):
+ (WebCore::getSliderThumbOpaquePressedGradient):
+ (WebCore::RenderThemeIOS::paintCheckboxDecorations):
+ (WebCore::RenderThemeIOS::paintRadioDecorations):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::toFontWeight):
+ (WebCore::TopGradientInterpolate):
+ (WebCore::BottomGradientInterpolate):
+ (WebCore::MainGradientInterpolate):
+ (WebCore::TrackGradientInterpolate):
+
2015-05-17 Alexey Proskuryakov <[email protected]>
Crash when uploading huge files to YouTube or Google Drive
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/Modules/mediasource/SourceBuffer.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -62,7 +62,7 @@
namespace WebCore {
-static double ExponentialMovingAverageCoefficient = 0.1;
+static const double ExponentialMovingAverageCoefficient = 0.1;
// Allow hasCurrentTime() to be off by as much as the length of a 24fps video frame
static const MediaTime& currentTimeFudgeFactor()
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/Modules/webdatabase/SQLException.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/Modules/webdatabase/SQLException.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/Modules/webdatabase/SQLException.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -33,7 +33,7 @@
namespace WebCore {
-static struct SQLExceptionNameDescription {
+static const struct SQLExceptionNameDescription {
const char* const name;
const char* const description;
} sqlExceptions[] = {
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/dom/DOMCoreException.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/dom/DOMCoreException.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/dom/DOMCoreException.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -33,7 +33,7 @@
namespace WebCore {
-static struct CoreException {
+static const struct CoreException {
const char* const name;
const char* const description;
} coreExceptions[] = {
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/inspector/NetworkResourcesData.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/inspector/NetworkResourcesData.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/inspector/NetworkResourcesData.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -37,10 +37,10 @@
namespace {
// 100MB
-static size_t maximumResourcesContentSize = 100 * 1000 * 1000;
+static const size_t maximumResourcesContentSize = 100 * 1000 * 1000;
// 10MB
-static size_t maximumSingleResourceContentSize = 10 * 1000 * 1000;
+static const size_t maximumSingleResourceContentSize = 10 * 1000 * 1000;
}
using namespace Inspector;
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/loader/icon/IconDatabase.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/loader/icon/IconDatabase.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/loader/icon/IconDatabase.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -79,7 +79,7 @@
#if !LOG_DISABLED || !ERROR_DISABLED
static String urlForLogging(const String& url)
{
- static unsigned urlTruncationLength = 120;
+ static const unsigned urlTruncationLength = 120;
if (url.length() < urlTruncationLength)
return url;
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/AutoscrollController.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/AutoscrollController.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/AutoscrollController.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -42,7 +42,7 @@
namespace WebCore {
// Delay time in second for start autoscroll if pointer is in border edge of scrollable element.
-static double autoscrollDelay = 0.2;
+static const double autoscrollDelay = 0.2;
// When the autoscroll or the panScroll is triggered when do the scroll every 0.05s to make it smooth
static const double autoscrollInterval = 0.05;
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/page/Page.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/page/Page.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/page/Page.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -385,7 +385,7 @@
Page::ViewMode type;
};
static const int viewModeMapSize = 5;
-static ViewModeInfo viewModeMap[viewModeMapSize] = {
+static const ViewModeInfo viewModeMap[viewModeMapSize] = {
{"windowed", Page::ViewModeWindowed},
{"floating", Page::ViewModeFloating},
{"fullscreen", Page::ViewModeFullscreen},
@@ -1418,8 +1418,8 @@
}
// These are magical constants that might be tweaked over time.
-static double gMinimumPaintedAreaRatio = 0.1;
-static double gMaximumUnpaintedAreaRatio = 0.04;
+static const double gMinimumPaintedAreaRatio = 0.1;
+static const double gMaximumUnpaintedAreaRatio = 0.04;
bool Page::isCountingRelevantRepaintedObjects() const
{
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/RuntimeApplicationChecksIOS.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/RuntimeApplicationChecksIOS.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/RuntimeApplicationChecksIOS.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -33,19 +33,19 @@
bool applicationIsAdSheet()
{
- static bool isAdSheet = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.AdSheetPhone"];
+ static const bool isAdSheet = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.AdSheetPhone"];
return isAdSheet;
}
bool applicationIsMobileMail()
{
- static bool isMobileMail = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mobilemail"];
+ static const bool isMobileMail = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mobilemail"];
return isMobileMail;
}
bool applicationIsMobileSafari()
{
- static bool isMobileSafari = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mobilesafari"];
+ static const bool isMobileSafari = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.mobilesafari"];
return isMobileSafari;
}
@@ -53,7 +53,7 @@
{
// We use a prefix match instead of strict equality since LayoutTestRelay may launch multiple instances of
// DumpRenderTree where the bundle identifier of each instance has a unique suffix.
- static bool isDumpRenderTree = [[[NSBundle mainBundle] bundleIdentifier] hasPrefix:@"org.webkit.DumpRenderTree"]; // e.g. org.webkit.DumpRenderTree0
+ static const bool isDumpRenderTree = [[[NSBundle mainBundle] bundleIdentifier] hasPrefix:@"org.webkit.DumpRenderTree"]; // e.g. org.webkit.DumpRenderTree0
return isDumpRenderTree;
}
@@ -65,43 +65,43 @@
bool applicationIsWebApp()
{
- static bool isWebApp = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.webapp"];
+ static const bool isWebApp = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.webapp"];
return isWebApp;
}
bool applicationIsOkCupid()
{
- static bool isOkCupid = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.okcupid.app"];
+ static const bool isOkCupid = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.okcupid.app"];
return isOkCupid;
}
bool applicationIsFacebook()
{
- static bool isFacebook = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.facebook.Facebook"];
+ static const bool isFacebook = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.facebook.Facebook"];
return isFacebook;
}
bool applicationIsEpicurious()
{
- static bool isEpicurious = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.condenet.Epicurious"];
+ static const bool isEpicurious = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.condenet.Epicurious"];
return isEpicurious;
}
bool applicationIsDaijisenDictionary()
{
- static bool isDaijisenDictionary = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"jp.co.shogakukan.daijisen2009i"];
+ static const bool isDaijisenDictionary = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"jp.co.shogakukan.daijisen2009i"];
return isDaijisenDictionary;
}
bool applicationIsNASAHD()
{
- static bool isNASAHD = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"gov.nasa.NASAHD"];
+ static const bool isNASAHD = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"gov.nasa.NASAHD"];
return isNASAHD;
}
bool applicationIsMASH()
{
- static bool isMASH = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.magnateinteractive.mashgame"]
+ static const bool isMASH = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.magnateinteractive.mashgame"]
|| [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.magnateinteractive.mashlitegame"]
|| [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.magnateinteractive.mashchristmas"]
|| [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.magnateinteractive.mashhalloween"]
@@ -111,20 +111,20 @@
bool applicationIsTheEconomistOnIPhone()
{
- static bool isTheEconomistOnIPhone = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.economist.iphone"];
+ static const bool isTheEconomistOnIPhone = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.economist.iphone"];
return isTheEconomistOnIPhone;
}
// FIXME: this needs to be changed when the WebProcess is changed to an XPC service.
bool applicationIsWebProcess()
{
- static bool isWebProcess = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent.Development"] || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent"] || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebProcess"];
+ static const bool isWebProcess = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent.Development"] || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebKit.WebContent"] || [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.WebProcess"];
return isWebProcess;
}
bool applicationIsIBooksOnIOS()
{
- static bool isIBooksOnIOS = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.iBooks"];
+ static const bool isIBooksOnIOS = [[[NSBundle mainBundle] bundleIdentifier] isEqualToString:@"com.apple.iBooks"];
return isIBooksOnIOS;
}
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/audio/HRTFElevation.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/audio/HRTFElevation.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/audio/HRTFElevation.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -207,7 +207,7 @@
// The range of elevations for the IRCAM impulse responses varies depending on azimuth, but the minimum elevation appears to always be -45.
//
// Here's how it goes:
-static int maxElevations[] = {
+static const int maxElevations[] = {
// Azimuth
//
90, // 0
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -89,25 +89,25 @@
static const AudioObjectPropertyAddress& processIsRunningPropertyDescriptor()
{
- static AudioObjectPropertyAddress processIsRunningProperty = {
+ static const AudioObjectPropertyAddress processIsRunningProperty = {
kAudioHardwarePropertyProcessIsRunning,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster
};
return processIsRunningProperty;
-};
+}
static const AudioObjectPropertyAddress& outputDevicePropertyDescriptor()
{
- static AudioObjectPropertyAddress outputDeviceProperty = {
+ static const AudioObjectPropertyAddress outputDeviceProperty = {
kAudioHardwarePropertyDefaultOutputDevice,
kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster
};
return outputDeviceProperty;
-};
+}
Ref<AudioHardwareListener> AudioHardwareListener::create(Client& client)
{
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -82,7 +82,7 @@
namespace WebCore {
-static double kRingBufferDuration = 1;
+static const double kRingBufferDuration = 1;
RefPtr<AudioSourceProviderAVFObjC> AudioSourceProviderAVFObjC::create(AVPlayerItem *item)
{
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -1856,13 +1856,13 @@
layer.setBorderWidth(borderColor.isValid() ? borderWidth : 0);
}
-static float contentsLayerBorderWidth = 4;
+static const float contentsLayerBorderWidth = 4;
static Color contentsLayerDebugBorderColor(bool showingBorders)
{
return showingBorders ? Color(0, 0, 128, 180) : Color();
}
-static float cloneLayerBorderWidth = 2;
+static const float cloneLayerBorderWidth = 2;
static Color cloneLayerDebugBorderColor(bool showingBorders)
{
return showingBorders ? Color(255, 122, 251) : Color();
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/ScrollAnimatorMac.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/ScrollAnimatorMac.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -46,19 +46,19 @@
static bool supportsUIStateTransitionProgress()
{
// FIXME: This is temporary until all platforms that support ScrollbarPainter support this part of the API.
- static bool globalSupportsUIStateTransitionProgress = [NSClassFromString(@"NSScrollerImp") instancesRespondToSelector:@selector(mouseEnteredScroller)];
+ static const bool globalSupportsUIStateTransitionProgress = [NSClassFromString(@"NSScrollerImp") instancesRespondToSelector:@selector(mouseEnteredScroller)];
return globalSupportsUIStateTransitionProgress;
}
static bool supportsExpansionTransitionProgress()
{
- static bool globalSupportsExpansionTransitionProgress = [NSClassFromString(@"NSScrollerImp") instancesRespondToSelector:@selector(expansionTransitionProgress)];
+ static const bool globalSupportsExpansionTransitionProgress = [NSClassFromString(@"NSScrollerImp") instancesRespondToSelector:@selector(expansionTransitionProgress)];
return globalSupportsExpansionTransitionProgress;
}
static bool supportsContentAreaScrolledInDirection()
{
- static bool globalSupportsContentAreaScrolledInDirection = [NSClassFromString(@"NSScrollerImpPair") instancesRespondToSelector:@selector(contentAreaScrolledInDirection:)];
+ static const bool globalSupportsContentAreaScrolledInDirection = [NSClassFromString(@"NSScrollerImpPair") instancesRespondToSelector:@selector(contentAreaScrolledInDirection:)];
return globalSupportsContentAreaScrolledInDirection;
}
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -119,13 +119,13 @@
}
// FIXME: Get these numbers from CoreUI.
-static int cRealButtonLength[] = { 28, 21 };
-static int cButtonHitInset[] = { 3, 2 };
+static const int cRealButtonLength[] = { 28, 21 };
+static const int cButtonHitInset[] = { 3, 2 };
// cRealButtonLength - cButtonInset
-static int cButtonLength[] = { 14, 10 };
+static const int cButtonLength[] = { 14, 10 };
-static int cOuterButtonLength[] = { 16, 14 }; // The outer button in a double button pair is a bit bigger.
-static int cOuterButtonOverlap = 2;
+static const int cOuterButtonLength[] = { 16, 14 }; // The outer button in a double button pair is a bit bigger.
+static const int cOuterButtonOverlap = 2;
static float gInitialButtonDelay = 0.5f;
static float gAutoscrollButtonDelay = 0.05f;
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -683,7 +683,7 @@
NSData *dataForURLComponentType(NSURL *URL, CFURLComponentType componentType)
{
- static int URLComponentTypeBufferLength = 2048;
+ static const int URLComponentTypeBufferLength = 2048;
UInt8 staticAllBytesBuffer[URLComponentTypeBufferLength];
UInt8 *allBytesBuffer = staticAllBytesBuffer;
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mock/ScrollbarThemeMock.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mock/ScrollbarThemeMock.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/mock/ScrollbarThemeMock.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -30,7 +30,7 @@
namespace WebCore {
-static int cScrollbarThickness[] = { 15, 11 };
+static const int cScrollbarThickness[] = { 15, 11 };
IntRect ScrollbarThemeMock::trackRect(ScrollbarThemeClient* scrollbar, bool)
{
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -41,7 +41,7 @@
static int32_t uTextLatin1MapNativeIndexToUTF16(const UText*, int64_t);
static void uTextLatin1Close(UText*);
-static struct UTextFuncs uTextLatin1Funcs = {
+static const struct UTextFuncs uTextLatin1Funcs = {
sizeof(UTextFuncs),
0,
0,
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/text/ios/LocalizedDateCache.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/text/ios/LocalizedDateCache.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/platform/text/ios/LocalizedDateCache.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -167,7 +167,7 @@
[components.get() setHour:22];
[components.get() setMinute:45];
- static NSUInteger numberOfGregorianMonths = [[dateFormatter monthSymbols] count];
+ static const NSUInteger numberOfGregorianMonths = [[dateFormatter monthSymbols] count];
ASSERT(numberOfGregorianMonths == 12);
// For each month (in the Gregorian Calendar), format a date and measure its length.
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderBlockLineLayout.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -1811,7 +1811,7 @@
// The first clean line doesn't match, but we can check a handful of following lines to try
// to match back up.
- static int numLines = 8; // The # of lines we're willing to match against.
+ static const int numLines = 8; // The # of lines we're willing to match against.
RootInlineBox* originalEndLine = layoutState.endLine();
RootInlineBox* line = originalEndLine;
for (int i = 0; i < numLines && line; i++, line = line->nextRootBox()) {
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderBoxModelObject.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -1708,7 +1708,7 @@
{
// willBeOverdrawn assumes that we draw in order: top, bottom, left, right.
// This is different from BoxSide enum order.
- static BoxSide paintOrder[] = { BSTop, BSBottom, BSLeft, BSRight };
+ static const BoxSide paintOrder[] = { BSTop, BSBottom, BSLeft, BSRight };
while (edgesToDraw) {
// Find undrawn edges sharing a color.
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderFrameBase.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderFrameBase.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderFrameBase.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -44,7 +44,7 @@
if (!width || !height)
return false;
// Really small fixed size frames can't be meant to be scrolled and are there probably by mistake. Avoid expanding.
- static unsigned smallestUsefullyScrollableDimension = 8;
+ static const unsigned smallestUsefullyScrollableDimension = 8;
if (hasFixedWidth && width < LayoutUnit(smallestUsefullyScrollableDimension))
return false;
if (hasFixedHeight && height < LayoutUnit(smallestUsefullyScrollableDimension))
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderTableSection.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderTableSection.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderTableSection.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -45,8 +45,8 @@
using namespace HTMLNames;
// Those 2 variables are used to balance the memory consumption vs the repaint time on big tables.
-static unsigned gMinTableSizeToUseFastPaintPathWithOverflowingCell = 75 * 75;
-static float gMaxAllowedOverflowingCellRatioForFastPaintPath = 0.1f;
+static const unsigned gMinTableSizeToUseFastPaintPathWithOverflowingCell = 75 * 75;
+static const float gMaxAllowedOverflowingCellRatioForFastPaintPath = 0.1f;
static inline void setRowLogicalHeightToRowStyleLogicalHeightIfNotRelative(RenderTableSection::RowStruct& row)
{
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderThemeIOS.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderThemeIOS.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderThemeIOS.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -373,9 +373,9 @@
if (isChecked(box)) {
drawAxialGradient(cgContext, gradientWithName(ConcaveGradient), clip.location(), FloatPoint(clip.x(), clip.maxY()), LinearInterpolation);
- static float thicknessRatio = 2 / 14.0;
- static CGSize size = { 14.0f, 14.0f };
- static CGPoint pathRatios[3] = {
+ static const float thicknessRatio = 2 / 14.0;
+ static const CGSize size = { 14.0f, 14.0f };
+ static const CGPoint pathRatios[3] = {
{ 2.5f / size.width, 7.5f / size.height },
{ 5.5f / size.width, 10.5f / size.height },
{ 11.5f / size.width, 2.5f / size.height }
@@ -461,7 +461,7 @@
// The inner circle is 6 / 14 the size of the surrounding circle,
// leaving 8 / 14 around it. (8 / 14) / 2 = 2 / 7.
- static float InnerInverseRatio = 2 / 7.0;
+ static const float InnerInverseRatio = 2 / 7.0;
clip.inflateX(-clip.width() * InnerInverseRatio);
clip.inflateY(-clip.height() * InnerInverseRatio);
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderThemeMac.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderThemeMac.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderThemeMac.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -319,7 +319,7 @@
else if (appKitFontWeight < 1)
appKitFontWeight = 1;
- static FontWeight fontWeights[] = {
+ static const FontWeight fontWeights[] = {
FontWeight100,
FontWeight100,
FontWeight200,
@@ -1141,8 +1141,8 @@
static void TopGradientInterpolate(void*, const CGFloat* inData, CGFloat* outData)
{
- static float dark[4] = { 1.0f, 1.0f, 1.0f, 0.4f };
- static float light[4] = { 1.0f, 1.0f, 1.0f, 0.15f };
+ static const float dark[4] = { 1.0f, 1.0f, 1.0f, 0.4f };
+ static const float light[4] = { 1.0f, 1.0f, 1.0f, 0.15f };
float a = inData[0];
int i = 0;
for (i = 0; i < 4; i++)
@@ -1151,8 +1151,8 @@
static void BottomGradientInterpolate(void*, const CGFloat* inData, CGFloat* outData)
{
- static float dark[4] = { 1.0f, 1.0f, 1.0f, 0.0f };
- static float light[4] = { 1.0f, 1.0f, 1.0f, 0.3f };
+ static const float dark[4] = { 1.0f, 1.0f, 1.0f, 0.0f };
+ static const float light[4] = { 1.0f, 1.0f, 1.0f, 0.3f };
float a = inData[0];
int i = 0;
for (i = 0; i < 4; i++)
@@ -1161,8 +1161,8 @@
static void MainGradientInterpolate(void*, const CGFloat* inData, CGFloat* outData)
{
- static float dark[4] = { 0.0f, 0.0f, 0.0f, 0.15f };
- static float light[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
+ static const float dark[4] = { 0.0f, 0.0f, 0.0f, 0.15f };
+ static const float light[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
float a = inData[0];
int i = 0;
for (i = 0; i < 4; i++)
@@ -1171,8 +1171,8 @@
static void TrackGradientInterpolate(void*, const CGFloat* inData, CGFloat* outData)
{
- static float dark[4] = { 0.0f, 0.0f, 0.0f, 0.678f };
- static float light[4] = { 0.0f, 0.0f, 0.0f, 0.13f };
+ static const float dark[4] = { 0.0f, 0.0f, 0.0f, 0.678f };
+ static const float light[4] = { 0.0f, 0.0f, 0.0f, 0.13f };
float a = inData[0];
int i = 0;
for (i = 0; i < 4; i++)
Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/ChangeLog 2015-07-06 08:26:36 UTC (rev 186315)
@@ -1,3 +1,22 @@
+2015-05-19 Chris Dumez <[email protected]>
+
+ Mark static variables as const when possible
+ https://bugs.webkit.org/show_bug.cgi?id=145161
+
+ Reviewed by Andreas Kling.
+
+ * Platform/IPC/MessageEncoder.cpp:
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::networkProcessLatencyQOS):
+ (WebKit::networkProcessThroughputQOS):
+ (WebKit::webProcessLatencyQOS):
+ (WebKit::webProcessThroughputQOS):
+ * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+ (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
+ (WebKit::pluginProcessLatencyQOS):
+ (WebKit::pluginProcessThroughputQOS):
+ * WebProcess/WebPage/WebPage.cpp:
+
2015-05-15 Carlos Garcia Campos <[email protected]>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.8.3 release.
Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/Platform/IPC/MessageEncoder.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/Platform/IPC/MessageEncoder.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/Platform/IPC/MessageEncoder.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -33,7 +33,7 @@
namespace IPC {
-static uint8_t defaultMessageFlags = 0;
+static const uint8_t defaultMessageFlags = 0;
#if HAVE(DTRACE)
MessageEncoder::MessageEncoder(StringReference messageReceiverName, StringReference messageName, uint64_t destinationID, const uuid_t& UUID)
Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -472,25 +472,25 @@
int networkProcessLatencyQOS()
{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessLatencyQOS"];
+ static const int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessLatencyQOS"];
return qos;
}
int networkProcessThroughputQOS()
{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessThroughputQOS"];
+ static const int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessThroughputQOS"];
return qos;
}
int webProcessLatencyQOS()
{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessLatencyQOS"];
+ static const int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessLatencyQOS"];
return qos;
}
int webProcessThroughputQOS()
{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessThroughputQOS"];
+ static const int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessThroughputQOS"];
return qos;
}
Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm 2015-07-06 08:26:36 UTC (rev 186315)
@@ -62,7 +62,7 @@
bool PluginProcessProxy::pluginNeedsExecutableHeap(const PluginModuleInfo& pluginInfo)
{
- static bool forceNonexecutableHeapForPlugins = [[NSUserDefaults standardUserDefaults] boolForKey:@"ForceNonexecutableHeapForPlugins"];
+ static const bool forceNonexecutableHeapForPlugins = [[NSUserDefaults standardUserDefaults] boolForKey:@"ForceNonexecutableHeapForPlugins"];
if (forceNonexecutableHeapForPlugins)
return false;
@@ -469,13 +469,13 @@
int pluginProcessLatencyQOS()
{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitPluginProcessLatencyQOS"];
+ static const int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitPluginProcessLatencyQOS"];
return qos;
}
int pluginProcessThroughputQOS()
{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitPluginProcessThroughputQOS"];
+ static const int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitPluginProcessThroughputQOS"];
return qos;
}
Modified: releases/WebKitGTK/webkit-2.8/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (186314 => 186315)
--- releases/WebKitGTK/webkit-2.8/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-07-06 08:17:41 UTC (rev 186314)
+++ releases/WebKitGTK/webkit-2.8/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2015-07-06 08:26:36 UTC (rev 186315)
@@ -4590,14 +4590,14 @@
}
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
-static int primarySnapshottedPlugInSearchLimit = 3000;
-static float primarySnapshottedPlugInSearchBucketSize = 1.1;
-static int primarySnapshottedPlugInMinimumWidth = 400;
-static int primarySnapshottedPlugInMinimumHeight = 300;
-static unsigned maxPrimarySnapshottedPlugInDetectionAttempts = 2;
-static int deferredPrimarySnapshottedPlugInDetectionDelay = 3;
-static float overlappingImageBoundsScale = 1.1;
-static float minimumOverlappingImageToPluginDimensionScale = .9;
+static const int primarySnapshottedPlugInSearchLimit = 3000;
+static const float primarySnapshottedPlugInSearchBucketSize = 1.1;
+static const int primarySnapshottedPlugInMinimumWidth = 400;
+static const int primarySnapshottedPlugInMinimumHeight = 300;
+static const unsigned maxPrimarySnapshottedPlugInDetectionAttempts = 2;
+static const int deferredPrimarySnapshottedPlugInDetectionDelay = 3;
+static const float overlappingImageBoundsScale = 1.1;
+static const float minimumOverlappingImageToPluginDimensionScale = .9;
#if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
void WebPage::determinePrimarySnapshottedPlugInTimerFired()