mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-23 16:48:53 +00:00
AppKit: CPLayoutManager, CPStringDrawing, CPMenu, CPCookie PLATFORM conditional removal
- 8 PLATFORM blocks resolved across four files: runtime CPDOMAvailable guards (3 wrapped, 2 early returns, 3 if/else preserving existing CommonJS branches) - CPMenu: @global _CPDOMEventStop declared; its definition resides in the DOM-only CPPlatformWindow+DOM category - zero preprocessor directives remain in these files - work-in-progress towards complete removal of CPP directives
This commit is contained in:
1 parent
c2be4f87c5
commit
7d59762561
4 files changed
+71
-59
No files matched your search
@@ -28,6 +28,7 @@
|
||||
@import "CGContext.j"
|
||||
@import "CPTypesetter.j"
|
||||
@import "CPFont.j"
|
||||
@import "CPCompatibility.j"
|
||||
|
||||
@global _MakeRangeFromAbs
|
||||
@global document
|
||||
@@ -297,9 +298,10 @@ _oncontextmenuhandler = function () { return false; };
|
||||
|
||||
[_typesetter layoutGlyphsInLayoutManager:self startingAtGlyphIndex:startIndex maxNumberOfLineFragments:-1 nextGlyphIndex:nil];
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
[self _cleanUpDOM];
|
||||
#endif
|
||||
if (CPDOMAvailable)
|
||||
{
|
||||
[self _cleanUpDOM];
|
||||
}
|
||||
|
||||
_isValidatingLayoutAndGlyphs = NO;
|
||||
}
|
||||
@@ -1145,7 +1147,8 @@ var _objectsInRange = function(aList, aRange)
|
||||
if (!aString || aString.length === 0)
|
||||
return nil;
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
if (!CPDOMAvailable) return nil;
|
||||
|
||||
var style,
|
||||
span = document.createElement("span");
|
||||
|
||||
@@ -1196,9 +1199,6 @@ var _objectsInRange = function(aList, aRange)
|
||||
span.textContent = aString;
|
||||
|
||||
return span;
|
||||
#else
|
||||
return nil;
|
||||
#endif
|
||||
}
|
||||
|
||||
- (id)initWithRange:(CPRange)aRange textContainer:(CPTextContainer)aContainer textStorage:(CPTextStorage)textStorage
|
||||
|
||||
Reference in new issue
Block a user