1 2008-02-16 Oliver Hunt <oliver@apple.com>
5 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
7 Use cross-platform code to determine the dirty rects for
8 fill and stroke operations
10 * html/CanvasRenderingContext2D.cpp:
11 (WebCore::CanvasRenderingContext2D::fill):
12 (WebCore::CanvasRenderingContext2D::stroke):
13 Added a FIXME as code inspection shows a trivial under-painting
14 bug, although we currently ignore dirty rect tracking on canvas
15 and repaint the whole thing anyway.
16 (WebCore::CanvasRenderingContext2D::fillRect):
18 2008-02-16 Sam Weinig <sam@webkit.org>
20 Reviewed by Darin Adler.
22 Take another step in the direction of getting rid of DeprecatedString
23 by moving all the to{NumericType} off of it.
25 - Create free functions that take a UChar* buffer and length to do
26 the string-to-number conversions. This allows us to avoid two allocations
27 if we don't already have a String and is consistent with the design we would
29 - Since the toInt (and family) functions on DeprecatedString were slightly
30 different than the ones on String (they didn't allow trailing garbage),
31 an extra set of 'Strict' toInt functions were added that have this behavior.
33 * platform/graphics/Color.cpp:
34 (WebCore::Color::parseHexColor):
35 * platform/text/PlatformString.h:
36 * platform/text/String.cpp:
37 (WebCore::String::percentage):
38 (WebCore::String::toIntStrict):
39 (WebCore::String::toUIntStrict):
40 (WebCore::String::toInt64Strict):
41 (WebCore::String::toUInt64Strict):
42 (WebCore::String::toUInt):
43 (WebCore::String::toDouble):
44 (WebCore::isCharacterAllowedInBase):
45 (WebCore::toIntegralType):
46 (WebCore::lengthOfCharactersAsInteger):
47 (WebCore::charactersToIntStrict):
48 (WebCore::charactersToUIntStrict):
49 (WebCore::charactersToInt64Strict):
50 (WebCore::charactersToUInt64Strict):
51 (WebCore::charactersToInt):
52 (WebCore::charactersToUInt):
53 (WebCore::charactersToInt64):
54 (WebCore::charactersToUInt64):
55 (WebCore::charactersToDouble):
56 (WebCore::charactersToFloat):
57 * platform/text/StringImpl.cpp:
58 (WebCore::parseLength):
59 (WebCore::StringImpl::toIntStrict):
60 (WebCore::StringImpl::toUIntStrict):
61 (WebCore::StringImpl::toInt64Strict):
62 (WebCore::StringImpl::toUInt64Strict):
63 (WebCore::StringImpl::toInt):
64 (WebCore::StringImpl::toUInt):
65 (WebCore::StringImpl::toInt64):
66 (WebCore::StringImpl::toUInt64):
67 (WebCore::StringImpl::toDouble):
68 (WebCore::StringImpl::toFloat):
69 * platform/text/StringImpl.h:
70 * svg/SVGAnimationElement.cpp:
71 (WebCore::SVGAnimationElement::parseClockValue):
72 * svg/SVGFETurbulenceElement.cpp:
73 (WebCore::SVGFETurbulenceElement::parseMappedAttribute):
75 2008-02-16 Dan Bernstein <mitz@apple.com>
77 Reviewed by Sam Weinig.
79 - fix fixed-pitch font measurement of control characters that render
82 Test: fast/text/fixed-pitch-control-characters.html
84 * rendering/RenderText.cpp:
85 (WebCore::RenderText::widthFromCache):
87 2008-02-16 Kevin Ollivier <kevino@theolliviers.com>
91 * platform/graphics/wx/GraphicsContextWx.cpp:
92 (WebCore::GraphicsContext::drawImage):
94 2008-02-16 Jan Michael Alonzo <jmalonzo@unpluggable.com>
96 Reviewed by Alp Toker.
98 Cross document messaging GTK+/autotools build fix.
102 2008-02-15 Oliver Hunt <oliver@apple.com>
104 Build fix for Qt and Cairo builds
106 * platform/graphics/cairo/GraphicsContextCairo.cpp:
107 (WebCore::GraphicsContext::drawImage):
108 * platform/graphics/qt/GraphicsContextQt.cpp:
110 2008-02-15 Oliver Hunt <oliver@apple.com>
114 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
115 Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
117 Add logic draw(ImageBuffer*) method to GraphicsContext to handle
118 painting the source canvas content.
120 * html/CanvasRenderingContext2D.cpp:
121 (WebCore::CanvasRenderingContext2D::drawImage):
122 * html/HTMLCanvasElement.cpp:
123 (WebCore::HTMLCanvasElement::buffer):
124 * html/HTMLCanvasElement.h:
125 * platform/graphics/GraphicsContext.h:
126 * platform/graphics/cairo/GraphicsContextCairo.cpp:
127 (WebCore::GraphicsContext::drawImage):
128 * platform/graphics/cg/GraphicsContextCG.cpp:
129 (WebCore::GraphicsContext::paintBuffer):
130 (WebCore::GraphicsContext::drawImage):
131 * platform/graphics/qt/GraphicsContextQt.cpp:
132 (WebCore::GraphicsContext::drawImage):
134 2008-02-15 Kevin Ollivier <kevino@theolliviers.com>
136 Reviewed by David Hyatt.
138 Using GetNativeFontInfoDesc() to generate the hash value was
139 leading to duplicate entries in the HashMap. Use the font object's
142 http://bugs.webkit.org/show_bug.cgi?id=17371
144 * platform/graphics/wx/FontPlatformData.h:
145 (WebCore::FontPlatformData::computeHash):
147 2008-02-15 Ada Chan <adachan@apple.com>
149 When parsing url we get from a CFURLRef, we need to null terminate
150 the string for the case when url ends with a '/'.
154 * platform/cf/KURLCFNet.cpp:
155 (WebCore::KURL::KURL):
157 2008-02-15 Brady Eidson <beidson@apple.com>
161 Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
162 a page has closed or loaded a new document
164 Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
165 a policy of shutting down the databases in a document at the same time. This includes removing all pending transactions
166 in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
169 No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
170 (crashing, unexpected exceptions and output, etc)
173 (WebCore::Document::~Document): Don't actually stop the database thread here - it better have been stopped already.
174 Add an assertion to that effect.
175 (WebCore::Document::addOpenDatabase): Add a new database handle to this Document's open database set
176 (WebCore::Document::removeOpenDatabase): Remove such a handle
177 (WebCore::Document:: stopDatabases): Call "close" on all open Database handles for this document
180 * loader/FrameLoader.cpp:
181 (WebCore::FrameLoader::stopLoading): In addition to canceling all resource loads and XHRs, stop all database I/O
183 * platform/MessageQueue.h:
184 (WebCore::MessageQueue::killed):
186 * platform/sql/SQLiteTransaction.cpp:
187 (WebCore::SQLiteTransaction::stop): Added. Explicit stop to cut off a transaction so it won't try anymore SQL activity
188 * platform/sql/SQLiteTransaction.h:
190 * storage/Database.cpp:
191 (WebCore::Database::Database):
192 (WebCore::Database::~Database):
193 (WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
195 (WebCore::Database::stop): Stop this database, including all queued transactions and callbacks
196 * storage/Database.h:
197 (WebCore::Database::stopped):
199 * storage/DatabaseThread.cpp:
200 (WebCore::DatabaseThread::terminationRequested):
201 * storage/DatabaseThread.h:
203 * storage/SQLTransaction.cpp:
204 (WebCore::SQLTransaction::executeSQL): Throw an exception if a new executeSQL comes in after a database is closed
205 (WebCore::SQLTransaction::checkAndHandleClosedDatabase): Added. Clears queued statements and clear the next step
206 when the database has been closed since the last step/callback was run. Also stops the current SQLite transaction,
208 (WebCore::SQLTransaction::performNextStep):
209 (WebCore::SQLTransaction::performPendingCallback):
210 * storage/SQLTransaction.h:
212 2008-02-15 Adele Peterson <adele@apple.com>
216 Fix for <rdar://problem/5745072> REGRESSION (r29348): Shift + Tab does not change indent level on Google Docs
218 The immediate cause of this bug was that we stopped sending keypress events for the tab key when it is used to advance focus.
219 We had a special case for forward-tab in designMode, where the default behavior was to insert a tab key (or respect the keypress handler behavior).
220 This change makes the shift-tab behavior match the forward-tab behavior.
222 If the site had put their event handler (which does the indenting) on the keydown event, then this problem would have been avoided.
223 This is something we should look into and maybe advise the site on in the future. However, it's a low-risk change to just make tab and shift-tab uniform
224 in this respect, so I think this is the way to go for right now.
226 * page/EventHandler.cpp: (WebCore::EventHandler::defaultTabEventHandler):
228 2008-02-15 Anders Carlsson <andersca@apple.com>
232 <rdar://problem/5738678>
233 REGRESSION: "Loading" status remains when uploading file to .Mac iDisk via Safari
235 Use the new CFNetwork functions for setting body parts.
237 * platform/network/cf/FormDataStreamCFNet.cpp:
238 (WebCore::setHTTPBody):
239 (WebCore::httpBodyFromRequest):
241 2008-02-15 Geoffrey Garen <ggaren@apple.com>
243 Reviewed by Anders Carlsson.
245 Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
246 surveys no longer work due to XMLHttpRequest exceptions
248 Reverted some exception throwing code from r12194.
250 To comply with the W3C draft spec, we used to throw an exception when
251 trying to access responseText and responseXML at the wrong time, but
252 that turned out to be a compatibility problem.
254 Now, matching Firefox and previous versions of WebKit, we never throw
255 an exception when accessing responseText or responseXML.
257 See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
259 * xml/XMLHttpRequest.cpp:
260 (WebCore::XMLHttpRequest::getResponseText):
261 (WebCore::XMLHttpRequest::getResponseXML):
263 2008-02-15 Justin Garcia <justin.garcia@apple.com>
265 Reviewed by Dan Bernstein.
267 <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
269 Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
271 * editing/SelectionController.cpp:
272 (WebCore::SelectionController::nodeWillBeRemoved):
274 2008-02-15 Alice Liu <alice.liu@apple.com>
278 Fixed <rdar://problem/5741440> REGRESSION (r28496): After deactivating JavaScript, scripts embedded in the HTML page continue to run
280 Before this patch, Frame::scriptProxy() would only return null in the case that javascript was
281 disabled and if the script proxy field wasn't set (which would only be the case if the window
282 hasn't loaded anything yet). Not all callers of scriptProxy() always check for a non-null return
283 value. Those that did check would effectively be checking if javascript was enabled before proceeding.
284 This fix consists of 2 elements: first, make sure that scriptProxy() will never return null, regardless
285 of whether javascript is disabled. This will mean that callers who don't check for null won't crash.
286 Second, callers who did check for null now instead check for javascript being disabled. This means that
287 code paths intended for preventing javascript from being run will be making the correct check. Another
288 minor addition to this patch is that I added a function on KSJProxy to be a shortcut for checking if javascript
291 * bindings/js/JSCustomSQLStatementCallback.cpp:
292 (WebCore::JSCustomSQLStatementCallback::handleEvent):
293 * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
294 (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
295 * bindings/js/JSCustomSQLTransactionCallback.cpp:
296 (WebCore::JSCustomSQLTransactionCallback::handleEvent):
297 * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
298 (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
299 * bindings/js/JSCustomVoidCallback.cpp:
300 (WebCore::JSCustomVoidCallback::handleEvent):
301 * bindings/js/JSCustomXPathNSResolver.cpp:
302 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
303 * bindings/js/ScheduledAction.cpp:
304 (WebCore::ScheduledAction::execute):
305 * bindings/js/kjs_events.cpp:
306 (WebCore::JSAbstractEventListener::handleEvent):
307 (WebCore::JSLazyEventListener::parseCode):
308 * bindings/js/kjs_html.cpp:
309 (WebCore::runtimeObjectImplementsCall):
310 * bindings/js/kjs_proxy.cpp:
311 (WebCore::KJSProxy::isEnabled):
312 * bindings/js/kjs_proxy.h:
313 * bindings/js/kjs_window.cpp:
314 (KJS::Window::retrieveWindow):
315 (KJS::Window::retrieve):
317 (WebCore::Document::createHTMLEventListener):
318 * dom/EventTarget.cpp:
319 (WebCore::EventTarget::dispatchGenericEvent):
320 * html/HTMLPlugInElement.cpp:
321 (WebCore::HTMLPlugInElement::createNPObject):
322 * html/HTMLScriptElement.cpp:
323 (WebCore::HTMLScriptElement::evaluateScript):
324 * html/HTMLTokenizer.cpp:
325 (WebCore::HTMLTokenizer::parseTag):
326 (WebCore::HTMLTokenizer::processToken):
327 * loader/FrameLoader.cpp:
328 (WebCore::FrameLoader::executeScript):
329 (WebCore::FrameLoader::userGestureHint):
330 (WebCore::FrameLoader::open):
331 (WebCore::FrameLoader::dispatchWindowObjectAvailable):
332 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
333 * manual-tests/disable-javascript-reload.html: Added.
335 (WebCore::Frame::scriptProxy):
336 (WebCore::Frame::bindingRootObject):
337 (WebCore::Frame::windowScriptNPObject):
339 * page/InspectorController.cpp:
340 (WebCore::canPassNodeToJavaScript):
341 * page/mac/FrameMac.mm:
342 (WebCore::Frame::windowScriptObject):
343 * svg/SVGDocumentExtensions.cpp:
344 (WebCore::SVGDocumentExtensions::createSVGEventListener):
346 2008-02-15 Dan Bernstein <mitz@apple.com>
348 Reviewed by Alexey Proskuryakov.
350 - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
351 <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
353 Test: http/tests/loading/text-content-type-with-binary-extension.html
355 Refined the workaround for <rdar://problem/5321972> to exclude files
356 with extensions that are known to be associated with binary MIME types.
358 * WebCore.xcodeproj/project.pbxproj: Added WebCoreURLResponse.{h,mm}.
359 * platform/network/mac/ResourceResponseMac.mm:
360 (WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
361 workaround logic into WebCoreURLResponse.
362 * platform/network/mac/WebCoreURLResponse.h: Added.
363 * platform/network/mac/WebCoreURLResponse.mm: Added.
364 (createBinaryExtensionsSet): Returns a set of extensions known to
365 belong to MIME types of binary data.
366 (-[NSURLResponse _webcore_MIMEType]):
367 (-[NSHTTPURLResponse _webcore_MIMEType]): Forces the MIME type from
368 application/octet-stream to text/plain if that is the specified
369 Content-Type, unless the extension is in the binary extensions set.
371 2008-02-15 Dan Bernstein <mitz@apple.com>
373 Reviewed by Dave Hyatt.
375 - fix http://bugs.webkit.org/show_bug.cgi?id=17306
376 <rdar://problem/5737923> Transitions between styles that have different transition-* properties behave inconsistently
378 * manual-tests/transitions.html: Added.
379 * page/AnimationController.cpp:
380 (WebCore::CompositeImplicitAnimation::animate): Changed to use the
381 transition properties of the current style rather than the target style.
382 (WebCore::AnimationControllerPrivate::get): Changed to not create an
383 animation if the style does not have transitions.
384 (WebCore::AnimationController::updateImplicitAnimations): Added code to
385 return the target style if the current style is not animating.
386 * rendering/RenderObject.cpp:
387 (WebCore::RenderObject::setAnimatableStyle): Changed to call
388 updateImplicitAnimations() even if the current style does not have
389 transitions, because we may be animating out of a style that had them.
391 2008-02-15 Alexey Proskuryakov <ap@webkit.org>
393 Rubber-stamped by Darin.
395 Remove an obsolete WebCore readme file.
399 2008-02-15 Sam Weinig <sam@webkit.org>
401 Reviewed by Darin Adler.
403 Remove more uses of DeprecatedString in preparation of getting rid of it.
405 * bridge/mac/WebCoreScriptDebugger.mm:
406 * css/CSSCursorImageValue.cpp:
407 (WebCore::isSVGCursorIdentifier):
408 (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
409 * css/CSSStyleSelector.h:
411 (WebCore::Element::dump):
412 (WebCore::Element::formatForDebugger):
414 (WebCore::Position::debugPosition):
415 (WebCore::Position::formatForDebugger):
417 (WebCore::Range::formatForDebugger):
419 (WebCore::Text::formatForDebugger):
420 * editing/Selection.cpp:
421 (WebCore::Selection::debugPosition):
422 (WebCore::Selection::formatForDebugger):
423 * editing/SelectionController.cpp:
424 (WebCore::SelectionController::debugRenderer):
425 * editing/VisiblePosition.cpp:
426 (WebCore::VisiblePosition::debugPosition):
427 * html/HTMLTokenizer.cpp:
428 (WebCore::HTMLTokenizer::scriptHandler):
429 (WebCore::HTMLTokenizer::parseTag):
430 (WebCore::HTMLTokenizer::processToken):
431 (WebCore::HTMLTokenizer::notifyFinished):
432 * svg/SVGFontFaceElement.cpp:
433 (WebCore::mapAttributeToCSSProperty):
435 2008-02-15 Adam Roben <aroben@apple.com>
437 * bindings/scripts/CodeGenerator.pm: Touch this to force bindings to
440 2008-02-15 Adam Roben <aroben@apple.com>
442 Try to fix Qt/GTK+ builds
444 * WebCore.pro: Remove MessageEvent.{idl,cpp} from the unconditional
447 2008-02-15 Darin Adler <darin@apple.com>
449 - another Qt build fix
451 * platform/qt/KURLQt.cpp:
452 (WebCore::KURL::operator QUrl): Use the characters directly, not ascii().
453 Eliminate references to urlString.
455 2008-02-15 Darin Adler <darin@apple.com>
457 - another Qt build fix
459 * platform/qt/ClipboardQt.cpp:
460 (WebCore::ClipboardQt::declareAndWriteDragImage): Use KURL instead of String.
462 2008-02-14 Darin Adler <darin@apple.com>
464 - another round of build fixes
467 (WebCore::appendEncodedHostname): Fix spelling (strLen, not strlen).
468 * platform/network/curl/ResourceHandleManager.cpp:
469 (WebCore::parseDataUrl): Fix a ".." typo and call data instead of characters.
471 2008-02-14 Darin Adler <darin@apple.com>
473 - added back accidentally-removed files
475 * platform/DeprecatedStringList.cpp: Copied from platform/DeprecatedStringList.cpp.
476 * platform/DeprecatedStringList.h: Copied from platform/DeprecatedStringList.h.
477 * platform/mac/DeprecatedStringListMac.mm: Copied from platform/mac/DeprecatedStringListMac.mm.
479 2008-02-14 Darin Adler <darin@apple.com>
484 (WebCore::appendEncodedHostname): Use String to make a QString.
485 * platform/network/cf/ResourceRequest.h:
486 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
487 * platform/network/curl/ResourceHandleManager.cpp:
488 (WebCore::parseDataUrl): Updated to String rather than DeprecatedString functions.
490 2008-02-14 Darin Adler <darin@apple.com>
494 * platform/network/qt/ResourceRequest.h:
495 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
497 2008-02-14 Darin Adler <darin@apple.com>
501 * platform/network/curl/ResourceRequest.h:
502 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
504 2008-02-14 Darin Adler <darin@apple.com>
508 * dom/XMLTokenizer.cpp:
509 (WebCore::XMLTokenizer::endElementNs): Added a missing string() call.
511 2008-02-14 Darin Adler <darin@apple.com>
513 Reviewed by Eric Seidel.
515 Based on work by Marvin Decker <marv.decker@gmail.com>
517 - fix http://bugs.webkit.org/show_bug.cgi?id=16538
518 KURL should use String instead of DeprecatedString
520 - fix http://bugs.webkit.org/show_bug.cgi?id=16485
521 DocLoader::checkForReload will crash if the URL isNull
522 and a similar problem in IconDatabase
524 - fix http://bugs.webkit.org/show_bug.cgi?id=16487
525 KURL doesn't preserve isNull when constructed with a DeprecatedString
527 - changed completeURL and various DOM getters to return KURL, to avoid
528 conversion back and forth from KURL to String
530 - changed the conversion of KURL to NSURL or NSString to be automatic,
531 to ease the use of KURL in Objective C DOM bindings, and eliminated
532 the getNSURL function
534 - because I had to visit the DOM bindings anyway, eliminated almost all
535 the use of the KJS namespace for things in WebCore
537 - fixed HTMLOptionElement constructor to check for undefined rather
538 than size of the arguments array
540 - eliminated some other unnecessary uses of DeprecatedString
542 - changed String::split to take a Vector parameter instead of returning
543 a Vector, for better performance
545 - added a couple of missing calls to do layout in SVG image handling;
546 I was able to reproduce these only because I had broken URLs for a
547 while -- not sure how to reproduce them now but the changes are
550 Performance testing shows this to be at least a 1% speedup.
552 Added a new function protocolIs to efficiently compare protocols
553 without case errors and a blankURL function so we don't have to
554 code "about:blank" in multiple places in the code and don't have to
555 construct a frash KURL each time. Moved decode_string and encode_string
556 out of KURL and gave them clearer names.
558 Made KURL constructors explicit to highlight potentially-expensive
559 operations and the poor semantics of KURL's constructor that takes
562 * WebCore.base.exp: Updated.
564 * bindings/js/JSAttrCustom.cpp:
565 (WebCore::JSAttr::setValue): Use protocolIs.
566 * bindings/js/JSAudioConstructor.h: KJS namespace change.
567 * bindings/js/JSCSSRuleCustom.cpp:
568 (WebCore::toJS): Ditto.
569 * bindings/js/JSCSSValueCustom.cpp:
570 (WebCore::toJS): Ditto.
571 * bindings/js/JSDocumentCustom.cpp:
572 (WebCore::JSDocument::location): Ditto.
573 (WebCore::JSDocument::setLocation): Updated for KURL change.
574 (WebCore::toJS): KJS namespace change.
575 * bindings/js/JSElementCustom.cpp:
576 (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs.
577 (WebCore::JSElement::setAttribute): KJS namespace change.
578 (WebCore::JSElement::setAttributeNode): Ditto.
579 (WebCore::JSElement::setAttributeNS): Ditto.
580 (WebCore::JSElement::setAttributeNodeNS): Ditto.
581 * bindings/js/JSHTMLFrameElementCustom.cpp:
582 (WebCore::allowSettingJavascriptURL): Use protocolIs.
583 (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change.
584 (WebCore::JSHTMLFrameElement::setLocation): Ditto.
585 * bindings/js/JSHTMLIFrameElementCustom.cpp:
586 (WebCore::JSHTMLIFrameElement::setSrc): Use protocolIs.
587 * bindings/js/JSHTMLOptionElementConstructor.cpp:
588 (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
589 (WebCore::JSHTMLOptionElementConstructor::construct): Cleaned up the
590 structure a bit and changed checking to check for undefined rather than
592 * bindings/js/JSHTMLOptionElementConstructor.h: KJS namespace change.
593 * bindings/js/JSLocation.cpp:
594 (WebCore::JSLocation::put): Eliminated some DeprecatedString use,
596 (WebCore::jsLocationProtoFuncReplace): Ditto.
597 (WebCore::jsLocationProtoFuncReload): Ditto.
598 (WebCore::jsLocationProtoFuncAssign): Ditto.
599 * bindings/js/JSLocation.h: KJS namespace change.
600 * bindings/js/JSNamedNodeMapCustom.cpp:
601 (WebCore::JSNamedNodeMap::canGetItemsForName): Ditto.
602 (WebCore::JSNamedNodeMap::nameGetter): Ditto.
603 * bindings/js/JSNamedNodesCollection.cpp:
604 (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Ditto.
605 * bindings/js/JSNamedNodesCollection.h: Ditto.
606 * bindings/js/JSXMLHttpRequest.cpp:
607 (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Removed
608 DeprecatedString use.
609 (WebCore::jsXMLHttpRequestPrototypeFunctionSend): Ditto.
610 * bindings/js/JSXMLHttpRequest.h: Moved this class into the WebCore
612 * bindings/js/JSXSLTProcessor.cpp: Namespace change.
613 * bindings/js/JSXSLTProcessor.h: Ditto.
615 * bindings/js/kjs_binding.cpp: Updated for namespace change.
616 (WebCore::jsStringOrNull): Added an overload for KURL to allow DOM
617 classes to return KURL even if the DOM expects a string.
618 (WebCore::jsStringOrUndefined): Ditto.
619 (WebCore::jsStringOrFalse): Ditto.
620 * bindings/js/kjs_binding.h: Moved everything into the WebCore
623 * bindings/js/kjs_css.h: Namespace change.
624 * bindings/js/kjs_events.cpp: Removed an include.
625 * bindings/js/kjs_events.h: Namespace change.
626 * bindings/js/kjs_html.h: Namespace change.
628 * bindings/js/kjs_navigator.cpp: Moved everything into the
630 * bindings/js/kjs_navigator.h: Ditto.
632 * bindings/js/kjs_window.cpp:
633 (KJS::parseModalDialogFeatures): Updated for String::split change.
634 (KJS::createWindow): Use protocolIs and removed some DeprecatedString.
635 (KJS::Window::put): Ditto.
636 (KJS::Window::allowsAccessFrom): Ditto.
637 (KJS::windowProtoFuncOpen): Ditto.
639 * bindings/objc/DOM.mm:
640 (-[DOMElement _getURLAttribute:]): Removed getNSURL call.
641 * bindings/objc/DOMHTML.mm:
642 (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
644 * bindings/scripts/CodeGeneratorCOM.pm: Updated includes so conversions from
646 * bindings/scripts/CodeGeneratorJS.pm: Updated for namespace changes, and also
647 updated includes so conversions from KURL will work.
648 * bindings/scripts/CodeGeneratorObjC.pm: Updated includes so conversions from
651 * bridge/mac/WebCoreAXObject.mm:
652 (-[WebCoreAXObject accessibilityAttributeValue:]): Removed getNSURL call.
653 Also streamlined the logic.
654 (AXAttributedStringAppendText): Ditto.
656 * bridge/mac/WebCoreScriptDebugger.mm:
657 (toNSString): Tweaked.
658 (toNSURL): Removed getNSURL call.
660 * css/CSSImageValue.cpp:
661 (WebCore::CSSImageValue::image): Removed DeprecatedString use.
662 * css/CSSImportRule.cpp:
663 (WebCore::CSSImportRule::insertedIntoParent): Ditto.
665 (WebCore::CSSParser::parseValue): Ditto.
666 (WebCore::CSSParser::parseContent): Ditto.
667 (WebCore::CSSParser::parseBackgroundImage): Ditto.
668 (WebCore::CSSParser::parseFontFaceSrc): Ditto.
669 (WebCore::CSSParser::parseBorderImage): Ditto.
670 * css/CSSStyleSelector.cpp:
671 (WebCore::CSSStyleSelector::setEncodedURL): Ditto.
672 (WebCore::checkPseudoState): Ditto.
673 * css/CSSStyleSelector.h: Ditto.
676 (WebCore::MediaList::setMediaText): Updated for String::split change.
679 (WebCore::StyleBase::baseURL): Return KURL.
680 * css/StyleBase.h: DItto.
683 (WebCore::Document::~Document): Updated for namespace change.
684 (WebCore::Document::documentURI): Return KURL.
685 (WebCore::Document::setDocumentURI): Removed DeprecatedString use.
686 (WebCore::Document::baseURI): Return KURL.
687 (WebCore::Document::open): Updated to use blankURL.
688 (WebCore::Document::setURL): Take KURL.
689 (WebCore::Document::shouldBeAllowedToLoadLocalResources): Updated for
691 (WebCore::Document::setBaseURL): Take KURL.
692 (WebCore::Document::elementSheet): Updated for KURL change.
693 (WebCore::Document::mappedElementSheet): Ditto.
694 (WebCore::Document::processHttpEquiv): Ditto.
695 (WebCore::Document::recalcStyleSelector): Removed use of
696 DeprecatedString -- also noticed some dead code here!
697 (WebCore::Document::setCookie): Ditto.
698 (WebCore::Document::completeURL): Return KURL.
699 * dom/Document.h: Use KURL instead of String in a few places.
701 * dom/DocumentType.cpp:
702 (WebCore::DocumentType::baseURI): Return KURL.
703 * dom/DocumentType.h: Ditto.
706 (WebCore::Element::baseURI): Return KURL.
707 * dom/Element.h: Ditto.
710 (WebCore::Node::setDocument): Namespace change.
711 (WebCore::Node::baseURI): Return KURL.
714 * dom/ProcessingInstruction.cpp:
715 (WebCore::ProcessingInstruction::checkStyleSheet): Updated for KURL change.
716 * dom/StyleElement.cpp:
717 (WebCore::StyleElement::process): Changed to use Vector<UChar> instead of
718 String for better performance.
719 (WebCore::StyleElement::createSheet): Removed use of DeprecateString.
720 * dom/XMLTokenizer.cpp:
721 (WebCore::XMLTokenizer::endElementNs): Updated for KURL change.
722 (WebCore::XMLTokenizer::end): Ditto.
723 (WebCore::xmlDocPtrForString): Removed use of DeprecateString.
724 * dom/XMLTokenizer.h: Ditto.
726 * editing/markup.cpp: Moved appendString to PlatformString.h.
727 (WebCore::appendQuotedURLAttributeValue): Use protocolIs.
728 (WebCore::completeURLs): Removed DeprecatedString use.
729 (WebCore::createFragmentFromMarkup): Use blankURL.
730 (WebCore::fillContainerFromString): Removed DeprecatedString use.
731 (WebCore::createFragmentFromText): Ditto.
733 * history/HistoryItem.cpp:
734 (WebCore::HistoryItem::url): Removed DeprecatedString use.
735 (WebCore::HistoryItem::originalURL): Ditto.
736 * history/HistoryItem.h: Removed include.
738 * html/HTMLAnchorElement.cpp:
739 (WebCore::HTMLAnchorElement::defaultEventHandler): Removed use of
741 (WebCore::HTMLAnchorElement::href): Return KURL.
742 (WebCore::HTMLAnchorElement::hash): Removed DeprecatedString use.
743 (WebCore::HTMLAnchorElement::host): Ditto.
744 (WebCore::HTMLAnchorElement::hostname): Ditto.
745 (WebCore::HTMLAnchorElement::pathname): Ditto.
746 (WebCore::HTMLAnchorElement::port): Ditto.
747 (WebCore::HTMLAnchorElement::protocol): Ditto.
748 (WebCore::HTMLAnchorElement::search): Ditto.
749 (WebCore::HTMLAnchorElement::toString): Ditto.
750 * html/HTMLAnchorElement.h: Ditto.
751 * html/HTMLAppletElement.cpp:
752 (WebCore::HTMLAppletElement::createRenderer): Updated for KURL change.
753 * html/HTMLAreaElement.cpp:
754 (WebCore::HTMLAreaElement::href): Return KURL.
755 * html/HTMLAreaElement.h: Ditto.
756 * html/HTMLBaseElement.cpp:
757 (WebCore::HTMLBaseElement::removedFromDocument): Updated for KURL change.
758 (WebCore::HTMLBaseElement::process): Removed DeprecatedString use.
759 * html/HTMLBodyElement.cpp:
760 (WebCore::HTMLBodyElement::parseMappedAttribute): Updated for KURL change.
761 * html/HTMLEmbedElement.cpp:
762 (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed use of
764 * html/HTMLEmbedElement.h: Removed DeprecatedString use.
765 * html/HTMLFormElement.cpp:
766 (WebCore::HTMLFormElement::formWouldHaveSecureSubmission): Use protocolIs.
767 (WebCore::encodeCString): Updated for change to String::split.
768 (WebCore::HTMLFormElement::dataEncoding): Ditto.
769 (WebCore::HTMLFormElement::formData): Removed DeprecatedString use.
770 (WebCore::HTMLFormElement::isMailtoForm): Use protocolIs.
771 (WebCore::HTMLFormElement::submit): Updated for KURL change.
772 (WebCore::HTMLFormElement::reset): Ditto.
773 * html/HTMLFrameElementBase.cpp:
774 (WebCore::HTMLFrameElementBase::isURLAllowed): Updated for KURL change
775 and use equalIgnoringRef instead of doing a setRef to get the same effect.
776 (WebCore::HTMLFrameElementBase::openURL): Use blankURL.
777 (WebCore::HTMLFrameElementBase::location): Return KURL.
778 (WebCore::HTMLFrameElementBase::src): Return KURL.
779 * html/HTMLFrameElementBase.h: Ditto.
780 * html/HTMLImageElement.cpp:
781 (WebCore::HTMLImageElement::parseMappedAttribute): Updated for KURL change.
782 (WebCore::HTMLImageElement::longDesc): Return KURL.
783 (WebCore::HTMLImageElement::lowsrc): Return KURL.
784 (WebCore::HTMLImageElement::src): Return KURL.
785 * html/HTMLImageElement.h: Ditto. Also removed imageMap() function.
786 * html/HTMLInputElement.cpp:
787 (WebCore::HTMLInputElement::src): Return KURL.
788 * html/HTMLInputElement.h: Ditto.
789 * html/HTMLLinkElement.cpp:
790 (WebCore::HTMLLinkElement::parseMappedAttribute): Updated for KURL change.
791 (WebCore::HTMLLinkElement::tokenizeRelAttribute): Updated for String::split change.
792 (WebCore::HTMLLinkElement::href): Return KURL.
793 * html/HTMLLinkElement.h: Ditto.
794 * html/HTMLMediaElement.cpp:
795 (WebCore::HTMLMediaElement::src): Return KURL.
796 (WebCore::HTMLMediaElement::pickMedia): Updated for KURL change.
797 * html/HTMLMediaElement.h: Ditto.
798 * html/HTMLObjectElement.cpp:
799 (WebCore::HTMLObjectElement::isImageType): Use protocolIs.
800 (WebCore::HTMLObjectElement::data): Return KURL.
801 * html/HTMLObjectElement.h: Ditto.
802 * html/HTMLOptGroupElement.cpp:
803 (WebCore::HTMLOptGroupElement::groupLabelText): Removed DeprecatedString use.
804 * html/HTMLParser.cpp:
805 (WebCore::HTMLParser::reportErrorToConsole): Updated for KURL change.
806 * html/HTMLScriptElement.cpp:
807 (WebCore::HTMLScriptElement::insertedIntoDocument): Ditto.
808 (WebCore::HTMLScriptElement::text): Changed to use Vector<UChar> instead of
809 String for better performance.
810 (WebCore::HTMLScriptElement::src): Return KURL.
811 * html/HTMLScriptElement.h: Ditto.
812 * html/HTMLSourceElement.cpp:
813 (WebCore::HTMLSourceElement::src): Return KURL.
814 * html/HTMLSourceElement.h: Ditto.
815 * html/HTMLTableElement.cpp:
816 (WebCore::HTMLTableElement::parseMappedAttribute): Updated for KURL change.
817 * html/HTMLTablePartElement.cpp:
818 (WebCore::HTMLTablePartElement::parseMappedAttribute): Updated for KURL change.
819 * html/HTMLTextAreaElement.cpp:
820 (WebCore::HTMLTextAreaElement::setValue): Removed DeprecatedString use.
821 * html/HTMLTokenizer.cpp:
822 (WebCore::HTMLTokenizer::scriptExecution): Ditto.
823 (WebCore::HTMLTokenizer::notifyFinished): Use protocolIs.
824 * html/HTMLVideoElement.cpp:
825 (WebCore::HTMLVideoElement::poster): Return KURL.
826 * html/HTMLVideoElement.h: Ditto.
827 * html/HTMLViewSourceDocument.cpp:
828 (WebCore::HTMLViewSourceDocument::addText): Updated for String::split change.
830 * loader/DocLoader.cpp:
831 (WebCore::DocLoader::checkForReload): Add an explicit check for an empty URL
832 here to avoid problems using its string as a hash table key later.
833 (WebCore::DocLoader::requestResource): Removed DeprecatedString use.
835 * loader/FTPDirectoryDocument.cpp:
836 (WebCore::FTPDirectoryTokenizer::createTDForFilename): Updated for KURL change.
837 (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Removed use of
840 * loader/FrameLoader.cpp:
841 (WebCore::FrameLoader::requestFrame): Use protocolIs.
842 (WebCore::FrameLoader::loadSubframe): Use blankURL.
843 (WebCore::FrameLoader::submitForm): Use protocolIs and removed use of
845 (WebCore::FrameLoader::iconURL): Return KURL. Use protcolIs.
846 (WebCore::FrameLoader::didOpenURL): Use protocolIs.
847 (WebCore::FrameLoader::didExplicitOpen): Use blankURL.
848 (WebCore::FrameLoader::executeIfJavaScriptURL): Use protocolIs.
849 Update for name change to decodeURLEscapeSequences.
850 (WebCore::FrameLoader::receivedFirstData): Updated for KURL changes.
851 (WebCore::FrameLoader::begin): Removed DeprecatedString use.
852 Renamed baseurl to baseURL. Updated to use KURL more.
853 (WebCore::FrameLoader::gotoAnchor): Removed use of encodedHtmlRef
854 function, which is no different from ref.
855 (WebCore::FrameLoader::completeURL): Updated for KURL change.
856 (WebCore::FrameLoader::scheduleLocationChange): Ditto.
857 (WebCore::FrameLoader::canCachePage): Use protocolIs.
858 (WebCore::FrameLoader::updatePolicyBaseURL): Update for KURL change.
859 (WebCore::FrameLoader::setPolicyBaseURL): Take KURL.
860 (WebCore::FrameLoader::startRedirectionTimer): Removed use of
862 (WebCore::FrameLoader::load): Use protocolIs.
863 (WebCore::FrameLoader::shouldHideReferrer): Use protocolIs.
864 (WebCore::FrameLoader::shouldAllowNavigation): Updated for KURL change.
865 (WebCore::FrameLoader::commitProvisionalLoad): Use blankURL.
866 (WebCore::FrameLoader::open): Use protcolIs.
867 (WebCore::FrameLoader::createHistoryItem): Use blankURL.
868 (WebCore::FrameLoader::createJavaAppletWidget): Updated for KURL change.
869 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Removed
870 DeprecatedString use.
871 * loader/FrameLoader.h: Ditto.
873 * loader/ImageDocument.cpp:
874 (WebCore::ImageDocument::createDocumentStructure): Updated for KURL change.
875 * loader/PluginDocument.cpp:
876 (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
878 * loader/icon/IconDatabase.cpp:
879 (WebCore::IconDatabase::iconForPageURL): Added a check for an empty URL
880 before trying to use it as a hash table key.
882 * loader/icon/IconLoader.h: Tweaked includes.
885 (WebCore::Loader::servePendingRequests): Use protcolIs. Also removed some
886 code to set up a local variable that is never used (and a DeprecatedString
889 * loader/mac/LoaderNSURLExtras.m:
890 (suggestedFilenameWithMIMEType): Removed unnecessary typecast.
892 * page/ContextMenuController.cpp: Removed include.
894 * page/mac/EventHandlerMac.mm:
895 (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
898 * page/mac/WebCoreFrameBridge.mm:
899 (-[WebCoreFrameBridge URLWithAttributeString:]): Removed getNSURL call.
900 (-[WebCoreFrameBridge baseURL]): Ditto.
903 (WebCore::isSchemeFirstChar): Fixed bug in handling of values >= 0x80.
904 (WebCore::isSchemeChar): Ditto.
905 (WebCore::isPathSegmentEndChar): Ditto.
906 (WebCore::hexDigitValue): Changed parameter type to UChar.
907 (WebCore::copyASCII): Added.
908 (WebCore::findFirstOf): Added.
909 (WebCore::KURL::protocolIs): Added.
910 (WebCore::KURL::KURL): Tightened logic up quite a bit. Changed parameter
911 types from DeprecatedString to String.
912 (WebCore::KURL::init): Changed parameter type to String. Preserved the
913 passed-in string even if the base is invalid. Cleaned up logic to determine
914 if the originalString should be pased in to the parse function. Simplified
915 by calling the new parse overload that takes String in many cases.
916 (WebCore::KURL::lastPathComponent): Return String.
917 (WebCore::KURL::protocol): Ditto.
918 (WebCore::KURL::host): Ditto.
919 (WebCore::KURL::port): Changed logic to use early return for clarity.
920 (WebCore::KURL::pass): Return String.
921 (WebCore::KURL::user): Ditto.
922 (WebCore::KURL::ref): Ditto.
923 (WebCore::assertProtocolIsGood): Added.
924 (WebCore::KURL::protocolIs): Added.
925 (WebCore::KURL::query): Return String.
926 (WebCore::KURL::path): Ditto.
927 (WebCore::KURL::setProtocol): Take String.
928 (WebCore::KURL::setHost): Ditto.
929 (WebCore::KURL::setPort): Use String.
930 (WebCore::KURL::setHostAndPort): Take String.
931 (WebCore::KURL::setUser): Ditto.
932 (WebCore::KURL::setPass): Ditto.
933 (WebCore::KURL::setRef): Ditto.
934 (WebCore::KURL::setQuery): Ditto.
935 (WebCore::KURL::setPath): Ditto.
936 (WebCore::KURL::prettyURL): Return String. Use Vector<UChar> to build it.
937 (WebCore::decodeURLEscapeSequences): Renamed from KURL::decode_string.
938 Return String. Use Vector<UChar> to build it.
939 (WebCore::KURL::isLocalFile): Use protocolIs.
940 (WebCore::KURL::parse): Added an overload that takes a String to replace
941 the use of DeprecatedString::ascii at various call sites. Updated for
942 name change (urlString -> m_string).
943 (WebCore::equalIgnoringRef): Wrote a new implementation that doesn't
945 (WebCore::encodeWithURLEscapeSequences): Renamed from KURL::encode_string.
947 (WebCore::appendEncodedHostname): Added. Replaces encodeHostname and
948 avoids the need to allocate a string.
949 (WebCore::findHostnamesInMailToURL): Update to use findFirstOf instead of
951 (WebCore::findHostnameInHierarchicalURL): Ditto.
952 (WebCore::encodeHostnames): Use protocolIs and the other helpers above.
953 (WebCore::encodeRelativeString): Changed to put result into a CharBuffer.
954 (WebCore::substituteBackslashes): Updated to use String.
955 (WebCore::KURL::copyToBuffer): Added.
956 (WebCore::protocolIs): Added.
957 (WebCore::blankURL): Added.
958 (WebCore::KURL::print): Updated.
959 * platform/KURL.h: Added a number of comments. Reorganized the header a bit.
960 Made the string constructors explicit. Changed to use String instead of
961 DeprecatedString. Removed encodedHTMLRef. Renamed and added a few functions.
963 * platform/cf/KURLCFNet.cpp:
964 (WebCore::KURL::KURL): Streamlined the logic a bit.
965 (WebCore::KURL::createCFURL): Changed to use copyToBuffer.
967 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
968 (WebCore::MediaPlayerPrivate::createQTMovie): Removed getNSURL call.
970 * platform/mac/ClipboardMac.mm:
971 (WebCore::ClipboardMac::declareAndWriteDragImage): Removed getNSURL call.
972 * platform/mac/CookieJar.mm:
973 (WebCore::cookies): Removed getNSURL call.
974 (WebCore::setCookies): Removed getNSURL call.
975 * platform/mac/KURLMac.mm:
976 (WebCore::KURL::KURL): Streamlined the logic a bit.
977 * platform/mac/PasteboardMac.mm:
978 (WebCore::Pasteboard::writeURL): Removed getNSURL call.
979 (WebCore::Pasteboard::writeImage): Ditto.
980 * platform/mac/SSLKeyGeneratorMac.mm:
981 (WebCore::signedPublicKeyAndChallengeString): Ditto.
983 * platform/network/HTTPParsers.cpp:
984 (WebCore::filenameFromHTTPContentDisposition): Updated for String::split.
985 * platform/network/ResourceHandle.cpp:
986 (WebCore::ResourceHandle::portAllowed): Use protocolIs.
988 * platform/network/cf/ResourceErrorCF.cpp:
989 (WebCore::ResourceError::operator CFErrorRef): Removed deprecatedString call.
990 * platform/network/curl/ResourceHandleManager.cpp:
991 (WebCore::headerCallback): Ditto.
992 (WebCore::parseDataUrl): Use String instead of DeprecatedString.
993 (WebCore::ResourceHandleManager::startJob): Updated for KURL changes.
994 * platform/network/mac/ResourceErrorMac.mm:
995 (WebCore::ResourceError::operator NSError*): Removed getNSURL call.
996 * platform/network/mac/ResourceRequest.h:
997 (WebCore::ResourceRequest::ResourceRequest): Removed DeprecatedString use.
998 * platform/network/mac/ResourceRequestMac.mm:
999 (WebCore::ResourceRequest::doUpdatePlatformRequest): Removed getNSURL call.
1000 * platform/network/mac/ResourceResponseMac.mm:
1001 (WebCore::ResourceResponse::nsURLResponse): Removed getNSURL call.
1003 * platform/qt/ClipboardQt.cpp:
1004 (WebCore::ClipboardQt::writeURL): Removed deprecatedString call.
1006 * platform/text/CString.h:
1007 (WebCore::CStringBuffer::length): Fixed size_t/unsigned mismatch to make it
1008 possible to compile this on Windows with higher warning level
1010 * platform/text/PlatformString.h: Updated split to modify a result parameter
1011 rather than returning a Vector. Added charactersAreAllASCII and an append
1012 function that appends a String to a Vector<UChar>.
1013 * platform/text/String.cpp:
1014 (WebCore::String::split): Updated.
1016 * platform/win/BString.cpp:
1017 (WebCore::BString::BString): Added conversion from KURL.
1018 * platform/win/BString.h: Ditto.
1020 * platform/win/ClipboardUtilitiesWin.cpp:
1021 (WebCore::markupToCF_HTML): Removed use of deprecatedString.
1022 * platform/win/ClipboardWin.cpp:
1023 (WebCore::filesystemPathFromUrlOrTitle): Ditto.
1024 (WebCore::createGlobalHDropContent): Ditto.
1025 (WebCore::ClipboardWin::setData): Ditto.
1026 (WebCore::ClipboardWin::writeRange): Ditto.
1027 * platform/win/PasteboardWin.cpp:
1028 (WebCore::Pasteboard::writeSelection): Ditto.
1029 * plugins/PluginStream.cpp:
1030 (WebCore::PluginStream::startStream): Ditto.
1031 (WebCore::PluginStream::destroyStream): Ditto.
1032 * plugins/win/PluginViewWin.cpp:
1033 (WebCore::scriptStringIfJavaScriptURL): Ditto.
1034 (WebCore::PluginView::performRequest): Ditto.
1035 (WebCore::PluginView::PluginView): Ditto.
1037 * rendering/HitTestResult.cpp:
1038 (WebCore::HitTestResult::absoluteImageURL): Removed DeprecatedString use.
1039 (WebCore::HitTestResult::absoluteLinkURL): Ditto.
1041 * rendering/RenderFrameSet.cpp:
1042 (WebCore::RenderFrameSet::layOutAxis): Fixed comment wording.
1043 * rendering/RenderImage.cpp:
1044 (WebCore::RenderImage::paintReplaced): Removed use of DeperecatedString,
1045 (WebCore::RenderImage::imageMap): Changed to call useMap instead of imageMap;
1046 both do the same thing, and the first is standard DOM.
1048 * rendering/RenderObject.cpp:
1049 (WebCore::RenderObject::addPDFURLRect): Rewrote and streamlined to remove
1050 DeprecatedString use.
1051 * rendering/RenderObject.h: Changed addPDFURLRect to take const IntRect&.
1053 * rendering/RenderPartObject.cpp:
1054 (WebCore::isURLAllowed): Updated for KURL change and use equalIgnoringRef
1055 instead of doing a setRef to get the same effect.
1056 (WebCore::RenderPartObject::updateWidget): Updated for KURL change.
1058 * rendering/RenderText.cpp:
1059 (WebCore::charactersAreAllASCII): Moved the guts to PlatformString.h.
1061 * rendering/SVGRenderSupport.cpp:
1062 (WebCore::renderSubtreeToImage): Added missing call to do layout. I ran
1063 into this while doing some layout tests while URL processing was broken.
1065 * rendering/SVGRenderTreeAsText.h: Removed include.
1067 * svg/SVGImageLoader.cpp:
1068 (WebCore::SVGImageLoader::updateFromElement): Removed DeprecatedString use.
1070 * svg/graphics/SVGImage.cpp:
1071 (WebCore::SVGImage::draw): Added missing call to do layout. I ran
1072 into this while doing some layout tests while URL processing was broken.
1073 (WebCore::SVGImage::dataChanged): Use a null URL rather than an arbitrary
1074 string for the document.
1076 * xml/XMLHttpRequest.cpp:
1077 (WebCore::XMLHttpRequest::getResponseXML): Removed DeprecatedString use.
1078 (WebCore::XMLHttpRequest::urlMatchesDocumentDomain): Ditto.
1079 (WebCore::XMLHttpRequest::open): Ditto.
1080 (WebCore::XMLHttpRequest::send): Namespace change.
1081 (WebCore::XMLHttpRequest::dropProtection): Ditto.
1082 * xml/XMLHttpRequest.h: Removed DeprecatedString use.
1084 * xml/XSLImportRule.cpp:
1085 (WebCore::XSLImportRule::loadSheet): Removed DeprecatedString use.
1086 * xml/XSLStyleSheet.cpp:
1087 (WebCore::XSLStyleSheet::loadChildSheets): Ditto.
1088 (WebCore::XSLStyleSheet::loadChildSheet): Ditto.
1089 * xml/XSLStyleSheet.h: Ditto.
1090 * xml/XSLTProcessor.cpp:
1091 (WebCore::docLoaderFunc): Ditto.
1092 (WebCore::xsltStylesheetPointer): Ditto.
1093 (WebCore::xmlDocPtrFromNode): Ditto.
1095 2008-02-14 Ada Chan <adachan@apple.com>
1097 <rdar://problem/5744728> Fix leaks of RegularExpression objects in Frame.cpp.
1099 Reviewed by Jon and Darin.
1102 (WebCore::createRegExpForLabels):
1103 (WebCore::Frame::searchForLabelsBeforeElement):
1104 (WebCore::Frame::matchLabelsAgainstElement):
1106 2008-02-14 Stephanie Lewis <slewis@apple.com>
1114 2008-02-14 Oliver Hunt <oliver@apple.com>
1116 Reviewed by Geoff G and Weinig.
1118 <rdar://problem/5726608> REGRESSION (r29428): Assigning to window.status does not update status bar
1120 Revert the portions of r29428 responsible for breaking the ability to
1123 * page/DOMWindow.cpp:
1124 (WebCore::DOMWindow::setStatus):
1125 (WebCore::DOMWindow::defaultStatus):
1126 (WebCore::DOMWindow::setDefaultStatus):
1128 * page/DOMWindow.idl:
1130 2008-02-14 Anders Carlsson <andersca@apple.com>
1134 <rdar://problem/5721790>
1135 Crash in WebCore::DeprecatedString::operator= + 31 at news.google.com
1137 Use pointers in the cache map tables. Otherwise when we rehash,
1138 we will end up destroying Cache objects that node lists might point to.
1141 (WebCore::NodeListsNodeData::~NodeListsNodeData):
1142 (WebCore::Node::getElementsByName):
1143 (WebCore::Node::getElementsByClassName):
1145 2008-02-14 Alp Toker <alp@atoker.com>
1149 http://bugs.webkit.org/show_bug.cgi?id=17353
1150 XMLTokenizer installs global libxml2 callbacks that can break client applications
1152 Patch by Mark Rowe (with a few changes).
1154 The xmlRegisterInputCallbacks/xmlRegisterOutputCallbacks done at
1155 init are global so we need to make sure these callbacks only get used
1156 by XMLTokenizer and never by libxml2 calls in user applications.
1158 This patch modifies the match and open functions to only apply when we
1159 are certain the caller is XMLTokenizer by checking globalDocLoader and
1160 ensuring we're on the correct thread.
1162 Some possible issues remain. See the bug report for details.
1164 * dom/XMLTokenizer.cpp:
1165 (WebCore::matchFunc):
1166 (WebCore::openFunc):
1167 (WebCore::createStringParser):
1169 2008-02-14 Timothy Hatcher <timothy@apple.com>
1171 Reviewed by Darin Adler.
1173 <rdar://problem/5743768> A deadlock during storage layout tests
1175 Make sure not to hold the m_openDatabaseMapGuard mutex when calling
1176 Database::markAsDeletedAndClose(), since that can cause a deadlock
1177 during the synchronous DatabaseThread call it triggers.
1179 * storage/DatabaseTracker.cpp:
1180 (WebCore::DatabaseTracker::deleteDatabaseFile):
1182 2008-02-14 Adam Roben <aroben@apple.com>
1184 Turn on cross-document messaging support by default
1188 * Configurations/WebCore.xcconfig:
1190 * WebCore.vcproj/WebCore.vcproj:
1192 2008-02-14 Adam Roben <aroben@apple.com>
1194 Conditionalize cross-document messaging support
1196 The cross-document messaging parts of HTML 5 are in flux and we want
1197 ports to be able to turn off the support as needed.
1199 Note that the support is turned off by default right now. A subsequent
1200 commit will turn it on by default.
1205 * WebCore.vcproj/build-generated-files.sh:
1206 * bindings/js/JSDOMWindowCustom.cpp:
1207 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1208 * bindings/js/JSEventCustom.cpp:
1211 (WebCore::Event::isMessageEvent):
1213 * dom/MessageEvent.cpp:
1214 * dom/MessageEvent.h:
1215 * dom/MessageEvent.idl:
1216 * page/DOMWindow.cpp:
1217 (WebCore::DOMWindow::postMessage):
1219 * page/DOMWindow.idl:
1221 2008-02-14 Adam Roben <aroben@apple.com>
1223 Improve the efficiency of SecurityOriginHash
1227 * platform/SecurityOriginHash.h:
1228 (WebCore::SecurityOriginHash::hash): Now takes a const
1229 RefPtr<SecurityOrigin>& to reduce ref-count churn.
1230 (WebCore::SecurityOriginHash::equal): Ditto.
1232 2008-02-13 Justin Garcia <justin.garcia@apple.com>
1234 Reviewed by Oliver Hunt.
1236 Fixes the editing/deleting/5729680.html failure. It succeeds when run by itself
1237 but fails when run with other tests because FramePrivate's m_selectionGranularity
1238 isn't reset when a Frame receives a new document. It was also uninitialized in
1241 * loader/FrameLoader.cpp:
1242 (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
1244 (WebCore::FramePrivate::FramePrivate): Ditto.
1246 2008-02-13 Jon Honeycutt <jhoneycutt@apple.com>
1250 <rdar://problem/5739282> Hangs after closing video trailer popup with
1253 VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window
1256 * plugins/PluginQuirkSet.h: Added new quirk
1257 PluginQuirkDontSetNullWindowHandleOnDestroy.
1259 * plugins/win/PluginViewWin.cpp:
1260 (WebCore::PluginView::stop): Selectively call NPP_SetWindow.
1261 (WebCore::PluginView::determineQuirks): Set new quirk for VLC plug-in.
1263 2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com>
1265 Reviewed by Alp Toker.
1269 * css/CSSCursorImageValue.cpp:
1271 2008-02-13 Justin Garcia <justin.garcia@apple.com>
1273 Reviewed by Adam Roben.
1275 <rdar://problem/5729680> REGRESSION (r27873): Removing the last character of a word in Mail or Safari also removes the following space
1277 * editing/Editor.cpp:
1278 (WebCore::Editor::deleteWithDirection): Fixed a typo.
1280 2008-02-13 Nikolas Zimmermann <zimmermann@kde.org>
1284 Actually fix the manual-tests/svg-cursor-changes.svg testcase.
1285 I only reran layout tests when fixing the last issues with the patch,
1286 instead of trying the manual-test :( Fixed.
1288 * css/CSSCursorImageValue.cpp:
1289 (WebCore::CSSCursorImageValue::CSSCursorImageValue):
1290 (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1291 (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1292 * css/CSSCursorImageValue.h:
1294 2008-02-13 Adam Roben <aroben@apple.com>
1298 * css/CSSCursorImageValue.cpp: #include MathExtras.h to get roundf.
1300 2008-02-13 Nikolas Zimmermann <zimmermann@kde.org>
1302 Reviewed by Darin & Eric.
1304 Fixes: http://bugs.webkit.org/show_bug.cgi?id=17258 (SVG uses erroneous cursor implementation)
1306 SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore.
1307 SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from
1308 CachedResourceClient itself, handling remote-image acquisation on its own.
1310 RenderStyle's CursorData class holds "IntPoint hotSpot", "CachedImage* image"
1311 and just for SVG a 'String cursorFragmentId' (a reference to a SVG <cursor> element, by id).
1313 SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself -
1314 instead of storing the CachedImage in the CursorData class, as it's supposed to be.
1315 Because of that several places in WebCore contain special SVG cursor handling - which
1318 Fix all issues by integrating within CSSCursorImageValue, remove 'String cursorFragmentId'
1319 from RenderStyle, kill any special SVG cursor handling in WebCore and fix dynamic attribute
1320 changes through DOM / SVG DOM (scripting of 'x' / 'y' / 'xlink:href' attribute). Now you
1321 can script the mouse cursor location using SVG - the feature anyone has waited for.
1323 Added manual test case: manual-tests/svg-cursor-changes.svg (no support for cursors in DRT)
1325 * css/CSSCursorImageValue.cpp:
1326 (WebCore::isSVGCursorIdentifier):
1327 (WebCore::resourceReferencedByCursorElement):
1328 (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1329 (WebCore::CSSCursorImageValue::updateIfNeeded):
1330 (WebCore::CSSCursorImageValue::image):
1331 * css/CSSCursorImageValue.h:
1332 * css/CSSImageValue.cpp:
1333 (WebCore::CSSImageValue::image):
1334 * css/CSSImageValue.h:
1335 * css/CSSParser.cpp:
1336 (WebCore::CSSParser::parseValue):
1337 * css/CSSStyleSelector.cpp:
1338 (WebCore::CSSStyleSelector::applyProperty):
1339 * manual-tests/svg-cursor-changes.svg: Added.
1340 * page/EventHandler.cpp:
1341 (WebCore::EventHandler::selectCursor):
1342 * rendering/RenderStyle.cpp:
1343 * rendering/RenderStyle.h:
1344 (WebCore::CursorData::operator==):
1345 * svg/SVGCursorElement.cpp:
1346 (WebCore::SVGCursorElement::SVGCursorElement):
1347 (WebCore::SVGCursorElement::~SVGCursorElement):
1348 (WebCore::SVGCursorElement::parseMappedAttribute):
1349 (WebCore::SVGCursorElement::addClient):
1350 (WebCore::SVGCursorElement::removeClient):
1351 (WebCore::SVGCursorElement::svgAttributeChanged):
1352 * svg/SVGCursorElement.h:
1353 (WebCore::SVGCursorElement::isValid):
1355 2008-02-13 Alp Toker <alp@atoker.com>
1357 Reviewed by Adam Roben.
1359 Split out pure-cairo Font code to FontCairo.cpp.
1361 Part of the ongoing work to share code with the Win port.
1365 * platform/graphics/cairo/FontCairo.cpp: Added.
1366 (WebCore::Font::drawGlyphs):
1367 * platform/graphics/gtk/FontGtk.cpp:
1369 2008-02-13 Kevin Ollivier <kevino@theolliviers.com>
1371 Reviewed by Darin Adler.
1373 Import wx/defs.h to keep windows.h from using ANSI functions
1374 (see note in file for more info) and use the 8-bit string friendly
1375 version of StringImpl::computeHash since we're passing it un UTF8
1376 string. Also, don't cache the hash result.
1378 http://bugs.webkit.org/show_bug.cgi?id=17321
1381 * platform/graphics/wx/FontPlatformData.h:
1382 (WebCore::FontPlatformData::hash):
1383 (WebCore::FontPlatformData::computeHash):
1385 2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com>
1387 Fix Bug 17220: Illogical dependency between PluginView and
1390 <http://bugs.webkit.org/show_bug.cgi?id=17220>
1392 Reviewed by Adam and Darin.
1394 Rename PluginDatabase::createPluginView to PluginView::create, to make
1395 the illogical dependency between the two, logical
1396 Make PluginDatabase::findPlugin a public method
1397 Update the includes in PluginView and PluginDatabase for the change
1399 * plugins/PluginDatabase.h:
1400 * plugins/PluginView.h:
1401 * plugins/win/PluginDatabaseWin.cpp:
1402 * plugins/win/PluginViewWin.cpp:
1404 2008-02-13 Adam Roben <aroben@apple.com>
1408 * platform/graphics/cg/GraphicsContextCG.cpp: Added missing #include.
1410 2008-02-13 Matt Lilek <webkit@mattlilek.com>
1412 Not reviewed, build fix.
1414 * platform/graphics/cg/GraphicsContextCG.cpp:
1415 (WebCore::GraphicsContext::paintBuffer):
1417 2008-02-13 Darin Adler <darin@apple.com>
1419 - try to fix Wx build
1421 * platform/graphics/wx/GraphicsContextWx.cpp:
1422 (WebCore::GraphicsContext::paintBuffer): Added.
1424 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1425 (WebCore::GraphicsContext::paintBuffer): Added missing paintingDisabled() check.
1426 * platform/graphics/cg/GraphicsContextCG.cpp:
1427 (WebCore::GraphicsContext::paintBuffer): Ditto.
1428 * platform/graphics/qt/GraphicsContextQt.cpp:
1429 (WebCore::GraphicsContext::paintBuffer): Ditto.
1431 2008-02-13 Darin Adler <darin@apple.com>
1433 - try to fix Wx build
1435 * platform/wx/LocalizedStringsWx.cpp: Add missing include.
1437 2008-02-11 Darin Adler <darin@apple.com>
1439 - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
1440 incorrectly due to visibility fix
1442 Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
1444 * WebCore.base.exp: Rolled out change.
1445 * css/CSSMutableStyleDeclaration.cpp:
1446 (WebCore::CSSMutableStyleDeclaration::setProperty): Ditto.
1447 * page/Settings.cpp:
1448 (WebCore::Settings::Settings): Ditto. But keep the initialization of
1449 m_fontRenderingMode.
1450 (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Removed.
1452 (WebCore::Settings::needsXcodeVisibilityQuirk): Removed.
1454 2008-02-13 Alexey Proskuryakov <ap@webkit.org>
1458 <rdar://problem/5740042> Database termination issues
1460 Test: storage/close-during-stress-test.html
1463 (WebCore::Document::databaseThread):
1465 Don't re-create the database thread if it has been already terminated.
1467 * storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
1468 having a hanging reference.
1470 * storage/DatabaseThread.cpp:
1471 (WebCore::DatabaseThread::requestTermination):
1473 * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
1474 Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
1476 2008-02-12 Bernhard Rosenkraenzer <bero@arklinux.org>
1480 - fix http://bugs.webkit.org/show_bug.cgi?id=17340
1481 WebCore/platform/Timer.cpp fails to build with gcc 4.3
1483 * platform/Timer.cpp: Add include of <limits.h> since this file uses UINT_MAX.
1485 2008-02-12 Timothy Hatcher <timothy@apple.com>
1487 Reviewed by Brady Eidson.
1489 <rdar://problem/5652560> Can't delete database if the website that
1490 uses it has been opened in this session
1492 Close the Database on the database thread before deleting the file.
1493 Tested and works on Windows and Mac.
1495 * platform/sql/SQLiteDatabase.cpp:
1496 (WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
1497 * storage/Database.cpp:
1498 (WebCore::Database::markAsDeletedAndClose): Unschedule any pending
1499 Database tasks, and start and imediate DatabaseCloseTask.
1500 (WebCore::Database::close): Close the SQLDatabase.
1501 * storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
1502 * storage/DatabaseTask.cpp:
1503 (WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
1504 (WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
1505 (WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
1506 * storage/DatabaseTask.h: Add DatabaseCloseTask.
1507 * storage/DatabaseTracker.cpp:
1508 (WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
1509 markAsDeletedAndClose.
1511 2008-02-12 Oliver Hunt <oliver@apple.com>
1513 Endeavour to fix qt and gtk builds
1515 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1516 * platform/graphics/qt/GraphicsContextQt.cpp:
1518 2008-02-12 Oliver Hunt <oliver@apple.com>
1522 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
1523 Remove ifdef's from canvas paint code
1525 By making GraphicsContext aware of the crossplatform ImageBuffer
1526 type we can migrate the ifdef-ified paint code in HTMLCanvasElement
1527 into platform implementations of GraphicsContext.
1529 * html/HTMLCanvasElement.cpp:
1530 (WebCore::HTMLCanvasElement::paint):
1531 * platform/graphics/GraphicsContext.h:
1532 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1533 (WebCore::GraphicsContext::paintBuffer):
1534 * platform/graphics/cg/GraphicsContextCG.cpp:
1535 (WebCore::GraphicsContext::paintBuffer):
1536 * platform/graphics/qt/GraphicsContextQt.cpp:
1537 (WebCore::GraphicsContext::paintBuffer):
1539 2008-02-12 Brady Eidson <beidson@apple.com>
1541 Reviewed by Darin Adler
1543 Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
1545 Layout tests will come shortly with a mess of DRT changes
1547 * platform/SecurityOrigin.cpp:
1548 (WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
1549 as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
1552 * storage/Database.cpp:
1553 (WebCore::Database::changeVersion): Pass in the successCallback
1554 (WebCore::Database::transaction): Ditto
1556 * storage/SQLTransaction.cpp:
1557 (WebCore::SQLTransaction::SQLTransaction):
1558 (WebCore::SQLTransaction::debugStepName):
1559 (WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
1560 (WebCore::SQLTransaction::performPendingCallback): Ditto
1561 (WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
1562 skip straight to cleanupAfterSuccessCallback()
1563 (WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
1564 schedule cleanupAfterSuccessCallback()
1565 (WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
1566 (WebCore::SQLTransaction::handleTransactionError):
1567 (WebCore::SQLTransaction::deliverTransactionErrorCallback):
1568 (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1569 * storage/SQLTransaction.h:
1571 2008-02-12 Steve Falkenburg <sfalken@apple.com>
1573 Changes to support merged MIDL output.
1575 All COM interfaces are now generated to WebKit.h.
1577 Reviewed by Sam, Ada.
1579 * bindings/scripts/CodeGeneratorCOM.pm:
1581 2008-02-12 Dan Bernstein <mitz@apple.com>
1583 Reviewed by Adam Roben.
1585 - fix http://bugs.webkit.org/show_bug.cgi?id=17041
1586 <rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
1588 Revised the system fallback font lookup logic to use MLang font linking
1589 again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
1590 for CJK characters, try linking based on a single code page at a time,
1591 starting with the user's default code page (if it is one of the CJK
1592 code pages) followed by the other CJK code pages in a prescribed order
1593 that matches what Firefox does.
1595 * platform/graphics/win/FontCacheWin.cpp:
1596 (WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
1597 code pages, with the user's default code page first.
1598 (WebCore::currentFontContainsCharacter): Factored out of
1599 getFontDataForCharacters().
1600 (WebCore::createMLangFont): Ditto.
1601 (WebCore::FontCache::getFontDataForCharacters):
1603 2008-02-12 Rodney Dawes <dobey@wayofthemonkey.com>
1605 Reviewed by Alp Toker.
1607 Add -DMAEMO_CHANGES when the hildon CONFIG option is specified
1608 Add hildon-1 to PKGCONFIG when hildon CONFIG option is specified
1612 2008-02-12 Dan Bernstein <mitz@apple.com>
1614 Reviewed by Timothy Hatcher.
1616 - <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
1618 * platform/graphics/cg/GraphicsContextCG.cpp:
1619 (WebCore::GraphicsContext::setShadow):
1621 2008-02-12 Brady Eidson <beidson@apple.com>
1625 * storage/DatabaseTask.cpp:
1627 2008-02-12 Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
1631 http://bugs.webkit.org/show_bug.cgi?id=17177
1632 <rdar://problem/5729619> Storage tasks are getting lost
1634 <rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
1636 <rdar://problem/5729446> Major thread safety issue in Database code
1638 * platform/MessageQueue.h: Added a thread-safe queue abstraction.
1640 * WebCore.vcproj/WebCore.vcproj:
1641 * WebCore.xcodeproj/project.pbxproj:
1642 Added MessageQueue.h.
1645 (WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
1647 * storage/Database.idl: Fixed parameter declarations to actually match implementation
1648 (which is custom, so it got out of sync).
1650 * storage/DatabaseTask.h:
1651 (WebCore::DatabaseTask::database):
1652 (WebCore::DatabaseTransactionTask::transaction):
1653 Changed tasks to hold more information internally. Added helpers for better debug logging.
1655 * storage/DatabaseTask.cpp:
1656 (WebCore::DatabaseTask::DatabaseTask):
1657 (WebCore::DatabaseTask::performTask):
1658 (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1659 (WebCore::DatabaseOpenTask::doPerformTask):
1660 (WebCore::DatabaseOpenTask::debugTaskName):
1661 (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
1662 (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
1663 (WebCore::DatabaseTransactionTask::doPerformTask):
1664 (WebCore::DatabaseTransactionTask::debugTaskName):
1665 (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1666 (WebCore::DatabaseTableNamesTask::doPerformTask):
1667 (WebCore::DatabaseTableNamesTask::debugTaskName):
1668 Implementation for the above.
1670 (WebCore::DatabaseTask::lockForSynchronousScheduling):
1671 (WebCore::DatabaseTask::waitForSynchronousCompletion):
1672 Fixed a potential race condition: if the task completed before we entered a wait, we'd never
1673 wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
1675 * storage/DatabaseThread.cpp:
1676 (WebCore::DatabaseThread::DatabaseThread):
1677 (WebCore::DatabaseThread::requestTermination):
1678 (WebCore::DatabaseThread::databaseThread):
1679 (WebCore::DatabaseThread::scheduleTask):
1680 (WebCore::DatabaseThread::scheduleImmediateTask):
1681 (WebCore::DatabaseThread::unscheduleDatabaseTasks):
1682 * storage/DatabaseThread.h:
1683 Changed to use MessageQueue.
1685 * storage/Database.cpp:
1686 (WebCore::guidMutex):
1687 (WebCore::guidToVersionMap):
1688 (WebCore::guidToDatabaseMap):
1689 (WebCore::Database::openDatabase):
1690 (WebCore::Database::Database):
1691 (WebCore::Database::~Database):
1692 (WebCore::Database::openAndVerifyVersion):
1693 (WebCore::guidForOriginAndName):
1694 (WebCore::Database::changeVersion):
1695 (WebCore::Database::transaction):
1696 (WebCore::Database::scheduleTransaction):
1697 (WebCore::Database::scheduleTransactionStep):
1698 (WebCore::Database::scheduleTransactionCallback):
1699 (WebCore::Database::version):
1700 (WebCore::Database::deliverPendingCallback):
1701 (WebCore::Database::tableNames):
1702 * storage/Database.h:
1703 Changed m_transactionQueue to a MessageQueue.
1704 Got rid of callback tracking - these can take care of themselves.
1705 Got rid of a DatabaseThread member, as the Document can be asked for it.
1706 Moved private static members and helpers out of the header.
1707 Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
1709 * storage/SQLTransaction.h:
1710 * storage/SQLTransaction.cpp: Added a lot of debug logging.
1711 (WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
1712 as it created a race condition. Everything seems to work better without it, although a real fix
1713 would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
1715 * manual-tests/database-threading-stress-test-2.html: Added.
1716 * manual-tests/database-threading-stress-test.html: Added.
1718 2008-02-12 Adam Roben <aroben@apple.com>
1720 Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
1722 <http://bugs.webkit.org/show_bug.cgi?id=17328>
1727 Test: fast/loader/local-css-allowed-in-strict-mode.html
1729 * platform/network/cf/ResourceResponseCFNet.cpp:
1730 (WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
1733 2008-02-12 Anders Carlsson <andersca@apple.com>
1737 * loader/ImageDocument.cpp:
1739 2008-02-12 Anders Carlsson <andersca@apple.com>
1743 Make the code that sets the image title cross platform.
1745 * WebCore.xcodeproj/project.pbxproj:
1746 Remove ImageDocumentMac.
1748 * loader/ImageDocument.cpp:
1749 (WebCore::ImageTokenizer::finish):
1751 * loader/mac/ImageDocumentMac.h: Removed.
1752 * loader/mac/ImageDocumentMac.mm: Removed.
1754 * page/mac/WebCoreFrameBridge.h:
1755 * page/mac/WebCoreViewFactory.h:
1756 Move imageTitleForFilename:size from the bridge to
1759 * platform/LocalizedStrings.h:
1762 * platform/mac/LocalizedStringsMac.mm:
1763 (WebCore::imageTitle):
1764 Have imageTitle call the view factory.
1766 * platform/qt/Localizations.cpp:
1767 (WebCore::imageTitle):
1768 * platform/wx/LocalizedStringsWx.cpp:
1769 (WebCore::imageTitle):
1770 * platform/gtk/LocalizedStringsGtk.cpp:
1771 (WebCore::imageTitle):
1774 2008-02-12 Oliver Hunt <oliver@apple.com>
1778 * html/HTMLCanvasElement.cpp:
1779 (WebCore::HTMLCanvasElement::paint):
1781 2008-02-12 Oliver Hunt <oliver@apple.com>
1783 And another attempt to fixerate Qt
1785 * html/HTMLCanvasElement.cpp:
1786 (WebCore::HTMLCanvasElement::paint):
1788 2008-02-12 Oliver Hunt <oliver@apple.com>
1790 Attempt to fix Qt build
1792 * html/HTMLCanvasElement.h:
1794 2008-02-11 Oliver Hunt <oliver@apple.com>
1796 Reviewed by Alp Toker.
1798 Make canvas use an ImageBuffer for its backing store
1800 In order to make the canvas implementation less platform dependent
1801 (and thus reduce the current quagmire of ifdefs) we now use an
1802 ImageBuffer to provide the backing buffer, an immediate consequence
1803 of this is to remove multiple ifdefs in the construction of the
1804 buffer. This patch allows us to further reduce the platform
1805 dependencies in later patches.
1808 * html/CanvasRenderingContext2D.cpp:
1809 (WebCore::CanvasRenderingContext2D::drawImage):
1810 * html/HTMLCanvasElement.cpp:
1811 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1812 (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1813 (WebCore::HTMLCanvasElement::reset):
1814 (WebCore::HTMLCanvasElement::paint):
1815 (WebCore::HTMLCanvasElement::createDrawingContext):
1816 (WebCore::HTMLCanvasElement::drawingContext):
1817 (WebCore::HTMLCanvasElement::createPlatformImage):
1818 * html/HTMLCanvasElement.h:
1820 2008-02-11 Dan Bernstein <mitz@apple.com>
1822 Reviewed by Dave Hyatt.
1824 - fix http://bugs.webkit.org/show_bug.cgi?id=17320
1825 <rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
1827 Test: fast/css/last-child-style-sharing.html
1829 * css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
1830 CSS3 selectors that require it.
1832 2008-02-11 Sam Weinig <sam@webkit.org>
1834 Reviewed by Darin Adler.
1836 Make the cross-domain security model more closely match Firefox by always returning the
1837 native built-in functions when accessing functions cross-domain.
1840 <rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden
1841 <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
1843 Tests: fast/dom/Window/window-custom-prototype-crash.html
1844 fast/dom/Window/window-function-frame-getter-precedence.html
1845 http/tests/security/cross-frame-access-get-override.html
1846 http/tests/security/cross-frame-access-location-get-override.html
1847 http/tests/security/cross-frame-access-location-get.html
1848 http/tests/security/cross-frame-access-location-put.html
1850 * bindings/js/JSDOMWindowCustom.cpp:
1851 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1852 - Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
1853 not it has been overridden, instead of undefined.
1854 - When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable)
1855 instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
1856 - Allow access to the native toString function cross-domain. It always returns "[object Window]".
1857 - Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
1858 the function an overridden function is not inadvertantly returned from the PropertyMap.\
1860 * bindings/js/JSHistoryCustom.cpp:
1861 (WebCore::JSHistory::customGetOwnPropertySlot):
1862 - Implement the same model as described above for the History object, always returning the
1863 native built-in function cross-domain.
1864 - Allow access to the native toString function cross-domain.
1865 - Clean up the code to make it clear that the custom functionality is only there for cross-domain
1868 * bindings/js/JSLocation.cpp:
1869 (WebCore::JSLocation::getOwnPropertySlot):
1870 - Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
1871 function. This will help moving to a generated class in the future.
1872 (WebCore::JSLocation::customGetOwnPropertySlot):
1873 - Implement the same model as described above for the Location object, always returning the
1874 native built-in function cross-domain.
1875 - Clean up the code to make it clear that the custom functionality is only there for cross-domain
1877 (WebCore::JSLocation::put):
1878 (WebCore::JSLocation::deleteProperty):
1879 (WebCore::JSLocation::getPropertyNames):
1880 * bindings/js/JSLocation.h:
1881 - Clean up to match the rest of the file a little better.
1883 * bindings/js/kjs_binding.cpp:
1884 (WebCore::allowsAccessFromFrame):
1885 (WebCore::printErrorMessageForFrame):
1886 (WebCore::nonCachingStaticFunctionGetter):
1887 (WebCore::objectToStringFunctionGetter):
1888 * bindings/js/kjs_binding.h:
1889 - Put common functionality related to cross-domain access here to serve as a central shared point.
1890 This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
1893 * bindings/js/kjs_dom.cpp:
1894 (WebCore::checkNodeSecurity):
1895 - Use the new allowsAccessFromFrame method.
1897 * bindings/js/kjs_window.cpp:
1898 (KJS::Window::childFrameGetter): Cleanup.
1899 (KJS::Window::namedItemGetter): Cleanup.
1900 (KJS::Window::getOwnPropertySlot):
1901 - Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
1902 than the index or shortcut name getters.
1903 - Cleanup function to make it more understandable and slightly more efficient.
1904 (KJS::Window::allowsAccessFrom):
1905 - Add a new variant of this method that takes a reference to a String, which, on failure, will
1906 contain the error message to print out. The caller can then pass this to printErrorMessage.
1907 This allows for code to check allowsAccessFrom and act on the result without printing out the
1908 error message. For convenience, a version with out the String parameter has been left which
1909 prints out the message automatically.
1910 (KJS::Window::printErrorMessage):
1911 * bindings/js/kjs_window.h:
1913 2008-02-11 Darin Adler <darin@apple.com>
1917 - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
1918 incorrectly due to visibility fix
1920 Added an Xcode-specific quirk.
1922 * WebCore.base.exp: Added export for new Settings function.
1923 * css/CSSMutableStyleDeclaration.cpp:
1924 (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
1925 If you try to change the visibilty on a node with the class name tab_content,
1926 instead it will use display:none.
1927 * page/Settings.cpp:
1928 (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
1929 initialize m_fontRenderingMode! This seems like it was a bug before, but we
1930 probably were getting lucky and always getting 0 on Windows, which is the
1931 only place the setting matters.
1932 (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
1934 (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
1936 2008-02-11 Timothy Hatcher <timothy@apple.com>
1938 Reviewed by Brady Eidson.
1940 <rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
1942 * storage/DatabaseTracker.cpp:
1943 (WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1944 (WebCore::DatabaseTracker::origins): Ditto.
1945 (WebCore::DatabaseTracker::setQuota): Ditto.
1946 (WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
1947 origins to call deleteOrigin().
1948 (WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1950 2008-02-11 David Hyatt <hyatt@apple.com>
1952 Fix for bug 17286, crash accessing a null RenderStyle. Add a simple null check.
1956 Added fast/css/empty-generated-content.html
1958 * css/CSSStyleSelector.cpp:
1959 (WebCore::CSSStyleSelector::checkOneSelector):
1961 2008-02-11 Rob Buis <buis@kde.org>
1963 Reviewed by David Kilzer.
1965 http://bugs.webkit.org/show_bug.cgi?id=17201
1966 Bug 17201: Use RefPtr in CSSParser::parseFont() to get rid of goto silliness
1968 Gets rid of goto usage in parseFont.
1970 * css/CSSParser.cpp:
1971 (WebCore::CSSParser::parseFont):
1973 2008-02-11 David Hyatt <hyatt@apple.com>
1975 Fix for bug 17298, Acid3 text should be black and not red. Make sure stylesheets with the wrong MIME type
1976 are not accepted in strict mode.
1980 Added http/tests/misc/css-reject-in-strict-mode.html
1982 * css/CSSImportRule.cpp:
1983 (WebCore::CSSImportRule::setCSSStyleSheet):
1984 * css/CSSImportRule.h:
1986 (WebCore::Document::setCSSStyleSheet):
1988 * dom/ProcessingInstruction.cpp:
1989 (WebCore::ProcessingInstruction::setCSSStyleSheet):
1990 * dom/ProcessingInstruction.h:
1991 * html/HTMLLinkElement.cpp:
1992 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1993 * html/HTMLLinkElement.h:
1994 * html/HTMLMediaElement.cpp:
1995 (WebCore::HTMLMediaElement::pickMedia):
1996 * loader/CachedCSSStyleSheet.cpp:
1997 (WebCore::CachedCSSStyleSheet::ref):
1998 (WebCore::CachedCSSStyleSheet::checkNotify):
1999 (WebCore::CachedCSSStyleSheet::canUseSheet):
2000 * loader/CachedCSSStyleSheet.h:
2001 (WebCore::CachedCSSStyleSheet::sheetText):
2002 * loader/CachedResourceClient.h:
2003 (WebCore::CachedResourceClient::setCSSStyleSheet):
2004 * loader/mac/UserStyleSheetLoader.cpp:
2005 (UserStyleSheetLoader::setCSSStyleSheet):
2006 * loader/mac/UserStyleSheetLoader.h:
2008 2008-02-11 Adam Roben <aroben@apple.com>
2010 Fix Bug 14316: Inspector's Console truncates long strings
2012 <http://bugs.webkit.org/show_bug.cgi?id=14316>
2015 We no longer call Object.describe to format all the output of commands
2016 enetered into the Console. The ConsolePanel object now has a set of
2017 formatting functions that append a formatted representation of the
2018 passed-in object to the passed-in container node.
2022 * page/inspector/ConsolePanel.js:
2023 (WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
2024 _outputToNode to _format.
2025 (WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
2026 Object.type to get the type of the object, then call the appropriate
2027 formatting function.
2028 (WebInspector.ConsolePanel._formatvalue): Added.
2029 (WebInspector.ConsolePanel._formatstring): Added. This function
2030 contains the actual fix for the bug, since it doesn't truncate the
2031 string no matter how long it is.
2032 (WebInspector.ConsolePanel._formatregexp): Added.
2033 (WebInspector.ConsolePanel._formatarray): Added. This is a bit more
2034 functional than Object.describe for arrays, since it recursively
2035 formats each item in the array. One advantage of this is that Nodes in
2036 arrays will be linkified instead of just turning into "[Object
2037 HTMLBodyElement]" or similar.
2038 (WebInspector.ConsolePanel._formatnode): Added.
2039 (WebInspector.ConsolePanel._formatobject): Added.
2040 (WebInspector.ConsolePanel.
2041 * page/inspector/utilities.js:
2042 (Object.type): Added. Code was pulled out of Object.describe and
2043 reorganized slightly.
2044 (Object.describe): Call Object.type. There should be no change in
2045 behavior of this function.
2047 2008-02-11 Alp Toker <alp@atoker.com>
2049 Wx build fix for breakage introduced in r30142. Spotted by Darin.
2051 * platform/network/curl/ResourceHandleManager.cpp:
2052 (WebCore::parseDataUrl):
2054 2008-02-11 Brent Fulgham <bfulgham@gmail.com>
2056 Reviewed and tweaked by Darin
2058 - http://bugs.webkit.org/show_bug.cgi?id=17299
2059 a couple compilation fixes for Cairo/Win32 configuration
2061 * platform/graphics/cairo/ImageSourceCairo.cpp:
2062 (WebCore::createDecoder): Turn off XBMImageDecoder for PLATFORM(WIN) configuration.
2063 * rendering/RenderThemeWin.cpp:
2064 (WebCore::prepareForDrawing): Added IntRect parameter.
2065 (WebCore::doneDrawing): Ditto.
2066 (WebCore::RenderThemeWin::paintButton): Ditto.
2067 (WebCore::RenderThemeWin::paintTextField): Ditto.
2068 (WebCore::RenderThemeWin::paintMenuListButton): Ditto.
2069 (WebCore::RenderThemeWin::systemFont): Added.
2071 2008-02-11 Alp Toker <alp@atoker.com>
2075 Acid3 data URL parsing fix for the GTK+ port.
2077 Avoid WebCore's base64Decode() when possible since it's not a
2078 general-purpose Base64 decoder and fails on newlines.
2080 * platform/network/curl/ResourceHandleManager.cpp:
2081 (WebCore::parseDataUrl):
2083 2008-02-11 Darin Adler <darin@apple.com>
2085 - another Qt build fix
2087 * platform/qt/PopupMenuQt.cpp:
2088 (WebCore::PopupMenu::PopupMenu): Added explicit RefCounted constructor.
2090 2008-02-10 Darin Adler <darin@apple.com>
2092 - another Qt build fix (wish the Qt bot wouldn't stop on the first error)
2094 * platform/qt/FileChooserQt.cpp:
2095 (WebCore::FileChooser::FileChooser): Added explicit RefCounted constructor.
2097 2008-02-10 Darin Adler <darin@apple.com>
2099 - another Qt build fix
2101 * platform/graphics/qt/IconQt.cpp:
2102 (WebCore::Icon::Icon): Added explicit RefCounted constructor.
2104 2008-02-10 Alp Toker <alp@atoker.com>
2106 Another Win build fix for r30133 breakage.
2108 * plugins/win/PluginPackageWin.cpp:
2109 (WebCore::PluginPackage::PluginPackage):
2111 2008-02-10 Alp Toker <alp@atoker.com>
2113 Build fix GTK+ and prospective build fix for Win breakage introduced
2116 * platform/Cursor.h:
2117 (WebCore::SharedCursor::SharedCursor):
2118 * platform/graphics/gtk/IconGtk.cpp:
2119 (WebCore::Icon::Icon):
2120 * platform/gtk/FileChooserGtk.cpp:
2121 (WebCore::FileChooser::FileChooser):
2122 * platform/gtk/PopupMenuGtk.cpp:
2123 (WebCore::PopupMenu::PopupMenu):
2125 2008-02-10 Darin Adler <darin@apple.com>
2127 - try to fix Win, Qt, GTK, and WX builds
2129 * platform/Cursor.h:
2130 (WebCore::SharedCursor::SharedCursor): Added explicit RefCounted constructor.
2131 * platform/graphics/win/IconWin.cpp:
2132 (WebCore::Icon::Icon): Ditto.
2133 * platform/win/FileChooserWin.cpp:
2134 (WebCore::FileChooser::FileChooser): Ditto.
2135 * platform/win/PopupMenuWin.cpp:
2136 (WebCore::PopupMenu::PopupMenu): Ditto.
2137 * platform/wx/TemporaryLinkStubs.cpp:
2138 (FileChooser::FileChooser): Ditto.
2139 (PopupMenu::PopupMenu): Ditto.
2140 (Icon::Icon): Ditto.
2141 * plugins/PluginStream.cpp:
2142 (WebCore::PluginStream::PluginStream): Ditto.
2144 2008-02-10 David Hyatt <hyatt@apple.com>
2146 Fix for bug 17082, cssRules should be live.
2150 Added fast/css/live-cssrules.html
2152 * css/CSSRuleList.cpp:
2153 (WebCore::CSSRuleList::CSSRuleList):
2154 (WebCore::CSSRuleList::length):
2155 (WebCore::CSSRuleList::item):
2156 (WebCore::CSSRuleList::deleteRule):
2157 (WebCore::CSSRuleList::insertRule):
2158 * css/CSSRuleList.h:
2160 2008-02-10 David Hyatt <hyatt@apple.com>
2162 Fix for bug 17253. <iframe> contents need to be reflected into the DOM as a single text node.
2166 fast/frames/iframe-text-contents.html
2168 * html/HTMLParser.cpp:
2169 (WebCore::HTMLParser::getNode):
2170 * html/HTMLTokenizer.cpp:
2171 (WebCore::HTMLTokenizer::parseSpecial):
2172 (WebCore::HTMLTokenizer::parseComment):
2173 (WebCore::HTMLTokenizer::parseTag):
2174 * html/HTMLTokenizer.h:
2175 (WebCore::HTMLTokenizer::State::inIFrame):
2176 (WebCore::HTMLTokenizer::State::setInIFrame):
2177 (WebCore::HTMLTokenizer::State::inAnySpecial):
2178 (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2179 (WebCore::HTMLTokenizer::State::):
2181 2008-02-10 Andrew Wellington <proton@wiretapped.net>
2183 Reviewed and tweaked by Darin.
2185 DOMRange.surroundContents throws wrong exception (Acid3 bug)
2186 http://bugs.webkit.org/show_bug.cgi?id=16749
2188 Throw BAD_BOUNDARYPOINTS_ERR if attempting to split a non-text node that
2189 has offsets in characters.
2192 (WebCore::Range::surroundContents):
2194 2008-02-10 Darin Adler <darin@apple.com>
2198 - http://bugs.webkit.org/show_bug.cgi?id=17256
2199 Make clients of RefCounted explicitly set the count to 0.
2201 * bindings/js/JSSVGPODTypeWrapper.h:
2202 (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
2203 * css/CSSFontFace.h:
2204 (WebCore::CSSFontFace::CSSFontFace):
2205 * css/CSSRuleList.cpp:
2206 (WebCore::CSSRuleList::CSSRuleList):
2207 * css/CSSSegmentedFontFace.cpp:
2208 (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
2210 (WebCore::Counter::Counter):
2212 (WebCore::Pair::Pair):
2214 (WebCore::Rect::Rect):
2216 (WebCore::StyleBase::StyleBase):
2217 * css/StyleSheetList.cpp:
2218 (WebCore::StyleSheetList::StyleSheetList):
2220 (WebCore::Attr::Attr):
2223 (WebCore::Attribute::Attribute):
2224 * dom/Clipboard.cpp:
2225 (WebCore::Clipboard::Clipboard):
2226 * dom/DOMImplementation.h:
2227 (WebCore::DOMImplementation::DOMImplementation):
2229 (WebCore::Event::Event):
2230 * dom/EventListener.h:
2231 (WebCore::EventListener::EventListener):
2232 * dom/ExceptionBase.cpp:
2233 (WebCore::ExceptionBase::ExceptionBase):
2234 * dom/NamedAttrMap.h:
2235 (WebCore::NamedAttrMap::insertAttribute):
2236 * dom/NamedNodeMap.h:
2237 (WebCore::NamedNodeMap::NamedNodeMap):
2239 (WebCore::NodeFilter::NodeFilter):
2240 * dom/NodeFilterCondition.h:
2241 (WebCore::NodeFilterCondition::NodeFilterCondition):
2243 (WebCore::NodeList::NodeList):
2244 * dom/QualifiedName.h:
2245 (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
2246 (WebCore::QualifiedName::ref):
2248 (WebCore::Range::Range):
2249 * dom/RegisteredEventListener.cpp:
2250 (WebCore::RegisteredEventListener::RegisteredEventListener):
2251 * dom/StyledElement.h:
2252 * dom/Traversal.cpp:
2253 (WebCore::Traversal::Traversal):
2254 * editing/EditCommand.cpp:
2255 (WebCore::EditCommand::EditCommand):
2256 * history/BackForwardList.cpp:
2257 (WebCore::BackForwardList::BackForwardList):
2258 * history/CachedPage.cpp:
2259 (WebCore::CachedPage::CachedPage):
2260 * history/HistoryItem.cpp:
2261 (WebCore::HistoryItem::HistoryItem):
2262 * html/CanvasGradient.cpp:
2263 (WebCore::CanvasGradient::CanvasGradient):
2264 * html/CanvasPattern.cpp:
2265 (WebCore::CanvasPattern::CanvasPattern):
2266 * html/CanvasRenderingContext2D.cpp:
2267 (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2268 * html/CanvasStyle.cpp:
2269 (WebCore::CanvasStyle::CanvasStyle):
2270 * html/HTMLCollection.cpp:
2271 (WebCore::HTMLCollection::HTMLCollection):
2272 * html/MediaError.h:
2273 (WebCore::MediaError::MediaError):
2274 * html/TimeRanges.cpp:
2275 (TimeRanges::TimeRanges):
2276 * html/TimeRanges.h:
2277 (WebCore::TimeRanges::TimeRanges):
2278 * html/VoidCallback.h:
2279 (WebCore::VoidCallback::VoidCallback):
2280 * loader/DocumentLoader.cpp:
2281 (WebCore::DocumentLoader::DocumentLoader):
2282 * loader/FormState.cpp:
2283 (WebCore::FormState::FormState):
2284 * loader/ResourceLoader.cpp:
2285 (WebCore::ResourceLoader::ResourceLoader):
2286 * loader/TextResourceDecoder.cpp:
2287 (WebCore::TextResourceDecoder::TextResourceDecoder):
2288 * loader/icon/IconRecord.cpp:
2289 (WebCore::IconRecord::IconRecord):
2291 (WebCore::BarInfo::BarInfo):
2293 (WebCore::Console::Console):
2294 * page/DOMSelection.cpp:
2295 (WebCore::DOMSelection::DOMSelection):
2296 * page/DOMWindow.cpp:
2297 (WebCore::DOMWindow::DOMWindow):
2299 (WebCore::Frame::Frame):
2301 (WebCore::History::History):
2302 * page/InspectorController.cpp:
2303 (WebCore::InspectorResource::InspectorResource):
2304 (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2306 (WebCore::Plugin::Plugin):
2308 (WebCore::Screen::Screen):
2309 * platform/ArrayImpl.cpp:
2310 (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
2311 * platform/DeprecatedValueListImpl.cpp:
2312 (WebCore::DeprecatedValueListImpl::Private::Private):
2313 * platform/ScrollBar.cpp:
2314 (WebCore::Scrollbar::Scrollbar):
2315 * platform/SharedBuffer.cpp:
2316 (WebCore::SharedBuffer::SharedBuffer):
2317 * platform/graphics/FontFallbackList.cpp:
2318 (WebCore::FontFallbackList::FontFallbackList):
2319 * platform/graphics/FontFamily.cpp:
2320 (WebCore::FontFamily::FontFamily):
2321 * platform/graphics/FontFamily.h:
2322 (WebCore::FontFamily::FontFamily):
2323 * platform/graphics/FontSelector.h:
2324 (WebCore::FontSelector::FontSelector):
2325 (WebCore::FontSelector::~FontSelector):
2326 * platform/graphics/GlyphPageTreeNode.h:
2327 (WebCore::GlyphPage::GlyphPage):
2328 * platform/graphics/mac/IconMac.mm:
2329 (WebCore::Icon::Icon):
2330 * platform/mac/FileChooserMac.mm:
2331 (WebCore::FileChooser::FileChooser):
2332 * platform/mac/PopupMenuMac.mm:
2333 (WebCore::PopupMenu::PopupMenu):
2334 * platform/mac/SharedBufferMac.mm:
2335 (WebCore::SharedBuffer::SharedBuffer):
2336 * platform/network/FormData.cpp:
2337 (WebCore::FormData::FormData):
2338 * platform/network/FormData.h:
2339 (WebCore::FormData::FormData):
2340 * platform/network/ResourceHandle.cpp:
2341 (WebCore::ResourceHandle::ResourceHandle):
2342 * platform/text/CString.h:
2343 (WebCore::CStringBuffer::CStringBuffer):
2344 * platform/text/RegularExpression.cpp:
2345 (WebCore::RegularExpression::Private::Private):
2346 * rendering/RenderStyle.cpp:
2347 (WebCore::StyleSurroundData::StyleSurroundData):
2348 (WebCore::StyleBoxData::StyleBoxData):
2349 (WebCore::StyleVisualData::StyleVisualData):
2350 (WebCore::StyleBackgroundData::StyleBackgroundData):
2351 (WebCore::StyleMarqueeData::StyleMarqueeData):
2352 (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2353 (WebCore::StyleMultiColData::StyleMultiColData):
2354 (WebCore::StyleTransformData::StyleTransformData):
2355 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2356 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2357 (WebCore::StyleInheritedData::StyleInheritedData):
2358 * rendering/RenderStyle.h:
2359 (WebCore::TransformOperation::TransformOperation):
2360 (WebCore::CursorList::CursorList):
2361 * rendering/SVGCharacterLayoutInfo.h:
2362 (WebCore::SVGCharOnPath::SVGCharOnPath):
2363 * rendering/SVGRenderStyle.cpp:
2364 (WebCore::SVGRenderStyle::SVGRenderStyle):
2365 * rendering/SVGRenderStyle.h:
2366 (WebCore::SVGRenderStyle::SVGRenderStyle):
2367 * rendering/SVGRenderStyleDefs.cpp:
2368 (StyleFillData::StyleFillData):
2369 (StyleStrokeData::StyleStrokeData):
2370 (StyleStopData::StyleStopData):
2371 (StyleTextData::StyleTextData):
2372 (StyleClipData::StyleClipData):
2373 (StyleMaskData::StyleMaskData):
2374 (StyleMarkerData::StyleMarkerData):
2375 (StyleMiscData::StyleMiscData):
2376 * storage/SQLResultSetRowList.h:
2377 (WebCore::SQLResultSetRowList::SQLResultSetRowList):
2379 (WebCore::SVGAngle::SVGAngle):
2380 * svg/SVGAnimatedTemplate.h:
2381 (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
2382 * svg/SVGElementInstanceList.cpp:
2383 (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2385 (WebCore::SVGList::SVGList):
2386 (WebCore::SVGPODListItem::SVGPODListItem):
2388 (WebCore::SVGPathSeg::SVGPathSeg):
2389 * svg/SVGPreserveAspectRatio.cpp:
2390 (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2391 * svg/SVGRenderingIntent.h:
2392 (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2393 * svg/SVGUnitTypes.h:
2394 (WebCore::SVGUnitTypes::SVGUnitTypes):
2395 * svg/graphics/SVGPaintServerGradient.h:
2396 (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2397 * svg/graphics/SVGResource.cpp:
2398 (WebCore::SVGResource::SVGResource):
2400 (WebCore::DOMParser::DOMParser):
2401 * xml/XMLHttpRequest.cpp:
2402 (WebCore::XMLHttpRequest::XMLHttpRequest):
2403 * xml/XMLSerializer.h:
2404 (WebCore::XMLSerializer::XMLSerializer):
2405 * xml/XPathEvaluator.h:
2406 (WebCore::XPathEvaluator::XPathEvaluator):
2407 * xml/XPathExpression.h:
2408 (WebCore::XPathExpression::XPathExpression):
2409 * xml/XPathNSResolver.h:
2410 (WebCore::XPathNSResolver::XPathNSResolver):
2411 * xml/XPathResult.cpp:
2412 (WebCore::XPathResult::XPathResult):
2414 (WebCore::XPath::ValueData::ValueData):
2415 * xml/XSLTProcessor.h:
2416 (WebCore::XSLTProcessor::XSLTProcessor):
2418 2008-02-09 Kevin Ollivier <kevino@theolliviers.com>
2420 Reviewed by Eric Seidel.
2422 Calling select() when all the file descriptors are NULL
2423 stops the file download on Windows. As a result, do not
2424 call select() when there are no valid descriptors.
2426 http://bugs.webkit.org/show_bug.cgi?id=17178
2428 * platform/network/curl/ResourceHandleManager.cpp:
2429 (WebCore::ResourceHandleManager::downloadTimerCallback):
2431 2008-02-09 Dan Bernstein <mitz@apple.com>
2433 Reviewed by Sam Weinig.
2435 - fix http://bugs.webkit.org/show_bug.cgi?id=17259
2436 Element::recalcStyle() needlessly null-checks the result of styleForElement()
2439 (WebCore::Element::recalcStyle): Removed unneeded null checks.
2440 styleForElement() can never return null.
2442 2008-02-09 David Hyatt <hyatt@apple.com>
2444 Fix for bug 17254, nth-* selectors do not work with negative coefficients.
2448 fast/css/negative-nth-child.html
2450 * css/CSSStyleSelector.cpp:
2451 (WebCore::parseNth):
2453 2008-02-09 David Hyatt <hyatt@apple.com>
2455 Fix for bug 17203, high CPU usage loading HTML5 spec. This patch significantly improves the performance
2458 (1) Split the notion of being affected by positional rules into "forward" and "backward." The "forward"
2459 selectors do not need to re-resolve during parsing, since children are appended on the end. Only the
2460 "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
2462 (2) Extend childrenChanged to specify whether the children were changed by the parser or not. This allows
2463 Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
2466 (3) Make sure all Elements now know whether or not their children are currently parsing. Backwards selectors
2467 like last-child will always return false when children are still being parsed. When an Element finishes
2468 parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
2470 (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
2472 (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
2474 (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
2475 base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
2479 * css/CSSStyleSelector.cpp:
2480 (WebCore::CSSStyleSelector::checkSelector):
2481 (WebCore::CSSStyleSelector::checkOneSelector):
2483 (WebCore::Attr::childrenChanged):
2485 * dom/ContainerNode.cpp:
2486 (WebCore::ContainerNode::addChild):
2488 (WebCore::Document::childrenChanged):
2491 (WebCore::Element::Element):
2492 (WebCore::Element::recalcStyle):
2493 (WebCore::checkFirstChildRules):
2494 (WebCore::checkLastChildRules):
2495 (WebCore::checkEmptyRules):
2496 (WebCore::checkStyleRules):
2497 (WebCore::Element::childrenChanged):
2498 (WebCore::Element::finishParsingChildren):
2500 (WebCore::Element::finishedParsingChildren):
2501 (WebCore::Element::beginParsingChildren):
2504 (WebCore::Node::finishParsingChildren):
2505 (WebCore::Node::beginParsingChildren):
2506 (WebCore::Node::childrenChanged):
2507 * dom/StyledElement.cpp:
2508 (WebCore::StyledElement::StyledElement):
2509 * dom/StyledElement.h:
2510 * dom/XMLTokenizer.cpp:
2511 (WebCore::XMLTokenizer::startElementNs):
2512 (WebCore::XMLTokenizer::endElementNs):
2514 * html/HTMLAppletElement.cpp:
2515 (WebCore::HTMLAppletElement::HTMLAppletElement):
2516 (WebCore::HTMLAppletElement::finishParsingChildren):
2517 * html/HTMLAppletElement.h:
2518 * html/HTMLElementFactory.cpp:
2519 (WebCore::objectConstructor):
2520 * html/HTMLGenericFormElement.cpp:
2521 (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2522 * html/HTMLGenericFormElement.h:
2523 * html/HTMLObjectElement.cpp:
2524 (WebCore::HTMLObjectElement::HTMLObjectElement):
2525 (WebCore::HTMLObjectElement::finishParsingChildren):
2526 (WebCore::HTMLObjectElement::childrenChanged):
2527 * html/HTMLObjectElement.h:
2528 * html/HTMLOptGroupElement.cpp:
2529 (WebCore::HTMLOptGroupElement::childrenChanged):
2530 * html/HTMLOptGroupElement.h:
2531 * html/HTMLOptionElement.cpp:
2532 (WebCore::HTMLOptionElement::childrenChanged):
2533 * html/HTMLOptionElement.h:
2534 * html/HTMLParser.cpp:
2535 (WebCore::HTMLParser::insertNode):
2536 (WebCore::HTMLParser::pushBlock):
2537 (WebCore::HTMLParser::popOneBlockCommon):
2538 * html/HTMLScriptElement.cpp:
2539 (WebCore::HTMLScriptElement::childrenChanged):
2540 (WebCore::HTMLScriptElement::finishParsingChildren):
2541 * html/HTMLScriptElement.h:
2542 * html/HTMLSelectElement.cpp:
2543 (WebCore::HTMLSelectElement::childrenChanged):
2544 * html/HTMLSelectElement.h:
2545 * html/HTMLStyleElement.cpp:
2546 (WebCore::HTMLStyleElement::finishParsingChildren):
2547 (WebCore::HTMLStyleElement::childrenChanged):
2548 * html/HTMLStyleElement.h:
2549 * html/HTMLTextAreaElement.cpp:
2550 (WebCore::HTMLTextAreaElement::childrenChanged):
2551 * html/HTMLTextAreaElement.h:
2552 * html/HTMLTitleElement.cpp:
2553 (WebCore::HTMLTitleElement::childrenChanged):
2554 * html/HTMLTitleElement.h:
2555 * rendering/RenderApplet.cpp:
2556 (WebCore::RenderApplet::createWidgetIfNecessary):
2557 * rendering/RenderPartObject.cpp:
2558 (WebCore::RenderPartObject::updateWidget):
2559 * rendering/RenderStyle.cpp:
2560 (WebCore::RenderStyle::RenderStyle):
2561 * rendering/RenderStyle.h:
2562 (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
2563 (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
2564 (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
2565 (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
2566 * svg/SVGAnimationElement.cpp:
2567 (WebCore::SVGAnimationElement::finishParsingChildren):
2568 * svg/SVGAnimationElement.h:
2569 * svg/SVGClipPathElement.cpp:
2570 (WebCore::SVGClipPathElement::childrenChanged):
2571 * svg/SVGClipPathElement.h:
2572 * svg/SVGDefinitionSrcElement.cpp:
2573 (WebCore::SVGDefinitionSrcElement::childrenChanged):
2574 * svg/SVGDefinitionSrcElement.h:
2575 * svg/SVGElement.cpp:
2576 (WebCore::SVGElement::finishParsingChildren):
2578 * svg/SVGFontFaceElement.cpp:
2579 (WebCore::SVGFontFaceElement::childrenChanged):
2580 * svg/SVGFontFaceElement.h:
2581 * svg/SVGFontFaceFormatElement.cpp:
2582 (WebCore::SVGFontFaceFormatElement::childrenChanged):
2583 * svg/SVGFontFaceFormatElement.h:
2584 * svg/SVGFontFaceSrcElement.cpp:
2585 (WebCore::SVGFontFaceSrcElement::childrenChanged):
2586 * svg/SVGFontFaceSrcElement.h:
2587 * svg/SVGFontFaceUriElement.cpp:
2588 (WebCore::SVGFontFaceUriElement::childrenChanged):
2589 * svg/SVGFontFaceUriElement.h:
2590 * svg/SVGGElement.cpp:
2591 (WebCore::SVGGElement::childrenChanged):
2592 * svg/SVGGElement.h:
2593 * svg/SVGGradientElement.cpp:
2594 (WebCore::SVGGradientElement::childrenChanged):
2595 * svg/SVGGradientElement.h:
2596 * svg/SVGMarkerElement.cpp:
2597 (WebCore::SVGMarkerElement::childrenChanged):
2598 * svg/SVGMarkerElement.h:
2599 * svg/SVGMaskElement.cpp:
2600 (WebCore::SVGMaskElement::childrenChanged):
2601 * svg/SVGMaskElement.h:
2602 * svg/SVGPatternElement.cpp:
2603 (WebCore::SVGPatternElement::childrenChanged):
2604 * svg/SVGPatternElement.h:
2605 * svg/SVGStyleElement.cpp:
2606 (WebCore::SVGStyleElement::finishParsingChildren):
2607 (WebCore::SVGStyleElement::childrenChanged):
2608 * svg/SVGStyleElement.h:
2609 * svg/SVGStyledElement.cpp:
2610 (WebCore::SVGStyledElement::childrenChanged):
2611 * svg/SVGStyledElement.h:
2612 * svg/SVGTitleElement.cpp:
2613 (WebCore::SVGTitleElement::childrenChanged):
2614 * svg/SVGTitleElement.h:
2615 * svg/SVGUseElement.cpp:
2616 (WebCore::SVGUseElement::childrenChanged):
2617 * svg/SVGUseElement.h:
2619 2008-02-09 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
2621 Unreviewed build fix
2623 Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
2626 * platform/qt/RenderThemeQt.h:
2628 2008-02-09 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
2632 paintResizeControl is dead, remove the code. This painting
2633 is done by the RenderLayer.
2635 * platform/qt/RenderThemeQt.cpp:
2636 * platform/qt/RenderThemeQt.h:
2637 * rendering/RenderThemeMac.h:
2638 * rendering/RenderThemeMac.mm:
2640 2008-02-07 Kevin Ollivier <kevino@theolliviers.com>
2642 Reviewed by Eric Seidel, Adam Roben.
2645 http://bugs.webkit.org/show_bug.cgi?id=17211
2647 * platform/Threading.h:
2648 - On MSVC7, when the Interlocked* functions are used, the ref count gets out of sync.
2649 (MSVC8 seems not to have this problem.) Use the old implementation which works correctly.
2650 * platform/win/SharedTimerWin.cpp:
2651 - USER_TIMER_MINIMUM/MAXIMUM aren't defined in winuser.h for the MSVC 2003 Platform SDK
2652 so define them if they are not already defined.
2654 2008-02-08 Brent Fulgham <bfulgham@gmail.com>
2656 Reviewed by Adam Roben.
2658 Bug 17226: Fix Windows (Cairo) build of image-decoders
2659 http://bugs.webkit.org/show_bug.cgi?id=17226
2661 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2662 * platform/image-decoders/png/PNGImageDecoder.cpp:
2664 2008-02-08 Timothy Hatcher <timothy@apple.com>
2666 Reviewed by Brady Eidson.
2668 <rdar://problem/5640896> Removing database then trying
2669 to recreate it causes trouble
2671 Added open Database support to DatabaseTracker. So any Database that
2672 is deleted will be marked as deleted and will fail to open any transaction
2673 or execute any new SQL queries.
2675 * storage/Database.cpp:
2676 (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
2677 (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
2678 (WebCore::Database::markAsDeleted): Set the m_deleted flag.
2679 (WebCore::Database::version): Return a null String if m_deleted is true.
2680 * storage/Database.h:
2681 (WebCore::Database::deleted): Return m_deleted.
2682 * storage/DatabaseTracker.cpp:
2683 (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
2684 (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
2685 (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
2686 matching the origin/name.
2687 * storage/DatabaseTracker.h:
2688 * storage/SQLStatement.cpp:
2689 (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
2690 * storage/SQLStatement.h:
2691 * storage/SQLTransaction.cpp:
2692 (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
2693 (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
2694 if the Database was marked as deleted.
2696 2008-02-08 Darin Adler <darin@apple.com>
2700 - fix http://bugs.webkit.org/show_bug.cgi?id=15003
2701 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
2703 Test: fast/js/constructor-attributes.html
2705 * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
2707 2008-02-08 Anders Carlsson <andersca@apple.com>
2711 <rdar://problem/5650446>
2712 http://bugs.webkit.org/show_bug.cgi?id=16102
2713 Crash in FrameLoader::stopLoadingSubframes() on IMDB page
2715 Store the child frame in a RefPtr to prevent it from being deleted when the
2716 frame tree changes while calling stopAllLoaders().
2718 * loader/FrameLoader.cpp:
2719 (WebCore::FrameLoader::stopLoadingSubframes):
2721 2008-02-08 Kevin Ollivier <kevino@theolliviers.com>
2723 wx port build fix. Add time.h to define time_t.
2725 * platform/FileSystem.h:
2727 2008-02-08 Alp Toker <alp@atoker.com>
2729 Reviewed by Adam Roben.
2731 Avoid null-dereference crasher noticed in the GTK+ port and also
2732 affecting the Win debug build.
2734 Covered by existing tests.
2737 (WebCore::Document::userStyleSheet):
2739 2008-02-08 Anders Carlsson <andersca@apple.com>
2743 <rdar://problem/5724188>
2744 REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
2746 Revert r29926 which caused the regression.
2749 (WebCore::Text::createWithLengthLimit):
2751 * html/HTMLParser.cpp:
2752 (WebCore::HTMLParser::parseToken):
2753 * loader/TextDocument.cpp:
2754 (WebCore::TextTokenizer::write):
2756 2008-02-08 Sam Weinig <sam@webkit.org>
2760 Fix for <rdar://problem/5732491>
2761 http://bugs.webkit.org/show_bug.cgi?id=17213
2762 The querySelectorAll method on an element node does not search only the element's descendants
2764 Test: fast/dom/SelectorAPI/elementRoot.html
2767 (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
2768 * dom/SelectorNodeList.cpp:
2769 (WebCore::SelectorNodeList::SelectorNodeList): ditto.
2773 2008-02-08 David Hyatt <hyatt@apple.com>
2775 Fix for bug 16798, button should default to type=submit.
2779 * html/HTMLButtonElement.cpp:
2780 (WebCore::HTMLButtonElement::type):
2781 (WebCore::HTMLButtonElement::parseMappedAttribute):
2783 2008-02-08 Rodney Dawes <dobey@wayofthemonkey.com>
2785 Reviewed by Jon Honeycutt.
2787 Redefine some platform-specific types as cross-platform types
2788 Add pathGetFileName method to get the filename from a path string
2789 Add unloadModule method to unload a loadable module from the process
2790 Implement new methods for GTK+ and Windows
2791 Implement missing homeDirectoryPath method for GTK+
2792 Add stub methods for new and missing methods for Wx and Qt
2794 * platform/FileSystem.h:
2795 * platform/gtk/FileSystemGtk.cpp:
2796 * platform/qt/FileSystemQt.cpp:
2797 * platform/win/FileSystemWin.cpp:
2798 * platform/wx/FileSystemWx.cpp:
2800 2008-02-08 Adam Roben <aroben@apple.com>
2802 Windows build fix after r30088
2804 * bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM
2805 bindings to rebuild.
2807 2008-02-08 Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
2809 Reviewed by Alp Toker.
2811 http://bugs.webkit.org/show_bug.cgi?id=17009
2812 [Gtk] Webkit strips accents from some dead-key combinations
2814 KeyEvents have to go through the gtk input method.
2816 Also implement the isKeypad check and make disambiguateKeyDownEvent
2817 behave more like other ports.
2819 * platform/PlatformKeyboardEvent.h:
2820 * platform/gtk/KeyEventGtk.cpp:
2821 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2822 (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2823 (WebCore::PlatformKeyboardEvent::gdkEventKey):
2825 2008-02-08 Darin Adler <darin@apple.com>
2829 - fix http://bugs.webkit.org/show_bug.cgi?id=3492
2830 TreeWalker implementation needs to be fixed (affects Acid3)
2831 - fix http://bugs.webkit.org/show_bug.cgi?id=4714
2832 NodeIterator does not handle exceptions from the filter function (affects Acid3)
2833 - fix http://bugs.webkit.org/show_bug.cgi?id=4716
2834 NodeIterator will crash if the filter function removes the current node from the document
2836 Test: traversal/exception-forwarding.html
2838 This turned into a near-rewrite of NodeIterator and TreeWalker.
2840 * bindings/js/JSNodeFilterCondition.h:
2841 * bindings/js/JSNodeFilterCondition.cpp:
2842 (WebCore::takeException): Added.
2843 (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return
2844 a JavaScript exception.
2846 * bindings/js/JSNodeFilterCustom.cpp:
2847 (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises
2848 a JavaScript exception if the out parameter is set.
2850 * bindings/js/JSNodeIteratorCustom.cpp:
2851 (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises
2852 a JavaScript exception if the out parameter is set.
2853 (WebCore::JSNodeIterator::previousNode): Ditto.
2855 * bindings/js/JSTreeWalkerCustom.cpp:
2856 (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises
2857 a JavaScript exception if the out parameter is set.
2858 (WebCore::JSTreeWalker::firstChild): Ditto.
2859 (WebCore::JSTreeWalker::lastChild): Ditto.
2860 (WebCore::JSTreeWalker::nextSibling): Ditto.
2861 (WebCore::JSTreeWalker::previousSibling): Ditto.
2862 (WebCore::JSTreeWalker::previousNode): Ditto.
2863 (WebCore::JSTreeWalker::nextNode): Ditto.
2865 * bindings/objc/DOM.mm:
2866 (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception
2868 (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
2869 Use RefPtr to make object lifetimes clearer.
2870 (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
2873 * bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for
2878 (WebCore::Document::createNodeIterator): Changed to use PassRefPtr.
2879 (WebCore::Document::createTreeWalker): Ditto.
2882 * dom/NodeFilter.cpp:
2883 (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr.
2884 (WebCore::NodeFilter::acceptNode): Added an out parameter to return
2885 a JavaScript exception.
2886 * dom/NodeFilter.idl: Custom binding for acceptNode.
2888 * dom/NodeFilterCondition.h:
2889 * dom/NodeFilterCondition.cpp:
2890 (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return
2891 a JavaScript exception.
2893 * dom/NodeIterator.cpp:
2894 (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more.
2895 Eliminated m_doc, using the root node instead, and unnecessary check for
2896 null -- rootNode must be non-null and all nodes have a non-null document.
2897 (WebCore::NodeIterator::~NodeIterator): Changed to get document from root.
2898 (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the
2899 acceptNode function could do anything, including removing the last
2900 reference to the current node. Also folded findNextNode into this function
2901 since it's the only one that needs to call it.
2902 (WebCore::NodeIterator::previousNode): Same thing, but the other direction.
2903 (WebCore::NodeIterator::detach): Changed to use the root node as the indication
2904 that we're detached rather than a separate boolean.
2905 (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded
2906 checks. Removed incorrect use of findNextNode/findPreviousNode -- those
2907 functions call acceptNode and the DOM standard is quite clear that these
2908 functions do not take that into account, allowing the current node to become
2909 one that's not accepted.
2911 * dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed
2912 nextNode and previousNode to have an out parameter with a JavaScript exception.
2913 Removed helper functions setReferenceNode, setPointerBeforeReferenceNode,
2914 detached, setDetached, document, findNextNode, and findPreviousNode. All were
2915 unnecessary. Removed data member m_doc which was just rootNode()->document().
2917 * dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
2919 * dom/Traversal.cpp:
2920 (WebCore::Traversal::Traversal): Use PassRefPtr more.
2921 (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception.
2922 Also rearranged the function a little bit for clarity.
2924 * dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript
2925 exception and made it protected, since it's only for use by the derived classes.
2927 * dom/TreeWalker.cpp:
2928 (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr.
2929 (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted
2930 the overloaded version since it's not needed.
2931 (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also
2932 to implement rules about when to check things like whether we're in the tree.
2933 The previous fix where we called isDescendantOf was not entirely correct, because
2934 the specification allows you to walk outside the tree if you get there somehow.
2935 What it doesn't allow is walking outside the tree from inside. The new
2936 implementation handles this correctly.
2937 (WebCore::TreeWalker::firstChild): Ditto.
2938 (WebCore::TreeWalker::lastChild): Ditto.
2939 (WebCore::TreeWalker::previousSibling): Ditto.
2940 (WebCore::TreeWalker::nextSibling): Ditto.
2941 (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the
2942 acceptNode function on parents, this can't use traversePreviousNode (more's the
2943 pity, because it's a bit complicated).
2944 (WebCore::TreeWalker::nextNode): Ditto.
2946 * dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr
2947 more. Changed the navigation functions to have an out parameter with a JavaScript
2948 exception. Removed helper functions setCurrentNode and ancestorRejected.
2950 * dom/TreeWalker.idl: Custom binding for navigation functions.
2952 2008-02-08 Eric Seidel <eric@webkit.org>
2956 Add support for Text.wholeText and Text.replaceWholeText
2957 http://bugs.webkit.org/show_bug.cgi?id=17125
2959 Test EntityReferences to make sure they're always treated as read-only
2960 In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
2963 (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
2966 (WebCore::Node::textContent):
2968 (WebCore::earliestLogicallyAdjacentTextNode):
2969 (WebCore::latestLogicallyAdjacentTextNode):
2970 (WebCore::Text::wholeText):
2971 (WebCore::Text::replaceWholeText):
2975 2008-02-06 Kimmo Kinnunen <kimmok@iki.fi>
2977 Reviewed by Tim Hatcher.
2979 Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
2980 HTML5: Client-side database queries should return values of type number
2981 Test: storage/sql-data-types.html
2983 Make the DB queries return a value as a number if it was inserted
2984 as a number to the database.
2985 * platform/sql/SQLiteStatement.cpp:
2986 (WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
2987 * platform/sql/SQLiteStatement.h:
2988 * storage/SQLStatement.cpp:
2989 (WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
2991 2008-02-07 Ada Chan <adachan@apple.com>
2993 <rdar://problem/5292433> certificate authentication support broken in Safari 3.0
2994 Added mechanism to communicate client certificate info back to CFNetwork.
2998 * platform/network/ResourceHandle.h:
2999 * platform/network/cf/ResourceHandleCFNet.cpp:
3000 (WebCore::clientCerts): Keep a mapping of hosts to client certificates.
3001 (WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
3002 to CFNetwork by setting it in the SSL properties.
3003 (WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
3005 2008-02-07 Adam Roben <aroben@apple.com>
3009 * platform/SharedBuffer.cpp: Removed a stub implementation of
3010 createWithContentsOfFile, now that each platform has its own stub.
3012 2008-02-07 Adam Roben <aroben@apple.com>
3014 Fix Bug 17138: REGRESSION: Node highlight not updated properly
3016 <http://bugs.webkit.org/show_bug.cgi?id=17138>
3017 <rdar://problem/5719869>
3023 * page/InspectorController.cpp:
3024 (WebCore::InspectorController::drawNodeHighlight): Update the
3025 overlayRect after scrolling to make sure that we translate the context
3026 by the correct amount.
3028 2008-02-07 Adam Roben <aroben@apple.com>
3030 Qt and GTK+ build fixes
3032 * platform/gtk/FileSystemGtk.cpp: Added a missing #include.
3033 * platform/qt/FileSystemQt.cpp: Ditto.
3035 2008-02-07 Adam Roben <aroben@apple.com>
3037 Some cleanup of Mac-only user stylesheet code
3039 I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
3040 moved some Mac-only Frame methods to FrameMac.mm.
3044 * WebCore.xcodeproj/project.pbxproj: Added new files to project.
3045 * loader/mac/UserStyleSheetLoader.cpp: Added.
3046 (UserStyleSheetLoader::UserStyleSheetLoader):
3047 (UserStyleSheetLoader::~UserStyleSheetLoader):
3048 * loader/mac/UserStyleSheetLoader.h: Added.
3049 * page/Frame.cpp: Removed setUserStyleSheet[Location]
3050 * page/mac/FrameMac.mm:
3051 (WebCore::Frame::setUserStyleSheetLocation): Moved here from
3053 (WebCore::Frame::setUserStyleSheet): Ditto.
3055 2008-02-07 Adam Roben <aroben@apple.com>
3057 Fix <rdar://5555260> GMail never loads when a user stylesheet is
3060 The fix in r29841 did not guarantee that the user stylesheet would not
3061 still be loading by the time GMail called document.write, and so was
3064 This change reworks the user stylesheet loading mechanism on non-Mac
3065 platforms to load the stylesheet synchronously from disk, and then
3066 keeps it in memory. This obsoletes the issue of what our behavior
3067 should be before the user stylesheet has loaded and what should happen
3068 when it finishes loading, as the user stylesheet will always be
3069 available when the Document first asks for it. Note, however, that
3070 this removes the ability to specify a non-file: URL for the user
3071 stylesheet. This change was not made for the Mac platform because it's
3072 possible that WebKit clients are relying on non-file: URLs for user
3073 stylesheets. It would also be nice to move back to an asynchronous
3074 loading model someday, but that is not currently possible since we
3075 don't have an asynchronous loading mechanism that is not tied to a
3078 The responsibility of loading and storing the user stylesheet has
3079 moved from Frame to Page, since the user stylesheet URL is set on the
3080 Page-level Settings object.
3085 (WebCore::Document::Document): Changed to call userStyleSheet().
3086 (WebCore::Document::setUserStyleSheet): Made Mac-only.
3087 (WebCore::Document::userStyleSheet): Changed to call up to Page on
3089 (WebCore::Document::recalcStyleSelector): Changed to call
3092 - Made setUserStyleSheet and the m_usersheet member Mac-only
3093 - Changed userStyleSheet to return a String instance instead of a
3094 String reference, since we now might return a new null String.
3095 * loader/FrameLoader.cpp:
3096 (WebCore::FrameLoader::begin): Made the call to
3097 Frame::setUserStyleSheetLocation Mac-only.
3098 * page/Frame.cpp: Made UserStyleSheetLoader and related code Mac-only.
3099 (WebCore::Frame::~Frame): Ditto.
3100 (WebCore::Frame::reapplyStyles): Made the call to
3101 setUserStyleSheet[Location] Mac-only. On non-Mac platforms the
3102 Document will pick up the new stylesheet in Document::reapplyStyles.
3103 (WebCore::FramePrivate::FramePrivate): Made m_userStyleSheetLoader
3105 * page/Frame.h: Made setUserStyleSheet[Location] Mac-only.
3106 * page/FramePrivate.h: Made m_userStyleSheetLoader Mac-only.
3108 (WebCore::Page::Page): Initialize new members.
3109 (WebCore::Page::userStyleSheetLocationChanged): Added. Does nothing on
3110 Mac. On non-Mac, resets all members relating to the user stylesheet so
3111 we'll know to load it again the next time it's asked for.
3112 (WebCore::Page::userStyleSheet): Added. Loads the user stylesheet if
3113 the user stylesheet location has changed since the last time we loaded
3114 it, or if the file has been modified since we last loaded it, then
3115 returns the contents of the user stylesheet as a String.
3116 * page/Page.h: Added new methods/members.
3117 * page/Settings.cpp:
3118 (WebCore::Settings::setUserStyleSheetLocation): Changed to call
3119 Page::userStyleSheetLocationChanged.
3120 * page/Settings.h: Changed userStyleSheetLocation to return the KURL
3121 by reference instead of making a copy.
3122 * platform/FileSystem.h: Added declaration for getFileModificationTime.
3123 * platform/KURL.h: Added declaration for fileSystemPath method.
3124 * platform/cf/KURLCFNet.cpp:
3125 (WebCore::KURL::fileSystemPath): Added.
3126 * platform/posix/FileSystemPOSIX.cpp:
3127 (WebCore::getFileModificationTime): Added.
3128 * platform/qt/KURLQt.cpp:
3129 (WebCore::KURL::fileSystemPath): Stubbed out.
3130 * platform/win/FileSystemWin.cpp:
3131 (WebCore::getFileModificationTime): Added.
3132 * platform/qt/FileSystemQt.cpp: Stubbed out getFileModificationTime.
3133 * platform/gtk/FileSystemGtk.cpp: Ditto.
3134 * platform/wx/FileSystemWx.cpp: Ditto.
3135 * platform/qt/TemporaryLinkStubs.cpp: Stubbed out
3136 SharedBuffer::createWithContentsOfFile.
3137 * platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
3138 KURL::fileSystemPath.
3139 * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3141 2008-02-07 Adam Roben <aroben@apple.com>
3143 Clean up FileSystemWin.cpp
3145 This cleanup also makes us call _wstat64 instead of _wstat32i64. The
3146 only difference between these two functions is that _wstat64 gives
3147 64-bit time values, while _wstat32i64 only gives 32-bit time values.
3153 * platform/win/FileSystemWin.cpp:
3154 (WebCore::statFile): New static helper that wraps _wstat64.
3155 (WebCore::getFileSize): Changed to call statFile.
3156 (WebCore::fileExists): Ditto.
3158 2008-02-07 Adam Roben <aroben@apple.com>
3160 Rename fileSize to getFileSize
3162 Rubberstamped by Darin.
3164 * platform/FileSystem.h:
3165 * platform/gtk/FileSystemGtk.cpp:
3166 * platform/network/cf/FormDataStreamCFNet.cpp:
3167 (WebCore::setHTTPBody):
3168 * platform/network/curl/ResourceHandleManager.cpp:
3169 (WebCore::ResourceHandleManager::setupPOST):
3170 * platform/posix/FileSystemPOSIX.cpp:
3171 * platform/qt/FileSystemQt.cpp:
3172 * platform/win/FileSystemWin.cpp:
3173 * platform/wx/FileSystemWx.cpp:
3174 * storage/Database.cpp:
3175 (WebCore::Database::databaseSize):
3176 * storage/DatabaseTracker.cpp:
3177 (WebCore::DatabaseTracker::usageForDatabase):
3178 * storage/OriginUsageRecord.cpp:
3179 (WebCore::OriginUsageRecord::diskUsage):
3181 2008-02-06 Adam Roben <aroben@apple.com>
3183 Make KURL::isLocalFile treat the URL's protocol case-insensitively
3187 * platform/KURL.cpp:
3188 (WebCore::KURL::isLocalFile): Use equalIgnoringCase instead of ==.
3190 2008-02-07 David Hyatt <hyatt@apple.com>
3192 Fix for bug 6248, implement the nth-* CSS3 selectors. Patch based on original KHTML work from Allan Jensen
3193 and improved upon by Nick Shanks.
3198 * css/CSSParser.cpp:
3199 (WebCore::CSSParser::lex):
3200 * css/CSSSelector.cpp:
3201 (WebCore::CSSSelector::extractPseudoType):
3202 * css/CSSSelector.h:
3203 (WebCore::CSSSelector::):
3204 * css/CSSStyleSelector.cpp:
3205 (WebCore::parseNth):
3206 (WebCore::matchNth):
3207 (WebCore::CSSStyleSelector::checkOneSelector):
3208 * css/tokenizer.flex:
3209 * rendering/RenderStyle.cpp:
3210 (WebCore::RenderStyle::RenderStyle):
3211 * rendering/RenderStyle.h:
3212 (WebCore::RenderStyle::childIndex):
3213 (WebCore::RenderStyle::setChildIndex):
3215 2008-02-07 Dan Bernstein <mitz@apple.com>
3217 Reviewed by Dave Hyatt.
3219 - fix <rdar://problem/5729411> REGRESSION (r29834): Float contained in relative-positioned block is painted twice
3221 Test: fast/block/float/relative-painted-twice.html
3223 * rendering/RenderBlock.cpp:
3224 (WebCore::RenderBlock::addOverhangingFloats): Added another case where
3225 the child should not take over painting the float: when they do not have
3226 the same enclosing layer. In that case, the float is already being
3227 painted by one of its closer ancestors.
3229 2008-02-07 Dan Bernstein <mitz@apple.com>
3231 Reviewed by Darin Adler.
3233 - fix http://bugs.webkit.org/show_bug.cgi?id=17194
3234 Changing text to bold changes font family
3236 Test: platform/mac/fast/text/family-for-font-matched-by-name.html
3238 * platform/mac/WebFontCache.mm:
3239 (+[WebFontCache internalFontWithFamily:traits:size:]): Changed to use
3240 the family of the font whose name matches the desired family if there
3241 is no exact family match.
3243 2008-02-07 Beth Dakin <bdakin@apple.com>
3247 Fix for <rdar://problem/5697882> Traffic or Street View button on
3248 Google Maps is sometimes not positioned correctly (17000)
3250 On the Mac, timers fire in the order that they are registered.
3251 Geoff and I discovered that this is not necessarily true on
3252 Windows, and that turned out to be the cause of this intermittent
3253 layout problem at Google Maps. This patch adds a new member
3254 variable to Timer to remember the timer's insertion point into the
3255 heap. Now when comparing timers, if two timers were registered at
3256 the same time, their insertion orders are compared to determine
3257 which should fire first. This code actually never runs on Debug
3258 builds on the Mac; the system clock on the Mac is accurate enough
3259 that it knows that the two timers were not registered at *exactly*
3260 the same time. This is not the case on Windows. In theory, if we
3261 sped up Javascript enough on the Mac, this code would run and would
3262 prevent misrenderings such as the one found on Google Maps.
3264 * platform/Timer.cpp:
3265 (WebCore::operator<):
3266 (WebCore::TimerBase::setNextFireTime):
3269 2008-02-06 Justin Garcia <justin.garcia@apple.com>
3271 Reviewed by Darin Adler.
3273 <rdar://problem/5195056> Huge plain text pastes are slow
3275 This was fixed in r27369 and then r29367 and r29667 caused performance to
3278 * editing/EditCommand.cpp:
3279 (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
3280 (WebCore::EditCommand::unapply): Ditto.
3281 (WebCore::EditCommand::reapply): Ditto.
3282 * editing/Editor.cpp:
3283 (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls
3284 that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
3285 (WebCore::Editor::unappliedEditing): Ditto.
3286 (WebCore::Editor::reappliedEditing): Ditto.
3287 * editing/SelectionController.cpp:
3288 (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
3289 base and extent with the expensive isCandidate operation if the node that will
3290 be removed is in a fragment, since such a removal is guaranteed to have no effect
3291 on a selection. This is to speed up the paste operation, which does many removes from
3294 2008-02-06 Kevin Ollivier <kevino@theolliviers.com>
3296 Reviewed by Darin Adler.
3298 Rather than directly handing scroll wheel events, use
3299 PlatformWheelEvent to send them to WebCore first, so that
3300 mouse wheel scrolling info can be retrieved via JavaScript.
3302 http://bugs.webkit.org/show_bug.cgi?id=17179
3304 * platform/ScrollView.h:
3305 * platform/wx/MouseWheelEventWx.cpp:
3306 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3307 * platform/wx/ScrollViewWx.cpp:
3308 (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
3309 (WebCore::ScrollView::wheelEvent):
3310 (WebCore::ScrollView::maximumScroll):
3312 2008-02-06 Mark Rowe <mrowe@apple.com>
3316 * WebCore.vcproj/WebCore.vcproj: Unbreak the XML of the project file.
3318 2008-02-06 Mark Rowe <mrowe@apple.com>
3320 Mac build fix. Track rename that happened in r30056.
3322 * platform/graphics/mac/GraphicsContextMac.mm:
3324 2008-02-06 Brent Fulgham <bfulgham@gmail.com>
3326 Reviewed by Adam Roben.
3328 http://bugs.webkit.org/show_bug.cgi?id=16979
3329 Conditionalize CoreGraphics vs Cairo support in Windows port.
3331 * WebCore.vcproj/WebCore.vcproj:
3332 * bridge/win/FrameCGWin.cpp: Copied from WebCore/bridge/win/FrameWin.cpp.
3333 (WebCore::imageFromSelection):
3334 * bridge/win/FrameCairoWin.cpp: Added.
3335 (WebCore::imageFromSelection):
3336 * bridge/win/FrameWin.cpp:
3337 (WebCore::computePageRectsForFrame):
3338 * platform/graphics/SimpleFontData.h:
3339 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3340 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Copied from WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp.
3341 (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3342 (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
3343 (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
3344 (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
3345 * platform/graphics/cg/GraphicsContextCG.cpp:
3346 (WebCore::GraphicsContext::savePlatformState):
3347 (WebCore::GraphicsContext::restorePlatformState):
3348 * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed.
3349 * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Copied from WebCore/platform/graphics/cg/GraphicsContextPlatformPrivate.h.
3350 * platform/graphics/win/FontCGWin.cpp: Copied from WebCore/platform/graphics/win/FontWin.cpp.
3351 (WebCore::Font::drawGlyphs):
3352 * platform/graphics/win/FontCairoWin.cpp: Added.
3353 (WebCore::Font::drawGlyphs):
3354 * platform/graphics/win/FontWin.cpp:
3355 * platform/graphics/win/GraphicsContextCGWin.cpp: Copied from WebCore/platform/graphics/win/GraphicsContextWin.cpp.
3356 (WebCore::CGContextWithHDC):
3357 (WebCore::GraphicsContext::inTransparencyLayer):
3358 (WebCore::GraphicsContext::getWindowsContext):
3359 (WebCore::GraphicsContext::releaseWindowsContext):
3360 (WebCore::GraphicsContextPlatformPrivate::scale):
3361 (WebCore::GraphicsContextPlatformPrivate::rotate):
3362 (WebCore::GraphicsContextPlatformPrivate::translate):
3363 (WebCore::GraphicsContextPlatformPrivate::concatCTM):
3364 (WebCore::setCGStrokeColor):
3365 (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
3366 * platform/graphics/win/GraphicsContextCairoWin.cpp: Added.
3367 (WebCore::GraphicsContext::GraphicsContext):
3368 (WebCore::GraphicsContext::getWindowsContext):
3369 (WebCore::GraphicsContext::inTransparencyLayer):
3370 (WebCore::GraphicsContext::releaseWindowsContext):
3371 (WebCore::GraphicsContext::concatCTM):
3372 * platform/graphics/win/GraphicsContextWin.cpp:
3373 * platform/graphics/win/ImageCGWin.cpp: Copied from WebCore/platform/graphics/win/ImageWin.cpp.
3374 (WebCore::BitmapImage::getHBITMAPOfSize):
3375 (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3376 * platform/graphics/win/ImageCairoWin.cpp: Added.
3377 (WebCore::BitmapImage::getHBITMAPOfSize):
3378 (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3379 * platform/graphics/win/ImageWin.cpp:
3380 * platform/graphics/win/SimpleFontDataCGWin.cpp: Copied from WebCore/platform/graphics/win/SimpleFontDataWin.cpp.
3381 (WebCore::scaleEmToUnits):
3382 (WebCore::SimpleFontData::platformInit):
3383 (WebCore::SimpleFontData::platformWidthForGlyph):
3384 * platform/graphics/win/SimpleFontDataCairoWin.cpp: Added.
3385 (WebCore::SimpleFontData::platformInit):
3386 (WebCore::SimpleFontData::platformDestroy):
3387 (WebCore::SimpleFontData::platformWidthForGlyph):
3388 * platform/graphics/win/SimpleFontDataWin.cpp:
3389 (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
3390 (WebCore::SimpleFontData::shouldApplyMacAscentHack):
3391 * platform/win/DragImageCGWin.cpp: Copied from WebCore/platform/win/DragImageWin.cpp.
3392 (WebCore::scaleDragImage):
3393 (WebCore::createDragImageFromImage):
3394 * platform/win/DragImageCairoWin.cpp: Added.
3395 (WebCore::scaleDragImage):
3396 (WebCore::createDragImageFromImage):
3397 * platform/win/DragImageWin.cpp:
3399 2008-02-06 Anders Carlsson <andersca@apple.com>
3403 Change httpBodyFromStream to take the request instead of the stream.
3405 * platform/network/cf/FormDataStreamCFNet.cpp:
3406 (WebCore::httpBodyFromRequest):
3407 * platform/network/cf/FormDataStreamCFNet.h:
3408 * platform/network/cf/ResourceRequestCFNet.cpp:
3409 (WebCore::ResourceRequest::doUpdateResourceRequest):
3411 2008-02-06 Kevin McCullough <kmccullough@apple.com>
3415 - Added manual tests for <rdar://problem/5556374> REGRESSION: cross-domain error when
3416 one URL uses an explicit port number and another doesn't
3418 * manual-tests/Default-port-frame.html: Added.
3419 * manual-tests/resources/Default-port-frame-contents.html: Added.
3421 2008-02-06 Oliver Hunt <oliver@apple.com>
3425 * WebCore.vcproj/build-generated-files.sh:
3427 2008-02-06 Kevin McCullough <kmccullough@apple.com>
3429 Rubberstamped by Darin.
3431 <rdar://problem/5727708> REGRESSION (r29952): Can't send message from Yahoo Mail beta
3432 - Reverted the change that caused the regression.
3435 (WebCore::Document::createElement):
3436 (WebCore::Document::createElementNS):
3437 (WebCore::Document::getElementById):
3438 (WebCore::Document::parseQualifiedName):
3439 (WebCore::Document::createAttributeNS):
3442 2008-02-06 Geoffrey Garen <ggaren@apple.com>
3444 Reviewed by Oliver Hunt.
3446 Fixed <rdar://problem/5728081> REGRESSION: Many leaks on buildbot
3448 The problem was refCount underflow in NamedAttrMap.
3450 Neither our regression tests nor the stress test have yet discovered
3451 another instance of this problem.
3453 * dom/NamedAttrMap.cpp:
3454 (WebCore::NamedAttrMap::addAttribute): Changed to use PassRefPtr,
3455 for fast and correct refCount management. Also, change a rediculously
3456 slow malloc to a slightly less rediculously slow realloc.
3458 * dom/NamedAttrMap.h:
3459 (WebCore::NamedAttrMap::insertAttribute): Changed to use PassRefPtr,
3460 for fast and correct refCount management.
3462 * html/HTMLTokenizer.cpp:
3463 (WebCore::Token::addAttribute): Use a RefPtr, to guarantee that the
3464 object starts with a refCount of 1.
3466 2008-02-06 Darin Adler <darin@apple.com>
3468 Reviewed by Tim Hatcher.
3470 - fix <rdar://problem/5723293> NULL-deref crash in PropertyMap::put opening web inspector
3471 with View Source window as target
3473 * page/InspectorController.cpp:
3474 (WebCore::canPassNodeToJavaScript): Added. Returns false if the node is in a document with
3475 JavaScript disabled.
3476 (WebCore::InspectorController::inspect): Check canPassNodeToJavaScript and do nothing if
3479 2008-02-06 David Hyatt <hyatt@apple.com>
3481 Fix for bug 16799, object elements should return absolute URLs from .data.
3483 Reviewed by Mark Rowe
3486 (WebCore::Document::completeURL):
3487 * html/HTMLAnchorElement.cpp:
3488 (WebCore::HTMLAnchorElement::href):
3489 * html/HTMLObjectElement.cpp:
3490 (WebCore::HTMLObjectElement::data):
3492 2008-02-05 Antti Koivisto <antti@apple.com>
3496 <rdar://problem/5726340>
3497 <video autoplay controls> left in unplayable state if navigated away, then back to, before video finished loading
3499 When moving document in and out from the page cache:
3500 - Cancel incomplete load by deleting the media player. This guarantees everything is in consistent state.
3501 - Restart the load if it was aborted in the middle.
3503 * html/HTMLMediaElement.cpp:
3504 (WebCore::HTMLMediaElement::~HTMLMediaElement):
3505 (WebCore::HTMLMediaElement::load):
3506 (WebCore::HTMLMediaElement::willSaveToCache):
3507 (WebCore::HTMLMediaElement::didRestoreFromCache):
3508 * html/HTMLMediaElement.h:
3509 (WebCore::HTMLMediaElement::player):
3511 2008-02-06 Darin Adler <darin@apple.com>
3515 - replace calls to put to set up properties with calls to putDirect, to
3516 prepare for a future change where put won't take attributes any more,
3517 and for a slight performance boost
3519 * bindings/js/JSAudioConstructor.cpp:
3520 (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
3521 * bindings/js/JSEventTargetBase.h:
3522 (WebCore::JSEventTargetPrototype::self): Ditto.
3523 * bindings/js/JSHTMLOptionElementConstructor.cpp:
3524 (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
3525 * bindings/js/JSSQLResultSetRowListCustom.cpp:
3526 (WebCore::JSSQLResultSetRowList::item): Ditto.
3528 2008-02-06 Dan Bernstein <mitz@apple.com>
3530 Reviewed by Darin Adler.
3532 - fix http://bugs.webkit.org/show_bug.cgi?17093
3533 'border-color' does not animate to the value of 'color' when unspecified
3535 Test: fast/css/transition-color-unspecified.html
3537 * page/AnimationController.cpp:
3538 (WebCore::ImplicitAnimation::animate): Changed to use the value of the
3539 'color' property in the source or destination style as the source or
3540 destination value of properties whose inital value is defined to be the
3541 computed value of 'color'.
3543 2008-02-06 Dan Bernstein <mitz@apple.com>