[prev in list] [next in list] [prev in thread] [next in thread]
List: webkit-changes
Subject: [webkit-changes] [37102] trunk/WebKit/mac
From: andersca () apple ! com
Date: 2008-09-30 19:29:21
Message-ID: 20080930192921.9B50844819C () beta ! macosforge ! org
[Download RAW message or body]
[Attachment #2 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[37102] trunk/WebKit/mac</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: \
verdana,arial,helvetica,sans-serif; font-size: 10pt; } #msg dl a { font-weight: \
bold} #msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: \
bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: \
6px; } #logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em \
0; } #logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg \
h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } \
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; \
} #logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: \
-1.5em; padding-left: 1.5em; } #logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em \
1em 0 1em; background: white;} #logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid \
#fa0; border-bottom: 1px solid #fa0; background: #fff; } #logmsg table th { \
text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted \
#fa0; } #logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: \
0.2em 0.5em; } #logmsg table thead th { text-align: center; border-bottom: 1px solid \
#fa0; } #logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: \
6px; } #patch { width: 100%; }
#patch h4 {font-family: \
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, \
#patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins \
{background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del \
{background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, \
.info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a \
href="http://trac.webkit.org/projects/webkit/changeset/37102">37102</a></dd> \
<dt>Author</dt> <dd>andersca@apple.com</dd> <dt>Date</dt> <dd>2008-09-30 12:29:20 \
-0700 (Tue, 30 Sep 2008)</dd> </dl>
<h3>Log Message</h3>
<pre>2008-09-30 Anders Carlsson <andersca@apple.com>
Reviewed by Mark Rowe and Adam Roben.
No need to use pointers to store C++ objects as pointers in WebViewPrivate, \
we can just store them directly.
* Configurations/Base.xcconfig:
Set GCC_OBJC_CALL_CXX_CDTORS to YES.
* WebView/WebView.mm:
(-[WebViewPrivate init]):
(-[WebViewPrivate dealloc]):
(-[WebViewPrivate finalize]):
(-[WebView _preferencesChangedNotification:]):
(-[WebView setApplicationNameForUserAgent:]):
(-[WebView setCustomUserAgent:]):
(-[WebView customUserAgent]):
(-[WebView WebCore::_userAgentForURL:WebCore::]):
(-[WebView _addObject:forIdentifier:]):
(-[WebView _objectForIdentifier:]):
(-[WebView _removeObjectForIdentifier:]):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebKitmacChangeLog">trunk/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkWebKitmacConfigurationsBasexcconfig">trunk/WebKit/mac/Configurations/Base.xcconfig</a></li>
<li><a href="#trunkWebKitmacWebViewWebViewmm">trunk/WebKit/mac/WebView/WebView.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/ChangeLog (37101 => 37102)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/ChangeLog 2008-09-30 18:05:38 UTC (rev 37101)
+++ trunk/WebKit/mac/ChangeLog 2008-09-30 19:29:20 UTC (rev 37102)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2008-09-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Mark Rowe and Adam Roben.
+
+ No need to use pointers to store C++ objects as pointers in WebViewPrivate, \
we can just + store them directly.
+
+ * Configurations/Base.xcconfig:
+ Set GCC_OBJC_CALL_CXX_CDTORS to YES.
+
+ * WebView/WebView.mm:
+ (-[WebViewPrivate init]):
+ (-[WebViewPrivate dealloc]):
+ (-[WebViewPrivate finalize]):
+ (-[WebView _preferencesChangedNotification:]):
+ (-[WebView setApplicationNameForUserAgent:]):
+ (-[WebView setCustomUserAgent:]):
+ (-[WebView customUserAgent]):
+ (-[WebView WebCore::_userAgentForURL:WebCore::]):
+ (-[WebView _addObject:forIdentifier:]):
+ (-[WebView _objectForIdentifier:]):
+ (-[WebView _removeObjectForIdentifier:]):
+
</ins><span class="cx"> 2008-09-29 Thiago Macieira \
<thiago.macieira@nokia.com> </span><span class="cx">
</span><span class="cx"> Reviewed by Simon.
</span></span></pre></div>
<a id="trunkWebKitmacConfigurationsBasexcconfig"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/Configurations/Base.xcconfig \
(37101 => 37102)</h4> <pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/Configurations/Base.xcconfig 2008-09-30 \
18:05:38 UTC (rev 37101)
+++ trunk/WebKit/mac/Configurations/Base.xcconfig 2008-09-30 19:29:20 UTC (rev 37102)
</span><span class="lines">@@ -10,6 +10,7 @@
</span><span class="cx"> GCC_ENABLE_SYMBOL_SEPARATION = NO;
</span><span class="cx"> GCC_FAST_OBJC_DISPATCH = YES;
</span><span class="cx"> GCC_MODEL_TUNING = G5;
</span><ins>+GCC_OBJC_CALL_CXX_CDTORS = YES;
</ins><span class="cx"> GCC_PRECOMPILE_PREFIX_HEADER = YES;
</span><span class="cx"> GCC_THREADSAFE_STATICS = NO;
</span><span class="cx"> GCC_TREAT_WARNINGS_AS_ERRORS = YES;
</span></span></pre></div>
<a id="trunkWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/WebKit/mac/WebView/WebView.mm (37101 => \
37102)</h4> <pre class="diff"><span>
<span class="info">--- trunk/WebKit/mac/WebView/WebView.mm 2008-09-30 18:05:38 UTC \
(rev 37101)
+++ trunk/WebKit/mac/WebView/WebView.mm 2008-09-30 19:29:20 UTC (rev 37102)
</span><span class="lines">@@ -337,7 +337,7 @@
</span><span class="cx"> BOOL zoomMultiplierIsTextOnly;
</span><span class="cx">
</span><span class="cx"> NSString *applicationNameForUserAgent;
</span><del>- String* userAgent;
</del><ins>+ String userAgent;
</ins><span class="cx"> BOOL userAgentOverridden;
</span><span class="cx">
</span><span class="cx"> WebPreferences *preferences;
</span><span class="lines">@@ -383,7 +383,7 @@
</span><span class="cx"> // WebKit has both a global plug-in database and a \
separate, per WebView plug-in database. Dashboard uses the per WebView database. \
</span><span class="cx"> WebPluginDatabase *pluginDatabase; </span><span \
class="cx"> </span><del>- HashMap<unsigned long, RetainPtr<id> >* \
identifierMap; </del><ins>+ HashMap<unsigned long, RetainPtr<id> > \
identifierMap; </ins><span class="cx">
</span><span class="cx"> BOOL _keyboardUIModeAccessed;
</span><span class="cx"> KeyboardUIMode _keyboardUIMode;
</span><span class="lines">@@ -489,11 +489,9 @@
</span><span class="cx"> #ifndef BUILDING_ON_TIGER
</span><span class="cx"> grammarCheckingEnabled = [[NSUserDefaults \
standardUserDefaults] boolForKey:WebGrammarCheckingEnabled]; </span><span class="cx"> \
#endif </span><del>- userAgent = new String;
</del><span class="cx">
</span><span class="cx"> usesPageCache = YES;
</span><span class="cx">
</span><del>- identifierMap = new HashMap<unsigned long, RetainPtr<id> \
>(); </del><span class="cx"> pluginDatabaseClientCount++;
</span><span class="cx">
</span><span class="cx"> shouldUpdateWhileOffscreen = YES;
</span><span class="lines">@@ -505,9 +503,6 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(applicationIsTerminating || !page);
</span><span class="cx"> ASSERT(applicationIsTerminating || !preferences);
</span><del>-
- delete userAgent;
- delete identifierMap;
</del><span class="cx">
</span><span class="cx"> [applicationNameForUserAgent release];
</span><span class="cx"> [backgroundColor release];
</span><span class="lines">@@ -532,9 +527,6 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT_MAIN_THREAD();
</span><span class="cx">
</span><del>- delete userAgent;
- delete identifierMap;
-
</del><span class="cx"> [super finalize];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -996,7 +988,7 @@
</span><span class="cx"> ASSERT(preferences == [self preferences]);
</span><span class="cx">
</span><span class="cx"> if (!_private->userAgentOverridden)
</span><del>- *_private->userAgent = String();
</del><ins>+ _private->userAgent = String();
</ins><span class="cx">
</span><span class="cx"> // Cache this value so we don't have to read \
NSUserDefaults on each page load </span><span class="cx"> \
_private->useSiteSpecificSpoofing = [preferences _useSiteSpecificSpoofing]; \
</span><span class="lines">@@ -2484,7 +2476,7 @@ </span><span class="cx"> \
[_private->applicationNameForUserAgent release]; </span><span class="cx"> \
_private->applicationNameForUserAgent = name; </span><span class="cx"> if \
(!_private->userAgentOverridden) </span><del>- *_private->userAgent = \
String(); </del><ins>+ _private->userAgent = String();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (NSString *)applicationNameForUserAgent
</span><span class="lines">@@ -2494,7 +2486,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)setCustomUserAgent:(NSString *)userAgentString
</span><span class="cx"> {
</span><del>- *_private->userAgent = userAgentString;
</del><ins>+ _private->userAgent = userAgentString;
</ins><span class="cx"> _private->userAgentOverridden = userAgentString != \
nil; </span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2502,7 +2494,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!_private->userAgentOverridden)
</span><span class="cx"> return nil;
</span><del>- return *_private->userAgent;
</del><ins>+ return _private->userAgent;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)setMediaStyle:(NSString *)mediaStyle
</span><span class="lines">@@ -4441,41 +4433,41 @@
</span><span class="cx"> // No current site-specific spoofs.
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (_private->userAgent->isNull()) {
</del><ins>+ if (_private->userAgent.isNull()) {
</ins><span class="cx"> NSString *sourceVersion = [[NSBundle \
bundleForClass:[WebView class]] objectForInfoDictionaryKey:(NSString \
*)kCFBundleVersionKey]; </span><span class="cx"> sourceVersion = [self \
_userVisibleBundleVersionFromFullVersion:sourceVersion]; </span><del>- \
*_private->userAgent = [self \
_userAgentWithApplicationName:_private->applicationNameForUserAgent \
andWebKitVersion:sourceVersion]; </del><ins>+ _private->userAgent = [self \
_userAgentWithApplicationName:_private->applicationNameForUserAgent \
andWebKitVersion:sourceVersion]; </ins><span class="cx"> }
</span><span class="cx">
</span><del>- return *_private->userAgent;
</del><ins>+ return _private->userAgent;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_addObject:(id)object forIdentifier:(unsigned \
long)identifier </span><span class="cx"> {
</span><del>- ASSERT(!_private->identifierMap->contains(identifier));
</del><ins>+ ASSERT(!_private->identifierMap.contains(identifier));
</ins><span class="cx">
</span><span class="cx"> // If the identifier map is initially empty it means \
we're starting a load </span><span class="cx"> // of something. The semantic is \
that the web view should be around as long </span><span class="cx"> // as \
something is loading. Because of that we retain the web view. </span><del>- if \
(_private->identifierMap->isEmpty()) </del><ins>+ if \
(_private->identifierMap.isEmpty()) </ins><span class="cx"> \
CFRetain(self); </span><span class="cx">
</span><del>- _private->identifierMap->set(identifier, object);
</del><ins>+ _private->identifierMap.set(identifier, object);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (id)_objectForIdentifier:(unsigned long)identifier
</span><span class="cx"> {
</span><del>- return _private->identifierMap->get(identifier).get();
</del><ins>+ return _private->identifierMap.get(identifier).get();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_removeObjectForIdentifier:(unsigned long)identifier
</span><span class="cx"> {
</span><del>- ASSERT(_private->identifierMap->contains(identifier));
- _private->identifierMap->remove(identifier);
</del><ins>+ ASSERT(_private->identifierMap.contains(identifier));
+ _private->identifierMap.remove(identifier);
</ins><span class="cx">
</span><span class="cx"> // If the identifier map is now empty it means we're no \
longer loading anything </span><span class="cx"> // and we should release the web \
view. </span><del>- if (_private->identifierMap->isEmpty())
</del><ins>+ if (_private->identifierMap.isEmpty())
</ins><span class="cx"> CFRelease(self);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic