1 2008-02-15 Oliver Hunt <oliver@apple.com>
3 Reviewed by NOBODY (Build fix).
5 Build fix for Qt and Cairo builds
7 * platform/graphics/cairo/GraphicsContextCairo.cpp:
8 (WebCore::GraphicsContext::drawImage):
9 * platform/graphics/qt/GraphicsContextQt.cpp:
11 2008-02-15 Oliver Hunt <oliver@apple.com>
15 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
16 Refactor CanvasRenderingContext2D::drawImage(HTMLCanvasElement) to remove evil ifdefs
18 Add logic draw(ImageBuffer*) method to GraphicsContext to handle
19 painting the source canvas content.
21 * html/CanvasRenderingContext2D.cpp:
22 (WebCore::CanvasRenderingContext2D::drawImage):
23 * html/HTMLCanvasElement.cpp:
24 (WebCore::HTMLCanvasElement::buffer):
25 * html/HTMLCanvasElement.h:
26 * platform/graphics/GraphicsContext.h:
27 * platform/graphics/cairo/GraphicsContextCairo.cpp:
28 (WebCore::GraphicsContext::drawImage):
29 * platform/graphics/cg/GraphicsContextCG.cpp:
30 (WebCore::GraphicsContext::paintBuffer):
31 (WebCore::GraphicsContext::drawImage):
32 * platform/graphics/qt/GraphicsContextQt.cpp:
33 (WebCore::GraphicsContext::drawImage):
35 2008-02-15 Kevin Ollivier <kevino@theolliviers.com>
37 Reviewed by David Hyatt.
39 Using GetNativeFontInfoDesc() to generate the hash value was
40 leading to duplicate entries in the HashMap. Use the font object's
43 http://bugs.webkit.org/show_bug.cgi?id=17371
45 * platform/graphics/wx/FontPlatformData.h:
46 (WebCore::FontPlatformData::computeHash):
48 2008-02-15 Ada Chan <adachan@apple.com>
50 When parsing url we get from a CFURLRef, we need to null terminate
51 the string for the case when url ends with a '/'.
55 * platform/cf/KURLCFNet.cpp:
56 (WebCore::KURL::KURL):
58 2008-02-15 Brady Eidson <beidson@apple.com>
62 Fix for <rdar://problem/5727175> and <rdar://problem/5740495> - Database threads and callback scripts can run after
63 a page has closed or loaded a new document
65 Deciding to make the Database I/O semantic the same as loaders/XHR when a document is shut down, this patch implements
66 a policy of shutting down the databases in a document at the same time. This includes removing all pending transactions
67 in a database, cutting off an queued statements in the current transaction, and preventing further callbacks from being
70 No new layout tests with this patch as the current layout tests were catching this issue in a plethora of ways already
71 (crashing, unexpected exceptions and output, etc)
74 (WebCore::Document::~Document): Don't actually stop the database thread here - it better have been stopped already.
75 Add an assertion to that effect.
76 (WebCore::Document::addOpenDatabase): Add a new database handle to this Document's open database set
77 (WebCore::Document::removeOpenDatabase): Remove such a handle
78 (WebCore::Document:: stopDatabases): Call "close" on all open Database handles for this document
81 * loader/FrameLoader.cpp:
82 (WebCore::FrameLoader::stopLoading): In addition to canceling all resource loads and XHRs, stop all database I/O
84 * platform/MessageQueue.h:
85 (WebCore::MessageQueue::killed):
87 * platform/sql/SQLiteTransaction.cpp:
88 (WebCore::SQLiteTransaction::stop): Added. Explicit stop to cut off a transaction so it won't try anymore SQL activity
89 * platform/sql/SQLiteTransaction.h:
91 * storage/Database.cpp:
92 (WebCore::Database::Database):
93 (WebCore::Database::~Database):
94 (WebCore::Database::markAsDeletedAndClose): Check if the thread has terminated before committing to waiting on the
96 (WebCore::Database::stop): Stop this database, including all queued transactions and callbacks
98 (WebCore::Database::stopped):
100 * storage/DatabaseThread.cpp:
101 (WebCore::DatabaseThread::terminationRequested):
102 * storage/DatabaseThread.h:
104 * storage/SQLTransaction.cpp:
105 (WebCore::SQLTransaction::executeSQL): Throw an exception if a new executeSQL comes in after a database is closed
106 (WebCore::SQLTransaction::checkAndHandleClosedDatabase): Added. Clears queued statements and clear the next step
107 when the database has been closed since the last step/callback was run. Also stops the current SQLite transaction,
109 (WebCore::SQLTransaction::performNextStep):
110 (WebCore::SQLTransaction::performPendingCallback):
111 * storage/SQLTransaction.h:
113 2008-02-15 Adele Peterson <adele@apple.com>
117 Fix for <rdar://problem/5745072> REGRESSION (r29348): Shift + Tab does not change indent level on Google Docs
119 The immediate cause of this bug was that we stopped sending keypress events for the tab key when it is used to advance focus.
120 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).
121 This change makes the shift-tab behavior match the forward-tab behavior.
123 If the site had put their event handler (which does the indenting) on the keydown event, then this problem would have been avoided.
124 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
125 in this respect, so I think this is the way to go for right now.
127 * page/EventHandler.cpp: (WebCore::EventHandler::defaultTabEventHandler):
129 2008-02-15 Anders Carlsson <andersca@apple.com>
133 <rdar://problem/5738678>
134 REGRESSION: "Loading" status remains when uploading file to .Mac iDisk via Safari
136 Use the new CFNetwork functions for setting body parts.
138 * platform/network/cf/FormDataStreamCFNet.cpp:
139 (WebCore::setHTTPBody):
140 (WebCore::httpBodyFromRequest):
142 2008-02-15 Geoffrey Garen <ggaren@apple.com>
144 Reviewed by Anders Carlsson.
146 Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
147 surveys no longer work due to XMLHttpRequest exceptions
149 Reverted some exception throwing code from r12194.
151 To comply with the W3C draft spec, we used to throw an exception when
152 trying to access responseText and responseXML at the wrong time, but
153 that turned out to be a compatibility problem.
155 Now, matching Firefox and previous versions of WebKit, we never throw
156 an exception when accessing responseText or responseXML.
158 See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.
160 * xml/XMLHttpRequest.cpp:
161 (WebCore::XMLHttpRequest::getResponseText):
162 (WebCore::XMLHttpRequest::getResponseXML):
164 2008-02-15 Justin Garcia <justin.garcia@apple.com>
166 Reviewed by Dan Bernstein.
168 <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
170 Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
172 * editing/SelectionController.cpp:
173 (WebCore::SelectionController::nodeWillBeRemoved):
175 2008-02-15 Alice Liu <alice.liu@apple.com>
179 Fixed <rdar://problem/5741440> REGRESSION (r28496): After deactivating JavaScript, scripts embedded in the HTML page continue to run
181 Before this patch, Frame::scriptProxy() would only return null in the case that javascript was
182 disabled and if the script proxy field wasn't set (which would only be the case if the window
183 hasn't loaded anything yet). Not all callers of scriptProxy() always check for a non-null return
184 value. Those that did check would effectively be checking if javascript was enabled before proceeding.
185 This fix consists of 2 elements: first, make sure that scriptProxy() will never return null, regardless
186 of whether javascript is disabled. This will mean that callers who don't check for null won't crash.
187 Second, callers who did check for null now instead check for javascript being disabled. This means that
188 code paths intended for preventing javascript from being run will be making the correct check. Another
189 minor addition to this patch is that I added a function on KSJProxy to be a shortcut for checking if javascript
192 * bindings/js/JSCustomSQLStatementCallback.cpp:
193 (WebCore::JSCustomSQLStatementCallback::handleEvent):
194 * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
195 (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
196 * bindings/js/JSCustomSQLTransactionCallback.cpp:
197 (WebCore::JSCustomSQLTransactionCallback::handleEvent):
198 * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
199 (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
200 * bindings/js/JSCustomVoidCallback.cpp:
201 (WebCore::JSCustomVoidCallback::handleEvent):
202 * bindings/js/JSCustomXPathNSResolver.cpp:
203 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
204 * bindings/js/ScheduledAction.cpp:
205 (WebCore::ScheduledAction::execute):
206 * bindings/js/kjs_events.cpp:
207 (WebCore::JSAbstractEventListener::handleEvent):
208 (WebCore::JSLazyEventListener::parseCode):
209 * bindings/js/kjs_html.cpp:
210 (WebCore::runtimeObjectImplementsCall):
211 * bindings/js/kjs_proxy.cpp:
212 (WebCore::KJSProxy::isEnabled):
213 * bindings/js/kjs_proxy.h:
214 * bindings/js/kjs_window.cpp:
215 (KJS::Window::retrieveWindow):
216 (KJS::Window::retrieve):
218 (WebCore::Document::createHTMLEventListener):
219 * dom/EventTarget.cpp:
220 (WebCore::EventTarget::dispatchGenericEvent):
221 * html/HTMLPlugInElement.cpp:
222 (WebCore::HTMLPlugInElement::createNPObject):
223 * html/HTMLScriptElement.cpp:
224 (WebCore::HTMLScriptElement::evaluateScript):
225 * html/HTMLTokenizer.cpp:
226 (WebCore::HTMLTokenizer::parseTag):
227 (WebCore::HTMLTokenizer::processToken):
228 * loader/FrameLoader.cpp:
229 (WebCore::FrameLoader::executeScript):
230 (WebCore::FrameLoader::userGestureHint):
231 (WebCore::FrameLoader::open):
232 (WebCore::FrameLoader::dispatchWindowObjectAvailable):
233 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
234 * manual-tests/disable-javascript-reload.html: Added.
236 (WebCore::Frame::scriptProxy):
237 (WebCore::Frame::bindingRootObject):
238 (WebCore::Frame::windowScriptNPObject):
240 * page/InspectorController.cpp:
241 (WebCore::canPassNodeToJavaScript):
242 * page/mac/FrameMac.mm:
243 (WebCore::Frame::windowScriptObject):
244 * svg/SVGDocumentExtensions.cpp:
245 (WebCore::SVGDocumentExtensions::createSVGEventListener):
247 2008-02-15 Dan Bernstein <mitz@apple.com>
249 Reviewed by Alexey Proskuryakov.
251 - WebCore part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
252 <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
254 Test: http/tests/loading/text-content-type-with-binary-extension.html
256 Refined the workaround for <rdar://problem/5321972> to exclude files
257 with extensions that are known to be associated with binary MIME types.
259 * WebCore.xcodeproj/project.pbxproj: Added WebCoreURLResponse.{h,mm}.
260 * platform/network/mac/ResourceResponseMac.mm:
261 (WebCore::ResourceResponse::doUpdateResourceResponse): Moved the
262 workaround logic into WebCoreURLResponse.
263 * platform/network/mac/WebCoreURLResponse.h: Added.
264 * platform/network/mac/WebCoreURLResponse.mm: Added.
265 (createBinaryExtensionsSet): Returns a set of extensions known to
266 belong to MIME types of binary data.
267 (-[NSURLResponse _webcore_MIMEType]):
268 (-[NSHTTPURLResponse _webcore_MIMEType]): Forces the MIME type from
269 application/octet-stream to text/plain if that is the specified
270 Content-Type, unless the extension is in the binary extensions set.
272 2008-02-15 Dan Bernstein <mitz@apple.com>
274 Reviewed by Dave Hyatt.
276 - fix http://bugs.webkit.org/show_bug.cgi?id=17306
277 <rdar://problem/5737923> Transitions between styles that have different transition-* properties behave inconsistently
279 * manual-tests/transitions.html: Added.
280 * page/AnimationController.cpp:
281 (WebCore::CompositeImplicitAnimation::animate): Changed to use the
282 transition properties of the current style rather than the target style.
283 (WebCore::AnimationControllerPrivate::get): Changed to not create an
284 animation if the style does not have transitions.
285 (WebCore::AnimationController::updateImplicitAnimations): Added code to
286 return the target style if the current style is not animating.
287 * rendering/RenderObject.cpp:
288 (WebCore::RenderObject::setAnimatableStyle): Changed to call
289 updateImplicitAnimations() even if the current style does not have
290 transitions, because we may be animating out of a style that had them.
292 2008-02-15 Alexey Proskuryakov <ap@webkit.org>
294 Rubber-stamped by Darin.
296 Remove an obsolete WebCore readme file.
300 2008-02-15 Sam Weinig <sam@webkit.org>
302 Reviewed by Darin Adler.
304 Remove more uses of DeprecatedString in preparation of getting rid of it.
306 * bridge/mac/WebCoreScriptDebugger.mm:
307 * css/CSSCursorImageValue.cpp:
308 (WebCore::isSVGCursorIdentifier):
309 (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
310 * css/CSSStyleSelector.h:
312 (WebCore::Element::dump):
313 (WebCore::Element::formatForDebugger):
315 (WebCore::Position::debugPosition):
316 (WebCore::Position::formatForDebugger):
318 (WebCore::Range::formatForDebugger):
320 (WebCore::Text::formatForDebugger):
321 * editing/Selection.cpp:
322 (WebCore::Selection::debugPosition):
323 (WebCore::Selection::formatForDebugger):
324 * editing/SelectionController.cpp:
325 (WebCore::SelectionController::debugRenderer):
326 * editing/VisiblePosition.cpp:
327 (WebCore::VisiblePosition::debugPosition):
328 * html/HTMLTokenizer.cpp:
329 (WebCore::HTMLTokenizer::scriptHandler):
330 (WebCore::HTMLTokenizer::parseTag):
331 (WebCore::HTMLTokenizer::processToken):
332 (WebCore::HTMLTokenizer::notifyFinished):
333 * svg/SVGFontFaceElement.cpp:
334 (WebCore::mapAttributeToCSSProperty):
336 2008-02-15 Adam Roben <aroben@apple.com>
338 * bindings/scripts/CodeGenerator.pm: Touch this to force bindings to
341 2008-02-15 Adam Roben <aroben@apple.com>
343 Try to fix Qt/GTK+ builds
345 * WebCore.pro: Remove MessageEvent.{idl,cpp} from the unconditional
348 2008-02-15 Darin Adler <darin@apple.com>
350 - another Qt build fix
352 * platform/qt/KURLQt.cpp:
353 (WebCore::KURL::operator QUrl): Use the characters directly, not ascii().
354 Eliminate references to urlString.
356 2008-02-15 Darin Adler <darin@apple.com>
358 - another Qt build fix
360 * platform/qt/ClipboardQt.cpp:
361 (WebCore::ClipboardQt::declareAndWriteDragImage): Use KURL instead of String.
363 2008-02-14 Darin Adler <darin@apple.com>
365 - another round of build fixes
368 (WebCore::appendEncodedHostname): Fix spelling (strLen, not strlen).
369 * platform/network/curl/ResourceHandleManager.cpp:
370 (WebCore::parseDataUrl): Fix a ".." typo and call data instead of characters.
372 2008-02-14 Darin Adler <darin@apple.com>
374 - added back accidentally-removed files
376 * platform/DeprecatedStringList.cpp: Copied from platform/DeprecatedStringList.cpp.
377 * platform/DeprecatedStringList.h: Copied from platform/DeprecatedStringList.h.
378 * platform/mac/DeprecatedStringListMac.mm: Copied from platform/mac/DeprecatedStringListMac.mm.
380 2008-02-14 Darin Adler <darin@apple.com>
385 (WebCore::appendEncodedHostname): Use String to make a QString.
386 * platform/network/cf/ResourceRequest.h:
387 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
388 * platform/network/curl/ResourceHandleManager.cpp:
389 (WebCore::parseDataUrl): Updated to String rather than DeprecatedString functions.
391 2008-02-14 Darin Adler <darin@apple.com>
395 * platform/network/qt/ResourceRequest.h:
396 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
398 2008-02-14 Darin Adler <darin@apple.com>
402 * platform/network/curl/ResourceRequest.h:
403 (WebCore::ResourceRequest::ResourceRequest): Removed a stray deprecatedString() call.
405 2008-02-14 Darin Adler <darin@apple.com>
409 * dom/XMLTokenizer.cpp:
410 (WebCore::XMLTokenizer::endElementNs): Added a missing string() call.
412 2008-02-14 Darin Adler <darin@apple.com>
414 Reviewed by Eric Seidel.
416 Based on work by Marvin Decker <marv.decker@gmail.com>
418 - fix http://bugs.webkit.org/show_bug.cgi?id=16538
419 KURL should use String instead of DeprecatedString
421 - fix http://bugs.webkit.org/show_bug.cgi?id=16485
422 DocLoader::checkForReload will crash if the URL isNull
423 and a similar problem in IconDatabase
425 - fix http://bugs.webkit.org/show_bug.cgi?id=16487
426 KURL doesn't preserve isNull when constructed with a DeprecatedString
428 - changed completeURL and various DOM getters to return KURL, to avoid
429 conversion back and forth from KURL to String
431 - changed the conversion of KURL to NSURL or NSString to be automatic,
432 to ease the use of KURL in Objective C DOM bindings, and eliminated
433 the getNSURL function
435 - because I had to visit the DOM bindings anyway, eliminated almost all
436 the use of the KJS namespace for things in WebCore
438 - fixed HTMLOptionElement constructor to check for undefined rather
439 than size of the arguments array
441 - eliminated some other unnecessary uses of DeprecatedString
443 - changed String::split to take a Vector parameter instead of returning
444 a Vector, for better performance
446 - added a couple of missing calls to do layout in SVG image handling;
447 I was able to reproduce these only because I had broken URLs for a
448 while -- not sure how to reproduce them now but the changes are
451 Performance testing shows this to be at least a 1% speedup.
453 Added a new function protocolIs to efficiently compare protocols
454 without case errors and a blankURL function so we don't have to
455 code "about:blank" in multiple places in the code and don't have to
456 construct a frash KURL each time. Moved decode_string and encode_string
457 out of KURL and gave them clearer names.
459 Made KURL constructors explicit to highlight potentially-expensive
460 operations and the poor semantics of KURL's constructor that takes
463 * WebCore.base.exp: Updated.
465 * bindings/js/JSAttrCustom.cpp:
466 (WebCore::JSAttr::setValue): Use protocolIs.
467 * bindings/js/JSAudioConstructor.h: KJS namespace change.
468 * bindings/js/JSCSSRuleCustom.cpp:
469 (WebCore::toJS): Ditto.
470 * bindings/js/JSCSSValueCustom.cpp:
471 (WebCore::toJS): Ditto.
472 * bindings/js/JSDocumentCustom.cpp:
473 (WebCore::JSDocument::location): Ditto.
474 (WebCore::JSDocument::setLocation): Updated for KURL change.
475 (WebCore::toJS): KJS namespace change.
476 * bindings/js/JSElementCustom.cpp:
477 (WebCore::allowSettingSrcToJavascriptURL): Use protocolIs.
478 (WebCore::JSElement::setAttribute): KJS namespace change.
479 (WebCore::JSElement::setAttributeNode): Ditto.
480 (WebCore::JSElement::setAttributeNS): Ditto.
481 (WebCore::JSElement::setAttributeNodeNS): Ditto.
482 * bindings/js/JSHTMLFrameElementCustom.cpp:
483 (WebCore::allowSettingJavascriptURL): Use protocolIs.
484 (WebCore::JSHTMLFrameElement::setSrc): KJS namespace change.
485 (WebCore::JSHTMLFrameElement::setLocation): Ditto.
486 * bindings/js/JSHTMLIFrameElementCustom.cpp:
487 (WebCore::JSHTMLIFrameElement::setSrc): Use protocolIs.
488 * bindings/js/JSHTMLOptionElementConstructor.cpp:
489 (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
490 (WebCore::JSHTMLOptionElementConstructor::construct): Cleaned up the
491 structure a bit and changed checking to check for undefined rather than
493 * bindings/js/JSHTMLOptionElementConstructor.h: KJS namespace change.
494 * bindings/js/JSLocation.cpp:
495 (WebCore::JSLocation::put): Eliminated some DeprecatedString use,
497 (WebCore::jsLocationProtoFuncReplace): Ditto.
498 (WebCore::jsLocationProtoFuncReload): Ditto.
499 (WebCore::jsLocationProtoFuncAssign): Ditto.
500 * bindings/js/JSLocation.h: KJS namespace change.
501 * bindings/js/JSNamedNodeMapCustom.cpp:
502 (WebCore::JSNamedNodeMap::canGetItemsForName): Ditto.
503 (WebCore::JSNamedNodeMap::nameGetter): Ditto.
504 * bindings/js/JSNamedNodesCollection.cpp:
505 (WebCore::JSNamedNodesCollection::JSNamedNodesCollection): Ditto.
506 * bindings/js/JSNamedNodesCollection.h: Ditto.
507 * bindings/js/JSXMLHttpRequest.cpp:
508 (WebCore::jsXMLHttpRequestPrototypeFunctionOpen): Removed
509 DeprecatedString use.
510 (WebCore::jsXMLHttpRequestPrototypeFunctionSend): Ditto.
511 * bindings/js/JSXMLHttpRequest.h: Moved this class into the WebCore
513 * bindings/js/JSXSLTProcessor.cpp: Namespace change.
514 * bindings/js/JSXSLTProcessor.h: Ditto.
516 * bindings/js/kjs_binding.cpp: Updated for namespace change.
517 (WebCore::jsStringOrNull): Added an overload for KURL to allow DOM
518 classes to return KURL even if the DOM expects a string.
519 (WebCore::jsStringOrUndefined): Ditto.
520 (WebCore::jsStringOrFalse): Ditto.
521 * bindings/js/kjs_binding.h: Moved everything into the WebCore
524 * bindings/js/kjs_css.h: Namespace change.
525 * bindings/js/kjs_events.cpp: Removed an include.
526 * bindings/js/kjs_events.h: Namespace change.
527 * bindings/js/kjs_html.h: Namespace change.
529 * bindings/js/kjs_navigator.cpp: Moved everything into the
531 * bindings/js/kjs_navigator.h: Ditto.
533 * bindings/js/kjs_window.cpp:
534 (KJS::parseModalDialogFeatures): Updated for String::split change.
535 (KJS::createWindow): Use protocolIs and removed some DeprecatedString.
536 (KJS::Window::put): Ditto.
537 (KJS::Window::allowsAccessFrom): Ditto.
538 (KJS::windowProtoFuncOpen): Ditto.
540 * bindings/objc/DOM.mm:
541 (-[DOMElement _getURLAttribute:]): Removed getNSURL call.
542 * bindings/objc/DOMHTML.mm:
543 (-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]): Ditto.
545 * bindings/scripts/CodeGeneratorCOM.pm: Updated includes so conversions from
547 * bindings/scripts/CodeGeneratorJS.pm: Updated for namespace changes, and also
548 updated includes so conversions from KURL will work.
549 * bindings/scripts/CodeGeneratorObjC.pm: Updated includes so conversions from
552 * bridge/mac/WebCoreAXObject.mm:
553 (-[WebCoreAXObject accessibilityAttributeValue:]): Removed getNSURL call.
554 Also streamlined the logic.
555 (AXAttributedStringAppendText): Ditto.
557 * bridge/mac/WebCoreScriptDebugger.mm:
558 (toNSString): Tweaked.
559 (toNSURL): Removed getNSURL call.
561 * css/CSSImageValue.cpp:
562 (WebCore::CSSImageValue::image): Removed DeprecatedString use.
563 * css/CSSImportRule.cpp:
564 (WebCore::CSSImportRule::insertedIntoParent): Ditto.
566 (WebCore::CSSParser::parseValue): Ditto.
567 (WebCore::CSSParser::parseContent): Ditto.
568 (WebCore::CSSParser::parseBackgroundImage): Ditto.
569 (WebCore::CSSParser::parseFontFaceSrc): Ditto.
570 (WebCore::CSSParser::parseBorderImage): Ditto.
571 * css/CSSStyleSelector.cpp:
572 (WebCore::CSSStyleSelector::setEncodedURL): Ditto.
573 (WebCore::checkPseudoState): Ditto.
574 * css/CSSStyleSelector.h: Ditto.
577 (WebCore::MediaList::setMediaText): Updated for String::split change.
580 (WebCore::StyleBase::baseURL): Return KURL.
581 * css/StyleBase.h: DItto.
584 (WebCore::Document::~Document): Updated for namespace change.
585 (WebCore::Document::documentURI): Return KURL.
586 (WebCore::Document::setDocumentURI): Removed DeprecatedString use.
587 (WebCore::Document::baseURI): Return KURL.
588 (WebCore::Document::open): Updated to use blankURL.
589 (WebCore::Document::setURL): Take KURL.
590 (WebCore::Document::shouldBeAllowedToLoadLocalResources): Updated for
592 (WebCore::Document::setBaseURL): Take KURL.
593 (WebCore::Document::elementSheet): Updated for KURL change.
594 (WebCore::Document::mappedElementSheet): Ditto.
595 (WebCore::Document::processHttpEquiv): Ditto.
596 (WebCore::Document::recalcStyleSelector): Removed use of
597 DeprecatedString -- also noticed some dead code here!
598 (WebCore::Document::setCookie): Ditto.
599 (WebCore::Document::completeURL): Return KURL.
600 * dom/Document.h: Use KURL instead of String in a few places.
602 * dom/DocumentType.cpp:
603 (WebCore::DocumentType::baseURI): Return KURL.
604 * dom/DocumentType.h: Ditto.
607 (WebCore::Element::baseURI): Return KURL.
608 * dom/Element.h: Ditto.
611 (WebCore::Node::setDocument): Namespace change.
612 (WebCore::Node::baseURI): Return KURL.
615 * dom/ProcessingInstruction.cpp:
616 (WebCore::ProcessingInstruction::checkStyleSheet): Updated for KURL change.
617 * dom/StyleElement.cpp:
618 (WebCore::StyleElement::process): Changed to use Vector<UChar> instead of
619 String for better performance.
620 (WebCore::StyleElement::createSheet): Removed use of DeprecateString.
621 * dom/XMLTokenizer.cpp:
622 (WebCore::XMLTokenizer::endElementNs): Updated for KURL change.
623 (WebCore::XMLTokenizer::end): Ditto.
624 (WebCore::xmlDocPtrForString): Removed use of DeprecateString.
625 * dom/XMLTokenizer.h: Ditto.
627 * editing/markup.cpp: Moved appendString to PlatformString.h.
628 (WebCore::appendQuotedURLAttributeValue): Use protocolIs.
629 (WebCore::completeURLs): Removed DeprecatedString use.
630 (WebCore::createFragmentFromMarkup): Use blankURL.
631 (WebCore::fillContainerFromString): Removed DeprecatedString use.
632 (WebCore::createFragmentFromText): Ditto.
634 * history/HistoryItem.cpp:
635 (WebCore::HistoryItem::url): Removed DeprecatedString use.
636 (WebCore::HistoryItem::originalURL): Ditto.
637 * history/HistoryItem.h: Removed include.
639 * html/HTMLAnchorElement.cpp:
640 (WebCore::HTMLAnchorElement::defaultEventHandler): Removed use of
642 (WebCore::HTMLAnchorElement::href): Return KURL.
643 (WebCore::HTMLAnchorElement::hash): Removed DeprecatedString use.
644 (WebCore::HTMLAnchorElement::host): Ditto.
645 (WebCore::HTMLAnchorElement::hostname): Ditto.
646 (WebCore::HTMLAnchorElement::pathname): Ditto.
647 (WebCore::HTMLAnchorElement::port): Ditto.
648 (WebCore::HTMLAnchorElement::protocol): Ditto.
649 (WebCore::HTMLAnchorElement::search): Ditto.
650 (WebCore::HTMLAnchorElement::toString): Ditto.
651 * html/HTMLAnchorElement.h: Ditto.
652 * html/HTMLAppletElement.cpp:
653 (WebCore::HTMLAppletElement::createRenderer): Updated for KURL change.
654 * html/HTMLAreaElement.cpp:
655 (WebCore::HTMLAreaElement::href): Return KURL.
656 * html/HTMLAreaElement.h: Ditto.
657 * html/HTMLBaseElement.cpp:
658 (WebCore::HTMLBaseElement::removedFromDocument): Updated for KURL change.
659 (WebCore::HTMLBaseElement::process): Removed DeprecatedString use.
660 * html/HTMLBodyElement.cpp:
661 (WebCore::HTMLBodyElement::parseMappedAttribute): Updated for KURL change.
662 * html/HTMLEmbedElement.cpp:
663 (WebCore::HTMLEmbedElement::parseMappedAttribute): Removed use of
665 * html/HTMLEmbedElement.h: Removed DeprecatedString use.
666 * html/HTMLFormElement.cpp:
667 (WebCore::HTMLFormElement::formWouldHaveSecureSubmission): Use protocolIs.
668 (WebCore::encodeCString): Updated for change to String::split.
669 (WebCore::HTMLFormElement::dataEncoding): Ditto.
670 (WebCore::HTMLFormElement::formData): Removed DeprecatedString use.
671 (WebCore::HTMLFormElement::isMailtoForm): Use protocolIs.
672 (WebCore::HTMLFormElement::submit): Updated for KURL change.
673 (WebCore::HTMLFormElement::reset): Ditto.
674 * html/HTMLFrameElementBase.cpp:
675 (WebCore::HTMLFrameElementBase::isURLAllowed): Updated for KURL change
676 and use equalIgnoringRef instead of doing a setRef to get the same effect.
677 (WebCore::HTMLFrameElementBase::openURL): Use blankURL.
678 (WebCore::HTMLFrameElementBase::location): Return KURL.
679 (WebCore::HTMLFrameElementBase::src): Return KURL.
680 * html/HTMLFrameElementBase.h: Ditto.
681 * html/HTMLImageElement.cpp:
682 (WebCore::HTMLImageElement::parseMappedAttribute): Updated for KURL change.
683 (WebCore::HTMLImageElement::longDesc): Return KURL.
684 (WebCore::HTMLImageElement::lowsrc): Return KURL.
685 (WebCore::HTMLImageElement::src): Return KURL.
686 * html/HTMLImageElement.h: Ditto. Also removed imageMap() function.
687 * html/HTMLInputElement.cpp:
688 (WebCore::HTMLInputElement::src): Return KURL.
689 * html/HTMLInputElement.h: Ditto.
690 * html/HTMLLinkElement.cpp:
691 (WebCore::HTMLLinkElement::parseMappedAttribute): Updated for KURL change.
692 (WebCore::HTMLLinkElement::tokenizeRelAttribute): Updated for String::split change.
693 (WebCore::HTMLLinkElement::href): Return KURL.
694 * html/HTMLLinkElement.h: Ditto.
695 * html/HTMLMediaElement.cpp:
696 (WebCore::HTMLMediaElement::src): Return KURL.
697 (WebCore::HTMLMediaElement::pickMedia): Updated for KURL change.
698 * html/HTMLMediaElement.h: Ditto.
699 * html/HTMLObjectElement.cpp:
700 (WebCore::HTMLObjectElement::isImageType): Use protocolIs.
701 (WebCore::HTMLObjectElement::data): Return KURL.
702 * html/HTMLObjectElement.h: Ditto.
703 * html/HTMLOptGroupElement.cpp:
704 (WebCore::HTMLOptGroupElement::groupLabelText): Removed DeprecatedString use.
705 * html/HTMLParser.cpp:
706 (WebCore::HTMLParser::reportErrorToConsole): Updated for KURL change.
707 * html/HTMLScriptElement.cpp:
708 (WebCore::HTMLScriptElement::insertedIntoDocument): Ditto.
709 (WebCore::HTMLScriptElement::text): Changed to use Vector<UChar> instead of
710 String for better performance.
711 (WebCore::HTMLScriptElement::src): Return KURL.
712 * html/HTMLScriptElement.h: Ditto.
713 * html/HTMLSourceElement.cpp:
714 (WebCore::HTMLSourceElement::src): Return KURL.
715 * html/HTMLSourceElement.h: Ditto.
716 * html/HTMLTableElement.cpp:
717 (WebCore::HTMLTableElement::parseMappedAttribute): Updated for KURL change.
718 * html/HTMLTablePartElement.cpp:
719 (WebCore::HTMLTablePartElement::parseMappedAttribute): Updated for KURL change.
720 * html/HTMLTextAreaElement.cpp:
721 (WebCore::HTMLTextAreaElement::setValue): Removed DeprecatedString use.
722 * html/HTMLTokenizer.cpp:
723 (WebCore::HTMLTokenizer::scriptExecution): Ditto.
724 (WebCore::HTMLTokenizer::notifyFinished): Use protocolIs.
725 * html/HTMLVideoElement.cpp:
726 (WebCore::HTMLVideoElement::poster): Return KURL.
727 * html/HTMLVideoElement.h: Ditto.
728 * html/HTMLViewSourceDocument.cpp:
729 (WebCore::HTMLViewSourceDocument::addText): Updated for String::split change.
731 * loader/DocLoader.cpp:
732 (WebCore::DocLoader::checkForReload): Add an explicit check for an empty URL
733 here to avoid problems using its string as a hash table key later.
734 (WebCore::DocLoader::requestResource): Removed DeprecatedString use.
736 * loader/FTPDirectoryDocument.cpp:
737 (WebCore::FTPDirectoryTokenizer::createTDForFilename): Updated for KURL change.
738 (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Removed use of
741 * loader/FrameLoader.cpp:
742 (WebCore::FrameLoader::requestFrame): Use protocolIs.
743 (WebCore::FrameLoader::loadSubframe): Use blankURL.
744 (WebCore::FrameLoader::submitForm): Use protocolIs and removed use of
746 (WebCore::FrameLoader::iconURL): Return KURL. Use protcolIs.
747 (WebCore::FrameLoader::didOpenURL): Use protocolIs.
748 (WebCore::FrameLoader::didExplicitOpen): Use blankURL.
749 (WebCore::FrameLoader::executeIfJavaScriptURL): Use protocolIs.
750 Update for name change to decodeURLEscapeSequences.
751 (WebCore::FrameLoader::receivedFirstData): Updated for KURL changes.
752 (WebCore::FrameLoader::begin): Removed DeprecatedString use.
753 Renamed baseurl to baseURL. Updated to use KURL more.
754 (WebCore::FrameLoader::gotoAnchor): Removed use of encodedHtmlRef
755 function, which is no different from ref.
756 (WebCore::FrameLoader::completeURL): Updated for KURL change.
757 (WebCore::FrameLoader::scheduleLocationChange): Ditto.
758 (WebCore::FrameLoader::canCachePage): Use protocolIs.
759 (WebCore::FrameLoader::updatePolicyBaseURL): Update for KURL change.
760 (WebCore::FrameLoader::setPolicyBaseURL): Take KURL.
761 (WebCore::FrameLoader::startRedirectionTimer): Removed use of
763 (WebCore::FrameLoader::load): Use protocolIs.
764 (WebCore::FrameLoader::shouldHideReferrer): Use protocolIs.
765 (WebCore::FrameLoader::shouldAllowNavigation): Updated for KURL change.
766 (WebCore::FrameLoader::commitProvisionalLoad): Use blankURL.
767 (WebCore::FrameLoader::open): Use protcolIs.
768 (WebCore::FrameLoader::createHistoryItem): Use blankURL.
769 (WebCore::FrameLoader::createJavaAppletWidget): Updated for KURL change.
770 (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Removed
771 DeprecatedString use.
772 * loader/FrameLoader.h: Ditto.
774 * loader/ImageDocument.cpp:
775 (WebCore::ImageDocument::createDocumentStructure): Updated for KURL change.
776 * loader/PluginDocument.cpp:
777 (WebCore::PluginTokenizer::createDocumentStructure): Ditto.
779 * loader/icon/IconDatabase.cpp:
780 (WebCore::IconDatabase::iconForPageURL): Added a check for an empty URL
781 before trying to use it as a hash table key.
783 * loader/icon/IconLoader.h: Tweaked includes.
786 (WebCore::Loader::servePendingRequests): Use protcolIs. Also removed some
787 code to set up a local variable that is never used (and a DeprecatedString
790 * loader/mac/LoaderNSURLExtras.m:
791 (suggestedFilenameWithMIMEType): Removed unnecessary typecast.
793 * page/ContextMenuController.cpp: Removed include.
795 * page/mac/EventHandlerMac.mm:
796 (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
799 * page/mac/WebCoreFrameBridge.mm:
800 (-[WebCoreFrameBridge URLWithAttributeString:]): Removed getNSURL call.
801 (-[WebCoreFrameBridge baseURL]): Ditto.
804 (WebCore::isSchemeFirstChar): Fixed bug in handling of values >= 0x80.
805 (WebCore::isSchemeChar): Ditto.
806 (WebCore::isPathSegmentEndChar): Ditto.
807 (WebCore::hexDigitValue): Changed parameter type to UChar.
808 (WebCore::copyASCII): Added.
809 (WebCore::findFirstOf): Added.
810 (WebCore::KURL::protocolIs): Added.
811 (WebCore::KURL::KURL): Tightened logic up quite a bit. Changed parameter
812 types from DeprecatedString to String.
813 (WebCore::KURL::init): Changed parameter type to String. Preserved the
814 passed-in string even if the base is invalid. Cleaned up logic to determine
815 if the originalString should be pased in to the parse function. Simplified
816 by calling the new parse overload that takes String in many cases.
817 (WebCore::KURL::lastPathComponent): Return String.
818 (WebCore::KURL::protocol): Ditto.
819 (WebCore::KURL::host): Ditto.
820 (WebCore::KURL::port): Changed logic to use early return for clarity.
821 (WebCore::KURL::pass): Return String.
822 (WebCore::KURL::user): Ditto.
823 (WebCore::KURL::ref): Ditto.
824 (WebCore::assertProtocolIsGood): Added.
825 (WebCore::KURL::protocolIs): Added.
826 (WebCore::KURL::query): Return String.
827 (WebCore::KURL::path): Ditto.
828 (WebCore::KURL::setProtocol): Take String.
829 (WebCore::KURL::setHost): Ditto.
830 (WebCore::KURL::setPort): Use String.
831 (WebCore::KURL::setHostAndPort): Take String.
832 (WebCore::KURL::setUser): Ditto.
833 (WebCore::KURL::setPass): Ditto.
834 (WebCore::KURL::setRef): Ditto.
835 (WebCore::KURL::setQuery): Ditto.
836 (WebCore::KURL::setPath): Ditto.
837 (WebCore::KURL::prettyURL): Return String. Use Vector<UChar> to build it.
838 (WebCore::decodeURLEscapeSequences): Renamed from KURL::decode_string.
839 Return String. Use Vector<UChar> to build it.
840 (WebCore::KURL::isLocalFile): Use protocolIs.
841 (WebCore::KURL::parse): Added an overload that takes a String to replace
842 the use of DeprecatedString::ascii at various call sites. Updated for
843 name change (urlString -> m_string).
844 (WebCore::equalIgnoringRef): Wrote a new implementation that doesn't
846 (WebCore::encodeWithURLEscapeSequences): Renamed from KURL::encode_string.
848 (WebCore::appendEncodedHostname): Added. Replaces encodeHostname and
849 avoids the need to allocate a string.
850 (WebCore::findHostnamesInMailToURL): Update to use findFirstOf instead of
852 (WebCore::findHostnameInHierarchicalURL): Ditto.
853 (WebCore::encodeHostnames): Use protocolIs and the other helpers above.
854 (WebCore::encodeRelativeString): Changed to put result into a CharBuffer.
855 (WebCore::substituteBackslashes): Updated to use String.
856 (WebCore::KURL::copyToBuffer): Added.
857 (WebCore::protocolIs): Added.
858 (WebCore::blankURL): Added.
859 (WebCore::KURL::print): Updated.
860 * platform/KURL.h: Added a number of comments. Reorganized the header a bit.
861 Made the string constructors explicit. Changed to use String instead of
862 DeprecatedString. Removed encodedHTMLRef. Renamed and added a few functions.
864 * platform/cf/KURLCFNet.cpp:
865 (WebCore::KURL::KURL): Streamlined the logic a bit.
866 (WebCore::KURL::createCFURL): Changed to use copyToBuffer.
868 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
869 (WebCore::MediaPlayerPrivate::createQTMovie): Removed getNSURL call.
871 * platform/mac/ClipboardMac.mm:
872 (WebCore::ClipboardMac::declareAndWriteDragImage): Removed getNSURL call.
873 * platform/mac/CookieJar.mm:
874 (WebCore::cookies): Removed getNSURL call.
875 (WebCore::setCookies): Removed getNSURL call.
876 * platform/mac/KURLMac.mm:
877 (WebCore::KURL::KURL): Streamlined the logic a bit.
878 * platform/mac/PasteboardMac.mm:
879 (WebCore::Pasteboard::writeURL): Removed getNSURL call.
880 (WebCore::Pasteboard::writeImage): Ditto.
881 * platform/mac/SSLKeyGeneratorMac.mm:
882 (WebCore::signedPublicKeyAndChallengeString): Ditto.
884 * platform/network/HTTPParsers.cpp:
885 (WebCore::filenameFromHTTPContentDisposition): Updated for String::split.
886 * platform/network/ResourceHandle.cpp:
887 (WebCore::ResourceHandle::portAllowed): Use protocolIs.
889 * platform/network/cf/ResourceErrorCF.cpp:
890 (WebCore::ResourceError::operator CFErrorRef): Removed deprecatedString call.
891 * platform/network/curl/ResourceHandleManager.cpp:
892 (WebCore::headerCallback): Ditto.
893 (WebCore::parseDataUrl): Use String instead of DeprecatedString.
894 (WebCore::ResourceHandleManager::startJob): Updated for KURL changes.
895 * platform/network/mac/ResourceErrorMac.mm:
896 (WebCore::ResourceError::operator NSError*): Removed getNSURL call.
897 * platform/network/mac/ResourceRequest.h:
898 (WebCore::ResourceRequest::ResourceRequest): Removed DeprecatedString use.
899 * platform/network/mac/ResourceRequestMac.mm:
900 (WebCore::ResourceRequest::doUpdatePlatformRequest): Removed getNSURL call.
901 * platform/network/mac/ResourceResponseMac.mm:
902 (WebCore::ResourceResponse::nsURLResponse): Removed getNSURL call.
904 * platform/qt/ClipboardQt.cpp:
905 (WebCore::ClipboardQt::writeURL): Removed deprecatedString call.
907 * platform/text/CString.h:
908 (WebCore::CStringBuffer::length): Fixed size_t/unsigned mismatch to make it
909 possible to compile this on Windows with higher warning level
911 * platform/text/PlatformString.h: Updated split to modify a result parameter
912 rather than returning a Vector. Added charactersAreAllASCII and an append
913 function that appends a String to a Vector<UChar>.
914 * platform/text/String.cpp:
915 (WebCore::String::split): Updated.
917 * platform/win/BString.cpp:
918 (WebCore::BString::BString): Added conversion from KURL.
919 * platform/win/BString.h: Ditto.
921 * platform/win/ClipboardUtilitiesWin.cpp:
922 (WebCore::markupToCF_HTML): Removed use of deprecatedString.
923 * platform/win/ClipboardWin.cpp:
924 (WebCore::filesystemPathFromUrlOrTitle): Ditto.
925 (WebCore::createGlobalHDropContent): Ditto.
926 (WebCore::ClipboardWin::setData): Ditto.
927 (WebCore::ClipboardWin::writeRange): Ditto.
928 * platform/win/PasteboardWin.cpp:
929 (WebCore::Pasteboard::writeSelection): Ditto.
930 * plugins/PluginStream.cpp:
931 (WebCore::PluginStream::startStream): Ditto.
932 (WebCore::PluginStream::destroyStream): Ditto.
933 * plugins/win/PluginViewWin.cpp:
934 (WebCore::scriptStringIfJavaScriptURL): Ditto.
935 (WebCore::PluginView::performRequest): Ditto.
936 (WebCore::PluginView::PluginView): Ditto.
938 * rendering/HitTestResult.cpp:
939 (WebCore::HitTestResult::absoluteImageURL): Removed DeprecatedString use.
940 (WebCore::HitTestResult::absoluteLinkURL): Ditto.
942 * rendering/RenderFrameSet.cpp:
943 (WebCore::RenderFrameSet::layOutAxis): Fixed comment wording.
944 * rendering/RenderImage.cpp:
945 (WebCore::RenderImage::paintReplaced): Removed use of DeperecatedString,
946 (WebCore::RenderImage::imageMap): Changed to call useMap instead of imageMap;
947 both do the same thing, and the first is standard DOM.
949 * rendering/RenderObject.cpp:
950 (WebCore::RenderObject::addPDFURLRect): Rewrote and streamlined to remove
951 DeprecatedString use.
952 * rendering/RenderObject.h: Changed addPDFURLRect to take const IntRect&.
954 * rendering/RenderPartObject.cpp:
955 (WebCore::isURLAllowed): Updated for KURL change and use equalIgnoringRef
956 instead of doing a setRef to get the same effect.
957 (WebCore::RenderPartObject::updateWidget): Updated for KURL change.
959 * rendering/RenderText.cpp:
960 (WebCore::charactersAreAllASCII): Moved the guts to PlatformString.h.
962 * rendering/SVGRenderSupport.cpp:
963 (WebCore::renderSubtreeToImage): Added missing call to do layout. I ran
964 into this while doing some layout tests while URL processing was broken.
966 * rendering/SVGRenderTreeAsText.h: Removed include.
968 * svg/SVGImageLoader.cpp:
969 (WebCore::SVGImageLoader::updateFromElement): Removed DeprecatedString use.
971 * svg/graphics/SVGImage.cpp:
972 (WebCore::SVGImage::draw): Added missing call to do layout. I ran
973 into this while doing some layout tests while URL processing was broken.
974 (WebCore::SVGImage::dataChanged): Use a null URL rather than an arbitrary
975 string for the document.
977 * xml/XMLHttpRequest.cpp:
978 (WebCore::XMLHttpRequest::getResponseXML): Removed DeprecatedString use.
979 (WebCore::XMLHttpRequest::urlMatchesDocumentDomain): Ditto.
980 (WebCore::XMLHttpRequest::open): Ditto.
981 (WebCore::XMLHttpRequest::send): Namespace change.
982 (WebCore::XMLHttpRequest::dropProtection): Ditto.
983 * xml/XMLHttpRequest.h: Removed DeprecatedString use.
985 * xml/XSLImportRule.cpp:
986 (WebCore::XSLImportRule::loadSheet): Removed DeprecatedString use.
987 * xml/XSLStyleSheet.cpp:
988 (WebCore::XSLStyleSheet::loadChildSheets): Ditto.
989 (WebCore::XSLStyleSheet::loadChildSheet): Ditto.
990 * xml/XSLStyleSheet.h: Ditto.
991 * xml/XSLTProcessor.cpp:
992 (WebCore::docLoaderFunc): Ditto.
993 (WebCore::xsltStylesheetPointer): Ditto.
994 (WebCore::xmlDocPtrFromNode): Ditto.
996 2008-02-14 Ada Chan <adachan@apple.com>
998 <rdar://problem/5744728> Fix leaks of RegularExpression objects in Frame.cpp.
1000 Reviewed by Jon and Darin.
1003 (WebCore::createRegExpForLabels):
1004 (WebCore::Frame::searchForLabelsBeforeElement):
1005 (WebCore::Frame::matchLabelsAgainstElement):
1007 2008-02-14 Stephanie Lewis <slewis@apple.com>
1015 2008-02-14 Oliver Hunt <oliver@apple.com>
1017 Reviewed by Geoff G and Weinig.
1019 <rdar://problem/5726608> REGRESSION (r29428): Assigning to window.status does not update status bar
1021 Revert the portions of r29428 responsible for breaking the ability to
1024 * page/DOMWindow.cpp:
1025 (WebCore::DOMWindow::setStatus):
1026 (WebCore::DOMWindow::defaultStatus):
1027 (WebCore::DOMWindow::setDefaultStatus):
1029 * page/DOMWindow.idl:
1031 2008-02-14 Anders Carlsson <andersca@apple.com>
1035 <rdar://problem/5721790>
1036 Crash in WebCore::DeprecatedString::operator= + 31 at news.google.com
1038 Use pointers in the cache map tables. Otherwise when we rehash,
1039 we will end up destroying Cache objects that node lists might point to.
1042 (WebCore::NodeListsNodeData::~NodeListsNodeData):
1043 (WebCore::Node::getElementsByName):
1044 (WebCore::Node::getElementsByClassName):
1046 2008-02-14 Alp Toker <alp@atoker.com>
1050 http://bugs.webkit.org/show_bug.cgi?id=17353
1051 XMLTokenizer installs global libxml2 callbacks that can break client applications
1053 Patch by Mark Rowe (with a few changes).
1055 The xmlRegisterInputCallbacks/xmlRegisterOutputCallbacks done at
1056 init are global so we need to make sure these callbacks only get used
1057 by XMLTokenizer and never by libxml2 calls in user applications.
1059 This patch modifies the match and open functions to only apply when we
1060 are certain the caller is XMLTokenizer by checking globalDocLoader and
1061 ensuring we're on the correct thread.
1063 Some possible issues remain. See the bug report for details.
1065 * dom/XMLTokenizer.cpp:
1066 (WebCore::matchFunc):
1067 (WebCore::openFunc):
1068 (WebCore::createStringParser):
1070 2008-02-14 Timothy Hatcher <timothy@apple.com>
1072 Reviewed by Darin Adler.
1074 <rdar://problem/5743768> A deadlock during storage layout tests
1076 Make sure not to hold the m_openDatabaseMapGuard mutex when calling
1077 Database::markAsDeletedAndClose(), since that can cause a deadlock
1078 during the synchronous DatabaseThread call it triggers.
1080 * storage/DatabaseTracker.cpp:
1081 (WebCore::DatabaseTracker::deleteDatabaseFile):
1083 2008-02-14 Adam Roben <aroben@apple.com>
1085 Turn on cross-document messaging support by default
1089 * Configurations/WebCore.xcconfig:
1091 * WebCore.vcproj/WebCore.vcproj:
1093 2008-02-14 Adam Roben <aroben@apple.com>
1095 Conditionalize cross-document messaging support
1097 The cross-document messaging parts of HTML 5 are in flux and we want
1098 ports to be able to turn off the support as needed.
1100 Note that the support is turned off by default right now. A subsequent
1101 commit will turn it on by default.
1106 * WebCore.vcproj/build-generated-files.sh:
1107 * bindings/js/JSDOMWindowCustom.cpp:
1108 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1109 * bindings/js/JSEventCustom.cpp:
1112 (WebCore::Event::isMessageEvent):
1114 * dom/MessageEvent.cpp:
1115 * dom/MessageEvent.h:
1116 * dom/MessageEvent.idl:
1117 * page/DOMWindow.cpp:
1118 (WebCore::DOMWindow::postMessage):
1120 * page/DOMWindow.idl:
1122 2008-02-14 Adam Roben <aroben@apple.com>
1124 Improve the efficiency of SecurityOriginHash
1128 * platform/SecurityOriginHash.h:
1129 (WebCore::SecurityOriginHash::hash): Now takes a const
1130 RefPtr<SecurityOrigin>& to reduce ref-count churn.
1131 (WebCore::SecurityOriginHash::equal): Ditto.
1133 2008-02-13 Justin Garcia <justin.garcia@apple.com>
1135 Reviewed by Oliver Hunt.
1137 Fixes the editing/deleting/5729680.html failure. It succeeds when run by itself
1138 but fails when run with other tests because FramePrivate's m_selectionGranularity
1139 isn't reset when a Frame receives a new document. It was also uninitialized in
1142 * loader/FrameLoader.cpp:
1143 (WebCore::FrameLoader::clear): Initialize m_selectionGranularity.
1145 (WebCore::FramePrivate::FramePrivate): Ditto.
1147 2008-02-13 Jon Honeycutt <jhoneycutt@apple.com>
1151 <rdar://problem/5739282> Hangs after closing video trailer popup with
1154 VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window
1157 * plugins/PluginQuirkSet.h: Added new quirk
1158 PluginQuirkDontSetNullWindowHandleOnDestroy.
1160 * plugins/win/PluginViewWin.cpp:
1161 (WebCore::PluginView::stop): Selectively call NPP_SetWindow.
1162 (WebCore::PluginView::determineQuirks): Set new quirk for VLC plug-in.
1164 2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com>
1166 Reviewed by Alp Toker.
1170 * css/CSSCursorImageValue.cpp:
1172 2008-02-13 Justin Garcia <justin.garcia@apple.com>
1174 Reviewed by Adam Roben.
1176 <rdar://problem/5729680> REGRESSION (r27873): Removing the last character of a word in Mail or Safari also removes the following space
1178 * editing/Editor.cpp:
1179 (WebCore::Editor::deleteWithDirection): Fixed a typo.
1181 2008-02-13 Nikolas Zimmermann <zimmermann@kde.org>
1185 Actually fix the manual-tests/svg-cursor-changes.svg testcase.
1186 I only reran layout tests when fixing the last issues with the patch,
1187 instead of trying the manual-test :( Fixed.
1189 * css/CSSCursorImageValue.cpp:
1190 (WebCore::CSSCursorImageValue::CSSCursorImageValue):
1191 (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1192 (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
1193 * css/CSSCursorImageValue.h:
1195 2008-02-13 Adam Roben <aroben@apple.com>
1199 * css/CSSCursorImageValue.cpp: #include MathExtras.h to get roundf.
1201 2008-02-13 Nikolas Zimmermann <zimmermann@kde.org>
1203 Reviewed by Darin & Eric.
1205 Fixes: http://bugs.webkit.org/show_bug.cgi?id=17258 (SVG uses erroneous cursor implementation)
1207 SVG cursors are not well-integrated within the CSS(3) cursor support in WebCore.
1208 SVGCursorElement duplicates CSSCursorImageValue functionality and inherits from
1209 CachedResourceClient itself, handling remote-image acquisation on its own.
1211 RenderStyle's CursorData class holds "IntPoint hotSpot", "CachedImage* image"
1212 and just for SVG a 'String cursorFragmentId' (a reference to a SVG <cursor> element, by id).
1214 SVG stores a reference to a SVGCursorElement, which holds a CachedImage pointer itself -
1215 instead of storing the CachedImage in the CursorData class, as it's supposed to be.
1216 Because of that several places in WebCore contain special SVG cursor handling - which
1219 Fix all issues by integrating within CSSCursorImageValue, remove 'String cursorFragmentId'
1220 from RenderStyle, kill any special SVG cursor handling in WebCore and fix dynamic attribute
1221 changes through DOM / SVG DOM (scripting of 'x' / 'y' / 'xlink:href' attribute). Now you
1222 can script the mouse cursor location using SVG - the feature anyone has waited for.
1224 Added manual test case: manual-tests/svg-cursor-changes.svg (no support for cursors in DRT)
1226 * css/CSSCursorImageValue.cpp:
1227 (WebCore::isSVGCursorIdentifier):
1228 (WebCore::resourceReferencedByCursorElement):
1229 (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1230 (WebCore::CSSCursorImageValue::updateIfNeeded):
1231 (WebCore::CSSCursorImageValue::image):
1232 * css/CSSCursorImageValue.h:
1233 * css/CSSImageValue.cpp:
1234 (WebCore::CSSImageValue::image):
1235 * css/CSSImageValue.h:
1236 * css/CSSParser.cpp:
1237 (WebCore::CSSParser::parseValue):
1238 * css/CSSStyleSelector.cpp:
1239 (WebCore::CSSStyleSelector::applyProperty):
1240 * manual-tests/svg-cursor-changes.svg: Added.
1241 * page/EventHandler.cpp:
1242 (WebCore::EventHandler::selectCursor):
1243 * rendering/RenderStyle.cpp:
1244 * rendering/RenderStyle.h:
1245 (WebCore::CursorData::operator==):
1246 * svg/SVGCursorElement.cpp:
1247 (WebCore::SVGCursorElement::SVGCursorElement):
1248 (WebCore::SVGCursorElement::~SVGCursorElement):
1249 (WebCore::SVGCursorElement::parseMappedAttribute):
1250 (WebCore::SVGCursorElement::addClient):
1251 (WebCore::SVGCursorElement::removeClient):
1252 (WebCore::SVGCursorElement::svgAttributeChanged):
1253 * svg/SVGCursorElement.h:
1254 (WebCore::SVGCursorElement::isValid):
1256 2008-02-13 Alp Toker <alp@atoker.com>
1258 Reviewed by Adam Roben.
1260 Split out pure-cairo Font code to FontCairo.cpp.
1262 Part of the ongoing work to share code with the Win port.
1266 * platform/graphics/cairo/FontCairo.cpp: Added.
1267 (WebCore::Font::drawGlyphs):
1268 * platform/graphics/gtk/FontGtk.cpp:
1270 2008-02-13 Kevin Ollivier <kevino@theolliviers.com>
1272 Reviewed by Darin Adler.
1274 Import wx/defs.h to keep windows.h from using ANSI functions
1275 (see note in file for more info) and use the 8-bit string friendly
1276 version of StringImpl::computeHash since we're passing it un UTF8
1277 string. Also, don't cache the hash result.
1279 http://bugs.webkit.org/show_bug.cgi?id=17321
1282 * platform/graphics/wx/FontPlatformData.h:
1283 (WebCore::FontPlatformData::hash):
1284 (WebCore::FontPlatformData::computeHash):
1286 2008-02-13 Rodney Dawes <dobey@wayofthemonkey.com>
1288 Fix Bug 17220: Illogical dependency between PluginView and
1291 <http://bugs.webkit.org/show_bug.cgi?id=17220>
1293 Reviewed by Adam and Darin.
1295 Rename PluginDatabase::createPluginView to PluginView::create, to make
1296 the illogical dependency between the two, logical
1297 Make PluginDatabase::findPlugin a public method
1298 Update the includes in PluginView and PluginDatabase for the change
1300 * plugins/PluginDatabase.h:
1301 * plugins/PluginView.h:
1302 * plugins/win/PluginDatabaseWin.cpp:
1303 * plugins/win/PluginViewWin.cpp:
1305 2008-02-13 Adam Roben <aroben@apple.com>
1309 * platform/graphics/cg/GraphicsContextCG.cpp: Added missing #include.
1311 2008-02-13 Matt Lilek <webkit@mattlilek.com>
1313 Not reviewed, build fix.
1315 * platform/graphics/cg/GraphicsContextCG.cpp:
1316 (WebCore::GraphicsContext::paintBuffer):
1318 2008-02-13 Darin Adler <darin@apple.com>
1320 - try to fix Wx build
1322 * platform/graphics/wx/GraphicsContextWx.cpp:
1323 (WebCore::GraphicsContext::paintBuffer): Added.
1325 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1326 (WebCore::GraphicsContext::paintBuffer): Added missing paintingDisabled() check.
1327 * platform/graphics/cg/GraphicsContextCG.cpp:
1328 (WebCore::GraphicsContext::paintBuffer): Ditto.
1329 * platform/graphics/qt/GraphicsContextQt.cpp:
1330 (WebCore::GraphicsContext::paintBuffer): Ditto.
1332 2008-02-13 Darin Adler <darin@apple.com>
1334 - try to fix Wx build
1336 * platform/wx/LocalizedStringsWx.cpp: Add missing include.
1338 2008-02-11 Darin Adler <darin@apple.com>
1340 - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
1341 incorrectly due to visibility fix
1343 Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
1345 * WebCore.base.exp: Rolled out change.
1346 * css/CSSMutableStyleDeclaration.cpp:
1347 (WebCore::CSSMutableStyleDeclaration::setProperty): Ditto.
1348 * page/Settings.cpp:
1349 (WebCore::Settings::Settings): Ditto. But keep the initialization of
1350 m_fontRenderingMode.
1351 (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Removed.
1353 (WebCore::Settings::needsXcodeVisibilityQuirk): Removed.
1355 2008-02-13 Alexey Proskuryakov <ap@webkit.org>
1359 <rdar://problem/5740042> Database termination issues
1361 Test: storage/close-during-stress-test.html
1364 (WebCore::Document::databaseThread):
1366 Don't re-create the database thread if it has been already terminated.
1368 * storage/Database.h: (WebCore::Database::document): Changed m_database to a RefPtr to avoid
1369 having a hanging reference.
1371 * storage/DatabaseThread.cpp:
1372 (WebCore::DatabaseThread::requestTermination):
1374 * storage/SQLTransaction.cpp: (WebCore::SQLTransaction::~SQLTransaction): Removed logging.
1375 Transactions are deleted during GC, so it's usually not importatnt to know when it happens.
1377 2008-02-12 Bernhard Rosenkraenzer <bero@arklinux.org>
1381 - fix http://bugs.webkit.org/show_bug.cgi?id=17340
1382 WebCore/platform/Timer.cpp fails to build with gcc 4.3
1384 * platform/Timer.cpp: Add include of <limits.h> since this file uses UINT_MAX.
1386 2008-02-12 Timothy Hatcher <timothy@apple.com>
1388 Reviewed by Brady Eidson.
1390 <rdar://problem/5652560> Can't delete database if the website that
1391 uses it has been opened in this session
1393 Close the Database on the database thread before deleting the file.
1394 Tested and works on Windows and Mac.
1396 * platform/sql/SQLiteDatabase.cpp:
1397 (WebCore::SQLiteDatabase::close): Assert we are on the opening thread.
1398 * storage/Database.cpp:
1399 (WebCore::Database::markAsDeletedAndClose): Unschedule any pending
1400 Database tasks, and start and imediate DatabaseCloseTask.
1401 (WebCore::Database::close): Close the SQLDatabase.
1402 * storage/Database.h: Renamed markAsDeleted to markAsDeletedAndClose.
1403 * storage/DatabaseTask.cpp:
1404 (WebCore::DatabaseCloseTask::DatabaseCloseTask): New task.
1405 (WebCore::DatabaseCloseTask::doPerformTask): Call close on the Database.
1406 (WebCore::DatabaseCloseTask::debugTaskName): Return "DatabaseCloseTask".
1407 * storage/DatabaseTask.h: Add DatabaseCloseTask.
1408 * storage/DatabaseTracker.cpp:
1409 (WebCore::DatabaseTracker::deleteDatabaseFile): Call the renamed
1410 markAsDeletedAndClose.
1412 2008-02-12 Oliver Hunt <oliver@apple.com>
1414 Reviewed by NOBODY (Build fix).
1416 Endeavour to fix qt and gtk builds
1418 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1419 * platform/graphics/qt/GraphicsContextQt.cpp:
1421 2008-02-12 Oliver Hunt <oliver@apple.com>
1425 Bug 17269: Deobfuscate CanvasRenderingContext2D.cpp
1426 Remove ifdef's from canvas paint code
1428 By making GraphicsContext aware of the crossplatform ImageBuffer
1429 type we can migrate the ifdef-ified paint code in HTMLCanvasElement
1430 into platform implementations of GraphicsContext.
1432 * html/HTMLCanvasElement.cpp:
1433 (WebCore::HTMLCanvasElement::paint):
1434 * platform/graphics/GraphicsContext.h:
1435 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1436 (WebCore::GraphicsContext::paintBuffer):
1437 * platform/graphics/cg/GraphicsContextCG.cpp:
1438 (WebCore::GraphicsContext::paintBuffer):
1439 * platform/graphics/qt/GraphicsContextQt.cpp:
1440 (WebCore::GraphicsContext::paintBuffer):
1442 2008-02-12 Brady Eidson <beidson@apple.com>
1444 Reviewed by Darin Adler
1446 Fix for <rdar://problem/5737692> - Database API needs to support SuccessCallback
1448 Layout tests will come shortly with a mess of DRT changes
1450 * platform/SecurityOrigin.cpp:
1451 (WebCore::SecurityOrigin::SecurityOrigin): Standardize on "empty string" instead of null string
1452 as different paths of constructing a SecurityOrigin were causing different hashes for the "same"
1455 * storage/Database.cpp:
1456 (WebCore::Database::changeVersion): Pass in the successCallback
1457 (WebCore::Database::transaction): Ditto
1459 * storage/SQLTransaction.cpp:
1460 (WebCore::SQLTransaction::SQLTransaction):
1461 (WebCore::SQLTransaction::debugStepName):
1462 (WebCore::SQLTransaction::performNextStep): Update ASSERTs for the new valid steps
1463 (WebCore::SQLTransaction::performPendingCallback): Ditto
1464 (WebCore::SQLTransaction::postflightAndCommit): Schedule the success callback if it exists - otherwise
1465 skip straight to cleanupAfterSuccessCallback()
1466 (WebCore::SQLTransaction::deliverSuccessCallback): Deliver success callback on the main thread, then
1467 schedule cleanupAfterSuccessCallback()
1468 (WebCore::SQLTransaction::cleanupAfterSuccessCallback): Cleanup and end the transaction
1469 (WebCore::SQLTransaction::handleTransactionError):
1470 (WebCore::SQLTransaction::deliverTransactionErrorCallback):
1471 (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback):
1472 * storage/SQLTransaction.h:
1474 2008-02-12 Steve Falkenburg <sfalken@apple.com>
1476 Changes to support merged MIDL output.
1478 All COM interfaces are now generated to WebKit.h.
1480 Reviewed by Sam, Ada.
1482 * bindings/scripts/CodeGeneratorCOM.pm:
1484 2008-02-12 Dan Bernstein <mitz@apple.com>
1486 Reviewed by Adam Roben.
1488 - fix http://bugs.webkit.org/show_bug.cgi?id=17041
1489 <rdar://problem/5709660> Eastern Asian fonts do not display without specific box in Control Panel
1491 Revised the system fallback font lookup logic to use MLang font linking
1492 again. To avoid reintroducing bug 16548 and <rdar://problem/5280188>,
1493 for CJK characters, try linking based on a single code page at a time,
1494 starting with the user's default code page (if it is one of the CJK
1495 code pages) followed by the other CJK code pages in a prescribed order
1496 that matches what Firefox does.
1498 * platform/graphics/win/FontCacheWin.cpp:
1499 (WebCore::getCJKCodePageMasks): Added. Returns the search order for CJK
1500 code pages, with the user's default code page first.
1501 (WebCore::currentFontContainsCharacter): Factored out of
1502 getFontDataForCharacters().
1503 (WebCore::createMLangFont): Ditto.
1504 (WebCore::FontCache::getFontDataForCharacters):
1506 2008-02-12 Rodney Dawes <dobey@wayofthemonkey.com>
1508 Reviewed by Alp Toker.
1510 Add -DMAEMO_CHANGES when the hildon CONFIG option is specified
1511 Add hildon-1 to PKGCONFIG when hildon CONFIG option is specified
1515 2008-02-12 Dan Bernstein <mitz@apple.com>
1517 Reviewed by Timothy Hatcher.
1519 - <rdar://problem/5738175> Remove workaround for <rdar://problem/5539388> from post-Tiger builds
1521 * platform/graphics/cg/GraphicsContextCG.cpp:
1522 (WebCore::GraphicsContext::setShadow):
1524 2008-02-12 Brady Eidson <beidson@apple.com>
1528 * storage/DatabaseTask.cpp:
1530 2008-02-12 Alexey Proskuryakov <ap@webkit.org> and Brady Eidson <beidson@apple.com>
1534 http://bugs.webkit.org/show_bug.cgi?id=17177
1535 <rdar://problem/5729619> Storage tasks are getting lost
1537 <rdar://problem/5729445> REGRESSION: Cannot schedule more than one transaction at a time
1539 <rdar://problem/5729446> Major thread safety issue in Database code
1541 * platform/MessageQueue.h: Added a thread-safe queue abstraction.
1543 * WebCore.vcproj/WebCore.vcproj:
1544 * WebCore.xcodeproj/project.pbxproj:
1545 Added MessageQueue.h.
1548 (WebCore::Document::~Document): Fixed a race condition resulting in a hanging reference.
1550 * storage/Database.idl: Fixed parameter declarations to actually match implementation
1551 (which is custom, so it got out of sync).
1553 * storage/DatabaseTask.h:
1554 (WebCore::DatabaseTask::database):
1555 (WebCore::DatabaseTransactionTask::transaction):
1556 Changed tasks to hold more information internally. Added helpers for better debug logging.
1558 * storage/DatabaseTask.cpp:
1559 (WebCore::DatabaseTask::DatabaseTask):
1560 (WebCore::DatabaseTask::performTask):
1561 (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1562 (WebCore::DatabaseOpenTask::doPerformTask):
1563 (WebCore::DatabaseOpenTask::debugTaskName):
1564 (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
1565 (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
1566 (WebCore::DatabaseTransactionTask::doPerformTask):
1567 (WebCore::DatabaseTransactionTask::debugTaskName):
1568 (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1569 (WebCore::DatabaseTableNamesTask::doPerformTask):
1570 (WebCore::DatabaseTableNamesTask::debugTaskName):
1571 Implementation for the above.
1573 (WebCore::DatabaseTask::lockForSynchronousScheduling):
1574 (WebCore::DatabaseTask::waitForSynchronousCompletion):
1575 Fixed a potential race condition: if the task completed before we entered a wait, we'd never
1576 wake up. There was an assertion guarding against this, but no actual guarantee that I could see.
1578 * storage/DatabaseThread.cpp:
1579 (WebCore::DatabaseThread::DatabaseThread):
1580 (WebCore::DatabaseThread::requestTermination):
1581 (WebCore::DatabaseThread::databaseThread):
1582 (WebCore::DatabaseThread::scheduleTask):
1583 (WebCore::DatabaseThread::scheduleImmediateTask):
1584 (WebCore::DatabaseThread::unscheduleDatabaseTasks):
1585 * storage/DatabaseThread.h:
1586 Changed to use MessageQueue.
1588 * storage/Database.cpp:
1589 (WebCore::guidMutex):
1590 (WebCore::guidToVersionMap):
1591 (WebCore::guidToDatabaseMap):
1592 (WebCore::Database::openDatabase):
1593 (WebCore::Database::Database):
1594 (WebCore::Database::~Database):
1595 (WebCore::Database::openAndVerifyVersion):
1596 (WebCore::guidForOriginAndName):
1597 (WebCore::Database::changeVersion):
1598 (WebCore::Database::transaction):
1599 (WebCore::Database::scheduleTransaction):
1600 (WebCore::Database::scheduleTransactionStep):
1601 (WebCore::Database::scheduleTransactionCallback):
1602 (WebCore::Database::version):
1603 (WebCore::Database::deliverPendingCallback):
1604 (WebCore::Database::tableNames):
1605 * storage/Database.h:
1606 Changed m_transactionQueue to a MessageQueue.
1607 Got rid of callback tracking - these can take care of themselves.
1608 Got rid of a DatabaseThread member, as the Document can be asked for it.
1609 Moved private static members and helpers out of the header.
1610 Lost CurrentThreadSetter debug helper on the way. We may need to re-add something like that later.
1612 * storage/SQLTransaction.h:
1613 * storage/SQLTransaction.cpp: Added a lot of debug logging.
1614 (WebCore::SQLTransaction::scheduleToRunStatements): Removed "m_currentStatement = 0" assignment,
1615 as it created a race condition. Everything seems to work better without it, although a real fix
1616 would be to get rid of this variable - it's evil shared data that isn't even protected in any way.
1618 * manual-tests/database-threading-stress-test-2.html: Added.
1619 * manual-tests/database-threading-stress-test.html: Added.
1621 2008-02-12 Adam Roben <aroben@apple.com>
1623 Fix Bug 17328: REGRESSION (r30147): Inspector is unstyled on Windows
1625 <http://bugs.webkit.org/show_bug.cgi?id=17328>
1630 Test: fast/loader/local-css-allowed-in-strict-mode.html
1632 * platform/network/cf/ResourceResponseCFNet.cpp:
1633 (WebCore::ResourceResponse::doUpdateResourceResponse): Add a case for
1636 2008-02-12 Anders Carlsson <andersca@apple.com>
1640 * loader/ImageDocument.cpp:
1642 2008-02-12 Anders Carlsson <andersca@apple.com>
1646 Make the code that sets the image title cross platform.
1648 * WebCore.xcodeproj/project.pbxproj:
1649 Remove ImageDocumentMac.
1651 * loader/ImageDocument.cpp:
1652 (WebCore::ImageTokenizer::finish):
1654 * loader/mac/ImageDocumentMac.h: Removed.
1655 * loader/mac/ImageDocumentMac.mm: Removed.
1657 * page/mac/WebCoreFrameBridge.h:
1658 * page/mac/WebCoreViewFactory.h:
1659 Move imageTitleForFilename:size from the bridge to
1662 * platform/LocalizedStrings.h:
1665 * platform/mac/LocalizedStringsMac.mm:
1666 (WebCore::imageTitle):
1667 Have imageTitle call the view factory.
1669 * platform/qt/Localizations.cpp:
1670 (WebCore::imageTitle):
1671 * platform/wx/LocalizedStringsWx.cpp:
1672 (WebCore::imageTitle):
1673 * platform/gtk/LocalizedStringsGtk.cpp:
1674 (WebCore::imageTitle):
1677 2008-02-12 Oliver Hunt <oliver@apple.com>
1679 Reviewed by NOBODY (Build fix).
1683 * html/HTMLCanvasElement.cpp:
1684 (WebCore::HTMLCanvasElement::paint):
1686 2008-02-12 Oliver Hunt <oliver@apple.com>
1688 Reviewed by NOBODY (Build fix).
1690 And another attempt to fixerate Qt
1692 * html/HTMLCanvasElement.cpp:
1693 (WebCore::HTMLCanvasElement::paint):
1695 2008-02-12 Oliver Hunt <oliver@apple.com>
1697 Reviewed by NOBODY (Build fix).
1699 Attempt to fix Qt build
1701 * html/HTMLCanvasElement.h:
1703 2008-02-11 Oliver Hunt <oliver@apple.com>
1705 Reviewed by Alp Toker.
1707 Make canvas use an ImageBuffer for its backing store
1709 In order to make the canvas implementation less platform dependent
1710 (and thus reduce the current quagmire of ifdefs) we now use an
1711 ImageBuffer to provide the backing buffer, an immediate consequence
1712 of this is to remove multiple ifdefs in the construction of the
1713 buffer. This patch allows us to further reduce the platform
1714 dependencies in later patches.
1717 * html/CanvasRenderingContext2D.cpp:
1718 (WebCore::CanvasRenderingContext2D::drawImage):
1719 * html/HTMLCanvasElement.cpp:
1720 (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1721 (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
1722 (WebCore::HTMLCanvasElement::reset):
1723 (WebCore::HTMLCanvasElement::paint):
1724 (WebCore::HTMLCanvasElement::createDrawingContext):
1725 (WebCore::HTMLCanvasElement::drawingContext):
1726 (WebCore::HTMLCanvasElement::createPlatformImage):
1727 * html/HTMLCanvasElement.h:
1729 2008-02-11 Dan Bernstein <mitz@apple.com>
1731 Reviewed by Dave Hyatt.
1733 - fix http://bugs.webkit.org/show_bug.cgi?id=17320
1734 <rdar://problem/5736953> :last-child does not set the "uses sibling rules" flag
1736 Test: fast/css/last-child-style-sharing.html
1738 * css/CSSGrammar.y: Changed to call setUsesSiblingRules(true) for all
1739 CSS3 selectors that require it.
1741 2008-02-11 Sam Weinig <sam@webkit.org>
1743 Reviewed by Darin Adler.
1745 Make the cross-domain security model more closely match Firefox by always returning the
1746 native built-in functions when accessing functions cross-domain.
1749 <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
1750 <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it
1752 Tests: fast/dom/Window/window-custom-prototype-crash.html
1753 fast/dom/Window/window-function-frame-getter-precedence.html
1754 http/tests/security/cross-frame-access-get-override.html
1755 http/tests/security/cross-frame-access-location-get-override.html
1756 http/tests/security/cross-frame-access-location-get.html
1757 http/tests/security/cross-frame-access-location-put.html
1759 * bindings/js/JSDOMWindowCustom.cpp:
1760 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
1761 - Return the native-built in version of an cross-domain allowed function (eg. window.focus) whether or
1762 not it has been overridden, instead of undefined.
1763 - When doing findEntry lookup, use the the tables directly (JSDOMWindowPrototype::info.propHashTable)
1764 instead of calling the virtual classInfo() method to avoid the unnecessary overhead.
1765 - Allow access to the native toString function cross-domain. It always returns "[object Window]".
1766 - Use the new nonCachingStaticFunctionGetter when return allowed functions cross-frame so that
1767 the function an overridden function is not inadvertantly returned from the PropertyMap.\
1769 * bindings/js/JSHistoryCustom.cpp:
1770 (WebCore::JSHistory::customGetOwnPropertySlot):
1771 - Implement the same model as described above for the History object, always returning the
1772 native built-in function cross-domain.
1773 - Allow access to the native toString function cross-domain.
1774 - Clean up the code to make it clear that the custom functionality is only there for cross-domain
1777 * bindings/js/JSLocation.cpp:
1778 (WebCore::JSLocation::getOwnPropertySlot):
1779 - Match the generated classes by moving all the custom logic into a separate customGetOwnPropertySlot
1780 function. This will help moving to a generated class in the future.
1781 (WebCore::JSLocation::customGetOwnPropertySlot):
1782 - Implement the same model as described above for the Location object, always returning the
1783 native built-in function cross-domain.
1784 - Clean up the code to make it clear that the custom functionality is only there for cross-domain
1786 (WebCore::JSLocation::put):
1787 (WebCore::JSLocation::deleteProperty):
1788 (WebCore::JSLocation::getPropertyNames):
1789 * bindings/js/JSLocation.h:
1790 - Clean up to match the rest of the file a little better.
1792 * bindings/js/kjs_binding.cpp:
1793 (WebCore::allowsAccessFromFrame):
1794 (WebCore::printErrorMessageForFrame):
1795 (WebCore::nonCachingStaticFunctionGetter):
1796 (WebCore::objectToStringFunctionGetter):
1797 * bindings/js/kjs_binding.h:
1798 - Put common functionality related to cross-domain access here to serve as a central shared point.
1799 This includes moving and augmenting the allowsAccessFromFrame method that was in both JSHistoryCustom.cpp
1802 * bindings/js/kjs_dom.cpp:
1803 (WebCore::checkNodeSecurity):
1804 - Use the new allowsAccessFromFrame method.
1806 * bindings/js/kjs_window.cpp:
1807 (KJS::Window::childFrameGetter): Cleanup.
1808 (KJS::Window::namedItemGetter): Cleanup.
1809 (KJS::Window::getOwnPropertySlot):
1810 - Do the prototype lookup early to match Firefox in having function lookup have a higher precedence
1811 than the index or shortcut name getters.
1812 - Cleanup function to make it more understandable and slightly more efficient.
1813 (KJS::Window::allowsAccessFrom):
1814 - Add a new variant of this method that takes a reference to a String, which, on failure, will
1815 contain the error message to print out. The caller can then pass this to printErrorMessage.
1816 This allows for code to check allowsAccessFrom and act on the result without printing out the
1817 error message. For convenience, a version with out the String parameter has been left which
1818 prints out the message automatically.
1819 (KJS::Window::printErrorMessage):
1820 * bindings/js/kjs_window.h:
1822 2008-02-11 Darin Adler <darin@apple.com>
1826 - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
1827 incorrectly due to visibility fix
1829 Added an Xcode-specific quirk.
1831 * WebCore.base.exp: Added export for new Settings function.
1832 * css/CSSMutableStyleDeclaration.cpp:
1833 (WebCore::CSSMutableStyleDeclaration::setProperty): Here's the crazy quirk.
1834 If you try to change the visibilty on a node with the class name tab_content,
1835 instead it will use display:none.
1836 * page/Settings.cpp:
1837 (WebCore::Settings::Settings): Initialize m_needsXcodeVisibilityQuirk. Also
1838 initialize m_fontRenderingMode! This seems like it was a bug before, but we
1839 probably were getting lucky and always getting 0 on Windows, which is the
1840 only place the setting matters.
1841 (WebCore::Settings::setNeedsXcodeVisibilityQuirk): Added.
1843 (WebCore::Settings::needsXcodeVisibilityQuirk): Added.
1845 2008-02-11 Timothy Hatcher <timothy@apple.com>
1847 Reviewed by Brady Eidson.
1849 <rdar://problem/5733069> Many m_quotaMap uses do not hold the m_quotaMapGuard
1851 * storage/DatabaseTracker.cpp:
1852 (WebCore::DatabaseTracker::hasEntryForOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1853 (WebCore::DatabaseTracker::origins): Ditto.
1854 (WebCore::DatabaseTracker::setQuota): Ditto.
1855 (WebCore::DatabaseTracker::deleteAllDatabases): Call origins() and itterate over the
1856 origins to call deleteOrigin().
1857 (WebCore::DatabaseTracker::deleteOrigin): Hold m_quotaMapGuard when using m_quotaMap.
1859 2008-02-11 David Hyatt <hyatt@apple.com>
1861 Fix for bug 17286, crash accessing a null RenderStyle. Add a simple null check.
1865 Added fast/css/empty-generated-content.html
1867 * css/CSSStyleSelector.cpp:
1868 (WebCore::CSSStyleSelector::checkOneSelector):
1870 2008-02-11 Rob Buis <buis@kde.org>
1872 Reviewed by David Kilzer.
1874 http://bugs.webkit.org/show_bug.cgi?id=17201
1875 Bug 17201: Use RefPtr in CSSParser::parseFont() to get rid of goto silliness
1877 Gets rid of goto usage in parseFont.
1879 * css/CSSParser.cpp:
1880 (WebCore::CSSParser::parseFont):
1882 2008-02-11 David Hyatt <hyatt@apple.com>
1884 Fix for bug 17298, Acid3 text should be black and not red. Make sure stylesheets with the wrong MIME type
1885 are not accepted in strict mode.
1889 Added http/tests/misc/css-reject-in-strict-mode.html
1891 * css/CSSImportRule.cpp:
1892 (WebCore::CSSImportRule::setCSSStyleSheet):
1893 * css/CSSImportRule.h:
1895 (WebCore::Document::setCSSStyleSheet):
1897 * dom/ProcessingInstruction.cpp:
1898 (WebCore::ProcessingInstruction::setCSSStyleSheet):
1899 * dom/ProcessingInstruction.h:
1900 * html/HTMLLinkElement.cpp:
1901 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1902 * html/HTMLLinkElement.h:
1903 * html/HTMLMediaElement.cpp:
1904 (WebCore::HTMLMediaElement::pickMedia):
1905 * loader/CachedCSSStyleSheet.cpp:
1906 (WebCore::CachedCSSStyleSheet::ref):
1907 (WebCore::CachedCSSStyleSheet::checkNotify):
1908 (WebCore::CachedCSSStyleSheet::canUseSheet):
1909 * loader/CachedCSSStyleSheet.h:
1910 (WebCore::CachedCSSStyleSheet::sheetText):
1911 * loader/CachedResourceClient.h:
1912 (WebCore::CachedResourceClient::setCSSStyleSheet):
1913 * loader/mac/UserStyleSheetLoader.cpp:
1914 (UserStyleSheetLoader::setCSSStyleSheet):
1915 * loader/mac/UserStyleSheetLoader.h:
1917 2008-02-11 Adam Roben <aroben@apple.com>
1919 Fix Bug 14316: Inspector's Console truncates long strings
1921 <http://bugs.webkit.org/show_bug.cgi?id=14316>
1924 We no longer call Object.describe to format all the output of commands
1925 enetered into the Console. The ConsolePanel object now has a set of
1926 formatting functions that append a formatted representation of the
1927 passed-in object to the passed-in container node.
1931 * page/inspector/ConsolePanel.js:
1932 (WebInspector.ConsolePanel._onEnterPressed): Updated for rename of
1933 _outputToNode to _format.
1934 (WebInspector.ConsolePanel._format): Renamed from _outputToNode. Use
1935 Object.type to get the type of the object, then call the appropriate
1936 formatting function.
1937 (WebInspector.ConsolePanel._formatvalue): Added.
1938 (WebInspector.ConsolePanel._formatstring): Added. This function
1939 contains the actual fix for the bug, since it doesn't truncate the
1940 string no matter how long it is.
1941 (WebInspector.ConsolePanel._formatregexp): Added.
1942 (WebInspector.ConsolePanel._formatarray): Added. This is a bit more
1943 functional than Object.describe for arrays, since it recursively
1944 formats each item in the array. One advantage of this is that Nodes in
1945 arrays will be linkified instead of just turning into "[Object
1946 HTMLBodyElement]" or similar.
1947 (WebInspector.ConsolePanel._formatnode): Added.
1948 (WebInspector.ConsolePanel._formatobject): Added.
1949 (WebInspector.ConsolePanel.
1950 * page/inspector/utilities.js:
1951 (Object.type): Added. Code was pulled out of Object.describe and
1952 reorganized slightly.
1953 (Object.describe): Call Object.type. There should be no change in
1954 behavior of this function.
1956 2008-02-11 Alp Toker <alp@atoker.com>
1958 Wx build fix for breakage introduced in r30142. Spotted by Darin.
1960 * platform/network/curl/ResourceHandleManager.cpp:
1961 (WebCore::parseDataUrl):
1963 2008-02-11 Brent Fulgham <bfulgham@gmail.com>
1965 Reviewed and tweaked by Darin
1967 - http://bugs.webkit.org/show_bug.cgi?id=17299
1968 a couple compilation fixes for Cairo/Win32 configuration
1970 * platform/graphics/cairo/ImageSourceCairo.cpp:
1971 (WebCore::createDecoder): Turn off XBMImageDecoder for PLATFORM(WIN) configuration.
1972 * rendering/RenderThemeWin.cpp:
1973 (WebCore::prepareForDrawing): Added IntRect parameter.
1974 (WebCore::doneDrawing): Ditto.
1975 (WebCore::RenderThemeWin::paintButton): Ditto.
1976 (WebCore::RenderThemeWin::paintTextField): Ditto.
1977 (WebCore::RenderThemeWin::paintMenuListButton): Ditto.
1978 (WebCore::RenderThemeWin::systemFont): Added.
1980 2008-02-11 Alp Toker <alp@atoker.com>
1984 Acid3 data URL parsing fix for the GTK+ port.
1986 Avoid WebCore's base64Decode() when possible since it's not a
1987 general-purpose Base64 decoder and fails on newlines.
1989 * platform/network/curl/ResourceHandleManager.cpp:
1990 (WebCore::parseDataUrl):
1992 2008-02-11 Darin Adler <darin@apple.com>
1994 - another Qt build fix
1996 * platform/qt/PopupMenuQt.cpp:
1997 (WebCore::PopupMenu::PopupMenu): Added explicit RefCounted constructor.
1999 2008-02-10 Darin Adler <darin@apple.com>
2001 - another Qt build fix (wish the Qt bot wouldn't stop on the first error)
2003 * platform/qt/FileChooserQt.cpp:
2004 (WebCore::FileChooser::FileChooser): Added explicit RefCounted constructor.
2006 2008-02-10 Darin Adler <darin@apple.com>
2008 - another Qt build fix
2010 * platform/graphics/qt/IconQt.cpp:
2011 (WebCore::Icon::Icon): Added explicit RefCounted constructor.
2013 2008-02-10 Alp Toker <alp@atoker.com>
2015 Another Win build fix for r30133 breakage.
2017 * plugins/win/PluginPackageWin.cpp:
2018 (WebCore::PluginPackage::PluginPackage):
2020 2008-02-10 Alp Toker <alp@atoker.com>
2022 Build fix GTK+ and prospective build fix for Win breakage introduced
2025 * platform/Cursor.h:
2026 (WebCore::SharedCursor::SharedCursor):
2027 * platform/graphics/gtk/IconGtk.cpp:
2028 (WebCore::Icon::Icon):
2029 * platform/gtk/FileChooserGtk.cpp:
2030 (WebCore::FileChooser::FileChooser):
2031 * platform/gtk/PopupMenuGtk.cpp:
2032 (WebCore::PopupMenu::PopupMenu):
2034 2008-02-10 Darin Adler <darin@apple.com>
2036 - try to fix Win, Qt, GTK, and WX builds
2038 * platform/Cursor.h:
2039 (WebCore::SharedCursor::SharedCursor): Added explicit RefCounted constructor.
2040 * platform/graphics/win/IconWin.cpp:
2041 (WebCore::Icon::Icon): Ditto.
2042 * platform/win/FileChooserWin.cpp:
2043 (WebCore::FileChooser::FileChooser): Ditto.
2044 * platform/win/PopupMenuWin.cpp:
2045 (WebCore::PopupMenu::PopupMenu): Ditto.
2046 * platform/wx/TemporaryLinkStubs.cpp:
2047 (FileChooser::FileChooser): Ditto.
2048 (PopupMenu::PopupMenu): Ditto.
2049 (Icon::Icon): Ditto.
2050 * plugins/PluginStream.cpp:
2051 (WebCore::PluginStream::PluginStream): Ditto.
2053 2008-02-10 David Hyatt <hyatt@apple.com>
2055 Fix for bug 17082, cssRules should be live.
2059 Added fast/css/live-cssrules.html
2061 * css/CSSRuleList.cpp:
2062 (WebCore::CSSRuleList::CSSRuleList):
2063 (WebCore::CSSRuleList::length):
2064 (WebCore::CSSRuleList::item):
2065 (WebCore::CSSRuleList::deleteRule):
2066 (WebCore::CSSRuleList::insertRule):
2067 * css/CSSRuleList.h:
2069 2008-02-10 David Hyatt <hyatt@apple.com>
2071 Fix for bug 17253. <iframe> contents need to be reflected into the DOM as a single text node.
2075 fast/frames/iframe-text-contents.html
2077 * html/HTMLParser.cpp:
2078 (WebCore::HTMLParser::getNode):
2079 * html/HTMLTokenizer.cpp:
2080 (WebCore::HTMLTokenizer::parseSpecial):
2081 (WebCore::HTMLTokenizer::parseComment):
2082 (WebCore::HTMLTokenizer::parseTag):
2083 * html/HTMLTokenizer.h:
2084 (WebCore::HTMLTokenizer::State::inIFrame):
2085 (WebCore::HTMLTokenizer::State::setInIFrame):
2086 (WebCore::HTMLTokenizer::State::inAnySpecial):
2087 (WebCore::HTMLTokenizer::State::needsSpecialWriteHandling):
2088 (WebCore::HTMLTokenizer::State::):
2090 2008-02-10 Andrew Wellington <proton@wiretapped.net>
2092 Reviewed and tweaked by Darin.
2094 DOMRange.surroundContents throws wrong exception (Acid3 bug)
2095 http://bugs.webkit.org/show_bug.cgi?id=16749
2097 Throw BAD_BOUNDARYPOINTS_ERR if attempting to split a non-text node that
2098 has offsets in characters.
2101 (WebCore::Range::surroundContents):
2103 2008-02-10 Darin Adler <darin@apple.com>
2107 - http://bugs.webkit.org/show_bug.cgi?id=17256
2108 Make clients of RefCounted explicitly set the count to 0.
2110 * bindings/js/JSSVGPODTypeWrapper.h:
2111 (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper):
2112 * css/CSSFontFace.h:
2113 (WebCore::CSSFontFace::CSSFontFace):
2114 * css/CSSRuleList.cpp:
2115 (WebCore::CSSRuleList::CSSRuleList):
2116 * css/CSSSegmentedFontFace.cpp:
2117 (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace):
2119 (WebCore::Counter::Counter):
2121 (WebCore::Pair::Pair):
2123 (WebCore::Rect::Rect):
2125 (WebCore::StyleBase::StyleBase):
2126 * css/StyleSheetList.cpp:
2127 (WebCore::StyleSheetList::StyleSheetList):
2129 (WebCore::Attr::Attr):
2132 (WebCore::Attribute::Attribute):
2133 * dom/Clipboard.cpp:
2134 (WebCore::Clipboard::Clipboard):
2135 * dom/DOMImplementation.h:
2136 (WebCore::DOMImplementation::DOMImplementation):
2138 (WebCore::Event::Event):
2139 * dom/EventListener.h:
2140 (WebCore::EventListener::EventListener):
2141 * dom/ExceptionBase.cpp:
2142 (WebCore::ExceptionBase::ExceptionBase):
2143 * dom/NamedAttrMap.h:
2144 (WebCore::NamedAttrMap::insertAttribute):
2145 * dom/NamedNodeMap.h:
2146 (WebCore::NamedNodeMap::NamedNodeMap):
2148 (WebCore::NodeFilter::NodeFilter):
2149 * dom/NodeFilterCondition.h:
2150 (WebCore::NodeFilterCondition::NodeFilterCondition):
2152 (WebCore::NodeList::NodeList):
2153 * dom/QualifiedName.h:
2154 (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
2155 (WebCore::QualifiedName::ref):
2157 (WebCore::Range::Range):
2158 * dom/RegisteredEventListener.cpp:
2159 (WebCore::RegisteredEventListener::RegisteredEventListener):
2160 * dom/StyledElement.h:
2161 * dom/Traversal.cpp:
2162 (WebCore::Traversal::Traversal):
2163 * editing/EditCommand.cpp:
2164 (WebCore::EditCommand::EditCommand):
2165 * history/BackForwardList.cpp:
2166 (WebCore::BackForwardList::BackForwardList):
2167 * history/CachedPage.cpp:
2168 (WebCore::CachedPage::CachedPage):
2169 * history/HistoryItem.cpp:
2170 (WebCore::HistoryItem::HistoryItem):
2171 * html/CanvasGradient.cpp:
2172 (WebCore::CanvasGradient::CanvasGradient):
2173 * html/CanvasPattern.cpp:
2174 (WebCore::CanvasPattern::CanvasPattern):
2175 * html/CanvasRenderingContext2D.cpp:
2176 (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
2177 * html/CanvasStyle.cpp:
2178 (WebCore::CanvasStyle::CanvasStyle):
2179 * html/HTMLCollection.cpp:
2180 (WebCore::HTMLCollection::HTMLCollection):
2181 * html/MediaError.h:
2182 (WebCore::MediaError::MediaError):
2183 * html/TimeRanges.cpp:
2184 (TimeRanges::TimeRanges):
2185 * html/TimeRanges.h:
2186 (WebCore::TimeRanges::TimeRanges):
2187 * html/VoidCallback.h:
2188 (WebCore::VoidCallback::VoidCallback):
2189 * loader/DocumentLoader.cpp:
2190 (WebCore::DocumentLoader::DocumentLoader):
2191 * loader/FormState.cpp:
2192 (WebCore::FormState::FormState):
2193 * loader/ResourceLoader.cpp:
2194 (WebCore::ResourceLoader::ResourceLoader):
2195 * loader/TextResourceDecoder.cpp:
2196 (WebCore::TextResourceDecoder::TextResourceDecoder):
2197 * loader/icon/IconRecord.cpp:
2198 (WebCore::IconRecord::IconRecord):
2200 (WebCore::BarInfo::BarInfo):
2202 (WebCore::Console::Console):
2203 * page/DOMSelection.cpp:
2204 (WebCore::DOMSelection::DOMSelection):
2205 * page/DOMWindow.cpp:
2206 (WebCore::DOMWindow::DOMWindow):
2208 (WebCore::Frame::Frame):
2210 (WebCore::History::History):
2211 * page/InspectorController.cpp:
2212 (WebCore::InspectorResource::InspectorResource):
2213 (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
2215 (WebCore::Plugin::Plugin):
2217 (WebCore::Screen::Screen):
2218 * platform/ArrayImpl.cpp:
2219 (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate):
2220 * platform/DeprecatedValueListImpl.cpp:
2221 (WebCore::DeprecatedValueListImpl::Private::Private):
2222 * platform/ScrollBar.cpp:
2223 (WebCore::Scrollbar::Scrollbar):
2224 * platform/SharedBuffer.cpp:
2225 (WebCore::SharedBuffer::SharedBuffer):
2226 * platform/graphics/FontFallbackList.cpp:
2227 (WebCore::FontFallbackList::FontFallbackList):
2228 * platform/graphics/FontFamily.cpp:
2229 (WebCore::FontFamily::FontFamily):
2230 * platform/graphics/FontFamily.h:
2231 (WebCore::FontFamily::FontFamily):
2232 * platform/graphics/FontSelector.h:
2233 (WebCore::FontSelector::FontSelector):
2234 (WebCore::FontSelector::~FontSelector):
2235 * platform/graphics/GlyphPageTreeNode.h:
2236 (WebCore::GlyphPage::GlyphPage):
2237 * platform/graphics/mac/IconMac.mm:
2238 (WebCore::Icon::Icon):
2239 * platform/mac/FileChooserMac.mm:
2240 (WebCore::FileChooser::FileChooser):
2241 * platform/mac/PopupMenuMac.mm:
2242 (WebCore::PopupMenu::PopupMenu):
2243 * platform/mac/SharedBufferMac.mm:
2244 (WebCore::SharedBuffer::SharedBuffer):
2245 * platform/network/FormData.cpp:
2246 (WebCore::FormData::FormData):
2247 * platform/network/FormData.h:
2248 (WebCore::FormData::FormData):
2249 * platform/network/ResourceHandle.cpp:
2250 (WebCore::ResourceHandle::ResourceHandle):
2251 * platform/text/CString.h:
2252 (WebCore::CStringBuffer::CStringBuffer):
2253 * platform/text/RegularExpression.cpp:
2254 (WebCore::RegularExpression::Private::Private):
2255 * rendering/RenderStyle.cpp:
2256 (WebCore::StyleSurroundData::StyleSurroundData):
2257 (WebCore::StyleBoxData::StyleBoxData):
2258 (WebCore::StyleVisualData::StyleVisualData):
2259 (WebCore::StyleBackgroundData::StyleBackgroundData):
2260 (WebCore::StyleMarqueeData::StyleMarqueeData):
2261 (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2262 (WebCore::StyleMultiColData::StyleMultiColData):
2263 (WebCore::StyleTransformData::StyleTransformData):
2264 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2265 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2266 (WebCore::StyleInheritedData::StyleInheritedData):
2267 * rendering/RenderStyle.h:
2268 (WebCore::TransformOperation::TransformOperation):
2269 (WebCore::CursorList::CursorList):
2270 * rendering/SVGCharacterLayoutInfo.h:
2271 (WebCore::SVGCharOnPath::SVGCharOnPath):
2272 * rendering/SVGRenderStyle.cpp:
2273 (WebCore::SVGRenderStyle::SVGRenderStyle):
2274 * rendering/SVGRenderStyle.h:
2275 (WebCore::SVGRenderStyle::SVGRenderStyle):
2276 * rendering/SVGRenderStyleDefs.cpp:
2277 (StyleFillData::StyleFillData):
2278 (StyleStrokeData::StyleStrokeData):
2279 (StyleStopData::StyleStopData):
2280 (StyleTextData::StyleTextData):
2281 (StyleClipData::StyleClipData):
2282 (StyleMaskData::StyleMaskData):
2283 (StyleMarkerData::StyleMarkerData):
2284 (StyleMiscData::StyleMiscData):
2285 * storage/SQLResultSetRowList.h:
2286 (WebCore::SQLResultSetRowList::SQLResultSetRowList):
2288 (WebCore::SVGAngle::SVGAngle):
2289 * svg/SVGAnimatedTemplate.h:
2290 (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate):
2291 * svg/SVGElementInstanceList.cpp:
2292 (WebCore::SVGElementInstanceList::SVGElementInstanceList):
2294 (WebCore::SVGList::SVGList):
2295 (WebCore::SVGPODListItem::SVGPODListItem):
2297 (WebCore::SVGPathSeg::SVGPathSeg):
2298 * svg/SVGPreserveAspectRatio.cpp:
2299 (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
2300 * svg/SVGRenderingIntent.h:
2301 (WebCore::SVGRenderingIntent::SVGRenderingIntent):
2302 * svg/SVGUnitTypes.h:
2303 (WebCore::SVGUnitTypes::SVGUnitTypes):
2304 * svg/graphics/SVGPaintServerGradient.h:
2305 (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache):
2306 * svg/graphics/SVGResource.cpp:
2307 (WebCore::SVGResource::SVGResource):
2309 (WebCore::DOMParser::DOMParser):
2310 * xml/XMLHttpRequest.cpp:
2311 (WebCore::XMLHttpRequest::XMLHttpRequest):
2312 * xml/XMLSerializer.h:
2313 (WebCore::XMLSerializer::XMLSerializer):
2314 * xml/XPathEvaluator.h:
2315 (WebCore::XPathEvaluator::XPathEvaluator):
2316 * xml/XPathExpression.h:
2317 (WebCore::XPathExpression::XPathExpression):
2318 * xml/XPathNSResolver.h:
2319 (WebCore::XPathNSResolver::XPathNSResolver):
2320 * xml/XPathResult.cpp:
2321 (WebCore::XPathResult::XPathResult):
2323 (WebCore::XPath::ValueData::ValueData):
2324 * xml/XSLTProcessor.h:
2325 (WebCore::XSLTProcessor::XSLTProcessor):
2327 2008-02-09 Kevin Ollivier <kevino@theolliviers.com>
2329 Reviewed by Eric Seidel.
2331 Calling select() when all the file descriptors are NULL
2332 stops the file download on Windows. As a result, do not
2333 call select() when there are no valid descriptors.
2335 http://bugs.webkit.org/show_bug.cgi?id=17178
2337 * platform/network/curl/ResourceHandleManager.cpp:
2338 (WebCore::ResourceHandleManager::downloadTimerCallback):
2340 2008-02-09 Dan Bernstein <mitz@apple.com>
2342 Reviewed by Sam Weinig.
2344 - fix http://bugs.webkit.org/show_bug.cgi?id=17259
2345 Element::recalcStyle() needlessly null-checks the result of styleForElement()
2348 (WebCore::Element::recalcStyle): Removed unneeded null checks.
2349 styleForElement() can never return null.
2351 2008-02-09 David Hyatt <hyatt@apple.com>
2353 Fix for bug 17254, nth-* selectors do not work with negative coefficients.
2357 fast/css/negative-nth-child.html
2359 * css/CSSStyleSelector.cpp:
2360 (WebCore::parseNth):
2362 2008-02-09 David Hyatt <hyatt@apple.com>
2364 Fix for bug 17203, high CPU usage loading HTML5 spec. This patch significantly improves the performance
2367 (1) Split the notion of being affected by positional rules into "forward" and "backward." The "forward"
2368 selectors do not need to re-resolve during parsing, since children are appended on the end. Only the
2369 "backward" selectors like last-child or nth-last-child have to re-resolve when a close tag is encountered.
2371 (2) Extend childrenChanged to specify whether the children were changed by the parser or not. This allows
2372 Element::childrenChanged to know when the parser is adding children so that it can ignore those adds when
2375 (3) Make sure all Elements now know whether or not their children are currently parsing. Backwards selectors
2376 like last-child will always return false when children are still being parsed. When an Element finishes
2377 parsing its children, finishParsingChildren() gets called and will make sure the children re-resolve properly.
2379 (4) Added a beginParsingChildren method and renamed finishParsing to finishedParsingChildren.
2381 (5) Eliminated one-off hacks that did the same thing in HTMLObjectElement and HTMLAppletElement.
2383 (6) Patched many incorrect implementations of finishedParsingChildren that did not properly call into their
2384 base class (mostly new SVG elements that got added for SVG fonts around the time this became a requirement).
2388 * css/CSSStyleSelector.cpp:
2389 (WebCore::CSSStyleSelector::checkSelector):
2390 (WebCore::CSSStyleSelector::checkOneSelector):
2392 (WebCore::Attr::childrenChanged):
2394 * dom/ContainerNode.cpp:
2395 (WebCore::ContainerNode::addChild):
2397 (WebCore::Document::childrenChanged):
2400 (WebCore::Element::Element):
2401 (WebCore::Element::recalcStyle):
2402 (WebCore::checkFirstChildRules):
2403 (WebCore::checkLastChildRules):
2404 (WebCore::checkEmptyRules):
2405 (WebCore::checkStyleRules):
2406 (WebCore::Element::childrenChanged):
2407 (WebCore::Element::finishParsingChildren):
2409 (WebCore::Element::finishedParsingChildren):
2410 (WebCore::Element::beginParsingChildren):
2413 (WebCore::Node::finishParsingChildren):
2414 (WebCore::Node::beginParsingChildren):
2415 (WebCore::Node::childrenChanged):
2416 * dom/StyledElement.cpp:
2417 (WebCore::StyledElement::StyledElement):
2418 * dom/StyledElement.h:
2419 * dom/XMLTokenizer.cpp:
2420 (WebCore::XMLTokenizer::startElementNs):
2421 (WebCore::XMLTokenizer::endElementNs):
2423 * html/HTMLAppletElement.cpp:
2424 (WebCore::HTMLAppletElement::HTMLAppletElement):
2425 (WebCore::HTMLAppletElement::finishParsingChildren):
2426 * html/HTMLAppletElement.h:
2427 * html/HTMLElementFactory.cpp:
2428 (WebCore::objectConstructor):
2429 * html/HTMLGenericFormElement.cpp:
2430 (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
2431 * html/HTMLGenericFormElement.h:
2432 * html/HTMLObjectElement.cpp:
2433 (WebCore::HTMLObjectElement::HTMLObjectElement):
2434 (WebCore::HTMLObjectElement::finishParsingChildren):
2435 (WebCore::HTMLObjectElement::childrenChanged):
2436 * html/HTMLObjectElement.h:
2437 * html/HTMLOptGroupElement.cpp:
2438 (WebCore::HTMLOptGroupElement::childrenChanged):
2439 * html/HTMLOptGroupElement.h:
2440 * html/HTMLOptionElement.cpp:
2441 (WebCore::HTMLOptionElement::childrenChanged):
2442 * html/HTMLOptionElement.h:
2443 * html/HTMLParser.cpp:
2444 (WebCore::HTMLParser::insertNode):
2445 (WebCore::HTMLParser::pushBlock):
2446 (WebCore::HTMLParser::popOneBlockCommon):
2447 * html/HTMLScriptElement.cpp:
2448 (WebCore::HTMLScriptElement::childrenChanged):
2449 (WebCore::HTMLScriptElement::finishParsingChildren):
2450 * html/HTMLScriptElement.h:
2451 * html/HTMLSelectElement.cpp:
2452 (WebCore::HTMLSelectElement::childrenChanged):
2453 * html/HTMLSelectElement.h:
2454 * html/HTMLStyleElement.cpp:
2455 (WebCore::HTMLStyleElement::finishParsingChildren):
2456 (WebCore::HTMLStyleElement::childrenChanged):
2457 * html/HTMLStyleElement.h:
2458 * html/HTMLTextAreaElement.cpp:
2459 (WebCore::HTMLTextAreaElement::childrenChanged):
2460 * html/HTMLTextAreaElement.h:
2461 * html/HTMLTitleElement.cpp:
2462 (WebCore::HTMLTitleElement::childrenChanged):
2463 * html/HTMLTitleElement.h:
2464 * rendering/RenderApplet.cpp:
2465 (WebCore::RenderApplet::createWidgetIfNecessary):
2466 * rendering/RenderPartObject.cpp:
2467 (WebCore::RenderPartObject::updateWidget):
2468 * rendering/RenderStyle.cpp:
2469 (WebCore::RenderStyle::RenderStyle):
2470 * rendering/RenderStyle.h:
2471 (WebCore::RenderStyle::childrenAffectedByForwardPositionalRules):
2472 (WebCore::RenderStyle::setChildrenAffectedByForwardPositionalRules):
2473 (WebCore::RenderStyle::childrenAffectedByBackwardPositionalRules):
2474 (WebCore::RenderStyle::setChildrenAffectedByBackwardPositionalRules):
2475 * svg/SVGAnimationElement.cpp:
2476 (WebCore::SVGAnimationElement::finishParsingChildren):
2477 * svg/SVGAnimationElement.h:
2478 * svg/SVGClipPathElement.cpp:
2479 (WebCore::SVGClipPathElement::childrenChanged):
2480 * svg/SVGClipPathElement.h:
2481 * svg/SVGDefinitionSrcElement.cpp:
2482 (WebCore::SVGDefinitionSrcElement::childrenChanged):
2483 * svg/SVGDefinitionSrcElement.h:
2484 * svg/SVGElement.cpp:
2485 (WebCore::SVGElement::finishParsingChildren):
2487 * svg/SVGFontFaceElement.cpp:
2488 (WebCore::SVGFontFaceElement::childrenChanged):
2489 * svg/SVGFontFaceElement.h:
2490 * svg/SVGFontFaceFormatElement.cpp:
2491 (WebCore::SVGFontFaceFormatElement::childrenChanged):
2492 * svg/SVGFontFaceFormatElement.h:
2493 * svg/SVGFontFaceSrcElement.cpp:
2494 (WebCore::SVGFontFaceSrcElement::childrenChanged):
2495 * svg/SVGFontFaceSrcElement.h:
2496 * svg/SVGFontFaceUriElement.cpp:
2497 (WebCore::SVGFontFaceUriElement::childrenChanged):
2498 * svg/SVGFontFaceUriElement.h:
2499 * svg/SVGGElement.cpp:
2500 (WebCore::SVGGElement::childrenChanged):
2501 * svg/SVGGElement.h:
2502 * svg/SVGGradientElement.cpp:
2503 (WebCore::SVGGradientElement::childrenChanged):
2504 * svg/SVGGradientElement.h:
2505 * svg/SVGMarkerElement.cpp:
2506 (WebCore::SVGMarkerElement::childrenChanged):
2507 * svg/SVGMarkerElement.h:
2508 * svg/SVGMaskElement.cpp:
2509 (WebCore::SVGMaskElement::childrenChanged):
2510 * svg/SVGMaskElement.h:
2511 * svg/SVGPatternElement.cpp:
2512 (WebCore::SVGPatternElement::childrenChanged):
2513 * svg/SVGPatternElement.h:
2514 * svg/SVGStyleElement.cpp:
2515 (WebCore::SVGStyleElement::finishParsingChildren):
2516 (WebCore::SVGStyleElement::childrenChanged):
2517 * svg/SVGStyleElement.h:
2518 * svg/SVGStyledElement.cpp:
2519 (WebCore::SVGStyledElement::childrenChanged):
2520 * svg/SVGStyledElement.h:
2521 * svg/SVGTitleElement.cpp:
2522 (WebCore::SVGTitleElement::childrenChanged):
2523 * svg/SVGTitleElement.h:
2524 * svg/SVGUseElement.cpp:
2525 (WebCore::SVGUseElement::childrenChanged):
2526 * svg/SVGUseElement.h:
2528 2008-02-09 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
2530 Unreviewed build fix
2532 Somehow the removal of adjustSliderThumbSize(RenderObject*) sneaked
2535 * platform/qt/RenderThemeQt.h:
2537 2008-02-09 Holger Hans Peter Freyther <holger.freyther@trolltech.com>
2541 paintResizeControl is dead, remove the code. This painting
2542 is done by the RenderLayer.
2544 * platform/qt/RenderThemeQt.cpp:
2545 * platform/qt/RenderThemeQt.h:
2546 * rendering/RenderThemeMac.h:
2547 * rendering/RenderThemeMac.mm:
2549 2008-02-07 Kevin Ollivier <kevino@theolliviers.com>
2551 Reviewed by Eric Seidel, Adam Roben.
2554 http://bugs.webkit.org/show_bug.cgi?id=17211
2556 * platform/Threading.h:
2557 - On MSVC7, when the Interlocked* functions are used, the ref count gets out of sync.
2558 (MSVC8 seems not to have this problem.) Use the old implementation which works correctly.
2559 * platform/win/SharedTimerWin.cpp:
2560 - USER_TIMER_MINIMUM/MAXIMUM aren't defined in winuser.h for the MSVC 2003 Platform SDK
2561 so define them if they are not already defined.
2563 2008-02-08 Brent Fulgham <bfulgham@gmail.com>
2565 Reviewed by Adam Roben.
2567 Bug 17226: Fix Windows (Cairo) build of image-decoders
2568 http://bugs.webkit.org/show_bug.cgi?id=17226
2570 * platform/image-decoders/gif/GIFImageDecoder.cpp:
2571 * platform/image-decoders/png/PNGImageDecoder.cpp:
2573 2008-02-08 Timothy Hatcher <timothy@apple.com>
2575 Reviewed by Brady Eidson.
2577 <rdar://problem/5640896> Removing database then trying
2578 to recreate it causes trouble
2580 Added open Database support to DatabaseTracker. So any Database that
2581 is deleted will be marked as deleted and will fail to open any transaction
2582 or execute any new SQL queries.
2584 * storage/Database.cpp:
2585 (WebCore::Database::Database): Call DatabaseTracker::addOpenDatabase.
2586 (WebCore::Database::~Database): Call DatabaseTracker::removeOpenDatabase.
2587 (WebCore::Database::markAsDeleted): Set the m_deleted flag.
2588 (WebCore::Database::version): Return a null String if m_deleted is true.
2589 * storage/Database.h:
2590 (WebCore::Database::deleted): Return m_deleted.
2591 * storage/DatabaseTracker.cpp:
2592 (WebCore::DatabaseTracker::addOpenDatabase): Add the Database to a map of origins and names.
2593 (WebCore::DatabaseTracker::removeOpenDatabase): Remove the Database from the map.
2594 (WebCore::DatabaseTracker::deleteDatabaseFile): Call markAsDeleted on all the open Databases
2595 matching the origin/name.
2596 * storage/DatabaseTracker.h:
2597 * storage/SQLStatement.cpp:
2598 (WebCore::SQLStatement::setDatabaseDeletedError): Set the error about the user deleting the database.
2599 * storage/SQLStatement.h:
2600 * storage/SQLTransaction.cpp:
2601 (WebCore::SQLTransaction::executeSQL): If the Database is deleted, call setDatabaseDeletedError.
2602 (WebCore::SQLTransaction::openTransactionAndPreflight): Set the error about the user deleting the database
2603 if the Database was marked as deleted.
2605 2008-02-08 Darin Adler <darin@apple.com>
2609 - fix http://bugs.webkit.org/show_bug.cgi?id=15003
2610 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug)
2612 Test: fast/js/constructor-attributes.html
2614 * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor".
2616 2008-02-08 Anders Carlsson <andersca@apple.com>
2620 <rdar://problem/5650446>
2621 http://bugs.webkit.org/show_bug.cgi?id=16102
2622 Crash in FrameLoader::stopLoadingSubframes() on IMDB page
2624 Store the child frame in a RefPtr to prevent it from being deleted when the
2625 frame tree changes while calling stopAllLoaders().
2627 * loader/FrameLoader.cpp:
2628 (WebCore::FrameLoader::stopLoadingSubframes):
2630 2008-02-08 Kevin Ollivier <kevino@theolliviers.com>
2632 wx port build fix. Add time.h to define time_t.
2634 * platform/FileSystem.h:
2636 2008-02-08 Alp Toker <alp@atoker.com>
2638 Reviewed by Adam Roben.
2640 Avoid null-dereference crasher noticed in the GTK+ port and also
2641 affecting the Win debug build.
2643 Covered by existing tests.
2646 (WebCore::Document::userStyleSheet):
2648 2008-02-08 Anders Carlsson <andersca@apple.com>
2652 <rdar://problem/5724188>
2653 REGRESSION: PLT 0.7% slower due to 29926 (change Text::createWithLengthLimit to take a UChar pointer)
2655 Revert r29926 which caused the regression.
2658 (WebCore::Text::createWithLengthLimit):
2660 * html/HTMLParser.cpp:
2661 (WebCore::HTMLParser::parseToken):
2662 * loader/TextDocument.cpp:
2663 (WebCore::TextTokenizer::write):
2665 2008-02-08 Sam Weinig <sam@webkit.org>
2669 Fix for <rdar://problem/5732491>
2670 http://bugs.webkit.org/show_bug.cgi?id=17213
2671 The querySelectorAll method on an element node does not search only the element's descendants
2673 Test: fast/dom/SelectorAPI/elementRoot.html
2676 (WebCore::Node::querySelector): Make sure to stay within the root node when traversing the tree.
2677 * dom/SelectorNodeList.cpp:
2678 (WebCore::SelectorNodeList::SelectorNodeList): ditto.
2682 2008-02-08 David Hyatt <hyatt@apple.com>
2684 Fix for bug 16798, button should default to type=submit.
2688 * html/HTMLButtonElement.cpp:
2689 (WebCore::HTMLButtonElement::type):
2690 (WebCore::HTMLButtonElement::parseMappedAttribute):
2692 2008-02-08 Rodney Dawes <dobey@wayofthemonkey.com>
2694 Reviewed by Jon Honeycutt.
2696 Redefine some platform-specific types as cross-platform types
2697 Add pathGetFileName method to get the filename from a path string
2698 Add unloadModule method to unload a loadable module from the process
2699 Implement new methods for GTK+ and Windows
2700 Implement missing homeDirectoryPath method for GTK+
2701 Add stub methods for new and missing methods for Wx and Qt
2703 * platform/FileSystem.h:
2704 * platform/gtk/FileSystemGtk.cpp:
2705 * platform/qt/FileSystemQt.cpp:
2706 * platform/win/FileSystemWin.cpp:
2707 * platform/wx/FileSystemWx.cpp:
2709 2008-02-08 Adam Roben <aroben@apple.com>
2711 Windows build fix after r30088
2713 * bindings/scripts/CodeGeneratorCOM.pm: Touch this to force the COM
2714 bindings to rebuild.
2716 2008-02-08 Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
2718 Reviewed by Alp Toker.
2720 http://bugs.webkit.org/show_bug.cgi?id=17009
2721 [Gtk] Webkit strips accents from some dead-key combinations
2723 KeyEvents have to go through the gtk input method.
2725 Also implement the isKeypad check and make disambiguateKeyDownEvent
2726 behave more like other ports.
2728 * platform/PlatformKeyboardEvent.h:
2729 * platform/gtk/KeyEventGtk.cpp:
2730 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2731 (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2732 (WebCore::PlatformKeyboardEvent::gdkEventKey):
2734 2008-02-08 Darin Adler <darin@apple.com>
2738 - fix http://bugs.webkit.org/show_bug.cgi?id=3492
2739 TreeWalker implementation needs to be fixed (affects Acid3)
2740 - fix http://bugs.webkit.org/show_bug.cgi?id=4714
2741 NodeIterator does not handle exceptions from the filter function (affects Acid3)
2742 - fix http://bugs.webkit.org/show_bug.cgi?id=4716
2743 NodeIterator will crash if the filter function removes the current node from the document
2745 Test: traversal/exception-forwarding.html
2747 This turned into a near-rewrite of NodeIterator and TreeWalker.
2749 * bindings/js/JSNodeFilterCondition.h:
2750 * bindings/js/JSNodeFilterCondition.cpp:
2751 (WebCore::takeException): Added.
2752 (WebCore::JSNodeFilterCondition::acceptNode): Added an out parameter to return
2753 a JavaScript exception.
2755 * bindings/js/JSNodeFilterCustom.cpp:
2756 (WebCore::JSNodeFilter::acceptNode): Wrote a custom binding for this that raises
2757 a JavaScript exception if the out parameter is set.
2759 * bindings/js/JSNodeIteratorCustom.cpp:
2760 (WebCore::JSNodeIterator::nextNode): Wrote a custom binding for this that raises
2761 a JavaScript exception if the out parameter is set.
2762 (WebCore::JSNodeIterator::previousNode): Ditto.
2764 * bindings/js/JSTreeWalkerCustom.cpp:
2765 (WebCore::JSTreeWalker::parentNode): Wrote a custom binding for this that raises
2766 a JavaScript exception if the out parameter is set.
2767 (WebCore::JSTreeWalker::firstChild): Ditto.
2768 (WebCore::JSTreeWalker::lastChild): Ditto.
2769 (WebCore::JSTreeWalker::nextSibling): Ditto.
2770 (WebCore::JSTreeWalker::previousSibling): Ditto.
2771 (WebCore::JSTreeWalker::previousNode): Ditto.
2772 (WebCore::JSTreeWalker::nextNode): Ditto.
2774 * bindings/objc/DOM.mm:
2775 (WebCore::ObjCNodeFilterCondition::acceptNode): Updated to include new exception
2777 (-[DOMDocument createNodeIterator:whatToShow:filter:expandEntityReferences:]):
2778 Use RefPtr to make object lifetimes clearer.
2779 (-[DOMDocument createTreeWalker:whatToShow:filter:expandEntityReferences:]):
2782 * bindings/scripts/CodeGeneratorJS.pm: Added include of NodeFilter.h for
2787 (WebCore::Document::createNodeIterator): Changed to use PassRefPtr.
2788 (WebCore::Document::createTreeWalker): Ditto.
2791 * dom/NodeFilter.cpp:
2792 (WebCore::NodeFilter::NodeFilter): Changed to use PassRefPtr.
2793 (WebCore::NodeFilter::acceptNode): Added an out parameter to return
2794 a JavaScript exception.
2795 * dom/NodeFilter.idl: Custom binding for acceptNode.
2797 * dom/NodeFilterCondition.h:
2798 * dom/NodeFilterCondition.cpp:
2799 (WebCore::NodeFilterCondition::acceptNode): Added an out parameter to return
2800 a JavaScript exception.
2802 * dom/NodeIterator.cpp:
2803 (WebCore::NodeIterator::NodeIterator): Changed to use PassRefPtr more.
2804 Eliminated m_doc, using the root node instead, and unnecessary check for
2805 null -- rootNode must be non-null and all nodes have a non-null document.
2806 (WebCore::NodeIterator::~NodeIterator): Changed to get document from root.
2807 (WebCore::NodeIterator::nextNode): Rewrote to use a RefPtr since the
2808 acceptNode function could do anything, including removing the last
2809 reference to the current node. Also folded findNextNode into this function
2810 since it's the only one that needs to call it.
2811 (WebCore::NodeIterator::previousNode): Same thing, but the other direction.
2812 (WebCore::NodeIterator::detach): Changed to use the root node as the indication
2813 that we're detached rather than a separate boolean.
2814 (WebCore::NodeIterator::notifyBeforeNodeRemoval): Removed some unnneeded
2815 checks. Removed incorrect use of findNextNode/findPreviousNode -- those
2816 functions call acceptNode and the DOM standard is quite clear that these
2817 functions do not take that into account, allowing the current node to become
2818 one that's not accepted.
2820 * dom/NodeIterator.h: Changed constructor to use PassRefPtr more. Changed
2821 nextNode and previousNode to have an out parameter with a JavaScript exception.
2822 Removed helper functions setReferenceNode, setPointerBeforeReferenceNode,
2823 detached, setDetached, document, findNextNode, and findPreviousNode. All were
2824 unnecessary. Removed data member m_doc which was just rootNode()->document().
2826 * dom/NodeIterator.idl: Custom binding for nextNode and previousNode.
2828 * dom/Traversal.cpp:
2829 (WebCore::Traversal::Traversal): Use PassRefPtr more.
2830 (WebCore::Traversal::acceptNode): Added out parameter for JavaScript exception.
2831 Also rearranged the function a little bit for clarity.
2833 * dom/Traversal.h: Changed acceptNode to have an out parameter with a JavaScript
2834 exception and made it protected, since it's only for use by the derived classes.
2836 * dom/TreeWalker.cpp:
2837 (WebCore::TreeWalker::TreeWalker): Updated to use PassRefPtr.
2838 (WebCore::TreeWalker::setCurrentNode): Updated to use PassRefPtr and deleted
2839 the overloaded version since it's not needed.
2840 (WebCore::TreeWalker::parentNode): Rewrote to propagate the exception and also
2841 to implement rules about when to check things like whether we're in the tree.
2842 The previous fix where we called isDescendantOf was not entirely correct, because
2843 the specification allows you to walk outside the tree if you get there somehow.
2844 What it doesn't allow is walking outside the tree from inside. The new
2845 implementation handles this correctly.
2846 (WebCore::TreeWalker::firstChild): Ditto.
2847 (WebCore::TreeWalker::lastChild): Ditto.
2848 (WebCore::TreeWalker::previousSibling): Ditto.
2849 (WebCore::TreeWalker::nextSibling): Ditto.
2850 (WebCore::TreeWalker::previousNode): Ditto. Because of the need to check the
2851 acceptNode function on parents, this can't use traversePreviousNode (more's the
2852 pity, because it's a bit complicated).
2853 (WebCore::TreeWalker::nextNode): Ditto.
2855 * dom/TreeWalker.h: Changed constructor and setCurrentNode to use PassRefPtr
2856 more. Changed the navigation functions to have an out parameter with a JavaScript
2857 exception. Removed helper functions setCurrentNode and ancestorRejected.
2859 * dom/TreeWalker.idl: Custom binding for navigation functions.
2861 2008-02-08 Eric Seidel <eric@webkit.org>
2865 Add support for Text.wholeText and Text.replaceWholeText
2866 http://bugs.webkit.org/show_bug.cgi?id=17125
2868 Test EntityReferences to make sure they're always treated as read-only
2869 In doing so I discovered a bug in document.adoptNode(readonlyNode) (and fixed it)
2872 (WebCore::Document::adoptNode): throw NO_MODIFICATION_ALLOWED_ERR when passed a readonly node
2875 (WebCore::Node::textContent):
2877 (WebCore::earliestLogicallyAdjacentTextNode):
2878 (WebCore::latestLogicallyAdjacentTextNode):
2879 (WebCore::Text::wholeText):
2880 (WebCore::Text::replaceWholeText):
2884 2008-02-06 Kimmo Kinnunen <kimmok@iki.fi>
2886 Reviewed by Tim Hatcher.
2888 Fixes: http://bugs.webkit.org/show_bug.cgi?id=17191
2889 HTML5: Client-side database queries should return values of type number
2890 Test: storage/sql-data-types.html
2892 Make the DB queries return a value as a number if it was inserted
2893 as a number to the database.
2894 * platform/sql/SQLiteStatement.cpp:
2895 (WebCore::SQLiteStatement::getColumnValue): new member function to return SQLValues
2896 * platform/sql/SQLiteStatement.h:
2897 * storage/SQLStatement.cpp:
2898 (WebCore::SQLStatement::execute): use getColumnValue instead of getColumnText
2900 2008-02-07 Ada Chan <adachan@apple.com>
2902 <rdar://problem/5292433> certificate authentication support broken in Safari 3.0
2903 Added mechanism to communicate client certificate info back to CFNetwork.
2907 * platform/network/ResourceHandle.h:
2908 * platform/network/cf/ResourceHandleCFNet.cpp:
2909 (WebCore::clientCerts): Keep a mapping of hosts to client certificates.
2910 (WebCore::makeFinalRequest): If we have a client certificate for the host, pass it
2911 to CFNetwork by setting it in the SSL properties.
2912 (WebCore::ResourceHandle::setClientCertificate): Map client certificate to the host.
2914 2008-02-07 Adam Roben <aroben@apple.com>
2918 * platform/SharedBuffer.cpp: Removed a stub implementation of
2919 createWithContentsOfFile, now that each platform has its own stub.
2921 2008-02-07 Adam Roben <aroben@apple.com>
2923 Fix Bug 17138: REGRESSION: Node highlight not updated properly
2925 <http://bugs.webkit.org/show_bug.cgi?id=17138>
2926 <rdar://problem/5719869>
2932 * page/InspectorController.cpp:
2933 (WebCore::InspectorController::drawNodeHighlight): Update the
2934 overlayRect after scrolling to make sure that we translate the context
2935 by the correct amount.
2937 2008-02-07 Adam Roben <aroben@apple.com>
2939 Qt and GTK+ build fixes
2941 * platform/gtk/FileSystemGtk.cpp: Added a missing #include.
2942 * platform/qt/FileSystemQt.cpp: Ditto.
2944 2008-02-07 Adam Roben <aroben@apple.com>
2946 Some cleanup of Mac-only user stylesheet code
2948 I moved UserStyleSheetLoader out of Frame.cpp into its own files, and
2949 moved some Mac-only Frame methods to FrameMac.mm.
2953 * WebCore.xcodeproj/project.pbxproj: Added new files to project.
2954 * loader/mac/UserStyleSheetLoader.cpp: Added.
2955 (UserStyleSheetLoader::UserStyleSheetLoader):
2956 (UserStyleSheetLoader::~UserStyleSheetLoader):
2957 * loader/mac/UserStyleSheetLoader.h: Added.
2958 * page/Frame.cpp: Removed setUserStyleSheet[Location]
2959 * page/mac/FrameMac.mm:
2960 (WebCore::Frame::setUserStyleSheetLocation): Moved here from
2962 (WebCore::Frame::setUserStyleSheet): Ditto.
2964 2008-02-07 Adam Roben <aroben@apple.com>
2966 Fix <rdar://5555260> GMail never loads when a user stylesheet is
2969 The fix in r29841 did not guarantee that the user stylesheet would not
2970 still be loading by the time GMail called document.write, and so was
2973 This change reworks the user stylesheet loading mechanism on non-Mac
2974 platforms to load the stylesheet synchronously from disk, and then
2975 keeps it in memory. This obsoletes the issue of what our behavior
2976 should be before the user stylesheet has loaded and what should happen
2977 when it finishes loading, as the user stylesheet will always be
2978 available when the Document first asks for it. Note, however, that
2979 this removes the ability to specify a non-file: URL for the user
2980 stylesheet. This change was not made for the Mac platform because it's
2981 possible that WebKit clients are relying on non-file: URLs for user
2982 stylesheets. It would also be nice to move back to an asynchronous
2983 loading model someday, but that is not currently possible since we
2984 don't have an asynchronous loading mechanism that is not tied to a
2987 The responsibility of loading and storing the user stylesheet has
2988 moved from Frame to Page, since the user stylesheet URL is set on the
2989 Page-level Settings object.
2994 (WebCore::Document::Document): Changed to call userStyleSheet().
2995 (WebCore::Document::setUserStyleSheet): Made Mac-only.
2996 (WebCore::Document::userStyleSheet): Changed to call up to Page on
2998 (WebCore::Document::recalcStyleSelector): Changed to call
3001 - Made setUserStyleSheet and the m_usersheet member Mac-only
3002 - Changed userStyleSheet to return a String instance instead of a
3003 String reference, since we now might return a new null String.
3004 * loader/FrameLoader.cpp:
3005 (WebCore::FrameLoader::begin): Made the call to
3006 Frame::setUserStyleSheetLocation Mac-only.
3007 * page/Frame.cpp: Made UserStyleSheetLoader and related code Mac-only.
3008 (WebCore::Frame::~Frame): Ditto.
3009 (WebCore::Frame::reapplyStyles): Made the call to
3010 setUserStyleSheet[Location] Mac-only. On non-Mac platforms the
3011 Document will pick up the new stylesheet in Document::reapplyStyles.
3012 (WebCore::FramePrivate::FramePrivate): Made m_userStyleSheetLoader
3014 * page/Frame.h: Made setUserStyleSheet[Location] Mac-only.
3015 * page/FramePrivate.h: Made m_userStyleSheetLoader Mac-only.
3017 (WebCore::Page::Page): Initialize new members.
3018 (WebCore::Page::userStyleSheetLocationChanged): Added. Does nothing on
3019 Mac. On non-Mac, resets all members relating to the user stylesheet so
3020 we'll know to load it again the next time it's asked for.
3021 (WebCore::Page::userStyleSheet): Added. Loads the user stylesheet if
3022 the user stylesheet location has changed since the last time we loaded
3023 it, or if the file has been modified since we last loaded it, then
3024 returns the contents of the user stylesheet as a String.
3025 * page/Page.h: Added new methods/members.
3026 * page/Settings.cpp:
3027 (WebCore::Settings::setUserStyleSheetLocation): Changed to call
3028 Page::userStyleSheetLocationChanged.
3029 * page/Settings.h: Changed userStyleSheetLocation to return the KURL
3030 by reference instead of making a copy.
3031 * platform/FileSystem.h: Added declaration for getFileModificationTime.
3032 * platform/KURL.h: Added declaration for fileSystemPath method.
3033 * platform/cf/KURLCFNet.cpp:
3034 (WebCore::KURL::fileSystemPath): Added.
3035 * platform/posix/FileSystemPOSIX.cpp:
3036 (WebCore::getFileModificationTime): Added.
3037 * platform/qt/KURLQt.cpp:
3038 (WebCore::KURL::fileSystemPath): Stubbed out.
3039 * platform/win/FileSystemWin.cpp:
3040 (WebCore::getFileModificationTime): Added.
3041 * platform/qt/FileSystemQt.cpp: Stubbed out getFileModificationTime.
3042 * platform/gtk/FileSystemGtk.cpp: Ditto.
3043 * platform/wx/FileSystemWx.cpp: Ditto.
3044 * platform/qt/TemporaryLinkStubs.cpp: Stubbed out
3045 SharedBuffer::createWithContentsOfFile.
3046 * platform/gtk/TemporaryLinkStubs.cpp: Ditto, along with
3047 KURL::fileSystemPath.
3048 * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3050 2008-02-07 Adam Roben <aroben@apple.com>
3052 Clean up FileSystemWin.cpp
3054 This cleanup also makes us call _wstat64 instead of _wstat32i64. The
3055 only difference between these two functions is that _wstat64 gives
3056 64-bit time values, while _wstat32i64 only gives 32-bit time values.
3062 * platform/win/FileSystemWin.cpp:
3063 (WebCore::statFile): New static helper that wraps _wstat64.
3064 (WebCore::getFileSize): Changed to call statFile.
3065 (WebCore::fileExists): Ditto.
3067 2008-02-07 Adam Roben <aroben@apple.com>
3069 Rename fileSize to getFileSize
3071 Rubberstamped by Darin.
3073 * platform/FileSystem.h:
3074 * platform/gtk/FileSystemGtk.cpp:
3075 * platform/network/cf/FormDataStreamCFNet.cpp:
3076 (WebCore::setHTTPBody):
3077 * platform/network/curl/ResourceHandleManager.cpp:
3078 (WebCore::ResourceHandleManager::setupPOST):
3079 * platform/posix/FileSystemPOSIX.cpp:
3080 * platform/qt/FileSystemQt.cpp:
3081 * platform/win/FileSystemWin.cpp:
3082 * platform/wx/FileSystemWx.cpp:
3083 * storage/Database.cpp:
3084 (WebCore::Database::databaseSize):
3085 * storage/DatabaseTracker.cpp:
3086 (WebCore::DatabaseTracker::usageForDatabase):
3087 * storage/OriginUsageRecord.cpp:
3088 (WebCore::OriginUsageRecord::diskUsage):
3090 2008-02-06 Adam Roben <aroben@apple.com>
3092 Make KURL::isLocalFile treat the URL's protocol case-insensitively
3096 * platform/KURL.cpp:
3097 (WebCore::KURL::isLocalFile): Use equalIgnoringCase instead of ==.
3099 2008-02-07 David Hyatt <hyatt@apple.com>
3101 Fix for bug 6248, implement the nth-* CSS3 selectors. Patch based on original KHTML work from Allan Jensen
3102 and improved upon by Nick Shanks.
3107 * css/CSSParser.cpp:
3108 (WebCore::CSSParser::lex):
3109 * css/CSSSelector.cpp:
3110 (WebCore::CSSSelector::extractPseudoType):
3111 * css/CSSSelector.h:
3112 (WebCore::CSSSelector::):
3113 * css/CSSStyleSelector.cpp:
3114 (WebCore::parseNth):
3115 (WebCore::matchNth):
3116 (WebCore::CSSStyleSelector::checkOneSelector):
3117 * css/tokenizer.flex:
3118 * rendering/RenderStyle.cpp:
3119 (WebCore::RenderStyle::RenderStyle):
3120 * rendering/RenderStyle.h:
3121 (WebCore::RenderStyle::childIndex):
3122 (WebCore::RenderStyle::setChildIndex):
3124 2008-02-07 Dan Bernstein <mitz@apple.com>
3126 Reviewed by Dave Hyatt.
3128 - fix <rdar://problem/5729411> REGRESSION (r29834): Float contained in relative-positioned block is painted twice
3130 Test: fast/block/float/relative-painted-twice.html
3132 * rendering/RenderBlock.cpp:
3133 (WebCore::RenderBlock::addOverhangingFloats): Added another case where
3134 the child should not take over painting the float: when they do not have
3135 the same enclosing layer. In that case, the float is already being
3136 painted by one of its closer ancestors.
3138 2008-02-07 Dan Bernstein <mitz@apple.com>
3140 Reviewed by Darin Adler.
3142 - fix http://bugs.webkit.org/show_bug.cgi?id=17194
3143 Changing text to bold changes font family
3145 Test: platform/mac/fast/text/family-for-font-matched-by-name.html
3147 * platform/mac/WebFontCache.mm:
3148 (+[WebFontCache internalFontWithFamily:traits:size:]): Changed to use
3149 the family of the font whose name matches the desired family if there
3150 is no exact family match.
3152 2008-02-07 Beth Dakin <bdakin@apple.com>
3156 Fix for <rdar://problem/5697882> Traffic or Street View button on
3157 Google Maps is sometimes not positioned correctly (17000)
3159 On the Mac, timers fire in the order that they are registered.
3160 Geoff and I discovered that this is not necessarily true on
3161 Windows, and that turned out to be the cause of this intermittent
3162 layout problem at Google Maps. This patch adds a new member
3163 variable to Timer to remember the timer's insertion point into the
3164 heap. Now when comparing timers, if two timers were registered at
3165 the same time, their insertion orders are compared to determine
3166 which should fire first. This code actually never runs on Debug
3167 builds on the Mac; the system clock on the Mac is accurate enough
3168 that it knows that the two timers were not registered at *exactly*
3169 the same time. This is not the case on Windows. In theory, if we
3170 sped up Javascript enough on the Mac, this code would run and would
3171 prevent misrenderings such as the one found on Google Maps.
3173 * platform/Timer.cpp:
3174 (WebCore::operator<):
3175 (WebCore::TimerBase::setNextFireTime):
3178 2008-02-06 Justin Garcia <justin.garcia@apple.com>
3180 Reviewed by Darin Adler.
3182 <rdar://problem/5195056> Huge plain text pastes are slow
3184 This was fixed in r27369 and then r29367 and r29667 caused performance to
3187 * editing/EditCommand.cpp:
3188 (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
3189 (WebCore::EditCommand::unapply): Ditto.
3190 (WebCore::EditCommand::reapply): Ditto.
3191 * editing/Editor.cpp:
3192 (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls
3193 that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
3194 (WebCore::Editor::unappliedEditing): Ditto.
3195 (WebCore::Editor::reappliedEditing): Ditto.
3196 * editing/SelectionController.cpp:
3197 (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
3198 base and extent with the expensive isCandidate operation if the node that will
3199 be removed is in a fragment, since such a removal is guaranteed to have no effect
3200 on a selection. This is to speed up the paste operation, which does many removes from
3203 2008-02-06 Kevin Ollivier <kevino@theolliviers.com>
3205 Reviewed by Darin Adler.
3207 Rather than directly handing scroll wheel events, use
3208 PlatformWheelEvent to send them to WebCore first, so that
3209 mouse wheel scrolling info can be retrieved via JavaScript.
3211 http://bugs.webkit.org/show_bug.cgi?id=17179
3213 * platform/ScrollView.h:
3214 * platform/wx/MouseWheelEventWx.cpp:
3215 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3216 * platform/wx/ScrollViewWx.cpp:
3217 (WebCore::ScrollView::ScrollViewPrivate::bindEvents):
3218 (WebCore::ScrollView::wheelEvent):
3219 (WebCore::ScrollView::maximumScroll):
3221 2008-02-06 Mark Rowe <mrowe@apple.com>
3225 * WebCore.vcproj/WebCore.vcproj: Unbreak the XML of the project file.
3227 2008-02-06 Mark Rowe <mrowe@apple.com>
3229 Mac build fix. Track rename that happened in r30056.
3231 * platform/graphics/mac/GraphicsContextMac.mm:
3233 2008-02-06 Brent Fulgham <bfulgham@gmail.com>
3235 Reviewed by Adam Roben.
3237 http://bugs.webkit.org/show_bug.cgi?id=16979
3238 Conditionalize CoreGraphics vs Cairo support in Windows port.
3240 * WebCore.vcproj/WebCore.vcproj:
3241 * bridge/win/FrameCGWin.cpp: Copied from WebCore/bridge/win/FrameWin.cpp.
3242 (WebCore::imageFromSelection):
3243 * bridge/win/FrameCairoWin.cpp: Added.
3244 (WebCore::imageFromSelection):
3245 * bridge/win/FrameWin.cpp:
3246 (WebCore::computePageRectsForFrame):
3247 * platform/graphics/SimpleFontData.h:
3248 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3249 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Copied from WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp.
3250 (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3251 (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
3252 (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
3253 (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
3254 * platform/graphics/cg/GraphicsContextCG.cpp:
3255 (WebCore::GraphicsContext::savePlatformState):
3256 (WebCore::GraphicsContext::restorePlatformState):
3257 * platform/graphics/cg/GraphicsContextPlatformPrivate.h: Removed.
3258 * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: Copied from WebCore/platform/graphics/cg/GraphicsContextPlatformPrivate.h.
3259 * platform/graphics/win/FontCGWin.cpp: Copied from WebCore/platform/graphics/win/FontWin.cpp.
3260 (WebCore::Font::drawGlyphs):
3261 * platform/graphics/win/FontCairoWin.cpp: Added.
3262 (WebCore::Font::drawGlyphs):
3263 * platform/graphics/win/FontWin.cpp:
3264 * platform/graphics/win/GraphicsContextCGWin.cpp: Copied from WebCore/platform/graphics/win/GraphicsContextWin.cpp.
3265 (WebCore::CGContextWithHDC):
3266 (WebCore::GraphicsContext::inTransparencyLayer):
3267 (WebCore::GraphicsContext::getWindowsContext):
3268 (WebCore::GraphicsContext::releaseWindowsContext):
3269 (WebCore::GraphicsContextPlatformPrivate::scale):
3270 (WebCore::GraphicsContextPlatformPrivate::rotate):
3271 (WebCore::GraphicsContextPlatformPrivate::translate):
3272 (WebCore::GraphicsContextPlatformPrivate::concatCTM):
3273 (WebCore::setCGStrokeColor):
3274 (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
3275 * platform/graphics/win/GraphicsContextCairoWin.cpp: Added.
3276 (WebCore::GraphicsContext::GraphicsContext):
3277 (WebCore::GraphicsContext::getWindowsContext):
3278 (WebCore::GraphicsContext::inTransparencyLayer):
3279 (WebCore::GraphicsContext::releaseWindowsContext):
3280 (WebCore::GraphicsContext::concatCTM):
3281 * platform/graphics/win/GraphicsContextWin.cpp:
3282 * platform/graphics/win/ImageCGWin.cpp: Copied from WebCore/platform/graphics/win/ImageWin.cpp.
3283 (WebCore::BitmapImage::getHBITMAPOfSize):
3284 (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3285 * platform/graphics/win/ImageCairoWin.cpp: Added.
3286 (WebCore::BitmapImage::getHBITMAPOfSize):
3287 (WebCore::BitmapImage::drawFrameMatchingSourceSize):
3288 * platform/graphics/win/ImageWin.cpp:
3289 * platform/graphics/win/SimpleFontDataCGWin.cpp: Copied from WebCore/platform/graphics/win/SimpleFontDataWin.cpp.
3290 (WebCore::scaleEmToUnits):
3291 (WebCore::SimpleFontData::platformInit):
3292 (WebCore::SimpleFontData::platformWidthForGlyph):
3293 * platform/graphics/win/SimpleFontDataCairoWin.cpp: Added.
3294 (WebCore::SimpleFontData::platformInit):
3295 (WebCore::SimpleFontData::platformDestroy):
3296 (WebCore::SimpleFontData::platformWidthForGlyph):
3297 * platform/graphics/win/SimpleFontDataWin.cpp:
3298 (WebCore::SimpleFontData::setShouldApplyMacAscentHack):
3299 (WebCore::SimpleFontData::shouldApplyMacAscentHack):
3300 * platform/win/DragImageCGWin.cpp: Copied from WebCore/platform/win/DragImageWin.cpp.
3301 (WebCore::scaleDragImage):
3302 (WebCore::createDragImageFromImage):
3303 * platform/win/DragImageCairoWin.cpp: Added.
3304 (WebCore::scaleDragImage):
3305 (WebCore::createDragImageFromImage):
3306 * platform/win/DragImageWin.cpp:
3308 2008-02-06 Anders Carlsson <andersca@apple.com>
3312 Change httpBodyFromStream to take the request instead of the stream.
3314 * platform/network/cf/FormDataStreamCFNet.cpp:
3315 (WebCore::httpBodyFromRequest):
3316 * platform/network/cf/FormDataStreamCFNet.h:
3317 * platform/network/cf/ResourceRequestCFNet.cpp:
3318 (WebCore::ResourceRequest::doUpdateResourceRequest):
3320 2008-02-06 Kevin McCullough <kmccullough@apple.com>
3324 - Added manual tests for <rdar://problem/5556374> REGRESSION: cross-domain error when
3325 one URL uses an explicit port number and another doesn't
3327 * manual-tests/Default-port-frame.html: Added.
3328 * manual-tests/resources/Default-port-frame-contents.html: Added.
3330 2008-02-06 Oliver Hunt <oliver@apple.com>
3332 Reviewed by NOBODY (Build fix).
3336 * WebCore.vcproj/build-generated-files.sh:
3338 2008-02-06 Kevin McCullough <kmccullough@apple.com>
3340 Rubberstamped by Darin.
3342 <rdar://problem/5727708> REGRESSION (r29952): Can't send message from Yahoo Mail beta
3343 - Reverted the change that caused the regression.
3346 (WebCore::Document::createElement):
3347 (WebCore::Document::createElementNS):
3348 (WebCore::Document::getElementById):
3349 (WebCore::Document::parseQualifiedName):
3350 (WebCore::Document::createAttributeNS):
3353 2008-02-06 Geoffrey Garen <ggaren@apple.com>
3355 Reviewed by Oliver Hunt.
3357 Fixed <rdar://problem/5728081> REGRESSION: Many leaks on buildbot
3359 The problem was refCount underflow in NamedAttrMap.
3361 Neither our regression tests nor the stress test have yet discovered
3362 another instance of this problem.
3364 * dom/NamedAttrMap.cpp:
3365 (WebCore::NamedAttrMap::addAttribute): Changed to use PassRefPtr,
3366 for fast and correct refCount management. Also, change a rediculously
3367 slow malloc to a slightly less rediculously slow realloc.
3369 * dom/NamedAttrMap.h:
3370 (WebCore::NamedAttrMap::insertAttribute): Changed to use PassRefPtr,
3371 for fast and correct refCount management.
3373 * html/HTMLTokenizer.cpp:
3374 (WebCore::Token::addAttribute): Use a RefPtr, to guarantee that the
3375 object starts with a refCount of 1.
3377 2008-02-06 Darin Adler <darin@apple.com>
3379 Reviewed by Tim Hatcher.
3381 - fix <rdar://problem/5723293> NULL-deref crash in PropertyMap::put opening web inspector
3382 with View Source window as target
3384 * page/InspectorController.cpp:
3385 (WebCore::canPassNodeToJavaScript): Added. Returns false if the node is in a document with
3386 JavaScript disabled.
3387 (WebCore::InspectorController::inspect): Check canPassNodeToJavaScript and do nothing if
3390 2008-02-06 David Hyatt <hyatt@apple.com>
3392 Fix for bug 16799, object elements should return absolute URLs from .data.
3394 Reviewed by Mark Rowe
3397 (WebCore::Document::completeURL):
3398 * html/HTMLAnchorElement.cpp:
3399 (WebCore::HTMLAnchorElement::href):
3400 * html/HTMLObjectElement.cpp:
3401 (WebCore::HTMLObjectElement::data):
3403 2008-02-05 Antti Koivisto <antti@apple.com>
3407 <rdar://problem/5726340>
3408 <video autoplay controls> left in unplayable state if navigated away, then back to, before video finished loading
3410 When moving document in and out from the page cache:
3411 - Cancel incomplete load by deleting the media player. This guarantees everything is in consistent state.
3412 - Restart the load if it was aborted in the middle.
3414 * html/HTMLMediaElement.cpp:
3415 (WebCore::HTMLMediaElement::~HTMLMediaElement):
3416 (WebCore::HTMLMediaElement::load):
3417 (WebCore::HTMLMediaElement::willSaveToCache):
3418 (WebCore::HTMLMediaElement::didRestoreFromCache):
3419 * html/HTMLMediaElement.h:
3420 (WebCore::HTMLMediaElement::player):
3422 2008-02-06 Darin Adler <darin@apple.com>
3426 - replace calls to put to set up properties with calls to putDirect, to
3427 prepare for a future change where put won't take attributes any more,
3428 and for a slight performance boost
3430 * bindings/js/JSAudioConstructor.cpp:
3431 (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put.
3432 * bindings/js/JSEventTargetBase.h:
3433 (WebCore::JSEventTargetPrototype::self): Ditto.
3434 * bindings/js/JSHTMLOptionElementConstructor.cpp:
3435 (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto.
3436 * bindings/js/JSSQLResultSetRowListCustom.cpp:
3437 (WebCore::JSSQLResultSetRowList::item): Ditto.
3439 2008-02-06 Dan Bernstein <mitz@apple.com>
3441 Reviewed by Darin Adler.
3443 - fix http://bugs.webkit.org/show_bug.cgi?17093
3444 'border-color' does not animate to the value of 'color' when unspecified
3446 Test: fast/css/transition-color-unspecified.html
3448 * page/AnimationController.cpp:
3449 (WebCore::ImplicitAnimation::animate): Changed to use the value of the
3450 'color' property in the source or destination style as the source or
3451 destination value of properties whose inital value is defined to be the
3452 computed value of 'color'.
3454 2008-02-06 Dan Bernstein <mitz@apple.com>
3460 2008-02-05 Oliver Hunt <oliver@apple.com>
3462 Build fix -- touch generate-bindings to trigger regeneration of bindings
3464 * bindings/scripts/generate-bindings.pl:
3466 2008-02-05 Oliver Hunt <oliver@apple.com>
3470 Re-enable foreignObject by default as it is needed for a number of
3471 non-fO related SVG tests and none of the old known crashes occur
3474 * Configurations/WebCore.xcconfig:
3475 * WebCore.vcproj/WebCore.vcproj:
3477 2008-02-05 Sam Weinig <sam@webkit.org>
3479 Reviewed by Anders Carlsson.
3481 Fix for http://bugs.webkit.org/show_bug.cgi?id=8080
3482 NodeList (and other DOM lists) items are not enumeratable using for..in
3484 - Match Firefox when enumerating DOM interfaces with indexGetters (support for
3485 the array bracket, nodeList[0], notation) by including all the items in the
3486 list before the attributes and methods of the interface.
3488 Test: fast/dom/domListEnumeration.html
3490 * ForwardingHeaders/kjs/PropertyNameArray.h: Added.
3491 * bindings/js/JSDOMWindowCustom.cpp:
3492 (WebCore::JSDOMWindow::customGetPropertyNames): Use the new custom method model.
3493 * bindings/js/JSHistoryCustom.cpp:
3494 (WebCore::JSHistory::customGetPropertyNames): ditto.
3495 * bindings/scripts/CodeGeneratorJS.pm: Instead of just adding a declaration of
3496 getProperyNames and implementing the method in the Custom.cpp, move to a the
3497 model used by generated getOwnPropertySlot() and put() where the custom code
3498 is written in a separate customGetPropertyNames which returns a bool indicating
3499 whether to call up to the base class. This enables adding the list indexes
3500 to the PropertyNameArray for interfaces with indexGetters automatically.
3502 2008-02-05 Samuel Weinig <sam@webkit.org>
3504 Reviewed by Darin Adler.
3506 Fix for <rdar://problem/5726604>
3507 dom-checker: deleting properties of the window object cross-domain should not be allowed
3509 Fix flaw found while testing with dom-checker testing tool (http://code.google.com/p/dom-checker/).
3511 Test: http/tests/security/cross-frame-access-delete.html
3513 * bindings/js/JSDOMWindowCustom.cpp:
3514 (WebCore::JSDOMWindow::deleteProperty): Override deleteProperty to not delete cross-domain.
3515 * bindings/js/JSHistoryCustom.cpp:
3516 (WebCore::JSHistory::deleteProperty): ditto.
3517 * bindings/js/JSLocation.cpp:
3518 (WebCore::JSLocation::deleteProperty): ditto.
3519 * bindings/js/JSLocation.h:
3521 * bindings/scripts/CodeGeneratorJS.pm: Add deleteProperty declaration when CustomDeleteProperty is used.
3522 * page/DOMWindow.idl: Add CustomDeleteProperty extended attribute.
3523 * page/History.idl: ditto.
3525 2008-02-05 Alp Toker <alp@atoker.com>
3527 Rubber-stamped by Mark Rowe.
3529 Fix a "missing sentinel in function call" warning by using NULL
3532 * platform/gtk/RenderThemeGtk.cpp:
3533 (WebCore::RenderThemeGtk::caretBlinkFrequency):
3535 2008-02-05 Nikolas Zimmermann <zimmermann@kde.org>
3539 Fix dynamic updates of <circle> element's properties.
3541 Added tests: svg/dynamic-updates/SVGCircleElement*
3543 * svg/SVGCircleElement.cpp:
3544 (WebCore::SVGCircleElement::svgAttributeChanged): Mixed up cxAttr/xAttr etc.
3545 * svg/SVGCircleElement.h: