r11897 swdr - /trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj
by netsurf@semichrome.net
Author: swdr
Date: Thu Mar 3 09:40:31 2011
New Revision: 11897
URL: http://source.netsurf-browser.org?rev=11897&view=rev
Log:
Renamed files in Xcode project to match actual file names.
Modified:
trunk/netsurf/cocoa/NetSurf.xcodeproj/project.pbxproj
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 Thu Mar 3 09:40:31 2011
@@ -15,12 +15,12 @@
260F1F6812D620E800D9B07F /* dirlist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dirlist.h; sourceTree = "<group>"; };
260F1F6912D620E800D9B07F /* fetch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fetch.c; sourceTree = "<group>"; };
260F1F6A12D620E800D9B07F /* fetch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fetch.h; sourceTree = "<group>"; };
- 260F1F6C12D620E800D9B07F /* fetch_curl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fetch_curl.c; sourceTree = "<group>"; };
- 260F1F6D12D620E800D9B07F /* fetch_curl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fetch_curl.h; sourceTree = "<group>"; };
- 260F1F6E12D620E800D9B07F /* fetch_data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fetch_data.c; sourceTree = "<group>"; };
- 260F1F6F12D620E800D9B07F /* fetch_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fetch_data.h; sourceTree = "<group>"; };
- 260F1F7012D620E800D9B07F /* fetch_file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fetch_file.c; sourceTree = "<group>"; };
- 260F1F7112D620E800D9B07F /* fetch_file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fetch_file.h; sourceTree = "<group>"; };
+ 260F1F6C12D620E800D9B07F /* curl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = curl.c; sourceTree = "<group>"; };
+ 260F1F6D12D620E800D9B07F /* curl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = curl.h; sourceTree = "<group>"; };
+ 260F1F6E12D620E800D9B07F /* data.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = data.c; sourceTree = "<group>"; };
+ 260F1F6F12D620E800D9B07F /* data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = data.h; sourceTree = "<group>"; };
+ 260F1F7012D620E800D9B07F /* file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = file.c; sourceTree = "<group>"; };
+ 260F1F7112D620E800D9B07F /* file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; };
260F1F7212D620E800D9B07F /* hlcache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hlcache.c; sourceTree = "<group>"; };
260F1F7312D620E800D9B07F /* hlcache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hlcache.h; sourceTree = "<group>"; };
260F1F7412D620E800D9B07F /* llcache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = llcache.c; sourceTree = "<group>"; };
@@ -128,8 +128,8 @@
260F1FE812D620E800D9B07F /* errors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = errors.h; sourceTree = "<group>"; };
260F1FE912D620E800D9B07F /* filename.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = filename.c; sourceTree = "<group>"; };
260F1FEA12D620E800D9B07F /* filename.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filename.h; sourceTree = "<group>"; };
- 260F1FEB12D620E800D9B07F /* findresource.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = findresource.c; sourceTree = "<group>"; };
- 260F1FEC12D620E800D9B07F /* findresource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = findresource.h; sourceTree = "<group>"; };
+ 260F1FEB12D620E800D9B07F /* resource.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = resource.c; sourceTree = "<group>"; };
+ 260F1FEC12D620E800D9B07F /* resource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resource.h; sourceTree = "<group>"; };
260F1FED12D620E800D9B07F /* hashtable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hashtable.c; sourceTree = "<group>"; };
260F1FEE12D620E800D9B07F /* hashtable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hashtable.h; sourceTree = "<group>"; };
260F1FEF12D620E800D9B07F /* http.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = http.c; sourceTree = "<group>"; };
@@ -310,6 +310,10 @@
26CDD00212E70F56004FC66B /* BrowserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserWindowController.m; sourceTree = "<group>"; };
26CDD0F412E726E0004FC66B /* BrowserViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowserViewController.h; sourceTree = "<group>"; };
26CDD0F512E726E0004FC66B /* BrowserViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowserViewController.m; sourceTree = "<group>"; };
+ 26E7A22B131FEBA8005B5B6A /* about.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = about.c; sourceTree = "<group>"; };
+ 26E7A22C131FEBA8005B5B6A /* about.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = about.h; sourceTree = "<group>"; };
+ 26E7A22D131FEBA8005B5B6A /* resource.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = resource.c; sourceTree = "<group>"; };
+ 26E7A22E131FEBA8005B5B6A /* resource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resource.h; sourceTree = "<group>"; };
26EC3B6812ED62C0000A960C /* URLFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLFieldCell.h; sourceTree = "<group>"; };
26EC3B6912ED62C0000A960C /* URLFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLFieldCell.m; sourceTree = "<group>"; };
26EC3C4212ED8202000A960C /* HistoryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryView.h; sourceTree = "<group>"; };
@@ -353,12 +357,16 @@
260F1F6B12D620E800D9B07F /* fetchers */ = {
isa = PBXGroup;
children = (
- 260F1F6C12D620E800D9B07F /* fetch_curl.c */,
- 260F1F6D12D620E800D9B07F /* fetch_curl.h */,
- 260F1F6E12D620E800D9B07F /* fetch_data.c */,
- 260F1F6F12D620E800D9B07F /* fetch_data.h */,
- 260F1F7012D620E800D9B07F /* fetch_file.c */,
- 260F1F7112D620E800D9B07F /* fetch_file.h */,
+ 26E7A22B131FEBA8005B5B6A /* about.c */,
+ 26E7A22C131FEBA8005B5B6A /* about.h */,
+ 26E7A22D131FEBA8005B5B6A /* resource.c */,
+ 26E7A22E131FEBA8005B5B6A /* resource.h */,
+ 260F1F6C12D620E800D9B07F /* curl.c */,
+ 260F1F6D12D620E800D9B07F /* curl.h */,
+ 260F1F6E12D620E800D9B07F /* data.c */,
+ 260F1F6F12D620E800D9B07F /* data.h */,
+ 260F1F7012D620E800D9B07F /* file.c */,
+ 260F1F7112D620E800D9B07F /* file.h */,
);
path = fetchers;
sourceTree = "<group>";
@@ -481,20 +489,12 @@
260F1FDC12D620E800D9B07F /* parser_binding.h */,
260F1FDD12D620E800D9B07F /* table.c */,
260F1FDE12D620E800D9B07F /* table.h */,
- 260F1FDF12D620E800D9B07F /* test */,
260F1FE012D620E800D9B07F /* textplain.c */,
260F1FE112D620E800D9B07F /* textplain.h */,
);
name = render;
path = ../render;
sourceTree = SOURCE_ROOT;
- };
- 260F1FDF12D620E800D9B07F /* test */ = {
- isa = PBXGroup;
- children = (
- );
- path = test;
- sourceTree = "<group>";
};
260F1FE212D620E800D9B07F /* utils */ = {
isa = PBXGroup;
@@ -507,8 +507,8 @@
260F1FE812D620E800D9B07F /* errors.h */,
260F1FE912D620E800D9B07F /* filename.c */,
260F1FEA12D620E800D9B07F /* filename.h */,
- 260F1FEB12D620E800D9B07F /* findresource.c */,
- 260F1FEC12D620E800D9B07F /* findresource.h */,
+ 260F1FEB12D620E800D9B07F /* resource.c */,
+ 260F1FEC12D620E800D9B07F /* resource.h */,
260F1FED12D620E800D9B07F /* hashtable.c */,
260F1FEE12D620E800D9B07F /* hashtable.h */,
260F1FEF12D620E800D9B07F /* http.c */,
12 years, 6 months
r11896 swdr - /trunk/netsurf/Docs/BUILDING-Cocoa
by netsurf@semichrome.net
Author: swdr
Date: Thu Mar 3 09:26:53 2011
New Revision: 11896
URL: http://source.netsurf-browser.org?rev=11896&view=rev
Log:
Mention libcurl bug in build instructions.
Modified:
trunk/netsurf/Docs/BUILDING-Cocoa
Modified: trunk/netsurf/Docs/BUILDING-Cocoa
URL: http://source.netsurf-browser.org/trunk/netsurf/Docs/BUILDING-Cocoa?rev=1...
==============================================================================
--- trunk/netsurf/Docs/BUILDING-Cocoa (original)
+++ trunk/netsurf/Docs/BUILDING-Cocoa Thu Mar 3 09:26:53 2011
@@ -37,6 +37,10 @@
or homebrew or from source.
OpenSSL, LibXML2, LibPNG, curl, iconv and zlib are provided by Mac OS X.
+
+ The curl library provided by Mac OS X 10.6 causes a crash while fetching
+ https resources, so you should install version 7.21.4 (or newer) of libcurl
+ if you are running on 10.6.
LibJPEG and LibMNG can be installed from source or using one of the mentioned
package managers.
12 years, 6 months
r11895 swdr - in /trunk/netsurf/cocoa: Makefile.target NetsurfApp.m res/ca-bundle
by netsurf@semichrome.net
Author: swdr
Date: Thu Mar 3 08:36:44 2011
New Revision: 11895
URL: http://source.netsurf-browser.org?rev=11895&view=rev
Log:
Adding ca-bundle to the resources
Added:
trunk/netsurf/cocoa/res/ca-bundle (with props)
Modified:
trunk/netsurf/cocoa/Makefile.target
trunk/netsurf/cocoa/NetsurfApp.m
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 Thu Mar 3 08:36:44 2011
@@ -125,7 +125,7 @@
S_XIBS := MainMenu.xib Browser.xib BrowserWindow.xib DownloadWindow.xib SearchWindow.xib PreferencesWindow.xib \
HistoryWindow.xib BookmarksWindow.xib LocalHistoryPanel.xib
-R_RESOURCES := default.css adblock.css quirks.css NetSurf.icns HomeTemplate.pdf Icons
+R_RESOURCES := default.css adblock.css quirks.css NetSurf.icns HomeTemplate.pdf Icons ca-bundle
R_RESOURCES := $(addprefix cocoa/res/,$(R_RESOURCES))
LANGUAGES := de en fr it nl
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 Thu Mar 3 08:36:44 2011
@@ -175,6 +175,8 @@
const char * const messages = [[[NSBundle mainBundle] pathForResource: @"Messages" ofType: @""] UTF8String];
const char * const options = cocoa_get_options_file();
+ option_ca_bundle = strdup( [[[NSBundle mainBundle] pathForResource: @"ca-bundle" ofType: @""] UTF8String] );
+
netsurf_init(&argc, &argv, options, messages);
[cocoa_prepare_app() run];
Added: trunk/netsurf/cocoa/res/ca-bundle
URL: http://source.netsurf-browser.org/trunk/netsurf/cocoa/res/ca-bundle?rev=1...
==============================================================================
--- trunk/netsurf/cocoa/res/ca-bundle (added)
+++ trunk/netsurf/cocoa/res/ca-bundle Thu Mar 3 08:36:44 2011
@@ -1,0 +1,1 @@
+link ../../!NetSurf/Resources/ca-bundle
Propchange: trunk/netsurf/cocoa/res/ca-bundle
------------------------------------------------------------------------------
svn:special = *
12 years, 6 months
r11894 jmb - /trunk/netsurf/content/llcache.c
by netsurf@semichrome.net
Author: jmb
Date: Wed Mar 2 18:40:50 2011
New Revision: 11894
URL: http://source.netsurf-browser.org?rev=11894&view=rev
Log:
Protect against object being cleaned while waiting for a query response
Modified:
trunk/netsurf/content/llcache.c
Modified: trunk/netsurf/content/llcache.c
URL: http://source.netsurf-browser.org/trunk/netsurf/content/llcache.c?rev=118...
==============================================================================
--- trunk/netsurf/content/llcache.c (original)
+++ trunk/netsurf/content/llcache.c Wed Mar 2 18:40:50 2011
@@ -84,6 +84,8 @@
uint32_t redirect_count; /**< Count of redirects followed */
bool tried_with_auth; /**< Whether we've tried with auth */
+
+ bool outstanding_query; /**< Waiting for a query response */
} llcache_fetch_ctx;
typedef enum {
@@ -1634,7 +1636,8 @@
/* The candidate count of uncacheable objects is always 0 */
if (object->users == NULL && object->candidate_count == 0 &&
- object->fetch.fetch == NULL) {
+ object->fetch.fetch == NULL &&
+ object->fetch.outstanding_query == false) {
#ifdef LLCACHE_TRACE
LOG(("Found victim %p", object));
#endif
@@ -1652,7 +1655,8 @@
if (object->users == NULL && object->candidate_count == 0 &&
llcache_object_is_fresh(object) == false &&
- object->fetch.fetch == NULL) {
+ object->fetch.fetch == NULL &&
+ object->fetch.outstanding_query == false) {
#ifdef LLCACHE_TRACE
LOG(("Found victim %p", object));
#endif
@@ -1673,7 +1677,9 @@
if (object->users == NULL &&
object->candidate_count == 0 &&
- object->fetch.fetch == NULL) {
+ object->fetch.fetch == NULL &&
+ object->fetch.outstanding_query ==
+ false) {
#ifdef LLCACHE_TRACE
LOG(("Found victim %p", object));
#endif
@@ -1746,6 +1752,8 @@
{
llcache_event event;
llcache_object *object = cbpw;
+
+ object->fetch.outstanding_query = false;
/* Refetch, using existing fetch parameters, if client allows us to */
if (proceed)
@@ -2451,6 +2459,8 @@
query.url = object->url;
query.data.auth.realm = realm;
+ object->fetch.outstanding_query = true;
+
error = query_cb(&query, query_cb_pw,
llcache_query_handle_response, object);
} else {
@@ -2504,6 +2514,8 @@
query.data.ssl.certs = certs;
query.data.ssl.num = num;
+ object->fetch.outstanding_query = true;
+
error = query_cb(&query, query_cb_pw,
llcache_query_handle_response, object);
} else {
12 years, 7 months
r11893 tlsa - /trunk/netsurf/content/content.h
by netsurf@semichrome.net
Author: tlsa
Date: Wed Mar 2 15:10:29 2011
New Revision: 11893
URL: http://source.netsurf-browser.org?rev=11893&view=rev
Log:
Pass content msg redraw coords as ints.
Modified:
trunk/netsurf/content/content.h
Modified: trunk/netsurf/content/content.h
URL: http://source.netsurf-browser.org/trunk/netsurf/content/content.h?rev=118...
==============================================================================
--- trunk/netsurf/content/content.h (original)
+++ trunk/netsurf/content/content.h Wed Mar 2 15:10:29 2011
@@ -72,16 +72,16 @@
const char *error; /**< Error message, for CONTENT_MSG_ERROR. */
/** Area of content which needs redrawing, for CONTENT_MSG_REDRAW. */
struct {
- float x, y, width, height;
+ int x, y, width, height;
/** Redraw the area fully. If false, object must be set,
* and only the object will be redrawn. */
bool full_redraw;
/** Object to redraw if full_redraw is false. */
struct content *object;
/** Coordinates to plot object at. */
- float object_x, object_y;
+ int object_x, object_y;
/** Dimensions to plot object with. */
- float object_width, object_height;
+ int object_width, object_height;
} redraw;
int delay; /**< Minimum delay, for CONTENT_MSG_REFRESH */
/** Low-level cache handle, for CONTENT_MSG_DOWNLOAD */
12 years, 7 months
r11892 tlsa - /trunk/netsurf/image/gif.c
by netsurf@semichrome.net
Author: tlsa
Date: Wed Mar 2 15:09:28 2011
New Revision: 11892
URL: http://source.netsurf-browser.org?rev=11892&view=rev
Log:
Cast unsigned gif coords to signed, for comparison.
Modified:
trunk/netsurf/image/gif.c
Modified: trunk/netsurf/image/gif.c
URL: http://source.netsurf-browser.org/trunk/netsurf/image/gif.c?rev=11892&r1=...
==============================================================================
--- trunk/netsurf/image/gif.c (original)
+++ trunk/netsurf/image/gif.c Wed Mar 2 15:09:28 2011
@@ -293,24 +293,26 @@
/* previous frame needed clearing: expand the redraw area to
* cover it */
if (data.redraw.full_redraw) {
- if (data.redraw.x > gif->frames[f - 1].redraw_x) {
+ if (data.redraw.x >
+ (int)(gif->frames[f - 1].redraw_x)) {
data.redraw.width += data.redraw.x -
gif->frames[f - 1].redraw_x;
data.redraw.x = gif->frames[f - 1].redraw_x;
}
- if (data.redraw.y > gif->frames[f - 1].redraw_y) {
+ if (data.redraw.y >
+ (int)(gif->frames[f - 1].redraw_y)) {
data.redraw.height += (data.redraw.y -
gif->frames[f - 1].redraw_y);
data.redraw.y = gif->frames[f - 1].redraw_y;
}
- if ((gif->frames[f - 1].redraw_x +
+ if ((int)(gif->frames[f - 1].redraw_x +
gif->frames[f - 1].redraw_width) >
(data.redraw.x + data.redraw.width))
data.redraw.width =
gif->frames[f - 1].redraw_x -
data.redraw.x +
gif->frames[f - 1].redraw_width;
- if ((gif->frames[f - 1].redraw_y +
+ if ((int)(gif->frames[f - 1].redraw_y +
gif->frames[f - 1].redraw_height) >
(data.redraw.y + data.redraw.height))
data.redraw.height =
@@ -322,8 +324,8 @@
} else {
/* do advanced check */
if ((data.redraw.x == 0) && (data.redraw.y == 0) &&
- (data.redraw.width == gif->width) &&
- (data.redraw.height == gif->height)) {
+ (data.redraw.width == (int)(gif->width)) &&
+ (data.redraw.height == (int)(gif->height))) {
data.redraw.full_redraw = !gif->frames[f].opaque;
} else {
data.redraw.full_redraw = true;
12 years, 7 months
r11890 tlsa - in /trunk/netsurf: desktop/textinput.c render/box.c render/box.h render/html.c render/layout.c
by netsurf@semichrome.net
Author: tlsa
Date: Wed Mar 2 13:30:08 2011
New Revision: 11890
URL: http://source.netsurf-browser.org?rev=11890&view=rev
Log:
Move clone to box flags.
Modified:
trunk/netsurf/desktop/textinput.c
trunk/netsurf/render/box.c
trunk/netsurf/render/box.h
trunk/netsurf/render/html.c
trunk/netsurf/render/layout.c
Modified: trunk/netsurf/desktop/textinput.c
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/textinput.c?rev=1...
==============================================================================
--- trunk/netsurf/desktop/textinput.c (original)
+++ trunk/netsurf/desktop/textinput.c Wed Mar 2 13:30:08 2011
@@ -2001,7 +2001,7 @@
box_insert_sibling(text_box, new_br);
memcpy(new_text, text_box, sizeof (struct box));
- new_text->clone = 1;
+ new_text->flags |= CLONE;
new_text->text = text;
memcpy(new_text->text, text_box->text + char_offset,
text_box->length - char_offset);
Modified: trunk/netsurf/render/box.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.c?rev=11890&r1...
==============================================================================
--- trunk/netsurf/render/box.c (original)
+++ trunk/netsurf/render/box.c Wed Mar 2 13:30:08 2011
@@ -149,7 +149,6 @@
box->text = NULL;
box->length = 0;
box->space = 0;
- box->clone = 0;
box->href = href;
box->target = target;
box->title = title;
@@ -281,7 +280,7 @@
void box_free_box(struct box *box)
{
- if (!box->clone) {
+ if (!(box->flags & CLONE)) {
if (box->gadget)
form_free_control(box->gadget);
if (box->scroll_x != NULL)
Modified: trunk/netsurf/render/box.h
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.h?rev=11890&r1...
==============================================================================
--- trunk/netsurf/render/box.h (original)
+++ trunk/netsurf/render/box.h Wed Mar 2 13:30:08 2011
@@ -121,7 +121,8 @@
NEW_LINE = 1 << 0, /* first inline on a new line */
STYLE_OWNED = 1 << 1, /* style is owned by this box */
PRINTED = 1 << 2, /* box has already been printed */
- PRE_STRIP = 1 << 3 /* PRE tag needing leading newline stripped */
+ PRE_STRIP = 1 << 3, /* PRE tag needing leading newline stripped */
+ CLONE = 1 << 4 /* continuation of previous box from wrapping */
} box_flags;
/* Sides of a box */
@@ -203,9 +204,6 @@
/** Width of space after current text (depends on font and size). */
int space;
- /** This box is a continuation of the previous box (eg from line
- * breaking). */
- unsigned int clone : 1;
char *href; /**< Link, or 0. */
const char *target; /**< Link target, or 0. */
Modified: trunk/netsurf/render/html.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/html.c?rev=11890&r...
==============================================================================
--- trunk/netsurf/render/html.c (original)
+++ trunk/netsurf/render/html.c Wed Mar 2 13:30:08 2011
@@ -1540,7 +1540,7 @@
b->max_width = UNKNOWN_MAX_WIDTH;
/* delete any clones of this box */
- while (box->next && box->next->clone) {
+ while (box->next && (box->next->flags & CLONE)) {
/* box_free_box(box->next); */
box->next = box->next->next;
}
Modified: trunk/netsurf/render/layout.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/layout.c?rev=11890...
==============================================================================
--- trunk/netsurf/render/layout.c (original)
+++ trunk/netsurf/render/layout.c Wed Mar 2 13:30:08 2011
@@ -1932,7 +1932,7 @@
c2 = talloc_memdup(content, split_box, sizeof *c2);
if (!c2)
return false;
- c2->clone = 1;
+ c2->flags |= CLONE;
/* Set remaining text in c2 */
if (split_box->parent->parent->gadget != NULL) {
12 years, 7 months
r11889 tlsa - in /trunk/netsurf/render: box.c box.h box_construct.c
by netsurf@semichrome.net
Author: tlsa
Date: Wed Mar 2 13:16:03 2011
New Revision: 11889
URL: http://source.netsurf-browser.org?rev=11889&view=rev
Log:
Move strip_leading_newline to box flags.
Modified:
trunk/netsurf/render/box.c
trunk/netsurf/render/box.h
trunk/netsurf/render/box_construct.c
Modified: trunk/netsurf/render/box.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.c?rev=11889&r1...
==============================================================================
--- trunk/netsurf/render/box.c (original)
+++ trunk/netsurf/render/box.c Wed Mar 2 13:16:03 2011
@@ -132,7 +132,7 @@
box->type = BOX_INLINE;
box->flags = 0;
- box->flags = style_owned ? box->flags | STYLE_OWNED : box->flags;
+ box->flags = style_owned ? (box->flags | STYLE_OWNED) : box->flags;
box->styles = styles;
box->style = style;
box->x = box->y = 0;
@@ -150,7 +150,6 @@
box->length = 0;
box->space = 0;
box->clone = 0;
- box->strip_leading_newline = 0;
box->href = href;
box->target = target;
box->title = title;
Modified: trunk/netsurf/render/box.h
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.h?rev=11889&r1...
==============================================================================
--- trunk/netsurf/render/box.h (original)
+++ trunk/netsurf/render/box.h Wed Mar 2 13:16:03 2011
@@ -120,7 +120,8 @@
typedef enum {
NEW_LINE = 1 << 0, /* first inline on a new line */
STYLE_OWNED = 1 << 1, /* style is owned by this box */
- PRINTED = 1 << 2 /* box has already been printed */
+ PRINTED = 1 << 2, /* box has already been printed */
+ PRE_STRIP = 1 << 3 /* PRE tag needing leading newline stripped */
} box_flags;
/* Sides of a box */
@@ -205,10 +206,6 @@
/** This box is a continuation of the previous box (eg from line
* breaking). */
unsigned int clone : 1;
- /** This box represents a <pre> tag which has not yet had its white
- * space stripped if possible
- */
- unsigned int strip_leading_newline : 1;
char *href; /**< Link, or 0. */
const char *target; /**< Link target, or 0. */
Modified: trunk/netsurf/render/box_construct.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box_construct.c?re...
==============================================================================
--- trunk/netsurf/render/box_construct.c (original)
+++ trunk/netsurf/render/box_construct.c Wed Mar 2 13:16:03 2011
@@ -302,10 +302,10 @@
gui_multitask();
/* In case the parent is a pre block, we clear the
- * strip_leading_newline flag since it is not used if we
+ * PRE_STRIP flag since it is not used if we
* follow the pre with a tag
*/
- parent->strip_leading_newline = 0;
+ parent->flags &= ~PRE_STRIP;
styles = box_get_style(content, parent_style, n);
if (!styles)
@@ -824,7 +824,7 @@
current = text;
/* swallow a single leading new line */
- if (parent->strip_leading_newline) {
+ if (parent->flags & PRE_STRIP) {
switch (*current) {
case '\n':
current++; break;
@@ -833,7 +833,7 @@
if (*current == '\n') current++;
break;
}
- parent->strip_leading_newline = 0;
+ parent->flags &= ~PRE_STRIP;
}
do {
@@ -1079,7 +1079,7 @@
bool box_pre(BOX_SPECIAL_PARAMS)
{
- box->strip_leading_newline = 1;
+ box->flags |= PRE_STRIP;
return true;
}
12 years, 7 months
r11888 tlsa - in /trunk/netsurf/render: box.c box.h html_redraw.c
by netsurf@semichrome.net
Author: tlsa
Date: Wed Mar 2 12:41:17 2011
New Revision: 11888
URL: http://source.netsurf-browser.org?rev=11888&view=rev
Log:
Move printed to box flags.
Modified:
trunk/netsurf/render/box.c
trunk/netsurf/render/box.h
trunk/netsurf/render/html_redraw.c
Modified: trunk/netsurf/render/box.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.c?rev=11888&r1...
==============================================================================
--- trunk/netsurf/render/box.c (original)
+++ trunk/netsurf/render/box.c Wed Mar 2 12:41:17 2011
@@ -157,7 +157,6 @@
box->columns = 1;
box->rows = 1;
box->start_column = 0;
- box->printed = false;
box->next = NULL;
box->prev = NULL;
box->children = NULL;
Modified: trunk/netsurf/render/box.h
URL: http://source.netsurf-browser.org/trunk/netsurf/render/box.h?rev=11888&r1...
==============================================================================
--- trunk/netsurf/render/box.h (original)
+++ trunk/netsurf/render/box.h Wed Mar 2 12:41:17 2011
@@ -119,7 +119,8 @@
/** Type of a struct box. */
typedef enum {
NEW_LINE = 1 << 0, /* first inline on a new line */
- STYLE_OWNED = 1 << 1 /* style is owned by this box */
+ STYLE_OWNED = 1 << 1, /* style is owned by this box */
+ PRINTED = 1 << 2 /* box has already been printed */
} box_flags;
/* Sides of a box */
@@ -216,8 +217,6 @@
unsigned int columns; /**< Number of columns for TABLE / TABLE_CELL. */
unsigned int rows; /**< Number of rows for TABLE only. */
unsigned int start_column; /**< Start column for TABLE_CELL only. */
-
- bool printed; /** Whether this box has already been printed*/
struct box *next; /**< Next sibling box, or 0. */
struct box *prev; /**< Previous sibling box, or 0. */
Modified: trunk/netsurf/render/html_redraw.c
URL: http://source.netsurf-browser.org/trunk/netsurf/render/html_redraw.c?rev=...
==============================================================================
--- trunk/netsurf/render/html_redraw.c (original)
+++ trunk/netsurf/render/html_redraw.c Wed Mar 2 12:41:17 2011
@@ -267,7 +267,7 @@
struct box *bg_box = NULL;
bool has_x_scroll, has_y_scroll;
- if (html_redraw_printing && box->printed)
+ if (html_redraw_printing && (box->flags & PRINTED))
return true;
/* avoid trivial FP maths */
@@ -377,7 +377,7 @@
return true;
}
}
- else box->printed = true;/*it won't be printed anymore*/
+ else box->flags |= PRINTED; /*it won't be printed anymore*/
}
/* if visibility is hidden render children only */
12 years, 7 months