[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
darin at apple.com
darin at apple.com
Wed Dec 22 13:19:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 6b5857409b72c3e22eb6c3243029ac808bef6fa1
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Sep 11 01:28:15 2010 +0000
2010-09-10 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
https://bugs.webkit.org/show_bug.cgi?id=45582
* WebKit.xcodeproj/project.pbxproj: Added WebDashboardRegion.h/mm and
also gave the header private visibility so it will get installed in the
PrivateHeaders directory.
2010-09-10 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
https://bugs.webkit.org/show_bug.cgi?id=45582
* MigrateHeaders.make: Removed WebDashboardRegion.h from the set of header to copy.
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::dashboardRegionsChanged): Changed this to call
-[WebView _dashboardRegions] so we don't have two copies of that code.
* WebView/WebDashboardRegion.h: Copied from WebCore/page/mac/WebDashboardRegion.h.
* WebView/WebDashboardRegion.mm: Copied from WebCore/page/mac/WebDashboardRegion.m.
* WebView/WebView.mm:
(-[WebView _dashboardRegions]): Moved the code from Frame::dashboardRegions here.
2010-09-10 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
https://bugs.webkit.org/show_bug.cgi?id=45582
* WebCore.exp.in: Updated.
* WebCore.xcodeproj/project.pbxproj: Removed WebDashboardRegion.h/m.
* page/mac/WebDashboardRegion.h: Removed.
* page/mac/WebDashboardRegion.m: Removed.
* page/Frame.h: Removed unneeded #if. Removed dashboardRegionsDictionary function, now
handled in WebKit. Removed searchForNSLabelsAboveCell function, which had become dead code.
* page/mac/FrameMac.mm: Ditto. Also tweaked a place that said "int unsigned".
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c829121..a43f121 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-10 Darin Adler <darin at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=45582
+
+ * WebCore.exp.in: Updated.
+
+ * WebCore.xcodeproj/project.pbxproj: Removed WebDashboardRegion.h/m.
+ * page/mac/WebDashboardRegion.h: Removed.
+ * page/mac/WebDashboardRegion.m: Removed.
+
+ * page/Frame.h: Removed unneeded #if. Removed dashboardRegionsDictionary function, now
+ handled in WebKit. Removed searchForNSLabelsAboveCell function, which had become dead code.
+ * page/mac/FrameMac.mm: Ditto. Also tweaked a place that said "int unsigned".
+
2010-09-10 Peter Kasting <pkasting at google.com>
Reviewed by Darin Adler.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index f9ce98f..1531249 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -1044,6 +1044,7 @@ __ZNK7WebCore7IntSizecv7_NSSizeEv
__ZNK7WebCore8Document11completeURLERKN3WTF6StringE
__ZNK7WebCore8Document13axObjectCacheEv
__ZNK7WebCore8Document14getElementByIdERKN3WTF12AtomicStringE
+__ZNK7WebCore8Document16dashboardRegionsEv
__ZNK7WebCore8Document20cacheDocumentElementEv
__ZNK7WebCore8Document31displayStringModifiedByEncodingERKN3WTF6StringE
__ZNK7WebCore8Document4bodyEv
@@ -1156,8 +1157,6 @@ __ZNK7WebCore11ContextMenu19platformDescriptionEv
#endif
#if ENABLE(DASHBOARD_SUPPORT)
-.objc_class_name_WebDashboardRegion
-__ZN7WebCore5Frame26dashboardRegionsDictionaryEv
__ZN7WebCore8Settings41setUsesDashboardBackwardCompatibilityModeEb
#endif
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 659c2b9..09906e1 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -2690,7 +2690,6 @@
93F199EC08245E59001E9ABC /* XSLStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06F24A06D18A7E004A6FA3 /* XSLStyleSheet.h */; };
93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = BC06F24C06D18A7E004A6FA3 /* XSLTProcessor.h */; };
93F199F008245E59001E9ABC /* WebCoreView.h in Headers */ = {isa = PBXBuildFile; fileRef = BE855F7F0701E83500239769 /* WebCoreView.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 93F199F108245E59001E9ABC /* WebDashboardRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = 5150C2A10702629000AF642C /* WebDashboardRegion.h */; settings = {ATTRIBUTES = (Private, ); }; };
93F19A2608245E59001E9ABC /* CursorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = F58784F002DE375901EA4122 /* CursorMac.mm */; };
93F19A3C08245E59001E9ABC /* DeprecatedPtrListImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F587851602DE375901EA4122 /* DeprecatedPtrListImpl.cpp */; };
93F19A5F08245E59001E9ABC /* WebCoreViewFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = F587855502DE375901EA4122 /* WebCoreViewFactory.m */; };
@@ -2710,7 +2709,6 @@
93F19B0408245E59001E9ABC /* XSLTProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC06F24B06D18A7E004A6FA3 /* XSLTProcessor.cpp */; };
93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC06F24D06D18A7E004A6FA3 /* XSLTProcessorLibxslt.cpp */; };
93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE8560510701F91100239769 /* WebCoreView.m */; };
- 93F19B0808245E59001E9ABC /* WebDashboardRegion.m in Sources */ = {isa = PBXBuildFile; fileRef = 5150C2A50702629800AF642C /* WebDashboardRegion.m */; settings = {COMPILER_FLAGS = "-Wno-cast-qual"; }; };
93F19B1308245E59001E9ABC /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869302846DCD018635CA /* ApplicationServices.framework */; };
93F19B1408245E59001E9ABC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869402846DCD018635CA /* Carbon.framework */; };
93F19B1508245E59001E9ABC /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869502846DCD018635CA /* Cocoa.framework */; };
@@ -7073,8 +7071,6 @@
514C76680CE923A1007EF3CD /* ResourceRequestBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceRequestBase.h; sourceTree = "<group>"; };
514C76690CE923A1007EF3CD /* ResourceResponseBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceResponseBase.cpp; sourceTree = "<group>"; };
514C766A0CE923A1007EF3CD /* ResourceResponseBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceResponseBase.h; sourceTree = "<group>"; };
- 5150C2A10702629000AF642C /* WebDashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDashboardRegion.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 5150C2A50702629800AF642C /* WebDashboardRegion.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDashboardRegion.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
515788C01207852C00A37C4A /* VisitedLinkStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkStrategy.h; sourceTree = "<group>"; };
515B03970CD1642A00B7EA9C /* SQLStatement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLStatement.h; sourceTree = "<group>"; };
515B03980CD1642A00B7EA9C /* SQLStatement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLStatement.cpp; sourceTree = "<group>"; };
@@ -14108,8 +14104,6 @@
BE983D95052A2E0A00892D85 /* WebCoreKeyboardUIMode.h */,
F587855402DE375901EA4122 /* WebCoreViewFactory.h */,
F587855502DE375901EA4122 /* WebCoreViewFactory.m */,
- 5150C2A10702629000AF642C /* WebDashboardRegion.h */,
- 5150C2A50702629800AF642C /* WebDashboardRegion.m */,
);
path = mac;
sourceTree = "<group>";
@@ -20335,7 +20329,6 @@
37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */,
93F199F008245E59001E9ABC /* WebCoreView.h in Headers */,
93F199B308245E59001E9ABC /* WebCoreViewFactory.h in Headers */,
- 93F199F108245E59001E9ABC /* WebDashboardRegion.h in Headers */,
BC6DADEF0A195FDF00E5CD14 /* WebFontCache.h in Headers */,
A7D20F6D107F438B00A80392 /* WebGLActiveInfo.h in Headers */,
49C7B9C91042D32F0009D447 /* WebGLBuffer.h in Headers */,
@@ -22850,7 +22843,6 @@
37F818FE0D657606005E1F05 /* WebCoreURLResponse.mm in Sources */,
93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */,
93F19A5F08245E59001E9ABC /* WebCoreViewFactory.m in Sources */,
- 93F19B0808245E59001E9ABC /* WebDashboardRegion.m in Sources */,
BC6DADFA0A19602B00E5CD14 /* WebFontCache.mm in Sources */,
49C7B9C81042D32F0009D447 /* WebGLBuffer.cpp in Sources */,
6E4E91AE10F7FB3100A2779C /* WebGLContextAttributes.cpp in Sources */,
diff --git a/WebCore/page/Frame.h b/WebCore/page/Frame.h
index 6c5281b..b99397d 100644
--- a/WebCore/page/Frame.h
+++ b/WebCore/page/Frame.h
@@ -135,9 +135,7 @@ namespace WebCore {
void setInViewSourceMode(bool = true);
void keepAlive(); // Used to keep the frame alive when running a script that might destroy it.
-#ifndef NDEBUG
static void cancelAllKeepAlive();
-#endif
void setDocument(PassRefPtr<Document>);
@@ -172,19 +170,12 @@ namespace WebCore {
String matchLabelsAgainstElement(const Vector<String>& labels, Element*);
#if PLATFORM(MAC)
-
- NSString* searchForNSLabelsAboveCell(RegularExpression*, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
NSString* searchForLabelsBeforeElement(NSArray* labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
NSString* matchLabelsAgainstElement(NSArray* labels, Element*);
-#if ENABLE(DASHBOARD_SUPPORT)
- NSMutableDictionary* dashboardRegionsDictionary();
-#endif
-
NSImage* selectionImage(bool forceBlackText = false) const;
NSImage* snapshotDragImage(Node*, NSRect* imageRect, NSRect* elementRect) const;
NSImage* imageFromRect(NSRect) const;
-
#endif
// ========
diff --git a/WebCore/page/mac/FrameMac.mm b/WebCore/page/mac/FrameMac.mm
index 8397776..d4e4098 100644
--- a/WebCore/page/mac/FrameMac.mm
+++ b/WebCore/page/mac/FrameMac.mm
@@ -55,10 +55,6 @@
#import <Carbon/Carbon.h>
#import <wtf/StdLibExtras.h>
-#if ENABLE(DASHBOARD_SUPPORT)
-#import "WebDashboardRegion.h"
-#endif
-
@interface NSView (WebCoreHTMLDocumentView)
- (void)drawSingleRect:(NSRect)rect;
@end
@@ -140,43 +136,6 @@ static RegularExpression* regExpForLabels(NSArray* labels)
return result;
}
-NSString* Frame::searchForNSLabelsAboveCell(RegularExpression* regExp, HTMLTableCellElement* cell, size_t* resultDistanceFromStartOfCell)
-{
- RenderObject* cellRenderer = cell->renderer();
-
- if (cellRenderer && cellRenderer->isTableCell()) {
- RenderTableCell* tableCellRenderer = toRenderTableCell(cellRenderer);
- RenderTableCell* cellAboveRenderer = tableCellRenderer->table()->cellAbove(tableCellRenderer);
-
- if (cellAboveRenderer) {
- HTMLTableCellElement* aboveCell =
- static_cast<HTMLTableCellElement*>(cellAboveRenderer->node());
-
- if (aboveCell) {
- // search within the above cell we found for a match
- size_t lengthSearched = 0;
- for (Node* n = aboveCell->firstChild(); n; n = n->traverseNextNode(aboveCell)) {
- if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) {
- // For each text chunk, run the regexp
- String nodeString = n->nodeValue();
- int pos = regExp->searchRev(nodeString);
- if (pos >= 0) {
- if (resultDistanceFromStartOfCell)
- *resultDistanceFromStartOfCell = lengthSearched;
- return nodeString.substring(pos, regExp->matchedLength());
- }
- lengthSearched += nodeString.length();
- }
- }
- }
- }
- }
- // Any reason in practice to search all cells in that are above cell?
- if (resultDistanceFromStartOfCell)
- *resultDistanceFromStartOfCell = notFound;
- return nil;
-}
-
NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element, size_t* resultDistance, bool* resultIsInCellAbove)
{
RegularExpression* regExp = regExpForLabels(labels);
@@ -195,7 +154,7 @@ NSString* Frame::searchForLabelsBeforeElement(NSArray* labels, Element* element,
*resultIsInCellAbove = false;
// walk backwards in the node tree, until another element, or form, or end of tree
- int unsigned lengthSearched = 0;
+ unsigned lengthSearched = 0;
Node* n;
for (n = element->traversePreviousNode();
n && lengthSearched < charsSearchedThreshold;
@@ -395,44 +354,6 @@ DragImageRef Frame::nodeImage(Node* node)
return result;
}
-#if ENABLE(DASHBOARD_SUPPORT)
-NSMutableDictionary* Frame::dashboardRegionsDictionary()
-{
- Document* doc = document();
-
- const Vector<DashboardRegionValue>& regions = doc->dashboardRegions();
- size_t n = regions.size();
-
- // Convert the Vector<DashboardRegionValue> into a NSDictionary of WebDashboardRegions
- NSMutableDictionary* webRegions = [NSMutableDictionary dictionaryWithCapacity:n];
- for (size_t i = 0; i < n; i++) {
- const DashboardRegionValue& region = regions[i];
-
- if (region.type == StyleDashboardRegion::None)
- continue;
-
- NSString *label = region.label;
- WebDashboardRegionType type = WebDashboardRegionTypeNone;
- if (region.type == StyleDashboardRegion::Circle)
- type = WebDashboardRegionTypeCircle;
- else if (region.type == StyleDashboardRegion::Rectangle)
- type = WebDashboardRegionTypeRectangle;
- NSMutableArray *regionValues = [webRegions objectForKey:label];
- if (!regionValues) {
- regionValues = [[NSMutableArray alloc] initWithCapacity:1];
- [webRegions setObject:regionValues forKey:label];
- [regionValues release];
- }
-
- WebDashboardRegion *webRegion = [[WebDashboardRegion alloc] initWithRect:region.bounds clip:region.clip type:type];
- [regionValues addObject:webRegion];
- [webRegion release];
- }
-
- return webRegions;
-}
-#endif
-
DragImageRef Frame::dragImageForSelection()
{
if (!selection()->isRange())
diff --git a/WebCore/page/mac/WebDashboardRegion.m b/WebCore/page/mac/WebDashboardRegion.m
deleted file mode 100644
index a6b9872..0000000
--- a/WebCore/page/mac/WebDashboardRegion.m
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2004 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WebDashboardRegion.h"
-
-#import <wtf/UnusedParam.h>
-
-#if ENABLE(DASHBOARD_SUPPORT)
-
- at implementation WebDashboardRegion
-
-- initWithRect:(NSRect)r clip:(NSRect)c type:(WebDashboardRegionType)t
-{
- self = [super init];
- rect = r;
- clip = c;
- type = t;
- return self;
-}
-
-- (id)copyWithZone:(NSZone *)unusedZone
-{
- UNUSED_PARAM(unusedZone);
-
- return [self retain];
-}
-
-- (NSRect)dashboardRegionClip
-{
- return clip;
-}
-
-- (NSRect)dashboardRegionRect
-{
- return rect;
-}
-
-- (WebDashboardRegionType)dashboardRegionType
-{
- return type;
-}
-
-static const char* typeName(WebDashboardRegionType type)
-{
- switch (type) {
- case WebDashboardRegionTypeNone:
- return "None";
- case WebDashboardRegionTypeCircle:
- return "Circle";
- case WebDashboardRegionTypeRectangle:
- return "Rectangle";
- case WebDashboardRegionTypeScrollerRectangle:
- return "ScrollerRectangle";
- }
- return "Unknown";
-}
-
-- (NSString *)description
-{
- return [NSString stringWithFormat:@"rect:%@ clip:%@ type:%s", NSStringFromRect(rect), NSStringFromRect(clip), typeName(type)];
-}
-
-// FIXME: Overriding isEqual: without overriding hash will cause trouble if this ever goes into a NSSet or is the key in an NSDictionary.
-- (BOOL)isEqual:(id)other
-{
- return NSEqualRects(rect, [other dashboardRegionRect]) && NSEqualRects(clip, [other dashboardRegionClip]) && type == [other dashboardRegionType];
-}
-
- at end
-
-#endif
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index bdddda0..2727bfb 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-10 Darin Adler <darin at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=45582
+
+ * WebKit.xcodeproj/project.pbxproj: Added WebDashboardRegion.h/mm and
+ also gave the header private visibility so it will get installed in the
+ PrivateHeaders directory.
+
2010-09-02 Steve Block <steveblock at google.com>
Reviewed by Adam Barth.
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index 5b44054..be85672 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -321,6 +321,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 */; };
+ 93E2A1A4123B0B3C009FE12A /* WebDashboardRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = 93E2A1A2123B0B3C009FE12A /* WebDashboardRegion.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 93E2A1A5123B0B3C009FE12A /* WebDashboardRegion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93E2A1A3123B0B3C009FE12A /* WebDashboardRegion.mm */; };
93EB178D09F88D460091F8FF /* WebSystemInterface.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93EB178C09F88D460091F8FF /* WebSystemInterface.mm */; };
93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 93EB178E09F88D510091F8FF /* WebSystemInterface.h */; };
93FDE9330D79CAF30074F029 /* WebHistoryInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93FDE9320D79CAF30074F029 /* WebHistoryInternal.h */; };
@@ -627,6 +629,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>"; };
+ 93E2A1A2123B0B3C009FE12A /* WebDashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDashboardRegion.h; sourceTree = "<group>"; };
+ 93E2A1A3123B0B3C009FE12A /* WebDashboardRegion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDashboardRegion.mm; sourceTree = "<group>"; };
93EB178C09F88D460091F8FF /* WebSystemInterface.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebSystemInterface.mm; sourceTree = "<group>"; };
93EB178E09F88D510091F8FF /* WebSystemInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSystemInterface.h; sourceTree = "<group>"; };
93FDE9320D79CAF30074F029 /* WebHistoryInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryInternal.h; sourceTree = "<group>"; };
@@ -1142,25 +1146,27 @@
9C7CABBB0190A37C0ECA16EA /* WebView */ = {
isa = PBXGroup;
children = (
- 598ADA451202275000ABAE4E /* WebDeviceOrientationProvider.h */,
- 598AD9291201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h */,
- 598AD9271201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm */,
- 598AD9251201CF2500ABAE4E /* WebDeviceOrientationProviderMock.h */,
- 598AD9231201CF1900ABAE4E /* WebDeviceOrientationInternal.h */,
- 598AD9211201CF1000ABAE4E /* WebDeviceOrientation.mm */,
- 598AD91F1201CF0700ABAE4E /* WebDeviceOrientation.h */,
F52CA6BD02DF9D0F018635CA /* HTML */,
51E94C0706C02CA300A9B09E /* PDF */,
8373435A0624EE0D00F3B289 /* WebArchive.h */,
8373435B0624EE0D00F3B289 /* WebArchive.mm */,
933D659903413FF2008635CE /* WebClipView.h */,
933D659A03413FF2008635CE /* WebClipView.mm */,
+ 93E2A1A2123B0B3C009FE12A /* WebDashboardRegion.h */,
+ 93E2A1A3123B0B3C009FE12A /* WebDashboardRegion.mm */,
39446070020F50ED0ECA1767 /* WebDataSource.h */,
39446071020F50ED0ECA1767 /* WebDataSource.mm */,
658A40950A14853B005E6987 /* WebDataSourceInternal.h */,
39446072020F50ED0ECA1767 /* WebDataSourcePrivate.h */,
BC542C400FD7766F00D8AB5D /* WebDelegateImplementationCaching.h */,
BC542C410FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm */,
+ 598ADA451202275000ABAE4E /* WebDeviceOrientationProvider.h */,
+ 598AD9291201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h */,
+ 598AD9271201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm */,
+ 598AD9251201CF2500ABAE4E /* WebDeviceOrientationProviderMock.h */,
+ 598AD9231201CF1900ABAE4E /* WebDeviceOrientationInternal.h */,
+ 598AD9211201CF1000ABAE4E /* WebDeviceOrientation.mm */,
+ 598AD91F1201CF0700ABAE4E /* WebDeviceOrientation.h */,
35081DAE02B6D4F50ACA2ACA /* WebDocument.h */,
ED21B9810528F7AA003299AC /* WebDocumentInternal.h */,
65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */,
@@ -1622,6 +1628,7 @@
598AD9261201CF2500ABAE4E /* WebDeviceOrientationProviderMock.h in Headers */,
598AD92A1201CF3B00ABAE4E /* WebDeviceOrientationProviderMockInternal.h in Headers */,
598ADA461202275000ABAE4E /* WebDeviceOrientationProvider.h in Headers */,
+ 93E2A1A4123B0B3C009FE12A /* WebDashboardRegion.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1988,6 +1995,7 @@
598AD91E1201CECF00ABAE4E /* WebDeviceOrientationClient.mm in Sources */,
598AD9221201CF1000ABAE4E /* WebDeviceOrientation.mm in Sources */,
598AD9281201CF3200ABAE4E /* WebDeviceOrientationProviderMock.mm in Sources */,
+ 93E2A1A5123B0B3C009FE12A /* WebDashboardRegion.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 1677027..889daa2 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-10 Darin Adler <darin at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=45582
+
+ * MigrateHeaders.make: Removed WebDashboardRegion.h from the set of header to copy.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::dashboardRegionsChanged): Changed this to call
+ -[WebView _dashboardRegions] so we don't have two copies of that code.
+
+ * WebView/WebDashboardRegion.h: Copied from WebCore/page/mac/WebDashboardRegion.h.
+ * WebView/WebDashboardRegion.mm: Copied from WebCore/page/mac/WebDashboardRegion.m.
+
+ * WebView/WebView.mm:
+ (-[WebView _dashboardRegions]): Moved the code from Frame::dashboardRegions here.
+
2010-09-10 Adam Barth <abarth at webkit.org>
Reviewed by Darin Fisher.
diff --git a/WebKit/mac/MigrateHeaders.make b/WebKit/mac/MigrateHeaders.make
index 83e2e08..2e6f24a 100644
--- a/WebKit/mac/MigrateHeaders.make
+++ b/WebKit/mac/MigrateHeaders.make
@@ -180,7 +180,6 @@ all : \
$(PUBLIC_HEADERS_DIR)/DOMXPathExpression.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathNSResolver.h \
$(PUBLIC_HEADERS_DIR)/DOMXPathResult.h \
- $(PRIVATE_HEADERS_DIR)/WebDashboardRegion.h \
$(PUBLIC_HEADERS_DIR)/WebScriptObject.h \
$(PUBLIC_HEADERS_DIR)/npapi.h \
$(PUBLIC_HEADERS_DIR)/npfunctions.h \
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index d973e2b..68e17be 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -71,8 +71,6 @@
#import <wtf/PassRefPtr.h>
#import <wtf/Vector.h>
-
-
#if USE(ACCELERATED_COMPOSITING)
#import <WebCore/GraphicsLayer.h>
#endif
@@ -111,6 +109,7 @@ using namespace WebCore;
@end
#if ENABLE(FULLSCREEN_API)
+
@interface WebKitFullScreenListener : NSObject <WebKitFullScreenListener>
{
RefPtr<Element> _element;
@@ -118,6 +117,7 @@ using namespace WebCore;
- (id)initWithElement:(Element*)element;
@end
+
#endif
WebChromeClient::WebChromeClient(WebView *webView)
@@ -564,6 +564,7 @@ void WebChromeClient::print(Frame* frame)
}
#if ENABLE(DATABASE)
+
void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& databaseName)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -579,9 +580,11 @@ void WebChromeClient::exceededDatabaseQuota(Frame* frame, const String& database
END_BLOCK_OBJC_EXCEPTIONS;
}
+
#endif
#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+
void WebChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded)
{
// FIXME: Free some space.
@@ -597,6 +600,7 @@ void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* origin)
END_BLOCK_OBJC_EXCEPTIONS;
}
+
#endif
void WebChromeClient::populateVisitedLinks()
@@ -616,17 +620,14 @@ void WebChromeClient::populateVisitedLinks()
}
#if ENABLE(DASHBOARD_SUPPORT)
+
void WebChromeClient::dashboardRegionsChanged()
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
- NSMutableDictionary *regions = core([m_webView mainFrame])->dashboardRegionsDictionary();
- [m_webView _addScrollerDashboardRegions:regions];
-
- CallUIDelegate(m_webView, @selector(webView:dashboardRegionsChanged:), regions);
-
+ CallUIDelegate(m_webView, @selector(webView:dashboardRegionsChanged:), [m_webView _dashboardRegions]);
END_BLOCK_OBJC_EXCEPTIONS;
}
+
#endif
FloatRect WebChromeClient::customHighlightRect(Node* node, const AtomicString& type, const FloatRect& lineRect)
@@ -954,7 +955,9 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
@end
#if ENABLE(FULLSCREEN_API)
+
@implementation WebKitFullScreenListener
+
- (id)initWithElement:(Element*)element
{
if (!(self = [super init]))
@@ -989,4 +992,5 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
}
@end
+
#endif
diff --git a/WebCore/page/mac/WebDashboardRegion.h b/WebKit/mac/WebView/WebDashboardRegion.h
similarity index 100%
rename from WebCore/page/mac/WebDashboardRegion.h
rename to WebKit/mac/WebView/WebDashboardRegion.h
diff --git a/WebKit/mac/WebView/WebDashboardRegion.mm b/WebKit/mac/WebView/WebDashboardRegion.mm
new file mode 100644
index 0000000..c44977a
--- /dev/null
+++ b/WebKit/mac/WebView/WebDashboardRegion.mm
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2004 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "WebDashboardRegion.h"
+
+#import <wtf/UnusedParam.h>
+
+#if ENABLE(DASHBOARD_SUPPORT)
+
+ at implementation WebDashboardRegion
+
+- initWithRect:(NSRect)r clip:(NSRect)c type:(WebDashboardRegionType)t
+{
+ self = [super init];
+ rect = r;
+ clip = c;
+ type = t;
+ return self;
+}
+
+- (id)copyWithZone:(NSZone *)unusedZone
+{
+ UNUSED_PARAM(unusedZone);
+
+ return [self retain];
+}
+
+- (NSRect)dashboardRegionClip
+{
+ return clip;
+}
+
+- (NSRect)dashboardRegionRect
+{
+ return rect;
+}
+
+- (WebDashboardRegionType)dashboardRegionType
+{
+ return type;
+}
+
+static const char* typeName(WebDashboardRegionType type)
+{
+ switch (type) {
+ case WebDashboardRegionTypeNone:
+ return "None";
+ case WebDashboardRegionTypeCircle:
+ return "Circle";
+ case WebDashboardRegionTypeRectangle:
+ return "Rectangle";
+ case WebDashboardRegionTypeScrollerRectangle:
+ return "ScrollerRectangle";
+ }
+ return "Unknown";
+}
+
+- (NSString *)description
+{
+ return [NSString stringWithFormat:@"rect:%@ clip:%@ type:%s", NSStringFromRect(rect), NSStringFromRect(clip), typeName(type)];
+}
+
+// FIXME: Overriding isEqual: without overriding hash will cause trouble if this ever goes into a NSSet or is the key in an NSDictionary.
+- (BOOL)isEqual:(id)other
+{
+ return NSEqualRects(rect, [other dashboardRegionRect]) && NSEqualRects(clip, [other dashboardRegionClip]) && type == [other dashboardRegionType];
+}
+
+ at end
+
+#endif
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index b6fbcd5..0624023 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1908,9 +1908,38 @@ static inline IMP getMethod(id o, SEL s)
Frame* mainFrame = [self _mainCoreFrame];
if (!mainFrame)
return nil;
- NSMutableDictionary *regions = mainFrame->dashboardRegionsDictionary();
- [self _addScrollerDashboardRegions:regions];
- return regions;
+
+ const Vector<DashboardRegionValue>& regions = mainFrame->document()->dashboardRegions();
+ size_t size = regions.size();
+
+ NSMutableDictionary *webRegions = [NSMutableDictionary dictionaryWithCapacity:size];
+ for (size_t i = 0; i < size; i++) {
+ const DashboardRegionValue& region = regions[i];
+
+ if (region.type == StyleDashboardRegion::None)
+ continue;
+
+ NSString *label = region.label;
+ WebDashboardRegionType type = WebDashboardRegionTypeNone;
+ if (region.type == StyleDashboardRegion::Circle)
+ type = WebDashboardRegionTypeCircle;
+ else if (region.type == StyleDashboardRegion::Rectangle)
+ type = WebDashboardRegionTypeRectangle;
+ NSMutableArray *regionValues = [webRegions objectForKey:label];
+ if (!regionValues) {
+ regionValues = [[NSMutableArray alloc] initWithCapacity:1];
+ [webRegions setObject:regionValues forKey:label];
+ [regionValues release];
+ }
+
+ WebDashboardRegion *webRegion = [[WebDashboardRegion alloc] initWithRect:region.bounds clip:region.clip type:type];
+ [regionValues addObject:webRegion];
+ [webRegion release];
+ }
+
+ [self _addScrollerDashboardRegions:webRegions];
+
+ return webRegions;
}
- (void)_setDashboardBehavior:(WebDashboardBehavior)behavior to:(BOOL)flag
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list