[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:24:52 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 471b42c7ff902d3d9dfe1ca200e395e7734cb9ef
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 17 04:15:33 2002 +0000
- fixed 2997891 -- Alexander confused about base page URL for relative links
* WebCoreSupport.subproj/WebSubresourceClient.m:
(-[WebSubresourceClient WebResourceHandle:didRedirectToURL:]):
Don't tell the bridge the URL changed. The bridge doesn't care about redirects
for subresources (and if it did, we'd need some way to tell it that this was
a subresource redirect).
* WebCoreSupport.subproj/WebBridge.m: Formatting tweaks.
* WebCoreSupport.subproj/WebImageRenderer.m: Formatting tweaks.
* WebView.subproj/WebView.m: Formatting tweaks.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3943a32..d7f4943 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,4 +1,18 @@
-2002-07-16 Richard Williamson (Local) <rjw at apple.com>
+2002-07-16 Darin Adler <darin at apple.com>
+
+ - fixed 2997891 -- Alexander confused about base page URL for relative links
+
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (-[WebSubresourceClient WebResourceHandle:didRedirectToURL:]):
+ Don't tell the bridge the URL changed. The bridge doesn't care about redirects
+ for subresources (and if it did, we'd need some way to tell it that this was
+ a subresource redirect).
+
+ * WebCoreSupport.subproj/WebBridge.m: Formatting tweaks.
+ * WebCoreSupport.subproj/WebImageRenderer.m: Formatting tweaks.
+ * WebView.subproj/WebView.m: Formatting tweaks.
+
+2002-07-16 Richard Williamson <rjw at apple.com>
Really, stop animation if last frame has zero duration, like IE.
Was checking adjustedFrameDuration, which is never zero.
@@ -41,7 +55,7 @@
* almost every file: Renamed IF* -> Web*.
-2002-07-15 Richard Williamson (Home) <rjw at apple.com>
+2002-07-15 Richard Williamson <rjw at apple.com>
Removed dependence on window resize notification. We now
use the IFWebView setFrame: method to trigger layouts. Much
@@ -119,7 +133,7 @@
Make data in private class @public, since the main class needs to get at it
directly.
-2002-07-15 Richard Williamson (Home) <rjw at apple.com>
+2002-07-15 Richard Williamson <rjw at apple.com>
Only adjustFrames in parent if parent is a frame set.
(Anywhere from 2% to 6% gain, depending on what you believe.)
@@ -278,7 +292,7 @@
to match standard used by our other frameworks. (Checked that we no longer have
any hard-coding of the bundle identifier anywhere in our code.)
-2002-07-13 Richard Williamson (Home) <rjw at apple.com>
+2002-07-13 Richard Williamson <rjw at apple.com>
Fixed 2981849 - frames don't always draw correctly.
@@ -1158,7 +1172,7 @@ rename
* WebView.subproj/IFWebDataSource.mm:
(-[IFWebDataSource stopLoading]): call [downloadHandler cancel] here so clean up is done immediately.
-2002-06-27 Richard Williamson (local) <rjw at apple.com>
+2002-06-27 Richard Williamson <rjw at apple.com>
Fixed tiling of progressively loaded images.
@@ -1169,7 +1183,7 @@ rename
(-[IFImageRenderer loadStatus]):
(-[IFImageRenderer tileInRect:fromPoint:]):
-2002-06-27 Richard Williamson (local) <rjw at apple.com>
+2002-06-27 Richard Williamson <rjw at apple.com>
* WebCoreSupport.subproj/IFImageRenderer.h:
* WebCoreSupport.subproj/IFImageRenderer.m:
@@ -1177,7 +1191,7 @@ rename
(-[IFImageRenderer loadStatus]):
(-[IFImageRenderer tileInRect:fromPoint:]):
-2002-06-27 Richard Williamson (local) <rjw at apple.com>
+2002-06-27 Richard Williamson <rjw at apple.com>
* WebCoreSupport.subproj/IFTextRenderer.m:
(-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
@@ -1667,7 +1681,7 @@ guide for the port's coordinates. Also added a workaround for Java.
things a bit because beginAnimationInView gets called again, so we don't
have to reschedule the timer.
-2002-06-20 Richard Williamson (local) <rjw at apple.com>
+2002-06-20 Richard Williamson <rjw at apple.com>
* WebCoreSupport.subproj/IFImageRenderer.m:
(-[IFImageRenderer frameDuration]):
@@ -1750,7 +1764,7 @@ guide for the port's coordinates. Also added a workaround for Java.
=== Alexander-9 ===
-2002-06-19 Richard Williamson (local) <rjw at apple.com>
+2002-06-19 Richard Williamson <rjw at apple.com>
Break image renderer reference cycle. When a view is removed from the view
hierarchy active image renderers are told to stop animating,
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 3943a32..d7f4943 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,4 +1,18 @@
-2002-07-16 Richard Williamson (Local) <rjw at apple.com>
+2002-07-16 Darin Adler <darin at apple.com>
+
+ - fixed 2997891 -- Alexander confused about base page URL for relative links
+
+ * WebCoreSupport.subproj/WebSubresourceClient.m:
+ (-[WebSubresourceClient WebResourceHandle:didRedirectToURL:]):
+ Don't tell the bridge the URL changed. The bridge doesn't care about redirects
+ for subresources (and if it did, we'd need some way to tell it that this was
+ a subresource redirect).
+
+ * WebCoreSupport.subproj/WebBridge.m: Formatting tweaks.
+ * WebCoreSupport.subproj/WebImageRenderer.m: Formatting tweaks.
+ * WebView.subproj/WebView.m: Formatting tweaks.
+
+2002-07-16 Richard Williamson <rjw at apple.com>
Really, stop animation if last frame has zero duration, like IE.
Was checking adjustedFrameDuration, which is never zero.
@@ -41,7 +55,7 @@
* almost every file: Renamed IF* -> Web*.
-2002-07-15 Richard Williamson (Home) <rjw at apple.com>
+2002-07-15 Richard Williamson <rjw at apple.com>
Removed dependence on window resize notification. We now
use the IFWebView setFrame: method to trigger layouts. Much
@@ -119,7 +133,7 @@
Make data in private class @public, since the main class needs to get at it
directly.
-2002-07-15 Richard Williamson (Home) <rjw at apple.com>
+2002-07-15 Richard Williamson <rjw at apple.com>
Only adjustFrames in parent if parent is a frame set.
(Anywhere from 2% to 6% gain, depending on what you believe.)
@@ -278,7 +292,7 @@
to match standard used by our other frameworks. (Checked that we no longer have
any hard-coding of the bundle identifier anywhere in our code.)
-2002-07-13 Richard Williamson (Home) <rjw at apple.com>
+2002-07-13 Richard Williamson <rjw at apple.com>
Fixed 2981849 - frames don't always draw correctly.
@@ -1158,7 +1172,7 @@ rename
* WebView.subproj/IFWebDataSource.mm:
(-[IFWebDataSource stopLoading]): call [downloadHandler cancel] here so clean up is done immediately.
-2002-06-27 Richard Williamson (local) <rjw at apple.com>
+2002-06-27 Richard Williamson <rjw at apple.com>
Fixed tiling of progressively loaded images.
@@ -1169,7 +1183,7 @@ rename
(-[IFImageRenderer loadStatus]):
(-[IFImageRenderer tileInRect:fromPoint:]):
-2002-06-27 Richard Williamson (local) <rjw at apple.com>
+2002-06-27 Richard Williamson <rjw at apple.com>
* WebCoreSupport.subproj/IFImageRenderer.h:
* WebCoreSupport.subproj/IFImageRenderer.m:
@@ -1177,7 +1191,7 @@ rename
(-[IFImageRenderer loadStatus]):
(-[IFImageRenderer tileInRect:fromPoint:]):
-2002-06-27 Richard Williamson (local) <rjw at apple.com>
+2002-06-27 Richard Williamson <rjw at apple.com>
* WebCoreSupport.subproj/IFTextRenderer.m:
(-[IFTextRenderer floatWidthForCharacters:stringLength:fromCharacterPosition:numberOfCharacters:applyRounding:attemptFontSubstitution:]):
@@ -1667,7 +1681,7 @@ guide for the port's coordinates. Also added a workaround for Java.
things a bit because beginAnimationInView gets called again, so we don't
have to reschedule the timer.
-2002-06-20 Richard Williamson (local) <rjw at apple.com>
+2002-06-20 Richard Williamson <rjw at apple.com>
* WebCoreSupport.subproj/IFImageRenderer.m:
(-[IFImageRenderer frameDuration]):
@@ -1750,7 +1764,7 @@ guide for the port's coordinates. Also added a workaround for Java.
=== Alexander-9 ===
-2002-06-19 Richard Williamson (local) <rjw at apple.com>
+2002-06-19 Richard Williamson <rjw at apple.com>
Break image renderer reference cycle. When a view is removed from the view
hierarchy active image renderers are told to stop animating,
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 6c37e33..c7b2bd3 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -138,7 +138,6 @@
[[[dataSource controller] windowContext] setFrame:frame];
}
-
- (NSWindow *)window
{
return [[[dataSource controller] windowContext] window];
@@ -169,7 +168,7 @@
- (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)withDataSource
{
if (dataSource == nil) {
- [self setDataSource: withDataSource];
+ [self setDataSource:withDataSource];
[self openURL:[dataSource inputURL]];
if ([dataSource redirectedURL]) {
[self setURL:[dataSource redirectedURL]];
diff --git a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
index 251d516..ae8b1af 100644
--- a/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebImageRenderer.m
@@ -3,29 +3,30 @@
Copyright (c) 2002, Apple, Inc. All rights reserved.
*/
-#import <WebKit/WebException.h>
#import <WebKit/WebImageRenderer.h>
+
+#import <WebKit/WebException.h>
#import <WebKit/WebKitDebug.h>
+#define MINIMUM_DURATION (1.0/30.0)
+
@implementation WebImageRenderer
static NSMutableArray *activeImageRenderers;
-+ (void)stopAnimationsInView: (NSView *)aView
++ (void)stopAnimationsInView:(NSView *)aView
{
int i, count;
count = [activeImageRenderers count];
- for (i = count-1; i >= 0; i--){
- WebImageRenderer *renderer = [activeImageRenderers objectAtIndex: i];
- if (renderer->frameView == aView){
+ for (i = count-1; i >= 0; i--) {
+ WebImageRenderer *renderer = [activeImageRenderers objectAtIndex:i];
+ if (renderer->frameView == aView) {
[renderer stopAnimation];
}
}
-
}
-
- copyWithZone:(NSZone *)zone
{
WebImageRenderer *copy = [super copyWithZone:zone];
@@ -39,16 +40,15 @@ static NSMutableArray *activeImageRenderers;
return copy;
}
-- (BOOL)incrementalLoadWithBytes: (const void *)bytes length:(unsigned)length complete:(BOOL)isComplete
+- (BOOL)incrementalLoadWithBytes:(const void *)bytes length:(unsigned)length complete:(BOOL)isComplete
{
- NSBitmapImageRep* imageRep = [[self representations] objectAtIndex:0];
- //NSData *data = [[NSData alloc] initWithBytesNoCopy: (void *)bytes length: length freeWhenDone: NO];
- NSData *data = [[NSData alloc] initWithBytes: (void *)bytes length: length];
+ NSBitmapImageRep *imageRep = [[self representations] objectAtIndex:0];
+ NSData *data = [[NSData alloc] initWithBytes:bytes length:length];
NSSize size;
loadStatus = [imageRep incrementalLoadFromData:data complete:isComplete];
[data release];
- switch (loadStatus){
+ switch (loadStatus) {
case NSImageRepLoadStatusUnknownType: // not enough data to determine image format. please feed me more data
//printf ("NSImageRepLoadStatusUnknownType size %d, isComplete %d\n", length, isComplete);
return NO;
@@ -79,7 +79,6 @@ static NSMutableArray *activeImageRenderers;
return NO;
}
-
- (void)dealloc
{
[self stopAnimation];
@@ -87,7 +86,6 @@ static NSMutableArray *activeImageRenderers;
[super dealloc];
}
-
- (id)firstRepProperty:(NSString *)propertyName
{
id firstRep = [[self representations] objectAtIndex:0];
@@ -100,34 +98,32 @@ static NSMutableArray *activeImageRenderers;
- (int)frameCount
{
id property = [self firstRepProperty:NSImageFrameCount];
- return property != nil ? [property intValue] : 1;
+ return property ? [property intValue] : 1;
}
- (int)currentFrame
{
id property = [self firstRepProperty:NSImageCurrentFrame];
- return property != nil ? [property intValue] : 1;
+ return property ? [property intValue] : 1;
}
- (void)setCurrentFrame:(int)frame
{
- NSBitmapImageRep* imageRep = [[self representations] objectAtIndex:0];
+ NSBitmapImageRep *imageRep = [[self representations] objectAtIndex:0];
[imageRep setProperty:NSImageCurrentFrame withValue:[NSNumber numberWithInt:frame]];
}
-#define MINIMUM_DURATON (1.0/30.0)
-
- (float)unadjustedFrameDuration
{
id property = [self firstRepProperty:NSImageCurrentFrameDuration];
- float duration = (property != nil ? [property floatValue] : 0.0);
+ float duration = property ? [property floatValue] : 0.0;
return duration;
}
- (float)frameDuration
{
float duration = [self unadjustedFrameDuration];
- if (duration < MINIMUM_DURATON){
+ if (duration < MINIMUM_DURATION) {
/*
Many annoying ads specify a 0 duration to make an image flash
as quickly as possible. However a zero duration is faster than
@@ -138,27 +134,25 @@ static NSMutableArray *activeImageRenderers;
uses 1/100th. The units in the GIF specification are 1/100th of second.
We will use 1/30th of second as the minimum time.
*/
- duration = MINIMUM_DURATON;
+ duration = MINIMUM_DURATION;
}
return duration;
}
-- (void)_scheduleFrame
+- (void)scheduleFrame
{
- if (!animationFinished){
- frameTimer = [[NSTimer scheduledTimerWithTimeInterval:[self frameDuration]
+ frameTimer = [[NSTimer scheduledTimerWithTimeInterval:[self frameDuration]
target:self
selector:@selector(nextFrame:)
userInfo:nil
repeats:NO] retain];
- if (!activeImageRenderers)
- activeImageRenderers = [[NSMutableArray alloc] init];
-
- [activeImageRenderers addObject: self];
+
+ if (!activeImageRenderers) {
+ activeImageRenderers = [[NSMutableArray alloc] init];
}
+ [activeImageRenderers addObject:self];
}
-
- (void)nextFrame:(id)context
{
int currentFrame;
@@ -170,20 +164,20 @@ static NSMutableArray *activeImageRenderers;
currentFrame = [self currentFrame] + 1;
if (currentFrame >= [self frameCount]) {
+ // Don't repeat if the last frame has a duration of 0.
+ // IE doesn't repeat, so we don't.
if ([self unadjustedFrameDuration] == 0) {
- animationFinished = YES; // Don't repeat if the last frame has a duration of 0.
- // IE doesn't repeat, so we don't.
+ animationFinished = YES;
return;
}
- else
- currentFrame = 0;
+ currentFrame = 0;
}
[self setCurrentFrame:currentFrame];
window = [frameView window];
// We can't use isOpaque because it returns YES for many non-opaque images (Radar 2966937).
- // But we can at least assume that any image representatin without alpha is opaque.
+ // But we can at least assume that any image representation without alpha is opaque.
if (![[[self representations] objectAtIndex:0] hasAlpha]) {
if ([frameView canDraw]) {
[frameView lockFocus];
@@ -193,32 +187,34 @@ static NSMutableArray *activeImageRenderers;
fraction:1.0];
[frameView unlockFocus];
}
- [self _scheduleFrame];
+ if (!animationFinished) {
+ [self scheduleFrame];
+ }
} else {
// No need to schedule the next frame in this case. The display
// will eventually cause the image to be redrawn and the next frame
- // will be scheduled in beginAnimationInRect:fromRect:
+ // will be scheduled in beginAnimationInRect:fromRect:.
[frameView displayRect:targetRect];
}
[window flushWindow];
}
-- (void)beginAnimationInRect: (NSRect)ir fromRect: (NSRect)fr
+- (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr
{
// The previous, if any, frameView, is released in stopAnimation.
[self stopAnimation];
- [self drawInRect: ir
- fromRect: fr
- operation: NSCompositeSourceOver // Renders transparency correctly
- fraction: 1.0];
+ [self drawInRect:ir
+ fromRect:fr
+ operation:NSCompositeSourceOver // Renders transparency correctly
+ fraction:1.0];
- if ([self frameCount] > 1 && animationFinished != YES) {
+ if ([self frameCount] > 1 && !animationFinished) {
imageRect = fr;
targetRect = ir;
frameView = [[NSView focusView] retain];
- [self _scheduleFrame];
+ [self scheduleFrame];
}
}
@@ -231,13 +227,13 @@ static NSMutableArray *activeImageRenderers;
[frameView release];
frameView = nil;
- [activeImageRenderers removeObject: self];
+ [activeImageRenderers removeObject:self];
}
- (void)resize:(NSSize)s
{
- [self setScalesWhenResized: YES];
- [self setSize: s];
+ [self setScalesWhenResized:YES];
+ [self setSize:s];
}
- (void)tileInRect:(NSRect)rect fromPoint:(NSPoint)point
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index 2fa636d..38a96c6 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -67,13 +67,11 @@
[rLoader cancel];
WebError *badURLError = [WebError errorWithCode:WebResultBadURLError
- inDomain:WebErrorDomainWebFoundation
- failingURL:URL
- isTerminal:YES];
+ inDomain:WebErrorDomainWebFoundation
+ failingURL:URL
+ isTerminal:YES];
[[source controller] _receivedError:badURLError forResourceHandle:nil
partialProgress:nil fromDataSource:source];
-
- return nil;
} else {
[source _addURLHandle:handle];
@@ -82,9 +80,9 @@
[client release];
[handle loadInBackground];
-
- return handle;
}
+
+ return handle;
}
- (void)receivedProgressWithHandle:(WebResourceHandle *)handle complete:(BOOL)isComplete
@@ -167,8 +165,6 @@
WEBKIT_ASSERT(currentURL != nil);
WEBKIT_ASSERT([URL isEqual:[handle redirectedURL]]);
- [[dataSource _bridge] setURL:URL];
-
// FIXME: We do want to tell the client about redirects.
// But the current API doesn't give any way to tell redirects on
// the main page from redirects on subresources, so for now we are
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index 2fa636d..38a96c6 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -67,13 +67,11 @@
[rLoader cancel];
WebError *badURLError = [WebError errorWithCode:WebResultBadURLError
- inDomain:WebErrorDomainWebFoundation
- failingURL:URL
- isTerminal:YES];
+ inDomain:WebErrorDomainWebFoundation
+ failingURL:URL
+ isTerminal:YES];
[[source controller] _receivedError:badURLError forResourceHandle:nil
partialProgress:nil fromDataSource:source];
-
- return nil;
} else {
[source _addURLHandle:handle];
@@ -82,9 +80,9 @@
[client release];
[handle loadInBackground];
-
- return handle;
}
+
+ return handle;
}
- (void)receivedProgressWithHandle:(WebResourceHandle *)handle complete:(BOOL)isComplete
@@ -167,8 +165,6 @@
WEBKIT_ASSERT(currentURL != nil);
WEBKIT_ASSERT([URL isEqual:[handle redirectedURL]]);
- [[dataSource _bridge] setURL:URL];
-
// FIXME: We do want to tell the client about redirects.
// But the current API doesn't give any way to tell redirects on
// the main page from redirects on subresources, so for now we are
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 3265f75..e249382 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -187,10 +187,10 @@ enum {
}
dataSource = [[[WebDataSource alloc] initWithURL:URL] autorelease];
- frame = nil;
frame = [[self controller] mainFrame];
- if([frame setProvisionalDataSource:dataSource])
+ if ([frame setProvisionalDataSource:dataSource]) {
[frame startLoading];
+ }
}
+ (void) registerViewClass:(Class)viewClass forMIMEType:(NSString *)MIMEType
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list