Commit 331b6de1 authored by darin's avatar darin

WebCore:

        Reviewed by Adele.

        - WebCore part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
          eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique

        * platform/mac/WebCoreGraphicsBridge.h: Removed.
        * platform/mac/WebCoreGraphicsBridge.m: Removed.
        * platform/mac/WebCoreSystemInterface.h: Added.
        * platform/mac/WebCoreSystemInterface.mm: Added.

        * WebCore.exp: Add new SystemInterface globals, remove WebCoreGraphicsBridge.

        * WebCore.xcodeproj/project.pbxproj: Updated for removed and added files.
        Sorted files.

        * bridge/mac/FrameMac.mm: Removed unneeded include of WebCoreGraphicsBridge.h.

        * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setDragImage):
        Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
        call wkSetDragImage.

        * platform/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawFocusRing):
        Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
        call wkDrawFocusRing.

        * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextField):
        Call wkDrawBezeledTextFieldCell from WebCoreSystemInterface instead of using
        WebGraphicsBridge to do the same thing.

WebKit:

        Reviewed by Adele.

        - WebKit part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
          eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique

        * WebCoreSupport/WebGraphicsBridge.h: Removed.
        * WebCoreSupport/WebGraphicsBridge.m: Removed.
        * WebCoreSupport/WebSystemInterface.h: Added.
        * WebCoreSupport/WebSystemInterface.m: Added.

        * WebKit.xcodeproj/project.pbxproj: Updated for removed and added files.

        * WebCoreSupport/WebImageData.m: Removed unneeded include of WebGraphicsBridge.h.
        * WebCoreSupport/WebImageRenderer.m: Ditto.
        * WebCoreSupport/WebTextRenderer.m: Ditto.

        * WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Guarded all the one-time
        initialization inside a boolean, just in case some things take a little time. Added
        a call to InitWebCoreSystemInterface to the one-time initialization here. Later, we
        will need to add it in some other places if we call code that requires the use of
        WebCoreSystemInterface functions from anywhere that can be invoked before creations
        of the first WebFrameView, but for now there is no need.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13989 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7a470a72
2006-04-20 Darin Adler <darin@apple.com>
Reviewed by Adele.
- WebCore part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
* platform/mac/WebCoreGraphicsBridge.h: Removed.
* platform/mac/WebCoreGraphicsBridge.m: Removed.
* platform/mac/WebCoreSystemInterface.h: Added.
* platform/mac/WebCoreSystemInterface.mm: Added.
* WebCore.exp: Add new SystemInterface globals, remove WebCoreGraphicsBridge.
* WebCore.xcodeproj/project.pbxproj: Updated for removed and added files.
Sorted files.
* bridge/mac/FrameMac.mm: Removed unneeded include of WebCoreGraphicsBridge.h.
* platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::setDragImage):
Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
call wkSetDragImage.
* platform/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawFocusRing):
Moved code from WebGraphicsBridge here, using WebCoreSystemInterface so we can
call wkDrawFocusRing.
* rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintTextField):
Call wkDrawBezeledTextFieldCell from WebCoreSystemInterface instead of using
WebGraphicsBridge to do the same thing.
2006-04-20 Adele Peterson <adele@apple.com>
Reviewed by Hyatt.
......@@ -102,17 +102,16 @@
.objc_class_name_DOMText
.objc_class_name_DOMTreeWalker
.objc_class_name_DOMUIEvent
.objc_class_name_WebCoreFrameBridge
.objc_class_name_WebCorePageBridge
.objc_class_name_WebCoreCache
.objc_class_name_WebCoreCookieAdapter
.objc_class_name_WebCoreEncodings
.objc_class_name_WebCoreFrameBridge
.objc_class_name_WebCoreFrameNamespaces
.objc_class_name_WebCoreGraphicsBridge
.objc_class_name_WebCoreHistory
.objc_class_name_WebCoreImageRendererFactory
.objc_class_name_WebCoreJavaScript
.objc_class_name_WebCoreKeyGenerator
.objc_class_name_WebCorePageBridge
.objc_class_name_WebCoreScriptDebugger
.objc_class_name_WebCoreSettings
.objc_class_name_WebCoreTextDecoder
......@@ -124,3 +123,6 @@ _WebCoreInitializeEmptyTextStyle
_WebCoreInitializeFont
_WebCoreInitializeTextRun
_WebCorePageCacheStateKey
_wkDrawBezeledTextFieldCell
_wkDrawFocusRing
_wkSetDragImage
This diff is collapsed.
......@@ -58,7 +58,6 @@
#import "TextIterator.h"
#import "TransferJob.h"
#import "WebCoreFrameBridge.h"
#import "WebCoreGraphicsBridge.h"
#import "WebCoreViewFactory.h"
#import "WebDashboardRegion.h"
#import "csshelper.h"
......
......@@ -26,16 +26,11 @@
#import "config.h"
#import "ClipboardMac.h"
#import "CachedImage.h"
#import "FoundationExtras.h"
#import "FrameMac.h"
#import "WebCoreGraphicsBridge.h"
#import "WebCoreImageRenderer.h"
#import "CachedImage.h"
#import <AppKit/AppKit.h>
using WebCore::String;
using WebCore::Node;
#import "WebCoreSystemInterface.h"
namespace WebCore {
......@@ -316,7 +311,16 @@ void ClipboardMac::setDragImage(CachedImage* image, Node *node, const IntPoint &
NSPoint cocoaLoc;
NSImage* cocoaImage = dragNSImage(&cocoaLoc);
if (cocoaImage) {
[[WebCoreGraphicsBridge sharedBridge] setDraggingImage:cocoaImage at:cocoaLoc];
// Dashboard wants to be able to set the drag image during dragging, but Cocoa does not allow this.
// Instead we must drop down to the CoreGraphics API.
wkSetDragImage(cocoaImage, cocoaLoc);
// Hack: We must post an event to wake up the NSDragManager, which is sitting in a nextEvent call
// up the stack from us because the CoreFoundation drag manager does not use the run loop by itself.
// This is the most innocuous event to use, per Kristen Forster.
NSEvent* ev = [NSEvent mouseEventWithType:NSMouseMoved location:NSZeroPoint
modifierFlags:0 timestamp:0 windowNumber:0 context:nil eventNumber:0 clickCount:0 pressure:0];
[NSApp postEvent:ev atStart:YES];
}
}
// Else either 1) we haven't started dragging yet, so we rely on the part to install this drag image
......
......@@ -26,15 +26,15 @@
#import "config.h"
#import "GraphicsContext.h"
#import "Font.h"
#import "BlockExceptions.h"
#import "FloatRect.h"
#import "Font.h"
#import "FoundationExtras.h"
#import "IntPointArray.h"
#import "IntRect.h"
#import "KRenderingDeviceQuartz.h"
#import "BlockExceptions.h"
#import "WebCoreGraphicsBridge.h"
#import "WebCoreImageRendererFactory.h"
#import "WebCoreSystemInterface.h"
#import "WebCoreTextRenderer.h"
#import "WebCoreTextRendererFactory.h"
#import "Widget.h"
......@@ -582,19 +582,43 @@ void GraphicsContext::drawFocusRing(const Color& color)
{
if (paintingDisabled())
return;
int radius = (focusRingWidth() - 1) / 2;
int offset = radius + focusRingOffset();
CGColorRef colorRef = color.isValid() ? cgColor(color) : 0;
CGMutablePathRef focusRingPath = CGPathCreateMutable();
const Vector<IntRect>& rects = focusRingRects();
unsigned rectCount = rects.size();
for (unsigned i = 0; i < rectCount; i++)
CGPathAddRect(focusRingPath, 0, CGRectInset(rects[i], -offset, -offset));
[[WebCoreGraphicsBridge sharedBridge] drawFocusRingWithPath:focusRingPath radius:radius color:colorRef clipRect:m_data->m_focusRingClip];
CGContextRef context = platformContext();
// FIXME: This works only inside a NSView's drawRect method. The view must be
// focused and this context must be the current NSGraphicsContext.
ASSERT(context == [[NSGraphicsContext currentContext] graphicsPort]);
NSView* view = [NSView focusView];
ASSERT(view);
const NSRect* drawRects;
int count;
[view getRectsBeingDrawn:&drawRects count:&count];
// We have to pass in our own clip rectangles here because a bug in CG
// seems to inflate the clip (thus allowing the focus ring to paint
// slightly outside the clip).
NSRect transformedClipRect = [view convertRect:m_data->m_focusRingClip toView:nil];
for (int i = 0; i < count; ++i) {
NSRect transformedRect = [view convertRect:drawRects[i] toView:nil];
NSRect rectToUse = NSIntersectionRect(transformedRect, transformedClipRect);
CGContextBeginPath(context);
CGContextAddPath(context, focusRingPath);
wkDrawFocusRing(context, *(CGRect *)&rectToUse, colorRef, radius);
}
CGColorRelease(colorRef);
CGPathRelease(focusRingPath);
}
......
/*
* Copyright (C) 2003 Apple Computer, Inc. All rights reserved.
* Copyright 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -23,40 +23,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "config.h"
#import "WebCoreGraphicsBridge.h"
#ifndef WebCoreSystemInterface_h
#define WebCoreSystemInterface_h
#import <kxmlcore/Assertions.h>
#ifdef __cplusplus
extern "C" {
#endif
@implementation WebCoreGraphicsBridge
// In alphabetical order.
static WebCoreGraphicsBridge *sharedBridge;
extern void (*wkDrawBezeledTextFieldCell)(NSRect, BOOL enabled);
extern void (*wkDrawFocusRing)(CGContextRef, CGRect clipRect, CGColorRef, int radius);
extern void (*wkSetDragImage)(NSImage*, NSPoint offset);
+ (WebCoreGraphicsBridge *)sharedBridge
{
return sharedBridge;
#ifdef __cplusplus
}
#endif
- (id)init
{
[super init];
ASSERT(!sharedBridge);
sharedBridge = [self retain];
return self;
}
- (void)drawFocusRingWithPath:(CGPathRef)path radius:(float)radius color:(CGColorRef)color clipRect:(NSRect)rect
{
}
- (void)setDraggingImage:(NSImage *)dragImage at:(NSPoint)dragLoc
{
}
- (void)drawBezeledTextFieldCell:(NSRect)rect enabled:(BOOL)active
{
}
@end
#endif
/*
* Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
* Copyright 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -23,13 +23,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <Cocoa/Cocoa.h>
#import "config.h"
#import "WebCoreSystemInterface.h"
@interface WebCoreGraphicsBridge : NSObject
+ (WebCoreGraphicsBridge *)sharedBridge;
- (void)drawFocusRingWithPath:(CGPathRef)path radius:(float)radius color:(CGColorRef)color clipRect:(NSRect)rect;
- (void)setDraggingImage:(NSImage *)dragImage at:(NSPoint)dragLoc;
- (void)drawBezeledTextFieldCell:(NSRect)rect enabled:(BOOL)active;
@end
void (*wkDrawBezeledTextFieldCell)(NSRect, BOOL enabled);
void (*wkDrawFocusRing)(CGContextRef, CGRect clipRect, CGColorRef, int radius);
void (*wkSetDragImage)(NSImage*, NSPoint offset);
......@@ -23,11 +23,11 @@
#import "RenderThemeMac.h"
#import "Document.h"
#import "FrameView.h"
#import "FoundationExtras.h"
#import "cssstyleselector.h"
#import "FrameView.h"
#import "RenderCanvas.h"
#import "WebCoreGraphicsBridge.h"
#import "WebCoreSystemInterface.h"
#import "cssstyleselector.h"
// The methods in this file are specific to the Mac OS X platform.
......@@ -492,8 +492,11 @@ void RenderThemeMac::setButtonCellState(const RenderObject* o, const IntRect& r)
updateFocusedState(button, o);
}
bool RenderThemeMac::paintButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
bool RenderThemeMac::paintButton(RenderObject* o, const RenderObject::PaintInfo&, const IntRect& r)
{
// FIXME: Ignores the GraphicsContext in the PaintInfo and always draws into the current
// NSGraphicsContext instead.
// Determine the width and height needed for the control and prepare the cell for painting.
setButtonCellState(o, r);
......@@ -519,11 +522,11 @@ bool RenderThemeMac::paintButton(RenderObject* o, const RenderObject::PaintInfo&
return false;
}
bool RenderThemeMac::paintTextField(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
bool RenderThemeMac::paintTextField(RenderObject* o, const RenderObject::PaintInfo&, const IntRect& r)
{
bool enabled = isEnabled(o) && !isReadOnlyControl(o);
[[WebCoreGraphicsBridge sharedBridge] drawBezeledTextFieldCell:NSRect(r) enabled:enabled];
// FIXME: Ignores the GraphicsContext in the PaintInfo and always draws into the current
// NSGraphicsContext instead.
wkDrawBezeledTextFieldCell(r, isEnabled(o) && !isReadOnlyControl(o));
return false;
}
......
2006-04-20 Darin Adler <darin@apple.com>
Reviewed by Adele.
- WebKit part of http://bugzilla.opendarwin.org/show_bug.cgi?id=8505
eliminate WebCoreGraphics bridge, demonstrate new SystemInterface technique
* WebCoreSupport/WebGraphicsBridge.h: Removed.
* WebCoreSupport/WebGraphicsBridge.m: Removed.
* WebCoreSupport/WebSystemInterface.h: Added.
* WebCoreSupport/WebSystemInterface.m: Added.
* WebKit.xcodeproj/project.pbxproj: Updated for removed and added files.
* WebCoreSupport/WebImageData.m: Removed unneeded include of WebGraphicsBridge.h.
* WebCoreSupport/WebImageRenderer.m: Ditto.
* WebCoreSupport/WebTextRenderer.m: Ditto.
* WebView/WebFrameView.m: (-[WebFrameView initWithFrame:]): Guarded all the one-time
initialization inside a boolean, just in case some things take a little time. Added
a call to InitWebCoreSystemInterface to the one-time initialization here. Later, we
will need to add it in some other places if we call code that requires the use of
WebCoreSystemInterface functions from anywhere that can be invoked before creations
of the first WebFrameView, but for now there is no need.
2006-04-19 James G. Speth <speth@end.com>
Reviewed by Timothy.
......
......@@ -29,7 +29,6 @@
#import "WebImageData.h"
#import "WebAssertions.h"
#import "WebGraphicsBridge.h"
#import "WebImageDecoder.h"
#import "WebImageRenderer.h"
#import "WebImageRendererFactory.h"
......
......@@ -30,7 +30,6 @@
#import <WebCore/WebCoreImageRenderer.h>
#import <WebKit/WebAssertions.h>
#import <WebKit/WebGraphicsBridge.h>
#import <WebKit/WebHTMLView.h>
#import <WebKit/WebImageData.h>
#import <WebKit/WebImageRendererFactory.h>
......
/*
* Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
* Copyright 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -26,9 +26,4 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <WebCore/WebCoreGraphicsBridge.h>
@interface WebGraphicsBridge : WebCoreGraphicsBridge
+ (void)createSharedBridge;
+ (WebGraphicsBridge *)sharedBridge;
@end
void InitWebCoreSystemInterface(void);
/*
* Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
* Copyright 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -26,65 +26,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import "WebGraphicsBridge.h"
#import "WebSystemInterface.h"
#import "WebAssertions.h"
#import <WebCore/WebCoreSystemInterface.h>
#import <WebKitSystemInterface.h>
@implementation WebGraphicsBridge
#define INIT(function) wk##function = WK##function
+ (void)createSharedBridge
void InitWebCoreSystemInterface(void)
{
if (![self sharedBridge]) {
[[[self alloc] init] release];
}
ASSERT([[self sharedBridge] isKindOfClass:self]);
INIT(DrawBezeledTextFieldCell);
INIT(DrawFocusRing);
INIT(SetDragImage);
}
+ (WebGraphicsBridge *)sharedBridge;
{
return (WebGraphicsBridge *)[super sharedBridge];
}
- (void)drawFocusRingWithPath:(CGPathRef)path radius:(float)radius color:(CGColorRef)color clipRect:(NSRect)rect
{
// We have to set an accurate clip ourselves, since CG inflates the clip (thus allowing the focus ring to
// paint slightly outside the clip).
NSView* view = [NSView focusView];
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
NSRect tr = [view convertRect:rect toView:nil];
const NSRect *rects;
int count;
[view getRectsBeingDrawn:&rects count:&count];
int i;
for (i = 0; i < count; ++i) {
NSRect transformedRect = [view convertRect:rects[i] toView:nil];
NSRect rectToUse = NSIntersectionRect(transformedRect, tr);
CGContextBeginPath(context);
CGContextAddPath(context, path);
WKDrawFocusRing(context, *(CGRect *)&rectToUse, color, radius);
}
}
// Dashboard wants to set the drag image during dragging, but Cocoa does not allow this.
// Instead we drop down to the CG API.
- (void)setDraggingImage:(NSImage *)image at:(NSPoint)offset
{
WKSetDragImage(image, offset);
// Hack: We must post an event to wake up the NSDragManager, which is sitting in a nextEvent call
// up the stack from us because the CF drag manager does not use the run loop by itself.
// This is the most innocuous event to use, per Kristen.
NSEvent *ev = [NSEvent mouseEventWithType:NSMouseMoved location:NSZeroPoint modifierFlags:0 timestamp:0 windowNumber:0 context:nil eventNumber:0 clickCount:0 pressure:0];
[NSApp postEvent:ev atStart:YES];
}
- (void)drawBezeledTextFieldCell:(NSRect)rect enabled:(BOOL)active
{
WKDrawBezeledTextFieldCell(rect, active);
}
@end
......@@ -32,7 +32,6 @@
#import <ApplicationServices/ApplicationServices.h>
#import <Cocoa/Cocoa.h>
#import <WebKit/WebGraphicsBridge.h>
#import <WebKit/WebKitLogging.h>
#import <WebKit/WebNSObjectExtras.h>
#import <WebKit/WebTextRendererFactory.h>
......
......@@ -153,7 +153,6 @@
9398107E0824BF01008DF038 /* WebNSURLExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = BE6DC39904C62C4E004D0EF6 /* WebNSURLExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
9398107F0824BF01008DF038 /* WebDocumentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ED21B9810528F7AA003299AC /* WebDocumentInternal.h */; };
939810800824BF01008DF038 /* WebDocumentPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 833987810543012D00EE146E /* WebDocumentPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
939810810824BF01008DF038 /* WebGraphicsBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = BE26F18D05517E0800BFA0C3 /* WebGraphicsBridge.h */; };
939810820824BF01008DF038 /* WebNSDataExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = BECD14290565830A005BB09C /* WebNSDataExtras.h */; };
939810830824BF01008DF038 /* WebUIDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A7D44A0568AB2600E70EF6 /* WebUIDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
939810840824BF01008DF038 /* WebNSEventExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = BE887BFF056D3A6E009BB3E7 /* WebNSEventExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -274,7 +273,6 @@
939811110824BF01008DF038 /* WebLRUFileList.m in Sources */ = {isa = PBXBuildFile; fileRef = BE07CEAC047538F000CA289C /* WebLRUFileList.m */; };
939811120824BF01008DF038 /* WebNSURLExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = BE6DC39A04C62C4E004D0EF6 /* WebNSURLExtras.m */; };
939811130824BF01008DF038 /* WebHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 65DA2608052CC18700A97B31 /* WebHistory.m */; };
939811140824BF01008DF038 /* WebGraphicsBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = BE26F18E05517E0800BFA0C3 /* WebGraphicsBridge.m */; };
939811150824BF01008DF038 /* WebNSDataExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = BECD142A0565830A005BB09C /* WebNSDataExtras.m */; };
939811160824BF01008DF038 /* WebNSEventExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = BE887C00056D3A6E009BB3E7 /* WebNSEventExtras.m */; };
939811170824BF01008DF038 /* WebKeyGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 84723BE4056D719E0044BFEA /* WebKeyGenerator.m */; };
......@@ -298,6 +296,8 @@
9398112C0824BF01008DF038 /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F738C9EA03FAD3DF0321FBE0 /* WebCore.framework */; };
9398112E0824BF01008DF038 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 93D623DD051E791F002F47DD /* libicucore.dylib */; };
9398112F0824BF01008DF038 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 830E81E005853AC000AD0891 /* Security.framework */; };
93EB178D09F88D460091F8FF /* WebSystemInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 93EB178C09F88D460091F8FF /* WebSystemInterface.m */; };
93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EB178E09F88D510091F8FF /* WebSystemInterface.h */; };
ABDDF20D08EB0DDC001E1241 /* WebDownloadInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ABDDF20C08EB0DDC001E1241 /* WebDownloadInternal.h */; };
DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = DD89681E09AA87240097E7F0 /* WebElementDictionary.h */; };
DD89682109AA87240097E7F0 /* WebElementDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = DD89681F09AA87240097E7F0 /* WebElementDictionary.m */; };
......@@ -533,6 +533,8 @@
93C6F14507920B93002449CD /* WebFrameViewPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFrameViewPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
93D1FE13067EB10B009CE68A /* WebNSObjectExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSObjectExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
93D623DD051E791F002F47DD /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libicucore.dylib; path = /usr/lib/libicucore.dylib; sourceTree = "<absolute>"; };
93EB178C09F88D460091F8FF /* WebSystemInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebSystemInterface.m; sourceTree = "<group>"; };
93EB178E09F88D510091F8FF /* WebSystemInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSystemInterface.h; sourceTree = "<group>"; };
9CAE9D070252A4130ECA16EA /* WebPreferencesPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPreferencesPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
9CE1F8A002A5C6F30ECA2ACD /* WebImageRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebImageRenderer.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
9CE1F8A102A5C6F30ECA2ACD /* WebImageRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebImageRenderer.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
......@@ -546,8 +548,6 @@
BE07CEAA047538F000CA289C /* WebFileDatabase.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebFileDatabase.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE07CEAB047538F000CA289C /* WebLRUFileList.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebLRUFileList.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE07CEAC047538F000CA289C /* WebLRUFileList.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebLRUFileList.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE26F18D05517E0800BFA0C3 /* WebGraphicsBridge.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebGraphicsBridge.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE26F18E05517E0800BFA0C3 /* WebGraphicsBridge.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebGraphicsBridge.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE4FBECB0653DF47005EDE15 /* WebEditingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebEditingDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE6DC39904C62C4E004D0EF6 /* WebNSURLExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSURLExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
BE6DC39A04C62C4E004D0EF6 /* WebNSURLExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSURLExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
......@@ -1063,8 +1063,6 @@
9305892A070868B300E79D96 /* WebDashboardRegion.h */,
9311022803667CF1008635CE /* WebFileButton.h */,
9311022903667CF1008635CE /* WebFileButton.m */,
BE26F18D05517E0800BFA0C3 /* WebGraphicsBridge.h */,
BE26F18E05517E0800BFA0C3 /* WebGraphicsBridge.m */,
514C4C2A075E7DE500B89CAD /* WebImageDecodeItem.h */,
514C4C2B075E7DE500B89CAD /* WebImageDecodeItem.m */,
514C4C2C075E7DE500B89CAD /* WebImageDecoder.h */,
......@@ -1081,6 +1079,8 @@
84723BE4056D719E0044BFEA /* WebKeyGenerator.m */,
F5E0E10802BC45F8018635CA /* WebSubresourceLoader.h */,
F5E0E10902BC45F8018635CA /* WebSubresourceLoader.m */,
93EB178E09F88D510091F8FF /* WebSystemInterface.h */,
93EB178C09F88D460091F8FF /* WebSystemInterface.m */,
F5B36B410281DF55018635CB /* WebTextRenderer.h */,
F5B36B420281DF55018635CB /* WebTextRenderer.m */,
F5B36B450281DF9C018635CB /* WebTextRendererFactory.h */,
......@@ -1276,7 +1276,6 @@
9398107E0824BF01008DF038 /* WebNSURLExtras.h in Headers */,
9398107F0824BF01008DF038 /* WebDocumentInternal.h in Headers */,
939810800824BF01008DF038 /* WebDocumentPrivate.h in Headers */,
939810810824BF01008DF038 /* WebGraphicsBridge.h in Headers */,
939810820824BF01008DF038 /* WebNSDataExtras.h in Headers */,
939810830824BF01008DF038 /* WebUIDelegatePrivate.h in Headers */,
939810840824BF01008DF038 /* WebNSEventExtras.h in Headers */,
......@@ -1333,6 +1332,7 @@
DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */,
226E9E6A09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.h in Headers */,
650F74E409E488F70020118A /* WebUnarchivingState.h in Headers */,
93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -1845,7 +1845,6 @@
939811110824BF01008DF038 /* WebLRUFileList.m in Sources */,
939811120824BF01008DF038 /* WebNSURLExtras.m in Sources */,
939811130824BF01008DF038 /* WebHistory.m in Sources */,
939811140824BF01008DF038 /* WebGraphicsBridge.m in Sources */,
939811150824BF01008DF038 /* WebNSDataExtras.m in Sources */,
939811160824BF01008DF038 /* WebNSEventExtras.m in Sources */,
939811170824BF01008DF038 /* WebKeyGenerator.m in Sources */,
......@@ -1881,6 +1880,7 @@
DD89682109AA87240097E7F0 /* WebElementDictionary.m in Sources */,
226E9E6B09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c in Sources */,
650F74E509E488F70020118A /* WebUnarchivingState.m in Sources */,
93EB178D09F88D460091F8FF /* WebSystemInterface.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -26,35 +26,35 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <WebKit/WebFrameView.h>
#import <WebKit/WebFrameBridge.h>
#import <WebKit/WebClipView.h>
#import <WebKit/WebCookieAdapter.h>
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDocument.h>
#import <WebKit/WebDynamicScrollBarsView.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebFrameViewInternal.h>
#import <WebKit/WebFrameViewPrivate.h>
#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebGraphicsBridge.h>
#import <WebKit/WebImageRenderer.h>
#import <WebKit/WebImageRendererFactory.h>
#import <WebKit/WebImageView.h>
#import <WebKit/WebKeyGenerator.h>
#import <WebKit/WebKitErrorsPrivate.h>
#import <WebKit/WebKitStatisticsPrivate.h>
#import <WebKit/WebNSObjectExtras.h>
#import <WebKit/WebNSPasteboardExtras.h>
#import <WebKit/WebNSViewExtras.h>
#import <WebKit/WebPDFView.h>
#import <WebKit/WebTextRendererFactory.h>
#import <WebKit/WebTextView.h>
#import <WebKit/WebViewFactory.h>
#import <WebKit/WebViewInternal.h>
#import <WebKit/WebViewPrivate.h>
#import <WebKit/WebAssertions.h>
#import "WebFrameView.h"
#import "WebAssertions.h"
#import "WebClipView.h"
#import "WebCookieAdapter.h"
#import "WebDataSource.h"
#import "WebDocument.h"
#import "WebDynamicScrollBarsView.h"
#import "WebFrame.h"
#import "WebFrameBridge.h"
#import "WebFrameViewInternal.h"
#import "WebFrameViewPrivate.h"
#import "WebHTMLViewPrivate.h"
#import "WebImageRenderer.h"
#import "WebImageRendererFactory.h"
#import "WebImageView.h"
#import "WebKeyGenerator.h"
#import "WebKitErrorsPrivate.h"
#import "WebKitStatisticsPrivate.h"
#import "WebNSObjectExtras.h"
#import "WebNSPasteboardExtras.h"
#import "WebNSViewExtras.h"
#import "WebPDFView.h"
#import "WebSystemInterface.h"
#import "WebTextRendererFactory.h"
#import "WebTextView.h"
#import "WebViewFactory.h"
#import "WebViewInternal.h"
#import "WebViewPrivate.h"
#import <WebCore/WebCoreFrameView.h>
#import <WebCore/WebCoreView.h>
......@@ -125,14 +125,12 @@ - (BOOL)_shouldDrawBorder
return NO;
// Only draw a border for frames that request a border and the frame does
// not contain a frameset. Additionally we should (post-panther) not draw
// not contain a frameset. Additionally we should (some day) not draw
// a border (left, right, top or bottom) if the frame edge abutts the window frame.
NSView *docV = [self documentView];
if ([docV isKindOfClass:[WebHTMLView class]]){
if ([[(WebHTMLView *)docV _bridge] isFrameSet]){
if ([docV isKindOfClass:[WebHTMLView class]])
if ([[(WebHTMLView *)docV _bridge] isFrameSet])
return NO;
}
}
return YES;
}
......@@ -142,9 +140,8 @@ - (void)_tile
// The border drawn by WebFrameView is 1 pixel on the left and right,
// two pixels on top and bottom. Shrink the scroll view to accomodate
// the border.
if ([self _shouldDrawBorder]) {
if ([self _shouldDrawBorder])
scrollViewFrame = NSInsetRect (scrollViewFrame, 1, 2);
}
[_private->frameScrollView setFrame:scrollViewFrame];
}
......@@ -163,7 +160,7 @@ - (WebView *)_webView
return [_private->webFrame webView];
}
- (void)_setMarginWidth: (int)w
- (void)_setMarginWidth:(int)w
{
_private->marginWidth = w;
}
......@@ -173,7 +170,7 @@ - (int)_marginWidth
return _private->marginWidth;
}
- (void)_setMarginHeight: (int)h
- (void)_setMarginHeight:(int)h