Diff
Modified: trunk/Source/WebCore/ChangeLog (197788 => 197789)
--- trunk/Source/WebCore/ChangeLog 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/ChangeLog 2016-03-08 20:11:36 UTC (rev 197789)
@@ -1,3 +1,71 @@
+2016-03-08 Anders Carlsson <[email protected]>
+
+ Ignore deprecation warnings.
+
+ * editing/cocoa/HTMLConverter.mm:
+ (HTMLConverter::computedAttributesForElement):
+ (HTMLConverter::_addMarkersToList):
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::EventHandler::keyEvent):
+ (WebCore::lastEventIsMouseUp):
+ (WebCore::EventHandler::passSubframeEventToSubframe):
+ (WebCore::EventHandler::passWheelEventToWidget):
+ (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
+ * page/mac/TextIndicatorWindow.mm:
+ (WebCore::TextIndicatorWindow::setTextIndicator):
+ * platform/graphics/mac/IconMac.mm:
+ (WebCore::Icon::paint):
+ * platform/mac/CursorMac.mm:
+ (WebCore::createCustomCursor):
+ * platform/mac/DragImageMac.mm:
+ (WebCore::dissolveDragImageToFraction):
+ (WebCore::createDragImageFromImage):
+ * platform/mac/EventLoopMac.mm:
+ (WebCore::EventLoop::cycle):
+ * platform/mac/PasteboardMac.mm:
+ (WebCore::Pasteboard::setDragImage):
+ * platform/mac/PlatformEventFactoryMac.mm:
+ (WebCore::globalPointForEvent):
+ (WebCore::pointForEvent):
+ (WebCore::mouseButtonForEvent):
+ (WebCore::mouseEventTypeForEvent):
+ (WebCore::clickCountForEvent):
+ (WebCore::textFromEvent):
+ (WebCore::unmodifiedTextFromEvent):
+ (WebCore::keyIdentifierForKeyEvent):
+ (WebCore::isKeypadEvent):
+ (WebCore::windowsKeyCodeForKeyEvent):
+ (WebCore::isKeyUpEvent):
+ (WebCore::modifiersForEvent):
+ (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
+ * platform/mac/ScrollbarThemeMac.mm:
+ (WebCore::scrollbarControlSizeToNSControlSize):
+ * platform/mac/ThemeMac.mm:
+ (-[WebCoreThemeView window]):
+ (WebCore::controlSizeForFont):
+ (WebCore::controlSizeFromPixelSize):
+ (WebCore::setUpButtonCell):
+ (WebCore::stepperControlSizeForFont):
+ (WebCore::paintStepper):
+ (WebCore::ThemeMac::minimumControlSize):
+ * platform/mac/WebVideoFullscreenHUDWindowController.mm:
+ (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
+ (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
+ (-[WebVideoFullscreenHUDWindowController init]):
+ (-[WebVideoFullscreenHUDWindowController keyDown:]):
+ (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
+ * platform/mac/WebWindowAnimation.mm:
+ (WebWindowAnimationDurationFromDuration):
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::updateCachedSystemFontDescription):
+ (WebCore::RenderThemeMac::controlSizeForFont):
+ (WebCore::RenderThemeMac::controlSizeForCell):
+ (WebCore::RenderThemeMac::controlSizeForSystemFont):
+ (WebCore::RenderThemeMac::paintProgressBar):
+ (WebCore::RenderThemeMac::popupMenuSize):
+ (WebCore::RenderThemeMac::sliderThumbHorizontal):
+ (WebCore::RenderThemeMac::sliderThumbVertical):
+
2016-03-08 Chris Dumez <[email protected]>
Unreviewed attempt to fix the 32bit build after r197782.
Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (197788 => 197789)
--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -1219,6 +1219,8 @@
String textAlign = _caches->propertyValueForNode(coreBlockElement, CSSPropertyTextAlign);
if (textAlign.length()) {
// WebKit can return -khtml-left, -khtml-right, -khtml-center
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (textAlign.endsWith("left"))
[paragraphStyle setAlignment:NSTextAlignmentLeft];
else if (textAlign.endsWith("right"))
@@ -1227,6 +1229,7 @@
[paragraphStyle setAlignment:NSTextAlignmentCenter];
else if (textAlign.endsWith("justify"))
[paragraphStyle setAlignment:NSTextAlignmentJustified];
+#pragma clang diagnostic pop
}
String direction = _caches->propertyValueForNode(coreBlockElement, CSSPropertyDirection);
@@ -2072,7 +2075,10 @@
#if PLATFORM(IOS)
tab = [[PlatformNSTextTab alloc] initWithTextAlignment:NSTextAlignmentNatural location:listLocation options:@{ }];
#else
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
tab = [[PlatformNSTextTab alloc] initWithTextAlignment:NSNaturalTextAlignment location:listLocation options:@{ }];
+#pragma clang diagnostic pop
#endif
[newStyle addTabStop:tab];
[tab release];
Modified: trunk/Source/WebCore/page/mac/EventHandlerMac.mm (197788 => 197789)
--- trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/page/mac/EventHandlerMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -145,7 +145,10 @@
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
ASSERT([event type] == NSKeyDown || [event type] == NSKeyUp);
+#pragma clang diagnostic pop
CurrentEventScope scope(event, nil);
return keyEvent(PlatformEventFactory::createPlatformKeyboardEvent(event));
@@ -198,9 +201,12 @@
BEGIN_BLOCK_OBJC_EXCEPTIONS;
NSEvent *currentEventAfterHandlingMouseDown = [NSApp currentEvent];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
return EventHandler::currentNSEvent() != currentEventAfterHandlingMouseDown
&& [currentEventAfterHandlingMouseDown type] == NSLeftMouseUp
&& [currentEventAfterHandlingMouseDown timestamp] >= [EventHandler::currentNSEvent() timestamp];
+#pragma clang diagnostic pop
END_BLOCK_OBJC_EXCEPTIONS;
return false;
@@ -364,6 +370,8 @@
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
switch ([currentNSEvent() type]) {
case NSLeftMouseDragged:
case NSOtherMouseDragged:
@@ -413,6 +421,7 @@
default:
return false;
}
+#pragma clang diagnostic pop
END_BLOCK_OBJC_EXCEPTIONS;
return false;
@@ -465,8 +474,11 @@
return downcast<FrameView>(widget).frame().eventHandler().handleWheelEvent(wheelEvent);
}
- if ([currentNSEvent() type] != NSScrollWheel || m_sendingEventToSubview)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ if ([currentNSEvent() type] != NSScrollWheel || m_sendingEventToSubview)
return false;
+#pragma clang diagnostic pop
ASSERT(nodeView);
ASSERT([nodeView superview]);
@@ -569,6 +581,8 @@
m_sendingEventToSubview = false;
int eventType = [initiatingEvent type];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (eventType == NSLeftMouseDown || eventType == NSKeyDown) {
NSEvent *fakeEvent = nil;
if (eventType == NSLeftMouseDown) {
@@ -596,11 +610,10 @@
keyCode:[initiatingEvent keyCode]];
[NSApp postEvent:fakeEvent atStart:YES];
}
+
// FIXME: We should really get the current modifierFlags here, but there's no way to poll
// them in Cocoa, and because the event stream was stolen by the Carbon menu code we have
// no up-to-date cache of them anywhere.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
fakeEvent = [NSEvent mouseEventWithType:NSMouseMoved
location:[[view->platformWidget() window] convertScreenToBase:[NSEvent mouseLocation]]
modifierFlags:[initiatingEvent modifierFlags]
Modified: trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm (197788 => 197789)
--- trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/page/mac/TextIndicatorWindow.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -457,11 +457,13 @@
verticalMargin = CGCeiling(verticalMargin);
CGRect contentRect = CGRectInset(textBoundingRectInScreenCoordinates, -horizontalMargin, -verticalMargin);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSRect windowContentRect = [NSWindow contentRectForFrameRect:NSRectFromCGRect(contentRect) styleMask:NSBorderlessWindowMask];
NSRect integralWindowContentRect = NSIntegralRect(windowContentRect);
NSPoint fractionalTextOffset = NSMakePoint(windowContentRect.origin.x - integralWindowContentRect.origin.x, windowContentRect.origin.y - integralWindowContentRect.origin.y);
m_textIndicatorWindow = adoptNS([[NSWindow alloc] initWithContentRect:integralWindowContentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]);
-
+#pragma clang diagnostic pop
[m_textIndicatorWindow setBackgroundColor:[NSColor clearColor]];
[m_textIndicatorWindow setOpaque:NO];
[m_textIndicatorWindow setIgnoresMouseEvents:YES];
Modified: trunk/Source/WebCore/platform/graphics/mac/IconMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/graphics/mac/IconMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/graphics/mac/IconMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -103,7 +103,10 @@
LocalCurrentGraphicsContext localCurrentGC(context);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[m_nsImage drawInRect:rect fromRect:NSMakeRect(0, 0, [m_nsImage size].width, [m_nsImage size].height) operation:NSCompositeSourceOver fraction:1.0f];
+#pragma clang diagnostic pop
}
}
Modified: trunk/Source/WebCore/platform/mac/CursorMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/CursorMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/CursorMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -64,7 +64,10 @@
NSRect fromRect = NSMakeRect(0, 0, image->width(), image->height());
[expandedImage lockFocus];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[nsImage drawInRect:toRect fromRect:fromRect operation:NSCompositeSourceOver fraction:1];
+#pragma clang diagnostic pop
[expandedImage unlockFocus];
return adoptNS([[NSCursor alloc] initWithImage:expandedImage.get() hotSpot:hotSpot]);
Modified: trunk/Source/WebCore/platform/mac/DragImageMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/DragImageMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/DragImageMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -75,7 +75,10 @@
RetainPtr<NSImage> dissolvedImage = adoptNS([[NSImage alloc] initWithSize:[image.get() size]]);
[dissolvedImage.get() lockFocus];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[image.get() drawAtPoint:NSZeroPoint fromRect:NSMakeRect(0, 0, [image size].width, [image size].height) operation:NSCompositeCopy fraction:delta];
+#pragma clang diagnostic pop
[dissolvedImage.get() unlockFocus];
return dissolvedImage;
@@ -116,7 +119,10 @@
[cocoaTransform.get() setTransformStruct:*(NSAffineTransformStruct*)&transform];
[cocoaTransform.get() concat];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[image->getNSImage() drawInRect:destRect fromRect:NSMakeRect(0, 0, size.width(), size.height()) operation:NSCompositeSourceOver fraction:1.0];
+#pragma clang diagnostic pop
[rotatedDragImage.get() unlockFocus];
return rotatedDragImage;
Modified: trunk/Source/WebCore/platform/mac/EventLoopMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/EventLoopMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/EventLoopMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -31,7 +31,10 @@
void EventLoop::cycle()
{
[NSApp setWindowsNeedUpdate:YES];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[NSApp sendEvent:[NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate dateWithTimeIntervalSinceNow:0.05] inMode:NSDefaultRunLoopMode dequeue:YES]];
+#pragma clang diagnostic pop
}
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/mac/PasteboardMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/PasteboardMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/PasteboardMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -642,8 +642,11 @@
// Hack: We must post an event to wake up the NSDragManager, which is sitting in a nextEvent call
// up the stack from us because the CoreFoundation drag manager does not use the run loop by itself.
// This is the most innocuous event to use, per Kristen Forster.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSEvent* event = [NSEvent mouseEventWithType:NSMouseMoved location:NSZeroPoint
modifierFlags:0 timestamp:0 windowNumber:0 context:nil eventNumber:0 clickCount:0 pressure:0];
+#pragma clang diagnostic pop
[NSApp postEvent:event atStart:YES];
}
#endif
Modified: trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/PlatformEventFactoryMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -52,6 +52,8 @@
#if defined(__LP64__) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
case NSEventTypePressure:
#endif
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSLeftMouseDown:
case NSLeftMouseDragged:
case NSLeftMouseUp:
@@ -65,6 +67,7 @@
case NSRightMouseDragged:
case NSRightMouseUp:
case NSScrollWheel:
+#pragma clang diagnostic pop
return globalPoint([event locationInWindow], [event window]);
default:
return IntPoint();
@@ -77,6 +80,8 @@
#if defined(__LP64__) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
case NSEventTypePressure:
#endif
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSLeftMouseDown:
case NSLeftMouseDragged:
case NSLeftMouseUp:
@@ -97,6 +102,7 @@
location = [windowView convertPoint:location fromView:nil];
return IntPoint(location);
}
+#pragma clang diagnostic pop
default:
return IntPoint();
}
@@ -108,6 +114,8 @@
#if defined(__LP64__) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101003
case NSEventTypePressure:
#endif
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSLeftMouseDragged:
@@ -120,6 +128,7 @@
case NSOtherMouseUp:
case NSOtherMouseDragged:
return MiddleButton;
+#pragma clang diagnostic pop
default:
return NoButton;
}
@@ -128,6 +137,8 @@
static PlatformEvent::Type mouseEventTypeForEvent(NSEvent* event)
{
switch ([event type]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSLeftMouseDragged:
case NSMouseEntered:
case NSMouseExited:
@@ -143,6 +154,7 @@
case NSRightMouseUp:
case NSOtherMouseUp:
return PlatformEvent::MouseReleased;
+#pragma clang diagnostic pop
default:
return PlatformEvent::MouseMoved;
}
@@ -151,6 +163,8 @@
static int clickCountForEvent(NSEvent *event)
{
switch ([event type]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSLeftMouseDown:
case NSLeftMouseUp:
case NSLeftMouseDragged:
@@ -160,6 +174,7 @@
case NSOtherMouseDown:
case NSOtherMouseUp:
case NSOtherMouseDragged:
+#pragma clang diagnostic pop
return [event clickCount];
default:
return 0;
@@ -205,21 +220,30 @@
static inline String textFromEvent(NSEvent* event)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([event type] == NSFlagsChanged)
+#pragma clang diagnostic pop
return emptyString();
return String([event characters]);
}
static inline String unmodifiedTextFromEvent(NSEvent* event)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([event type] == NSFlagsChanged)
+#pragma clang diagnostic pop
return emptyString();
return String([event charactersIgnoringModifiers]);
}
String keyIdentifierForKeyEvent(NSEvent* event)
{
- if ([event type] == NSFlagsChanged)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ if ([event type] == NSFlagsChanged)
+#pragma clang diagnostic pop
switch ([event keyCode]) {
case 54: // Right Command
case 55: // Left Command
@@ -257,15 +281,21 @@
{
// Check that this is the type of event that has a keyCode.
switch ([event type]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
break;
+#pragma clang diagnostic pop
default:
return false;
}
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([event modifierFlags] & NSNumericPadKeyMask)
+#pragma clang diagnostic pop
return true;
switch ([event keyCode]) {
@@ -302,7 +332,10 @@
// 2. Keys for which there is no known Mac virtual key codes, like PrintScreen.
// 3. Certain punctuation keys. On Windows, these are also remapped depending on current keyboard layout,
// but see comment in windowsKeyCodeForCharCode().
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (!isKeypadEvent(event) && ([event type] == NSKeyDown || [event type] == NSKeyUp)) {
+#pragma clang diagnostic pop
// Cmd switches Roman letters for Dvorak-QWERTY layout, so try modified characters first.
NSString* s = [event characters];
code = [s length] > 0 ? windowsKeyCodeForCharCode([s characterAtIndex:0]) : 0;
@@ -360,6 +393,8 @@
static inline bool isKeyUpEvent(NSEvent *event)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if ([event type] != NSFlagsChanged)
return [event type] == NSKeyUp;
// FIXME: This logic fails if the user presses both Shift keys at once, for example:
@@ -386,12 +421,15 @@
case 63: // Function
return ([event modifierFlags] & NSFunctionKeyMask) == 0;
+#pragma clang diagnostic pop
}
return false;
}
static inline PlatformEvent::Modifiers modifiersForEvent(NSEvent *event)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
unsigned modifiers = 0;
if ([event modifierFlags] & NSShiftKeyMask)
modifiers |= PlatformEvent::ShiftKey;
@@ -401,6 +439,7 @@
modifiers |= PlatformEvent::AltKey;
if ([event modifierFlags] & NSCommandKeyMask)
modifiers |= PlatformEvent::MetaKey;
+#pragma clang diagnostic pop
return (PlatformEvent::Modifiers)modifiers;
}
@@ -525,7 +564,10 @@
m_windowsVirtualKeyCode = windowsKeyCodeForKeyEvent(event);
m_nativeVirtualKeyCode = [event keyCode];
m_macCharCode = wkGetNSEventKeyChar(event);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
m_autoRepeat = ([event type] != NSFlagsChanged) && [event isARepeat];
+#pragma clang diagnostic pop
m_isKeypad = isKeypadEvent(event);
m_isSystemKey = false; // SystemKey is always false on the Mac.
Modified: trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -138,6 +138,8 @@
static NSControlSize scrollbarControlSizeToNSControlSize(ScrollbarControlSize controlSize)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
switch (controlSize) {
case RegularScrollbar:
return NSRegularControlSize;
@@ -147,6 +149,7 @@
ASSERT_NOT_REACHED();
return NSRegularControlSize;
+#pragma clang diagnostic pop
}
void ScrollbarThemeMac::registerScrollbar(Scrollbar& scrollbar)
Modified: trunk/Source/WebCore/platform/mac/ThemeMac.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/ThemeMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/ThemeMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -67,8 +67,11 @@
{
// Using defer:YES prevents us from wasting any window server resources for this window, since we're not actually
// going to draw into it. The other arguments match what you get when calling -[NSWindow init].
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
static WebCoreThemeWindow *window = [[WebCoreThemeWindow alloc] initWithContentRect:NSMakeRect(100, 100, 100, 100)
styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:YES];
+#pragma clang diagnostic pop
return window;
}
@@ -141,12 +144,15 @@
static NSControlSize controlSizeForFont(const FontCascade& font)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
int fontSize = font.pixelSize();
if (fontSize >= 16)
return NSRegularControlSize;
if (fontSize >= 11)
return NSSmallControlSize;
return NSMiniControlSize;
+#pragma clang diagnostic pop
}
static LengthSize sizeFromNSControlSize(NSControlSize nsControlSize, const LengthSize& zoomedSize, float zoomFactor, const std::array<IntSize, 3>& sizes)
@@ -169,6 +175,8 @@
static ControlSize controlSizeFromPixelSize(const std::array<IntSize, 3>& sizes, const IntSize& minZoomedSize, float zoomFactor)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (minZoomedSize.width() >= static_cast<int>(sizes[NSRegularControlSize].width() * zoomFactor) &&
minZoomedSize.height() >= static_cast<int>(sizes[NSRegularControlSize].height() * zoomFactor))
return NSRegularControlSize;
@@ -176,6 +184,7 @@
minZoomedSize.height() >= static_cast<int>(sizes[NSSmallControlSize].height() * zoomFactor))
return NSSmallControlSize;
return NSMiniControlSize;
+#pragma clang diagnostic pop
}
static void setControlSize(NSCell* cell, const std::array<IntSize, 3>& sizes, const IntSize& minZoomedSize, float zoomFactor)
@@ -471,7 +480,10 @@
{
// Set the control size based off the rectangle we're painting into.
const std::array<IntSize, 3>& sizes = buttonSizes();
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (part == SquareButtonPart || zoomedSize.height() > buttonSizes()[NSRegularControlSize].height() * zoomFactor) {
+#pragma clang diagnostic pop
// Use the square button
if ([cell bezelStyle] != NSShadowlessSquareBezelStyle)
[cell setBezelStyle:NSShadowlessSquareBezelStyle];
@@ -567,12 +579,15 @@
// should be equal to or less than the corresponding text field height,
static NSControlSize stepperControlSizeForFont(const FontCascade& font)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
int fontSize = font.pixelSize();
if (fontSize >= 18)
return NSRegularControlSize;
if (fontSize >= 13)
return NSSmallControlSize;
return NSMiniControlSize;
+#pragma clang diagnostic pop
}
static void paintStepper(ControlStates& states, GraphicsContext& context, const FloatRect& zoomedRect, float zoomFactor, ScrollView*)
@@ -585,12 +600,15 @@
drawInfo.state = convertControlStatesToThemeDrawState(kThemeIncDecButton, states);
drawInfo.adornment = kThemeAdornmentDefault;
ControlSize controlSize = controlSizeFromPixelSize(stepperSizes(), IntSize(zoomedRect.size()), zoomFactor);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (controlSize == NSSmallControlSize)
drawInfo.kind = kThemeIncDecButtonSmall;
else if (controlSize == NSMiniControlSize)
drawInfo.kind = kThemeIncDecButtonMini;
else
drawInfo.kind = kThemeIncDecButton;
+#pragma clang diagnostic pop
IntRect rect(zoomedRect);
GraphicsContextStateSaver stateSaver(context);
@@ -731,9 +749,12 @@
case ButtonPart:
return LengthSize(Length(0, Fixed), Length(static_cast<int>(15 * zoomFactor), Fixed));
case InnerSpinButtonPart:{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
IntSize base = stepperSizes()[NSMiniControlSize];
return LengthSize(Length(static_cast<int>(base.width() * zoomFactor), Fixed),
Length(static_cast<int>(base.height() * zoomFactor), Fixed));
+#pragma clang diagnostic pop
}
default:
return Theme::minimumControlSize(part, font, zoomFactor);
Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -74,7 +74,10 @@
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
UNUSED_PARAM(aStyle);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:bufferingType defer:flag];
+#pragma clang diagnostic pop
if (!self)
return nil;
@@ -120,13 +123,15 @@
- (BOOL)performKeyEquivalent:(NSEvent *)event
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
// Block all command key events while the fullscreen window is up.
if ([event type] != NSKeyDown)
return NO;
if (!([event modifierFlags] & NSCommandKeyMask))
return NO;
-
+#pragma clang diagnostic pop
return YES;
}
@@ -141,8 +146,11 @@
- (id)init
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSWindow *window = [[WebVideoFullscreenHUDWindow alloc] initWithContentRect:NSMakeRect(0, 0, windowWidth, windowHeight)
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
+#pragma clang diagnostic pop
self = [super initWithWindow:window];
[window setDelegate:self];
[window release];
@@ -181,6 +189,8 @@
case ' ':
[self togglePlaying:nil];
return;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSUpArrowFunctionKey:
if ([event modifierFlags] & NSAlternateKeyMask)
[self setVolume:[self maxVolume]];
@@ -192,6 +202,7 @@
[self setVolume:0];
else
[self decrementVolume];
+#pragma clang diagnostic pop
return;
default:
break;
@@ -368,11 +379,17 @@
[contentView addSubview:_timeline];
_elapsedTimeText = createTimeTextField(NSMakeRect(timeTextFieldHorizontalMargin, timelineBottomMargin, timeTextFieldWidth, timeTextFieldHeight));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[_elapsedTimeText setAlignment:NSLeftTextAlignment];
+#pragma clang diagnostic pop
[contentView addSubview:_elapsedTimeText];
_remainingTimeText = createTimeTextField(NSMakeRect(windowWidth - timeTextFieldHorizontalMargin - timeTextFieldWidth, timelineBottomMargin, timeTextFieldWidth, timeTextFieldHeight));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[_remainingTimeText setAlignment:NSRightTextAlignment];
+#pragma clang diagnostic pop
[contentView addSubview:_remainingTimeText];
[window recalculateKeyViewLoop];
Modified: trunk/Source/WebCore/platform/mac/WebWindowAnimation.mm (197788 => 197789)
--- trunk/Source/WebCore/platform/mac/WebWindowAnimation.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/platform/mac/WebWindowAnimation.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -38,7 +38,10 @@
static NSTimeInterval WebWindowAnimationDurationFromDuration(NSTimeInterval duration)
{
- return ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) ? duration * slowMotionFactor : duration;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ return ([[NSApp currentEvent] modifierFlags] & NSShiftKeyMask) ? duration * slowMotionFactor : duration;
+#pragma clang diagnostic pop
}
static NSRect scaledRect(NSRect _initialFrame, NSRect _finalFrame, CGFloat factor)
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (197788 => 197789)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2016-03-08 19:33:10 UTC (rev 197788)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2016-03-08 20:11:36 UTC (rev 197789)
@@ -351,13 +351,22 @@
fontName = AtomicString("-apple-status-bar", AtomicString::ConstructFromLiteral);
break;
case CSSValueWebkitMiniControl:
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSMiniControlSize]];
+#pragma clang diagnostic pop
break;
case CSSValueWebkitSmallControl:
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]];
+#pragma clang diagnostic pop
break;
case CSSValueWebkitControl:
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
font = [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]];
+#pragma clang diagnostic pop
break;
default:
font = [NSFont systemFontOfSize:[NSFont systemFontSize]];
@@ -740,15 +749,20 @@
NSControlSize RenderThemeMac::controlSizeForFont(const RenderStyle& style) const
{
int fontSize = style.fontSize();
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (fontSize >= 16)
return NSRegularControlSize;
if (fontSize >= 11)
return NSSmallControlSize;
return NSMiniControlSize;
+#pragma clang diagnostic pop
}
NSControlSize RenderThemeMac::controlSizeForCell(NSCell*, const IntSize* sizes, const IntSize& minSize, float zoomLevel) const
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (minSize.width() >= static_cast<int>(sizes[NSRegularControlSize].width() * zoomLevel)
&& minSize.height() >= static_cast<int>(sizes[NSRegularControlSize].height() * zoomLevel))
return NSRegularControlSize;
@@ -758,6 +772,7 @@
return NSSmallControlSize;
return NSMiniControlSize;
+#pragma clang diagnostic pop
}
void RenderThemeMac::setControlSize(NSCell* cell, const IntSize* sizes, const IntSize& minSize, float zoomLevel)
@@ -814,12 +829,15 @@
NSControlSize RenderThemeMac::controlSizeForSystemFont(const RenderStyle& style) const
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
int fontSize = style.fontSize();
if (fontSize >= [NSFont systemFontSizeForControlSize:NSRegularControlSize])
return NSRegularControlSize;
if (fontSize >= [NSFont systemFontSizeForControlSize:NSSmallControlSize])
return NSSmallControlSize;
return NSMiniControlSize;
+#pragma clang diagnostic pop
}
bool RenderThemeMac::paintTextField(const RenderObject& o, const PaintInfo& paintInfo, const FloatRect& r)
@@ -1095,7 +1113,10 @@
const auto& renderProgress = downcast<RenderProgress>(renderObject);
HIThemeTrackDrawInfo trackInfo;
trackInfo.version = 0;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (controlSize == NSRegularControlSize)
+#pragma clang diagnostic pop
trackInfo.kind = renderProgress.position() < 0 ? kThemeLargeIndeterminateBar : kThemeLargeProgressBar;
else
trackInfo.kind = renderProgress.position() < 0 ? kThemeMediumIndeterminateBar : kThemeMediumProgressBar;
@@ -1388,12 +1409,15 @@
NSPopUpButtonCell* popupButton = this->popupButton();
NSControlSize size = controlSizeForCell(popupButton, popupButtonSizes(), rect.size(), style.effectiveZoom());
switch (size) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
case NSRegularControlSize:
return PopupMenuStyle::PopupMenuSizeNormal;
case NSSmallControlSize:
return PopupMenuStyle::PopupMenuSizeSmall;
case NSMiniControlSize:
return PopupMenuStyle::PopupMenuSizeMini;
+#pragma clang diagnostic pop
default:
return PopupMenuStyle::PopupMenuSizeNormal;
}
@@ -1975,9 +1999,12 @@
{
if (!m_sliderThumbHorizontal) {
m_sliderThumbHorizontal = adoptNS([[NSSliderCell alloc] init]);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[m_sliderThumbHorizontal.get() setSliderType:NSLinearSlider];
[m_sliderThumbHorizontal.get() setControlSize:NSSmallControlSize];
[m_sliderThumbHorizontal.get() setFocusRingType:NSFocusRingTypeExterior];
+#pragma clang diagnostic pop
}
return m_sliderThumbHorizontal.get();
@@ -1987,8 +2014,11 @@
{
if (!m_sliderThumbVertical) {
m_sliderThumbVertical = adoptNS([[NSSliderCell alloc] init]);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[m_sliderThumbVertical.get() setSliderType:NSLinearSlider];
[m_sliderThumbVertical.get() setControlSize:NSSmallControlSize];
+#pragma clang diagnostic pop
[m_sliderThumbVertical.get() setFocusRingType:NSFocusRingTypeExterior];
}