r11564 swdr - /trunk/netsurf/cocoa/Makefile.target
by netsurf@semichrome.net
Author: swdr
Date: Mon Jan 31 11:35:46 2011
New Revision: 11564
URL: http://source.netsurf-browser.org?rev=11564&view=rev
Log:
Updated Makefile.target
Modified:
trunk/netsurf/cocoa/Makefile.target
Modified: trunk/netsurf/cocoa/Makefile.target
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/Makefile.target?rev...
==============================================================================
--- trunk/netsurf/cocoa/Makefile.target (original)
+++ trunk/netsurf/cocoa/Makefile.target Mon Jan 31 11:35:46 2011
@@ -38,7 +38,7 @@
CFLAGS += -I/opt/local/include
endif
- VERSION_FULL := $(shell sed -n '/"/{s/.*"\(.*\)".*/\1/;p;}' desktop/version.c)
+ VERSION_FULL := $(shell sed -n '/\"/{s/.*"\(.*\)\".*/\1/;p;}' desktop/version.c)
VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
@@ -116,10 +116,6 @@
EXETARGET := NetSurf
S_XIBS := MainMenu.xib Browser.xib BrowserWindow.xib DownloadWindow.xib SearchWindow.xib
-S_NIBS := $(S_XIBS:.xib=.nib)
-
-S_XIBS := $(addprefix cocoa/res/,$(S_XIBS))
-S_NIBS := $(addprefix $(OBJROOT)/,$(S_NIBS))
R_RESOURCES := default.css adblock.css quirks.css NetSurf.icns
R_RESOURCES := $(addprefix cocoa/res/,$(R_RESOURCES))
@@ -144,41 +140,34 @@
define make_lproj
R_RESOURCES += $$(OBJROOT)/$(1).lproj
-$$(OBJROOT)/$(1).lproj: $(2) $$(OBJROOT)/created
- mkdir -p $$@
- cp -pLR $(2) $$@
+$$(OBJROOT)/$(1).lproj: $(2)
+ $(VQ)echo Bundling language $(1)
+ $(Q)mkdir -p $$@
+ $(Q)cp -pLR $(2) $$@
+endef
+
+define compile_xib
+R_RESOURCES += $$(OBJROOT)/$(1:.xib=.nib)
+$$(OBJROOT)/$(1:.xib=.nib): cocoa/res/$(1) $$(OBJROOT)/created
+ $(VQ)echo Compiling XIB: $$<
+ $(Q)ibtool $$< --compile $$@
endef
$(foreach lang,$(LANGUAGES),$(eval $(call make_lproj,$(lang),$(addprefix cocoa/res/$(lang).lproj/,$(LOCALIZED_RESOURCES)))))
+$(foreach xib,$(S_XIBS),$(eval $(call compile_xib,$(xib))))
-
-$(OBJROOT)/MainMenu.nib: cocoa/res/MainMenu.xib $(OBJROOT)/created
- ibtool $< --compile $@
-
-$(OBJROOT)/Browser.nib: cocoa/res/Browser.xib $(OBJROOT)/created
- ibtool $< --compile $@
-
-$(OBJROOT)/BrowserWindow.nib: cocoa/res/BrowserWindow.xib $(OBJROOT)/created
- ibtool $< --compile $@
-
-$(OBJROOT)/DownloadWindow.nib: cocoa/res/DownloadWindow.xib $(OBJROOT)/created
- ibtool $< --compile $@
-
-$(OBJROOT)/SearchWindow.nib: cocoa/res/SearchWindow.xib $(OBJROOT)/created
- ibtool $< --compile $@
-
-
-NetSurf.app: NetSurf cocoa/Makefile.target $(R_RESOURCES) $(S_NIBS) NetSurf.app/Contents/Info.plist
- mkdir -p NetSurf.app/Contents/MacOS
- cp NetSurf NetSurf.app/Contents/MacOS
- mkdir -p NetSurf.app/Contents/Resources
- cp -pLR $(R_RESOURCES) NetSurf.app/Contents/Resources
- cp -pLR $(S_NIBS) NetSurf.app/Contents/Resources
- echo 'APPL????' > NetSurf.app/Contents/PkgInfo
+NetSurf.app: NetSurf cocoa/Makefile.target $(R_RESOURCES) NetSurf.app/Contents/Info.plist
+ $(VQ)echo Assembling NetSurf.app bundle
+ $(Q)mkdir -p NetSurf.app/Contents/MacOS
+ $(Q)cp NetSurf NetSurf.app/Contents/MacOS
+ $(Q)mkdir -p NetSurf.app/Contents/Resources
+ $(Q)cp -pLR $(R_RESOURCES) NetSurf.app/Contents/Resources
+ $(Q)echo 'APPL????' > NetSurf.app/Contents/PkgInfo
NetSurf.app/Contents/Info.plist: cocoa/res/NetSurf-Info.plist cocoa/Makefile.target
- mkdir -p NetSurf.app/Contents
- sed -e 's/$${EXECUTABLE_NAME}/$(EXETARGET)/' \
+ $(VQ)echo Generating Info.plist
+ $(Q)mkdir -p NetSurf.app/Contents
+ $(Q)sed -e 's/$${EXECUTABLE_NAME}/$(EXETARGET)/' \
-e 's/$${PRODUCT_NAME.*}/$(EXETARGET)/' \
-e 's/$${MACOSX_DEPLOYMENT_TARGET}/$(MACOSX_VERSION)/' \
-e 's/$${NETSURF_VERSION}/$(VERSION_FULL)/' \
12 years, 3 months
r11563 swdr - in /trunk/netsurf/cocoa: ./ NetSurf.xcodeproj/ res/
by netsurf@semichrome.net
Author: swdr
Date: Mon Jan 31 09:13:38 2011
New Revision: 11563
URL: http://source.netsurf-browser.org?rev=11563&view=rev
Log:
Implemented search window.
Added:
trunk/netsurf/cocoa/BrowserWindow.h
- copied, changed from r11561, trunk/netsurf/cocoa/NetsurfApp.h
trunk/netsurf/cocoa/BrowserWindow.m
- copied, changed from r11561, trunk/netsurf/cocoa/NetsurfApp.h
trunk/netsurf/cocoa/SearchWindowController.h
trunk/netsurf/cocoa/SearchWindowController.m
trunk/netsurf/cocoa/res/SearchWindow.xib
Modified:
trunk/netsurf/cocoa/BrowserWindowController.m
trunk/netsurf/cocoa/Makefile.target
trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj
trunk/netsurf/cocoa/NetSurfAppDelegate.h
trunk/netsurf/cocoa/NetSurfAppDelegate.m
trunk/netsurf/cocoa/NetsurfApp.h
trunk/netsurf/cocoa/NetsurfApp.m
trunk/netsurf/cocoa/res/BrowserWindow.xib
trunk/netsurf/cocoa/res/MainMenu.xib
Copied: trunk/netsurf/cocoa/BrowserWindow.h (from r11561, trunk/netsurf/cocoa/NetsurfApp.h)
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/BrowserWindow.h?p2=...
==============================================================================
--- trunk/netsurf/cocoa/NetsurfApp.h (original)
+++ trunk/netsurf/cocoa/BrowserWindow.h Mon Jan 31 09:13:38 2011
@@ -19,7 +19,7 @@
#import <Cocoa/Cocoa.h>
-@interface NetSurfApp : NSApplication {
+@interface BrowserWindow : NSWindow {
}
Copied: trunk/netsurf/cocoa/BrowserWindow.m (from r11561, trunk/netsurf/cocoa/NetsurfApp.h)
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/BrowserWindow.m?p2=...
==============================================================================
--- trunk/netsurf/cocoa/NetsurfApp.h (original)
+++ trunk/netsurf/cocoa/BrowserWindow.m Mon Jan 31 09:13:38 2011
@@ -16,11 +16,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#import <Cocoa/Cocoa.h>
+#import "cocoa/BrowserWindow.h"
+#import "cocoa/BrowserWindowController.h"
+@implementation BrowserWindow
-@interface NetSurfApp : NSApplication {
-
+- (void) performClose: (id) sender;
+{
+ [[self windowController] closeCurrentTab: sender];
}
@end
Modified: trunk/netsurf/cocoa/BrowserWindowController.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/BrowserWindowContro...
==============================================================================
--- trunk/netsurf/cocoa/BrowserWindowController.m (original)
+++ trunk/netsurf/cocoa/BrowserWindowController.m Mon Jan 31 09:13:38 2011
@@ -23,6 +23,7 @@
#import "PSMRolloverButton.h"
#import "URLFieldCell.h"
#import "cocoa/gui.h"
+#import "cocoa/NetsurfApp.h"
#import "desktop/browser.h"
#import "desktop/options.h"
@@ -174,12 +175,20 @@
return [navigationControl isEnabledForSegment: 1];
}
+- (void)windowDidBecomeMain: (NSNotification *)note;
+{
+ [(NetSurfApp *)NSApp setFrontTab: [[tabView selectedTabViewItem] identifier]];
+}
+
#pragma mark -
#pragma mark Tab bar delegate
- (void) tabView: (NSTabView *)tabView didSelectTabViewItem: (NSTabViewItem *)tabViewItem;
{
[self setActiveBrowser: [tabViewItem identifier]];
+ if ([[self window] isMainWindow]) {
+ [(NetSurfApp *)NSApp setFrontTab: [tabViewItem identifier]];
+ }
}
- (BOOL)tabView:(NSTabView*)aTabView shouldDragTabViewItem:(NSTabViewItem *)tabViewItem fromTabBar:(PSMTabBarControl *)tabBarControl
Modified: trunk/netsurf/cocoa/Makefile.target
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/Makefile.target?rev...
==============================================================================
--- trunk/netsurf/cocoa/Makefile.target (original)
+++ trunk/netsurf/cocoa/Makefile.target Mon Jan 31 09:13:38 2011
@@ -67,10 +67,12 @@
BrowserView.m \
BrowserViewController.m \
BrowserWindowController.m \
+ BrowserWindow.m \
DownloadWindowController.m \
NetSurfAppDelegate.m \
NetsurfApp.m \
ScrollableView.m \
+ SearchWindowController.m \
URLFieldCell.m \
TreeView.m \
HistoryView.m \
@@ -113,7 +115,7 @@
EXETARGET := NetSurf
-S_XIBS := MainMenu.xib Browser.xib BrowserWindow.xib DownloadWindow.xib
+S_XIBS := MainMenu.xib Browser.xib BrowserWindow.xib DownloadWindow.xib SearchWindow.xib
S_NIBS := $(S_XIBS:.xib=.nib)
S_XIBS := $(addprefix cocoa/res/,$(S_XIBS))
@@ -162,6 +164,9 @@
$(OBJROOT)/DownloadWindow.nib: cocoa/res/DownloadWindow.xib $(OBJROOT)/created
ibtool $< --compile $@
+$(OBJROOT)/SearchWindow.nib: cocoa/res/SearchWindow.xib $(OBJROOT)/created
+ ibtool $< --compile $@
+
NetSurf.app: NetSurf cocoa/Makefile.target $(R_RESOURCES) $(S_NIBS) NetSurf.app/Contents/Info.plist
mkdir -p NetSurf.app/Contents/MacOS
Modified: trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/NetSurf.xcodeproj/p...
==============================================================================
--- trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj (original)
+++ trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj Mon Jan 31 09:13:38 2011
@@ -217,6 +217,11 @@
265F320512D66C200048B600 /* utf8.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = utf8.m; sourceTree = "<group>"; };
265F321312D66CD90048B600 /* utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = utils.m; sourceTree = "<group>"; };
265F321E12D66D510048B600 /* font.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = font.m; sourceTree = "<group>"; };
+ 2666DC5B12F6D1770045E8B6 /* SearchWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SearchWindow.xib; sourceTree = "<group>"; };
+ 2666DC5D12F6D2E70045E8B6 /* SearchWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchWindowController.h; sourceTree = "<group>"; };
+ 2666DC5E12F6D2E70045E8B6 /* SearchWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchWindowController.m; sourceTree = "<group>"; };
+ 2666DD5012F706BC0045E8B6 /* BrowserWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowserWindow.h; sourceTree = "<group>"; };
+ 2666DD5112F706BC0045E8B6 /* BrowserWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserWindow.m; sourceTree = "<group>"; };
26ABD61C12F02EB900407161 /* overflowImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = overflowImage.png; sourceTree = "<group>"; };
26ABD61D12F02EB900407161 /* overflowImagePressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = overflowImagePressed.png; sourceTree = "<group>"; };
26ABD61E12F02EB900407161 /* pi.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pi.png; sourceTree = "<group>"; };
@@ -539,6 +544,7 @@
26121EAB12D70E0A00E10F91 /* Browser.xib */,
26AFEAF012E042F9005AD082 /* DownloadWindow.xib */,
26CDCFF212E70AD1004FC66B /* BrowserWindow.xib */,
+ 2666DC5B12F6D1770045E8B6 /* SearchWindow.xib */,
);
name = Resources;
path = res;
@@ -649,6 +655,10 @@
26CDD00212E70F56004FC66B /* BrowserWindowController.m */,
26CDD0F412E726E0004FC66B /* BrowserViewController.h */,
26CDD0F512E726E0004FC66B /* BrowserViewController.m */,
+ 2666DC5D12F6D2E70045E8B6 /* SearchWindowController.h */,
+ 2666DC5E12F6D2E70045E8B6 /* SearchWindowController.m */,
+ 2666DD5012F706BC0045E8B6 /* BrowserWindow.h */,
+ 2666DD5112F706BC0045E8B6 /* BrowserWindow.m */,
);
name = Browser;
sourceTree = "<group>";
Modified: trunk/netsurf/cocoa/NetSurfAppDelegate.h
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/NetSurfAppDelegate....
==============================================================================
--- trunk/netsurf/cocoa/NetSurfAppDelegate.h (original)
+++ trunk/netsurf/cocoa/NetSurfAppDelegate.h Mon Jan 31 09:13:38 2011
@@ -18,11 +18,18 @@
#import <Cocoa/Cocoa.h>
+@class SearchWindowController;
@interface NetSurfAppDelegate : NSObject {
NSWindow *historyWindow;
+ SearchWindowController *search;
}
@property (readwrite, retain, nonatomic) IBOutlet NSWindow *historyWindow;
+@property (readwrite, retain, nonatomic) SearchWindowController *search;
+
+- (IBAction) showSearchWindow: (id) sender;
+- (IBAction) searchForward: (id) sender;
+- (IBAction) searchBackward: (id) sender;
@end
Modified: trunk/netsurf/cocoa/NetSurfAppDelegate.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/NetSurfAppDelegate....
==============================================================================
--- trunk/netsurf/cocoa/NetSurfAppDelegate.m (original)
+++ trunk/netsurf/cocoa/NetSurfAppDelegate.m Mon Jan 31 09:13:38 2011
@@ -17,6 +17,7 @@
*/
#import "NetSurfAppDelegate.h"
+#import "cocoa/SearchWindowController.h"
#import "desktop/browser.h"
#import "desktop/options.h"
@@ -30,8 +31,8 @@
@implementation NetSurfAppDelegate
-
@synthesize historyWindow;
+@synthesize search;
- (void) newDocument: (id) sender;
{
@@ -60,6 +61,37 @@
[historyWindow setExcludedFromWindowsMenu: YES];
}
+- (IBAction) showSearchWindow: (id) sender;
+{
+ if (search == nil) {
+ [self setSearch: [[[SearchWindowController alloc] init] autorelease]];
+ }
+ [[search window] makeKeyAndOrderFront: self];
+}
+
+- (IBAction) searchForward: (id) sender;
+{
+ [search search: SearchForward];
+}
+
+- (IBAction) searchBackward: (id) sender;
+{
+ [search search: SearchBackward];
+}
+
+- (BOOL) validateMenuItem: (id) item;
+{
+ SEL action = [item action];
+
+ if (action == @selector( searchForward: )) {
+ return [search canGoForward];
+ } else if (action == @selector( searchBackward: )) {
+ return [search canGoBack];
+ }
+
+ return YES;
+}
+
// Application delegate methods
- (BOOL) applicationOpenUntitledFile: (NSApplication *)sender;
Modified: trunk/netsurf/cocoa/NetsurfApp.h
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/NetsurfApp.h?rev=11...
==============================================================================
--- trunk/netsurf/cocoa/NetsurfApp.h (original)
+++ trunk/netsurf/cocoa/NetsurfApp.h Mon Jan 31 09:13:38 2011
@@ -18,9 +18,12 @@
#import <Cocoa/Cocoa.h>
+@class BrowserViewController;
@interface NetSurfApp : NSApplication {
-
+ BrowserViewController *frontTab;
}
+@property (readwrite, assign, nonatomic) BrowserViewController *frontTab;
+
@end
Modified: trunk/netsurf/cocoa/NetsurfApp.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/NetsurfApp.m?rev=11...
==============================================================================
--- trunk/netsurf/cocoa/NetsurfApp.m (original)
+++ trunk/netsurf/cocoa/NetsurfApp.m Mon Jan 31 09:13:38 2011
@@ -48,6 +48,8 @@
static NSString *cocoa_get_user_path( NSString *fileName ) ;
@implementation NetSurfApp
+
+@synthesize frontTab;
- (void) loadOptions;
{
Added: trunk/netsurf/cocoa/SearchWindowController.h
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/SearchWindowControl...
==============================================================================
--- trunk/netsurf/cocoa/SearchWindowController.h (added)
+++ trunk/netsurf/cocoa/SearchWindowController.h Mon Jan 31 09:13:38 2011
@@ -1,0 +1,52 @@
+/*
+ * Copyright 2011 Sven Weidauer <sven.weidauer(a)gmail.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#import <Cocoa/Cocoa.h>
+
+@class BrowserViewController;
+
+typedef enum {
+ SearchBackward,
+ SearchForward
+} SearchDirection;
+
+@interface SearchWindowController : NSWindowController {
+ BOOL caseSensitive;
+ BOOL selectAll;
+ BOOL canGoBack;
+ BOOL canGoForward;
+ NSString *searchString;
+ BrowserViewController *browser;
+}
+
+@property (readwrite, assign, nonatomic) BOOL caseSensitive;
+@property (readwrite, assign, nonatomic) BOOL selectAll;
+@property (readwrite, assign, nonatomic) BOOL canGoBack;
+@property (readwrite, assign, nonatomic) BOOL canGoForward;
+@property (readwrite, copy, nonatomic) NSString *searchString;
+@property (readwrite, assign, nonatomic) BrowserViewController *browser;
+
+- (IBAction) searchNext: (id) sender;
+- (IBAction) searchPrevious: (id) sender;
+
+- (IBAction) searchStringDidChange: (id) sender;
+
+- (void) search: (SearchDirection)direction;
+
+@end
Added: trunk/netsurf/cocoa/SearchWindowController.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/SearchWindowControl...
==============================================================================
--- trunk/netsurf/cocoa/SearchWindowController.m (added)
+++ trunk/netsurf/cocoa/SearchWindowController.m Mon Jan 31 09:13:38 2011
@@ -1,0 +1,124 @@
+/*
+ * Copyright 2011 Sven Weidauer <sven.weidauer(a)gmail.com>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+#import "cocoa/SearchWindowController.h"
+#import "cocoa/BrowserViewController.h"
+
+#import "desktop/browser.h"
+#import "desktop/search.h"
+
+static void cocoa_search_set_back( bool active, void *p );
+static void cocoa_search_set_forward( bool active, void *p );
+
+static struct search_callbacks cocoa_search_callbacks = {
+ .forward_state = cocoa_search_set_forward,
+ .back_state = cocoa_search_set_back,
+ .status = NULL,
+ .hourglass = NULL,
+ .add_recent = NULL
+};
+
+@implementation SearchWindowController
+
+@synthesize caseSensitive;
+@synthesize selectAll;
+@synthesize canGoBack;
+@synthesize canGoForward;
+@synthesize searchString;
+@synthesize browser;
+
+- init;
+{
+ if ((self = [super initWithWindowNibName: @"SearchWindow"]) == nil) return nil;
+
+ [self bind: @"browser" toObject: NSApp withKeyPath: @"frontTab" options: nil];
+ canGoBack = canGoForward = YES;
+
+ return self;
+}
+
+- (void) dealloc;
+{
+ [self unbind: @"browser"];
+ [super dealloc];
+}
+
+- (IBAction) searchNext: (id) sender;
+{
+ [self search: SearchForward];
+}
+
+- (IBAction) searchPrevious: (id) sender;
+{
+ [self search: SearchBackward];
+}
+
+- (void) search: (SearchDirection)direction;
+{
+ search_flags_t flags = (direction == SearchForward) ? SEARCH_FLAG_FORWARDS : 0;
+ if (caseSensitive) flags |= SEARCH_FLAG_CASE_SENSITIVE;
+ if (selectAll) flags |= SEARCH_FLAG_SHOWALL;
+
+ struct browser_window *bw = [browser browser];
+ if (bw != NULL && search_verify_new( bw, &cocoa_search_callbacks, self )) {
+ search_step( bw->search_context, flags, [searchString UTF8String] );
+ }
+}
+
+- (IBAction) searchStringDidChange: (id) sender;
+{
+ struct browser_window *bw = [browser browser];
+ if (bw != NULL && bw->search_context != NULL) {
+ search_destroy_context( bw->search_context );
+ bw->search_context = NULL;
+ }
+
+ [self setCanGoBack: YES];
+ [self setCanGoForward: YES];
+}
+
+- (void) setCaseSensitive: (BOOL) newValue;
+{
+ if (caseSensitive != newValue) {
+ caseSensitive = newValue;
+ [self setCanGoBack: YES];
+ [self setCanGoForward: YES];
+ }
+}
+
+- (void) setSelectAll: (BOOL) newValue;
+{
+ if (selectAll != newValue) {
+ selectAll = newValue;
+ [self setCanGoBack: YES];
+ [self setCanGoForward: YES];
+ }
+}
+
+static void cocoa_search_set_back( bool active, void *p )
+{
+ [(SearchWindowController *)p setCanGoBack: active];
+}
+
+static void cocoa_search_set_forward( bool active, void *p )
+{
+ [(SearchWindowController *)p setCanGoForward: active];
+}
+
+@end
Modified: trunk/netsurf/cocoa/res/BrowserWindow.xib
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/res/BrowserWindow.x...
==============================================================================
--- trunk/netsurf/cocoa/res/BrowserWindow.xib (original)
+++ trunk/netsurf/cocoa/res/BrowserWindow.xib Mon Jan 31 09:13:38 2011
@@ -43,7 +43,7 @@
<string key="NSWindowRect">{{139, 364}, {774, 554}}</string>
<int key="NSWTFlags">1618477056</int>
<string key="NSWindowTitle">NetSurf</string>
- <string key="NSWindowClass">NSWindow</string>
+ <string key="NSWindowClass">BrowserWindow</string>
<object class="NSToolbar" key="NSViewClass" id="71746575">
<object class="NSMutableString" key="NSToolbarIdentifier">
<characters key="NS.bytes">8335B5EA-A088-4DE8-BF4F-777E98920BB3</characters>
@@ -77,11 +77,9 @@
<string key="NSToolbarItemPaletteLabel">History</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSButton" key="NSToolbarItemView" id="229385913">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{8, 14}, {30, 25}}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="296571644">
<int key="NSCellFlags">67239424</int>
@@ -124,11 +122,9 @@
<string key="NSToolbarItemPaletteLabel">Back/Forward</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSSegmentedControl" key="NSToolbarItemView" id="692457026">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{5, 14}, {71, 25}}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSegmentedCell" key="NSCell" id="845979064">
<int key="NSCellFlags">67239424</int>
@@ -187,11 +183,9 @@
<string key="NSToolbarItemPaletteLabel">URL</string>
<nil key="NSToolbarItemToolTip"/>
<object class="NSTextField" key="NSToolbarItemView" id="77748234">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{0, 14}, {96, 22}}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1053649244">
<int key="NSCellFlags">-1804468671</int>
@@ -364,7 +358,7 @@
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<string key="NSWindowContentMinSize">{273, 43}</string>
<object class="NSView" key="NSWindowView" id="1006">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -373,7 +367,6 @@
<int key="NSvFlags">266</int>
<string key="NSFrame">{{0, 532}, {774, 22}}</string>
<reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
<string key="NSClassName">PSMTabBarControl</string>
</object>
<object class="NSTextField" id="795357547">
@@ -381,7 +374,6 @@
<int key="NSvFlags">290</int>
<string key="NSFrame">{{25, 3}, {732, 14}}</string>
<reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="717772067">
<int key="NSCellFlags">68288064</int>
@@ -416,7 +408,6 @@
<object class="NSPSMatrix" key="NSDrawMatrix"/>
<string key="NSFrame">{{4, 2}, {16, 16}}</string>
<reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
<int key="NSpiFlags">28938</int>
<double key="NSMaxValue">100</double>
</object>
@@ -425,7 +416,6 @@
<int key="NSvFlags">18</int>
<string key="NSFrame">{{0, 20}, {774, 512}}</string>
<reference key="NSSuperview" ref="1006"/>
- <reference key="NSWindow"/>
<object class="NSMutableArray" key="NSTabViewItems">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
@@ -436,8 +426,6 @@
</object>
</object>
<string key="NSFrameSize">{774, 554}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMinSize">{273, 97}</string>
@@ -1063,17 +1051,46 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">BrowserWindow</string>
+ <string key="superclassName">NSWindow</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">BrowserWindow.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">BrowserWindowController</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">newTab:</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>closeCurrentTab:</string>
+ <string>newTab:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">newTab:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">newTab:</string>
- <string key="candidateClassName">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>closeCurrentTab:</string>
+ <string>newTab:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">closeCurrentTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">newTab:</string>
+ <string key="candidateClassName">id</string>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
@@ -1235,16 +1252,6 @@
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">URLFieldCell.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Print.framework/Headers/PDEPluginInterface.h</string>
</object>
</object>
</object>
Modified: trunk/netsurf/cocoa/res/MainMenu.xib
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/res/MainMenu.xib?re...
==============================================================================
--- trunk/netsurf/cocoa/res/MainMenu.xib (original)
+++ trunk/netsurf/cocoa/res/MainMenu.xib Mon Jan 31 09:13:38 2011
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="29"/>
+ <integer value="81"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -411,15 +411,6 @@
<reference key="NSOnImage" ref="756751024"/>
<reference key="NSMixedImage" ref="908425081"/>
<int key="NSTag">7</int>
- </object>
- <object class="NSMenuItem" id="548069040">
- <reference key="NSMenu" ref="930654435"/>
- <string key="NSTitle">Jump to Selection</string>
- <string key="NSKeyEquiv">j</string>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="756751024"/>
- <reference key="NSMixedImage" ref="908425081"/>
</object>
</object>
</object>
@@ -926,46 +917,6 @@
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="285322108"/>
- </object>
- <int key="connectionID">771</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="671868626"/>
- </object>
- <int key="connectionID">772</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="456308224"/>
- </object>
- <int key="connectionID">773</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">centerSelectionInVisibleArea:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="548069040"/>
- </object>
- <int key="connectionID">774</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">performFindPanelAction:</string>
- <reference key="source" ref="1014"/>
- <reference key="destination" ref="497741775"/>
- </object>
- <int key="connectionID">775</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
<string key="label">makeKeyAndOrderFront:</string>
<reference key="source" ref="346681284"/>
<reference key="destination" ref="532573582"/>
@@ -1054,11 +1005,35 @@
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
- <string key="label">closeCurrentTab:</string>
+ <string key="label">showSearchWindow:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="671868626"/>
+ </object>
+ <int key="connectionID">841</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">searchNext:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="497741775"/>
+ </object>
+ <int key="connectionID">842</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">searchPrevious:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="285322108"/>
+ </object>
+ <int key="connectionID">843</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performClose:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="776162233"/>
</object>
- <int key="connectionID">840</int>
+ <int key="connectionID">844</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
@@ -1484,7 +1459,6 @@
<reference ref="497741775"/>
<reference ref="285322108"/>
<reference ref="456308224"/>
- <reference ref="548069040"/>
</object>
<reference key="parent" ref="602982148"/>
</object>
@@ -1506,11 +1480,6 @@
<object class="IBObjectRecord">
<int key="objectID">738</int>
<reference key="object" ref="456308224"/>
- <reference key="parent" ref="930654435"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">739</int>
- <reference key="object" ref="548069040"/>
<reference key="parent" ref="930654435"/>
</object>
<object class="IBObjectRecord">
@@ -1710,7 +1679,6 @@
<string>736.IBPluginDependency</string>
<string>737.IBPluginDependency</string>
<string>738.IBPluginDependency</string>
- <string>739.IBPluginDependency</string>
<string>74.IBPluginDependency</string>
<string>74.ImportedFromIB2</string>
<string>77.IBPluginDependency</string>
@@ -1797,7 +1765,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{525, 802}, {197, 73}}</string>
- <string>{{653, 628}, {352, 20}}</string>
+ <string>{{656, 815}, {352, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{74, 862}</string>
@@ -1812,52 +1780,51 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{254, 473}, {186, 183}}</string>
+ <string>{{668, 632}, {186, 183}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{23, 794}, {245, 183}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{716, 594}, {151, 203}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{867, 574}, {150, 43}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{867, 534}, {238, 103}}</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <integer value="1"/>
- <string>{{737, 465}, {179, 163}}</string>
+ <string>{{782, 612}, {151, 203}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{933, 592}, {150, 43}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>{{933, 572}, {238, 83}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1"/>
+ <string>{{740, 652}, {179, 163}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{323, 672}, {199, 203}}</string>
@@ -1905,7 +1872,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">840</int>
+ <int key="maxID">844</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -2135,6 +2102,45 @@
<object class="IBPartialClassDescription">
<string key="className">NetSurfAppDelegate</string>
<string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>searchBackward:</string>
+ <string>searchForward:</string>
+ <string>showSearchWindow:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>searchBackward:</string>
+ <string>searchForward:</string>
+ <string>showSearchWindow:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">searchBackward:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">searchForward:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">showSearchWindow:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">historyWindow</string>
<string key="NS.object.0">NSWindow</string>
@@ -2226,6 +2232,53 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">SearchWindowController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>searchNext:</string>
+ <string>searchPrevious:</string>
+ <string>searchStringDidChange:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>searchNext:</string>
+ <string>searchPrevious:</string>
+ <string>searchStringDidChange:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">searchNext:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">searchPrevious:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">searchStringDidChange:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">SearchWindowController.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">TreeView</string>
<string key="superclassName">ScrollableView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -2239,16 +2292,6 @@
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">URLFieldCell.h</string>
- </object>
- </object>
- </object>
- <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">Print.framework/Headers/PDEPluginInterface.h</string>
</object>
</object>
</object>
Added: trunk/netsurf/cocoa/res/SearchWindow.xib
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/res/SearchWindow.xi...
==============================================================================
--- trunk/netsurf/cocoa/res/SearchWindow.xib (added)
+++ trunk/netsurf/cocoa/res/SearchWindow.xib Mon Jan 31 09:13:38 2011
@@ -1,0 +1,646 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
+ <data>
+ <int key="IBDocument.SystemTarget">1060</int>
+ <string key="IBDocument.SystemVersion">10J567</string>
+ <string key="IBDocument.InterfaceBuilderVersion">804</string>
+ <string key="IBDocument.AppKitVersion">1038.35</string>
+ <string key="IBDocument.HIToolboxVersion">462.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="NS.object.0">804</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="2"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys" id="0">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">SearchWindowController</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSWindowTemplate" id="1005">
+ <int key="NSWindowStyleMask">7</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{196, 376}, {480, 134}}</string>
+ <int key="NSWTFlags">1618477056</int>
+ <string key="NSWindowTitle">Search</string>
+ <string key="NSWindowClass">NSWindow</string>
+ <nil key="NSViewClass"/>
+ <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <object class="NSView" key="NSWindowView" id="1006">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">256</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSTextField" id="656125083">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{53, 92}, {407, 22}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="175732045">
+ <int key="NSCellFlags">-1803944383</int>
+ <int key="NSCellFlags2">272630784</int>
+ <string key="NSContents"/>
+ <object class="NSFont" key="NSSupport" id="926601808">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">13</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="656125083"/>
+ <bool key="NSDrawsBackground">YES</bool>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textColor</string>
+ <object class="NSColor" key="NSColor" id="92132461">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSTextField" id="90768291">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 94}, {31, 14}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="874604921">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">272761856</int>
+ <string key="NSContents">Find:</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">11</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <reference key="NSControlView" ref="90768291"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">controlTextColor</string>
+ <reference key="NSColor" ref="92132461"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSButton" id="1016680565">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{370, 12}, {96, 32}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="567819516">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Next</string>
+ <reference key="NSSupport" ref="926601808"/>
+ <reference key="NSControlView" ref="1016680565"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="88766619">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{274, 12}, {96, 32}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="450885469">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Previous</string>
+ <reference key="NSSupport" ref="926601808"/>
+ <reference key="NSControlView" ref="88766619"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="650505141">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{139, 68}, {111, 18}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="657985060">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Case sensitive</string>
+ <reference key="NSSupport" ref="926601808"/>
+ <reference key="NSControlView" ref="650505141"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <object class="NSCustomResource" key="NSNormalImage" id="312987126">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSSwitch</string>
+ </object>
+ <object class="NSButtonImageSource" key="NSAlternateImage" id="973359313">
+ <string key="NSImageName">NSSwitch</string>
+ </object>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="331870754">
+ <reference key="NSNextResponder" ref="1006"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{295, 68}, {78, 18}}</string>
+ <reference key="NSSuperview" ref="1006"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="239506938">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Select all</string>
+ <reference key="NSSupport" ref="926601808"/>
+ <reference key="NSControlView" ref="331870754"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="312987126"/>
+ <reference key="NSAlternateImage" ref="973359313"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{480, 134}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
+ <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">searchNext:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1016680565"/>
+ </object>
+ <int key="connectionID">15</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">searchPrevious:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="88766619"/>
+ </object>
+ <int key="connectionID">16</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: canGoForward</string>
+ <reference key="source" ref="1016680565"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="1016680565"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">enabled: canGoForward</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">canGoForward</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">enabled: canGoBack</string>
+ <reference key="source" ref="88766619"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="88766619"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">enabled: canGoBack</string>
+ <string key="NSBinding">enabled</string>
+ <string key="NSKeyPath">canGoBack</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">18</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">searchStringDidChange:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="656125083"/>
+ </object>
+ <int key="connectionID">22</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1005"/>
+ </object>
+ <int key="connectionID">23</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: searchString</string>
+ <reference key="source" ref="656125083"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="656125083"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">value: searchString</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">searchString</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">24</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: caseSensitive</string>
+ <reference key="source" ref="650505141"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="650505141"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">value: caseSensitive</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">caseSensitive</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">25</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: selectAll</string>
+ <reference key="source" ref="331870754"/>
+ <reference key="destination" ref="1001"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="331870754"/>
+ <reference key="NSDestination" ref="1001"/>
+ <string key="NSLabel">value: selectAll</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">selectAll</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">27</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <reference key="object" ref="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1003"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="1005"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1006"/>
+ </object>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="1006"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="656125083"/>
+ <reference ref="90768291"/>
+ <reference ref="88766619"/>
+ <reference ref="650505141"/>
+ <reference ref="331870754"/>
+ <reference ref="1016680565"/>
+ </object>
+ <reference key="parent" ref="1005"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="656125083"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="175732045"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">4</int>
+ <reference key="object" ref="175732045"/>
+ <reference key="parent" ref="656125083"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="90768291"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="874604921"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="874604921"/>
+ <reference key="parent" ref="90768291"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7</int>
+ <reference key="object" ref="1016680565"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="567819516"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="567819516"/>
+ <reference key="parent" ref="1016680565"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">9</int>
+ <reference key="object" ref="88766619"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="450885469"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="450885469"/>
+ <reference key="parent" ref="88766619"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="650505141"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="657985060"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="657985060"/>
+ <reference key="parent" ref="650505141"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">13</int>
+ <reference key="object" ref="331870754"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="239506938"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">14</int>
+ <reference key="object" ref="239506938"/>
+ <reference key="parent" ref="331870754"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>1.IBWindowTemplateEditedContentRect</string>
+ <string>1.NSWindowTemplate.visibleAtLaunch</string>
+ <string>1.WindowOrigin</string>
+ <string>1.editorWindowContentRectSynchronizationRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>11.IBPluginDependency</string>
+ <string>11.IBViewBoundsToFrameTransform</string>
+ <string>12.IBPluginDependency</string>
+ <string>13.IBPluginDependency</string>
+ <string>13.IBViewBoundsToFrameTransform</string>
+ <string>14.IBPluginDependency</string>
+ <string>2.IBPluginDependency</string>
+ <string>3.IBPluginDependency</string>
+ <string>4.IBPluginDependency</string>
+ <string>5.IBPluginDependency</string>
+ <string>5.IBViewBoundsToFrameTransform</string>
+ <string>6.IBPluginDependency</string>
+ <string>7.IBPluginDependency</string>
+ <string>7.IBViewBoundsToFrameTransform</string>
+ <string>8.IBPluginDependency</string>
+ <string>9.IBPluginDependency</string>
+ <string>9.IBViewBoundsToFrameTransform</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>{{185, 245}, {480, 134}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{185, 245}, {480, 134}}</string>
+ <boolean value="NO"/>
+ <string>{196, 240}</string>
+ <string>{{202, 428}, {480, 270}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDCwAAwpQAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDk4AAwpQAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABBiAAAw3IAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDuQAAwigAAA</bytes>
+ </object>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSAffineTransform">
+ <bytes key="NSTransformStruct">P4AAAL+AAABDiQAAwigAAA</bytes>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference key="dict.sortedKeys" ref="0"/>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">27</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSApplication</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">PSMTabBarControl/PSMTabDragAssistant.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">PSMTabBarControl/PSMTabBarCell.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">PSMTabBarControl/PSMTabBarControl.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">SearchWindowController</string>
+ <string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>searchNext:</string>
+ <string>searchPrevious:</string>
+ <string>searchStringDidChange:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>searchNext:</string>
+ <string>searchPrevious:</string>
+ <string>searchStringDidChange:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">searchNext:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">searchPrevious:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">searchStringDidChange:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">SearchWindowController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
+ <integer value="3000" key="NS.object.0"/>
+ </object>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../NetSurf.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+ <string key="NS.key.0">NSSwitch</string>
+ <string key="NS.object.0">{15, 15}</string>
+ </object>
+ </data>
+</archive>
12 years, 3 months
r11562 jmb - /trunk/libcss/test/select-auto.c
by netsurf@semichrome.net
Author: jmb
Date: Mon Jan 31 02:51:00 2011
New Revision: 11562
URL: http://source.netsurf-browser.org?rev=11562&view=rev
Log:
Fix node_count_siblings() to compare the correct node names when necessary
Modified:
trunk/libcss/test/select-auto.c
Modified: trunk/libcss/test/select-auto.c
URL: http://source.netsurf-browser.org/trunk/libcss/test/select-auto.c?rev=115...
==============================================================================
--- trunk/libcss/test/select-auto.c (original)
+++ trunk/libcss/test/select-auto.c Mon Jan 31 02:51:00 2011
@@ -1299,13 +1299,14 @@
int32_t cnt = 0;
bool match = false;
node *node = n;
+ lwc_string *name = node->name;
UNUSED(pw);
if (after) {
while (node->next != NULL) {
if (same_name) {
assert(lwc_string_caseless_isequal(
- node->name, node->next->name, &match) ==
+ name, node->next->name, &match) ==
lwc_error_ok);
if (match)
@@ -1320,7 +1321,7 @@
while (node->prev != NULL) {
if (same_name) {
assert(lwc_string_caseless_isequal(
- node->name, node->prev->name, &match) ==
+ name, node->prev->name, &match) ==
lwc_error_ok);
if (match)
12 years, 3 months
r11561 jmb - /trunk/netsurf/css/select.c
by netsurf@semichrome.net
Author: jmb
Date: Mon Jan 31 02:49:39 2011
New Revision: 11561
URL: http://source.netsurf-browser.org?rev=11561&view=rev
Log:
Sync selection engine binding with latest libcss
Modified:
trunk/netsurf/css/select.c
Modified: trunk/netsurf/css/select.c
URL: http://source.netsurf-browser.org/trunk/netsurf/css/select.c?rev=11561&r1...
==============================================================================
--- trunk/netsurf/css/select.c (original)
+++ trunk/netsurf/css/select.c Mon Jan 31 02:49:39 2011
@@ -41,6 +41,8 @@
static css_error named_parent_node(void *pw, void *node,
lwc_string *name, void **parent);
static css_error named_sibling_node(void *pw, void *node,
+ lwc_string *name, void **sibling);
+static css_error named_generic_sibling_node(void *pw, void *node,
lwc_string *name, void **sibling);
static css_error parent_node(void *pw, void *node, void **parent);
static css_error sibling_node(void *pw, void *node, void **sibling);
@@ -61,12 +63,28 @@
static css_error node_has_attribute_includes(void *pw, void *node,
lwc_string *name, lwc_string *value,
bool *match);
-static css_error node_is_first_child(void *pw, void *node, bool *match);
+static css_error node_has_attribute_prefix(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match);
+static css_error node_has_attribute_suffix(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match);
+static css_error node_has_attribute_substring(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match);
+static css_error node_is_root(void *pw, void *node, bool *match);
+static css_error node_count_siblings(void *pw, void *node,
+ bool same_name, bool after, int32_t *count);
+static css_error node_is_empty(void *pw, void *node, bool *match);
static css_error node_is_link(void *pw, void *node, bool *match);
static css_error node_is_visited(void *pw, void *node, bool *match);
static css_error node_is_hover(void *pw, void *node, bool *match);
static css_error node_is_active(void *pw, void *node, bool *match);
static css_error node_is_focus(void *pw, void *node, bool *match);
+static css_error node_is_enabled(void *pw, void *node, bool *match);
+static css_error node_is_disabled(void *pw, void *node, bool *match);
+static css_error node_is_checked(void *pw, void *node, bool *match);
+static css_error node_is_target(void *pw, void *node, bool *match);
static css_error node_is_lang(void *pw, void *node,
lwc_string *lang, bool *match);
static css_error node_presentational_hint(void *pw, void *node,
@@ -98,6 +116,7 @@
named_ancestor_node,
named_parent_node,
named_sibling_node,
+ named_generic_sibling_node,
parent_node,
sibling_node,
node_has_name,
@@ -107,12 +126,21 @@
node_has_attribute_equal,
node_has_attribute_dashmatch,
node_has_attribute_includes,
- node_is_first_child,
+ node_has_attribute_prefix,
+ node_has_attribute_suffix,
+ node_has_attribute_substring,
+ node_is_root,
+ node_count_siblings,
+ node_is_empty,
node_is_link,
node_is_visited,
node_is_hover,
node_is_active,
node_is_focus,
+ node_is_enabled,
+ node_is_disabled,
+ node_is_checked,
+ node_is_target,
node_is_lang,
node_presentational_hint,
ua_default_for_property,
@@ -706,6 +734,41 @@
}
/**
+ * Callback to find a named generic sibling node.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param name Node name to search for
+ * \param sibling Pointer to location to receive ancestor
+ * \return CSS_OK.
+ *
+ * \post \a sibling will contain the result, or NULL if there is no match
+ */
+css_error named_generic_sibling_node(void *pw, void *node,
+ lwc_string *name, void **sibling)
+{
+ xmlNode *n = node;
+ size_t len = lwc_string_length(name);
+ const char *data = lwc_string_data(name);
+
+ *sibling = NULL;
+
+ for (n = n->prev; n != NULL && n->type == XML_ELEMENT_NODE;
+ n = n->prev) {
+ bool match = strlen((const char *) n->name) == len &&
+ strncasecmp((const char *) n->name,
+ data, len) == 0;
+
+ if (match) {
+ *sibling = (void *) n;
+ break;
+ }
+ }
+
+ return CSS_OK;
+}
+
+/**
* Callback to retrieve the parent of a node.
*
* \param pw HTML document
@@ -1014,6 +1077,8 @@
start = p + 1;
}
}
+
+ xmlFree(attr);
}
return CSS_OK;
@@ -1062,13 +1127,138 @@
start = p + 1;
}
}
- }
-
- return CSS_OK;
-}
-
-/**
- * Callback to determine if a node is the first child of its parent.
+
+ xmlFree(attr);
+ }
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node has an attribute with the given name whose
+ * value has the prefix given.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param name Name to match
+ * \param value Value to match
+ * \param match Pointer to location to receive result
+ * \return CSS_OK on success,
+ * CSS_NOMEM on memory exhaustion.
+ *
+ * \post \a match will contain true if the node matches and false otherwise.
+ */
+css_error node_has_attribute_prefix(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match)
+{
+ xmlNode *n = node;
+ xmlChar *attr;
+ size_t vlen = lwc_string_length(value);
+
+ *match = false;
+
+ attr = xmlGetProp(n, (const xmlChar *) lwc_string_data(name));
+ if (attr != NULL) {
+ if (strlen((char *) attr) >= vlen && strncasecmp((char *) attr,
+ lwc_string_data(value), vlen) == 0)
+ *match = true;
+
+ xmlFree(attr);
+ }
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node has an attribute with the given name whose
+ * value has the suffix given.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param name Name to match
+ * \param value Value to match
+ * \param match Pointer to location to receive result
+ * \return CSS_OK on success,
+ * CSS_NOMEM on memory exhaustion.
+ *
+ * \post \a match will contain true if the node matches and false otherwise.
+ */
+css_error node_has_attribute_suffix(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match)
+{
+ xmlNode *n = node;
+ xmlChar *attr;
+ size_t vlen = lwc_string_length(value);
+
+ *match = false;
+
+ attr = xmlGetProp(n, (const xmlChar *) lwc_string_data(name));
+ if (attr != NULL) {
+ size_t len = strlen((char *) attr);
+ const char *start = (char *) attr + len - vlen;
+
+ if (len >= vlen && strncasecmp(start,
+ lwc_string_data(value), vlen) == 0)
+ *match = true;
+
+ xmlFree(attr);
+ }
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node has an attribute with the given name whose
+ * value contains the substring given.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param name Name to match
+ * \param value Value to match
+ * \param match Pointer to location to receive result
+ * \return CSS_OK on success,
+ * CSS_NOMEM on memory exhaustion.
+ *
+ * \post \a match will contain true if the node matches and false otherwise.
+ */
+css_error node_has_attribute_substring(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match)
+{
+ xmlNode *n = node;
+ xmlChar *attr;
+ size_t vlen = lwc_string_length(value);
+
+ *match = false;
+
+ attr = xmlGetProp(n, (const xmlChar *) lwc_string_data(name));
+ if (attr != NULL) {
+ const char *vdata = lwc_string_data(value);
+ size_t len = strlen((char *) attr);
+ const char *start = (char *) attr;
+ const char *last_start = start + len - vlen;
+
+ if (len >= vlen) {
+ while (start <= last_start) {
+ if (strncasecmp(start, vdata, vlen) == 0) {
+ *match = true;
+ break;
+ }
+
+ start++;
+ }
+ }
+
+ xmlFree(attr);
+ }
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node is the root node of the document.
*
* \param pw HTML document
* \param node DOM node
@@ -1077,11 +1267,69 @@
*
* \post \a match will contain true if the node matches and false otherwise.
*/
-css_error node_is_first_child(void *pw, void *node, bool *match)
+css_error node_is_root(void *pw, void *node, bool *match)
{
xmlNode *n = node;
- *match = (n->parent != NULL && n->parent->children == n);
+ *match = (n->parent != NULL);
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to count a node's siblings.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param same_name Only count siblings with the same name, or all
+ * \param after Count anteceding instead of preceding siblings
+ * \param count Pointer to location to receive result
+ * \return CSS_OK.
+ *
+ * \post \a count will contain the number of siblings
+ */
+css_error node_count_siblings(void *pw, void *node, bool same_name,
+ bool after, int32_t *count)
+{
+ xmlNode *n = node;
+ const char *name = (char *) n->name;
+ int32_t cnt = 0;
+
+ do {
+ n = after ? n->next : n->prev;
+
+ if (n != NULL && n->type != XML_ELEMENT_NODE) {
+ if (same_name) {
+ if (strcasecmp(name, (char *) n->name) == 0)
+ cnt++;
+ } else {
+ cnt++;
+ }
+ }
+ } while (n != NULL);
+
+ *count = cnt;
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node is empty.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param match Pointer to location to receive result
+ * \return CSS_OK.
+ *
+ * \post \a match will contain true if the node is empty and false otherwise.
+ */
+css_error node_is_empty(void *pw, void *node, bool *match)
+{
+ xmlNode *n = node;
+
+ /** \todo This may not be sufficient: all children may be
+ * non-content, or empty content nodes. */
+ *match = (n->children == NULL);
return CSS_OK;
}
@@ -1221,6 +1469,82 @@
css_error node_is_focus(void *pw, void *node, bool *match)
{
/** \todo Support focussed nodes */
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node is enabled.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param match Pointer to location to receive result
+ * \return CSS_OK.
+ *
+ * \post \a match with contain true if the node is enabled and false otherwise.
+ */
+css_error node_is_enabled(void *pw, void *node, bool *match)
+{
+ /** \todo Support enabled nodes */
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node is disabled.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param match Pointer to location to receive result
+ * \return CSS_OK.
+ *
+ * \post \a match with contain true if the node is disabled and false otherwise.
+ */
+css_error node_is_disabled(void *pw, void *node, bool *match)
+{
+ /** \todo Support disabled nodes */
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node is checked.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param match Pointer to location to receive result
+ * \return CSS_OK.
+ *
+ * \post \a match with contain true if the node is checked and false otherwise.
+ */
+css_error node_is_checked(void *pw, void *node, bool *match)
+{
+ /** \todo Support checked nodes */
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+/**
+ * Callback to determine if a node is the target of the document URL.
+ *
+ * \param pw HTML document
+ * \param node DOM node
+ * \param match Pointer to location to receive result
+ * \return CSS_OK.
+ *
+ * \post \a match with contain true if the node matches and false otherwise.
+ */
+css_error node_is_target(void *pw, void *node, bool *match)
+{
+ /** \todo Support target */
*match = false;
12 years, 3 months
r11560 swdr - in /trunk/netsurf/cocoa/PSMTabBarControl: PSMTabBarControl.m PSMTabBarController.h PSMTabBarController.m PSMTabDragAssistant.h PSMTabDragAssistant.m
by netsurf@semichrome.net
Author: swdr
Date: Mon Jan 31 02:33:16 2011
New Revision: 11560
URL: http://source.netsurf-browser.org?rev=11560&view=rev
Log:
Updated PSMTabBarControl (warning fixes)
Modified:
trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarControl.m
trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.h
trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.m
trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.h
trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.m
Modified: trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarControl.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/PSMTabBarControl/PS...
==============================================================================
--- trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarControl.m (original)
+++ trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarControl.m Mon Jan 31 02:33:16 2011
@@ -564,7 +564,7 @@
// add to collection
[_cells addObject:cell];
[cell release];
- if([_cells count] == [tabView numberOfTabViewItems]) {
+ if([_cells count] == (NSUInteger)[tabView numberOfTabViewItems]) {
[self update]; // don't update unless all are accounted for!
}
}
@@ -923,7 +923,7 @@
- (void)update:(BOOL)animate {
// make sure all of our tabs are accounted for before updating
- if([[self tabView] numberOfTabViewItems] != [_cells count]) {
+ if((NSUInteger)[[self tabView] numberOfTabViewItems] != [_cells count]) {
return;
}
@@ -952,7 +952,7 @@
if(animate) {
NSMutableArray *targetFrames = [NSMutableArray arrayWithCapacity:[_cells count]];
- for(NSInteger i = 0; i < [_cells count]; i++) {
+ for(NSUInteger i = 0; i < [_cells count]; i++) {
currentCell = [_cells objectAtIndex:i];
//we're going from NSRect -> NSValue -> NSRect -> NSValue here - oh well
@@ -973,7 +973,7 @@
[[NSRunLoop currentRunLoop] addTimer:_animationTimer forMode:NSEventTrackingRunLoopMode];
[self _animateCells:_animationTimer];
} else {
- for(NSInteger i = 0; i < [_cells count]; i++) {
+ for(NSUInteger i = 0; i < [_cells count]; i++) {
currentCell = [_cells objectAtIndex:i];
[currentCell setFrame:[_controller cellFrameAtIndex:i]];
@@ -992,11 +992,11 @@
NSAnimation *animation = [[timer userInfo] objectAtIndex:1];
NSArray *targetFrames = [[timer userInfo] objectAtIndex:0];
PSMTabBarCell *currentCell;
- NSInteger cellCount = [_cells count];
+ NSUInteger cellCount = [_cells count];
if((cellCount > 0) && [animation isAnimating]) {
//compare our target position with the current position and move towards the target
- for(NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
+ for(NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
currentCell = [_cells objectAtIndex:i];
NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue];
CGFloat sizeChange;
@@ -1032,7 +1032,7 @@
} else {
//put all the cells where they should be in their final position
if(cellCount > 0) {
- for(NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
+ for(NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
PSMTabBarCell *currentCell = [_cells objectAtIndex:i];
NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue];
@@ -1064,7 +1064,7 @@
[_animationTimer invalidate];
[_animationTimer release]; _animationTimer = nil;
- for(NSInteger i = 0; i < cellCount; i++) {
+ for(NSUInteger i = 0; i < cellCount; i++) {
currentCell = [_cells objectAtIndex:i];
//we've hit the cells that are in overflow, stop setting up tracking rects
@@ -1618,7 +1618,7 @@
- (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem {
// here's a weird one - this message is sent before the "tabViewDidChangeNumberOfTabViewItems"
// message, thus I can end up updating when there are no cells, if no tabs were (yet) present
- NSInteger tabIndex = [aTabView indexOfTabViewItem:tabViewItem];
+ NSUInteger tabIndex = [aTabView indexOfTabViewItem:tabViewItem];
if([_cells count] > 0 && tabIndex < [_cells count]) {
PSMTabBarCell *thisCell = [_cells objectAtIndex:tabIndex];
@@ -1930,7 +1930,7 @@
}
- (NSInteger)numberOfVisibleTabs {
- NSInteger i, cellCount = 0;
+ NSUInteger i, cellCount = 0;
PSMTabBarCell *nextCell;
for(i = 0; i < [_cells count]; i++) {
Modified: trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.h
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/PSMTabBarControl/PS...
==============================================================================
--- trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.h (original)
+++ trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.h Mon Jan 31 02:33:16 2011
@@ -27,9 +27,9 @@
- (NSRect)addButtonRect;
- (NSMenu *)overflowMenu;
-- (NSRect)cellTrackingRectAtIndex:(NSInteger)index;
-- (NSRect)closeButtonTrackingRectAtIndex:(NSInteger)index;
-- (NSRect)cellFrameAtIndex:(NSInteger)index;
+- (NSRect)cellTrackingRectAtIndex:(NSUInteger)index;
+- (NSRect)closeButtonTrackingRectAtIndex:(NSUInteger)index;
+- (NSRect)cellFrameAtIndex:(NSUInteger)index;
- (void)setSelectedCell:(PSMTabBarCell *)cell;
Modified: trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/PSMTabBarControl/PS...
==============================================================================
--- trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.m (original)
+++ trunk/netsurf/cocoa/PSMTabBarControl/PSMTabBarController.m Mon Jan 31 02:33:16 2011
@@ -78,9 +78,9 @@
@returns The tracking rect of the cell at the requested index.
*/
-- (NSRect)cellTrackingRectAtIndex:(NSInteger)index {
+- (NSRect)cellTrackingRectAtIndex:(NSUInteger)index {
NSRect rect;
- if(index > -1 && index < [_cellTrackingRects count]) {
+ if(index < [_cellTrackingRects count]) {
rect = [[_cellTrackingRects objectAtIndex:index] rectValue];
} else {
NSLog(@"cellTrackingRectAtIndex: Invalid index (%ld)", (long)index);
@@ -97,9 +97,9 @@
@returns The close button tracking rect of the cell at the requested index.
*/
-- (NSRect)closeButtonTrackingRectAtIndex:(NSInteger)index {
+- (NSRect)closeButtonTrackingRectAtIndex:(NSUInteger)index {
NSRect rect;
- if(index > -1 && index < [_closeButtonTrackingRects count]) {
+ if(index < [_closeButtonTrackingRects count]) {
rect = [[_closeButtonTrackingRects objectAtIndex:index] rectValue];
} else {
NSLog(@"closeButtonTrackingRectAtIndex: Invalid index (%ld)", (long)index);
@@ -116,10 +116,10 @@
@returns The frame of the cell at the requested index.
*/
-- (NSRect)cellFrameAtIndex:(NSInteger)index {
+- (NSRect)cellFrameAtIndex:(NSUInteger)index {
NSRect rect;
- if(index > -1 && index < [_cellFrames count]) {
+ if(index < [_cellFrames count]) {
rect = [[_cellFrames objectAtIndex:index] rectValue];
} else {
NSLog(@"cellFrameAtIndex: Invalid index (%ld)", (long)index);
@@ -160,7 +160,7 @@
[cell setTabState:PSMTab_SelectedMask];
if(![cell isInOverflowMenu]) {
- NSInteger cellIndex = [cells indexOfObject:cell];
+ NSUInteger cellIndex = [cells indexOfObject:cell];
if(cellIndex > 0) {
nextCell = [cells objectAtIndex:cellIndex - 1];
@@ -501,7 +501,7 @@
*/
- (void)_setupCells:(NSArray *)cells withWidths:(NSArray *)widths {
- NSInteger i, tabState, cellCount = [cells count];
+ NSUInteger i, tabState, cellCount = [cells count];
NSRect cellRect = [_control genericCellRect];
PSMTabBarCell *cell;
NSTabViewItem *selectedTabViewItem = [[_control tabView] selectedTabViewItem];
Modified: trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.h
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/PSMTabBarControl/PS...
==============================================================================
--- trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.h (original)
+++ trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.h Mon Jan 31 02:33:16 2011
@@ -22,7 +22,7 @@
PSMTabBarControl *_destinationTabBar;
NSMutableSet *_participatingTabBars;
PSMTabBarCell *_draggedCell;
- NSInteger _draggedCellIndex; // for snap back
+ NSUInteger _draggedCellIndex; // for snap back
BOOL _isDragging;
// Support for dragging into new windows
Modified: trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/PSMTabBarControl/PS...
==============================================================================
--- trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.m (original)
+++ trunk/netsurf/cocoa/PSMTabBarControl/PSMTabDragAssistant.m Mon Jan 31 02:33:16 2011
@@ -298,7 +298,7 @@
- (void)performDragOperation {
// move cell
- NSInteger destinationIndex = [[[self destinationTabBar] cells] indexOfObject:[self targetCell]];
+ NSUInteger destinationIndex = [[[self destinationTabBar] cells] indexOfObject:[self targetCell]];
//there is the slight possibility of the targetCell now being set properly, so avoid errors
if(destinationIndex >= [[[self destinationTabBar] cells] count]) {
@@ -315,7 +315,7 @@
[[self sourceTabBar] removeTrackingRect:[[self draggedCell] cellTrackingTag]];
[[self sourceTabBar] removeTabForCell:[self draggedCell]];
- NSInteger i, insertIndex;
+ NSUInteger i, insertIndex;
NSArray *cells = [[self destinationTabBar] cells];
//find the index of where the dragged cell was just dropped
@@ -350,9 +350,8 @@
NSTabView *tabView = [[self sourceTabBar] tabView];
NSTabViewItem *item = [[self draggedCell] representedObject];
BOOL reselect = ([tabView selectedTabViewItem] == item);
- NSInteger index;
NSArray *cells = [[self sourceTabBar] cells];
-
+ NSUInteger index;
//find the index of where the dragged cell was just dropped
for(index = 0; index < [cells count] && [cells objectAtIndex:index] != [self draggedCell]; index++) {
;
@@ -767,7 +766,7 @@
}
- (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control {
- NSInteger i, numVisibleTabs = [control numberOfVisibleTabs];
+ NSUInteger i, numVisibleTabs = [control numberOfVisibleTabs];
for(i = 0; i < numVisibleTabs; i++) {
PSMTabBarCell *pc = [[[PSMTabBarCell alloc] initPlaceholderWithFrame:[[self draggedCell] frame] expanded:NO inControlView:control] autorelease];
[[control cells] insertObject:pc atIndex:(2 * i)];
12 years, 3 months
r11559 swdr - in /trunk/netsurf/cocoa: BrowserWindowController.m gui.h gui.m
by netsurf@semichrome.net
Author: swdr
Date: Mon Jan 31 02:07:22 2011
New Revision: 11559
URL: http://source.netsurf-browser.org?rev=11559&view=rev
Log:
Asking before closing window with multiple open tabs.
Modified:
trunk/netsurf/cocoa/BrowserWindowController.m
trunk/netsurf/cocoa/gui.h
trunk/netsurf/cocoa/gui.m
Modified: trunk/netsurf/cocoa/BrowserWindowController.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/BrowserWindowContro...
==============================================================================
--- trunk/netsurf/cocoa/BrowserWindowController.m (original)
+++ trunk/netsurf/cocoa/BrowserWindowController.m Mon Jan 31 02:07:22 2011
@@ -22,9 +22,17 @@
#import "PSMTabBarControl.h"
#import "PSMRolloverButton.h"
#import "URLFieldCell.h"
+#import "cocoa/gui.h"
#import "desktop/browser.h"
#import "desktop/options.h"
+
+@interface BrowserWindowController ()
+
+- (void) canCloseAlertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
+
+@end
+
@implementation BrowserWindowController
@@ -99,6 +107,30 @@
}
}
+- (BOOL) windowShouldClose: (NSWindow *) window;
+{
+ if ([tabView numberOfTabViewItems] <= 1) return YES;
+ if ([[NSUserDefaults standardUserDefaults] boolForKey: kAlwaysCloseMultipleTabs]) return YES;
+
+ NSAlert *ask = [NSAlert alertWithMessageText: @"Do you really want to close this window?" defaultButton:@"Yes" alternateButton:@"No" otherButton:nil
+ informativeTextWithFormat: @"There are %d tabs open, do you want to close them all?", [tabView numberOfTabViewItems]];
+ [ask setShowsSuppressionButton:YES];
+
+ [ask beginSheetModalForWindow: window modalDelegate:self didEndSelector:@selector(canCloseAlertDidEnd:returnCode:contextInfo:)
+ contextInfo: NULL];
+
+ return NO;
+}
+
+- (void) canCloseAlertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo;
+{
+ if (returnCode == NSOKButton) {
+ [[NSUserDefaults standardUserDefaults] setBool: [[alert suppressionButton] state] == NSOnState
+ forKey: kAlwaysCloseMultipleTabs];
+ [[self window] close];
+ }
+}
+
- (void) windowWillClose: (NSNotification *)notification;
{
for (NSTabViewItem *tab in [tabView tabViewItems]) {
Modified: trunk/netsurf/cocoa/gui.h
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/gui.h?rev=11559&r1=...
==============================================================================
--- trunk/netsurf/cocoa/gui.h (original)
+++ trunk/netsurf/cocoa/gui.h Mon Jan 31 02:07:22 2011
@@ -24,5 +24,6 @@
extern NSString * const kHomepageURLOption;
extern NSString * const kOptionsFileOption;
extern NSString * const kAlwaysCancelDownload;
+extern NSString * const kAlwaysCloseMultipleTabs;
void cocoa_autorelease( void );
Modified: trunk/netsurf/cocoa/gui.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/gui.m?rev=11559&r1=...
==============================================================================
--- trunk/netsurf/cocoa/gui.m (original)
+++ trunk/netsurf/cocoa/gui.m Mon Jan 31 02:07:22 2011
@@ -46,6 +46,7 @@
NSString * const kHomepageURLOption = @"HomepageURL";
NSString * const kOptionsFileOption = @"ClassicOptionsFile";
NSString * const kAlwaysCancelDownload = @"AlwaysCancelDownload";
+NSString * const kAlwaysCloseMultipleTabs = @"AlwaysCloseMultipleTabs";
#define UNIMPL() NSLog( @"Function '%s' unimplemented", __func__ )
12 years, 3 months
r11558 swdr - in /trunk/netsurf: cocoa/ cocoa/NetSurf.xcodeproj/ cocoa/config/ utils/
by netsurf@semichrome.net
Author: swdr
Date: Mon Jan 31 01:57:52 2011
New Revision: 11558
URL: http://source.netsurf-browser.org?rev=11558&view=rev
Log:
Changing Xcode project file to build using the Makefiles and fixed some warnings.
Removed:
trunk/netsurf/cocoa/config/NetSurf.xcconfig
trunk/netsurf/cocoa/config/common.xcconfig
trunk/netsurf/cocoa/config/debug.xcconfig
trunk/netsurf/cocoa/config/detect.sh
trunk/netsurf/cocoa/config/release.xcconfig
Modified:
trunk/netsurf/cocoa/Makefile.target
trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj
trunk/netsurf/cocoa/bitmap.m
trunk/netsurf/cocoa/font.m
trunk/netsurf/cocoa/plotter.m
trunk/netsurf/utils/log.c
Modified: trunk/netsurf/cocoa/Makefile.target
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/Makefile.target?rev...
==============================================================================
--- trunk/netsurf/cocoa/Makefile.target (original)
+++ trunk/netsurf/cocoa/Makefile.target Mon Jan 31 01:57:52 2011
@@ -109,6 +109,8 @@
# complete source file list
SOURCES := $(S_COMMON) $(S_IMAGE) $(S_BROWSER) $(S_COCOA) $(S_TABBAR)
+SOURCES := $(addprefix $(shell pwd)/,$(SOURCES))
+
EXETARGET := NetSurf
S_XIBS := MainMenu.xib Browser.xib BrowserWindow.xib DownloadWindow.xib
Modified: trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/NetSurf.xcodeproj/p...
==============================================================================
--- trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj (original)
+++ trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj Mon Jan 31 01:57:52 2011
@@ -3,154 +3,10 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 44;
+ objectVersion = 45;
objects = {
-/* Begin PBXBuildFile section */
- 260F200A12D620E800D9B07F /* content.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F6312D620E800D9B07F /* content.c */; };
- 260F200B12D620E800D9B07F /* dirlist.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F6712D620E800D9B07F /* dirlist.c */; };
- 260F200C12D620E800D9B07F /* fetch.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F6912D620E800D9B07F /* fetch.c */; };
- 260F200D12D620E800D9B07F /* fetch_curl.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F6C12D620E800D9B07F /* fetch_curl.c */; };
- 260F200E12D620E800D9B07F /* fetch_data.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F6E12D620E800D9B07F /* fetch_data.c */; };
- 260F200F12D620E800D9B07F /* fetch_file.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7012D620E800D9B07F /* fetch_file.c */; };
- 260F201012D620E800D9B07F /* hlcache.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7212D620E800D9B07F /* hlcache.c */; };
- 260F201112D620E800D9B07F /* llcache.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7412D620E800D9B07F /* llcache.c */; };
- 260F201212D620E800D9B07F /* urldb.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7612D620E800D9B07F /* urldb.c */; };
- 260F201312D620E800D9B07F /* css.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7912D620E800D9B07F /* css.c */; };
- 260F201412D620E800D9B07F /* dump.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7B12D620E800D9B07F /* dump.c */; };
- 260F201512D620E800D9B07F /* internal.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7D12D620E800D9B07F /* internal.c */; };
- 260F201612D620E800D9B07F /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F7F12D620E800D9B07F /* select.c */; };
- 260F201712D620E800D9B07F /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F8112D620E800D9B07F /* utils.c */; };
- 260F201812D620E800D9B07F /* browser.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F8512D620E800D9B07F /* browser.c */; };
- 260F201912D620E800D9B07F /* cookies.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F8712D620E800D9B07F /* cookies.c */; };
- 260F201A12D620E800D9B07F /* download.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F8912D620E800D9B07F /* download.c */; };
- 260F201B12D620E800D9B07F /* frames.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F8B12D620E800D9B07F /* frames.c */; };
- 260F201C12D620E800D9B07F /* history_core.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F8E12D620E800D9B07F /* history_core.c */; };
- 260F201D12D620E800D9B07F /* history_global_core.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9012D620E800D9B07F /* history_global_core.c */; };
- 260F201E12D620E800D9B07F /* hotlist.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9212D620E800D9B07F /* hotlist.c */; };
- 260F201F12D620E800D9B07F /* knockout.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9412D620E800D9B07F /* knockout.c */; };
- 260F202012D620E800D9B07F /* mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9612D620E800D9B07F /* mouse.c */; };
- 260F202112D620E800D9B07F /* netsurf.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9812D620E800D9B07F /* netsurf.c */; };
- 260F202212D620E800D9B07F /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9A12D620E800D9B07F /* options.c */; };
- 260F202312D620E800D9B07F /* plot_style.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9C12D620E800D9B07F /* plot_style.c */; };
- 260F202412D620E800D9B07F /* print.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1F9F12D620E800D9B07F /* print.c */; };
- 260F202512D620E800D9B07F /* save_complete.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FA212D620E800D9B07F /* save_complete.c */; };
- 260F202612D620E800D9B07F /* font_haru.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FA512D620E800D9B07F /* font_haru.c */; };
- 260F202712D620E800D9B07F /* pdf_plotters.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FA712D620E800D9B07F /* pdf_plotters.c */; };
- 260F202912D620E800D9B07F /* save_text.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FAA12D620E800D9B07F /* save_text.c */; };
- 260F202A12D620E800D9B07F /* scroll.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FAC12D620E800D9B07F /* scroll.c */; };
- 260F202B12D620E800D9B07F /* search.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FAE12D620E800D9B07F /* search.c */; };
- 260F202C12D620E800D9B07F /* searchweb.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FB012D620E800D9B07F /* searchweb.c */; };
- 260F202D12D620E800D9B07F /* selection.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FB212D620E800D9B07F /* selection.c */; };
- 260F202E12D620E800D9B07F /* sslcert.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FB412D620E800D9B07F /* sslcert.c */; };
- 260F202F12D620E800D9B07F /* textarea.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FB612D620E800D9B07F /* textarea.c */; };
- 260F203012D620E800D9B07F /* textinput.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FB812D620E800D9B07F /* textinput.c */; };
- 260F203112D620E800D9B07F /* tree.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FBA12D620E800D9B07F /* tree.c */; };
- 260F203212D620E800D9B07F /* tree_url_node.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FBC12D620E800D9B07F /* tree_url_node.c */; };
- 260F203312D620E800D9B07F /* version.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FBE12D620E800D9B07F /* version.c */; };
- 260F203A12D620E800D9B07F /* box.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FC712D620E800D9B07F /* box.c */; };
- 260F203B12D620E800D9B07F /* box_construct.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FC912D620E800D9B07F /* box_construct.c */; };
- 260F203C12D620E800D9B07F /* box_normalise.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FCA12D620E800D9B07F /* box_normalise.c */; };
- 260F203D12D620E800D9B07F /* favicon.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FCB12D620E800D9B07F /* favicon.c */; };
- 260F203E12D620E800D9B07F /* font.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FCD12D620E800D9B07F /* font.c */; };
- 260F203F12D620E800D9B07F /* form.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FCF12D620E800D9B07F /* form.c */; };
- 260F204012D620E800D9B07F /* html.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FD112D620E800D9B07F /* html.c */; };
- 260F204112D620E800D9B07F /* html_interaction.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FD312D620E800D9B07F /* html_interaction.c */; };
- 260F204212D620E800D9B07F /* html_redraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FD412D620E800D9B07F /* html_redraw.c */; };
- 260F204312D620E800D9B07F /* hubbub_binding.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FD512D620E800D9B07F /* hubbub_binding.c */; };
- 260F204412D620E800D9B07F /* imagemap.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FD612D620E800D9B07F /* imagemap.c */; };
- 260F204512D620E800D9B07F /* layout.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FD812D620E800D9B07F /* layout.c */; };
- 260F204612D620E800D9B07F /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FDA12D620E800D9B07F /* list.c */; };
- 260F204712D620E800D9B07F /* table.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FDD12D620E800D9B07F /* table.c */; };
- 260F204812D620E800D9B07F /* textplain.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FE012D620E800D9B07F /* textplain.c */; };
- 260F204912D620E800D9B07F /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FE312D620E800D9B07F /* base64.c */; };
- 260F204A12D620E800D9B07F /* container.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FE612D620E800D9B07F /* container.c */; };
- 260F204B12D620E800D9B07F /* filename.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FE912D620E800D9B07F /* filename.c */; };
- 260F204C12D620E800D9B07F /* findresource.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FEB12D620E800D9B07F /* findresource.c */; };
- 260F204D12D620E800D9B07F /* hashtable.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FED12D620E800D9B07F /* hashtable.c */; };
- 260F204E12D620E800D9B07F /* http.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FEF12D620E800D9B07F /* http.c */; };
- 260F204F12D620E800D9B07F /* locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FF112D620E800D9B07F /* locale.c */; };
- 260F205012D620E800D9B07F /* log.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FF312D620E800D9B07F /* log.c */; };
- 260F205212D620E800D9B07F /* memdebug.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FF612D620E800D9B07F /* memdebug.c */; };
- 260F205312D620E800D9B07F /* messages.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FF812D620E800D9B07F /* messages.c */; };
- 260F205412D620E800D9B07F /* talloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FFB12D620E800D9B07F /* talloc.c */; };
- 260F205712D620E800D9B07F /* url.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F1FFF12D620E800D9B07F /* url.c */; };
- 260F205812D620E800D9B07F /* useragent.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F200112D620E800D9B07F /* useragent.c */; };
- 260F205912D620E800D9B07F /* utf8.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F200312D620E800D9B07F /* utf8.c */; };
- 260F205A12D620E800D9B07F /* utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 260F200512D620E800D9B07F /* utils.c */; };
- 26121DA912D700B800E10F91 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 26121DA812D700B800E10F91 /* MainMenu.xib */; };
- 26121DD912D703F400E10F91 /* NetSurfApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 26121DD812D703F400E10F91 /* NetSurfApp.m */; };
- 26121EAC12D70E0A00E10F91 /* Browser.xib in Resources */ = {isa = PBXBuildFile; fileRef = 26121EAB12D70E0A00E10F91 /* Browser.xib */; };
- 26121EFD12D7132100E10F91 /* BrowserView.m in Sources */ = {isa = PBXBuildFile; fileRef = 26121EFC12D7132100E10F91 /* BrowserView.m */; };
- 2612265A12D7ACB500E10F91 /* default.css in Resources */ = {isa = PBXBuildFile; fileRef = 2612265712D7ACB500E10F91 /* default.css */; };
- 2612265C12D7ACB500E10F91 /* quirks.css in Resources */ = {isa = PBXBuildFile; fileRef = 2612265912D7ACB500E10F91 /* quirks.css */; };
- 2612266D12D7AD6800E10F91 /* adblock.css in Resources */ = {isa = PBXBuildFile; fileRef = 2612265D12D7AD6800E10F91 /* adblock.css */; };
- 2612269112D7AE4100E10F91 /* Messages in Resources */ = {isa = PBXBuildFile; fileRef = 2612268F12D7AE4100E10F91 /* Messages */; };
- 2622F1D712DCD84600CD5A62 /* TreeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2622F1D612DCD84600CD5A62 /* TreeView.m */; };
- 265F311A12D663F50048B600 /* gui.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F311912D663F50048B600 /* gui.m */; };
- 265F314812D666660048B600 /* plotter.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F314712D666660048B600 /* plotter.m */; };
- 265F316212D667E10048B600 /* schedule.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F316112D667E10048B600 /* schedule.m */; };
- 265F316712D668130048B600 /* thumbnail.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F316612D668130048B600 /* thumbnail.m */; };
- 265F317012D668790048B600 /* fetch.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F316F12D668790048B600 /* fetch.m */; };
- 265F319112D668DB0048B600 /* url.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F319012D668DB0048B600 /* url.m */; };
- 265F31C512D66A0D0048B600 /* save.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F31C412D66A0D0048B600 /* save.m */; };
- 265F31DF12D66A890048B600 /* bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31CB12D66A890048B600 /* bmp.c */; };
- 265F31E012D66A890048B600 /* gif.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31CD12D66A890048B600 /* gif.c */; };
- 265F31E112D66A890048B600 /* ico.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31CF12D66A890048B600 /* ico.c */; };
- 265F31E212D66A890048B600 /* jpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31D112D66A890048B600 /* jpeg.c */; };
- 265F31E312D66A890048B600 /* mng.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31D312D66A890048B600 /* mng.c */; };
- 265F31E412D66A890048B600 /* nssprite.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31D512D66A890048B600 /* nssprite.c */; };
- 265F31E512D66A890048B600 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31D712D66A890048B600 /* png.c */; };
- 265F31E612D66A890048B600 /* rsvg.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31D912D66A890048B600 /* rsvg.c */; };
- 265F31E712D66A890048B600 /* svg.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31DB12D66A890048B600 /* svg.c */; };
- 265F31E812D66A890048B600 /* webp.c in Sources */ = {isa = PBXBuildFile; fileRef = 265F31DD12D66A890048B600 /* webp.c */; };
- 265F31EC12D66B190048B600 /* bitmap.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F31EB12D66B190048B600 /* bitmap.m */; };
- 265F320612D66C200048B600 /* utf8.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F320512D66C200048B600 /* utf8.m */; };
- 265F321412D66CD90048B600 /* utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F321312D66CD90048B600 /* utils.m */; };
- 265F321F12D66D510048B600 /* font.m in Sources */ = {isa = PBXBuildFile; fileRef = 265F321E12D66D510048B600 /* font.m */; };
- 26ABD61F12F02EB900407161 /* overflowImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 26ABD61C12F02EB900407161 /* overflowImage.png */; };
- 26ABD62012F02EB900407161 /* overflowImagePressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 26ABD61D12F02EB900407161 /* overflowImagePressed.png */; };
- 26ABD62112F02EB900407161 /* pi.png in Resources */ = {isa = PBXBuildFile; fileRef = 26ABD61E12F02EB900407161 /* pi.png */; };
- 26AFE63F12DDEB0A005AD082 /* NetSurf.icns in Resources */ = {isa = PBXBuildFile; fileRef = 26AFE63E12DDEB0A005AD082 /* NetSurf.icns */; };
- 26AFE8E412DF4200005AD082 /* ScrollableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 26AFE8E312DF4200005AD082 /* ScrollableView.m */; };
- 26AFE97C12DF514C005AD082 /* NetSurfAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 26AFE97B12DF514C005AD082 /* NetSurfAppDelegate.m */; };
- 26AFEAEB12E04253005AD082 /* DownloadWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 26AFEAEA12E04253005AD082 /* DownloadWindowController.m */; };
- 26AFEAF112E042F9005AD082 /* DownloadWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 26AFEAF012E042F9005AD082 /* DownloadWindow.xib */; };
- 26AFED0412E09916005AD082 /* selection.m in Sources */ = {isa = PBXBuildFile; fileRef = 26AFED0312E09916005AD082 /* selection.m */; };
- 26CDCED412E702D8004FC66B /* NSBezierPath_AMShading.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEB412E702D8004FC66B /* NSBezierPath_AMShading.m */; };
- 26CDCED512E702D8004FC66B /* NSString_AITruncation.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEB612E702D8004FC66B /* NSString_AITruncation.m */; };
- 26CDCED912E702D8004FC66B /* PSMOverflowPopUpButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEBE12E702D8004FC66B /* PSMOverflowPopUpButton.m */; };
- 26CDCEDA12E702D8004FC66B /* PSMProgressIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEC012E702D8004FC66B /* PSMProgressIndicator.m */; };
- 26CDCEDB12E702D8004FC66B /* PSMRolloverButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEC212E702D8004FC66B /* PSMRolloverButton.m */; };
- 26CDCEDC12E702D8004FC66B /* PSMTabBarCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEC412E702D8004FC66B /* PSMTabBarCell.m */; };
- 26CDCEDD12E702D8004FC66B /* PSMTabBarControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEC612E702D8004FC66B /* PSMTabBarControl.m */; };
- 26CDCEDE12E702D8004FC66B /* PSMTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCEC812E702D8004FC66B /* PSMTabBarController.m */; };
- 26CDCEDF12E702D8004FC66B /* PSMTabDragAssistant.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCECA12E702D8004FC66B /* PSMTabDragAssistant.m */; };
- 26CDCEE012E702D8004FC66B /* PSMTabDragView.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCECC12E702D8004FC66B /* PSMTabDragView.m */; };
- 26CDCEE112E702D8004FC66B /* PSMTabDragWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCECE12E702D8004FC66B /* PSMTabDragWindow.m */; };
- 26CDCEE212E702D8004FC66B /* PSMTabDragWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCED012E702D8004FC66B /* PSMTabDragWindowController.m */; };
- 26CDCEE312E702D8004FC66B /* PSMUnifiedTabStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDCED312E702D8004FC66B /* PSMUnifiedTabStyle.m */; };
- 26CDCF0012E70438004FC66B /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26CDCEFF12E70438004FC66B /* Carbon.framework */; };
- 26CDCFE512E706FF004FC66B /* AquaTabClose_Front.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFDC12E706FE004FC66B /* AquaTabClose_Front.png */; };
- 26CDCFE612E706FF004FC66B /* AquaTabClose_Front_Pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFDD12E706FF004FC66B /* AquaTabClose_Front_Pressed.png */; };
- 26CDCFE712E706FF004FC66B /* AquaTabClose_Front_Rollover.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFDE12E706FF004FC66B /* AquaTabClose_Front_Rollover.png */; };
- 26CDCFE812E706FF004FC66B /* AquaTabCloseDirty_Front.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFDF12E706FF004FC66B /* AquaTabCloseDirty_Front.png */; };
- 26CDCFE912E706FF004FC66B /* AquaTabCloseDirty_Front_Pressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFE012E706FF004FC66B /* AquaTabCloseDirty_Front_Pressed.png */; };
- 26CDCFEA12E706FF004FC66B /* AquaTabCloseDirty_Front_Rollover.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFE112E706FF004FC66B /* AquaTabCloseDirty_Front_Rollover.png */; };
- 26CDCFEB12E706FF004FC66B /* AquaTabNew.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFE212E706FF004FC66B /* AquaTabNew.png */; };
- 26CDCFEC12E706FF004FC66B /* AquaTabNewPressed.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFE312E706FF004FC66B /* AquaTabNewPressed.png */; };
- 26CDCFED12E706FF004FC66B /* AquaTabNewRollover.png in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFE412E706FF004FC66B /* AquaTabNewRollover.png */; };
- 26CDCFF312E70AD1004FC66B /* BrowserWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 26CDCFF212E70AD1004FC66B /* BrowserWindow.xib */; };
- 26CDD00312E70F56004FC66B /* BrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDD00212E70F56004FC66B /* BrowserWindowController.m */; };
- 26CDD0F612E726E0004FC66B /* BrowserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 26CDD0F512E726E0004FC66B /* BrowserViewController.m */; };
- 26EC3B6A12ED62C0000A960C /* URLFieldCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 26EC3B6912ED62C0000A960C /* URLFieldCell.m */; };
- 26EC3C4412ED8202000A960C /* HistoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 26EC3C4312ED8202000A960C /* HistoryView.m */; };
- 26EC3F1812EF0CBD000A960C /* FormSelectMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 26EC3F1712EF0CBD000A960C /* FormSelectMenu.m */; };
- 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
-/* End PBXBuildFile section */
-
/* Begin PBXFileReference section */
- 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
260F1F6312D620E800D9B07F /* content.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = content.c; sourceTree = "<group>"; };
260F1F6412D620E800D9B07F /* content.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = content.h; sourceTree = "<group>"; };
260F1F6512D620E800D9B07F /* content_protected.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = content_protected.h; sourceTree = "<group>"; };
@@ -300,8 +156,6 @@
260F200712D620E800D9B07F /* utsname.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utsname.h; sourceTree = "<group>"; };
260FC03112D85ACE00079C00 /* bitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bitmap.h; sourceTree = "<group>"; };
26121DA812D700B800E10F91 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = "<group>"; };
- 26121DD712D703F400E10F91 /* NetSurfApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetSurfApp.h; sourceTree = "<group>"; };
- 26121DD812D703F400E10F91 /* NetSurfApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetSurfApp.m; sourceTree = "<group>"; };
26121EAB12D70E0A00E10F91 /* Browser.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Browser.xib; sourceTree = "<group>"; };
26121EFB12D7132100E10F91 /* BrowserView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowserView.h; sourceTree = "<group>"; };
26121EFC12D7132100E10F91 /* BrowserView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserView.m; sourceTree = "<group>"; };
@@ -317,11 +171,16 @@
2612269612D7AEBE00E10F91 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text; name = fr; path = fr.lproj/Messages; sourceTree = "<group>"; };
2622F1D512DCD84600CD5A62 /* TreeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeView.h; sourceTree = "<group>"; };
2622F1D612DCD84600CD5A62 /* TreeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TreeView.m; sourceTree = "<group>"; };
- 262711B212DDDCB800B2FA62 /* debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = debug.xcconfig; sourceTree = "<group>"; };
- 262711B412DDDCB800B2FA62 /* local.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = local.xcconfig; sourceTree = "<group>"; };
- 262711BE12DDDD1500B2FA62 /* release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = release.xcconfig; sourceTree = "<group>"; };
- 262711C212DDDDC300B2FA62 /* NetSurf.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = NetSurf.xcconfig; sourceTree = "<group>"; };
- 262711D412DDDEEE00B2FA62 /* common.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = common.xcconfig; sourceTree = "<group>"; };
+ 2636299412F699250048542C /* NetSurf.app */ = {isa = PBXFileReference; lastKnownFileType = wrapper.application; name = NetSurf.app; path = ../NetSurf.app; sourceTree = SOURCE_ROOT; };
+ 263629B312F69A290048542C /* Makefile.config */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; name = Makefile.config; path = ../Makefile.config; sourceTree = SOURCE_ROOT; };
+ 263629B412F69A290048542C /* Makefile.defaults */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; name = Makefile.defaults; path = ../Makefile.defaults; sourceTree = SOURCE_ROOT; };
+ 263629B512F69A290048542C /* Makefile.resources */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; name = Makefile.resources; path = ../Makefile.resources; sourceTree = SOURCE_ROOT; };
+ 263629B612F69A290048542C /* Makefile.sources */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; name = Makefile.sources; path = ../Makefile.sources; sourceTree = SOURCE_ROOT; };
+ 263629B712F69A3C0048542C /* Makefile.target */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.target; sourceTree = "<group>"; };
+ 263629BC12F69A760048542C /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../Makefile; sourceTree = SOURCE_ROOT; };
+ 263629C812F69B120048542C /* NetsurfApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetsurfApp.h; sourceTree = "<group>"; };
+ 263629C912F69B120048542C /* NetsurfApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetsurfApp.m; sourceTree = "<group>"; };
+ 263629CA12F69B120048542C /* system_colour.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = system_colour.m; sourceTree = "<group>"; };
2639E20512F2ADEE00699678 /* coordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coordinates.h; sourceTree = "<group>"; };
264C344112F0987E00D11246 /* gui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gui.h; sourceTree = "<group>"; };
265F30A712D6637E0048B600 /* NetSurf-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "NetSurf-Info.plist"; sourceTree = "<group>"; };
@@ -397,7 +256,6 @@
26CDCED112E702D8004FC66B /* PSMTabStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSMTabStyle.h; sourceTree = "<group>"; };
26CDCED212E702D8004FC66B /* PSMUnifiedTabStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSMUnifiedTabStyle.h; sourceTree = "<group>"; };
26CDCED312E702D8004FC66B /* PSMUnifiedTabStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSMUnifiedTabStyle.m; sourceTree = "<group>"; };
- 26CDCEFF12E70438004FC66B /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
26CDCFDC12E706FE004FC66B /* AquaTabClose_Front.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AquaTabClose_Front.png; sourceTree = "<group>"; };
26CDCFDD12E706FF004FC66B /* AquaTabClose_Front_Pressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AquaTabClose_Front_Pressed.png; sourceTree = "<group>"; };
26CDCFDE12E706FF004FC66B /* AquaTabClose_Front_Rollover.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AquaTabClose_Front_Rollover.png; sourceTree = "<group>"; };
@@ -418,26 +276,13 @@
26EC3C4312ED8202000A960C /* HistoryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HistoryView.m; sourceTree = "<group>"; };
26EC3F1612EF0CBD000A960C /* FormSelectMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormSelectMenu.h; sourceTree = "<group>"; };
26EC3F1712EF0CBD000A960C /* FormSelectMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FormSelectMenu.m; sourceTree = "<group>"; };
- 8D1107320486CEB800E47090 /* NetSurf.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NetSurf.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 8D11072E0486CEB800E47090 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
- 26CDCF0012E70438004FC66B /* Carbon.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
- 8D1107320486CEB800E47090 /* NetSurf.app */,
+ 2636299412F699250048542C /* NetSurf.app */,
);
name = Products;
sourceTree = "<group>";
@@ -653,17 +498,17 @@
path = ../utils;
sourceTree = SOURCE_ROOT;
};
- 262711B112DDDCB800B2FA62 /* Build Configurations */ = {
- isa = PBXGroup;
- children = (
- 262711C212DDDDC300B2FA62 /* NetSurf.xcconfig */,
- 262711BE12DDDD1500B2FA62 /* release.xcconfig */,
- 262711B212DDDCB800B2FA62 /* debug.xcconfig */,
- 262711B412DDDCB800B2FA62 /* local.xcconfig */,
- 262711D412DDDEEE00B2FA62 /* common.xcconfig */,
- );
- name = "Build Configurations";
- path = config;
+ 263629B212F69A080048542C /* Makefiles */ = {
+ isa = PBXGroup;
+ children = (
+ 263629BC12F69A760048542C /* Makefile */,
+ 263629B712F69A3C0048542C /* Makefile.target */,
+ 263629B312F69A290048542C /* Makefile.config */,
+ 263629B412F69A290048542C /* Makefile.defaults */,
+ 263629B512F69A290048542C /* Makefile.resources */,
+ 263629B612F69A290048542C /* Makefile.sources */,
+ );
+ name = Makefiles;
sourceTree = "<group>";
};
265F303F12D6637E0048B600 /* Cocoa Frontend */ = {
@@ -837,8 +682,8 @@
26CDD26812E74461004FC66B /* NSApplication */ = {
isa = PBXGroup;
children = (
- 26121DD712D703F400E10F91 /* NetSurfApp.h */,
- 26121DD812D703F400E10F91 /* NetSurfApp.m */,
+ 263629C812F69B120048542C /* NetsurfApp.h */,
+ 263629C912F69B120048542C /* NetsurfApp.m */,
26AFE97A12DF514C005AD082 /* NetSurfAppDelegate.h */,
26AFE97B12DF514C005AD082 /* NetSurfAppDelegate.m */,
);
@@ -848,6 +693,7 @@
26CDD26912E7446E004FC66B /* Platform Interface */ = {
isa = PBXGroup;
children = (
+ 263629CA12F69B120048542C /* system_colour.m */,
264C344112F0987E00D11246 /* gui.h */,
265F311912D663F50048B600 /* gui.m */,
261223CB12D7805300E10F91 /* plotter.h */,
@@ -874,44 +720,30 @@
children = (
265F303F12D6637E0048B600 /* Cocoa Frontend */,
26CDD23E12E743A3004FC66B /* NetSurf */,
- 262711B112DDDCB800B2FA62 /* Build Configurations */,
- 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 263629B212F69A080048542C /* Makefiles */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = Untitled;
- sourceTree = "<group>";
- };
- 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 26CDCEFF12E70438004FC66B /* Carbon.framework */,
- 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
- );
- name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
-/* Begin PBXNativeTarget section */
- 8D1107260486CEB800E47090 /* NetSurf */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NetSurf" */;
+/* Begin PBXLegacyTarget section */
+ 2636298F12F698E00048542C /* NetSurf */ = {
+ isa = PBXLegacyTarget;
+ buildArgumentsString = "$(ACTION) MKDIR=\"mkdir -p\"";
+ buildConfigurationList = 2636299512F699250048542C /* Build configuration list for PBXLegacyTarget "NetSurf" */;
buildPhases = (
- 8D1107290486CEB800E47090 /* Resources */,
- 8D11072C0486CEB800E47090 /* Sources */,
- 8D11072E0486CEB800E47090 /* Frameworks */,
- );
- buildRules = (
- );
+ );
+ buildToolPath = /usr/bin/make;
+ buildWorkingDirectory = "$(SRCROOT)/..";
dependencies = (
);
name = NetSurf;
- productInstallPath = "$(HOME)/Applications";
- productName = Untitled;
- productReference = 8D1107320486CEB800E47090 /* NetSurf.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
+ passBuildSettingsInEnvironment = 1;
+ productName = NetSurf;
+ };
+/* End PBXLegacyTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
@@ -920,7 +752,7 @@
BuildIndependentTargetsInParallel = YES;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "NetSurf" */;
- compatibilityVersion = "Xcode 3.0";
+ compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
@@ -938,168 +770,10 @@
projectDirPath = "";
projectRoot = "";
targets = (
- 8D1107260486CEB800E47090 /* NetSurf */,
+ 2636298F12F698E00048542C /* NetSurf */,
);
};
/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8D1107290486CEB800E47090 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 26121DA912D700B800E10F91 /* MainMenu.xib in Resources */,
- 26121EAC12D70E0A00E10F91 /* Browser.xib in Resources */,
- 2612265A12D7ACB500E10F91 /* default.css in Resources */,
- 2612265C12D7ACB500E10F91 /* quirks.css in Resources */,
- 2612266D12D7AD6800E10F91 /* adblock.css in Resources */,
- 2612269112D7AE4100E10F91 /* Messages in Resources */,
- 26AFE63F12DDEB0A005AD082 /* NetSurf.icns in Resources */,
- 26AFEAF112E042F9005AD082 /* DownloadWindow.xib in Resources */,
- 26CDCFE512E706FF004FC66B /* AquaTabClose_Front.png in Resources */,
- 26CDCFE612E706FF004FC66B /* AquaTabClose_Front_Pressed.png in Resources */,
- 26CDCFE712E706FF004FC66B /* AquaTabClose_Front_Rollover.png in Resources */,
- 26CDCFE812E706FF004FC66B /* AquaTabCloseDirty_Front.png in Resources */,
- 26CDCFE912E706FF004FC66B /* AquaTabCloseDirty_Front_Pressed.png in Resources */,
- 26CDCFEA12E706FF004FC66B /* AquaTabCloseDirty_Front_Rollover.png in Resources */,
- 26CDCFEB12E706FF004FC66B /* AquaTabNew.png in Resources */,
- 26CDCFEC12E706FF004FC66B /* AquaTabNewPressed.png in Resources */,
- 26CDCFED12E706FF004FC66B /* AquaTabNewRollover.png in Resources */,
- 26CDCFF312E70AD1004FC66B /* BrowserWindow.xib in Resources */,
- 26ABD61F12F02EB900407161 /* overflowImage.png in Resources */,
- 26ABD62012F02EB900407161 /* overflowImagePressed.png in Resources */,
- 26ABD62112F02EB900407161 /* pi.png in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 8D11072C0486CEB800E47090 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 260F200A12D620E800D9B07F /* content.c in Sources */,
- 260F200B12D620E800D9B07F /* dirlist.c in Sources */,
- 260F200C12D620E800D9B07F /* fetch.c in Sources */,
- 260F200D12D620E800D9B07F /* fetch_curl.c in Sources */,
- 260F200E12D620E800D9B07F /* fetch_data.c in Sources */,
- 260F200F12D620E800D9B07F /* fetch_file.c in Sources */,
- 260F201012D620E800D9B07F /* hlcache.c in Sources */,
- 260F201112D620E800D9B07F /* llcache.c in Sources */,
- 260F201212D620E800D9B07F /* urldb.c in Sources */,
- 260F201312D620E800D9B07F /* css.c in Sources */,
- 260F201412D620E800D9B07F /* dump.c in Sources */,
- 260F201512D620E800D9B07F /* internal.c in Sources */,
- 260F201612D620E800D9B07F /* select.c in Sources */,
- 260F201712D620E800D9B07F /* utils.c in Sources */,
- 260F201812D620E800D9B07F /* browser.c in Sources */,
- 260F201912D620E800D9B07F /* cookies.c in Sources */,
- 260F201A12D620E800D9B07F /* download.c in Sources */,
- 260F201B12D620E800D9B07F /* frames.c in Sources */,
- 260F201C12D620E800D9B07F /* history_core.c in Sources */,
- 260F201D12D620E800D9B07F /* history_global_core.c in Sources */,
- 260F201E12D620E800D9B07F /* hotlist.c in Sources */,
- 260F201F12D620E800D9B07F /* knockout.c in Sources */,
- 260F202012D620E800D9B07F /* mouse.c in Sources */,
- 260F202112D620E800D9B07F /* netsurf.c in Sources */,
- 260F202212D620E800D9B07F /* options.c in Sources */,
- 260F202312D620E800D9B07F /* plot_style.c in Sources */,
- 260F202412D620E800D9B07F /* print.c in Sources */,
- 260F202512D620E800D9B07F /* save_complete.c in Sources */,
- 260F202612D620E800D9B07F /* font_haru.c in Sources */,
- 260F202712D620E800D9B07F /* pdf_plotters.c in Sources */,
- 260F202912D620E800D9B07F /* save_text.c in Sources */,
- 260F202A12D620E800D9B07F /* scroll.c in Sources */,
- 260F202B12D620E800D9B07F /* search.c in Sources */,
- 260F202C12D620E800D9B07F /* searchweb.c in Sources */,
- 260F202D12D620E800D9B07F /* selection.c in Sources */,
- 260F202E12D620E800D9B07F /* sslcert.c in Sources */,
- 260F202F12D620E800D9B07F /* textarea.c in Sources */,
- 260F203012D620E800D9B07F /* textinput.c in Sources */,
- 260F203112D620E800D9B07F /* tree.c in Sources */,
- 260F203212D620E800D9B07F /* tree_url_node.c in Sources */,
- 260F203312D620E800D9B07F /* version.c in Sources */,
- 260F203A12D620E800D9B07F /* box.c in Sources */,
- 260F203B12D620E800D9B07F /* box_construct.c in Sources */,
- 260F203C12D620E800D9B07F /* box_normalise.c in Sources */,
- 260F203D12D620E800D9B07F /* favicon.c in Sources */,
- 260F203E12D620E800D9B07F /* font.c in Sources */,
- 260F203F12D620E800D9B07F /* form.c in Sources */,
- 260F204012D620E800D9B07F /* html.c in Sources */,
- 260F204112D620E800D9B07F /* html_interaction.c in Sources */,
- 260F204212D620E800D9B07F /* html_redraw.c in Sources */,
- 260F204312D620E800D9B07F /* hubbub_binding.c in Sources */,
- 260F204412D620E800D9B07F /* imagemap.c in Sources */,
- 260F204512D620E800D9B07F /* layout.c in Sources */,
- 260F204612D620E800D9B07F /* list.c in Sources */,
- 260F204712D620E800D9B07F /* table.c in Sources */,
- 260F204812D620E800D9B07F /* textplain.c in Sources */,
- 260F204912D620E800D9B07F /* base64.c in Sources */,
- 260F204A12D620E800D9B07F /* container.c in Sources */,
- 260F204B12D620E800D9B07F /* filename.c in Sources */,
- 260F204C12D620E800D9B07F /* findresource.c in Sources */,
- 260F204D12D620E800D9B07F /* hashtable.c in Sources */,
- 260F204E12D620E800D9B07F /* http.c in Sources */,
- 260F204F12D620E800D9B07F /* locale.c in Sources */,
- 260F205012D620E800D9B07F /* log.c in Sources */,
- 260F205212D620E800D9B07F /* memdebug.c in Sources */,
- 260F205312D620E800D9B07F /* messages.c in Sources */,
- 260F205412D620E800D9B07F /* talloc.c in Sources */,
- 260F205712D620E800D9B07F /* url.c in Sources */,
- 260F205812D620E800D9B07F /* useragent.c in Sources */,
- 260F205912D620E800D9B07F /* utf8.c in Sources */,
- 260F205A12D620E800D9B07F /* utils.c in Sources */,
- 265F311A12D663F50048B600 /* gui.m in Sources */,
- 265F314812D666660048B600 /* plotter.m in Sources */,
- 265F316212D667E10048B600 /* schedule.m in Sources */,
- 265F316712D668130048B600 /* thumbnail.m in Sources */,
- 265F317012D668790048B600 /* fetch.m in Sources */,
- 265F319112D668DB0048B600 /* url.m in Sources */,
- 265F31C512D66A0D0048B600 /* save.m in Sources */,
- 265F31DF12D66A890048B600 /* bmp.c in Sources */,
- 265F31E012D66A890048B600 /* gif.c in Sources */,
- 265F31E112D66A890048B600 /* ico.c in Sources */,
- 265F31E212D66A890048B600 /* jpeg.c in Sources */,
- 265F31E312D66A890048B600 /* mng.c in Sources */,
- 265F31E412D66A890048B600 /* nssprite.c in Sources */,
- 265F31E512D66A890048B600 /* png.c in Sources */,
- 265F31E612D66A890048B600 /* rsvg.c in Sources */,
- 265F31E712D66A890048B600 /* svg.c in Sources */,
- 265F31E812D66A890048B600 /* webp.c in Sources */,
- 265F31EC12D66B190048B600 /* bitmap.m in Sources */,
- 265F320612D66C200048B600 /* utf8.m in Sources */,
- 265F321412D66CD90048B600 /* utils.m in Sources */,
- 265F321F12D66D510048B600 /* font.m in Sources */,
- 26121DD912D703F400E10F91 /* NetSurfApp.m in Sources */,
- 26121EFD12D7132100E10F91 /* BrowserView.m in Sources */,
- 2622F1D712DCD84600CD5A62 /* TreeView.m in Sources */,
- 26AFE8E412DF4200005AD082 /* ScrollableView.m in Sources */,
- 26AFE97C12DF514C005AD082 /* NetSurfAppDelegate.m in Sources */,
- 26AFEAEB12E04253005AD082 /* DownloadWindowController.m in Sources */,
- 26AFED0412E09916005AD082 /* selection.m in Sources */,
- 26CDCED412E702D8004FC66B /* NSBezierPath_AMShading.m in Sources */,
- 26CDCED512E702D8004FC66B /* NSString_AITruncation.m in Sources */,
- 26CDCED912E702D8004FC66B /* PSMOverflowPopUpButton.m in Sources */,
- 26CDCEDA12E702D8004FC66B /* PSMProgressIndicator.m in Sources */,
- 26CDCEDB12E702D8004FC66B /* PSMRolloverButton.m in Sources */,
- 26CDCEDC12E702D8004FC66B /* PSMTabBarCell.m in Sources */,
- 26CDCEDD12E702D8004FC66B /* PSMTabBarControl.m in Sources */,
- 26CDCEDE12E702D8004FC66B /* PSMTabBarController.m in Sources */,
- 26CDCEDF12E702D8004FC66B /* PSMTabDragAssistant.m in Sources */,
- 26CDCEE012E702D8004FC66B /* PSMTabDragView.m in Sources */,
- 26CDCEE112E702D8004FC66B /* PSMTabDragWindow.m in Sources */,
- 26CDCEE212E702D8004FC66B /* PSMTabDragWindowController.m in Sources */,
- 26CDCEE312E702D8004FC66B /* PSMUnifiedTabStyle.m in Sources */,
- 26CDD00312E70F56004FC66B /* BrowserWindowController.m in Sources */,
- 26CDD0F612E726E0004FC66B /* BrowserViewController.m in Sources */,
- 26EC3B6A12ED62C0000A960C /* URLFieldCell.m in Sources */,
- 26EC3C4412ED8202000A960C /* HistoryView.m in Sources */,
- 26EC3F1812EF0CBD000A960C /* FormSelectMenu.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
2612268F12D7AE4100E10F91 /* Messages */ = {
@@ -1117,42 +791,47 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
- C01FCF4B08A954540054247B /* Debug */ = {
+ 2636299012F698E10048542C /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 262711C212DDDDC300B2FA62 /* NetSurf.xcconfig */;
buildSettings = {
+ PRODUCT_NAME = NetSurf;
};
name = Debug;
};
- C01FCF4C08A954540054247B /* Release */ = {
+ 2636299112F698E10048542C /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 262711C212DDDDC300B2FA62 /* NetSurf.xcconfig */;
buildSettings = {
+ MKDIR = "mkdir -p";
+ PRODUCT_NAME = NetSurf;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 262711B212DDDCB800B2FA62 /* debug.xcconfig */;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx10.5;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 262711BE12DDDD1500B2FA62 /* release.xcconfig */;
buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ ONLY_ACTIVE_ARCH = NO;
+ SDKROOT = macosx10.5;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "NetSurf" */ = {
+ 2636299512F699250048542C /* Build configuration list for PBXLegacyTarget "NetSurf" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- C01FCF4B08A954540054247B /* Debug */,
- C01FCF4C08A954540054247B /* Release */,
+ 2636299012F698E10048542C /* Debug */,
+ 2636299112F698E10048542C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
Modified: trunk/netsurf/cocoa/bitmap.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/bitmap.m?rev=11558&...
==============================================================================
--- trunk/netsurf/cocoa/bitmap.m (original)
+++ trunk/netsurf/cocoa/bitmap.m Mon Jan 31 01:57:52 2011
@@ -31,7 +31,7 @@
#define ALPHA_OFFSET (3)
static CGImageRef cocoa_prepare_bitmap( void *bitmap );
-static NSMapTable *cocoa_get_bitmap_cache();
+static NSMapTable *cocoa_get_bitmap_cache( void );
int bitmap_get_width(void *bitmap)
{
@@ -175,7 +175,7 @@
return result;
}
-static inline NSMapTable *cocoa_get_bitmap_cache()
+static inline NSMapTable *cocoa_get_bitmap_cache( void )
{
static NSMapTable *cache = nil;
if (cache == nil) {
Removed: trunk/netsurf/cocoa/config/NetSurf.xcconfig
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/config/NetSurf.xcco...
==============================================================================
--- trunk/netsurf/cocoa/config/NetSurf.xcconfig (original)
+++ trunk/netsurf/cocoa/config/NetSurf.xcconfig (removed)
@@ -1,15 +1,0 @@
-INSTALL_PATH = $(HOME)/Applications
-INFOPLIST_FILE = res/NetSurf-Info.plist
-GCC_PREFIX_HEADER = Prefix.pch
-GCC_PRECOMPILE_PREFIX_HEADER = YES
-GCC_MODEL_TUNING = G5
-ALWAYS_SEARCH_USER_PATHS = NO
-PRODUCT_NAME = NetSurf
-
-LOCAL_CONFIG_CFLAGS = -I/usr/local/include -I/usr/include/libxml2 -I/usr/X11/include -DWITH_PNG
-LOCAL_CONFIG_LDFLAGS = -L/usr/local/lib -lxml2 -lz -lpthread -licucore -lm -lssl -lhubbub -lcss -lcrypto -lparserutils -lwapcaplet -liconv -lcurl -L/usr/X11/lib -lpng
-
-#include "local.xcconfig"
-
-OTHER_LDFLAGS = $(inherited) $(LOCAL_CONFIG_LDFLAGS)
-OTHER_CFLAGS = $(inherited) $(LOCAL_CONFIG_CFLAGS)
Removed: trunk/netsurf/cocoa/config/common.xcconfig
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/config/common.xccon...
==============================================================================
--- trunk/netsurf/cocoa/config/common.xcconfig (original)
+++ trunk/netsurf/cocoa/config/common.xcconfig (removed)
@@ -1,14 +1,0 @@
-ARCHS = $(ARCHS_STANDARD_32_64_BIT)
-SDKROOT = macosx10.5
-GCC_VERSION =
-OTHER_LDFLAGS =
-PREBINDING = NO
-HEADER_SEARCH_PATHS = ${SRCROOT}/../
-GCC_C_LANGUAGE_STANDARD = gnu99
-
-GCC_WARN_ABOUT_RETURN_TYPE = YES
-GCC_WARN_UNUSED_VARIABLE = YES
-GCC_WARN_MISSING_PARENTHESES = YES
-GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES
-GCC_WARN_UNDECLARED_SELECTOR = YES
-GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
Removed: trunk/netsurf/cocoa/config/debug.xcconfig
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/config/debug.xcconf...
==============================================================================
--- trunk/netsurf/cocoa/config/debug.xcconfig (original)
+++ trunk/netsurf/cocoa/config/debug.xcconfig (removed)
@@ -1,7 +1,0 @@
-#include "common.xcconfig"
-
-ONLY_ACTIVE_ARCH = YES
-GCC_OPTIMIZATION_LEVEL = 0
-COPY_PHASE_STRIP = NO
-GCC_ENABLE_FIX_AND_CONTINUE = YES
-GCC_DYNAMIC_NO_PIC = NO
Removed: trunk/netsurf/cocoa/config/detect.sh
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/config/detect.sh?re...
==============================================================================
--- trunk/netsurf/cocoa/config/detect.sh (original)
+++ trunk/netsurf/cocoa/config/detect.sh (removed)
@@ -1,155 +1,0 @@
-#!/bin/sh
-
-check_pkgconfig() {
- if ! which pkg-config > /dev/null
- then
- echo "Error: install pkg-config (and make sure its in your path)" 1>&2
- exit 1
- fi
-}
-
-CFLAGS=()
-LDFLAGS=()
-OPTIONS=()
-
-add_cflags() {
- CFLAGS=("${CFLAGS[@]}" "$@")
-}
-
-add_ldflags() {
- LDFLAGS=("${LDFLAGS[@]}" "$@")
-}
-
-package() {
- if ! pkg-config $1
- then
- return 1
- else
- add_cflags `pkg-config --cflags $1`
- add_ldflags `pkg-config --libs $1`
-
- return 0
- fi
-}
-
-
-check_required() {
- if ! package $1
- then
- echo "Error: package '$1' is required" 1>&2
- exit 1
- fi
- return 0
-}
-
-check_required_tool() {
- if ! $1 --version > /dev/null
- then
- echo "Error: package '$2' is required" 1>&2
- exit 1
- fi
-
- add_cflags `$1 --cflags`
- add_ldflags `$1 --libs`
-
- return 0
-}
-
-check_optional() {
- if package $2
- then
- add_cflags -D$3
- OPTIONS=("${OPTIONS[@]}" "$1")
- return 0
- else
- return 1
- fi
-}
-
-help() {
- echo "options:"
- echo " --with-jpeg=<prefix> Use libjpeg found at <prefix>"
- echo " --with-mng=<prefiy> Use libmng found at <prefix>"
- echo ""
- exit 0
-}
-
-
-parse_cmdline() {
- while test -n "$1" ; do
- case "$1" in
- --help|-h)
- echo "configure script for cocoa netsurf"
- help
- exit 0
- ;;
-
- --with-*=*)
- name=`expr "$1" : '--with-\(.*\)=.*'`
- value=`expr "$1" : '--with-.*=\(.*\)'`
- eval "USE_$name='$value'"
- ;;
-
- *)
- echo "Error: invalid argument '$1'" 1>&2
- help 1>&2
- exit 1
- ;;
-
- esac
- shift
- done
-}
-
-manual_config() {
- var="USE_$1"
- PREFIX=${!var}
- if test -n "$PREFIX" ; then
- OPTIONS=("${OPTIONS[@]}" "$1")
- add_cflags -D$2 "-I$PREFIX/include"
- add_ldflags "-L$PREFIX/lib" "-l$3"
- fi
-}
-
-parse_cmdline "$@"
-
-check_pkgconfig
-
-# Required libraries
-check_required libhubbub
-check_required libcss
-check_required libparserutils
-check_required libwapcaplet
-check_required libcurl
-check_required openssl
-check_required_tool xml2-config libxml2
-
-# Optional libraries
-check_optional gif libnsgif WITH_GIF
-check_optional bmp libnsbmp WITH_BMP
-check_optional rsvg librsvg-2.0 WITH_RSVG
-check_optional svgtiny libsvgtiny WITH_NS_SVG
-check_optional rosprite librosprite WITH_NSSPRITE
-
-
-# Optional libraries witout pkg-config information
-manual_config jpeg WITH_JPEG jpeg
-manual_config mng WITH_MNG mng
-
-# OS X provides libpng in /usr/X11
-add_cflags -DWITH_PNG -I/usr/X11/include
-add_ldflags -L/usr/X11/lib -lpng
-
-# OS X provides libiconv
-add_ldflags -liconv
-
-##
-# Generate config file
-
-cat << EOF > local.xcconfig
-// Local configuration generated on `hostname` at `date`
-// Activated options: ${OPTIONS[@]}
-
-LOCAL_CONFIG_CFLAGS=${CFLAGS[@]}
-LOCAL_CONFIG_LDFLAGS=${LDFLAGS[@]}
-EOF
Removed: trunk/netsurf/cocoa/config/release.xcconfig
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/config/release.xcco...
==============================================================================
--- trunk/netsurf/cocoa/config/release.xcconfig (original)
+++ trunk/netsurf/cocoa/config/release.xcconfig (removed)
@@ -1,3 +1,0 @@
-#include "common.xcconfig"
-
-DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
Modified: trunk/netsurf/cocoa/font.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/font.m?rev=11558&r1...
==============================================================================
--- trunk/netsurf/cocoa/font.m (original)
+++ trunk/netsurf/cocoa/font.m Mon Jan 31 01:57:52 2011
@@ -37,7 +37,6 @@
static CGFloat cocoa_layout_width_chars( NSLayoutManager *layout, size_t characters );
static NSUInteger cocoa_glyph_for_location( NSLayoutManager *layout, CGFloat x );
static size_t cocoa_bytes_for_characters( const char *string, size_t characters );
-static NSString *cocoa_string_from_utf8_characters( const char *string, size_t characters );
static NSDictionary *cocoa_font_attributes( const plot_font_style_t *style );
static NSTextStorage *cocoa_text_storage = nil;
@@ -185,7 +184,7 @@
}
static NSString *oldString = 0;
- static plot_font_style_t oldStyle = { 0 };
+ static plot_font_style_t oldStyle = { 0, 0, 0, 0, 0, 0 };
const bool styleChanged = memcmp( style, &oldStyle, sizeof oldStyle ) != 0;
Modified: trunk/netsurf/cocoa/plotter.m
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/plotter.m?rev=11558...
==============================================================================
--- trunk/netsurf/cocoa/plotter.m (original)
+++ trunk/netsurf/cocoa/plotter.m Mon Jan 31 01:57:52 2011
@@ -29,7 +29,7 @@
static void cocoa_plot_render_path(NSBezierPath *path,const plot_style_t *pstyle);
static void cocoa_plot_path_set_stroke_pattern(NSBezierPath *path,const plot_style_t *pstyle);
-static void inline cocoa_center_pixel( bool x, bool y );
+static inline void cocoa_center_pixel( bool x, bool y );
static NSRect cocoa_plot_clip_rect;
@@ -208,13 +208,17 @@
while (n--) {
switch ((int)*p++) {
- case PLOTTER_PATH_MOVE:
- [path moveToPoint: NEXT_POINT()];
+ case PLOTTER_PATH_MOVE: {
+ const NSPoint pt = NEXT_POINT();
+ [path moveToPoint: pt];
break;
+ }
- case PLOTTER_PATH_LINE:
- [path lineToPoint: NEXT_POINT()];
+ case PLOTTER_PATH_LINE: {
+ const NSPoint pt = NEXT_POINT();
+ [path lineToPoint: pt];
break;
+ }
case PLOTTER_PATH_BEZIER: {
const NSPoint cp1 = NEXT_POINT();
Modified: trunk/netsurf/utils/log.c
URL: http://source.netsurf-browser.org/trunk/netsurf/utils/log.c?rev=11558&r1=...
==============================================================================
--- trunk/netsurf/utils/log.c (original)
+++ trunk/netsurf/utils/log.c Mon Jan 31 01:57:52 2011
@@ -42,6 +42,6 @@
timeval_subtract(&tv, &now_tv, &start_tv);
- snprintf(buff, sizeof(buff),"(%ld.%ld)", tv.tv_sec, tv.tv_usec);
+ snprintf(buff, sizeof(buff),"(%ld.%ld)", (long)tv.tv_sec, (long)tv.tv_usec);
return buff;
}
12 years, 3 months
r11557 jmb - in /trunk/libcss: include/libcss/ src/ src/parse/ src/select/ src/utils/ test/ test/data/parse/
by netsurf@semichrome.net
Author: jmb
Date: Sun Jan 30 18:18:15 2011
New Revision: 11557
URL: http://source.netsurf-browser.org?rev=11557&view=rev
Log:
CSS3 Selectors
Added:
trunk/libcss/test/data/parse/nth.dat
Modified:
trunk/libcss/include/libcss/select.h
trunk/libcss/src/parse/language.c
trunk/libcss/src/parse/propstrings.c
trunk/libcss/src/parse/propstrings.h
trunk/libcss/src/select/select.c
trunk/libcss/src/select/select.h
trunk/libcss/src/stylesheet.c
trunk/libcss/src/stylesheet.h
trunk/libcss/src/utils/utils.c
trunk/libcss/src/utils/utils.h
trunk/libcss/test/data/parse/INDEX
trunk/libcss/test/data/parse/selectors.dat
trunk/libcss/test/dump.h
trunk/libcss/test/parse-auto.c
trunk/libcss/test/select-auto.c
Modified: trunk/libcss/include/libcss/select.h
URL: http://source.netsurf-browser.org/trunk/libcss/include/libcss/select.h?re...
==============================================================================
--- trunk/libcss/include/libcss/select.h (original)
+++ trunk/libcss/include/libcss/select.h Sun Jan 30 18:18:15 2011
@@ -63,6 +63,8 @@
lwc_string *name, void **parent);
css_error (*named_sibling_node)(void *pw, void *node,
lwc_string *name, void **sibling);
+ css_error (*named_generic_sibling_node)(void *pw, void *node,
+ lwc_string *name, void **sibling);
css_error (*parent_node)(void *pw, void *node, void **parent);
css_error (*sibling_node)(void *pw, void *node, void **sibling);
@@ -84,13 +86,32 @@
css_error (*node_has_attribute_includes)(void *pw, void *node,
lwc_string *name, lwc_string *value,
bool *match);
+ css_error (*node_has_attribute_prefix)(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match);
+ css_error (*node_has_attribute_suffix)(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match);
+ css_error (*node_has_attribute_substring)(void *pw, void *node,
+ lwc_string *name, lwc_string *value,
+ bool *match);
- css_error (*node_is_first_child)(void *pw, void *node, bool *match);
+ css_error (*node_is_root)(void *pw, void *node, bool *match);
+ css_error (*node_count_siblings)(void *pw, void *node,
+ bool same_name, bool after, int32_t *count);
+ css_error (*node_is_empty)(void *pw, void *node, bool *match);
+
css_error (*node_is_link)(void *pw, void *node, bool *match);
css_error (*node_is_visited)(void *pw, void *node, bool *match);
css_error (*node_is_hover)(void *pw, void *node, bool *match);
css_error (*node_is_active)(void *pw, void *node, bool *match);
css_error (*node_is_focus)(void *pw, void *node, bool *match);
+
+ css_error (*node_is_enabled)(void *pw, void *node, bool *match);
+ css_error (*node_is_disabled)(void *pw, void *node, bool *match);
+ css_error (*node_is_checked)(void *pw, void *node, bool *match);
+
+ css_error (*node_is_target)(void *pw, void *node, bool *match);
css_error (*node_is_lang)(void *pw, void *node,
lwc_string *lang, bool *match);
Modified: trunk/libcss/src/parse/language.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/parse/language.c?rev=1...
==============================================================================
--- trunk/libcss/src/parse/language.c (original)
+++ trunk/libcss/src/parse/language.c Sun Jan 30 18:18:15 2011
@@ -63,10 +63,16 @@
static css_error parseAttrib(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector_detail *specific);
+static css_error parseNth(css_language *c,
+ const parserutils_vector *vector, int *ctx,
+ css_selector_detail_value *value);
static css_error parsePseudo(css_language *c,
const parserutils_vector *vector, int *ctx,
- css_selector_detail *specific);
+ bool in_not, css_selector_detail *specific);
static css_error parseSpecific(css_language *c,
+ const parserutils_vector *vector, int *ctx,
+ bool in_not, css_selector_detail *specific);
+static css_error parseAppendSpecific(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **parent);
static css_error parseSelectorSpecifics(css_language *c,
@@ -808,6 +814,7 @@
css_error parseClass(css_language *c, const parserutils_vector *vector,
int *ctx, css_selector_detail *specific)
{
+ css_selector_detail_value detail_value;
const css_token *token;
/* class -> '.' IDENT */
@@ -819,18 +826,28 @@
if (token == NULL || token->type != CSS_TOKEN_IDENT)
return CSS_INVALID;
+ detail_value.string = NULL;
+
return css__stylesheet_selector_detail_init(c->sheet,
- CSS_SELECTOR_CLASS, token->idata, NULL, specific);
+ CSS_SELECTOR_CLASS, token->idata, detail_value,
+ CSS_SELECTOR_DETAIL_VALUE_STRING, false, specific);
}
css_error parseAttrib(css_language *c, const parserutils_vector *vector,
int *ctx, css_selector_detail *specific)
{
+ css_selector_detail_value detail_value;
const css_token *token, *name, *value = NULL;
css_selector_type type = CSS_SELECTOR_ATTRIBUTE;
/* attrib -> '[' ws IDENT ws [
- * [ '=' | INCLUDES | DASHMATCH ] ws
+ * [ '=' |
+ * INCLUDES |
+ * DASHMATCH |
+ * PREFIXMATCH |
+ * SUFFIXMATCH |
+ * SUBSTRINGMATCH
+ * ] ws
* [ IDENT | STRING ] ws ]? ']'
*/
token = parserutils_vector_iterate(vector, ctx);
@@ -858,6 +875,12 @@
type = CSS_SELECTOR_ATTRIBUTE_INCLUDES;
else if (token->type == CSS_TOKEN_DASHMATCH)
type = CSS_SELECTOR_ATTRIBUTE_DASHMATCH;
+ else if (token->type == CSS_TOKEN_PREFIXMATCH)
+ type = CSS_SELECTOR_ATTRIBUTE_PREFIX;
+ else if (token->type == CSS_TOKEN_SUFFIXMATCH)
+ type = CSS_SELECTOR_ATTRIBUTE_SUFFIX;
+ else if (token->type == CSS_TOKEN_SUBSTRINGMATCH)
+ type = CSS_SELECTOR_ATTRIBUTE_SUBSTRING;
else
return CSS_INVALID;
@@ -877,136 +900,436 @@
return CSS_INVALID;
}
+ detail_value.string = value != NULL ? value->idata : NULL;
+
return css__stylesheet_selector_detail_init(c->sheet, type,
- name->idata, value != NULL ? value->idata : NULL,
- specific);
+ name->idata, detail_value,
+ CSS_SELECTOR_DETAIL_VALUE_STRING, false, specific);
+}
+
+css_error parseNth(css_language *c,
+ const parserutils_vector *vector, int *ctx,
+ css_selector_detail_value *value)
+{
+ const css_token *token;
+ bool match;
+
+ /* nth -> [ DIMENSION | IDENT ] ws [ [ CHAR ws ]? NUMBER ws ]?
+ * (e.g. DIMENSION: 2n-1, 2n- 1, 2n -1, 2n - 1)
+ * (e.g. IDENT: -n-1, -n- 1, -n -1, -n - 1)
+ * -> NUMBER ws
+ * -> IDENT(odd) ws
+ * -> IDENT(even) ws
+ */
+
+ token = parserutils_vector_iterate(vector, ctx);
+ if (token == NULL || (token->type != CSS_TOKEN_IDENT &&
+ token->type != CSS_TOKEN_NUMBER &&
+ token->type != CSS_TOKEN_DIMENSION))
+ return CSS_INVALID;
+
+ if (token->type == CSS_TOKEN_IDENT &&
+ lwc_string_caseless_isequal(token->idata,
+ c->strings[ODD], &match) == lwc_error_ok &&
+ match) {
+ /* Odd */
+ value->nth.a = 2;
+ value->nth.b = 1;
+ } else if (token->type == CSS_TOKEN_IDENT &&
+ lwc_string_caseless_isequal(token->idata,
+ c->strings[EVEN], &match) == lwc_error_ok &&
+ match) {
+ /* Even */
+ value->nth.a = 2;
+ value->nth.b = 0;
+ } else if (token->type == CSS_TOKEN_NUMBER) {
+ size_t consumed = 0;
+ css_fixed val = 0;
+
+ val = css__number_from_lwc_string(token->idata,
+ true, &consumed);
+ if (consumed != lwc_string_length(token->idata))
+ return CSS_INVALID;
+
+ value->nth.a = 0;
+ value->nth.b = FIXTOINT(val);
+ } else {
+ /* [ DIMENSION | IDENT ] ws [ [ CHAR ws ]? NUMBER ws ]?
+ *
+ * (e.g. DIMENSION: 2n-1, 2n- 1, 2n -1, 2n - 1)
+ * (e.g. IDENT: n, -n-1, -n- 1, -n -1, -n - 1)
+ */
+ size_t consumed = 0, len;
+ const char *data;
+ css_fixed a = 0, b = 0;
+ int sign = 1;
+ bool had_sign = false, had_b = false;
+
+ len = lwc_string_length(token->idata);
+ data = lwc_string_data(token->idata);
+
+ /* Compute a */
+ if (token->type == CSS_TOKEN_IDENT) {
+ if (len < 2) {
+ if (data[0] != 'n' && data[0] != 'N')
+ return CSS_INVALID;
+
+ /* n */
+ a = INTTOFIX(1);
+
+ data += 1;
+ len -= 1;
+ } else {
+ if (data[0] != '-' ||
+ (data[1] != 'n' && data[1] != 'N'))
+ return CSS_INVALID;
+
+ /* -n */
+ a = INTTOFIX(-1);
+
+ data += 2;
+ len -= 2;
+ }
+
+ if (len > 0) {
+ if (data[0] != '-')
+ return CSS_INVALID;
+
+ /* -n- */
+ sign = -1;
+ had_sign = true;
+
+ if (len > 1) {
+ /* Reject additional sign */
+ if (data[1] == '-' || data[1] == '+')
+ return CSS_INVALID;
+
+ /* -n-b */
+ b = css__number_from_string(
+ (const uint8_t *) data + 1,
+ len - 1,
+ true,
+ &consumed);
+ if (consumed != len - 1)
+ return CSS_INVALID;
+
+ had_b = true;
+ }
+ }
+ } else {
+ /* 2n */
+ a = css__number_from_lwc_string(token->idata,
+ true, &consumed);
+ if (consumed == 0 || (data[consumed] != 'n' &&
+ data[consumed] != 'N'))
+ return CSS_INVALID;
+
+ if (len - (++consumed) > 0) {
+ if (data[consumed] != '-')
+ return CSS_INVALID;
+
+ /* 2n- */
+ sign = -1;
+ had_sign = true;
+
+ if (len - (++consumed) > 0) {
+ /* Reject additional sign */
+ if (data[consumed] == '-' ||
+ data[consumed] == '+')
+ return CSS_INVALID;
+
+ /* 2n-b */
+ size_t bstart = consumed;
+
+ b = css__number_from_string(
+ (const uint8_t *) data + bstart,
+ len - bstart,
+ true,
+ &consumed);
+ if (consumed != len - bstart)
+ return CSS_INVALID;
+
+ had_b = true;
+ }
+ }
+ }
+
+ if (had_b == false) {
+ consumeWhitespace(vector, ctx);
+
+ /* Look for optional b : [ [ CHAR ws ]? NUMBER ws ]? */
+ token = parserutils_vector_peek(vector, *ctx);
+
+ if (had_sign == false && token != NULL &&
+ (tokenIsChar(token, '-') ||
+ tokenIsChar(token, '+'))) {
+ parserutils_vector_iterate(vector, ctx);
+
+ had_sign = true;
+
+ if (tokenIsChar(token, '-'))
+ sign = -1;
+
+ consumeWhitespace(vector, ctx);
+
+ token = parserutils_vector_peek(vector, *ctx);
+ }
+
+ /* Expect NUMBER */
+ if (token != NULL && token->type == CSS_TOKEN_NUMBER) {
+ parserutils_vector_iterate(vector, ctx);
+
+ /* If we've already seen a sign, ensure one
+ * does not occur at the start of this token
+ */
+ if (had_sign && lwc_string_length(
+ token->idata) > 0) {
+ data = lwc_string_data(token->idata);
+
+ if (data[0] == '-' || data[0] == '+')
+ return CSS_INVALID;
+ }
+
+ b = css__number_from_lwc_string(token->idata,
+ true, &consumed);
+ if (consumed != lwc_string_length(token->idata))
+ return CSS_INVALID;
+ }
+ }
+
+ value->nth.a = FIXTOINT(a);
+ value->nth.b = FIXTOINT(b) * sign;
+ }
+
+ consumeWhitespace(vector, ctx);
+
+ return CSS_OK;
}
css_error parsePseudo(css_language *c, const parserutils_vector *vector,
- int *ctx, css_selector_detail *specific)
-{
- const css_token *token, *name, *value = NULL;
- bool match = false;
- css_selector_type type;
-
- /* pseudo -> ':' [ IDENT | FUNCTION ws IDENT? ws ')' ] */
+ int *ctx, bool in_not, css_selector_detail *specific)
+{
+ static const struct
+ {
+ int index;
+ css_selector_type type;
+ } pseudo_lut[] = {
+ { FIRST_CHILD, CSS_SELECTOR_PSEUDO_CLASS },
+ { LINK, CSS_SELECTOR_PSEUDO_CLASS },
+ { VISITED, CSS_SELECTOR_PSEUDO_CLASS },
+ { HOVER, CSS_SELECTOR_PSEUDO_CLASS },
+ { ACTIVE, CSS_SELECTOR_PSEUDO_CLASS },
+ { FOCUS, CSS_SELECTOR_PSEUDO_CLASS },
+ { LANG, CSS_SELECTOR_PSEUDO_CLASS },
+ { LEFT, CSS_SELECTOR_PSEUDO_CLASS },
+ { RIGHT, CSS_SELECTOR_PSEUDO_CLASS },
+ { FIRST, CSS_SELECTOR_PSEUDO_CLASS },
+ { ROOT, CSS_SELECTOR_PSEUDO_CLASS },
+ { NTH_CHILD, CSS_SELECTOR_PSEUDO_CLASS },
+ { NTH_LAST_CHILD, CSS_SELECTOR_PSEUDO_CLASS },
+ { NTH_OF_TYPE, CSS_SELECTOR_PSEUDO_CLASS },
+ { NTH_LAST_OF_TYPE, CSS_SELECTOR_PSEUDO_CLASS },
+ { LAST_CHILD, CSS_SELECTOR_PSEUDO_CLASS },
+ { FIRST_OF_TYPE, CSS_SELECTOR_PSEUDO_CLASS },
+ { LAST_OF_TYPE, CSS_SELECTOR_PSEUDO_CLASS },
+ { ONLY_CHILD, CSS_SELECTOR_PSEUDO_CLASS },
+ { ONLY_OF_TYPE, CSS_SELECTOR_PSEUDO_CLASS },
+ { EMPTY, CSS_SELECTOR_PSEUDO_CLASS },
+ { TARGET, CSS_SELECTOR_PSEUDO_CLASS },
+ { ENABLED, CSS_SELECTOR_PSEUDO_CLASS },
+ { DISABLED, CSS_SELECTOR_PSEUDO_CLASS },
+ { CHECKED, CSS_SELECTOR_PSEUDO_CLASS },
+ { NOT, CSS_SELECTOR_PSEUDO_CLASS },
+
+ { FIRST_LINE, CSS_SELECTOR_PSEUDO_ELEMENT },
+ { FIRST_LETTER, CSS_SELECTOR_PSEUDO_ELEMENT },
+ { BEFORE, CSS_SELECTOR_PSEUDO_ELEMENT },
+ { AFTER, CSS_SELECTOR_PSEUDO_ELEMENT }
+ };
+ css_selector_detail_value detail_value;
+ css_selector_detail_value_type value_type =
+ CSS_SELECTOR_DETAIL_VALUE_STRING;
+ lwc_string *name;
+ const css_token *token;
+ bool match = false, require_element = false, negate = false;
+ uint32_t lut_idx;
+ css_selector_type type = CSS_SELECTOR_PSEUDO_CLASS;/* GCC's braindead */
+ css_error error;
+
+ /* pseudo -> ':' ':'? [ IDENT | FUNCTION ws any1 ws ')' ] */
+
+ detail_value.string = NULL;
token = parserutils_vector_iterate(vector, ctx);
if (token == NULL || tokenIsChar(token, ':') == false)
return CSS_INVALID;
+ /* Optional second colon before pseudo element names */
token = parserutils_vector_iterate(vector, ctx);
+ if (token != NULL && tokenIsChar(token, ':')) {
+ /* If present, we require a pseudo element */
+ require_element = true;
+
+ /* Consume subsequent token */
+ token = parserutils_vector_iterate(vector, ctx);
+ }
+
+ /* Expect IDENT or FUNCTION */
if (token == NULL || (token->type != CSS_TOKEN_IDENT &&
token->type != CSS_TOKEN_FUNCTION))
return CSS_INVALID;
- name = token;
+ name = token->idata;
+
+ /* Search lut for selector type */
+ for (lut_idx = 0; lut_idx < N_ELEMENTS(pseudo_lut); lut_idx++) {
+ if ((lwc_string_caseless_isequal(name,
+ c->strings[pseudo_lut[lut_idx].index],
+ &match) == lwc_error_ok) && match) {
+ type = pseudo_lut[lut_idx].type;
+ break;
+ }
+ }
+
+ /* Not found: invalid */
+ if (lut_idx == N_ELEMENTS(pseudo_lut))
+ return CSS_INVALID;
+
+ /* Required a pseudo element, but didn't find one: invalid */
+ if (require_element && type != CSS_SELECTOR_PSEUDO_ELEMENT)
+ return CSS_INVALID;
+
+ /* :not() and pseudo elements are not permitted in :not() */
+ if (in_not && (type == CSS_SELECTOR_PSEUDO_ELEMENT ||
+ pseudo_lut[lut_idx].index == NOT))
+ return CSS_INVALID;
if (token->type == CSS_TOKEN_FUNCTION) {
+ int fun_type = pseudo_lut[lut_idx].index;
+
consumeWhitespace(vector, ctx);
+ if (fun_type == LANG) {
+ /* IDENT */
+ token = parserutils_vector_iterate(vector, ctx);
+ if (token == NULL || token->type != CSS_TOKEN_IDENT)
+ return CSS_INVALID;
+
+ detail_value.string = token->idata;
+ value_type = CSS_SELECTOR_DETAIL_VALUE_STRING;
+
+ consumeWhitespace(vector, ctx);
+ } else if (fun_type == NTH_CHILD ||
+ fun_type == NTH_LAST_CHILD ||
+ fun_type == NTH_OF_TYPE ||
+ fun_type == NTH_LAST_OF_TYPE) {
+ /* an + b */
+ error = parseNth(c, vector, ctx, &detail_value);
+ if (error != CSS_OK)
+ return error;
+
+ value_type = CSS_SELECTOR_DETAIL_VALUE_NTH;
+ } else if (fun_type == NOT) {
+ /* element_name | specific */
+ token = parserutils_vector_peek(vector, *ctx);
+ if (token == NULL)
+ return CSS_INVALID;
+
+ if (token->type == CSS_TOKEN_IDENT ||
+ tokenIsChar(token, '*')) {
+ /* Have element name */
+ name = token->idata;
+
+ type = CSS_SELECTOR_ELEMENT;
+
+ detail_value.string = NULL;
+ value_type = CSS_SELECTOR_DETAIL_VALUE_STRING;
+
+ parserutils_vector_iterate(vector, ctx);
+ } else {
+ /* specific */
+ css_selector_detail det;
+
+ error = parseSpecific(c, vector, ctx, true,
+ &det);
+ if (error != CSS_OK)
+ return error;
+
+ name = det.name;
+ type = det.type;
+ detail_value = det.value;
+ value_type = det.value_type;
+ }
+
+ negate = true;
+
+ consumeWhitespace(vector, ctx);
+ }
+
token = parserutils_vector_iterate(vector, ctx);
-
- if (token != NULL && token->type == CSS_TOKEN_IDENT) {
- value = token;
-
- consumeWhitespace(vector, ctx);
-
- token = parserutils_vector_iterate(vector, ctx);
- }
-
if (token == NULL || tokenIsChar(token, ')') == false)
return CSS_INVALID;
}
- if ((lwc_string_caseless_isequal(
- name->idata, c->strings[FIRST_CHILD],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[LINK],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[VISITED],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[HOVER],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[ACTIVE],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[FOCUS],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[LANG],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[LEFT],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[RIGHT],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[FIRST],
- &match) == lwc_error_ok && match))
- type = CSS_SELECTOR_PSEUDO_CLASS;
- else if ((lwc_string_caseless_isequal(
- name->idata, c->strings[FIRST_LINE],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[FIRST_LETTER],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[BEFORE],
- &match) == lwc_error_ok && match) ||
- (lwc_string_caseless_isequal(
- name->idata, c->strings[AFTER],
- &match) == lwc_error_ok && match))
- type = CSS_SELECTOR_PSEUDO_ELEMENT;
- else
- return CSS_INVALID;
-
return css__stylesheet_selector_detail_init(c->sheet,
- type, name->idata, value != NULL ? value->idata : NULL,
- specific);
-}
-
-css_error parseSpecific(css_language *c,
+ type, name, detail_value, value_type, negate, specific);
+}
+
+css_error parseSpecific(css_language *c,
+ const parserutils_vector *vector, int *ctx,
+ bool in_not, css_selector_detail *specific)
+{
+ css_error error;
+ const css_token *token;
+
+ /* specific -> [ HASH | class | attrib | pseudo ] */
+
+ token = parserutils_vector_peek(vector, *ctx);
+ if (token == NULL)
+ return CSS_INVALID;
+
+ if (token->type == CSS_TOKEN_HASH) {
+ css_selector_detail_value detail_value;
+
+ detail_value.string = NULL;
+
+ error = css__stylesheet_selector_detail_init(c->sheet,
+ CSS_SELECTOR_ID, token->idata, detail_value,
+ CSS_SELECTOR_DETAIL_VALUE_STRING, false,
+ specific);
+ if (error != CSS_OK)
+ return error;
+
+ parserutils_vector_iterate(vector, ctx);
+ } else if (tokenIsChar(token, '.')) {
+ error = parseClass(c, vector, ctx, specific);
+ if (error != CSS_OK)
+ return error;
+ } else if (tokenIsChar(token, '[')) {
+ error = parseAttrib(c, vector, ctx, specific);
+ if (error != CSS_OK)
+ return error;
+ } else if (tokenIsChar(token, ':')) {
+ error = parsePseudo(c, vector, ctx, in_not, specific);
+ if (error != CSS_OK)
+ return error;
+ } else {
+ return CSS_INVALID;
+ }
+
+ return CSS_OK;
+}
+
+css_error parseAppendSpecific(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **parent)
{
css_error error;
- const css_token *token;
css_selector_detail specific;
- /* specific -> [ HASH | class | attrib | pseudo ] */
-
- token = parserutils_vector_peek(vector, *ctx);
- if (token == NULL)
- return CSS_INVALID;
-
- if (token->type == CSS_TOKEN_HASH) {
- error = css__stylesheet_selector_detail_init(c->sheet,
- CSS_SELECTOR_ID, token->idata, NULL, &specific);
- if (error != CSS_OK)
- return error;
-
- parserutils_vector_iterate(vector, ctx);
- } else if (tokenIsChar(token, '.')) {
- error = parseClass(c, vector, ctx, &specific);
- if (error != CSS_OK)
- return error;
- } else if (tokenIsChar(token, '[')) {
- error = parseAttrib(c, vector, ctx, &specific);
- if (error != CSS_OK)
- return error;
- } else if (tokenIsChar(token, ':')) {
- error = parsePseudo(c, vector, ctx, &specific);
- if (error != CSS_OK)
- return error;
- } else {
- return CSS_INVALID;
- }
+ error = parseSpecific(c, vector, ctx, false, &specific);
+ if (error != CSS_OK)
+ return error;
return css__stylesheet_selector_append_specific(c->sheet, parent,
&specific);
@@ -1024,8 +1347,9 @@
token->type != CSS_TOKEN_S &&
tokenIsChar(token, '+') == false &&
tokenIsChar(token, '>') == false &&
+ tokenIsChar(token, '~') == false &&
tokenIsChar(token, ',') == false) {
- error = parseSpecific(c, vector, ctx, parent);
+ error = parseAppendSpecific(c, vector, ctx, parent);
if (error != CSS_OK)
return error;
}
@@ -1066,7 +1390,7 @@
return error;
/* Ensure we have at least one specific selector */
- error = parseSpecific(c, vector, ctx, &selector);
+ error = parseAppendSpecific(c, vector, ctx, &selector);
if (error != CSS_OK) {
css__stylesheet_selector_destroy(c->sheet, selector);
return error;
@@ -1090,7 +1414,7 @@
const css_token *token;
css_combinator comb = CSS_COMBINATOR_NONE;
- /* combinator -> ws '+' ws | ws '>' ws | ws1 */
+ /* combinator -> ws '+' ws | ws '>' ws | ws '~' ws | ws1 */
UNUSED(c);
@@ -1099,6 +1423,8 @@
comb = CSS_COMBINATOR_SIBLING;
else if (tokenIsChar(token, '>'))
comb = CSS_COMBINATOR_PARENT;
+ else if (tokenIsChar(token, '~'))
+ comb = CSS_COMBINATOR_GENERIC_SIBLING;
else if (token->type == CSS_TOKEN_S)
comb = CSS_COMBINATOR_ANCESTOR;
else
@@ -1106,7 +1432,7 @@
parserutils_vector_iterate(vector, ctx);
- /* If we've seen a '+' or '>', we're done. */
+ /* If we've seen a '+', '>', or '~', we're done. */
if (comb != CSS_COMBINATOR_ANCESTOR)
break;
}
Modified: trunk/libcss/src/parse/propstrings.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/parse/propstrings.c?re...
==============================================================================
--- trunk/libcss/src/parse/propstrings.c (original)
+++ trunk/libcss/src/parse/propstrings.c Sun Jan 30 18:18:15 2011
@@ -36,6 +36,22 @@
{ "focus", SLEN("focus") },
{ "lang", SLEN("lang") },
{ "first", SLEN("first") },
+ { "root", SLEN("root") },
+ { "nth-child", SLEN("nth-child") },
+ { "nth-last-child", SLEN("nth-last-child") },
+ { "nth-of-type", SLEN("nth-of-type") },
+ { "nth-last-of-type", SLEN("nth-last-of-type") },
+ { "last-child", SLEN("last-child") },
+ { "first-of-type", SLEN("first-of-type") },
+ { "last-of-type", SLEN("last-of-type") },
+ { "only-child", SLEN("only-child") },
+ { "only-of-type", SLEN("only-of-type") },
+ { "empty", SLEN("empty") },
+ { "target", SLEN("target") },
+ { "enabled", SLEN("enabled") },
+ { "disabled", SLEN("disabled") },
+ { "checked", SLEN("checked") },
+ { "not", SLEN("not") },
{ "first-line", SLEN("first-line") },
{ "first-letter", SLEN("first-letter") },
@@ -338,6 +354,8 @@
{ "-libcss-center", SLEN("-libcss-center") },
{ "-libcss-right", SLEN("-libcss-right") },
{ "currentColor", SLEN("currentColor") },
+ { "odd", SLEN("odd") },
+ { "even", SLEN("even") },
{ "aliceblue", SLEN("aliceblue") },
{ "antiquewhite", SLEN("antiquewhite") },
Modified: trunk/libcss/src/parse/propstrings.h
URL: http://source.netsurf-browser.org/trunk/libcss/src/parse/propstrings.h?re...
==============================================================================
--- trunk/libcss/src/parse/propstrings.h (original)
+++ trunk/libcss/src/parse/propstrings.h Sun Jan 30 18:18:15 2011
@@ -24,6 +24,9 @@
/* Pseudo classes */
FIRST_CHILD, LINK, VISITED, HOVER, ACTIVE, FOCUS, LANG,
/* LEFT, RIGHT, -- already in properties */ FIRST,
+ ROOT, NTH_CHILD, NTH_LAST_CHILD, NTH_OF_TYPE, NTH_LAST_OF_TYPE,
+ LAST_CHILD, FIRST_OF_TYPE, LAST_OF_TYPE, ONLY_CHILD,
+ ONLY_OF_TYPE, EMPTY, TARGET, ENABLED, DISABLED, CHECKED, NOT,
/* Pseudo elements */
FIRST_LINE, FIRST_LETTER, BEFORE, AFTER,
@@ -85,7 +88,7 @@
W_RESIZE, LIBCSS_TEXT, WAIT, HELP, PROGRESS, SERIF, SANS_SERIF, CURSIVE,
FANTASY, MONOSPACE, MALE, FEMALE, CHILD, MIX, UNDERLINE, OVERLINE,
LINE_THROUGH, BLINK, RGB, RGBA, HSL, HSLA, LIBCSS_LEFT, LIBCSS_CENTER,
- LIBCSS_RIGHT, CURRENTCOLOR,
+ LIBCSS_RIGHT, CURRENTCOLOR, ODD, EVEN,
/* Named colours */
FIRST_COLOUR,
Modified: trunk/libcss/src/select/select.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/select/select.c?rev=11...
==============================================================================
--- trunk/libcss/src/select/select.c (original)
+++ trunk/libcss/src/select/select.c Sun Jan 30 18:18:15 2011
@@ -455,6 +455,38 @@
lwc_string_unref(state.active);
if (state.focus != NULL)
lwc_string_unref(state.focus);
+ if (state.nth_child != NULL)
+ lwc_string_unref(state.nth_child);
+ if (state.nth_last_child != NULL)
+ lwc_string_unref(state.nth_last_child);
+ if (state.nth_of_type != NULL)
+ lwc_string_unref(state.nth_of_type);
+ if (state.nth_last_of_type != NULL)
+ lwc_string_unref(state.nth_last_of_type);
+ if (state.last_child != NULL)
+ lwc_string_unref(state.last_child);
+ if (state.first_of_type != NULL)
+ lwc_string_unref(state.first_of_type);
+ if (state.last_of_type != NULL)
+ lwc_string_unref(state.last_of_type);
+ if (state.only_child != NULL)
+ lwc_string_unref(state.only_child);
+ if (state.only_of_type != NULL)
+ lwc_string_unref(state.only_of_type);
+ if (state.root != NULL)
+ lwc_string_unref(state.root);
+ if (state.empty != NULL)
+ lwc_string_unref(state.empty);
+ if (state.target != NULL)
+ lwc_string_unref(state.target);
+ if (state.lang != NULL)
+ lwc_string_unref(state.lang);
+ if (state.enabled != NULL)
+ lwc_string_unref(state.enabled);
+ if (state.disabled != NULL)
+ lwc_string_unref(state.disabled);
+ if (state.checked != NULL)
+ lwc_string_unref(state.checked);
if (state.first_line != NULL)
lwc_string_unref(state.first_line);
if (state.first_letter != NULL)
@@ -693,6 +725,102 @@
error = lwc_intern_string(
"focus", SLEN("focus"),
&state->focus);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "nth-child", SLEN("nth-child"),
+ &state->nth_child);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "nth-last-child", SLEN("nth-last-child"),
+ &state->nth_last_child);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "nth-of-type", SLEN("nth-of-type"),
+ &state->nth_of_type);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "nth-last-of-type", SLEN("nth-last-of-type"),
+ &state->nth_last_of_type);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "last-child", SLEN("last-child"),
+ &state->last_child);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "first-of-type", SLEN("first-of-type"),
+ &state->first_of_type);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "last-of-type", SLEN("last-of-type"),
+ &state->last_of_type);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "only-child", SLEN("only-child"),
+ &state->only_child);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "only-of-type", SLEN("only-of-type"),
+ &state->only_of_type);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "root", SLEN("root"),
+ &state->root);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "empty", SLEN("empty"),
+ &state->empty);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "target", SLEN("target"),
+ &state->target);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "lang", SLEN("lang"),
+ &state->lang);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "enabled", SLEN("enabled"),
+ &state->enabled);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "disabled", SLEN("disabled"),
+ &state->disabled);
+ if (error != lwc_error_ok)
+ return css_error_from_lwc_error(error);
+
+ error = lwc_intern_string(
+ "checked", SLEN("checked"),
+ &state->checked);
if (error != lwc_error_ok)
return css_error_from_lwc_error(error);
@@ -1075,6 +1203,11 @@
if (error != CSS_OK)
return error;
break;
+ case CSS_COMBINATOR_GENERIC_SIBLING:
+ error = state->handler->named_generic_sibling_node(
+ state->pw, n, selector->data.name, &n);
+ if (error != CSS_OK)
+ return error;
case CSS_COMBINATOR_NONE:
break;
}
@@ -1124,6 +1257,7 @@
return error;
break;
case CSS_COMBINATOR_SIBLING:
+ case CSS_COMBINATOR_GENERIC_SIBLING:
error = state->handler->sibling_node(state->pw, n, &n);
if (error != CSS_OK)
return error;
@@ -1194,6 +1328,23 @@
*pseudo_element = pseudo;
return CSS_OK;
+}
+
+static inline bool match_nth(int32_t a, int32_t b, int32_t count)
+{
+ if (a == 0) {
+ return count == b;
+ } else {
+ const int32_t delta = count - b;
+
+ /* (count - b) / a is positive or (count - b) is 0 */
+ if (((delta > 0) == (a > 0)) || delta == 0) {
+ /* (count - b) / a is integer */
+ return (delta % a == 0);
+ }
+
+ return false;
+ }
}
css_error match_detail(css_select_ctx *ctx, void *node,
@@ -1224,7 +1375,108 @@
break;
case CSS_SELECTOR_PSEUDO_CLASS:
if (detail->name == state->first_child) {
- error = state->handler->node_is_first_child(state->pw,
+ int32_t num_before = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, false, false, &num_before);
+ if (error == CSS_OK)
+ *match = (num_before == 0);
+ } else if (detail->name == state->nth_child) {
+ int32_t num_before = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, false, false, &num_before);
+ if (error == CSS_OK) {
+ int32_t a = detail->value.nth.a;
+ int32_t b = detail->value.nth.b;
+
+ *match = match_nth(a, b, num_before + 1);
+ }
+ } else if (detail->name == state->nth_last_child) {
+ int32_t num_after = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, false, true, &num_after);
+ if (error == CSS_OK) {
+ int32_t a = detail->value.nth.a;
+ int32_t b = detail->value.nth.b;
+
+ *match = match_nth(a, b, num_after + 1);
+ }
+ } else if (detail->name == state->nth_of_type) {
+ int32_t num_before = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, true, false, &num_before);
+ if (error == CSS_OK) {
+ int32_t a = detail->value.nth.a;
+ int32_t b = detail->value.nth.b;
+
+ *match = match_nth(a, b, num_before + 1);
+ }
+ } else if (detail->name == state->nth_last_of_type) {
+ int32_t num_after = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, true, true, &num_after);
+ if (error == CSS_OK) {
+ int32_t a = detail->value.nth.a;
+ int32_t b = detail->value.nth.b;
+
+ *match = match_nth(a, b, num_after + 1);
+ }
+ } else if (detail->name == state->last_child) {
+ int32_t num_after = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, false, true, &num_after);
+ if (error == CSS_OK)
+ *match = (num_after == 0);
+ } else if (detail->name == state->first_of_type) {
+ int32_t num_before = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, true, false, &num_before);
+ if (error == CSS_OK)
+ *match = (num_before == 0);
+ } else if (detail->name == state->last_of_type) {
+ int32_t num_after = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, true, true, &num_after);
+ if (error == CSS_OK)
+ *match = (num_after == 0);
+ } else if (detail->name == state->only_child) {
+ int32_t num_before = 0, num_after = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, false, false, &num_before);
+ if (error == CSS_OK) {
+ error = state->handler->node_count_siblings(
+ state->pw, node, false, true,
+ &num_after);
+ if (error == CSS_OK)
+ *match = (num_before == 0) &&
+ (num_after == 0);
+ }
+ } else if (detail->name == state->only_of_type) {
+ int32_t num_before = 0, num_after = 0;
+
+ error = state->handler->node_count_siblings(state->pw,
+ node, true, false, &num_before);
+ if (error == CSS_OK) {
+ error = state->handler->node_count_siblings(
+ state->pw, node, true, true,
+ &num_after);
+ if (error == CSS_OK)
+ *match = (num_before == 0) &&
+ (num_after == 0);
+ }
+ } else if (detail->name == state->root) {
+ error = state->handler->node_is_root(state->pw,
+ node, match);
+ } else if (detail->name == state->empty) {
+ error = state->handler->node_is_empty(state->pw,
node, match);
} else if (detail->name == state->link) {
error = state->handler->node_is_link(state->pw,
@@ -1240,6 +1492,21 @@
node, match);
} else if (detail->name == state->focus) {
error = state->handler->node_is_focus(state->pw,
+ node, match);
+ } else if (detail->name == state->target) {
+ error = state->handler->node_is_target(state->pw,
+ node, match);
+ } else if (detail->name == state->lang) {
+ error = state->handler->node_is_lang(state->pw,
+ node, detail->value.string, match);
+ } else if (detail->name == state->enabled) {
+ error = state->handler->node_is_enabled(state->pw,
+ node, match);
+ } else if (detail->name == state->disabled) {
+ error = state->handler->node_is_disabled(state->pw,
+ node, match);
+ } else if (detail->name == state->checked) {
+ error = state->handler->node_is_checked(state->pw,
node, match);
} else
*match = false;
@@ -1264,17 +1531,39 @@
break;
case CSS_SELECTOR_ATTRIBUTE_EQUAL:
error = state->handler->node_has_attribute_equal(state->pw,
- node, detail->name, detail->value, match);
+ node, detail->name, detail->value.string,
+ match);
break;
case CSS_SELECTOR_ATTRIBUTE_DASHMATCH:
error = state->handler->node_has_attribute_dashmatch(state->pw,
- node, detail->name, detail->value, match);
+ node, detail->name, detail->value.string,
+ match);
break;
case CSS_SELECTOR_ATTRIBUTE_INCLUDES:
error = state->handler->node_has_attribute_includes(state->pw,
- node, detail->name, detail->value, match);
+ node, detail->name, detail->value.string,
+ match);
break;
- }
+ case CSS_SELECTOR_ATTRIBUTE_PREFIX:
+ error = state->handler->node_has_attribute_prefix(state->pw,
+ node, detail->name, detail->value.string,
+ match);
+ break;
+ case CSS_SELECTOR_ATTRIBUTE_SUFFIX:
+ error = state->handler->node_has_attribute_suffix(state->pw,
+ node, detail->name, detail->value.string,
+ match);
+ break;
+ case CSS_SELECTOR_ATTRIBUTE_SUBSTRING:
+ error = state->handler->node_has_attribute_substring(state->pw,
+ node, detail->name, detail->value.string,
+ match);
+ break;
+ }
+
+ /* Invert match, if the detail requests it */
+ if (error == CSS_OK && detail->negate != 0)
+ *match = !*match;
return error;
}
Modified: trunk/libcss/src/select/select.h
URL: http://source.netsurf-browser.org/trunk/libcss/src/select/select.h?rev=11...
==============================================================================
--- trunk/libcss/src/select/select.h (original)
+++ trunk/libcss/src/select/select.h Sun Jan 30 18:18:15 2011
@@ -50,6 +50,22 @@
lwc_string *hover;
lwc_string *active;
lwc_string *focus;
+ lwc_string *nth_child;
+ lwc_string *nth_last_child;
+ lwc_string *nth_of_type;
+ lwc_string *nth_last_of_type;
+ lwc_string *last_child;
+ lwc_string *first_of_type;
+ lwc_string *last_of_type;
+ lwc_string *only_child;
+ lwc_string *only_of_type;
+ lwc_string *root;
+ lwc_string *empty;
+ lwc_string *target;
+ lwc_string *lang;
+ lwc_string *enabled;
+ lwc_string *disabled;
+ lwc_string *checked;
lwc_string *first_line;
lwc_string *first_letter;
lwc_string *before;
Modified: trunk/libcss/src/stylesheet.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/stylesheet.c?rev=11557...
==============================================================================
--- trunk/libcss/src/stylesheet.c (original)
+++ trunk/libcss/src/stylesheet.c Sun Jan 30 18:18:15 2011
@@ -800,7 +800,8 @@
sel->data.type = CSS_SELECTOR_ELEMENT;
sel->data.name = lwc_string_ref(name);
- sel->data.value = NULL;
+ sel->data.value.string = NULL;
+ sel->data.value_type = CSS_SELECTOR_DETAIL_VALUE_STRING;
if (sheet->inline_style) {
sel->specificity = CSS_SPECIFICITY_A;
@@ -846,8 +847,10 @@
for (detail = &c->data; detail;) {
lwc_string_unref(detail->name);
- if (detail->value != NULL) {
- lwc_string_unref(detail->value);
+ if (detail->value_type ==
+ CSS_SELECTOR_DETAIL_VALUE_STRING &&
+ detail->value.string != NULL) {
+ lwc_string_unref(detail->value.string);
}
if (detail->next)
@@ -862,8 +865,9 @@
for (detail = &selector->data; detail;) {
lwc_string_unref(detail->name);
- if (detail->value != NULL) {
- lwc_string_unref(detail->value);
+ if (detail->value_type == CSS_SELECTOR_DETAIL_VALUE_STRING &&
+ detail->value.string != NULL) {
+ lwc_string_unref(detail->value.string);
}
if (detail->next)
@@ -882,18 +886,21 @@
/**
* Initialise a selector detail
*
- * \param sheet The stylesheet context
- * \param type The type of selector to create
- * \param name Name of selector
- * \param value Value of selector, or NULL
- * \param detail Pointer to detail object to initialise
+ * \param sheet The stylesheet context
+ * \param type The type of selector to create
+ * \param name Name of selector
+ * \param value Value of selector
+ * \param value_type Type of \a value
+ * \param negate Whether the detail match should be negated
+ * \param detail Pointer to detail object to initialise
* \return CSS_OK on success,
* CSS_BADPARM on bad parameters
*/
css_error css__stylesheet_selector_detail_init(css_stylesheet *sheet,
css_selector_type type, lwc_string *name,
- lwc_string *value,
- css_selector_detail *detail)
+ css_selector_detail_value value,
+ css_selector_detail_value_type value_type,
+ bool negate, css_selector_detail *detail)
{
if (sheet == NULL || name == NULL || detail == NULL)
return CSS_BADPARM;
@@ -903,6 +910,8 @@
detail->type = type;
detail->name = name;
detail->value = value;
+ detail->value_type = value_type;
+ detail->negate = negate;
return CSS_OK;
}
@@ -948,8 +957,9 @@
/* Ref the strings */
lwc_string_ref(detail->name);
- if (detail->value != NULL)
- lwc_string_ref(detail->value);
+ if (detail->value_type == CSS_SELECTOR_DETAIL_VALUE_STRING &&
+ detail->value.string != NULL)
+ lwc_string_ref(detail->value.string);
(*parent) = temp;
Modified: trunk/libcss/src/stylesheet.h
URL: http://source.netsurf-browser.org/trunk/libcss/src/stylesheet.h?rev=11557...
==============================================================================
--- trunk/libcss/src/stylesheet.h (original)
+++ trunk/libcss/src/stylesheet.h Sun Jan 30 18:18:15 2011
@@ -41,24 +41,43 @@
CSS_SELECTOR_ATTRIBUTE,
CSS_SELECTOR_ATTRIBUTE_EQUAL,
CSS_SELECTOR_ATTRIBUTE_DASHMATCH,
- CSS_SELECTOR_ATTRIBUTE_INCLUDES
+ CSS_SELECTOR_ATTRIBUTE_INCLUDES,
+ CSS_SELECTOR_ATTRIBUTE_PREFIX,
+ CSS_SELECTOR_ATTRIBUTE_SUFFIX,
+ CSS_SELECTOR_ATTRIBUTE_SUBSTRING
} css_selector_type;
typedef enum css_combinator {
CSS_COMBINATOR_NONE,
CSS_COMBINATOR_ANCESTOR,
CSS_COMBINATOR_PARENT,
- CSS_COMBINATOR_SIBLING
+ CSS_COMBINATOR_SIBLING,
+ CSS_COMBINATOR_GENERIC_SIBLING
} css_combinator;
+typedef enum css_selector_detail_value_type {
+ CSS_SELECTOR_DETAIL_VALUE_STRING,
+ CSS_SELECTOR_DETAIL_VALUE_NTH
+} css_selector_detail_value_type;
+
+typedef union css_selector_detail_value {
+ lwc_string *string; /**< Interned string, or NULL */
+ struct {
+ int32_t a;
+ int32_t b;
+ } nth; /**< Data for x = an + b */
+} css_selector_detail_value;
+
typedef struct css_selector_detail {
- lwc_string *name; /**< Interned name */
- lwc_string *value; /**< Interned value, or NULL */
-
- unsigned int type : 4, /**< Type of selector */
- comb : 2, /**< Type of combinator */
- next : 1; /**< Another selector detail
+ lwc_string *name; /**< Interned name */
+ css_selector_detail_value value; /**< Detail value */
+
+ unsigned int type : 4, /**< Type of selector */
+ comb : 3, /**< Type of combinator */
+ next : 1, /**< Another selector detail
* follows */
+ value_type : 1, /**< Type of value field */
+ negate : 1; /**< Detail match is inverted */
} css_selector_detail;
struct css_selector {
@@ -186,30 +205,35 @@
css_style *cached_style; /**< Cache for style parsing */
lwc_string **string_vector; /**< Bytecode string vector */
- uint32_t string_vector_l; /**< The string vector allocated length in entries */
- uint32_t string_vector_c; /**< The number of string vector entries used */
+ uint32_t string_vector_l; /**< The string vector allocated
+ * length in entries */
+ uint32_t string_vector_c; /**< The number of string
+ * vector entries used */
};
-css_error css__stylesheet_style_create(css_stylesheet *sheet, css_style **style);
+css_error css__stylesheet_style_create(css_stylesheet *sheet,
+ css_style **style);
css_error css__stylesheet_style_append(css_style *style, css_code_t code);
-css_error css__stylesheet_style_vappend(css_style *style, uint32_t style_count, ...);
+css_error css__stylesheet_style_vappend(css_style *style, uint32_t style_count,
+ ...);
css_error css__stylesheet_style_destroy(css_style *style);
css_error css__stylesheet_merge_style(css_style *target, css_style *style);
/** Helper function to avoid distinct buildOPV call */
-static inline css_error css__stylesheet_style_appendOPV(css_style *style, opcode_t opcode, uint8_t flags, uint16_t value)
+static inline css_error css__stylesheet_style_appendOPV(css_style *style,
+ opcode_t opcode, uint8_t flags, uint16_t value)
{
- return css__stylesheet_style_append(style, buildOPV(opcode, flags, value));
+ return css__stylesheet_style_append(style,
+ buildOPV(opcode, flags, value));
}
/** Helper function to set inherit flag */
-static inline css_error css_stylesheet_style_inherit(css_style *style, opcode_t opcode)
+static inline css_error css_stylesheet_style_inherit(css_style *style,
+ opcode_t opcode)
{
- return css__stylesheet_style_append(style, buildOPV(opcode, FLAG_INHERIT, 0));
+ return css__stylesheet_style_append(style,
+ buildOPV(opcode, FLAG_INHERIT, 0));
}
-
-
-
css_error css__stylesheet_selector_create(css_stylesheet *sheet,
lwc_string *name, css_selector **selector);
@@ -218,8 +242,9 @@
css_error css__stylesheet_selector_detail_init(css_stylesheet *sheet,
css_selector_type type, lwc_string *name,
- lwc_string *value,
- css_selector_detail *detail);
+ css_selector_detail_value value,
+ css_selector_detail_value_type value_type,
+ bool negate, css_selector_detail *detail);
css_error css__stylesheet_selector_append_specific(css_stylesheet *sheet,
css_selector **parent, const css_selector_detail *specific);
@@ -253,9 +278,11 @@
css_rule *parent);
css_error css__stylesheet_remove_rule(css_stylesheet *sheet, css_rule *rule);
-css_error css__stylesheet_string_get(css_stylesheet *sheet, uint32_t string_number, lwc_string **string);
-
-css_error css__stylesheet_string_add(css_stylesheet *sheet, lwc_string *string, uint32_t *string_number);
+css_error css__stylesheet_string_get(css_stylesheet *sheet,
+ uint32_t string_number, lwc_string **string);
+
+css_error css__stylesheet_string_add(css_stylesheet *sheet,
+ lwc_string *string, uint32_t *string_number);
#endif
Modified: trunk/libcss/src/utils/utils.c
URL: http://source.netsurf-browser.org/trunk/libcss/src/utils/utils.c?rev=1155...
==============================================================================
--- trunk/libcss/src/utils/utils.c (original)
+++ trunk/libcss/src/utils/utils.c Sun Jan 30 18:18:15 2011
@@ -10,19 +10,28 @@
css_fixed css__number_from_lwc_string(lwc_string *string,
bool int_only, size_t *consumed)
{
- size_t len;
- const uint8_t *ptr;
+ if (string == NULL || lwc_string_length(string) == 0 ||
+ consumed == NULL)
+ return 0;
+
+ return css__number_from_string(
+ (uint8_t *)lwc_string_data(string),
+ lwc_string_length(string),
+ int_only,
+ consumed);
+}
+
+css_fixed css__number_from_string(const uint8_t *data, size_t len,
+ bool int_only, size_t *consumed)
+{
+ const uint8_t *ptr = data;
int sign = 1;
int32_t intpart = 0;
int32_t fracpart = 0;
int32_t pwr = 1;
- if (string == NULL || lwc_string_length(string) == 0 ||
- consumed == NULL)
+ if (data == NULL || len == 0 || consumed == NULL)
return 0;
-
- len = lwc_string_length(string);
- ptr = (uint8_t *)lwc_string_data(string);
/* number = [+-]? ([0-9]+ | [0-9]* '.' [0-9]+) */
@@ -92,7 +101,7 @@
}
}
- *consumed = (char *)ptr - lwc_string_data(string);
+ *consumed = ptr - data;
if (sign > 0) {
/* If the result is larger than we can represent,
Modified: trunk/libcss/src/utils/utils.h
URL: http://source.netsurf-browser.org/trunk/libcss/src/utils/utils.h?rev=1155...
==============================================================================
--- trunk/libcss/src/utils/utils.h (original)
+++ trunk/libcss/src/utils/utils.h Sun Jan 30 18:18:15 2011
@@ -36,6 +36,8 @@
css_fixed css__number_from_lwc_string(lwc_string *string, bool int_only,
size_t *consumed);
+css_fixed css__number_from_string(const uint8_t *data, size_t len,
+ bool int_only, size_t *consumed);
static inline bool isDigit(uint8_t c)
{
Modified: trunk/libcss/test/data/parse/INDEX
URL: http://source.netsurf-browser.org/trunk/libcss/test/data/parse/INDEX?rev=...
==============================================================================
--- trunk/libcss/test/data/parse/INDEX (original)
+++ trunk/libcss/test/data/parse/INDEX Sun Jan 30 18:18:15 2011
@@ -7,4 +7,5 @@
atrules.dat @-rules
colours.dat Colour values
colours-hsl.dat HSL Colour values
+nth.dat :nth-* expressions
properties.dat Properties
Added: trunk/libcss/test/data/parse/nth.dat
URL: http://source.netsurf-browser.org/trunk/libcss/test/data/parse/nth.dat?re...
==============================================================================
--- trunk/libcss/test/data/parse/nth.dat (added)
+++ trunk/libcss/test/data/parse/nth.dat Sun Jan 30 18:18:15 2011
@@ -1,0 +1,246 @@
+# Test data for nth-* expressions
+
+# Odd and Even
+
+#data
+E:nth-child(odd) {}
+#errors
+#expected
+| 1 E:nth-child(2n+1)
+#reset
+
+#data
+E:nth-child(even) {}
+#errors
+#expected
+| 1 E:nth-child(2n+0)
+#reset
+
+# Basic numbers
+
+#data
+E:nth-child(1) {}
+#errors
+#expected
+| 1 E:nth-child(0n+1)
+#reset
+
+#data
+E:nth-child(-1) {}
+#errors
+#expected
+| 1 E:nth-child(0n+-1)
+#reset
+
+# IDENT ws [ NUMBER ws ]?
+
+#data
+E:nth-child(n) {}
+#errors
+#expected
+| 1 E:nth-child(1n+0)
+#reset
+
+#data
+E:nth-child(-n) {}
+#errors
+#expected
+| 1 E:nth-child(-1n+0)
+#reset
+
+#data
+E:nth-child(-n- 1) {}
+#errors
+#expected
+| 1 E:nth-child(-1n+-1)
+#reset
+
+#data
+E:nth-child(-n-1) {}
+#errors
+#expected
+| 1 E:nth-child(-1n+-1)
+#reset
+
+# DIMENSION ws [ NUMBER ws ]?
+
+#data
+E:nth-child(2n) {}
+#errors
+#expected
+| 1 E:nth-child(2n+0)
+#reset
+
+#data
+E:nth-child(-2n) {}
+#errors
+#expected
+| 1 E:nth-child(-2n+0)
+#reset
+
+#data
+E:nth-child(2n- 1) {}
+#errors
+#expected
+| 1 E:nth-child(2n+-1)
+#reset
+
+#data
+E:nth-child(-2n- 1) {}
+#errors
+#expected
+| 1 E:nth-child(-2n+-1)
+#reset
+
+#data
+E:nth-child(2n-1) {}
+#errors
+#expected
+| 1 E:nth-child(2n+-1)
+#reset
+
+#data
+E:nth-child(-2n-1) {}
+#errors
+#expected
+| 1 E:nth-child(-2n+-1)
+#reset
+
+# IDENT ws CHAR ws NUMBER ws
+
+#data
+E:nth-child(n - 1) {}
+#errors
+#expected
+| 1 E:nth-child(1n+-1)
+#reset
+
+#data
+E:nth-child(n+1) {}
+#errors
+#expected
+| 1 E:nth-child(1n+1)
+#reset
+
+#data
+E:nth-child(n + 1) {}
+#errors
+#expected
+| 1 E:nth-child(1n+1)
+#reset
+
+# DIMENSION ws CHAR ws NUMBER ws
+
+#data
+E:nth-child(2n - 1) {}
+#errors
+#expected
+| 1 E:nth-child(2n+-1)
+#reset
+
+#data
+E:nth-child(2n+1) {}
+#errors
+#expected
+| 1 E:nth-child(2n+1)
+#reset
+
+#data
+E:nth-child(2n + 1) {}
+#errors
+#expected
+| 1 E:nth-child(2n+1)
+#reset
+
+# Illegal inputs
+
+#data
+E:nth-child(n--1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(n-+1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(n- -1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(n- +1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(n + -1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(n - +1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(2n--1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(2n-+1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(2n- -1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(2n- +1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(2n + -1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(2n - +1) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(3 n) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(+2 n) {}
+#errors
+#expected
+#reset
+
+#data
+E:nth-child(+ 2) {}
+#errors
+#expected
+#reset
+
Modified: trunk/libcss/test/data/parse/selectors.dat
URL: http://source.netsurf-browser.org/trunk/libcss/test/data/parse/selectors....
==============================================================================
--- trunk/libcss/test/data/parse/selectors.dat (original)
+++ trunk/libcss/test/data/parse/selectors.dat Sun Jan 30 18:18:15 2011
@@ -99,6 +99,111 @@
#reset
#data
+E:root {}
+#errors
+#expected
+| 1 E:root
+#reset
+
+#data
+E:nth-child(2n+1) {}
+#errors
+#expected
+| 1 E:nth-child(2n+1)
+#reset
+
+#data
+E:nth-last-child(2n+1) {}
+#errors
+#expected
+| 1 E:nth-last-child(2n+1)
+#reset
+
+#data
+E:nth-of-type(2n+1) {}
+#errors
+#expected
+| 1 E:nth-of-type(2n+1)
+#reset
+
+#data
+E:nth-last-of-type(2n+1) {}
+#errors
+#expected
+| 1 E:nth-last-of-type(2n+1)
+#reset
+
+#data
+E:last-child {}
+#errors
+#expected
+| 1 E:last-child
+#reset
+
+#data
+E:first-of-type {}
+#errors
+#expected
+| 1 E:first-of-type
+#reset
+
+#data
+E:last-of-type {}
+#errors
+#expected
+| 1 E:last-of-type
+#reset
+
+#data
+E:only-child {}
+#errors
+#expected
+| 1 E:only-child
+#reset
+
+#data
+E:only-of-type {}
+#errors
+#expected
+| 1 E:only-of-type
+#reset
+
+#data
+E:empty {}
+#errors
+#expected
+| 1 E:empty
+#reset
+
+#data
+E:target {}
+#errors
+#expected
+| 1 E:target
+#reset
+
+#data
+E:enabled {}
+#errors
+#expected
+| 1 E:enabled
+#reset
+
+#data
+E:disabled {}
+#errors
+#expected
+| 1 E:disabled
+#reset
+
+#data
+E:checked {}
+#errors
+#expected
+| 1 E:checked
+#reset
+
+#data
E:first-line {}
#errors
#expected
@@ -127,6 +232,34 @@
#reset
#data
+E::first-line {}
+#errors
+#expected
+| 1 E:first-line
+#reset
+
+#data
+E::first-letter {}
+#errors
+#expected
+| 1 E:first-letter
+#reset
+
+#data
+E::before {}
+#errors
+#expected
+| 1 E:before
+#reset
+
+#data
+E::after {}
+#errors
+#expected
+| 1 E:after
+#reset
+
+#data
E + F {}
#errors
#expected
@@ -134,6 +267,13 @@
#reset
#data
+E ~ F {}
+#errors
+#expected
+| 1 E ~ F
+#reset
+
+#data
E[foo] {}
#errors
#expected
@@ -162,6 +302,27 @@
#reset
#data
+E[foo^="warning"] {}
+#errors
+#expected
+| 1 E[foo^="warning"]
+#reset
+
+#data
+E[foo$="warning"] {}
+#errors
+#expected
+| 1 E[foo$="warning"]
+#reset
+
+#data
+E[foo*="warning"] {}
+#errors
+#expected
+| 1 E[foo*="warning"]
+#reset
+
+#data
DIV.warning {}
#errors
#expected
@@ -368,3 +529,66 @@
| 1 #myid, bar
#reset
+# Not pseudo class
+
+#data
+E:not(bar) {}
+#errors
+#expected
+| 1 E:not(bar)
+#reset
+
+#data
+E:not(*) {}
+#errors
+#expected
+| 1 E:not(*)
+#reset
+
+#data
+E:not(#foo) {}
+#errors
+#expected
+| 1 E:not(#foo)
+#reset
+
+#data
+E:not(.bar) {}
+#errors
+#expected
+| 1 E:not(.bar)
+#reset
+
+#data
+E:not([bar]) {}
+#errors
+#expected
+| 1 E:not([bar])
+#reset
+
+#data
+E:not(:first-child) {}
+#errors
+#expected
+| 1 E:not(:first-child)
+#reset
+
+#data
+E:not(:nth-child(2n+1)) {}
+#errors
+#expected
+| 1 E:not(:nth-child(2n+1))
+#reset
+
+#data
+E:not(:first-line) {}
+#errors
+#expected
+#reset
+
+#data
+E:not(:not(bar)) {}
+#errors
+#expected
+#reset
+
Modified: trunk/libcss/test/dump.h
URL: http://source.netsurf-browser.org/trunk/libcss/test/dump.h?rev=11557&r1=1...
==============================================================================
--- trunk/libcss/test/dump.h (original)
+++ trunk/libcss/test/dump.h Sun Jan 30 18:18:15 2011
@@ -178,6 +178,10 @@
memcpy(*ptr, " + ", 3);
*ptr += 3;
break;
+ case CSS_COMBINATOR_GENERIC_SIBLING:
+ memcpy(*ptr, " + ", 3);
+ *ptr += 3;
+ break;
}
dump_selector(list, ptr);
@@ -200,6 +204,9 @@
void dump_selector_detail(css_selector_detail *detail, char **ptr)
{
+ if (detail->negate)
+ *ptr += sprintf(*ptr, ":not(");
+
switch (detail->type) {
case CSS_SELECTOR_ELEMENT:
if (lwc_string_length(detail->name) == 1 &&
@@ -226,12 +233,18 @@
**ptr = ':';
*ptr += 1;
dump_string(detail->name, ptr);
- if (detail->value != NULL) {
- **ptr = '(';
- *ptr += 1;
- dump_string(detail->value, ptr);
- **ptr = ')';
- *ptr += 1;
+ if (detail->value_type == CSS_SELECTOR_DETAIL_VALUE_STRING) {
+ if (detail->value.string != NULL) {
+ **ptr = '(';
+ *ptr += 1;
+ dump_string(detail->value.string, ptr);
+ **ptr = ')';
+ *ptr += 1;
+ }
+ } else {
+ *ptr += sprintf(*ptr, "(%dn+%d)",
+ detail->value.nth.a,
+ detail->value.nth.b);
}
break;
case CSS_SELECTOR_ATTRIBUTE:
@@ -248,7 +261,7 @@
(*ptr)[0] = '=';
(*ptr)[1] = '"';
*ptr += 2;
- dump_string(detail->value, ptr);
+ dump_string(detail->value.string, ptr);
(*ptr)[0] = '"';
(*ptr)[1] = ']';
*ptr += 2;
@@ -261,7 +274,7 @@
(*ptr)[1] = '=';
(*ptr)[2] = '"';
*ptr += 3;
- dump_string(detail->value, ptr);
+ dump_string(detail->value.string, ptr);
(*ptr)[0] = '"';
(*ptr)[1] = ']';
*ptr += 2;
@@ -274,12 +287,54 @@
(*ptr)[1] = '=';
(*ptr)[2] = '"';
*ptr += 3;
- dump_string(detail->value, ptr);
+ dump_string(detail->value.string, ptr);
(*ptr)[0] = '"';
(*ptr)[1] = ']';
*ptr += 2;
break;
+ case CSS_SELECTOR_ATTRIBUTE_PREFIX:
+ **ptr = '[';
+ *ptr += 1;
+ dump_string(detail->name, ptr);
+ (*ptr)[0] = '^';
+ (*ptr)[1] = '=';
+ (*ptr)[2] = '"';
+ *ptr += 3;
+ dump_string(detail->value.string, ptr);
+ (*ptr)[0] = '"';
+ (*ptr)[1] = ']';
+ *ptr += 2;
+ break;
+ case CSS_SELECTOR_ATTRIBUTE_SUFFIX:
+ **ptr = '[';
+ *ptr += 1;
+ dump_string(detail->name, ptr);
+ (*ptr)[0] = '$';
+ (*ptr)[1] = '=';
+ (*ptr)[2] = '"';
+ *ptr += 3;
+ dump_string(detail->value.string, ptr);
+ (*ptr)[0] = '"';
+ (*ptr)[1] = ']';
+ *ptr += 2;
+ break;
+ case CSS_SELECTOR_ATTRIBUTE_SUBSTRING:
+ **ptr = '[';
+ *ptr += 1;
+ dump_string(detail->name, ptr);
+ (*ptr)[0] = '*';
+ (*ptr)[1] = '=';
+ (*ptr)[2] = '"';
+ *ptr += 3;
+ dump_string(detail->value.string, ptr);
+ (*ptr)[0] = '"';
+ (*ptr)[1] = ']';
+ *ptr += 2;
+ break;
}
+
+ if (detail->negate)
+ *ptr += sprintf(*ptr, ")");
}
/**
Modified: trunk/libcss/test/parse-auto.c
URL: http://source.netsurf-browser.org/trunk/libcss/test/parse-auto.c?rev=1155...
==============================================================================
--- trunk/libcss/test/parse-auto.c (original)
+++ trunk/libcss/test/parse-auto.c Sun Jan 30 18:18:15 2011
@@ -619,11 +619,14 @@
memcpy(*ptr, " + ", 3);
*ptr += 3;
break;
+ case CSS_COMBINATOR_GENERIC_SIBLING:
+ memcpy(*ptr, " ~ ", 3);
+ *ptr += 3;
+ break;
}
dump_selector(list, ptr);
}
-
void dump_selector(css_selector *selector, char **ptr)
{
@@ -641,14 +644,17 @@
void dump_selector_detail(css_selector_detail *detail, char **ptr)
{
+ if (detail->negate)
+ *ptr += sprintf(*ptr, ":not(");
+
switch (detail->type) {
case CSS_SELECTOR_ELEMENT:
- if (lwc_string_length(detail->name) == 1 &&
- lwc_string_data(detail->name)[0] == '*' &&
+ if (lwc_string_length(detail->name) == 1 &&
+ lwc_string_data(detail->name)[0] == '*' &&
detail->next == 0) {
dump_string(detail->name, ptr);
} else if (lwc_string_length(detail->name) != 1 ||
- lwc_string_data(detail->name)[0] != '*') {
+ lwc_string_data(detail->name)[0] != '*') {
dump_string(detail->name, ptr);
}
break;
@@ -667,12 +673,18 @@
**ptr = ':';
*ptr += 1;
dump_string(detail->name, ptr);
- if (detail->value != NULL) {
- **ptr = '(';
- *ptr += 1;
- dump_string(detail->value, ptr);
- **ptr = ')';
- *ptr += 1;
+ if (detail->value_type == CSS_SELECTOR_DETAIL_VALUE_STRING) {
+ if (detail->value.string != NULL) {
+ **ptr = '(';
+ *ptr += 1;
+ dump_string(detail->value.string, ptr);
+ **ptr = ')';
+ *ptr += 1;
+ }
+ } else {
+ *ptr += sprintf(*ptr, "(%dn+%d)",
+ detail->value.nth.a,
+ detail->value.nth.b);
}
break;
case CSS_SELECTOR_ATTRIBUTE:
@@ -689,7 +701,7 @@
(*ptr)[0] = '=';
(*ptr)[1] = '"';
*ptr += 2;
- dump_string(detail->value, ptr);
+ dump_string(detail->value.string, ptr);
(*ptr)[0] = '"';
(*ptr)[1] = ']';
*ptr += 2;
@@ -702,7 +714,7 @@
(*ptr)[1] = '=';
(*ptr)[2] = '"';
*ptr += 3;
- dump_string(detail->value, ptr);
+ dump_string(detail->value.string, ptr);
(*ptr)[0] = '"';
(*ptr)[1] = ']';
*ptr += 2;
@@ -715,12 +727,54 @@
(*ptr)[1] = '=';
(*ptr)[2] = '"';
*ptr += 3;
- dump_string(detail->value, ptr);
+ dump_string(detail->value.string, ptr);
(*ptr)[0] = '"';
(*ptr)[1] = ']';
*ptr += 2;
break;
- }
+ case CSS_SELECTOR_ATTRIBUTE_PREFIX:
+ **ptr = '[';
+ *ptr += 1;
+ dump_string(detail->name, ptr);
+ (*ptr)[0] = '^';
+ (*ptr)[1] = '=';
+ (*ptr)[2] = '"';
+ *ptr += 3;
+ dump_string(detail->value.string, ptr);
+ (*ptr)[0] = '"';
+ (*ptr)[1] = ']';
+ *ptr += 2;
+ break;
+ case CSS_SELECTOR_ATTRIBUTE_SUFFIX:
+ **ptr = '[';
+ *ptr += 1;
+ dump_string(detail->name, ptr);
+ (*ptr)[0] = '$';
+ (*ptr)[1] = '=';
+ (*ptr)[2] = '"';
+ *ptr += 3;
+ dump_string(detail->value.string, ptr);
+ (*ptr)[0] = '"';
+ (*ptr)[1] = ']';
+ *ptr += 2;
+ break;
+ case CSS_SELECTOR_ATTRIBUTE_SUBSTRING:
+ **ptr = '[';
+ *ptr += 1;
+ dump_string(detail->name, ptr);
+ (*ptr)[0] = '*';
+ (*ptr)[1] = '=';
+ (*ptr)[2] = '"';
+ *ptr += 3;
+ dump_string(detail->value.string, ptr);
+ (*ptr)[0] = '"';
+ (*ptr)[1] = ']';
+ *ptr += 2;
+ break;
+ }
+
+ if (detail->negate)
+ *ptr += sprintf(*ptr, ")");
}
void dump_string(lwc_string *string, char **ptr)
@@ -728,4 +782,3 @@
*ptr += sprintf(*ptr, "%.*s", (int) lwc_string_length(string),
lwc_string_data(string));
}
-
Modified: trunk/libcss/test/select-auto.c
URL: http://source.netsurf-browser.org/trunk/libcss/test/select-auto.c?rev=115...
==============================================================================
--- trunk/libcss/test/select-auto.c (original)
+++ trunk/libcss/test/select-auto.c Sun Jan 30 18:18:15 2011
@@ -90,6 +90,9 @@
static css_error named_sibling_node(void *pw, void *node,
lwc_string *name,
void **sibling);
+static css_error named_generic_sibling_node(void *pw, void *node,
+ lwc_string *name,
+ void **sibling);
static css_error parent_node(void *pw, void *node, void **parent);
static css_error sibling_node(void *pw, void *node, void **sibling);
static css_error node_has_name(void *pw, void *node,
@@ -116,12 +119,31 @@
lwc_string *name,
lwc_string *value,
bool *match);
-static css_error node_is_first_child(void *pw, void *node, bool *match);
+static css_error node_has_attribute_prefix(void *pw, void *node,
+ lwc_string *name,
+ lwc_string *value,
+ bool *match);
+static css_error node_has_attribute_suffix(void *pw, void *node,
+ lwc_string *name,
+ lwc_string *value,
+ bool *match);
+static css_error node_has_attribute_substring(void *pw, void *node,
+ lwc_string *name,
+ lwc_string *value,
+ bool *match);
+static css_error node_is_root(void *pw, void *node, bool *match);
+static css_error node_count_siblings(void *pw, void *node,
+ bool same_name, bool after, int32_t *count);
+static css_error node_is_empty(void *pw, void *node, bool *match);
static css_error node_is_link(void *pw, void *node, bool *match);
static css_error node_is_visited(void *pw, void *node, bool *match);
static css_error node_is_hover(void *pw, void *node, bool *match);
static css_error node_is_active(void *pw, void *node, bool *match);
static css_error node_is_focus(void *pw, void *node, bool *match);
+static css_error node_is_enabled(void *pw, void *node, bool *match);
+static css_error node_is_disabled(void *pw, void *node, bool *match);
+static css_error node_is_checked(void *pw, void *node, bool *match);
+static css_error node_is_target(void *pw, void *node, bool *match);
static css_error node_is_lang(void *pw, void *node,
lwc_string *lang, bool *match);
static css_error node_presentational_hint(void *pw, void *node,
@@ -138,6 +160,7 @@
named_ancestor_node,
named_parent_node,
named_sibling_node,
+ named_generic_sibling_node,
parent_node,
sibling_node,
node_has_name,
@@ -147,12 +170,21 @@
node_has_attribute_equal,
node_has_attribute_dashmatch,
node_has_attribute_includes,
- node_is_first_child,
+ node_has_attribute_prefix,
+ node_has_attribute_suffix,
+ node_has_attribute_substring,
+ node_is_root,
+ node_count_siblings,
+ node_is_empty,
node_is_link,
node_is_visited,
node_is_hover,
node_is_active,
node_is_focus,
+ node_is_enabled,
+ node_is_disabled,
+ node_is_checked,
+ node_is_target,
node_is_lang,
node_presentational_hint,
ua_default_for_property,
@@ -882,6 +914,26 @@
return CSS_OK;
}
+css_error named_generic_sibling_node(void *pw, void *n,
+ lwc_string *name,
+ void **sibling)
+{
+ node *node = n;
+ UNUSED(pw);
+
+ for (node = node->prev; node != NULL; node = node->prev) {
+ bool match;
+ assert(lwc_string_caseless_isequal(
+ name, node->name, &match) == lwc_error_ok);
+ if (match == true)
+ break;
+ }
+
+ *sibling = (void *) node;
+
+ return CSS_OK;
+}
+
css_error parent_node(void *pw, void *n, void **parent)
{
node *node = n;
@@ -1109,13 +1161,189 @@
return CSS_OK;
}
-css_error node_is_first_child(void *pw, void *n, bool *match)
-{
- node *node = n;
-
- UNUSED(pw);
-
- *match = (node->parent != NULL && node->parent->children == node);
+css_error node_has_attribute_prefix(void *pw, void *n,
+ lwc_string *name,
+ lwc_string *value,
+ bool *match)
+{
+ node *node = n;
+ uint32_t i;
+ UNUSED(pw);
+
+ *match = false;
+
+ for (i = 0; i < node->n_attrs; i++) {
+ assert(lwc_string_caseless_isequal(
+ node->attrs[i].name, name, match) ==
+ lwc_error_ok);
+ if (*match == true)
+ break;
+ }
+
+ if (*match == true) {
+ size_t len = lwc_string_length(node->attrs[i].value);
+ const char *data = lwc_string_data(node->attrs[i].value);
+
+ size_t vlen = lwc_string_length(value);
+ const char *vdata = lwc_string_data(value);
+
+ if (len < vlen)
+ *match = false;
+ else
+ *match = (strncasecmp(data, vdata, vlen) == 0);
+ }
+
+ return CSS_OK;
+}
+
+css_error node_has_attribute_suffix(void *pw, void *n,
+ lwc_string *name,
+ lwc_string *value,
+ bool *match)
+{
+ node *node = n;
+ uint32_t i;
+ UNUSED(pw);
+
+ *match = false;
+
+ for (i = 0; i < node->n_attrs; i++) {
+ assert(lwc_string_caseless_isequal(
+ node->attrs[i].name, name, match) ==
+ lwc_error_ok);
+ if (*match == true)
+ break;
+ }
+
+ if (*match == true) {
+ size_t len = lwc_string_length(node->attrs[i].value);
+ const char *data = lwc_string_data(node->attrs[i].value);
+
+ size_t vlen = lwc_string_length(value);
+ const char *vdata = lwc_string_data(value);
+
+ size_t suffix_start = len - vlen;
+
+ if (len < vlen)
+ *match = false;
+ else {
+ *match = (strncasecmp(data + suffix_start,
+ vdata, vlen) == 0);
+ }
+ }
+
+ return CSS_OK;
+}
+
+css_error node_has_attribute_substring(void *pw, void *n,
+ lwc_string *name,
+ lwc_string *value,
+ bool *match)
+{
+ node *node = n;
+ uint32_t i;
+ UNUSED(pw);
+
+ *match = false;
+
+ for (i = 0; i < node->n_attrs; i++) {
+ assert(lwc_string_caseless_isequal(
+ node->attrs[i].name, name, match) ==
+ lwc_error_ok);
+ if (*match == true)
+ break;
+ }
+
+ if (*match == true) {
+ size_t len = lwc_string_length(node->attrs[i].value);
+ const char *data = lwc_string_data(node->attrs[i].value);
+
+ size_t vlen = lwc_string_length(value);
+ const char *vdata = lwc_string_data(value);
+
+ const char *last_start = data + len - vlen;
+
+ if (len < vlen)
+ *match = false;
+ else {
+ while (data <= last_start) {
+ if (strncasecmp(data, vdata, vlen) == 0) {
+ *match = true;
+ break;
+ }
+
+ data++;
+ }
+
+ if (data > last_start)
+ *match = false;
+ }
+ }
+
+ return CSS_OK;
+}
+
+css_error node_is_root(void *pw, void *n, bool *match)
+{
+ node *node = n;
+ UNUSED(pw);
+
+ *match = (node->parent == NULL);
+
+ return CSS_OK;
+}
+
+css_error node_count_siblings(void *pw, void *n,
+ bool same_name, bool after, int32_t *count)
+{
+ int32_t cnt = 0;
+ bool match = false;
+ node *node = n;
+ UNUSED(pw);
+
+ if (after) {
+ while (node->next != NULL) {
+ if (same_name) {
+ assert(lwc_string_caseless_isequal(
+ node->name, node->next->name, &match) ==
+ lwc_error_ok);
+
+ if (match)
+ cnt++;
+ } else {
+ cnt++;
+ }
+
+ node = node->next;
+ }
+ } else {
+ while (node->prev != NULL) {
+ if (same_name) {
+ assert(lwc_string_caseless_isequal(
+ node->name, node->prev->name, &match) ==
+ lwc_error_ok);
+
+ if (match)
+ cnt++;
+ } else {
+ cnt++;
+ }
+
+ node = node->prev;
+ }
+ }
+
+ *count = cnt;
+
+ return CSS_OK;
+}
+
+css_error node_is_empty(void *pw, void *n, bool *match)
+{
+ node *node = n;
+ UNUSED(pw);
+
+ *match = (node->children == NULL);
return CSS_OK;
}
@@ -1169,6 +1397,54 @@
}
css_error node_is_focus(void *pw, void *n, bool *match)
+{
+ node *node = n;
+
+ UNUSED(pw);
+ UNUSED(node);
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+css_error node_is_enabled(void *pw, void *n, bool *match)
+{
+ node *node = n;
+
+ UNUSED(pw);
+ UNUSED(node);
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+css_error node_is_disabled(void *pw, void *n, bool *match)
+{
+ node *node = n;
+
+ UNUSED(pw);
+ UNUSED(node);
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+css_error node_is_checked(void *pw, void *n, bool *match)
+{
+ node *node = n;
+
+ UNUSED(pw);
+ UNUSED(node);
+
+ *match = false;
+
+ return CSS_OK;
+}
+
+css_error node_is_target(void *pw, void *n, bool *match)
{
node *node = n;
12 years, 3 months
r11555 stevef - in /branches/stevef/toolbars/riscos: Makefile.target filetype.c gui.c scripts/Run system_colour.c
by netsurf@semichrome.net
Author: stevef
Date: Sun Jan 30 17:23:59 2011
New Revision: 11555
URL: http://source.netsurf-browser.org?rev=11555&view=rev
Log:
Merge changes into riscos/ from r11123, r11204, r11422, r11530.
Added:
branches/stevef/toolbars/riscos/system_colour.c
- copied unchanged from r11554, trunk/netsurf/riscos/system_colour.c
Modified:
branches/stevef/toolbars/riscos/Makefile.target
branches/stevef/toolbars/riscos/filetype.c
branches/stevef/toolbars/riscos/gui.c
branches/stevef/toolbars/riscos/scripts/Run
Modified: branches/stevef/toolbars/riscos/Makefile.target
URL: http://source.netsurf-browser.org/branches/stevef/toolbars/riscos/Makefil...
==============================================================================
--- branches/stevef/toolbars/riscos/Makefile.target (original)
+++ branches/stevef/toolbars/riscos/Makefile.target Sun Jan 30 17:23:59 2011
@@ -71,9 +71,10 @@
hotlist.c iconbar.c image.c menus.c message.c palettes.c \
plotters.c plugin.c print.c query.c save.c save_draw.c \
save_pdf.c schedule.c search.c searchweb.c sprite.c sslcert.c \
- textarea.c textselection.c theme.c theme_install.c thumbnail.c \
- toolbar.c treeview.c ucstables.c uri.c url_complete.c \
- url_protocol.c url_suggest.c wimp.c wimp_event.c window.c \
+ system_colour.c textarea.c textselection.c theme.c \
+ theme_install.c thumbnail.c toolbar.c treeview.c ucstables.c \
+ uri.c url_complete.c url_protocol.c url_suggest.c wimp.c \
+ wimp_event.c window.c \
$(addprefix gui/,button_bar.c progress_bar.c status_bar.c \
throbber.c url_bar.c) \
$(addprefix configure/,con_cache.c con_connect.c con_content.c \
Modified: branches/stevef/toolbars/riscos/filetype.c
URL: http://source.netsurf-browser.org/branches/stevef/toolbars/riscos/filetyp...
==============================================================================
--- branches/stevef/toolbars/riscos/filetype.c (original)
+++ branches/stevef/toolbars/riscos/filetype.c Sun Jan 30 17:23:59 2011
@@ -106,9 +106,9 @@
return (const char *)type_buf;
}
- /* If filetype is text and the file has an extension, try to map the
- * extension to a filetype via the MimeMap file. */
- if (file_type == osfile_TYPE_TEXT) {
+ /* If filetype is text or data, and the file has an extension, try to
+ * map the extension to a filetype via the MimeMap file. */
+ if (file_type == osfile_TYPE_TEXT || file_type == osfile_TYPE_DATA) {
slash = strrchr(path, '/');
if (slash) {
error = xmimemaptranslate_extension_to_filetype(
Modified: branches/stevef/toolbars/riscos/gui.c
URL: http://source.netsurf-browser.org/branches/stevef/toolbars/riscos/gui.c?r...
==============================================================================
--- branches/stevef/toolbars/riscos/gui.c (original)
+++ branches/stevef/toolbars/riscos/gui.c Sun Jan 30 17:23:59 2011
@@ -350,8 +350,8 @@
option_theme_path = strdup("NetSurf:Themes");
if (!option_theme_save)
option_theme_save = strdup(CHOICES_PREFIX "Themes");
- if (!option_tree_icons_dir)
- option_tree_icons_dir = strdup("NetSurf:Resources.Icons");
+
+ tree_set_icon_dir(strdup("NetSurf:Resources.Icons"));
if (!option_theme || ! option_toolbar_browser ||
!option_toolbar_hotlist || !option_toolbar_history ||
@@ -360,7 +360,7 @@
!option_url_save || !option_hotlist_path ||
!option_hotlist_save || !option_recent_path ||
!option_recent_save || !option_theme_path ||
- !option_theme_save || !option_tree_icons_dir)
+ !option_theme_save)
die("Failed initialising string options");
/* Create our choices directories */
Modified: branches/stevef/toolbars/riscos/scripts/Run
URL: http://source.netsurf-browser.org/branches/stevef/toolbars/riscos/scripts...
==============================================================================
--- branches/stevef/toolbars/riscos/scripts/Run (original)
+++ branches/stevef/toolbars/riscos/scripts/Run Sun Jan 30 17:23:59 2011
@@ -85,8 +85,8 @@
| Ensure Iconv
| http://www.netsurf-browser.org/iconv/
-RMEnsure Iconv 0.10 NetSurfRMLoad System:Modules.Iconv
-RMEnsure Iconv 0.10 Error NetSurf requires Iconv 0.10 or later. This can be downloaded from http://www.netsurf-browser.org/iconv/
+RMEnsure Iconv 0.11 NetSurfRMLoad System:Modules.Iconv
+RMEnsure Iconv 0.11 Error NetSurf requires Iconv 0.11 or later. This can be downloaded from http://www.netsurf-browser.org/iconv/
| Disable SpecialFX, if present
Set NetSurf$SpecialFX 1
12 years, 3 months