Commit 7c632161 authored by eric@webkit.org's avatar eric@webkit.org

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
parent 18b22b36
2012-06-29 Eric Seidel <eric@webkit.org>
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 <kalevlember@gmail.com>
ThreadingWin: Silence GCC compiler warnings
......
......@@ -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
......
2012-06-29 Eric Seidel <eric@webkit.org>
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 <skyul@company100.net>
Use StringBuilder in SegmentedString::toString()
......@@ -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 <rdar://problem/5865171>
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<Range*>::const_iterator end = m_ranges.end();
for (HashSet<Range*>::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<Range*>::const_iterator end = m_ranges.end();
for (HashSet<Range*>::const_iterator it = m_ranges.begin(); it != end; ++it)
(*it)->nodeChildrenWillBeRemoved(container);
......@@ -3945,7 +3932,7 @@ void Document::nodeWillBeRemoved(Node* n)
for (HashSet<NodeIterator*>::const_iterator it = m_nodeIterators.begin(); it != nodeIteratorsEnd; ++it)
(*it)->nodeWillBeRemoved(n);
if (!disableRangeMutation(page()) && !m_ranges.isEmpty()) {
if (!m_ranges.isEmpty()) {
HashSet<Range*>::const_iterator rangesEnd = m_ranges.end();
for (HashSet<Range*>::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<Range*>::const_iterator end = m_ranges.end();
for (HashSet<Range*>::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<Range*>::const_iterator end = m_ranges.end();
for (HashSet<Range*>::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<Range*>::const_iterator end = m_ranges.end();
for (HashSet<Range*>::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<Range*>::const_iterator end = m_ranges.end();
for (HashSet<Range*>::const_iterator it = m_ranges.begin(); it != end; ++it)
(*it)->textNodeSplit(oldNode);
......
......@@ -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)
......
......@@ -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<DocumentFragment> fragment = pasteboard->documentFragment(m_frame, range, allowPlainText, choosePlainText);
if (fragment && shouldInsertFragment(fragment, range, EditorInsertActionPasted))
pasteAsFragment(fragment, canSmartReplaceWithPasteboard(pasteboard), false);
......
......@@ -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();
......
......@@ -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<CFStringRef> searchProviderName(AdoptCF, wkCopyDefaultSearchProviderDisplayName());
return formatLocalizedString(WEB_UI_STRING("Search with %@", "Search with search provider context menu item with provider name inserted"), searchProviderName.get());
#else
......
......@@ -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() { }
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -36,8 +36,6 @@
#import <QuartzCore/QuartzCore.h>
#import <wtf/UnusedParam.h>
#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)
......
......@@ -44,8 +44,6 @@
#import <wtf/CurrentTime.h>
#import <wtf/UnusedParam.h>
#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> 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<WebLayer*>(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];