Changeset 13440 in webkit
- Timestamp:
- Mar 22, 2006, 2:27:45 PM (19 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 57 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r13439 r13440 1 2006-03-22 Eric Seidel <eseidel@apple.com> 2 3 Reviewed by darin. 4 5 Replace more DeprecatedString with String. 6 http://bugzilla.opendarwin.org/show_bug.cgi?id=7907 7 8 * WebCore+SVG/kdom.h: 9 * bindings/objc/DOMHTML.mm: 10 (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): 11 * bridge/BrowserExtension.h: 12 * bridge/mac/BrowserExtensionMac.h: 13 * bridge/mac/BrowserExtensionMac.mm: 14 (WebCore::BrowserExtensionMac::setTypedIconURL): 15 * bridge/mac/FrameMac.h: 16 * bridge/mac/FrameMac.mm: 17 (WebCore::FrameMac::searchForLabelsBeforeElement): 18 (WebCore::nsArray): 19 (WebCore::FrameMac::createPlugin): 20 (WebCore::FrameMac::bindingRootObject): 21 (WebCore::FrameMac::windowScriptObject): 22 (WebCore::FrameMac::windowScriptNPObject): 23 (WebCore::FrameMac::partClearedInBegin): 24 (WebCore::FrameMac::openURLFromPageCache): 25 * bridge/mac/WebCoreFrameBridge.mm: 26 (-[WebCoreFrameBridge openURL:reload:contentType:refresh:lastModified:pageCache:]): 27 (-[WebCoreFrameBridge scrollToAnchor:]): 28 (-[WebCoreFrameBridge URLWithAttributeString:]): 29 (-[WebCoreFrameBridge highlightAllMatchesForString:caseSensitive:]): 30 * bridge/mac/WebCoreScriptDebugger.mm: 31 (-[WebCoreScriptCallFrame evaluateWebScript:]): 32 * bridge/mac/WebCoreSettings.mm: 33 (-[WebCoreSettings _updateAllViews]): 34 (-[WebCoreSettings setStandardFontFamily:]): 35 (-[WebCoreSettings setMinimumFontSize:]): 36 (-[WebCoreSettings setMinimumLogicalFontSize:]): 37 (-[WebCoreSettings setDefaultFontSize:]): 38 (-[WebCoreSettings setDefaultFixedFontSize:]): 39 (-[WebCoreSettings setUserStyleSheetLocation:]): 40 * css/CSSComputedStyleDeclaration.cpp: 41 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 42 * css/CSSGrammar.y: 43 * css/css_stylesheetimpl.cpp: 44 (WebCore::MediaList::setMediaText): 45 * css/css_valueimpl.cpp: 46 (WebCore::quoteStringIfNeeded): 47 * css/cssparser.cpp: 48 (WebCore::CSSParser::parseColor): 49 * css/cssstyleselector.cpp: 50 (WebCore::CSSStyleSelector::CSSStyleSelector): 51 * css/cssstyleselector.h: 52 * dom/Document.cpp: 53 (WebCore::Document::resetActiveLinkColor): 54 (WebCore::Document::nextState): 55 (WebCore::Document::setUserStyleSheet): 56 (WebCore::Document::processHttpEquiv): 57 (WebCore::Document::recalcStyleSelector): 58 * dom/Document.h: 59 (WebCore::Document::userStyleSheet): 60 (WebCore::Document::setPrintStyleSheet): 61 (WebCore::Document::printStyleSheet): 62 * editing/markup.cpp: 63 (WebCore::createMarkup): 64 (WebCore::createFragmentFromMarkup): 65 (WebCore::createFragmentFromText): 66 * editing/markup.h: 67 * html/CanvasRenderingContext2D.cpp: 68 (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation): 69 * html/HTMLTokenizer.cpp: 70 (WebCore::HTMLTokenizer::scriptHandler): 71 * html/html_baseimpl.cpp: 72 (WebCore::HTMLFrameElement::openURL): 73 (WebCore::HTMLFrameElement::attach): 74 * html/html_headimpl.cpp: 75 (WebCore::HTMLLinkElement::process): 76 (WebCore::HTMLLinkElement::setStyleSheet): 77 * html/html_headimpl.h: 78 * html/html_imageimpl.cpp: 79 (WebCore::HTMLImageElement::parseMappedAttribute): 80 * html/html_imageimpl.h: 81 (WebCore::HTMLImageElement::compositeOperator): 82 * html/html_objectimpl.cpp: 83 (WebCore::HTMLAppletElement::createRenderer): 84 * ksvg2/svg/SVGStringList.cpp: 85 (SVGStringList::reset): 86 * kwq/AccessibilityObjectCache.h: 87 * kwq/AccessibilityObjectCache.mm: 88 (AccessibilityObjectCache::textMarkerForVisiblePosition): 89 (AccessibilityObjectCache::postNotificationToTopWebArea): 90 (AccessibilityObjectCache::postNotification): 91 * kwq/ClipboardMac.mm: 92 (WebCore::cocoaTypeFromMIMEType): 93 * kwq/KWQKHTMLSettings.h: 94 (KHTMLSettings::userStyleSheetLocation): 95 (KHTMLSettings::setUserStyleSheetLocation): 96 * kwq/KWQLineEdit.h: 97 * kwq/KWQLineEdit.mm: 98 (QLineEdit::selectedText): 99 * loader/CachedCSSStyleSheet.cpp: 100 (WebCore::CachedCSSStyleSheet::ref): 101 * page/Frame.cpp: 102 (WebCore::UserStyleSheetLoader::setStyleSheet): 103 (WebCore::Frame::jScriptEnabled): 104 (WebCore::Frame::javaEnabled): 105 (WebCore::Frame::pluginsEnabled): 106 (WebCore::Frame::receivedFirstData): 107 (WebCore::Frame::begin): 108 (WebCore::Frame::setUserStyleSheet): 109 (WebCore::Frame::requestObject): 110 (WebCore::Frame::loadPlugin): 111 (WebCore::Frame::referrer): 112 (WebCore::Frame::lastModified): 113 (WebCore::Frame::reparseConfiguration): 114 (WebCore::Frame::handleMousePressEventSingleClick): 115 (WebCore::Frame::appliedEditing): 116 (WebCore::Frame::unappliedEditing): 117 (WebCore::Frame::reappliedEditing): 118 * page/Frame.h: 119 * page/FramePrivate.h: 120 (WebCore::FramePrivate::FramePrivate): 121 * platform/AtomicString.h: 122 (WebCore::AtomicString::AtomicString): 123 * platform/DeprecatedString.cpp: 124 (DeprecatedString::replace): 125 * platform/GraphicsContext.h: 126 * platform/Image.h: 127 * platform/KURL.cpp: 128 * platform/KURL.h: 129 * platform/PlatformString.h: 130 (WebCore::String::String): 131 (WebCore::String::replace): 132 * platform/String.cpp: 133 (WebCore::operator+): 134 * platform/StringImpl.cpp: 135 (WebCore::StringImpl::remove): 136 (WebCore::parseLength): 137 (WebCore::StringImpl::replace): 138 * platform/StringImpl.h: 139 * platform/mac/GraphicsContextMac.mm: 140 (WebCore::GraphicsContext::setCompositeOperation): 141 * rendering/RenderHTMLCanvas.cpp: 142 (WebCore::RenderHTMLCanvas::paint): 143 * rendering/render_form.cpp: 144 (WebCore::RenderSelect::updateFromElement): 145 * rendering/render_frames.cpp: 146 (WebCore::isURLAllowed): 147 (WebCore::mapClassIdToServiceType): 148 (WebCore::RenderPartObject::updateWidget): 149 * rendering/render_style.h: 150 (WebCore::RenderStyle::setDashboardRegion): 151 * xml/xmlhttprequest.cpp: 152 (WebCore::getCharset): 153 (WebCore::XMLHttpRequest::send): 154 (WebCore::XMLHttpRequest::overrideMIMEType): 155 1 156 2006-03-22 Beth Dakin <bdakin@apple.com> 2 157 -
trunk/WebCore/WebCore+SVG/kdom.h
r13393 r13440 25 25 #define KDOM_H 26 26 #if SVG_SUPPORT 27 28 #include "DeprecatedString.h"29 #include "PlatformString.h"30 27 31 28 /** -
trunk/WebCore/bindings/objc/DOMHTML.mm
r13393 r13440 511 511 - (DOMDocumentFragment *)_createDocumentFragmentWithMarkupString:(NSString *)markupString baseURLString:(NSString *)baseURLString 512 512 { 513 RefPtr<DocumentFragment> fragment = createFragmentFromMarkup([self _document], DeprecatedString::fromNSString(markupString), DeprecatedString::fromNSString(baseURLString));513 RefPtr<DocumentFragment> fragment = createFragmentFromMarkup([self _document], markupString, baseURLString); 514 514 return [DOMDocumentFragment _documentFragmentWith:fragment.get()]; 515 515 } -
trunk/WebCore/bridge/BrowserExtension.h
r13393 r13440 70 70 71 71 virtual void setIconURL(const KURL&) = 0; 72 virtual void setTypedIconURL(const KURL&, const DeprecatedString& type) = 0;72 virtual void setTypedIconURL(const KURL&, const String& type) = 0; 73 73 74 74 virtual int getHistoryLength() = 0; -
trunk/WebCore/bridge/mac/BrowserExtensionMac.h
r13393 r13440 41 41 42 42 virtual void setIconURL(const KURL&); 43 virtual void setTypedIconURL(const KURL&, const DeprecatedString& type);43 virtual void setTypedIconURL(const KURL&, const String& type); 44 44 45 45 virtual int getHistoryLength(); -
trunk/WebCore/bridge/mac/BrowserExtensionMac.mm
r13404 r13440 163 163 } 164 164 165 void BrowserExtensionMac::setTypedIconURL(const KURL &url, const DeprecatedString &type)166 { 167 BEGIN_BLOCK_OBJC_EXCEPTIONS; 168 [m_frame->bridge() setIconURL:url.getNSURL() withType:type .getNSString()];165 void BrowserExtensionMac::setTypedIconURL(const KURL &url, const String &type) 166 { 167 BEGIN_BLOCK_OBJC_EXCEPTIONS; 168 [m_frame->bridge() setIconURL:url.getNSURL() withType:type]; 169 169 END_BLOCK_OBJC_EXCEPTIONS; 170 170 } -
trunk/WebCore/bridge/mac/FrameMac.h
r13404 r13440 141 141 142 142 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType); 143 virtual Plugin* createPlugin(const KURL& url, const DeprecatedStringList& paramNames, const DeprecatedStringList& paramValues, const String& mimeType);143 virtual Plugin* createPlugin(const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType); 144 144 virtual Frame* createFrame(const KURL& url, const String& name, RenderPart* renderer, const String& referrer); 145 145 -
trunk/WebCore/bridge/mac/FrameMac.mm
r13426 r13440 332 332 } 333 333 searchedCellAbove = true; 334 } else if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) 335 { 334 } else if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) { 336 335 // For each text chunk, run the regexp 337 336 DeprecatedString nodeString = n->nodeValue().deprecatedString(); 338 337 // add 100 for slop, to make it more likely that we'll search whole nodes 339 if (lengthSearched + nodeString.length() > maxCharsSearched) {338 if (lengthSearched + nodeString.length() > maxCharsSearched) 340 339 nodeString = nodeString.right(charsSearchedThreshold - lengthSearched); 341 }342 340 int pos = regExp->searchRev(nodeString); 343 341 if (pos >= 0) … … 526 524 } 527 525 528 529 Plugin* FrameMac::createPlugin(const KURL& url, const DeprecatedStringList& paramNames, const DeprecatedStringList& paramValues, const String& mimeType) 526 static NSArray* nsArray(const Vector<String>& vector) 527 { 528 unsigned len = vector.size(); 529 NSMutableArray* array = [NSMutableArray arrayWithCapacity:len]; 530 for (unsigned x = 0; x < len; x++) 531 [array addObject:vector[x]]; 532 return array; 533 } 534 535 Plugin* FrameMac::createPlugin(const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType) 530 536 { 531 537 BEGIN_BLOCK_OBJC_EXCEPTIONS; 532 538 533 539 return new Plugin(new Widget([_bridge viewForPluginWithURL:url.getNSURL() 534 attributeNames: paramNames.getNSArray()535 attributeValues: paramValues.getNSArray()540 attributeNames:nsArray(paramNames) 541 attributeValues:nsArray(paramValues) 536 542 MIMEType:mimeType])); 537 543 … … 1042 1048 KJS::Bindings::RootObject *FrameMac::bindingRootObject() 1043 1049 { 1044 assert( d->m_bJScriptEnabled);1050 assert(jScriptEnabled()); 1045 1051 if (!_bindingRoot) { 1046 1052 JSLock lock; … … 1056 1062 WebScriptObject *FrameMac::windowScriptObject() 1057 1063 { 1058 if (! d->m_bJScriptEnabled)1064 if (!jScriptEnabled()) 1059 1065 return 0; 1060 1066 … … 1071 1077 { 1072 1078 if (!_windowScriptNPObject) { 1073 if ( d->m_bJScriptEnabled) {1079 if (jScriptEnabled()) { 1074 1080 // JavaScript is enabled, so there is a JavaScript window object. Return an NPObject bound to the window 1075 1081 // object. … … 1089 1095 void FrameMac::partClearedInBegin() 1090 1096 { 1091 if ( d->m_bJScriptEnabled)1097 if (jScriptEnabled()) 1092 1098 [_bridge windowObjectCleared]; 1093 1099 } … … 1118 1124 1119 1125 // delete old status bar msg's from kjs (if it _was_ activated on last URL) 1120 if ( d->m_bJScriptEnabled) {1126 if (jScriptEnabled()) { 1121 1127 d->m_kjsStatusBarText = String(); 1122 1128 d->m_kjsDefaultStatusBarText = String(); -
trunk/WebCore/bridge/mac/WebCoreFrameBridge.mm
r13427 r13440 532 532 request.reload = reload; 533 533 if (contentType) 534 request.m_responseMIMEType = DeprecatedString::fromNSString(contentType);534 request.m_responseMIMEType = contentType; 535 535 m_frame->setResourceRequest(request); 536 536 … … 539 539 // things we have to set up after calling didOpenURL 540 540 if (refresh) { 541 m_frame->addMetaData("http-refresh", DeprecatedString::fromNSString(refresh));541 m_frame->addMetaData("http-refresh", refresh); 542 542 } 543 543 if (lastModified) { 544 544 NSString *modifiedString = [lastModified descriptionWithCalendarFormat:@"%a %b %d %Y %H:%M:%S" timeZone:nil locale:nil]; 545 m_frame->addMetaData("modified", DeprecatedString::fromNSString(modifiedString));545 m_frame->addMetaData("modified", modifiedString); 546 546 } 547 547 } … … 738 738 } 739 739 740 - (void)scrollToAnchor:(NSString *)a 741 { 742 m_frame->gotoAnchor( DeprecatedString::fromNSString(a));740 - (void)scrollToAnchor:(NSString *)anchor 741 { 742 m_frame->gotoAnchor(anchor); 743 743 } 744 744 … … 1201 1201 { 1202 1202 Document *doc = m_frame->document(); 1203 if (!doc) {1203 if (!doc) 1204 1204 return nil; 1205 }1206 1205 // FIXME: is parseURL appropriate here? 1207 DeprecatedString rel = parseURL( DeprecatedString::fromNSString(string)).deprecatedString();1206 DeprecatedString rel = parseURL(string).deprecatedString(); 1208 1207 return KURL(doc->completeURL(rel)).getNSURL(); 1209 1208 } … … 1216 1215 - (unsigned)highlightAllMatchesForString:(NSString *)string caseSensitive:(BOOL)caseFlag 1217 1216 { 1218 return m_frame->highlightAllMatchesForString( DeprecatedString::fromNSString(string), caseFlag);1217 return m_frame->highlightAllMatchesForString(string, caseFlag); 1219 1218 } 1220 1219 -
trunk/WebCore/bridge/mac/WebCoreScriptDebugger.mm
r13393 r13440 323 323 if (state->context().imp()) { // "eval" won't work without context (i.e. at global scope) 324 324 JSValue *v = globObj->get(state, "eval"); 325 if (v->isObject() && static_cast<JSObject *>(v)->implementsCall()) {325 if (v->isObject() && static_cast<JSObject *>(v)->implementsCall()) 326 326 eval = static_cast<JSObject *>(v); 327 } 328 else { 327 else 329 328 // no "eval" - fallback operates on global exec state 330 329 state = interp->globalExec(); 331 }332 330 } 333 331 … … 342 340 args.append(jsString(code)); 343 341 result = eval->call(state, NULL, args); 344 } 345 else { 342 } else 346 343 // no "eval", or no context (i.e. global scope) - use global fallback 347 344 result = interp->imp()->evaluate(code.data(), code.size(), globObj, UString(), 0).value(); 348 } 349 350 if (state->hadException()) { 345 346 if (state->hadException()) 351 347 result = state->exception(); // (may be redundant depending on which eval path was used) 352 }353 348 state->setException(savedException); 354 349 -
trunk/WebCore/bridge/mac/WebCoreSettings.mm
r13432 r13440 70 70 for (DeprecatedPtrListIterator<Frame> it(Frame::instances()); it.current(); ++it) { 71 71 FrameMac *frame = Mac(it.current()); 72 if (frame->settings() == settings) {72 if (frame->settings() == settings) 73 73 [frame->bridge() setNeedsReapplyStyles]; 74 }75 74 } 76 75 } … … 78 77 - (void)setStandardFontFamily:(NSString *)s 79 78 { 80 if ([standardFontFamily isEqualToString:s]) { 81 return; 82 } 79 if ([standardFontFamily isEqualToString:s]) 80 return; 83 81 [standardFontFamily release]; 84 82 standardFontFamily = [s copy]; … … 169 167 - (void)setMinimumFontSize:(float)size 170 168 { 171 if (minimumFontSize == size) { 172 return; 173 } 169 if (minimumFontSize == size) 170 return; 174 171 minimumFontSize = size; 175 172 settings->setMinFontSize((int)rint(size)); … … 184 181 - (void)setMinimumLogicalFontSize:(float)size 185 182 { 186 if (minimumLogicalFontSize == size) { 187 return; 188 } 183 if (minimumLogicalFontSize == size) 184 return; 189 185 minimumLogicalFontSize = size; 190 186 settings->setMinLogicalFontSize((int)rint(size)); … … 199 195 - (void)setDefaultFontSize:(float)size 200 196 { 201 if (defaultFontSize == size) { 202 return; 203 } 197 if (defaultFontSize == size) 198 return; 204 199 defaultFontSize = size; 205 200 settings->setMediumFontSize((int)rint(size)); … … 214 209 - (void)setDefaultFixedFontSize:(float)size 215 210 { 216 if (defaultFixedFontSize == size) { 217 return; 218 } 211 if (defaultFixedFontSize == size) 212 return; 219 213 defaultFixedFontSize = size; 220 214 settings->setMediumFixedFontSize((int)rint(size)); … … 288 282 [userStyleSheetLocation release]; 289 283 userStyleSheetLocation = [s copy]; 290 settings->setUserStyleSheet (DeprecatedString::fromNSString(s));284 settings->setUserStyleSheetLocation(DeprecatedString::fromNSString(s)); 291 285 [self _updateAllViews]; 292 286 } -
trunk/WebCore/css/CSSComputedStyleDeclaration.cpp
r13393 r13440 955 955 case CSS_PROP_TEXT_DECORATION: 956 956 { 957 DeprecatedString string;957 String string; 958 958 if (style->textDecoration() & UNDERLINE) 959 959 string += "underline"; … … 979 979 case CSS_PROP__KHTML_TEXT_DECORATIONS_IN_EFFECT: 980 980 { 981 DeprecatedString string;981 String string; 982 982 if (style->textDecorationsInEffect() & UNDERLINE) 983 983 string += "underline"; -
trunk/WebCore/css/CSSGrammar.y
r13405 r13440 829 829 IDENT maybe_space { 830 830 DeprecatedString str = qString($1); 831 $$ = getPropertyID( str.lower().latin1(), str.length());831 $$ = getPropertyID(str.lower().latin1(), str.length()); 832 832 #if SVG_SUPPORT 833 833 if ($$ == 0) -
trunk/WebCore/css/css_stylesheetimpl.cpp
r13393 r13440 337 337 { 338 338 m_lstMedia.clear(); 339 DeprecatedStringList list = DeprecatedStringList::split( ',', value.deprecatedString() ); 340 for ( DeprecatedStringList::Iterator it = list.begin(); it != list.end(); ++it ) 341 { 339 DeprecatedStringList list = DeprecatedStringList::split(',', value.deprecatedString()); 340 for (DeprecatedStringList::Iterator it = list.begin(); it != list.end(); ++it) { 342 341 String medium = (*it).stripWhiteSpace(); 343 342 if (!medium.isEmpty()) 344 m_lstMedia.append( medium);345 } 346 } 347 348 } 343 m_lstMedia.append(medium); 344 } 345 } 346 347 } -
trunk/WebCore/css/css_valueimpl.cpp
r13405 r13440 88 88 89 89 // FIXME: Also need to transform control characters into \ sequences. 90 DeprecatedString s = string.deprecatedString();90 String s = string; 91 91 s.replace('\\', "\\\\"); 92 92 s.replace('\'', "\\'"); -
trunk/WebCore/css/cssparser.cpp
r13393 r13440 2085 2085 int len = name.length(); 2086 2086 2087 if ( !len)2087 if (!len) 2088 2088 return false; 2089 2090 2089 2091 2090 bool ok; -
trunk/WebCore/css/cssstyleselector.cpp
r13439 r13440 198 198 static PseudoState pseudoState; 199 199 200 CSSStyleSelector::CSSStyleSelector(Document* doc, DeprecatedStringuserStyleSheet, StyleSheetList *styleSheets, bool _strictParsing)200 CSSStyleSelector::CSSStyleSelector(Document* doc, const String& userStyleSheet, StyleSheetList *styleSheets, bool _strictParsing) 201 201 { 202 202 init(); … … 215 215 if (!userStyleSheet.isEmpty()) { 216 216 m_userSheet = new CSSStyleSheet(doc); 217 m_userSheet->parseString( String(userStyleSheet), strictParsing);217 m_userSheet->parseString(userStyleSheet, strictParsing); 218 218 219 219 m_userStyle = new CSSRuleSet(); -
trunk/WebCore/css/cssstyleselector.h
r13404 r13440 79 79 * creates a list of rules it needs to apply to objects 80 80 */ 81 CSSStyleSelector(Document* doc, DeprecatedString userStyleSheet, 82 StyleSheetList *styleSheets, 83 bool _strictParsing); 81 CSSStyleSelector(Document*, const String& userStyleSheet, StyleSheetList *styleSheets, bool strictParsing); 84 82 /** 85 83 * same as above but for a single stylesheet. -
trunk/WebCore/dom/Document.cpp
r13427 r13440 368 368 void Document::resetActiveLinkColor() 369 369 { 370 m_activeLinkColor.setNamedColor( DeprecatedString("red"));370 m_activeLinkColor.setNamedColor("red"); 371 371 } 372 372 … … 716 716 { 717 717 DeprecatedString state; 718 if (!m_state.isEmpty()) 719 { 718 if (!m_state.isEmpty()) { 720 719 state = m_state.first(); 721 720 m_state.remove(m_state.begin()); … … 1328 1327 } 1329 1328 1330 void Document::setUserStyleSheet(const DeprecatedString& sheet)1329 void Document::setUserStyleSheet(const String& sheet) 1331 1330 { 1332 1331 if (m_usersheet != sheet) { … … 1579 1578 m_preferredStylesheetSet = content; 1580 1579 updateStyleSelector(); 1581 } 1582 else if (equalIgnoringCase(equiv, "refresh") && frame->metaRefreshEnabled()) 1583 { 1580 } else if (equalIgnoringCase(equiv, "refresh")) { 1584 1581 // get delay and url 1585 1582 DeprecatedString str = content.deprecatedString().stripWhiteSpace(); … … 1594 1591 delay = str.toInt(&ok); 1595 1592 // We want a new history item if the refresh timeout > 1 second 1596 if(ok && frame) frame->scheduleRedirection(delay, frame->url().url(), delay <= 1); 1593 if (ok && frame) 1594 frame->scheduleRedirection(delay, frame->url().url(), delay <= 1); 1597 1595 } else { 1598 1596 double delay = 0; … … 1613 1611 frame->scheduleRedirection(delay, completeURL(str), delay <= 1); 1614 1612 } 1615 } 1616 else if (equalIgnoringCase(equiv, "expires")) 1617 { 1613 } else if (equalIgnoringCase(equiv, "expires")) { 1618 1614 DeprecatedString str = content.deprecatedString().stripWhiteSpace(); 1619 1615 time_t expire_date = str.toInt(); 1620 1616 if (m_docLoader) 1621 1617 m_docLoader->setExpireDate(expire_date); 1622 } 1623 else if ((equalIgnoringCase(equiv, "pragma") || equalIgnoringCase(equiv, "cache-control")) && frame) 1624 { 1618 } else if ((equalIgnoringCase(equiv, "pragma") || equalIgnoringCase(equiv, "cache-control")) && frame) { 1625 1619 DeprecatedString str = content.deprecatedString().lower().stripWhiteSpace(); 1626 1620 KURL url = frame->url(); 1627 } 1628 else if (equalIgnoringCase(equiv, "set-cookie")) 1629 { 1630 // ### make setCookie work on XML documents too; e.g. in case of <html:meta .....> 1621 } else if (equalIgnoringCase(equiv, "set-cookie")) { 1622 // ### FIXME: make setCookie work on XML documents too; e.g. in case of <html:meta .....> 1631 1623 if (isHTMLDocument()) 1632 1624 static_cast<HTMLDocument *>(this)->setCookie(content); … … 1911 1903 // Create a new style selector 1912 1904 delete m_styleSelector; 1913 DeprecatedString usersheet = m_usersheet;1905 String usersheet = m_usersheet; 1914 1906 if (m_view && m_view->mediaType() == "print") 1915 1907 usersheet += m_printSheet; -
trunk/WebCore/dom/Document.h
r13404 r13440 281 281 // from cachedObjectClient 282 282 virtual void setStyleSheet(const String& url, const String& sheetStr); 283 void setUserStyleSheet(const DeprecatedString& sheet);284 DeprecatedStringuserStyleSheet() const { return m_usersheet; }285 void setPrintStyleSheet(const DeprecatedString& sheet) { m_printSheet = sheet; }286 DeprecatedStringprintStyleSheet() const { return m_printSheet; }283 void setUserStyleSheet(const String& sheet); 284 const String& userStyleSheet() const { return m_usersheet; } 285 void setPrintStyleSheet(const String& sheet) { m_printSheet = sheet; } 286 const String& printStyleSheet() const { return m_printSheet; } 287 287 288 288 CSSStyleSheet* elementSheet(); … … 548 548 549 549 RefPtr<StyleSheet> m_sheet; 550 DeprecatedString m_usersheet;551 DeprecatedString m_printSheet;550 String m_usersheet; 551 String m_printSheet; 552 552 DeprecatedStringList m_availableSheets; 553 553 -
trunk/WebCore/editing/markup.cpp
r13426 r13440 334 334 335 335 Node *commonAncestorBlock = 0; 336 if (commonAncestor != 0) {336 if (commonAncestor) 337 337 commonAncestorBlock = commonAncestor->enclosingBlockFlowElement(); 338 } 339 if (commonAncestorBlock == 0) { 340 return ""; 341 } 338 if (!commonAncestorBlock) 339 return ""; 342 340 343 341 DeprecatedStringList markups; … … 366 364 next = n->traverseNextNode(); 367 365 368 if (n->isBlockFlow() && next == pastEnd) {366 if (n->isBlockFlow() && next == pastEnd) 369 367 // Don't write out an empty block. 370 368 continue; 371 }372 369 373 370 // Add the node to the markup. 374 371 if (n->renderer()) { 375 372 markups.append(startMarkup(n, range, annotate, defaultStyle.get())); 376 if (nodes) {373 if (nodes) 377 374 nodes->append(n); 378 }379 375 } 380 376 … … 391 387 // Close up the ancestors. 392 388 while (Node *ancestor = ancestorsToClose.last()) { 393 if (next != pastEnd && ancestor == next->parentNode()) {389 if (next != pastEnd && ancestor == next->parentNode()) 394 390 break; 395 }396 391 // Not at the end of the range, close ancestors up to sibling of next node. 397 392 markups.append(endMarkup(ancestor)); … … 407 402 markups.prepend(startMarkup(parent, range, annotate, defaultStyle.get())); 408 403 markups.append(endMarkup(parent)); 409 if (nodes) {404 if (nodes) 410 405 nodes->append(parent); 411 }412 406 lastClosed = parent; 413 407 } … … 416 410 } 417 411 } 418 } else if (n->renderer()) {412 } else if (n->renderer()) 419 413 // Node is an ancestor, set it to close eventually. 420 414 ancestorsToClose.append(n); 421 }422 415 } 423 416 … … 442 435 || ancestor->hasTagName(ulTag)) { 443 436 breakAtEnd = true; 444 } else {437 } else 445 438 break; 446 }447 439 } 448 440 markups.prepend(startMarkup(ancestor, range, annotate, defaultStyle.get())); … … 451 443 nodes->append(ancestor); 452 444 } 453 if (breakAtEnd) {445 if (breakAtEnd) 454 446 break; 455 }456 447 } 457 448 } … … 479 470 } 480 471 481 PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document* document, const DeprecatedString& markup, const DeprecatedString& baseURL)472 PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document* document, const String& markup, const String& baseURL) 482 473 { 483 474 ASSERT(document->documentElement()->isHTMLElement()); … … 489 480 490 481 if (!baseURL.isEmpty() && baseURL != document->baseURL()) 491 completeURLs(fragment.get(), baseURL );482 completeURLs(fragment.get(), baseURL.deprecatedString()); 492 483 493 484 return fragment.release(); … … 554 545 555 546 // Break string into paragraphs. Extra line breaks turn into empty paragraphs. 556 string.replace( DeprecatedString("\r\n"), "\n");547 string.replace("\r\n", "\n"); 557 548 string.replace('\r', '\n'); 558 549 DeprecatedStringList list = DeprecatedStringList::split('\n', string, true); // true gets us empty strings in the list -
trunk/WebCore/editing/markup.h
r13393 r13440 40 40 41 41 PassRefPtr<WebCore::DocumentFragment> createFragmentFromText(WebCore::Document *document, const DeprecatedString &text); 42 PassRefPtr<WebCore::DocumentFragment> createFragmentFromMarkup(WebCore::Document *document, const DeprecatedString &markup, const DeprecatedString &baseURL);42 PassRefPtr<WebCore::DocumentFragment> createFragmentFromMarkup(WebCore::Document *document, const String &markup, const String &baseURL); 43 43 PassRefPtr<WebCore::DocumentFragment> createFragmentFromNodeList(WebCore::Document *document, const DeprecatedPtrList<WebCore::Node> &nodeList); 44 44 -
trunk/WebCore/html/CanvasRenderingContext2D.cpp
r13397 r13440 281 281 // FIXME: Do this through platform-independent GraphicsContext API. 282 282 #if __APPLE__ 283 GraphicsContext::setCompositeOperation(drawingContext(), operation .deprecatedString());283 GraphicsContext::setCompositeOperation(drawingContext(), operation); 284 284 #endif 285 285 } -
trunk/WebCore/html/HTMLTokenizer.cpp
r13426 r13440 387 387 if (!parser->skipMode() && !followingFrameset) { 388 388 if (cs) { 389 if (savedPrependingSrc) {389 if (savedPrependingSrc) 390 390 savedPrependingSrc->append(src); 391 } else {391 else 392 392 pendingSrc.prepend(src); 393 }394 393 setSrc(SegmentedString()); 395 394 scriptCodeSize = scriptCodeResync = 0; -
trunk/WebCore/html/html_baseimpl.cpp
r13397 r13440 330 330 childFrame->openURL(getDocument()->completeURL(relativeURL.deprecatedString())); 331 331 else 332 parentFrame->requestFrame(static_cast<RenderFrame *>(renderer()), relativeURL .deprecatedString(), m_name.deprecatedString());332 parentFrame->requestFrame(static_cast<RenderFrame *>(renderer()), relativeURL, m_name); 333 333 } 334 334 … … 425 425 426 426 // load the frame contents 427 frame->requestFrame(static_cast<RenderFrame*>(renderer()), relativeURL .deprecatedString(), m_name.deprecatedString());427 frame->requestFrame(static_cast<RenderFrame*>(renderer()), relativeURL, m_name); 428 428 } 429 429 -
trunk/WebCore/html/html_headimpl.cpp
r13397 r13440 213 213 return; 214 214 215 DeprecatedString type = m_type.deprecatedString().lower();215 String type = m_type.lower(); 216 216 217 217 Frame *frame = getDocument()->frame(); … … 276 276 277 277 MediaList *media = new MediaList(m_sheet.get(), m_media); 278 m_sheet->setMedia( media);278 m_sheet->setMedia(media); 279 279 280 280 m_loading = false; -
trunk/WebCore/html/html_headimpl.h
r13397 r13440 136 136 String m_url; 137 137 String m_type; 138 DeprecatedString m_media;138 String m_media; 139 139 int m_disabledState; // 0=unset(default), 1=enabled via script, 2=disabled 140 140 bool m_loading : 1; … … 142 142 bool m_isStyleSheet : 1; 143 143 bool m_isIcon : 1; 144 DeprecatedString m_data; // needed for temporarily storing the loaded style sheet data145 144 }; 146 145 … … 266 265 bool m_loading; 267 266 String m_type; 268 DeprecatedString m_media;267 String m_media; 269 268 }; 270 269 -
trunk/WebCore/html/html_imageimpl.cpp
r13397 r13440 160 160 if (renderer()) 161 161 static_cast<RenderImage*>(renderer())->updateAltText(); 162 } else if (attrName == srcAttr) {162 } else if (attrName == srcAttr) 163 163 m_imageLoader.updateFromElement(); 164 } else if (attrName == widthAttr) {164 else if (attrName == widthAttr) 165 165 addCSSLength(attr, CSS_PROP_WIDTH, attr->value()); 166 } else if (attrName == heightAttr) {166 else if (attrName == heightAttr) 167 167 addCSSLength(attr, CSS_PROP_HEIGHT, attr->value()); 168 }else if (attrName == borderAttr) {168 else if (attrName == borderAttr) { 169 169 // border="noborder" -> border="0" 170 170 if(attr->value().toInt()) { … … 181 181 addCSSLength(attr, CSS_PROP_MARGIN_LEFT, attr->value()); 182 182 addCSSLength(attr, CSS_PROP_MARGIN_RIGHT, attr->value()); 183 } else if (attrName == alignAttr) {183 } else if (attrName == alignAttr) 184 184 addHTMLAlignment(attr); 185 } else if (attrName == valignAttr) {185 else if (attrName == valignAttr) 186 186 addCSSProperty(attr, CSS_PROP_VERTICAL_ALIGN, attr->value()); 187 }else if (attrName == usemapAttr) {187 else if (attrName == usemapAttr) { 188 188 if (attr->value().domString()[0] == '#') 189 189 usemap = attr->value(); … … 191 191 usemap = getDocument()->completeURL(parseURL(attr->value())); 192 192 m_isLink = !attr->isNull(); 193 } else if (attrName == ismapAttr) {193 } else if (attrName == ismapAttr) 194 194 ismap = true; 195 } else if (attrName == onabortAttr) {195 else if (attrName == onabortAttr) 196 196 setHTMLEventListener(abortEvent, attr); 197 } else if (attrName == onerrorAttr) {197 else if (attrName == onerrorAttr) 198 198 setHTMLEventListener(errorEvent, attr); 199 } else if (attrName == onloadAttr) {199 else if (attrName == onloadAttr) 200 200 setHTMLEventListener(loadEvent, attr); 201 } else if (attrName == compositeAttr) {202 _compositeOperator = attr->value().d eprecatedString();203 }else if (attrName == nameAttr) {201 else if (attrName == compositeAttr) 202 _compositeOperator = attr->value().domString(); 203 else if (attrName == nameAttr) { 204 204 String newNameAttr = attr->value(); 205 205 if (inDocument() && getDocument()->isHTMLDocument()) { -
trunk/WebCore/html/html_imageimpl.h
r13397 r13440 96 96 virtual bool isURLAttribute(Attribute*) const; 97 97 98 Image::CompositeOperator compositeOperator() const { return Image::compositeOperatorFromString(_compositeOperator .ascii()); }98 Image::CompositeOperator compositeOperator() const { return Image::compositeOperatorFromString(_compositeOperator); } 99 99 100 100 CachedImage* cachedImage() const { return m_imageLoader.image(); } … … 145 145 HTMLFormElement* m_form; 146 146 String oldNameAttr; 147 DeprecatedString _compositeOperator;147 String _compositeOperator; 148 148 }; 149 149 -
trunk/WebCore/html/html_objectimpl.cpp
r13397 r13440 161 161 RenderObject *HTMLAppletElement::createRenderer(RenderArena *arena, RenderStyle *style) 162 162 { 163 #ifndef Q_WS_QWS // FIXME(E)? I don't think this is possible with Qt Embedded...164 163 Frame *frame = getDocument()->frame(); 165 164 166 if( frame && frame->javaEnabled() ) 167 { 165 if (frame && frame->javaEnabled()) { 168 166 HashMap<String, String> args; 169 167 … … 193 191 // render the alternative content given by the webpage 194 192 return new (getDocument()->renderArena()) RenderEmptyApplet(this); 195 #else196 return 0;197 #endif198 193 } 199 194 -
trunk/WebCore/ksvg2/svg/SVGStringList.cpp
r13393 r13440 41 41 { 42 42 DeprecatedStringList list = DeprecatedStringList::split(' ', str); 43 if(list.count() == 0) 44 { 43 if (list.count() == 0) { 45 44 StringImpl *item = new StringImpl(str); 46 45 item->ref(); 47 46 appendItem(item); 48 } 49 else for(DeprecatedStringList::Iterator it = list.begin(); it != list.end(); ++it) 50 { 47 } else for(DeprecatedStringList::Iterator it = list.begin(); it != list.end(); ++it) { 51 48 StringImpl *item = new StringImpl((*it)); 52 49 item->ref(); -
trunk/WebCore/kwq/AccessibilityObjectCache.h
r13393 r13440 38 38 #endif 39 39 40 class DeprecatedString;41 42 40 namespace WebCore { 43 41 class RenderObject; … … 67 65 void childrenChanged(WebCore::RenderObject* renderer); 68 66 69 void postNotification(WebCore::RenderObject* renderer, const DeprecatedString& msg);70 void postNotificationToTopWebArea(WebCore::RenderObject* renderer, const DeprecatedString& msg);67 void postNotification(WebCore::RenderObject* renderer, const WebCore::String& msg); 68 void postNotificationToTopWebArea(WebCore::RenderObject* renderer, const WebCore::String& msg); 71 69 void handleFocusedUIElementChanged(void); 72 70 -
trunk/WebCore/kwq/AccessibilityObjectCache.mm
r13393 r13440 30 30 #import <kxmlcore/Assertions.h> 31 31 #import "FoundationExtras.h" 32 #import "DeprecatedString.h"33 32 #import "RenderObject.h" 34 33 #import "WebCoreViewFactory.h" 35 34 #import "Document.h" 36 35 37 using WebCore::EAffinity; 38 using WebCore::RenderObject; 39 using WebCore::VisiblePosition; 36 using namespace WebCore; 40 37 41 38 // The simple Cocoa calls in this file don't throw exceptions. … … 45 42 typedef struct KWQTextMarkerData { 46 43 WebCoreAXID axObjectID; 47 WebCore::Node* nodeImpl;44 Node* nodeImpl; 48 45 int offset; 49 46 EAffinity affinity; … … 160 157 WebCoreTextMarker *AccessibilityObjectCache::textMarkerForVisiblePosition (const VisiblePosition &visiblePos) 161 158 { 162 WebCore::Position deepPos = visiblePos.deepEquivalent();163 WebCore::Node* domNode = deepPos.node();159 Position deepPos = visiblePos.deepEquivalent(); 160 Node* domNode = deepPos.node(); 164 161 ASSERT(domNode != NULL); 165 162 if (domNode == NULL) … … 167 164 168 165 // locate the renderer, which must exist for a visible dom node 169 WebCore::RenderObject* renderer = domNode->renderer();166 RenderObject* renderer = domNode->renderer(); 170 167 ASSERT(renderer != NULL); 171 168 … … 214 211 } 215 212 216 void AccessibilityObjectCache::postNotificationToTopWebArea(RenderObject* renderer, const DeprecatedString& msg)213 void AccessibilityObjectCache::postNotificationToTopWebArea(RenderObject* renderer, const String& msg) 217 214 { 218 215 if (renderer) { 219 216 RenderObject * obj = renderer->document()->topDocument()->renderer(); 220 NSAccessibilityPostNotification(accObject(obj), msg .getNSString());221 } 222 } 223 224 void AccessibilityObjectCache::postNotification(RenderObject* renderer, const DeprecatedString& msg)217 NSAccessibilityPostNotification(accObject(obj), msg); 218 } 219 } 220 221 void AccessibilityObjectCache::postNotification(RenderObject* renderer, const String& msg) 225 222 { 226 223 if (renderer) 227 NSAccessibilityPostNotification(accObject(renderer), msg .getNSString());224 NSAccessibilityPostNotification(accObject(renderer), msg); 228 225 } 229 226 -
trunk/WebCore/kwq/ClipboardMac.mm
r13404 r13440 75 75 76 76 // two special cases for IE compatibility 77 if (qType == "Text") {77 if (qType == "Text") 78 78 return NSStringPboardType; 79 } 80 if (qType == "URL") { 79 if (qType == "URL") 81 80 return NSURLPboardType; 82 }83 81 84 82 // Ignore any trailing charset - JS strings are Unicode, which encapsulates the charset issue 85 if (qType == "text/plain" || qType.startsWith("text/plain;")) {83 if (qType == "text/plain" || qType.startsWith("text/plain;")) 86 84 return NSStringPboardType; 87 } 88 if (qType == "text/uri-list") { 85 if (qType == "text/uri-list") 89 86 // special case because UTI doesn't work with Cocoa's URL type 90 87 return NSURLPboardType; // note special case in getData to read NSFilenamesType 91 }92 88 93 89 // Try UTI now … … 97 93 CFStringRef pbType = UTTypeCopyPreferredTagWithClass(UTIType, kUTTagClassNSPboardType); 98 94 CFRelease(UTIType); 99 if (pbType) {95 if (pbType) 100 96 return KWQCFAutorelease(pbType); 101 }102 97 } 103 98 -
trunk/WebCore/kwq/KWQKHTMLSettings.h
r13404 r13440 29 29 #include "PlatformString.h" 30 30 #include "Font.h" 31 #include "KURL.h" 31 32 32 33 class KHTMLSettings … … 60 61 const DeprecatedString& encoding() const { return m_encoding; } 61 62 62 DeprecatedString userStyleSheet() const { return m_userStyleSheetLocation; }63 KURL userStyleSheetLocation() const { return m_userStyleSheetLocation; } 63 64 bool shouldPrintBackgrounds() const { return m_shouldPrintBackgrounds; } 64 65 bool textAreasAreResizable() const { return m_textAreasAreResizable; } … … 84 85 void setEncoding(const DeprecatedString& s) { m_encoding = s; } 85 86 86 void setUserStyleSheet (const DeprecatedString& s) { m_userStyleSheetLocation = s; }87 void setUserStyleSheetLocation(const KURL& s) { m_userStyleSheetLocation = s; } 87 88 void setShouldPrintBackgrounds(bool f) { m_shouldPrintBackgrounds = f; } 88 89 void setTextAreasAreResizable(bool f) { m_textAreasAreResizable = f; } … … 96 97 WebCore::AtomicString m_fantasyFontName; 97 98 DeprecatedString m_encoding; // FIXME: TextEncoding takes a latin1 string, which String & AtomicString don't easily produce 98 DeprecatedString m_userStyleSheetLocation; // FIXME: KURLs still use DeprecatedString99 KURL m_userStyleSheetLocation; 99 100 100 101 int m_minimumFontSize; -
trunk/WebCore/kwq/KWQLineEdit.h
r13393 r13440 24 24 */ 25 25 26 #ifndef QL INEEDIT_H_27 #define QL INEEDIT_H_26 #ifndef QLineEdit_H 27 #define QLineEdit_H 28 28 29 29 #include "PlatformString.h" 30 #include "DeprecatedString.h"31 30 #include "TextDirection.h" 32 31 #include "Widget.h" … … 77 76 78 77 int selectionStart() const; 79 DeprecatedString selectedText() const;78 WebCore::String selectedText() const; 80 79 void setSelection(int, int); 81 80 -
trunk/WebCore/kwq/KWQLineEdit.mm
r13393 r13440 211 211 } 212 212 213 DeprecatedString QLineEdit::selectedText() const213 String QLineEdit::selectedText() const 214 214 { 215 215 BEGIN_BLOCK_OBJC_EXCEPTIONS; 216 216 NSRange range = [m_controller selectedRange]; 217 217 NSString *str = [m_controller string]; 218 return DeprecatedString::fromNSString([str substringWithRange:range]);219 END_BLOCK_OBJC_EXCEPTIONS; 220 return DeprecatedString();218 return [str substringWithRange:range]; 219 END_BLOCK_OBJC_EXCEPTIONS; 220 return String(); 221 221 } 222 222 -
trunk/WebCore/loader/CachedCSSStyleSheet.cpp
r13404 r13440 68 68 CachedObject::ref(c); 69 69 70 if(!m_loading) c->setStyleSheet( m_url, m_sheet ); 70 if (!m_loading) 71 c->setStyleSheet(m_url, m_sheet); 71 72 } 72 73 -
trunk/WebCore/page/Frame.cpp
r13428 r13440 121 121 } 122 122 private: 123 virtual void setStyleSheet(const String& , const String& sheet)123 virtual void setStyleSheet(const String& /*URL*/, const String& sheet) 124 124 { 125 125 m_frame->setUserStyleSheet(sheet.deprecatedString()); … … 346 346 bool Frame::jScriptEnabled() const 347 347 { 348 return d->m_bJScriptEnabled; 349 } 350 351 void Frame::setMetaRefreshEnabled(bool enable) 352 { 353 d->m_metaRefreshEnabled = enable; 354 } 355 356 bool Frame::metaRefreshEnabled() const 357 { 358 return d->m_metaRefreshEnabled; 348 return d->m_bJScriptEnabled; 359 349 } 360 350 … … 417 407 bool Frame::javaEnabled() const 418 408 { 419 #ifndef Q_WS_QWS 420 return d->m_bJavaEnabled; 421 #else 422 return false; 423 #endif 409 return d->m_settings->isJavaEnabled(); 424 410 } 425 411 426 412 bool Frame::pluginsEnabled() const 427 413 { 428 return d->m_bPluginsEnabled;414 return d->m_bPluginsEnabled; 429 415 } 430 416 … … 517 503 // Support for http-refresh 518 504 qData = d->m_job->queryMetaData("http-refresh").deprecatedString(); 519 if (!qData.isEmpty() && d->m_metaRefreshEnabled) {505 if (!qData.isEmpty()) { 520 506 double delay; 521 507 int pos = qData.find(';'); … … 633 619 634 620 setAutoloadImages(d->m_settings->autoLoadImages()); 635 String userStyleSheet = d->m_settings->userStyleSheet();621 const KURL& userStyleSheet = d->m_settings->userStyleSheetLocation(); 636 622 637 623 if (!userStyleSheet.isEmpty()) … … 1038 1024 } 1039 1025 1040 void Frame::setUserStyleSheet(const DeprecatedString& styleSheet)1026 void Frame::setUserStyleSheet(const String& styleSheet) 1041 1027 { 1042 1028 delete d->m_userStyleSheetLoader; … … 1375 1361 1376 1362 bool Frame::requestObject(RenderPart* renderer, const String& url, const AtomicString& frameName, 1377 const String& mimeType, const DeprecatedStringList& paramNames, const DeprecatedStringList& paramValues)1363 const String& mimeType, const Vector<String>& paramNames, const Vector<String>& paramValues) 1378 1364 { 1379 1365 KURL completedURL; … … 1407 1393 1408 1394 bool Frame::loadPlugin(RenderPart *renderer, const KURL& url, const String& mimeType, 1409 const DeprecatedStringList& paramNames, const DeprecatedStringList& paramValues, bool useFallback)1395 const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback) 1410 1396 { 1411 1397 if (useFallback) { … … 1634 1620 DeprecatedString Frame::referrer() const 1635 1621 { 1636 return d->m_referrer;1622 return d->m_referrer; 1637 1623 } 1638 1624 1639 1625 String Frame::lastModified() const 1640 1626 { 1641 return d->m_lastModified;1627 return d->m_lastModified; 1642 1628 } 1643 1629 1644 1630 void Frame::reparseConfiguration() 1645 1631 { 1646 setAutoloadImages(d->m_settings->autoLoadImages()); 1647 if (d->m_doc) 1648 d->m_doc->docLoader()->setShowAnimations(KHTMLSettings::KAnimationEnabled); 1649 1650 d->m_bJScriptEnabled = d->m_settings->isJavaScriptEnabled(); 1651 d->m_bJavaEnabled = d->m_settings->isJavaEnabled(); 1652 d->m_bPluginsEnabled = d->m_settings->isPluginsEnabled(); 1653 1654 DeprecatedString userStyleSheet = d->m_settings->userStyleSheet(); 1655 if (!userStyleSheet.isEmpty()) 1656 setUserStyleSheetLocation(KURL(userStyleSheet)); 1657 else 1658 setUserStyleSheet(DeprecatedString()); 1659 1660 if (d->m_doc) d->m_doc->updateStyleSelector(); 1632 setAutoloadImages(d->m_settings->autoLoadImages()); 1633 if (d->m_doc) 1634 d->m_doc->docLoader()->setShowAnimations(KHTMLSettings::KAnimationEnabled); 1635 1636 d->m_bJScriptEnabled = d->m_settings->isJavaScriptEnabled(); 1637 d->m_bJavaEnabled = d->m_settings->isJavaEnabled(); 1638 d->m_bPluginsEnabled = d->m_settings->isPluginsEnabled(); 1639 1640 const KURL& userStyleSheetLocation = d->m_settings->userStyleSheetLocation(); 1641 if (!userStyleSheetLocation.isEmpty()) 1642 setUserStyleSheetLocation(userStyleSheetLocation); 1643 else 1644 setUserStyleSheet(String()); 1661 1645 } 1662 1646 … … 1797 1781 Position start = sel.start(); 1798 1782 short before = Range::compareBoundaryPoints(pos.node(), pos.offset(), start.node(), start.offset()); 1799 if (before <= 0) {1783 if (before <= 0) 1800 1784 sel.setBaseAndExtent(pos.node(), pos.offset(), sel.end().node(), sel.end().offset()); 1801 } else {1785 else 1802 1786 sel.setBaseAndExtent(start.node(), start.offset(), pos.node(), pos.offset()); 1803 } 1804 1805 if (d->m_selectionGranularity != CharacterGranularity) { 1787 1788 if (d->m_selectionGranularity != CharacterGranularity) 1806 1789 sel.expandUsingGranularity(d->m_selectionGranularity); 1807 }1808 1790 d->m_beganSelectingText = true; 1809 1791 } else { … … 1975 1957 { 1976 1958 SelectionController sel(cmd.endingSelection()); 1977 if (shouldChangeSelection(sel)) {1959 if (shouldChangeSelection(sel)) 1978 1960 setSelection(sel, false); 1979 }1980 1961 1981 1962 dispatchEditableContentChangedEvent(!selection().isNone() ? selection().start().node()->rootEditableElement() : 0); … … 2008 1989 { 2009 1990 SelectionController sel(cmd.startingSelection()); 2010 if (shouldChangeSelection(sel)) {1991 if (shouldChangeSelection(sel)) 2011 1992 setSelection(sel, true); 2012 }2013 1993 2014 1994 dispatchEditableContentChangedEvent(!selection().isNone() ? selection().start().node()->rootEditableElement() : 0); … … 2022 2002 { 2023 2003 SelectionController sel(cmd.endingSelection()); 2024 if (shouldChangeSelection(sel)) {2004 if (shouldChangeSelection(sel)) 2025 2005 setSelection(sel, true); 2026 }2027 2006 2028 2007 dispatchEditableContentChangedEvent(!selection().isNone() ? selection().start().node()->rootEditableElement() : 0); -
trunk/WebCore/page/Frame.h
r13428 r13440 42 42 #include <DeprecatedStringList.h> 43 43 #include <kxmlcore/Noncopyable.h> 44 #include <kxmlcore/Vector.h> 44 45 45 46 class KHTMLSettings; … … 139 140 */ 140 141 bool pluginsEnabled() const; 141 142 /**143 * Enable/disable the automatic forwarding by <meta http-equiv="refresh" ....>144 */145 void setMetaRefreshEnabled(bool enable);146 147 /**148 * Returns @p true if automtaic forwarding is enabled.149 */150 bool metaRefreshEnabled() const;151 142 152 143 /** … … 270 261 271 262 /** 272 * Sets a user defined style sheet to be used on top of the HTML 4 273 * default style sheet. 274 * 275 * This gives a wide range of possibilities to 276 * change the layout of the page. 263 * Sets a user defined style sheet to be used on top of the HTML4, 264 * SVG and printing default style sheets. 277 265 */ 278 266 void setUserStyleSheetLocation(const KURL& url); 279 280 /** 281 * Sets a user defined style sheet to be used on top of the HTML 4 282 * default style sheet. 283 * 284 * This gives a wide range of possibilities to 285 * change the layout of the page. 286 */ 287 void setUserStyleSheet(const DeprecatedString& styleSheet); 288 267 void setUserStyleSheet(const String& styleSheetData); 268 289 269 /** 290 270 * Sets the standard font style. … … 597 577 virtual String overrideMediaType() const = 0; 598 578 protected: 599 virtual Plugin* createPlugin(const KURL& url, const DeprecatedStringList& paramNames, const DeprecatedStringList& paramValues, const String& mimeType) = 0;579 virtual Plugin* createPlugin(const KURL& url, const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType) = 0; 600 580 virtual Frame* createFrame(const KURL& url, const String& name, RenderPart* renderer, const String& referrer) = 0; 601 581 virtual ObjectContentType objectContentType(const KURL& url, const String& mimeType) = 0; … … 643 623 bool shouldUsePlugin(Node* element, const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback); 644 624 bool loadPlugin(RenderPart* renderer, const KURL& url, const String& mimeType, 645 const DeprecatedStringList& paramNames, const DeprecatedStringList& paramValues, bool useFallback);625 const Vector<String>& paramNames, const Vector<String>& paramValues, bool useFallback); 646 626 Frame* loadSubframe(RenderPart* renderer, const KURL& url, const String& name, const String& referrer); 647 627 … … 652 632 653 633 bool requestObject(RenderPart* frame, const String& url, const AtomicString& frameName, 654 const String& serviceType, const DeprecatedStringList& paramNames, const DeprecatedStringList& paramValues);634 const String& serviceType, const Vector<String>& paramNames, const Vector<String>& paramValues); 655 635 bool requestFrame(RenderPart* frame, const String& url, const AtomicString& frameName); 656 636 -
trunk/WebCore/page/FramePrivate.h
r13404 r13440 63 63 , m_bJavaEnabled(true) 64 64 , m_bPluginsEnabled(true) 65 , m_metaRefreshEnabled(true)66 65 , m_settings(0) 67 66 , m_job(0) … … 129 128 bool m_bJavaEnabled : 1; 130 129 bool m_bPluginsEnabled : 1; 131 bool m_metaRefreshEnabled : 1;132 130 133 131 KHTMLSettings* m_settings; -
trunk/WebCore/platform/AtomicString.h
r13405 r13440 34 34 35 35 AtomicString() { } 36 AtomicString(QChar c) : m_string(add(&c, 1)) { } 36 37 AtomicString(const char* s) : m_string(add(s)) { } 37 38 AtomicString(const QChar* s, int length) : m_string(add(s, length)) { } -
trunk/WebCore/platform/DeprecatedString.cpp
r13405 r13440 2177 2177 } 2178 2178 2179 DeprecatedString &DeprecatedString::replace( unsigned index, unsigned len, const DeprecatedString &str)2179 DeprecatedString &DeprecatedString::replace(unsigned index, unsigned len, const DeprecatedString& str) 2180 2180 { 2181 2181 return remove(index, len).insert(index, str); … … 2193 2193 } 2194 2194 2195 2196 2195 DeprecatedString &DeprecatedString::replace(QChar pattern, const DeprecatedString &str) 2197 2196 { … … 2204 2203 return *this; 2205 2204 } 2206 2207 2205 2208 2206 DeprecatedString &DeprecatedString::replace(const DeprecatedString &pattern, const DeprecatedString &str) -
trunk/WebCore/platform/GraphicsContext.h
r13429 r13440 160 160 static CGContextRef currentCGContext(); 161 161 static int getCompositeOperation(CGContextRef); 162 static void setCompositeOperation(CGContextRef, const DeprecatedString& operation);162 static void setCompositeOperation(CGContextRef, const String& operation); 163 163 static void setCompositeOperation(CGContextRef, int operation); 164 164 #endif -
trunk/WebCore/platform/Image.h
r13404 r13440 32 32 #include "IntSize.h" 33 33 34 class DeprecatedString;35 36 34 #if __APPLE__ 37 35 #include <ApplicationServices/ApplicationServices.h> -
trunk/WebCore/platform/KURL.cpp
r13404 r13440 260 260 } 261 261 262 KURL::KURL(const String& stringURL)263 {264 DeprecatedString url = stringURL.deprecatedString();265 if (!url.isEmpty() && url[0] == '/') {266 // 5 for "file:", 1 for terminator267 Vector<char, 2048> buffer(url.length() + 6);268 buffer[0] = 'f';269 buffer[1] = 'i';270 buffer[2] = 'l';271 buffer[3] = 'e';272 buffer[4] = ':';273 url.copyLatin1(&buffer[5]);274 parse(buffer, 0);275 } else276 parse(url.ascii(), &url);277 }278 279 262 KURL::KURL(const KURL &base, const DeprecatedString &relative, const WebCore::TextEncoding& encoding) 280 263 { -
trunk/WebCore/platform/KURL.h
r13404 r13440 50 50 KURL(const KURL&, const DeprecatedString&, const WebCore::TextEncoding& encoding = WebCore::TextEncoding(WebCore::UTF8Encoding)); 51 51 KURL(const DeprecatedString&); 52 KURL(const WebCore::String&);53 52 #if __APPLE__ 54 53 KURL(NSURL*); -
trunk/WebCore/platform/PlatformString.h
r13405 r13440 44 44 public: 45 45 String() { } // gives null string, distinguishable from an empty string 46 String(QChar c) : m_impl(new StringImpl(&c, 1)) { } 46 47 String(const QChar*, unsigned length); 47 48 String(const DeprecatedString&); … … 77 78 78 79 String& replace(QChar a, QChar b) { if (m_impl) m_impl = m_impl->replace(a, b); return *this; } 80 String& replace(QChar a, const String& b) { if (m_impl) m_impl = m_impl->replace(a, b.impl()); return *this; } 79 81 80 82 unsigned length() const; … … 127 129 128 130 String operator+(const String&, const String&); 131 String operator+(const String&, const char*); 132 String operator+(const char*, const String&); 133 String operator+(const String&, QChar); 134 String operator+(QChar, const String&); 135 String operator+(const String&, char); 136 String operator+(char, const String&); 129 137 130 138 inline bool operator==(const String& a, const String& b) { return equal(a.impl(), b.impl()); } -
trunk/WebCore/platform/String.cpp
r13405 r13440 89 89 } 90 90 91 String operator+(const String& s, const char* cs) 92 { 93 return s + String(cs); 94 } 95 96 String operator+(const char* cs, const String& s) 97 { 98 return String(cs) + s; 99 } 100 101 String operator+(const String& s, QChar c) 102 { 103 return s + String(c); 104 } 105 106 String operator+(QChar c, const String& s) 107 { 108 return String(c) + s; 109 } 110 111 String operator+(const String& s, char c) 112 { 113 return s + String(c); 114 } 115 116 String operator+(char c, const String& s) 117 { 118 return String(c) + s; 119 } 120 91 121 void String::insert(const String& str, unsigned pos) 92 122 { -
trunk/WebCore/platform/StringImpl.cpp
r13405 r13440 165 165 { 166 166 assert(!_inTable); 167 if(len <= 0) return; 168 if(pos >= l ) return; 169 if((unsigned)len > l - pos) 170 len = l - pos; 167 if (len <= 0) 168 return; 169 if (pos >= l ) 170 return; 171 if ((unsigned)len > l - pos) 172 len = l - pos; 171 173 172 174 unsigned newLen = l-len; … … 249 251 250 252 if (ok) { 251 if (i == l) {253 if (i == l) 252 254 return Length(r, Fixed); 253 }else {255 else { 254 256 const QChar* next = s+i; 255 257 … … 639 641 } 640 642 643 StringImpl* StringImpl::replace(unsigned index, unsigned len, const StringImpl* str) 644 { 645 StringImpl* s = copy(); 646 s->remove(index, len); 647 s->insert(str, index); 648 return s; 649 } 650 651 StringImpl* StringImpl::replace(QChar pattern, const StringImpl* str) 652 { 653 int slen = str ? str->length() : 0; 654 int index = 0; 655 StringImpl* result = this; 656 while ((index = result->find(pattern, index)) >= 0) { 657 result = result->replace(index, 1, str); 658 index += slen; 659 } 660 return result; 661 } 662 641 663 bool equal(const StringImpl* a, const StringImpl* b) 642 664 { -
trunk/WebCore/platform/StringImpl.h
r13405 r13440 73 73 void truncate(int len); 74 74 void remove(unsigned pos, int len = 1); 75 75 76 StringImpl* split(unsigned pos); 76 77 StringImpl* copy() const { return new StringImpl(s, l); } … … 102 103 bool endsWith(const StringImpl*, bool caseSensitive = true) const; 103 104 104 // This modifies the string in place if there is only one ref, makes a new string otherwise.105 // Does not modify the string. 105 106 StringImpl* replace(QChar, QChar); 107 StringImpl* replace(QChar a, const StringImpl* b); 108 StringImpl* replace(unsigned index, unsigned len, const StringImpl*); 106 109 107 110 static StringImpl* empty(); -
trunk/WebCore/platform/mac/GraphicsContextMac.mm
r13396 r13440 357 357 } 358 358 359 void GraphicsContext::setCompositeOperation (CGContextRef context, const DeprecatedString& op)360 { 361 [[WebCoreImageRendererFactory sharedFactory] setCGCompositeOperationFromString:op .getNSString()inContext:context];359 void GraphicsContext::setCompositeOperation (CGContextRef context, const String& op) 360 { 361 [[WebCoreImageRendererFactory sharedFactory] setCGCompositeOperationFromString:op inContext:context]; 362 362 } 363 363 -
trunk/WebCore/rendering/RenderHTMLCanvas.cpp
r13397 r13440 148 148 bool drawSelectionTint = (selectionState() != SelectionNone) && !isPrinting; 149 149 if (i.phase == PaintActionSelection) { 150 if (selectionState() == SelectionNone) {150 if (selectionState() == SelectionNone) 151 151 return; 152 }153 152 drawSelectionTint = false; 154 153 } -
trunk/WebCore/rendering/render_form.cpp
r13393 r13440 690 690 } 691 691 else if (listItems[listIndex]->hasTagName(hrTag)) { 692 if (!m_useListBox) {692 if (!m_useListBox) 693 693 static_cast<QComboBox*>(m_widget)->appendSeparator(); 694 }695 694 } 696 695 else -
trunk/WebCore/rendering/render_frames.cpp
r13397 r13440 678 678 } 679 679 680 static bool isURLAllowed(WebCore::Document *doc, const DeprecatedString &url)681 { 682 KURL newURL(doc->completeURL(url ));680 static bool isURLAllowed(WebCore::Document *doc, const String &url) 681 { 682 KURL newURL(doc->completeURL(url.deprecatedString())); 683 683 newURL.setRef(DeprecatedString::null); 684 684 … … 701 701 } 702 702 703 static inline void mapClassIdToServiceType(const DeprecatedString &classId, DeprecatedString &serviceType)703 static inline void mapClassIdToServiceType(const String& classId, String& serviceType) 704 704 { 705 705 // It is ActiveX, but the nsplugin system handling … … 727 727 void RenderPartObject::updateWidget() 728 728 { 729 DeprecatedString url;730 DeprecatedString serviceType;731 DeprecatedStringListparamNames;732 DeprecatedStringListparamValues;729 String url; 730 String serviceType; 731 Vector<String> paramNames; 732 Vector<String> paramValues; 733 733 Frame *frame = m_view->frame(); 734 734 … … 747 747 embed = static_cast<HTMLEmbedElement *>( child ); 748 748 break; 749 } else if (child->hasTagName(objectTag)) {749 } else if (child->hasTagName(objectTag)) 750 750 child = child->nextSibling(); // Don't descend into nested OBJECT tags 751 } else {751 else 752 752 child = child->traverseNextNode(o); // Otherwise descend (EMBEDs may be inside COMMENT tags) 753 }754 753 } 755 754 … … 759 758 embedOrObject = (HTMLElement *)embed; 760 759 String attribute = embedOrObject->getAttribute(widthAttr); 761 if (!attribute.isEmpty()) {760 if (!attribute.isEmpty()) 762 761 o->setAttribute(widthAttr, attribute); 763 }764 762 attribute = embedOrObject->getAttribute(heightAttr); 765 if (!attribute.isEmpty()) {763 if (!attribute.isEmpty()) 766 764 o->setAttribute(heightAttr, attribute); 767 }768 765 url = embed->url; 769 766 serviceType = embed->serviceType; 770 } else {767 } else 771 768 embedOrObject = (HTMLElement *)o; 772 }773 769 774 770 // If there was no URL or type defined in EMBED, try the OBJECT tag. 775 if (url.isEmpty()) {771 if (url.isEmpty()) 776 772 url = o->url; 777 } 778 if (serviceType.isEmpty()) { 773 if (serviceType.isEmpty()) 779 774 serviceType = o->serviceType; 780 }781 775 782 776 HashSet<StringImpl*, CaseInsensitiveHash> uniqueParamNames; … … 791 785 String name = p->name().lower(); 792 786 if (url.isEmpty() && (name == "src" || name == "movie" || name == "code" || name == "url")) 793 url = p->value() .deprecatedString();787 url = p->value(); 794 788 if (serviceType.isEmpty() && name == "type") { 795 serviceType = p->value() .deprecatedString();796 int pos = serviceType.find( ";");797 if (pos != -1) {789 serviceType = p->value(); 790 int pos = serviceType.find(";"); 791 if (pos != -1) 798 792 serviceType = serviceType.left(pos); 799 }800 793 } 801 794 if (!embed && !name.isEmpty()) { 802 795 uniqueParamNames.add(p->name().impl()); 803 paramNames.append(p->name() .deprecatedString());804 paramValues.append(p->value() .deprecatedString());796 paramNames.append(p->name()); 797 paramValues.append(p->value()); 805 798 } 806 799 } … … 826 819 const AtomicString& name = it->name().localName(); 827 820 if (embed || !uniqueParamNames.contains(name.impl())) { 828 paramNames.append(name.d eprecatedString());829 paramValues.append(it->value().d eprecatedString());821 paramNames.append(name.domString()); 822 paramValues.append(it->value().domString()); 830 823 } 831 824 } … … 834 827 // If we still don't have a type, try to map from a specific CLASSID to a type. 835 828 if (serviceType.isEmpty() && !o->classId.isEmpty()) 836 mapClassIdToServiceType(o->classId .deprecatedString(), serviceType);829 mapClassIdToServiceType(o->classId, serviceType); 837 830 838 831 // If no URL and type, abort. … … 849 842 m_hasFallbackContent = true; 850 843 } 851 bool success = frame->requestObject(this, url, o->name().deprecatedString(), serviceType, paramNames, paramValues);844 bool success = frame->requestObject(this, url, AtomicString(o->name()), serviceType, paramNames, paramValues); 852 845 if (!success && m_hasFallbackContent) 853 846 o->renderFallbackContent(); … … 867 860 for (unsigned i = 0; i < a->length(); ++i) { 868 861 Attribute* it = a->attributeItem(i); 869 paramNames.append(it->name().localName().d eprecatedString());870 paramValues.append(it->value().d eprecatedString());862 paramNames.append(it->name().localName().domString()); 863 paramValues.append(it->value().domString()); 871 864 } 872 865 } 873 frame->requestObject(this, url, o->getAttribute(nameAttr) .deprecatedString(), serviceType, paramNames, paramValues);866 frame->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues); 874 867 } else { 875 868 assert(element()->hasTagName(iframeTag)); 876 869 HTMLIFrameElement *o = static_cast<HTMLIFrameElement *>(element()); 877 url = o->m_URL .deprecatedString();870 url = o->m_URL; 878 871 if (!isURLAllowed(document(), url)) 879 872 return; … … 881 874 url = "about:blank"; 882 875 FrameView *v = static_cast<FrameView *>(m_view); 883 v->frame()->requestFrame(this, url, o->m_name .deprecatedString());876 v->frame()->requestFrame(this, url, o->m_name); 884 877 } 885 878 } -
trunk/WebCore/rendering/render_style.h
r13393 r13440 1351 1351 region.offset.left = l; 1352 1352 region.type = type; 1353 if (!append) { 1354 css3NonInheritedData.access()->m_dashboardRegions.clear (); 1355 } 1356 css3NonInheritedData.access()->m_dashboardRegions.append (region); 1353 if (!append) 1354 css3NonInheritedData.access()->m_dashboardRegions.clear(); 1355 css3NonInheritedData.access()->m_dashboardRegions.append(region); 1357 1356 } 1358 1357 -
trunk/WebCore/xml/xmlhttprequest.cpp
r13404 r13440 104 104 pos = contentTypeString.find("charset", pos, false); 105 105 if (pos <= 0) 106 return DeprecatedString();106 return String(); 107 107 108 108 // is what we found a beginning of a word? … … 293 293 294 294 if (!body.isNull() && m_method.lower() != "get" && m_method.lower() != "head" && (m_url.protocol().lower() == "http" || m_url.protocol().lower() == "https")) { 295 DeprecatedString contentType = getRequestHeader("Content-Type");295 String contentType = getRequestHeader("Content-Type"); 296 296 String charset; 297 297 if (contentType.isEmpty()) … … 369 369 void XMLHttpRequest::overrideMIMEType(const String& override) 370 370 { 371 m_mimeTypeOverride = override .deprecatedString();371 m_mimeTypeOverride = override; 372 372 } 373 373
Note:
See TracChangeset
for help on using the changeset viewer.