From 7c63216165a5f1a8f52d7d75cf24f2e77ee52076 Mon Sep 17 00:00:00 2001 From: "eric@webkit.org" Date: Fri, 29 Jun 2012 07:15:44 +0000 Subject: [PATCH] Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code https://bugs.webkit.org/show_bug.cgi?id=85846 Reviewed by Adam Barth. PLATFORM(MAC) has not supported Leopard for several months now. This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD uses in the PLATFORM(MAC) codepaths. PLATFORM(CHROMIUM) still supports BUILDING_ON_LEOPARD for now. Source/WebCore: * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::updateRangesAfterChildrenChanged): (WebCore::Document::nodeChildrenWillBeRemoved): (WebCore::Document::nodeWillBeRemoved): (WebCore::Document::textInserted): (WebCore::Document::textRemoved): (WebCore::Document::textNodesMerged): (WebCore::Document::textNodeSplit): * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): (WebCore::TypingCommand::typingAddedToOpenCommand): * editing/mac/EditorMac.mm: (WebCore::Editor::pasteWithPasteboard): * loader/EmptyClients.h: (EmptyEditorClient): * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): (WebCore): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded): * page/EditorClient.h: (EditorClient): * platform/LocalizedStrings.cpp: (WebCore::contextMenuItemTagSearchWeb): * platform/MemoryPressureHandler.cpp: (WebCore): * platform/SuddenTermination.h: (WebCore): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::updateContentsImage): (WebCore::GraphicsLayerCA::constrainedSize): * platform/graphics/ca/PlatformCALayer.h: (PlatformCALayer): * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: (fromCAValueFunctionType): (PlatformCAAnimation::valueFunction): (PlatformCAAnimation::setValueFunction): * platform/graphics/ca/mac/PlatformCALayerMac.mm: (toCAFilterType): (PlatformCALayer::anchorPoint): (PlatformCALayer::setAnchorPoint): (PlatformCALayer::contentsTransform): (PlatformCALayer::setContentsTransform): (PlatformCALayer::isGeometryFlipped): (PlatformCALayer::setGeometryFlipped): (PlatformCALayer::acceleratesDrawing): (PlatformCALayer::setAcceleratesDrawing): (PlatformCALayer::setMinificationFilter): (PlatformCALayer::setMagnificationFilter): (PlatformCALayer::contentsScale): (PlatformCALayer::setContentsScale): * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::setScale): (WebCore::TileCache::setAcceleratesDrawing): (WebCore::TileCache::createTileLayer): Source/WTF: * wtf/Platform.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121524 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WTF/ChangeLog | 14 +++++ Source/WTF/wtf/Platform.h | 21 +++---- Source/WebCore/ChangeLog | 72 ++++++++++++++++++++++ Source/WebCore/dom/Document.cpp | 27 +++----- Source/WebCore/editing/TypingCommand.cpp | 4 +- Source/WebCore/editing/mac/EditorMac.mm | 2 +- Source/WebCore/page/ContextMenuController.cpp | 26 ++------ Source/WebCore/platform/LocalizedStrings.cpp | 2 +- Source/WebCore/platform/MemoryPressureHandler.cpp | 2 +- Source/WebCore/platform/SuddenTermination.h | 2 +- .../platform/graphics/ca/GraphicsLayerCA.cpp | 4 +- .../WebCore/platform/graphics/ca/PlatformCALayer.h | 2 +- .../graphics/ca/mac/PlatformCAAnimationMac.mm | 12 ---- .../platform/graphics/ca/mac/PlatformCALayerMac.mm | 56 +++-------------- .../WebCore/platform/graphics/ca/mac/TileCache.mm | 8 +-- 15 files changed, 128 insertions(+), 126 deletions(-) diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog index d28e222..a921672 100644 --- a/Source/WTF/ChangeLog +++ b/Source/WTF/ChangeLog @@ -1,3 +1,17 @@ +2012-06-29 Eric Seidel + + Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code + https://bugs.webkit.org/show_bug.cgi?id=85846 + + Reviewed by Adam Barth. + + PLATFORM(MAC) has not supported Leopard for several months now. + This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD + uses in the PLATFORM(MAC) codepaths. PLATFORM(CHROMIUM) still + supports BUILDING_ON_LEOPARD for now. + + * wtf/Platform.h: + 2012-06-28 Kalev Lember ThreadingWin: Silence GCC compiler warnings diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 72e66f0..d8ba947 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -528,10 +528,10 @@ #endif #if PLATFORM(MAC) && !PLATFORM(IOS) -#if !defined(BUILDING_ON_LEOPARD) && CPU(X86_64) +#if CPU(X86_64) #define WTF_USE_PLUGIN_HOST_PROCESS 1 #endif -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) #define ENABLE_GESTURE_EVENTS 1 #define ENABLE_RUBBER_BANDING 1 #define WTF_USE_SCROLLBAR_PAINTER 1 @@ -554,7 +554,7 @@ #if defined(ENABLE_VIDEO) #define ENABLE_VIDEO_TRACK 1 #endif -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) +#if !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) #define HAVE_LAYER_HOSTING_IN_WINDOW_SERVER 1 #endif #define WTF_USE_APPKIT 1 @@ -995,13 +995,8 @@ #if PLATFORM(MAC) /* Complex text framework */ -#ifndef BUILDING_ON_LEOPARD #define WTF_USE_ATSUI 0 #define WTF_USE_CORE_TEXT 1 -#else -#define WTF_USE_ATSUI 1 -#define WTF_USE_CORE_TEXT 0 -#endif #endif /* Accelerated compositing */ @@ -1018,7 +1013,7 @@ #define WTF_USE_UI_SIDE_COMPOSITING 1 #endif -#if (PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD)) || PLATFORM(IOS) +#if PLATFORM(MAC) || PLATFORM(IOS) #define WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK 1 #endif @@ -1026,7 +1021,7 @@ #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1 #endif -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) #define ENABLE_THREADED_SCROLLING 1 #endif @@ -1088,11 +1083,11 @@ #define ENABLE_GC_VALIDATION 1 #endif -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) #define WTF_USE_AVFOUNDATION 1 #endif -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) && !defined(BUILDING_ON_LION) #define WTF_USE_COREMEDIA 1 #endif @@ -1104,7 +1099,7 @@ #define WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1 #endif -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) #define HAVE_INVERTED_WHEEL_EVENTS 1 #endif diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 82beeb9..8589ab2 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,75 @@ +2012-06-29 Eric Seidel + + Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code + https://bugs.webkit.org/show_bug.cgi?id=85846 + + Reviewed by Adam Barth. + + PLATFORM(MAC) has not supported Leopard for several months now. + This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD + uses in the PLATFORM(MAC) codepaths. PLATFORM(CHROMIUM) still + supports BUILDING_ON_LEOPARD for now. + + * WebCore.exp.in: + * dom/Document.cpp: + (WebCore::Document::updateRangesAfterChildrenChanged): + (WebCore::Document::nodeChildrenWillBeRemoved): + (WebCore::Document::nodeWillBeRemoved): + (WebCore::Document::textInserted): + (WebCore::Document::textRemoved): + (WebCore::Document::textNodesMerged): + (WebCore::Document::textNodeSplit): + * editing/Editor.cpp: + (WebCore::Editor::respondToChangedSelection): + * editing/TypingCommand.cpp: + (WebCore::TypingCommand::markMisspellingsAfterTyping): + (WebCore::TypingCommand::typingAddedToOpenCommand): + * editing/mac/EditorMac.mm: + (WebCore::Editor::pasteWithPasteboard): + * loader/EmptyClients.h: + (EmptyEditorClient): + * page/ContextMenuController.cpp: + (WebCore::ContextMenuController::contextMenuItemSelected): + (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu): + (WebCore): + (WebCore::ContextMenuController::populate): + (WebCore::ContextMenuController::checkOrEnableIfNeeded): + * page/EditorClient.h: + (EditorClient): + * platform/LocalizedStrings.cpp: + (WebCore::contextMenuItemTagSearchWeb): + * platform/MemoryPressureHandler.cpp: + (WebCore): + * platform/SuddenTermination.h: + (WebCore): + * platform/graphics/ca/GraphicsLayerCA.cpp: + (WebCore::GraphicsLayerCA::updateContentsImage): + (WebCore::GraphicsLayerCA::constrainedSize): + * platform/graphics/ca/PlatformCALayer.h: + (PlatformCALayer): + * platform/graphics/ca/mac/PlatformCAAnimationMac.mm: + (fromCAValueFunctionType): + (PlatformCAAnimation::valueFunction): + (PlatformCAAnimation::setValueFunction): + * platform/graphics/ca/mac/PlatformCALayerMac.mm: + (toCAFilterType): + (PlatformCALayer::anchorPoint): + (PlatformCALayer::setAnchorPoint): + (PlatformCALayer::contentsTransform): + (PlatformCALayer::setContentsTransform): + (PlatformCALayer::isGeometryFlipped): + (PlatformCALayer::setGeometryFlipped): + (PlatformCALayer::acceleratesDrawing): + (PlatformCALayer::setAcceleratesDrawing): + (PlatformCALayer::setMinificationFilter): + (PlatformCALayer::setMagnificationFilter): + (PlatformCALayer::contentsScale): + (PlatformCALayer::setContentsScale): + * platform/graphics/ca/mac/TileCache.mm: + (WebCore::TileCache::setScale): + (WebCore::TileCache::setAcceleratesDrawing): + (WebCore::TileCache::createTileLayer): + 2012-06-29 Kwang Yul Seo Use StringBuilder in SegmentedString::toString() diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index e921090..188fcac 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -342,19 +342,6 @@ static bool acceptsEditingFocus(Node* node) return frame->editor()->shouldBeginEditing(rangeOfContents(root).get()); } -static bool disableRangeMutation(Page* page) -{ - // This check is made on super-hot code paths, so we only want this on Leopard. -#ifdef TARGETING_LEOPARD - // Disable Range mutation on document modifications in Leopard Mail. - // See - return page && page->settings()->needsLeopardMailQuirks(); -#else - UNUSED_PARAM(page); - return false; -#endif -} - static bool canAccessAncestor(const SecurityOrigin* activeSecurityOrigin, Frame* targetFrame) { // targetFrame can be 0 when we're trying to navigate a top-level frame @@ -3909,7 +3896,7 @@ void Document::moveNodeIteratorsToNewDocument(Node* node, Document* newDocument) void Document::updateRangesAfterChildrenChanged(ContainerNode* container) { - if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) { + if (!m_ranges.isEmpty()) { HashSet::const_iterator end = m_ranges.end(); for (HashSet::const_iterator it = m_ranges.begin(); it != end; ++it) (*it)->nodeChildrenChanged(container); @@ -3918,7 +3905,7 @@ void Document::updateRangesAfterChildrenChanged(ContainerNode* container) void Document::nodeChildrenWillBeRemoved(ContainerNode* container) { - if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) { + if (!m_ranges.isEmpty()) { HashSet::const_iterator end = m_ranges.end(); for (HashSet::const_iterator it = m_ranges.begin(); it != end; ++it) (*it)->nodeChildrenWillBeRemoved(container); @@ -3945,7 +3932,7 @@ void Document::nodeWillBeRemoved(Node* n) for (HashSet::const_iterator it = m_nodeIterators.begin(); it != nodeIteratorsEnd; ++it) (*it)->nodeWillBeRemoved(n); - if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) { + if (!m_ranges.isEmpty()) { HashSet::const_iterator rangesEnd = m_ranges.end(); for (HashSet::const_iterator it = m_ranges.begin(); it != rangesEnd; ++it) (*it)->nodeWillBeRemoved(n); @@ -3960,7 +3947,7 @@ void Document::nodeWillBeRemoved(Node* n) void Document::textInserted(Node* text, unsigned offset, unsigned length) { - if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) { + if (!m_ranges.isEmpty()) { HashSet::const_iterator end = m_ranges.end(); for (HashSet::const_iterator it = m_ranges.begin(); it != end; ++it) (*it)->textInserted(text, offset, length); @@ -3972,7 +3959,7 @@ void Document::textInserted(Node* text, unsigned offset, unsigned length) void Document::textRemoved(Node* text, unsigned offset, unsigned length) { - if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) { + if (!m_ranges.isEmpty()) { HashSet::const_iterator end = m_ranges.end(); for (HashSet::const_iterator it = m_ranges.begin(); it != end; ++it) (*it)->textRemoved(text, offset, length); @@ -3985,7 +3972,7 @@ void Document::textRemoved(Node* text, unsigned offset, unsigned length) void Document::textNodesMerged(Text* oldNode, unsigned offset) { - if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) { + if (!m_ranges.isEmpty()) { NodeWithIndex oldNodeWithIndex(oldNode); HashSet::const_iterator end = m_ranges.end(); for (HashSet::const_iterator it = m_ranges.begin(); it != end; ++it) @@ -3997,7 +3984,7 @@ void Document::textNodesMerged(Text* oldNode, unsigned offset) void Document::textNodeSplit(Text* oldNode) { - if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) { + if (!m_ranges.isEmpty()) { HashSet::const_iterator end = m_ranges.end(); for (HashSet::const_iterator it = m_ranges.begin(); it != end; ++it) (*it)->textNodeSplit(oldNode); diff --git a/Source/WebCore/editing/TypingCommand.cpp b/Source/WebCore/editing/TypingCommand.cpp index f3c4232..2194736 100644 --- a/Source/WebCore/editing/TypingCommand.cpp +++ b/Source/WebCore/editing/TypingCommand.cpp @@ -297,7 +297,7 @@ void TypingCommand::markMisspellingsAfterTyping(ETypingCommand commandType) if (!frame) return; -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) +#if PLATFORM(MAC) if (!frame->editor()->isContinuousSpellCheckingEnabled() && !frame->editor()->isAutomaticQuoteSubstitutionEnabled() && !frame->editor()->isAutomaticLinkDetectionEnabled() @@ -336,7 +336,7 @@ void TypingCommand::typingAddedToOpenCommand(ETypingCommand commandTypeForAddedT updatePreservesTypingStyle(commandTypeForAddedTyping); -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) +#if PLATFORM(MAC) frame->editor()->appliedEditing(this); // Since the spellchecking code may also perform corrections and other replacements, it should happen after the typing changes. if (!m_shouldPreventSpellChecking) diff --git a/Source/WebCore/editing/mac/EditorMac.mm b/Source/WebCore/editing/mac/EditorMac.mm index d8aa5df..c42c623 100644 --- a/Source/WebCore/editing/mac/EditorMac.mm +++ b/Source/WebCore/editing/mac/EditorMac.mm @@ -81,7 +81,7 @@ void Editor::pasteWithPasteboard(Pasteboard* pasteboard, bool allowPlainText) bool choosePlainText; m_frame->editor()->client()->setInsertionPasteboard(NSGeneralPboard); -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) RefPtr fragment = pasteboard->documentFragment(m_frame, range, allowPlainText, choosePlainText); if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPasted)) pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), false); diff --git a/Source/WebCore/page/ContextMenuController.cpp b/Source/WebCore/page/ContextMenuController.cpp index 7cf2dbe..6e188fd 100644 --- a/Source/WebCore/page/ContextMenuController.cpp +++ b/Source/WebCore/page/ContextMenuController.cpp @@ -543,19 +543,19 @@ void ContextMenuController::createAndAppendSpellingAndGrammarSubMenu(ContextMenu contextMenuItemTagCheckSpellingWhileTyping()); ContextMenuItem grammarWithSpelling(CheckableActionType, ContextMenuItemTagCheckGrammarWithSpelling, contextMenuItemTagCheckGrammarWithSpelling()); -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) +#if PLATFORM(MAC) ContextMenuItem correctSpelling(CheckableActionType, ContextMenuItemTagCorrectSpellingAutomatically, contextMenuItemTagCorrectSpellingAutomatically()); #endif appendItem(showSpellingPanel, &spellingAndGrammarMenu); appendItem(checkSpelling, &spellingAndGrammarMenu); -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) +#if PLATFORM(MAC) appendItem(*separatorItem(), &spellingAndGrammarMenu); #endif appendItem(checkAsYouType, &spellingAndGrammarMenu); appendItem(grammarWithSpelling, &spellingAndGrammarMenu); -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) +#if PLATFORM(MAC) appendItem(correctSpelling, &spellingAndGrammarMenu); #endif @@ -648,7 +648,7 @@ void ContextMenuController::createAndAppendTextDirectionSubMenu(ContextMenuItem& #endif -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) +#if PLATFORM(MAC) void ContextMenuController::createAndAppendSubstitutionsSubMenu(ContextMenuItem& substitutionsMenuItem) { @@ -703,7 +703,7 @@ static bool selectionContainsPossibleWord(Frame* frame) } #if PLATFORM(MAC) -#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) +#if defined(BUILDING_ON_SNOW_LEOPARD) #define INCLUDE_SPOTLIGHT_CONTEXT_MENU_ITEM 1 #else #define INCLUDE_SPOTLIGHT_CONTEXT_MENU_ITEM 0 @@ -1015,7 +1015,7 @@ void ContextMenuController::populate() createAndAppendSpellingAndGrammarSubMenu(SpellingAndGrammarMenuItem); appendItem(SpellingAndGrammarMenuItem, m_contextMenu.get()); #endif -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) +#if PLATFORM(MAC) ContextMenuItem substitutionsMenuItem(SubmenuType, ContextMenuItemTagSubstitutionsMenu, contextMenuItemTagSubstitutionsMenu()); createAndAppendSubstitutionsSubMenu(substitutionsMenuItem); @@ -1230,13 +1230,11 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const case ContextMenuItemTagTransformationsMenu: break; case ContextMenuItemTagShowSubstitutions: -#ifndef BUILDING_ON_LEOPARD if (frame->editor()->substitutionsPanelIsShowing()) item.setTitle(contextMenuItemTagShowSubstitutions(false)); else item.setTitle(contextMenuItemTagShowSubstitutions(true)); shouldEnable = frame->editor()->canEdit(); -#endif break; case ContextMenuItemTagMakeUpperCase: case ContextMenuItemTagMakeLowerCase: @@ -1245,34 +1243,22 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const shouldEnable = frame->editor()->canEdit(); break; case ContextMenuItemTagCorrectSpellingAutomatically: -#ifndef BUILDING_ON_LEOPARD shouldCheck = frame->editor()->isAutomaticSpellingCorrectionEnabled(); -#endif break; case ContextMenuItemTagSmartCopyPaste: -#ifndef BUILDING_ON_LEOPARD shouldCheck = frame->editor()->smartInsertDeleteEnabled(); -#endif break; case ContextMenuItemTagSmartQuotes: -#ifndef BUILDING_ON_LEOPARD shouldCheck = frame->editor()->isAutomaticQuoteSubstitutionEnabled(); -#endif break; case ContextMenuItemTagSmartDashes: -#ifndef BUILDING_ON_LEOPARD shouldCheck = frame->editor()->isAutomaticDashSubstitutionEnabled(); -#endif break; case ContextMenuItemTagSmartLinks: -#ifndef BUILDING_ON_LEOPARD shouldCheck = frame->editor()->isAutomaticLinkDetectionEnabled(); -#endif break; case ContextMenuItemTagTextReplacement: -#ifndef BUILDING_ON_LEOPARD shouldCheck = frame->editor()->isAutomaticTextReplacementEnabled(); -#endif break; case ContextMenuItemTagStopSpeaking: shouldEnable = client() && client()->isSpeaking(); diff --git a/Source/WebCore/platform/LocalizedStrings.cpp b/Source/WebCore/platform/LocalizedStrings.cpp index b140f9c..9c4bdf3 100644 --- a/Source/WebCore/platform/LocalizedStrings.cpp +++ b/Source/WebCore/platform/LocalizedStrings.cpp @@ -244,7 +244,7 @@ String contextMenuItemTagSearchInSpotlight() String contextMenuItemTagSearchWeb() { -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) RetainPtr searchProviderName(AdoptCF, wkCopyDefaultSearchProviderDisplayName()); return formatLocalizedString(WEB_UI_STRING("Search with %@", "Search with search provider context menu item with provider name inserted"), searchProviderName.get()); #else diff --git a/Source/WebCore/platform/MemoryPressureHandler.cpp b/Source/WebCore/platform/MemoryPressureHandler.cpp index 982876d..15e6808 100644 --- a/Source/WebCore/platform/MemoryPressureHandler.cpp +++ b/Source/WebCore/platform/MemoryPressureHandler.cpp @@ -42,7 +42,7 @@ MemoryPressureHandler::MemoryPressureHandler() { } -#if !PLATFORM(MAC) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) || PLATFORM(IOS) +#if !PLATFORM(MAC) || defined(BUILDING_ON_SNOW_LEOPARD) || PLATFORM(IOS) void MemoryPressureHandler::install() { } void MemoryPressureHandler::uninstall() { } diff --git a/Source/WebCore/platform/SuddenTermination.h b/Source/WebCore/platform/SuddenTermination.h index 810fea7..b66ae1a 100644 --- a/Source/WebCore/platform/SuddenTermination.h +++ b/Source/WebCore/platform/SuddenTermination.h @@ -34,7 +34,7 @@ namespace WebCore { void disableSuddenTermination(); void enableSuddenTermination(); -#if (!PLATFORM(MAC) || defined(BUILDING_ON_LEOPARD)) && !PLATFORM(CHROMIUM) +#if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) inline void disableSuddenTermination() { } inline void enableSuddenTermination() { } #endif diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp index ee60b83..55d479b 100644 --- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp +++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp @@ -1517,9 +1517,7 @@ void GraphicsLayerCA::updateContentsImage() // FIXME: maybe only do trilinear if the image is being scaled down, // but then what if the layer size changes? -#ifndef BUILDING_ON_LEOPARD m_contentsLayer->setMinificationFilter(PlatformCALayer::Trilinear); -#endif m_contentsLayer->setContents(m_pendingContentsImage.get()); m_pendingContentsImage = 0; @@ -2392,7 +2390,7 @@ void GraphicsLayerCA::setDebugBorder(const Color& color, float borderWidth) FloatSize GraphicsLayerCA::constrainedSize() const { FloatSize constrainedSize = m_size; -#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) +#if defined(BUILDING_ON_SNOW_LEOPARD) float tileColumns = ceilf(m_size.width() / kTiledLayerTileSize); float tileRows = ceilf(m_size.height() / kTiledLayerTileSize); double numTiles = tileColumns * tileRows; diff --git a/Source/WebCore/platform/graphics/ca/PlatformCALayer.h b/Source/WebCore/platform/graphics/ca/PlatformCALayer.h index f7f2d52..002b7a0 100644 --- a/Source/WebCore/platform/graphics/ca/PlatformCALayer.h +++ b/Source/WebCore/platform/graphics/ca/PlatformCALayer.h @@ -213,7 +213,7 @@ public: void printTree() const; #endif -#if PLATFORM(MAC) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD) void synchronouslyDisplayTilesInRect(const FloatRect&); #endif diff --git a/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm b/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm index cd85669..c3679d7 100644 --- a/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm +++ b/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm @@ -36,8 +36,6 @@ #import #import -#define HAVE_MODERN_QUARTZCORE (!defined(BUILDING_ON_LEOPARD)) - using namespace WebCore; // This value must be the same as in PlatformCALayerMac.mm @@ -75,7 +73,6 @@ static PlatformCAAnimation::FillModeType fromCAFillModeType(NSString* string) return PlatformCAAnimation::Forwards; } -#if HAVE_MODERN_QUARTZCORE static NSString* toCAValueFunctionType(PlatformCAAnimation::ValueFunctionType type) { switch (type) { @@ -132,7 +129,6 @@ static PlatformCAAnimation::ValueFunctionType fromCAValueFunctionType(NSString* return PlatformCAAnimation::NoValueFunction; } -#endif static CAMediaTimingFunction* toCAMediaTimingFunction(const TimingFunction* timingFunction, bool reverse) { @@ -344,21 +340,13 @@ void PlatformCAAnimation::setAdditive(bool value) PlatformCAAnimation::ValueFunctionType PlatformCAAnimation::valueFunction() const { -#if HAVE_MODERN_QUARTZCORE CAValueFunction* vf = [m_animation.get() valueFunction]; return fromCAValueFunctionType([vf name]); -#else - return NoValueFunction; -#endif } void PlatformCAAnimation::setValueFunction(ValueFunctionType value) { -#if HAVE_MODERN_QUARTZCORE [m_animation.get() setValueFunction:[CAValueFunction functionWithName:toCAValueFunctionType(value)]]; -#else - UNUSED_PARAM(value); -#endif } void PlatformCAAnimation::setFromValue(float value) diff --git a/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm b/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm index 4c3623a..3a7ac78 100644 --- a/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm +++ b/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm @@ -44,8 +44,6 @@ #import #import -#define HAVE_MODERN_QUARTZCORE (!defined(BUILDING_ON_LEOPARD)) - using std::min; using std::max; @@ -95,7 +93,7 @@ static double mediaTimeToCurrentTime(CFTimeInterval t) @end -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) @interface CATiledLayer(GraphicsLayerCAPrivate) - (void)displayInRect:(CGRect)r levelOfDetail:(int)lod options:(NSDictionary *)dict; - (BOOL)canDrawConcurrently; @@ -105,7 +103,7 @@ static double mediaTimeToCurrentTime(CFTimeInterval t) @interface CALayer(Private) - (void)setContentsChanged; -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) - (void)setAcceleratesDrawing:(BOOL)flag; - (BOOL)acceleratesDrawing; #endif @@ -148,7 +146,6 @@ static NSDictionary* nullActionsDictionary() return actions; } -#if HAVE_MODERN_QUARTZCORE static NSString* toCAFilterType(PlatformCALayer::FilterType type) { switch (type) { @@ -158,7 +155,6 @@ static NSString* toCAFilterType(PlatformCALayer::FilterType type) default: return 0; } } -#endif PassRefPtr PlatformCALayer::create(LayerType layerType, PlatformCALayerClient* owner) { @@ -460,9 +456,7 @@ FloatPoint3D PlatformCALayer::anchorPoint() const { CGPoint point = [m_layer.get() anchorPoint]; float z = 0; -#if HAVE_MODERN_QUARTZCORE z = [m_layer.get() anchorPointZ]; -#endif return FloatPoint3D(point.x, point.y, z); } @@ -470,9 +464,7 @@ void PlatformCALayer::setAnchorPoint(const FloatPoint3D& value) { BEGIN_BLOCK_OBJC_EXCEPTIONS [m_layer.get() setAnchorPoint:CGPointMake(value.x(), value.y())]; -#if HAVE_MODERN_QUARTZCORE [m_layer.get() setAnchorPointZ:value.z()]; -#endif END_BLOCK_OBJC_EXCEPTIONS } @@ -502,28 +494,14 @@ void PlatformCALayer::setSublayerTransform(const TransformationMatrix& value) TransformationMatrix PlatformCALayer::contentsTransform() const { -#if !HAVE_MODERN_QUARTZCORE - if (m_layerType != LayerTypeWebLayer) - return TransformationMatrix(); - - return [static_cast(m_layer.get()) contentsTransform]; -#else + // FIXME: This function can be removed. return TransformationMatrix(); -#endif } void PlatformCALayer::setContentsTransform(const TransformationMatrix& value) { -#if !HAVE_MODERN_QUARTZCORE - if (m_layerType != LayerTypeWebLayer) - return; - - BEGIN_BLOCK_OBJC_EXCEPTIONS - [m_layer.get() setContentsTransform:value]; - END_BLOCK_OBJC_EXCEPTIONS -#else + // FIXME: This function can be removed. UNUSED_PARAM(value); -#endif } bool PlatformCALayer::isHidden() const @@ -540,22 +518,14 @@ void PlatformCALayer::setHidden(bool value) bool PlatformCALayer::isGeometryFlipped() const { -#if HAVE_MODERN_QUARTZCORE return [m_layer.get() isGeometryFlipped]; -#else - return false; -#endif } void PlatformCALayer::setGeometryFlipped(bool value) { -#if HAVE_MODERN_QUARTZCORE BEGIN_BLOCK_OBJC_EXCEPTIONS [m_layer.get() setGeometryFlipped:value]; END_BLOCK_OBJC_EXCEPTIONS -#else - UNUSED_PARAM(value); -#endif } bool PlatformCALayer::isDoubleSided() const @@ -584,7 +554,7 @@ void PlatformCALayer::setMasksToBounds(bool value) bool PlatformCALayer::acceleratesDrawing() const { -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) return [m_layer.get() acceleratesDrawing]; #else return false; @@ -593,7 +563,7 @@ bool PlatformCALayer::acceleratesDrawing() const void PlatformCALayer::setAcceleratesDrawing(bool acceleratesDrawing) { -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) BEGIN_BLOCK_OBJC_EXCEPTIONS [m_layer.get() setAcceleratesDrawing:acceleratesDrawing]; END_BLOCK_OBJC_EXCEPTIONS @@ -628,24 +598,16 @@ void PlatformCALayer::setContentsRect(const FloatRect& value) void PlatformCALayer::setMinificationFilter(FilterType value) { -#if HAVE_MODERN_QUARTZCORE BEGIN_BLOCK_OBJC_EXCEPTIONS [m_layer.get() setMinificationFilter:toCAFilterType(value)]; END_BLOCK_OBJC_EXCEPTIONS -#else - UNUSED_PARAM(value); -#endif } void PlatformCALayer::setMagnificationFilter(FilterType value) { -#if HAVE_MODERN_QUARTZCORE BEGIN_BLOCK_OBJC_EXCEPTIONS [m_layer.get() setMagnificationFilter:toCAFilterType(value)]; END_BLOCK_OBJC_EXCEPTIONS -#else - UNUSED_PARAM(value); -#endif } Color PlatformCALayer::backgroundColor() const @@ -948,7 +910,7 @@ void PlatformCALayer::setTimeOffset(CFTimeInterval value) float PlatformCALayer::contentsScale() const { -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) return [m_layer.get() contentsScale]; #else return 1; @@ -957,7 +919,7 @@ float PlatformCALayer::contentsScale() const void PlatformCALayer::setContentsScale(float value) { -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) BEGIN_BLOCK_OBJC_EXCEPTIONS [m_layer.get() setContentsScale:value]; END_BLOCK_OBJC_EXCEPTIONS @@ -975,7 +937,7 @@ TiledBacking* PlatformCALayer::tiledBacking() return [tileCacheLayer tiledBacking]; } -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) void PlatformCALayer::synchronouslyDisplayTilesInRect(const FloatRect& rect) { if (m_layerType != LayerTypeWebTiledLayer) diff --git a/Source/WebCore/platform/graphics/ca/mac/TileCache.mm b/Source/WebCore/platform/graphics/ca/mac/TileCache.mm index 666ea39..5502102 100644 --- a/Source/WebCore/platform/graphics/ca/mac/TileCache.mm +++ b/Source/WebCore/platform/graphics/ca/mac/TileCache.mm @@ -36,7 +36,7 @@ using namespace std; -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) @interface CALayer (WebCALayerDetails) - (void)setAcceleratesDrawing:(BOOL)flag; @end @@ -154,7 +154,7 @@ void TileCache::setScale(CGFloat scale) if (m_scale == scale && m_deviceScaleFactor == deviceScaleFactor) return; -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) Vector dirtyRects; m_deviceScaleFactor = deviceScaleFactor; @@ -179,7 +179,7 @@ void TileCache::setScale(CGFloat scale) void TileCache::setAcceleratesDrawing(bool acceleratesDrawing) { -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) if (m_acceleratesDrawing == acceleratesDrawing) return; @@ -395,7 +395,7 @@ RetainPtr TileCache::createTileLayer(const IntRect& tileRect) [layer.get() setEdgeAntialiasingMask:0]; [layer.get() setOpaque:YES]; -#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) +#if !defined(BUILDING_ON_SNOW_LEOPARD) [layer.get() setContentsScale:m_deviceScaleFactor]; [layer.get() setAcceleratesDrawing:m_acceleratesDrawing]; #endif -- 2.7.4