Commit 660071d4 authored by darin's avatar darin

WebFoundation:

        * English.lproj/StringsNotToBeLocalized.txt: Update.

WebCore:

	- fixed 3107383 -- clicking link on cnet.com leads to assertion failure

	When we removed a frame, we were leaving behind an empty WebView. Yuck.

        * kwq/KWQScrollView.mm:
        (QScrollView::addChild): Use the new getOuterView.
        (QScrollView::removeChild): Ditto. This was the bug fix.
        * kwq/KWQWidget.h: Add getOuterView.
        * kwq/KWQWidget.mm:
        (QWidget::frameGeometry): Use the new getOuterView.
        (QWidget::setFrameGeometry): Ditto.
        (QWidget::getOuterView): Added. Does the WebCoreFrameView magic to find
	the WebView instead of the WebHTMLView. Yuck.
        (QWidget::paint): Use the new getOuterView.

WebKit:

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
	Unescape the string before executing it, so we don't suffer from bug 3083043
	here in the javascript: URLs that come from plug-ins.

        * English.lproj/StringsNotToBeLocalized.txt: Update.

WebBrowser:

        * Debug/DebugUtilities.m: (-[DebugUtilities createDebugMenu]):
	Fix typo. "Import" the favorites, don't "Imported" them.

        * English.lproj/StringsNotToBeLocalized.txt: Let the update
	script sort this file.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a9f64e93
2002-11-20 Darin Adler <darin@apple.com>
- fixed 3107383 -- clicking link on cnet.com leads to assertion failure
When we removed a frame, we were leaving behind an empty WebView. Yuck.
* kwq/KWQScrollView.mm:
(QScrollView::addChild): Use the new getOuterView.
(QScrollView::removeChild): Ditto. This was the bug fix.
* kwq/KWQWidget.h: Add getOuterView.
* kwq/KWQWidget.mm:
(QWidget::frameGeometry): Use the new getOuterView.
(QWidget::setFrameGeometry): Ditto.
(QWidget::getOuterView): Added. Does the WebCoreFrameView magic to find
the WebView instead of the WebHTMLView. Yuck.
(QWidget::paint): Use the new getOuterView.
2002-11-20 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Again.
......
2002-11-20 Darin Adler <darin@apple.com>
- fixed 3107383 -- clicking link on cnet.com leads to assertion failure
When we removed a frame, we were leaving behind an empty WebView. Yuck.
* kwq/KWQScrollView.mm:
(QScrollView::addChild): Use the new getOuterView.
(QScrollView::removeChild): Ditto. This was the bug fix.
* kwq/KWQWidget.h: Add getOuterView.
* kwq/KWQWidget.mm:
(QWidget::frameGeometry): Use the new getOuterView.
(QWidget::setFrameGeometry): Ditto.
(QWidget::getOuterView): Added. Does the WebCoreFrameView magic to find
the WebView instead of the WebHTMLView. Yuck.
(QWidget::paint): Use the new getOuterView.
2002-11-20 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Again.
......
2002-11-20 Darin Adler <darin@apple.com>
- fixed 3107383 -- clicking link on cnet.com leads to assertion failure
When we removed a frame, we were leaving behind an empty WebView. Yuck.
* kwq/KWQScrollView.mm:
(QScrollView::addChild): Use the new getOuterView.
(QScrollView::removeChild): Ditto. This was the bug fix.
* kwq/KWQWidget.h: Add getOuterView.
* kwq/KWQWidget.mm:
(QWidget::frameGeometry): Use the new getOuterView.
(QWidget::setFrameGeometry): Ditto.
(QWidget::getOuterView): Added. Does the WebCoreFrameView magic to find
the WebView instead of the WebHTMLView. Yuck.
(QWidget::paint): Use the new getOuterView.
2002-11-20 Darin Adler <darin@apple.com>
* force-js-clean-timestamp: Again.
......
......@@ -25,8 +25,6 @@
#import "KWQScrollView.h"
#import "WebCoreFrameView.h"
#import "KWQLogging.h"
/*
......@@ -195,30 +193,23 @@ void QScrollView::addChild(QWidget* child, int x, int y)
if (thisDocView)
thisView = thisDocView;
subview = child->getView();
// It's a bit of a hack, but when we are asked to add the widget for the top level of
// a frame, we need to instead add the containing frame widget. See also the similar
// code in QWidget::setFrameGeometry.
if ([subview conformsToProtocol:@protocol(WebCoreFrameView)]) {
subview = [subview superview];
}
subview = child->getOuterView();
ASSERT(subview != thisView);
if ([subview superview] == thisView) {
return;
}
[subview removeFromSuperview];
LOG(Frames, "Adding %p %@ at (%d,%d) w %d h %d\n", subview, [[subview class] className], x, y, (int)[subview frame].size.width, (int)[subview frame].size.height);
LOG(Frames, "Adding %p %@ at (%d,%d) w %d h %d\n", subview,
[[subview class] className], x, y, (int)[subview frame].size.width, (int)[subview frame].size.height);
[thisView addSubview:subview];
}
void QScrollView::removeChild(QWidget* child)
{
[child->getView() removeFromSuperview];
[child->getOuterView() removeFromSuperview];
}
void QScrollView::resizeContents(int w, int h)
......
......@@ -142,6 +142,7 @@ public:
void setAcceptDrops(bool) { }
NSView *getView() const;
NSView *getOuterView() const;
void setView(NSView *aView);
void displayRect(int x, int y, int w, int h);
......
......@@ -152,11 +152,7 @@ void QWidget::move(const QPoint &p)
QRect QWidget::frameGeometry() const
{
NSView *view = getView();
if ([view conformsToProtocol:@protocol(WebCoreFrameView)]) {
view = [view superview];
}
return QRect([view frame]);
return QRect([getOuterView() frame]);
}
int QWidget::baselinePosition() const
......@@ -331,20 +327,7 @@ bool QWidget::hasMouseTracking() const
void QWidget::setFrameGeometry(const QRect &rect)
{
NSView *view = getView();
ASSERT(view);
// A QScrollView is a widget only used to represent a frame. If
// this widget's view is a WebCoreFrameView the we resize it's containing
// view, an WebView. The scrollview contained by the WebView
// will be autosized.
if ([view conformsToProtocol:@protocol(WebCoreFrameView)]) {
view = [view superview];
ASSERT(view);
}
[view setFrame:rect];
[getOuterView() setFrame:rect];
}
QPoint QWidget::mapFromGlobal(const QPoint &p) const
......@@ -366,6 +349,21 @@ void QWidget::setView(NSView *view)
data->view = view;
}
NSView *QWidget::getOuterView() const
{
// A QScrollView is a widget only used to represent a frame. If
// this widget's view is a WebCoreFrameView the we resize it's containing
// view, an WebView. The scrollview contained by the WebView
// will be autosized.
NSView *view = data->view;
ASSERT(view);
if ([view conformsToProtocol:@protocol(WebCoreFrameView)]) {
view = [view superview];
ASSERT(view);
}
return view;
}
void QWidget::lockDrawingFocus()
{
[getView() lockFocus];
......@@ -398,13 +396,6 @@ void QWidget::paint(QPainter *p, const QRect &r)
if (p->paintingDisabled()) {
return;
}
// Need to get to superview here for the same reason as in setFrameGeometry.
NSView *view = getView();
if ([view conformsToProtocol:@protocol(WebCoreFrameView)]) {
view = [view superview];
ASSERT(view);
}
NSView *view = getOuterView();
[view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]]];
}
2002-11-20 Darin Adler <darin@apple.com>
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
Unescape the string before executing it, so we don't suffer from bug 3083043
here in the javascript: URLs that come from plug-ins.
* English.lproj/StringsNotToBeLocalized.txt: Update.
2002-11-20 Chris Blumenberg <cblu@apple.com>
Fixed: 3079134 - Throttle plug-ins while in background
......
2002-11-20 Darin Adler <darin@apple.com>
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
Unescape the string before executing it, so we don't suffer from bug 3083043
here in the javascript: URLs that come from plug-ins.
* English.lproj/StringsNotToBeLocalized.txt: Update.
2002-11-20 Chris Blumenberg <cblu@apple.com>
Fixed: 3079134 - Throttle plug-ins while in background
......
......@@ -59,7 +59,6 @@
"GET"
"HREF="
"Helvetica"
"IE"
"JoiningCausing"
"JoiningDual"
"JoiningOther"
......@@ -190,6 +189,7 @@
"image/jpeg"
"image/png"
"isTargetItem"
"javascript"
"lastVisitedDate"
"nullplugin"
"text/"
......@@ -213,6 +213,7 @@ Misc.subproj/WebIconDatabase.m:"icon:%@"
Misc.subproj/WebKitLogging.m
Plugins.subproj/WebBasePluginPackage.m:"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@"
Plugins.subproj/WebNetscapePluginPackage.m:"main"
Plugins.subproj/npapi.m:"Microsoft Internet Explorer"
WebCoreSupport.subproj/WebBridge.m:"height"
WebCoreSupport.subproj/WebBridge.m:"width"
WebCoreSupport.subproj/WebCookieAdapter.m:"Cookie"
......
......@@ -829,7 +829,7 @@ - (NPError)loadRequest:(WebResourceRequest *)request inTarget:(NSString *)target
}
} else {
if([[URL scheme] isEqualToString:@"javascript"]){
NSString *JSString = [[URL absoluteString] substringFromIndex:11];
NSString *JSString = [(id)CFURLCreateStringByReplacingPercentEscapes(NULL, (CFStringRef)[[URL absoluteString] substringFromIndex:11], (CFStringRef)@"") autorelease];
[[self controller] stringByEvaluatingJavaScriptFromString:JSString];
if(notifyData){
NPP_URLNotify(instance, [[URL absoluteString] cString], NPRES_DONE, notifyData);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment