Reviewed by Maciej.
[WebKit-https.git] / WebCore / ChangeLog
1 2007-11-25  Alexey Proskuryakov  <ap@webkit.org>
2
3         Reviewed by Maciej.
4
5         http://bugs.webkit.org/show_bug.cgi?id=15919
6         XSLTProcessor.transformToFragment creates an extra not defined TEXT_NODE at the end
7
8         Test: fast/xsl/extra-lf-at-end.html
9
10         * xml/XSLTProcessor.cpp:
11         (WebCore::writeToVector): Changed to use Vector to avoid slow String::apend().
12         (WebCore::saveResultToString): Remove trailing line feed if present.
13
14 2007-11-24  Mark Rowe  <mrowe@apple.com>
15
16         Reviewed by Tim Hatcher.
17
18         Fix <rdar://problem/5432686> 333MB RPRVT seems to leak @ www.43folders.com (1hr plug-in stream).
19         http://bugs.webkit.org/show_bug.cgi?id=13705
20
21         Don't buffer the entire stream contents in memory in the ResourceLoader.
22
23         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
24         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
25         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
26         * loader/mac/WebPlugInStreamLoaderDelegate.h:
27
28 2007-11-23  Adam Roben  <aroben@apple.com>
29
30         Get rid of WebCoreSystemInterface on Windows
31
32         The one function defined in that file is now in WebKitSystemInterface.
33
34         Reviewed by Tim.
35
36         * WebCore.vcproj/WebCore.vcproj: Removed
37         WebCoreSystemInterface.{cpp,h}.
38         * platform/graphics/cg/ImageCG.cpp: Made #include of
39         WebCoreSystemInterface.h Mac-only.
40         * platform/win/GraphicsContextWin.cpp: Ditto.
41         * platform/win/WebCoreSystemInterface.cpp: Removed.
42         * platform/win/WebCoreSystemInterface.h: Removed.
43
44 2007-11-24  Adam Roben  <aroben@apple.com>
45
46         Replace uses of %@ with %s in the inspector
47
48         Rubberstamped by Tim.
49
50         * English.lproj/InspectorLocalizedStrings.js: Changed %@ to %s.
51         * page/inspector/DatabasePanel.js: Ditto.
52         * page/inspector/StylesSidebarPane.js: Ditto.
53         * page/inspector/inspector.js: Ditto.
54         * page/inspector/utilities.js:
55         (String.vsprintf): Removed @ as a format specifier.
56
57 2007-11-24  Adam Roben  <aroben@apple.com>
58
59         Windows build fix
60
61         Turn off the change made in r27984 on Windows for now.
62
63         * xml/XSLTProcessor.cpp:
64         (WebCore::XSLTProcessor::transformToString):
65         * xml/XSLTUnicodeSort.cpp:
66
67 2007-11-24  Timothy Hatcher  <timothy@apple.com>
68
69         Reviewed by Adam Roben.
70
71         Bug 16121: Web Inspector needs helper functions that pass a 'this' object to
72         addEventListener and setTimeout
73         http://bugs.webkit.org/show_bug.cgi?id=16121
74
75         Add Function.prototype.bind. This helper will return a wrapper function
76         that will call the original function with the supplied arguments
77         and using the supplied 'this' object.
78
79         * page/inspector/Database.js: Remove a use of setTimeout by
80           inheriting some common functions from Resource.
81         * page/inspector/DatabasePanel.js: Use the new bind function.
82         * page/inspector/ConsolePanel.js: Ditto.
83         * page/inspector/DocumentPanel.js: Ditto.
84         * page/inspector/NetworkPanel.js: Ditto.
85         * page/inspector/PropertiesSection.js: Ditto.
86         * page/inspector/Resource.js: Ditto.
87         * page/inspector/SidebarPane.js: Ditto.
88         * page/inspector/inspector.html: Moved Database.js after Resource.js,
89           now that Database.js uses it.
90         * page/inspector/inspector.js: Use the new bind function. Also
91           removed a setTimeout used for the localized strings code. There is
92           now a load event listener added to the localized strings script
93           element that will call WebInspector.loaded.
94         * page/inspector/utilities.js: Add Function.prototype.bind.
95
96 2007-11-24  Timothy Hatcher  <timothy@apple.com>
97
98         Reviewed by Adam Roben.
99
100         Bug 16112: Some Web Inspector UI elements use offsetWidth and offsetHeight before the stylesheet loads
101         http://bugs.webkit.org/show_bug.cgi?id=16112
102
103         In the places where we use offsetWidth and offsetHeight before
104         the stylesheet loads there is now a check. If the body's
105         offsetWidth is not greater than zero, then set a timeout
106         to do the updates requiring the stylesheet later.
107
108         The three places this happened:
109         - DOM tree selection highlight would show up at the wrong height
110           when using Inspect Element to open the inspector.
111         - DOM tree breadcrumbs would not collapse when using Inspect Element
112           to open the inspector.
113         - Network Timeline divider lines would not show when opening directly
114           into the timeline.
115
116         * page/inspector/DocumentPanel.js: Check if the stylesheet loaded.
117         * page/inspector/NetworkPanel.js: Ditto.
118         * page/inspector/inspector.html: Include the stylesheet before
119           any scripts, this will help get it loaded sooner.
120
121 2007-11-24  Kevin Ollivier  <kevino@theolliviers.com>
122
123         Add wx implementation for pathGetFilename
124
125         Reviewed by David D. Kilzer.
126
127         * html/HTMLFormElement.cpp:
128         (WebCore::pathGetFilename):
129
130 2007-11-23  Timothy Hatcher  <timothy@apple.com>
131
132         Reviewed by Adam Roben.
133
134         Bug 16110: Clicking inside the resource headers in the network timeline collapses them
135         http://bugs.webkit.org/show_bug.cgi?id=16110
136
137         Toggle the resource headers only if the click happens on the
138         resource row, not within the headers area.
139
140         * WebCore.xcodeproj/project.pbxproj:
141         * page/inspector/NetworkPanel.js:
142
143 2007-11-23  Kevin Ollivier  <kevino@theolliviers.com>
144
145         Win build fixes. CURL needs winsock, so don't disable it, and
146         include pthreads.h to get the threadsafe *_r functions.
147
148         Reviewed by Adam Roben.
149
150         * config.h:
151         * loader/FTPDirectoryDocument.cpp:
152         * loader/FTPDirectoryParser.cpp:
153
154 2007-11-23  Kevin Ollivier  <kevino@theolliviers.com>
155
156         wx build fix. Move wx settings to project build settings,
157         remove some old settings that were masking a build problem,
158         and fix include ordering to ensure proper config.h and
159         unicode/utf8.h headers are used. 
160
161         * webcore-base.bkl:
162         * webcore-wx.bkl:
163
164 2007-11-23  Simon Hausmann  <hausmann@webkit.org>
165
166         Reviewed by George Staikos <staikos@kde.org>.
167
168         Another build fix specific to trunk (instead of the stable branch) to fix make clean (which the buildbots call).
169
170         * WebCore.pro:
171
172 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
173
174         Not reviewed, trivial leak fix.
175
176         Fix xsltUnicodeSortFunction() memory leaks.
177
178         * xml/XSLTUnicodeSort.cpp:
179         (WebCore::xsltUnicodeSortFunction):
180
181 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
182
183         Reviewed by Maciej.
184
185         <rdar://problem/5539306> REGRESSION: redirect fails when subframe's document is opened but
186         not closed (affects digg.com)
187
188         Tests: fast/loader/meta-refresh-vs-open.html
189                fast/loader/redirect-with-open-subframe-2.html
190                fast/loader/redirect-with-open-subframe.html
191                http/tests/loading/onload-vs-immediate-refresh.pl
192
193         * loader/FrameLoader.cpp:
194         (WebCore::FrameLoader::scheduleRedirection): Only check whether the load is complete for
195         HTTP redirects - JavaScript-initiated ones are effective immediately.
196
197 2007-11-23  Dan Bernstein  <mitz@apple.com>
198
199         Reviewed by Alexey Proskuryakov.
200
201         - apply matrix transforms on the correct side of the transformation
202           matrix (not on the side where the vector is multiplied).
203
204         Test: fast/transforms/matrix-02.html
205
206         * rendering/RenderStyle.h:
207         (WebCore::MatrixTransformOperation::apply):
208
209 2007-11-23  Alexey Proskuryakov  <ap@webkit.org>
210
211         Reviewed by Maciej.
212
213         http://bugs.webkit.org/show_bug.cgi?id=16077
214         <rdar://problem/5609785> XSLT processor <xsl:sort> algorithm is incompatible with other
215         browser implementations
216
217         Test: fast/xsl/sort-unicode.xml
218
219         * xml/XSLTProcessor.cpp:
220         (WebCore::XSLTProcessor::transformToString): Set a custom sort function.
221
222         * xml/XSLTUnicodeSort.cpp: Added.
223         (init_xsltTransformError):
224         (xsltTransformError):
225         (WebCore::xsltUnicodeSortFunction):
226         * xml/XSLTUnicodeSort.h: Added.
227         ICU-based implementation of xsl:sort, using an example from libxslt distribution.
228         Only minimal coding style fixes to ease synchronization with upstream in the future.
229
230         * icu/unicode/ucol.h: Added.
231         * icu/unicode/uset.h: Added.
232         Taken from ICU 3.2
233
234         * WebCore.pro:
235         * WebCore.vcproj/WebCore.vcproj:
236         * WebCore.xcodeproj/project.pbxproj:
237         * WebCoreSources.bkl:
238         Added XSLTUnicodeSort.cpp.
239
240 2007-11-22  Alexey Proskuryakov  <ap@webkit.org>
241
242         Reviewed by Maciej.
243
244         http://bugs.webkit.org/show_bug.cgi?id=14977
245         Hixie's DOM Core performance test shows insert >10x slower than append
246
247         Each invocation of Element.childNodes[n] was creating and registering a new ChildNodeList,
248         which persisted and listened to notifications until GC.
249
250         A fix is to avoid registering child node lists for notifications - they don't need them, as
251         they share a common cache in Node.
252
253         * dom/Node.cpp:
254         (WebCore::Node::registerNodeList):
255         (WebCore::Node::unregisterNodeList):
256         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
257         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
258         * dom/NodeList.h:
259         (WebCore::NodeList::needsNotifications):
260
261 2007-11-22  Dan Bernstein  <mitz@apple.com>
262
263         Reviewed by Antti Koivisto.
264
265         - fix http://bugs.webkit.org/show_bug.cgi?id=15811
266           WebKit plug-ins can re-enter WebKit under attach()
267           <rdar://problem/5577978>
268
269         Defer plug-in loading until after attach and recalcStyle using the
270         post-attach callback mechanism. Netscape plug-ins are still loaded only
271         after layout.
272
273         * dom/ContainerNode.cpp:
274         Made NodeCallbackQueue elements retain the Node because callbacks might
275         delete nodes that are in the callback queue.
276         (WebCore::ContainerNode::suspendPostAttachCallbacks): Added. Needed to
277         prevent post-attach callbacks from being dispatched under recalcStyle().
278         (WebCore::ContainerNode::resumePostAttachCallbacks): Ditto.
279         (WebCore::ContainerNode::dispatchPostAttachCallbacks): Factored out from
280         attach().
281         (WebCore::ContainerNode::attach):
282         * dom/ContainerNode.h:
283         * dom/Document.cpp:
284         (WebCore::Document::recalcStyle): Added calls to
285         suspendPostAttachCallbacks() and resumePostAttachCallbacks().
286         * html/HTMLEmbedElement.cpp:
287         (WebCore::HTMLEmbedElement::HTMLEmbedElement):
288         (WebCore::HTMLEmbedElement::attach): Changed to queue the widget update
289         for post-attach.
290         (WebCore::HTMLEmbedElement::updateWidget): Added. Called by the
291         post-attach callback.
292         * html/HTMLEmbedElement.h: Added an m_needWidgetUpdate member needed to
293         prevent a double update if another plug-in's post-attach updateWidget()
294         triggers a layout which updates the widget before this plug-in's
295         post-attach callback is invoked.
296         (WebCore::HTMLEmbedElement::setNeedWidgetUpdate): Added a setter for
297         m_needWidgetUpdate.
298         * html/HTMLObjectElement.cpp:
299         (WebCore::HTMLObjectElement::attach): Changed to queue the widget update
300         for post-attach.
301         (WebCore::HTMLObjectElement::updateWidget): Added. Called by the
302         post-attach callback.
303         * html/HTMLObjectElement.h:
304         (WebCore::HTMLObjectElement::setNeedWidgetUpdate): Added a setter for
305         m_needWidgetUpdate.
306         * html/HTMLPlugInElement.cpp:
307         (WebCore::HTMLPlugInElement::updateWidgetCallback): Added.
308         * html/HTMLPlugInElement.h:
309         (WebCore::HTMLPlugInElement::updateWidget):
310         * rendering/RenderPartObject.cpp:
311         (WebCore::RenderPartObject::updateWidget): Added calls to
312         setNeedWidgetUpdate(false) so that if this method is called from
313         FrameView::layout() during post-attach dispatch of another plug-in,
314         it will not be called again when this plug-in's post-attach callback
315         is dispatched.
316         * rendering/RenderPartObject.h:
317         (WebCore::RenderPartObject::updateWidget) Renamed argument to match
318         the method definition.
319
320 2007-11-22  Timothy Hatcher  <timothy@apple.com>
321
322         Reviewed by Dan Bernstein.
323
324         Fix the Element.hasStyleClass and Element.removeStyleClass helpers
325         to not find and replace substrings, but whole class names at the
326         beginning or end of the string or surrounded by whitespace.
327
328         * page/inspector/utilities.js:
329
330 2007-11-22  Timothy Hatcher  <timothy@apple.com>
331
332         Revert part of my r27935 change that made the Tip balloons
333         animate with CSS transitions. The balloon was only opacity 0,
334         so it would cause its row to highlight when hovering over
335         another row.
336
337         * page/inspector/NetworkPanel.js:
338         * page/inspector/inspector.css:
339
340 2007-11-22  Dan Bernstein  <mitz@apple.com>
341
342         Reviewed by Maciej Stachowiak.
343
344         - fix http://bugs.webkit.org/show_bug.cgi?id=15943
345           -webkit-transform matrix does not work
346
347         Test: fast/transforms/matrix-01.html
348
349         Parse all six matrix entries as numbers.
350
351         * css/CSSParser.cpp:
352         (WebCore::TransformOperationInfo::TransformOperationInfo):
353         (WebCore::CSSParser::parseTransform):
354         * css/CSSStyleSelector.cpp:
355         (WebCore::CSSStyleSelector::applyProperty):
356         * rendering/RenderStyle.cpp:
357         (WebCore::MatrixTransformOperation::blend):
358         * rendering/RenderStyle.h:
359         (WebCore::MatrixTransformOperation::MatrixTransformOperation):
360         (WebCore::MatrixTransformOperation::apply):
361
362 2007-11-22  Laszlo Gombos  <laszlo.gombos@gmail.com>
363
364         Reviewed by Alp Toker.
365
366         Fix some compilation warnings.  Do not reference undefined (platform) specific type (WebCore::CachedFont::m_fontData)
367
368         * loader/CachedFont.cpp:
369         (WebCore::CachedFont::~CachedFont):
370         (WebCore::CachedFont::allReferencesRemoved):
371
372 2007-11-22  Alp Toker  <alp@atoker.com>
373
374         Reviewed by Mark Rowe.
375
376         GTK+ drawing fix.
377
378         Add a check to avoid crashing when the GraphicsContext is not
379         associated with a GdkEventExpose. This was noticed when adding
380         printing support but might be triggered in other situations too.
381
382         * platform/gtk/WidgetGtk.cpp:
383         (WebCore::Widget::paint):
384
385 2007-11-22  Julien Chaffraix  <julien.chaffraix@gmail.com>
386
387         Reviewed by Alexey.
388
389         Bug 15530: XMLHttpRequest should not support certain methods
390
391         Test: http/tests/xmlhttprequest/xmlhttprequest-forbidden-methods-exception.html
392
393         * xml/XMLHttpRequest.cpp:
394         (WebCore::XMLHttpRequest::open):
395
396 2007-11-22  Simon Hausmann  <hausmann@kde.org>
397
398         Reviewed by George.
399
400         For the build inside Qt include qbase.pri and don't duplicate what qbase.pri otherwise does (install targets, etc.)
401
402         * WebCore.pro:
403
404 2007-11-22  Simon Hausmann  <hausmann@kde.org>
405
406         Reviewed by George.
407
408         Don't set OBJECTS_DIR when building inside Qt
409
410         * WebCore.pro:
411
412 2007-11-22  Simon Hausmann  <hausmann@kde.org>
413
414         Reviewed by George.
415
416         Use ../generated as path for the generated sources for builds inside Qt
417
418         * WebCore.pro:
419
420 2007-11-22  Simon Hausmann  <hausmann@kde.org>
421
422         Reviewed by George.
423
424         Make the directory of where to put the generated sources configurable through the GENERATED_SOURCE_DIR variable
425
426         * WebCore.pro:
427
428 2007-11-22  Simon Hausmann  <hausmann@kde.org>
429
430         Reviewed by George.
431
432         Centralize the setup for all the extra compilers in a addExtraCompiler function.
433         
434         This allows adding a "generated_files" target that builds all generated files using "make generated_files".
435         For the build inside Qt we do not generate actual rules for the extra compilers but instead
436         do the variable substitution of compiler.output manually and add the generated sources to SOURCES.
437
438         * WebCore.pro:
439
440 2007-11-21  Timothy Hatcher  <timothy@apple.com>
441
442         Reviewed by Eric Seidel.
443
444         Show Fonts as Yellow in the network timeline.
445
446         * page/inspector/NetworkPanel.js:
447         * page/inspector/inspector.css:
448
449 2007-11-21  Dan Bernstein  <mitz@apple.com>
450
451         Reviewed by Eric Seidel.
452
453         - fix <rdar://problem/5607037> REGRESSION (r27351): Departure date does not repaint when changed on Google Maps public transit planner (16034)
454
455         Test: fast/repaint/subtree-root-skipped.html
456
457         * page/FrameView.cpp:
458         (WebCore::FrameViewPrivate::FrameViewPrivate): Initialize the layout
459         root to 0.
460         (WebCore::FrameView::layoutRoot): Changed to return a RenderObject
461         instead of a Node.
462         (WebCore::FrameView::layout): Changed for layout root being a renderer
463         rather than a DOM node. Also replaced clearing the repaint rects
464         set with asserting that it is empty if this is the top-level call to
465         layout(). If it is not, the set may contain rects from enclosing
466         layout() and those should not be removed.
467         (WebCore::FrameView::scheduleRelayout): Changed for layout root being
468         a renderer rather than a DOM node.
469         (WebCore::isObjectAncestorContainerOf): Added this helper function that
470         tests whether one object will be marked by calling
471         markContainingBlocksForLayout() on the other.
472         (WebCore::FrameView::scheduleRelayoutOfSubtree): Changed for layout
473         root being a renderer rather than a DOM node. Changed the check if new
474         and current layout roots are on the same path from the root to use
475         the subgraph of the render tree defined by container()hood instead of
476         the DOM tree and parenthood.
477         * page/FrameView.h:
478         * rendering/RenderBox.cpp: 
479         (WebCore::RenderBox::calcWidth): Changed for layout root being a
480         renderer rather than a DOM node.
481         * rendering/RenderObject.cpp:
482         (WebCore::RenderObject::~RenderObject): Added an assertion that the
483         object being deleted is not currently the layout root.
484         (WebCore::RenderObject::scheduleRelayout): Changed for layout root being
485         a renderer rather than a DOM node.
486
487 2007-11-21  Mark Rowe  <mrowe@apple.com>
488
489         Reviewed by Eric.
490
491         Fix WebCore to build without warnings under GCC 4.2.
492
493         * Configurations/Base.xcconfig:
494         * css/CSSRuleList.cpp:
495         (WebCore::CSSRuleList::deleteRule):
496         * css/CSSStyleSelector.cpp:
497         (WebCore::CSSStyleSelector::locateSharedStyle):
498         * html/HTMLParser.cpp:
499         (WebCore::HTMLParser::allowNestedRedundantTag):
500         * rendering/RenderBlock.cpp:
501         (WebCore::RenderBlock::fillInlineSelectionGaps):
502         (WebCore::RenderBlock::fillBlockSelectionGaps):
503         * rendering/RenderLayer.cpp:
504         (WebCore::RenderLayer::stackingContext):
505         (WebCore::RenderLayer::enclosingPositionedAncestor):
506         (WebCore::RenderLayer::transparentAncestor):
507         * rendering/RenderStyle.cpp:
508         (WebCore::BackgroundLayer::fillUnsetProperties):
509         (WebCore::Transition::fillUnsetProperties):
510         * rendering/RenderText.cpp:
511         (WebCore::RenderText::containsOnlyWhitespace):
512         * rendering/bidi.cpp:
513         (WebCore::RenderBlock::determineStartPosition):
514
515 2007-11-21  Alp Toker  <alp@atoker.com>
516
517         Reviewed by Mark Rowe.
518
519         http://bugs.webkit.org/show_bug.cgi?id=16071
520         Curl backend handles EINTR incorrectly
521
522         Defer timers during select() to avoid interruption by timer signals.
523
524         * platform/network/curl/ResourceHandleManager.cpp:
525         (WebCore::ResourceHandleManager::downloadTimerCallback):
526
527 2007-11-21  Mark Rowe  <mrowe@apple.com>
528
529         Reviewed by Tim Hatcher.
530
531         Changes due to <rdar://problem/5602936> Need to resolve new GCC 4.2 warnings
532
533         Update format strings to use format specifiers that match the argument types.
534
535         * loader/icon/IconDatabase.cpp:
536         (WebCore::IconDatabase::performURLImport):
537         (WebCore::IconDatabase::writeToDatabase):
538         * platform/mac/TextCodecMac.cpp:
539         (WebCore::TextCodecMac::decode):
540         * storage/Database.cpp:
541         (WebCore::Database::deliverAllPendingCallbacks):
542
543 2007-11-21  Xan Lopez  <xan@gnome.org>
544
545         Reviewed by Alp Toker.
546
547         Clarify scroll event processing with a comment.
548
549         * platform/gtk/PlatformScrollBarGtk.cpp:
550         (gtkScrollEventCallback):
551
552 2007-11-21  Timothy Hatcher  <timothy@apple.com>
553
554         Reviewed by Adam Roben.
555
556         Bug 16085: Web Inspector's Network Timeline graph code clean up and misc. fixes
557         http://bugs.webkit.org/show_bug.cgi?id=16085
558         
559         Changes include:
560         - Refactor the drawing code as nested functions instead of global functions.
561         - Compute the segment percentages only once per call to drawSummaryGraph.
562         - Account for percentages that rounded down to total less-than 100%.
563         - Draw the pill shadow better using the canvas shadow drawing properties.
564         - Removes a couple canvas context saves and restores.
565
566         * page/inspector/NetworkPanel.js:
567
568 2007-11-21  Alexey Proskuryakov  <ap@webkit.org>
569
570         Reviewed by Adam Roben.
571
572         http://bugs.webkit.org/show_bug.cgi?id=16056
573         Unicode not being interpreted correctly in Web Inspector source view
574
575         Cannot be tested automatically.
576
577         * loader/CachedCSSStyleSheet.cpp:
578         (WebCore::CachedCSSStyleSheet::encoding):
579         * loader/CachedCSSStyleSheet.h:
580         * loader/CachedResource.h:
581         (WebCore::CachedResource::encoding):
582         * loader/CachedScript.cpp:
583         (WebCore::CachedScript::encoding):
584         * loader/CachedScript.h:
585         * loader/CachedXBLDocument.cpp:
586         (WebCore::CachedXBLDocument::encoding):
587         * loader/CachedXBLDocument.h:
588         * loader/CachedXSLStyleSheet.cpp:
589         (WebCore::CachedXSLStyleSheet::encoding):
590         * loader/CachedXSLStyleSheet.h:
591         Teach textual CachedResources to report their encodings.
592
593         * page/InspectorController.cpp:
594         (WebCore::addSourceToFrame):
595         (WebCore::updateResourceResponse):
596         Use the actual encoding - the network layer has little idea about it.
597
598 2007-11-20  Mark Rowe  <mrowe@apple.com>
599
600         Reviewed by Maciej Stachowiak.
601
602         Fix <rdar://problem/5609579> (DOMParser().parseFromString() freezes Safari when parsing large nodes with XML entities)
603         http://bugs.webkit.org/show_bug.cgi?id=16076
604
605         XMLTokenizer was calling CharacterData::appendData twice per entity in the fragment of XML being
606         parsed (once for text before the entity, once for the entity itself).  This triggered O(n^2) copying
607         of the CharacterData's string due to resizing.  We now prevent this happening by buffering all the
608         content for a given Text node in the XMLTokenizer before sending it out to the node in a single go.
609
610         * dom/XMLTokenizer.cpp:
611         (WebCore::XMLTokenizer::characters): Append the characters to the buffer.
612         (WebCore::XMLTokenizer::endDocument): Ensure the buffer is flushed when the document has ended.
613         (WebCore::endDocumentHandler):
614         (WebCore::XMLTokenizer::enterText):
615         (WebCore::XMLTokenizer::exitText): Append the contents of the buffer to the node.
616         (WebCore::XMLTokenizer::initializeParserContext): Add the endDocument handler.
617         (WebCore::parseXMLDocumentFragment): Force endDocument to be called when parsing a fragment to ensure
618         that the buffer gets flushed to the node.
619         * dom/XMLTokenizer.h:
620
621 2007-11-20  Timothy Hatcher  <timothy@apple.com>
622
623         Reviewed by Mark Rowe.
624
625         Animate the status area and tip balloons in the Web Inspector
626         with CSS animations.
627
628         * page/inspector/NetworkPanel.js:
629         * page/inspector/inspector.css:
630         * page/inspector/inspector.js:
631
632 2007-11-20  Kevin Ollivier  <kevino@theolliviers.com>
633
634         wx build fix for Windows. Don't use WebCore/move-js-headers.sh as
635         it indiscriminately copies any headers inside JavaScriptCore,
636         which includes Tiger ICU headers. 
637
638         * webcore-base.bkl:
639         Remove references to the WebCore/include dir generated by
640         move-js-headers.sh, and also get headers from JavaScriptCore
641         directly rather than from WebCore/ForwardingHeaders. 
642
643 2007-11-20  Alp Toker  <alp@atoker.com>
644
645         Reviewed by Mark Rowe.
646
647         Avoid pointlessly mallocing and freeing this transform matrix.
648
649         * platform/gtk/FontPlatformDataGtk.cpp:
650         (WebCore::FontPlatformData::FontPlatformData):
651
652 2007-11-20  Naiem Shaik  <naiem.shaik@gmail.com>
653
654         Reviewed by Alp Toker.
655
656         http://bugs.webkit.org/show_bug.cgi?id=15763
657         [GTK] Enter key does not take to the link highlighted.
658
659         Add missing keycode cases.
660
661         * platform/gtk/KeyEventGtk.cpp:
662         (WebCore::keyIdentifierForGdkKeyCode):
663         (WebCore::windowsKeyCodeForKeyEvent):
664         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
665
666 2007-11-20  Mark Rowe  <mrowe@apple.com>
667
668         Reviewed by Sam Weinig.
669
670         Fix http://bugs.webkit.org/show_bug.cgi?id=16074
671         Bug 16074: execCommand("InsertHorizontalRule", false, "") results in id="" being inserted
672
673         For consistency with InsertOrderedList and InsertUnorderedList a value parameter of "" should
674         not result in an id being set.
675
676         * editing/JSEditor.cpp: Don't set the id attribute if value is empty.
677
678 2007-11-20  Dan Bernstein  <mitz@apple.com>
679
680         Reviewed by Adam Roben.
681
682         - fix <rdar://problem/5090708> Textareas render broken-looking scrollbars when too short to show full scrollbar
683
684         * platform/win/PlatformScrollBar.h:
685         * platform/win/PlatformScrollBarSafari.cpp:
686         Added the "hit inset" constants (representing how far the track eats
687         into the button).
688         (WebCore::PlatformScrollbar::paint): Changed to paint the buttons and
689         the thumb only if they should be showing.
690         (WebCore::PlatformScrollbar::hasButtons): Added. Returns whether the
691         arrows should be drawn.
692         (WebCore::PlatformScrollbar::hasThumb): Added. Returns whether the thumb
693         should be drawn.
694         (WebCore::PlatformScrollbar::forwardButtonRect):
695         (WebCore::PlatformScrollbar::trackRect): Changed to return the entire
696         bounds of the scrollbar if the scrollbar has no buttons.
697         (WebCore::PlatformScrollbar::paintTrack): Changed to paint a disabled
698         track along the entire scrollbar if it has not buttons.
699         (WebCore::PlatformScrollbar::hitTest): Changed to hit test only the
700         parts that the scrollbar has in its current dimensions.
701
702 2007-11-20  Mark Rowe  <mrowe@apple.com>
703
704         Reviewed by Alp Toker.
705
706         * config.h: Change #if to #ifdef to silence warnings on non-Apple platforms.
707
708 2007-11-20  Simon Hausmann  <hausmann@kde.org>
709
710         Reviewed by Adam Treat <treat@kde.org>.
711
712         Remove static linkage of QtWebKit against the ICO image format plugin.
713         Instead build the support for the ICO image format as a proper standalone qt image format plugin and install it.
714
715         * WebCore.pro:
716         * platform/graphics/qt/ImageDecoderQt.cpp:
717
718 2007-11-20  David D. Kilzer  <ddkilzer@webkit.org>
719
720         no-svg build broken after r27278
721         <http://bugs.webkit.org/show_bug.cgi?id=16061>
722
723         Reviewed by Eric.
724
725         * bindings/scripts/CodeGeneratorObjC.pm: Always generate DOMHTMLEmbedElementPrivate.h
726         and DOMHTMLObjectElementPrivate.h for no-svg build.
727
728 2007-11-20  Adam Treat  <treat@kde.org>
729
730         Reviewed by Simon.
731
732         * Don't use so much heap memory.
733
734         * platform/graphics/qt/ImageDecoderQt.cpp:
735         * platform/graphics/qt/ImageDecoderQt.h:
736         * platform/graphics/qt/ImageSourceQt.cpp:
737         (WebCore::ImageSource::createFrameAtIndex):
738
739 2007-11-20  Lars Knoll  <lars@trolltech.com>
740
741         Reviewed by Simon.
742
743         Fix text break interators.
744         
745         The break iterators where trying to be smart about the input
746         string and caching their results. Unfortunately a pointer/string length
747         comparison is not good enough in all cases (since some input is stack based
748         temp strings). Removed the caching but at the same time started to use a more
749         efficient constructor of QTextBoundaryFinder that doesn't need to malloc for
750         most strings.
751         
752         Fixes two test cases that test "text-transform: capitalize".
753
754         * platform/qt/TextBreakIteratorQt.cpp:
755         (WebCore::wordBreakIterator):
756         (WebCore::characterBreakIterator):
757         (WebCore::lineBreakIterator):
758         (WebCore::sentenceBreakIterator):
759
760 2007-11-20  Adam Treat  <treat@kde.org>
761
762         Reviewed by George.
763
764         * Make gif animations work for instance.
765
766         * platform/graphics/qt/ImageDecoderQt.cpp:
767         (WebCore::ImageDecoderQt::reset):
768         (WebCore::ImageDecoderQt::setData):
769         (WebCore::ImageDecoderQt::frameCount):
770         (WebCore::ImageDecoderQt::repetitionCount):
771         * platform/graphics/qt/ImageDecoderQt.h:
772
773 2007-11-20  Adam Treat  <treat@kde.org>
774
775         * Build in release mode
776
777         * platform/NotImplemented.h:
778
779 2007-11-20  Adam Treat  <treat@kde.org>
780
781         Reviewed by Simon and George.
782
783         * Be quiet and allow suppression of NotImplemented calls at runtime.
784
785         * platform/NotImplemented.h:
786
787 2007-11-19  Doug Turner  <dougt@meer.net>
788
789         Reviewed by Alp Toker.
790
791         http://bugs.webkit.org/show_bug.cgi?id=16054
792         Crash when GlyphPage::fill is called with more than 256 bytes of data
793
794         http://bugs.webkit.org/show_bug.cgi?id=14446
795         [GDK] Crash on http://www.wikipedia.org/
796
797         setGlyphDataForIndex() uses a fixed array of size 256 which we can't
798         exceed. We need to return failure if the buffer has Unicode
799         supplementary characters for now.
800
801         This strategy matches the Win port, which also doesn't support this
802         case yet.
803
804         Add an assertion so nobody makes this mistake again.
805
806         * platform/GlyphPageTreeNode.h:
807         (WebCore::GlyphPage::setGlyphDataForIndex):
808         * platform/gtk/GlyphPageTreeNodeGtk.cpp:
809         (WebCore::GlyphPage::fill):
810
811 2007-11-19  Doug Turner  <dougt@meer.net>
812
813         Reviewed by Timothy Hatcher.
814
815         http://bugs.webkit.org/show_bug.cgi?id=16050
816         sqlite3_prepare16_v2 build bustage.
817
818         Using the correct SQLITE_VERSION_NUMBER around sqlite_prepare16_v2
819         to fix build bustage.
820
821         * platform/sql/SQLiteStatement.cpp:
822         (WebCore::SQLiteStatement::prepare):
823
824 2007-11-19  Mark Rowe  <mrowe@apple.com>
825
826         Build fix.  Don't over-qualify the constructor name.
827
828         * storage/DatabaseDetails.h:
829
830 2007-11-19  Brady Eidson <beidson@apple.com>
831
832         Reviewed by Maciej
833
834         Stub out the WebCore parts of the WebKit API
835
836         * WebCore.base.exp:
837         * WebCore.xcodeproj/project.pbxproj:
838
839         * storage/DatabaseDetails.h: Added.  Simple container for vitals on a specific database
840         (WebCore::DatabaseDetails::DatabaseDetails::DatabaseDetails):
841         (WebCore::DatabaseDetails::DatabaseDetails):
842         (WebCore::DatabaseDetails::isValid):
843         (WebCore::DatabaseDetails::name):
844         (WebCore::DatabaseDetails::version):
845         (WebCore::DatabaseDetails::displayName):
846         (WebCore::DatabaseDetails::expectedUsage):
847         (WebCore::DatabaseDetails::currentUsage):
848
849         * storage/DatabaseTracker.cpp:  Added various methods for API usage
850         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
851         (WebCore::DatabaseTracker::usageForOrigin):
852         (WebCore::DatabaseTracker::quotaForOrigin):
853         (WebCore::DatabaseTracker::setQuota):
854         * storage/DatabaseTracker.h:
855
856 2007-11-19  Kevin Ollivier  <kevino@theolliviers.com>
857
858         wx port build fix.
859
860         * platform/graphics/wx/AffineTransformWx.cpp:
861         (WebCore::AffineTransform::operator== ):
862         m_transform is only available when using wxGraphicsContext.
863
864 2007-11-19  Alp Toker  <alp@atoker.com>
865
866         Reviewed by Mark Rowe.
867
868         GTK+ drawing fixes.
869
870         Add a check to avoid crashing when the GraphicsContext is not
871         associated with a GdkDrawable. This was noticed when adding printing
872         support but might be triggered in other situations too.
873
874         Do not render themes when painting is disabled. This is an
875         optimisation for cases where GraphicsContext is used to calculate page
876         dimensions etc. without actually rendering.
877
878         * platform/graphics/cairo/GraphicsContextCairo.cpp:
879         (WebCore::GraphicsContext::gdkDrawable):
880         * platform/gtk/RenderThemeGtk.cpp:
881         (WebCore::paintMozWidget):
882
883 2007-11-13  Rahul Abrol  <ra5ul@comcast.net>
884
885         Reviewed by Tim Hatcher.
886
887         http://bugs.webkit.org/show_bug.cgi?id=15977
888         Resizing images preference now toggles default image state.
889
890         * loader/ImageDocument.cpp:
891         (WebCore::ImageDocument::ImageDocument):
892         (WebCore::ImageDocument::createDocumentStructure):
893         (WebCore::ImageDocument::imageChanged):
894
895 2007-11-19  Kevin Ollivier  <kevino@theolliviers.com>
896
897         Update wx port build sources with recent changes, update
898         wx FontPlatformData to be a class (MSVC7 gets confused
899         otherwise...) and implement its hash() method.
900
901         Reviewed by Adam.
902
903         * WebCoreSources.bkl:
904         * platform/wx/FontPlatformData.h:
905         (WebCore::FontPlatformData::hash):
906
907 2007-11-19  Julien Chaffraix  <julien.chaffraix@gmail.com>
908
909         Reviewed by Darin.
910
911         http://bugs.webkit.org/show_bug.cgi?id=12194
912         Bug 12194: Trying to access XMLHttpRequest.responseText or responseXML when they 
913         are not available should raise an exception
914
915         Tests: http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html
916                http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html
917
918         * bindings/js/JSXMLHttpRequest.cpp:
919         (KJS::JSXMLHttpRequest::getValueProperty):
920         * xml/XMLHttpRequest.cpp:
921         (WebCore::XMLHttpRequest::getResponseText):
922         (WebCore::XMLHttpRequest::getResponseXML):
923         * xml/XMLHttpRequest.h:
924
925 2007-11-19  Peter Kasting  <zerodpx@gmail.com>
926
927         Reviewed by Darin Adler.
928
929         http://bugs.webkit.org/show_bug.cgi?id=15971
930         The GIF decoder should not fail decoding if the caller asks it to
931         decode again when no new data has arrived since the last call.
932
933         * platform/image-decoders/gif/GIFImageReader.cpp:
934         (GIFImageReader::read):
935
936 2007-11-18  Brady Eidson <beidson@apple.com>
937
938         Reviewed by Eric
939
940         Fix a crash hashing a default SecurityOriginData object 
941
942         * storage/DatabaseTracker.cpp:
943         (WebCore::SecurityOriginDataHash::hash): The default object has some default strings with NULL
944           StringImpls - don't try to hash those!
945
946 2007-11-18  Timothy Hatcher  <timothy@apple.com>
947
948         Reviewed by Sam Weinig.
949
950         Bug 16043: Remove InspectorController.log now that console.log works
951         http://bugs.webkit.org/show_bug.cgi?id=16043
952
953         Remove the last uses of InspectorController.log. Once use was no longer needed,
954         checking an erro case that can't happen anymore. The other case now uses console.error.
955
956         * page/InspectorController.cpp: Remove the log function.
957         (WebCore::InspectorController::windowScriptObjectAvailable): Remove the log function from
958         InspectorController script class.
959         * page/inspector/DocumentPanel.js: Remove a use of InspectorController.log that isn't needed.
960         * page/inspector/Panel.js: Change InspectorController.log to console.log and early return.
961
962 2007-11-18  Timothy Hatcher  <timothy@apple.com>
963
964         Reviewed by Brady.
965
966         Bug 16041: REGRESSION: the Database panel in the Inspector stopped showing errors
967         http://bugs.webkit.org/show_bug.cgi?id=16041
968
969         * page/inspector/DatabasePanel.js: Implement error callbacks to pass to executeSql()
970           and transaction(). Refactored some code for the success and error callbacks to use.
971
972 2007-11-18  Alexey Proskuryakov  <ap@webkit.org>
973
974         Reviewed by Maciej.
975
976         <rdar://problem/5546393> Whitespace handling doesn't match HTML5.
977
978         HTML5 definition is the same as MSIE's, with the exception that the latter strips null
979         characters. Firefox also treats U+0008 as whitespace, but not U+000B or U+000C.
980
981         Test: fast/parser/html-whitespace.html
982
983         * html/HTMLTokenizer.cpp:
984         (WebCore::HTMLTokenizer::parseSpecial):
985         (WebCore::HTMLTokenizer::parseTag):
986         Use isASCIISpace, which matches HTML5 definition of whitespace, and also what we use to
987         check for whitespace almost everywhere.
988
989 2007-11-17  Mark Rowe  <mrowe@apple.com>
990
991         Reviewed by Darin Adler.
992
993         Fix: <rdar://problem/5607032> REGRESSION: testapi exits with assertion failure in debug build
994              <rdar://problem/5440659> JSGlobalContextCreate throws away globalObjectClass's prototype
995              http://bugs.webkit.org/show_bug.cgi?id=16033
996
997         Update for changes in Interpreter method signatures.
998
999         * bindings/js/kjs_binding.cpp:
1000         (KJS::ScriptInterpreter::ScriptInterpreter):
1001         * bindings/js/kjs_window.cpp:
1002         (KJS::Window::clear):
1003
1004 2007-11-17  Timothy Hatcher  <timothy@apple.com>
1005
1006         Reviewed by Mark Rowe.
1007
1008         Bug 13470: i18n: The Web Inspector is not localizable
1009         http://bugs.webkit.org/show_bug.cgi?id=13470
1010
1011         Add support for localization to the Web Inspector. Clients need to
1012         implement localizedStringsURL() to return the URL of the
1013         InspectorLocalizedStrings.js that best matches the user's language.
1014
1015         * English.lproj: Added.
1016         * English.lproj/InspectorLocalizedStrings.js: Added.
1017         * WebCore.xcodeproj/project.pbxproj: Add InspectorLocalizedStrings.js.
1018         * page/InspectorClient.h: Add localizedStringsURL.
1019         * page/InspectorController.cpp: Add localizedStringsURL that calls
1020           the client. Also added a version exposed to JavaScript.
1021         * page/InspectorController.h: Add localizedStringsURL.
1022         * page/inspector/ConsolePanel.js: Call WebInspector.UIString
1023           for user visible strings.
1024         * page/inspector/DatabasePanel.js: Ditto.
1025         * page/inspector/DocumentPanel.js: Ditto.
1026         * page/inspector/ImagePanel.js: Ditto.
1027         * page/inspector/MetricsSidebarPane.js: Ditto.
1028         * page/inspector/NetworkPanel.js: Ditto.
1029         * page/inspector/Panel.js: Ditto.
1030         * page/inspector/PropertiesSidebarPane.js: Ditto.
1031         * page/inspector/Resource.js: Ditto.
1032         * page/inspector/ResourceCategory.js: Ditto.
1033         * page/inspector/SourcePanel.js: Ditto.
1034         * page/inspector/StylesSidebarPane.js: Ditto.
1035         * page/inspector/inspector.css: Use pre-wrap so database errors can use \n.
1036         * page/inspector/inspector.html: Remove some user visible strings.
1037         * page/inspector/inspector.js: Added WebInspector.UIString and call
1038           WebInspector.UIString for user visible strings. Some code needed to be 
1039           moved to WebInspector.loaded to use UIString after the localized strings
1040           get loaded.
1041         * platform/graphics/svg/SVGImageEmptyClients.h:
1042         (WebCore::SVGEmptyFrameLoaderClient::redirectDataToPlugin): Remove WebCore:: prefix.
1043         (WebCore::SVGEmptyInspectorClient::createPage): Ditto.
1044         (WebCore::SVGEmptyInspectorClient::localizedStringsURL): Add empty stub.
1045         (WebCore::SVGEmptyInspectorClient::highlight): Remove WebCore:: prefix.
1046         (WebCore::SVGEmptyInspectorClient::inspectedURLChanged): Ditto.
1047
1048 2007-11-17  Timothy Hatcher  <timothy@apple.com>
1049
1050         Reviewed by Adam.
1051
1052         Reworte String.sprintf to fix many bad bugs and to not use RegExp. Also added
1053         String.vsprintf so it can be used later for the localization function.
1054
1055         This version only supports argument reordering, precision for floats, and these
1056         format characters: d, f, s and @. Any unsupported format characters are logged
1057         and substituted like strings.
1058
1059         * page/inspector/utilities.js:
1060
1061 2007-11-17  Alexey Proskuryakov  <ap@webkit.org>
1062
1063         Windows build fix.
1064
1065         * editing/Editor.h: Made canSmartCopyOrDelete public, as Windows WebView still needs it.
1066
1067 2007-11-17  Alexey Proskuryakov  <ap@webkit.org>
1068
1069         Reviewed by Darin.
1070
1071         http://bugs.webkit.org/show_bug.cgi?id=15969
1072         Eliminate Editor::deleteRange()
1073
1074         No change in functionality.
1075
1076         * editing/CompositeEditCommand.h: Removed unimplemented deleteKeyPressed().
1077
1078         * editing/Editor.cpp:
1079         (WebCore::Editor::deleteWithDirection):
1080         (WebCore::Editor::cut):
1081         (WebCore::Editor::performDelete):
1082         * editing/Editor.h:
1083         Moved relevant Editor::deleteRange() functionality to its callers.
1084         Removed deleteSelectionWithSmartDelete(void), which was more confusing than helpful
1085         in my opinion.
1086
1087         * editing/mac/EditorMac.mm:
1088         (WebCore::initializeKillRingIfNeeded):
1089         (WebCore::Editor::addToKillRing):
1090         (WebCore::Editor::yank):
1091         (WebCore::Editor::yankAndSelect):
1092         (WebCore::Editor::setMark):
1093         (WebCore::unionDOMRanges):
1094         (WebCore::Editor::deleteToMark):
1095         (WebCore::Editor::selectToMark):
1096         (WebCore::Editor::swapWithMark):
1097         Pushed kill ring handling down from WebCore.
1098
1099         * page/mac/WebCoreFrameBridge.h:
1100         * page/mac/WebCoreFrameBridge.mm:
1101         Removed setMarkDOMRange (the corresponding getter is still needed).
1102
1103         * WebCore.base.exp: No longer need to export Editor::deleteRange() and Editor::insertTextWithoutSendingTextEvent().
1104         Export the new kill ring functions.
1105
1106 2007-11-16  Ryan Leavengood  <leavengood@gmail.com>
1107
1108         Reviewed by David Kilzer.
1109
1110         Build fix: the needed headers for POSIX file functions were not
1111         included.
1112
1113         * platform/posix/FileSystemPOSIX.cpp:
1114
1115 2007-11-16  Dan Bernstein  <mitz@apple.com>
1116
1117         Reviewed by Darin Adler.
1118
1119         - fix the common case of <http://bugs.webkit.org/show_bug.cgi?id=15994>
1120           REGRESSION: Incomplete repaint of CSS image substitution
1121
1122         Test: fast/repaint/clip-with-layout-delta.html
1123
1124         * rendering/LayoutState.cpp:
1125         (WebCore::LayoutState::LayoutState): Account for layout delta when
1126         pushing additional clip.
1127
1128 2007-11-16  Antti Koivisto  <antti@apple.com>
1129
1130         Reviewed by Adele.
1131         
1132         Seeking related fixes, updates to match the latest specification
1133         - rename loopCount of HTMLMediaElement to playCount
1134         - add explicit seeking attribute to HTMLMediaElement to get semantics right
1135         - implement the specification behavior that currentTime must immediately return seeked position in HTMLMediaElement 
1136           instead of MoviePrivateQTKit 
1137         - fix broken behavior when seeking past end of the media, add tests
1138         - replace Movie didEnd callback with broader timeChanged callback (which gets called in didEnd case too)
1139         - use setDelayCallbacks: in various MoviePrivateQTKit methods to avoid bug prone synchronous callbacks from QT, make
1140           HTMLMediaElement not depend on synchronous callbacks
1141         - do some cleanups and simplifications in MoviePrivateQTKit, get rid of m_rateBeforeSeek and m_blockStateUpdate variables
1142
1143         Tests: http/tests/media/video-seekable-stall.html
1144                media/video-seeking.html
1145                media/video-seek-past-end-paused.html
1146                media/video-seek-past-end-playing.html
1147
1148         * html/HTMLAttributeNames.in: 
1149         * html/HTMLMediaElement.cpp:
1150         (WebCore::HTMLMediaElement::HTMLMediaElement):
1151         (WebCore::HTMLMediaElement::load):
1152         (WebCore::HTMLMediaElement::movieNetworkStateChanged):
1153         (WebCore::HTMLMediaElement::setReadyState):
1154         (WebCore::HTMLMediaElement::seek):
1155         (WebCore::HTMLMediaElement::seeking):
1156         (WebCore::HTMLMediaElement::currentTime):
1157         (WebCore::HTMLMediaElement::ended):
1158         (WebCore::HTMLMediaElement::play):
1159         (WebCore::HTMLMediaElement::pause):
1160         (WebCore::HTMLMediaElement::playCount):
1161         (WebCore::HTMLMediaElement::setPlayCount):
1162         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
1163         (WebCore::HTMLMediaElement::movieTimeChanged):
1164         (WebCore::HTMLMediaElement::endedPlayback):
1165         (WebCore::HTMLMediaElement::updateMovie):
1166         * html/HTMLMediaElement.h:
1167         * html/HTMLMediaElement.idl:
1168         * platform/graphics/Movie.cpp:
1169         (WebCore::Movie::timeChanged):
1170         * platform/graphics/Movie.h:
1171         (WebCore::MovieClient::movieTimeChanged):
1172         * platform/graphics/mac/MoviePrivateQTKit.h:
1173         * platform/graphics/mac/MoviePrivateQTKit.mm:
1174         (WebCore::MoviePrivate::MoviePrivate):
1175         (WebCore::MoviePrivate::load):
1176         (WebCore::MoviePrivate::play):
1177         (WebCore::MoviePrivate::pause):
1178         (WebCore::MoviePrivate::currentTime):
1179         (WebCore::MoviePrivate::seek):
1180         (WebCore::MoviePrivate::doSeek):
1181         (WebCore::MoviePrivate::cancelSeek):
1182         (WebCore::MoviePrivate::seekTimerFired):
1183         (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
1184         (WebCore::MoviePrivate::paused):
1185         (WebCore::MoviePrivate::updateStates):
1186         (WebCore::MoviePrivate::timeChanged):
1187         (WebCore::MoviePrivate::didEnd):
1188
1189 2007-11-16  Anders Carlsson  <andersca@apple.com>
1190
1191         Reviewed by Adam.
1192
1193         <rdar://problem/5603832>
1194         XMLHttpRequest readyState 3 & responseText buffer issues.
1195
1196         * platform/network/cf/ResourceHandleCFNet.cpp:
1197         (WebCore::makeFinalRequest):
1198         Add new parameter which controls whether content sniffing should be turned off.
1199         
1200         (WebCore::ResourceHandle::loadResourceSynchronously):
1201         Always content sniff sync loads.
1202         
1203         * platform/network/cf/ResourceRequestCFNet.cpp:
1204         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1205         If the ResourceRequest already has a backing CFURLRequest, make a copy of it. This preserves
1206         any properties set on the CFURLRequest.
1207
1208 2007-11-16  Jon Honeycutt  <jhoneycutt@apple.com>
1209
1210         Reviewed by Ollie.
1211
1212         <rdar://problem/5605175> Crash closing or leaving window with ViewPoint 
1213         Media player plugin
1214
1215         ViewPoint plugin requires that we pass a valid NPSavedData* to
1216         NPP_Destroy.
1217
1218         * plugins/win/PluginViewWin.cpp: Pass a valid NPSavedData* to
1219         NPP_Destroy. If the plugin allocates data, discard it
1220
1221 2007-11-16  Mark Rowe  <mrowe@apple.com>
1222
1223         Reviewed by Tim Hatcher.
1224
1225         Build WebCore as a sub-framework of WebKit in all configurations.
1226
1227         * Configurations/WebCore.xcconfig:
1228         * WebCore.xcodeproj/project.pbxproj:
1229
1230 2007-11-16  Doug Turner  <dougt@meer.net>
1231
1232         Reviewed by Alp.
1233
1234         http://bugs.webkit.org/show_bug.cgi?id=16018
1235         build bustage when building on debian 4.0
1236
1237         Fix build bustage on GTK+ with older versions of Pango.
1238
1239         Don't cache the return value since the docs say it can change.
1240
1241         * platform/gtk/Language.cpp:
1242         (WebCore::defaultLanguage):
1243
1244 2007-11-16  Brady Eidson  <beidson@apple.com>
1245
1246         Build fix
1247
1248         * platform/SecurityOriginData.h:
1249         (WebCore::operator!=): Whoops!
1250
1251 2007-11-16  Brady Eidson  <beidson@apple.com>
1252
1253         Reviewed by Sam
1254
1255         Further purify DatabaseTracker to use SecurityOriginData instead of "a String"
1256
1257         * WebCore.base.exp:
1258         * WebCore.xcodeproj/project.pbxproj:
1259         * WebCore.vcproj/WebCore.vcproj
1260         * WebCore.pro
1261
1262         * platform/SecurityOriginData.cpp: Added.
1263         (WebCore::SecurityOriginData::SecurityOriginData): Add a constructor that takes a "stringIdentifier"-style string,
1264           since that form is what will be stored in the Databases.db on disk
1265         (WebCore::SecurityOriginData::stringIdentifier):
1266         * platform/SecurityOriginData.h:
1267         (WebCore::SecurityOriginData::protocol):
1268         (WebCore::SecurityOriginData::host):
1269         (WebCore::SecurityOriginData::port):
1270
1271         * storage/DatabaseTracker.cpp:
1272         (WebCore::SecurityOriginDataHash::hash): Follow the pattern Darin set in FontCache.cpp to make a decent hash for 
1273           a SecurityOriginData object
1274         (WebCore::SecurityOriginDataHash::equal):
1275         (WebCore::SecurityOriginDataTraits::deletedValue): "file::1" will never exist in normal operation
1276         (WebCore::SecurityOriginDataTraits::emptyValue): "file::2" will never exist in normal operation
1277         (WebCore::DatabaseTracker::fullPathForDatabase):
1278         (WebCore::DatabaseTracker::populateOrigins):
1279         (WebCore::DatabaseTracker::origins):
1280         (WebCore::DatabaseTracker::addDatabase):
1281         * storage/DatabaseTracker.h:
1282
1283 2007-11-16  Alexey Proskuryakov  <ap@webkit.org>
1284
1285         Windows build fix.
1286
1287         * WebCore.vcproj/WebCore.vcproj: Removed VoidCallback.cpp, added JSCustomVoidCallback.{h,cpp}.
1288
1289 2007-11-16  Nikolas Zimmermann  <zimmermann@kde.org>
1290
1291         Reviewed by Eric.
1292
1293         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12290
1294
1295         Implement all SVGTextContentElement DOM methods.
1296         This is the last missing SVG text feature. SVG fonts is next.
1297
1298         Added testcase: svg/custom/text-dom-01-f.svg (tests all new methods)
1299
1300         * ksvg2/svg/SVGTextContentElement.cpp:
1301         (WebCore::cummulatedCharacterRangeLength):
1302         (WebCore::SVGInlineTextBoxQueryWalker::):
1303         (WebCore::SVGInlineTextBoxQueryWalker::SVGInlineTextBoxQueryWalker):
1304         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback):
1305         (WebCore::SVGInlineTextBoxQueryWalker::setQueryInputParameters):
1306         (WebCore::SVGInlineTextBoxQueryWalker::longResult):
1307         (WebCore::SVGInlineTextBoxQueryWalker::floatResult):
1308         (WebCore::SVGInlineTextBoxQueryWalker::pointResult):
1309         (WebCore::SVGInlineTextBoxQueryWalker::rectResult):
1310         (WebCore::SVGInlineTextBoxQueryWalker::stopProcessing):
1311         (WebCore::findInlineTextBoxInTextChunks):
1312         (WebCore::rootInlineBoxForTextContentElement):
1313         (WebCore::executeTextQuery):
1314         (WebCore::SVGTextContentElement::getNumberOfChars):
1315         (WebCore::SVGTextContentElement::getComputedTextLength):
1316         (WebCore::SVGTextContentElement::getSubStringLength):
1317         (WebCore::SVGTextContentElement::getStartPositionOfChar):
1318         (WebCore::SVGTextContentElement::getEndPositionOfChar):
1319         (WebCore::SVGTextContentElement::getExtentOfChar):
1320         (WebCore::SVGTextContentElement::getRotationOfChar):
1321         (WebCore::SVGTextContentElement::getCharNumAtPosition):
1322         (WebCore::SVGTextContentElement::selectSubString):
1323         * ksvg2/svg/SVGTextContentElement.h:
1324         * rendering/SVGInlineTextBox.h:
1325
1326 2007-11-15  Adele Peterson  <adele@apple.com>
1327
1328         Reviewed by Oliver.
1329
1330         Fix for <rdar://problem/5566652> CrashTracer: [USER] 3 crashes in Safari at HTMLSelectElement::menuListDefaultEventHandler (reproducible on mactc30.com)
1331
1332         Test: fast/forms/menulist-no-renderer-onmousedown.html
1333
1334         * html/HTMLSelectElement.cpp:
1335         (WebCore::HTMLSelectElement::defaultEventHandler): Nil check the renderer here.  None of the default behavior makes sense if there's no renderer.
1336         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Moved the nil check to the main defaultEventHandler.
1337
1338 2007-11-15  Antti Koivisto  <antti@apple.com>
1339
1340         Reviewed by Adele.
1341
1342         Fix <rdar://problem/5601598>
1343         The movie tag should do initialization on need and not during startup.
1344         
1345         Initialize Movie MIME type hash on demand
1346
1347         * platform/MIMETypeRegistry.cpp:
1348         (WebCore::initialiseSupportedMovieMIMETypes):
1349         (WebCore::initialiseMIMETypeRegistry):
1350         (WebCore::MIMETypeRegistry::isSupportedMovieMIMEType):
1351         (WebCore::MIMETypeRegistry::getSupportedMovieMIMETypes):
1352
1353 2007-11-15  Mark Rowe  <mrowe@apple.com>
1354
1355         Build fix for Qt on Windows.
1356
1357         * xml/XPathStep.cpp:
1358         (WebCore::XPath::Step::nodesInAxis):
1359
1360 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1361
1362         Reviewed by Mark Rowe.
1363
1364         Bug 14761: Web Inspector leaks JS objects and DOM nodes
1365         http://bugs.webkit.org/show_bug.cgi?id=14761
1366
1367         * page/InspectorController.cpp:
1368         (WebCore::InspectorController::~InspectorController):
1369         Change the tear down order so that inspectorDestroyed() is called before
1370         InspectorController private data is set to Zero. The inspectorDestroyed()
1371         call ends up closing the WebView and triggering InspectorController::close()
1372         which unprotects m_scriptObject. This didn't happen when the private data
1373         was cleared before calling inspectorDestroyed().
1374
1375 2007-11-15  Mark Rowe  <mrowe@apple.com>
1376
1377         Gtk build fix.
1378
1379         * WebCore.pro:
1380
1381 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
1382
1383         Reviewed by Darin.
1384
1385         http://bugs.webkit.org/show_bug.cgi?id=15989
1386         XPath queries with predicates incorrectly retains the current node across unions
1387
1388         Test: fast/xpath/union-context-node.xhtml
1389
1390         * xml/XPathPath.cpp:
1391         (WebCore::XPath::LocationPath::evaluate): Restore context after evaluation.
1392         * xml/XPathStep.cpp:
1393         (WebCore::XPath::Step::evaluate): Do not backup context, as we can easily re-create it.
1394
1395 2007-11-15  Alexey Proskuryakov  <ap@webkit.org>
1396
1397         Reviewed by Darin.
1398
1399         http://bugs.webkit.org/show_bug.cgi?id=15988
1400         REGRESSION: XPath preceding-axis query misses nested elements
1401
1402         Test: fast/xpath/preceding-axis.xhtml
1403
1404         * xml/XPathStep.cpp:
1405         (WebCore::XPath::Step::nodesInAxis): Hopefully correct this time.
1406
1407 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1408
1409         Reviewed by Mark Rowe and Sam.
1410
1411         This corrects a couple of issues in the Web Inspector where selected search results
1412         would not have the right text color when the window is inactive or the results are focused.
1413
1414         * page/inspector/inspector.css:
1415
1416 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1417
1418         Reviewed by Sam.
1419
1420         Bug 16007: REGRESSION: Disclosure triangle click zone for resource categories is off by 10 pixels
1421         http://bugs.webkit.org/show_bug.cgi?id=16007
1422
1423         Makes the click width an option on TreeElement and make ResourceCategoryTreeElement
1424         a true subclass of TreeElement. The click width for ResourceCategoryTreeElement is 
1425         20 pixels, and the default is 10 pixels.
1426
1427         * page/inspector/ResourceCategory.js:
1428         * page/inspector/treeoutline.js:
1429
1430 2007-11-15  Anders Carlsson  <andersca@apple.com>
1431
1432         Reviewed by Brady.
1433
1434         Pass a VoidCallback to Database::transaction and Database::changeVersion.
1435         This is not yet hooked up to the database machinery.
1436         
1437         * WebCore.vcproj/WebCore.vcproj:
1438         * bindings/js/JSDatabaseCustom.cpp:
1439         (WebCore::JSDatabase::changeVersion):
1440         (WebCore::JSDatabase::transaction):
1441         * storage/Database.cpp:
1442         (WebCore::Database::changeVersion):
1443         (WebCore::Database::transaction):
1444         * storage/Database.h:
1445
1446 2007-11-15  Timothy Hatcher  <timothy@apple.com>
1447
1448         Reviewed by Adam.
1449
1450         Bug 16005: Hovering in the breadcrumbs causes jumpy behavior
1451         http://bugs.webkit.org/show_bug.cgi?id=16005
1452
1453         Hovering over cumbs no longer exposes new crumbs. Clicking on a collapsed
1454         crumb will expose as many hidden crumbs as possible to the user. Also crumbs
1455         that have ID attributes will compact to the ID over the tag name.
1456
1457         * page/inspector/DocumentPanel.js:
1458
1459 2007-11-15  Anders Carlsson  <andersca@apple.com>
1460
1461         Reviewed by Sam.
1462
1463         Make the VoidCallback DOM interface behave more like our other DOM interfaces.
1464         
1465         * bindings/js/JSCustomVoidCallback.h: Added.
1466         * bindings/js/JSCustomVoidCallback.cpp: Added.
1467         (WebCore::JSCustomVoidCallback::JSCustomVoidCallback):
1468         (WebCore::JSCustomVoidCallback::handleEvent):
1469         VoidCallback implementation that wraps a JS object.
1470         
1471         (WebCore::toVoidCallback):
1472         New method that creates a VoidCallback implementation given a JS object.
1473         
1474         * bindings/scripts/CodeGeneratorJS.pm:
1475         Specify that VoidCallback can fail conversion and add a custom conversion function.
1476         
1477         * html/HTMLMediaElement.cpp:
1478         (WebCore::HTMLMediaElement::movieCuePointReached):
1479         Call handleEvent on the callback.
1480         
1481         (WebCore::HTMLMediaElement::removeCuePoint):
1482         Comment out parts of this method, it has already been removed in the HTML5 spec and it relies
1483         on overriding VoidCallback equality.
1484         
1485         * html/VoidCallback.cpp: Removed.
1486         
1487         * html/VoidCallback.h:
1488         (WebCore::VoidCallback::VoidCallback):
1489         (WebCore::VoidCallback::~VoidCallback):
1490         Make this an abstract class with a pure virtual handleEvent method.
1491         
1492 2007-11-15  Adam Roben  <aroben@apple.com>
1493
1494         Fix <rdar://5485108> Type-select while a <select> menu is open doesn't work
1495
1496         There were two things broken here:
1497            - WebView now requires a WM_CHAR message to be sent before it will
1498              create a keyboard event with a charCode, but we were only sending
1499              a WM_KEYDOWN event.
1500            - The popup menu was not updating its focused index when the
1501              <select> element's selectedIndex changed.
1502
1503         Reviewed by Adele.
1504
1505         * platform/win/PopupMenuWin.cpp:
1506         (WebCore::PopupMenu::updateFromElement): Update the focused index from
1507         the client's selected index.
1508         (WebCore::PopupWndProc): When we receive a WM_CHAR message for a
1509         printable character, manufacture a WM_KEYDOWN message for it and post
1510         both that and the current WM_CHAR message to the WebView.
1511
1512 2007-11-15  Brady Eidson  <beidson@apple.com>
1513
1514         Build fix
1515
1516         * storage/DatabaseTracker.cpp:
1517         (WebCore::DatabaseTracker::fullPathForDatabase):
1518         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1519
1520 2007-11-15  Brady Eidson  <beidson@apple.com>
1521
1522         Reviewed by John and Sam
1523
1524         Stubbing out everything required for a WebKit API for databases
1525
1526         Biggest change in WebCore is that we passed around SecurityOriginData as the representation
1527         of a SecurityOrigin, instead of a String or a SecurityOrigin itself (which is an opaque object
1528         that has a different purpose besides just hanging on to the data)
1529
1530         * WebCore.base.exp:
1531         * WebCore.xcodeproj/project.pbxproj:
1532
1533         * platform/SecurityOrigin.cpp:
1534         * platform/SecurityOrigin.h:
1535         * platform/SecurityOriginData.h: Added.  Simple object to encapsulate the 3
1536           pieces of data in the SecurityOrigin tuple
1537         (WebCore::SecurityOriginData::SecurityOriginData):
1538         (WebCore::SecurityOriginData::protocol):
1539         (WebCore::SecurityOriginData::host):
1540         (WebCore::SecurityOriginData::port):
1541         (WebCore::SecurityOriginData::toString): Simple concatenation of the 3 components,
1542           colon separated
1543
1544         * storage/Database.cpp:
1545         (WebCore::Database::Database): Use SecurityOriginData instead
1546
1547         * storage/DatabaseTracker.cpp:
1548         (WebCore::DatabaseTracker::fullPathForDatabase):
1549         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1550         (WebCore::DatabaseTracker::deleteDatabasesWithOrigin):
1551         (WebCore::DatabaseTracker::deleteDatabase):
1552         * storage/DatabaseTracker.h:
1553
1554         * storage/DatabaseTrackerClient.h: Added.  For dispatching notifications up to WebKit
1555         (WebCore::DatabaseTrackerClient::~DatabaseTrackerClient):2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
1556
1557 2007-11-15  Jon Honeycutt  <jhoneycutt@apple.com>
1558
1559         Reviewed by Anders.
1560
1561         NP_ASFILEONLY streams should not buffer data in m_deliveryData.
1562
1563         * plugins/win/PluginStreamWin.cpp:
1564         (WebCore::PluginStreamWin::didReceiveData):
1565
1566 2007-11-15  Justin Garcia  <justin.garcia@apple.com>
1567
1568         Reviewed by Adele Peterson.
1569
1570         <rdar://problem/5497643> Crash at Node::isDescendantOf when switching out of Edit HTML Source mode
1571         
1572         A textarea that contained the selection was removed but the selection wasn't cleared,
1573         and we'd crash in code that assumed a valid, in-document selection.
1574
1575         * editing/SelectionController.cpp:
1576         (WebCore::removingNodeRemovesPosition): Clear the selection if the node being removed is the
1577         shadowAncestorNode of the node that contains the position, not just if the node being removed
1578         contains that shadowAncestorNode.
1579
1580 2007-11-15  Nikolas Zimmermann  <zimmermann@kde.org>
1581
1582         Reviewed by Maciej.
1583
1584         Fix logic error: calculateGlyphBoundaries takes RTL text into account itself, no need to adjust offsets before.
1585
1586         * rendering/SVGInlineTextBox.cpp:
1587         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
1588         (WebCore::SVGInlineTextBoxSelectionRectWalker::chunkPortionCallback):
1589
1590 2007-11-15  Anders Carlsson  <andersca@apple.com>
1591
1592         Reviewed by Brady.
1593
1594         <rdar://problem/5562470>
1595         openDatabase does not work when the version string is empty
1596
1597         If the string is empty, pass a real empty string to sqlite3_bind_text16.
1598         
1599         * platform/sql/SQLiteStatement.cpp:
1600         (WebCore::SQLiteStatement::bindText):
1601
1602 2007-11-15  Anders Carlsson  <andersca@apple.com>
1603
1604         Reviewed by Brady.
1605
1606         Get rid of SQLiteStatement::bindText and rename bindText16 to bindText.
1607         Remove the copy parameter from bindText and bindBlob and always copy passed in data instead.
1608
1609         * loader/icon/IconDatabase.cpp:
1610         (WebCore::IconDatabase::setIconIDForPageURLInSQLDatabase):
1611         (WebCore::IconDatabase::removePageURLFromSQLDatabase):
1612         (WebCore::IconDatabase::getIconIDForIconURLFromSQLDatabase):
1613         (WebCore::IconDatabase::addIconURLToSQLDatabase):
1614         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
1615         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase):
1616         * platform/sql/SQLiteStatement.cpp:
1617         (WebCore::SQLiteStatement::prepare):
1618         * platform/sql/SQLiteStatement.h:
1619         * storage/Database.cpp:
1620         (WebCore::setTextValueInDatabase):
1621         * storage/DatabaseTracker.cpp:
1622         (WebCore::DatabaseTracker::fullPathForDatabase):
1623         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1624         (WebCore::DatabaseTracker::addDatabase):
1625
1626 2007-11-14  Brady Eidson <beidson@apple.com>
1627
1628         Rubberstamped by Sam
1629
1630         * platform/SecurityOrigin.h: Lets make this an unsigned short and *not* rule out half the possible ports?
1631
1632 2007-11-14  Alexey Proskuryakov  <ap@webkit.org>
1633
1634         Reviewed by Justin Garcia.
1635
1636         http://bugs.webkit.org/show_bug.cgi?id=15781
1637         REGRESSION: Ligatures fail to form when typing in Devanagari (because WebKit can't handle
1638         a marked range that covers half of a composed character sequence)
1639
1640         Test: platform/mac/editing/input/devanagari-ligature.html
1641
1642         This fix is somewhat of a hack, as it asks editing commands to work with invalid selections.
1643         However, this is not entirely new for them, as Roman accents are typed in a similar manner.
1644
1645         In the future, we probably want to make commands work with ranges (or Positions explicitly).
1646
1647         * editing/Editor.cpp:
1648         (WebCore::Editor::selectComposition): Force selection to composition range.
1649         * editing/InsertTextCommand.cpp:
1650         (WebCore::InsertTextCommand::input): Force ending selection to inserted text range.
1651
1652 2007-11-14  Beth Dakin  <bdakin@apple.com>
1653
1654         Reviewed by Hyatt.
1655
1656         Fix for <rdar://problem/5540855> REGRESSION: Combination of client-
1657         side image map and <a> tag is not working properly (15522)
1658
1659         * html/HTMLMapElement.cpp:
1660         (WebCore::HTMLMapElement::checkDTD): Allow <map> to have both block 
1661         and inline children rather than just block children. This matches 
1662         Firefox. 
1663
1664 2007-11-14  Justin Garcia  <justin.garcia@apple.com>
1665
1666         Reviewed by Alexey Proskuryakov.
1667
1668         <rdar://problem/5546763> CrashTracer: [USER] 362 crashes at WebCore::DeleteSelectionCommand::mergeParagraphs
1669
1670         * editing/DeleteSelectionCommand.cpp:
1671         (WebCore::DeleteSelectionCommand::handleGeneralDelete): 
1672         Removed an irrelevant FIXME.
1673         (WebCore::DeleteSelectionCommand::mergeParagraphs): If the block that contained the end of the selection
1674         hasn't been removed but has been emptied by deletion, we would to try and fail to create a VisiblePosition
1675         inside that block, which could lead to a crash.  If that happens, there's no content in the block to move,
1676         so just remove the block and return.
1677         Preserve m_needPlaceholder during the call to moveParagraphs, since it may change it and since it does
1678         its own placeholder insertion when necessary.
1679         (WebCore::DeleteSelectionCommand::doApply): No need to check m_needPlaceholder before calling mergeParagraphs,
1680         because it handles preserving m_needPlaceholder when it calls moveParagraphs.
1681         
1682 2007-11-14  Timothy Hatcher  <timothy@apple.com>
1683
1684         Reviewed by Adam.
1685
1686         Bug 14380: Long DOM ancestry breadcrumb lists get cut off
1687         http://bugs.webkit.org/show_bug.cgi?id=14380
1688
1689         The breadcumbs will now be compacted and collapsed if there isn't enough room
1690         to show everything. The collapsing algorithm always affects the crumbs that
1691         are farthest away from the selected or hovered crumb first.
1692
1693         * page/inspector/DocumentPanel.js:
1694         * page/inspector/inspector.css:
1695
1696 2007-11-14  Anders Carlsson  <andersca@apple.com>
1697
1698         Use the correct include path.
1699         
1700         * platform/Cursor.h:
1701         * plugins/win/PluginPackageWin.h:
1702         * plugins/win/PluginStreamWin.h:
1703
1704 2007-11-13  Brady Eidson  <beidson@apple.com>
1705
1706         Reviewed by Adam
1707
1708         http://bugs.webkit.org/show_bug.cgi?id=15976 - ASSERT/crash when SQLTransactionCallback throws an exception
1709
1710         * storage/SQLTransaction.cpp:
1711         (WebCore::SQLTransaction::deliverTransactionCallback): Make a transaction error for the case where the 
1712           SQLTransactionCallback fails
1713         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Don't assert on the error callback, but null check it
1714           and make the commit/rollback decision accordingly
1715
1716 2007-11-13  Oliver Hunt  <oliver@apple.com>
1717
1718         Reviewed by Anders.
1719
1720         <rdar://problem/5365030> calling dataWithPDFInsideRect on an SVG with a gradient crashes (14780)
1721
1722         When drawing directly to PDF CG may delay the use of the gradient function until outside our
1723         standard drawing path, which in turn could let us invalidate the caches before they were used.
1724
1725         To work around this we now store the cached stops in a RefCounted object, so that we can ensure
1726         that cache exists as long as required.
1727         
1728         * platform/graphics/svg/SVGPaintServerGradient.cpp:
1729         (WebCore::SVGPaintServerGradient::SVGPaintServerGradient):
1730         * platform/graphics/svg/SVGPaintServerGradient.h:
1731         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
1732         (WebCore::cgGradientCallback):
1733         (WebCore::CGShadingRefForLinearGradient):
1734         (WebCore::CGShadingRefForRadialGradient):
1735         (WebCore::SVGPaintServerGradient::updateQuartzGradientStopsCache):
1736
1737 2007-11-13  Anders Carlsson  <andersca@apple.com>
1738
1739         Fix Windows build.
1740         
1741         * platform/Cursor.h:
1742         * plugins/win/PluginPackageWin.h:
1743         * plugins/win/PluginStreamWin.h:
1744
1745 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
1746
1747         Reviewed by Anders Carlsson.
1748
1749         Renamed Shared to RefCounted.
1750
1751         * ForwardingHeaders/wtf/RefCounted.h: Copied from WebCore/ForwardingHeaders/wtf/Shared.h.
1752         * ForwardingHeaders/wtf/Shared.h: Removed.
1753         * bindings/js/JSSVGPODTypeWrapper.h:
1754         * css/CSSFontFace.h:
1755         * css/CSSRuleList.h:
1756         * css/Counter.h:
1757         * css/Pair.h:
1758         * css/Rect.h:
1759         * css/StyleBase.h:
1760         * css/StyleSheetList.h:
1761         * dom/Attribute.h:
1762         * dom/Clipboard.h:
1763         * dom/DOMImplementation.h:
1764         * dom/Event.h:
1765         * dom/EventListener.h:
1766         * dom/NamedNodeMap.h:
1767         * dom/NodeFilter.h:
1768         * dom/NodeFilterCondition.h:
1769         * dom/NodeList.h:
1770         * dom/QualifiedName.h:
1771         * dom/Range.h:
1772         * dom/RangeException.h:
1773         * dom/RegisteredEventListener.h:
1774         * dom/Traversal.h:
1775         * editing/EditCommand.h:
1776         * history/BackForwardList.h:
1777         * history/CachedPage.h:
1778         * history/HistoryItem.cpp:
1779         (WebCore::HistoryItem::HistoryItem):
1780         * history/HistoryItem.h:
1781         * html/CanvasGradient.h:
1782         * html/CanvasPattern.h:
1783         * html/CanvasRenderingContext2D.h:
1784         * html/CanvasStyle.h:
1785         * html/HTMLCollection.h:
1786         * html/MediaError.h:
1787         * html/TimeRanges.h:
1788         * html/VoidCallback.h:
1789         * ksvg2/css/SVGRenderStyle.cpp:
1790         (WebCore::SVGRenderStyle::SVGRenderStyle):
1791         * ksvg2/css/SVGRenderStyle.h:
1792         * ksvg2/css/SVGRenderStyleDefs.cpp:
1793         (StyleFillData::StyleFillData):
1794         (StyleStrokeData::StyleStrokeData):
1795         (StyleStopData::StyleStopData):
1796         (StyleTextData::StyleTextData):
1797         (StyleClipData::StyleClipData):
1798         (StyleMaskData::StyleMaskData):
1799         (StyleMarkerData::StyleMarkerData):
1800         (StyleMiscData::StyleMiscData):
1801         * ksvg2/css/SVGRenderStyleDefs.h:
1802         * ksvg2/svg/SVGAngle.cpp:
1803         (WebCore::SVGAngle::SVGAngle):
1804         * ksvg2/svg/SVGAngle.h:
1805         * ksvg2/svg/SVGAnimatedTemplate.h:
1806         * ksvg2/svg/SVGElementInstanceList.h:
1807         * ksvg2/svg/SVGException.h:
1808         * ksvg2/svg/SVGList.h:
1809         * ksvg2/svg/SVGPathSeg.h:
1810         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
1811         (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):
1812         * ksvg2/svg/SVGPreserveAspectRatio.h:
1813         * ksvg2/svg/SVGRenderingIntent.h:
1814         * ksvg2/svg/SVGTransform.h:
1815         * ksvg2/svg/SVGUnitTypes.h:
1816         * loader/DocumentLoader.h:
1817         * loader/FormState.h:
1818         * loader/ResourceLoader.h:
1819         * loader/TextResourceDecoder.h:
1820         * loader/icon/IconRecord.h:
1821         * page/BarInfo.h:
1822         * page/Console.h:
1823         * page/DOMSelection.h:
1824         * page/DOMWindow.h:
1825         * page/Frame.h:
1826         * page/History.h:
1827         * page/InspectorController.cpp:
1828         * page/Plugin.h:
1829         * page/Screen.h:
1830         * platform/ArrayImpl.h:
1831         * platform/CString.h:
1832         * platform/Cursor.h:
1833         * platform/DeprecatedValueListImpl.cpp:
1834         (WebCore::DeprecatedValueListImpl::Private::Private):
1835         * platform/FileChooser.h:
1836         * platform/FontFallbackList.h:
1837         * platform/FontFamily.cpp:
1838         (WebCore::FontFamily::FontFamily):
1839         * platform/FontFamily.h:
1840         * platform/FontSelector.h:
1841         * platform/GlyphPageTreeNode.h:
1842         * platform/PopupMenu.h:
1843         * platform/RegularExpression.cpp:
1844         * platform/ScrollBar.h:
1845         * platform/SharedBuffer.h:
1846         * platform/StringImpl.h:
1847         * platform/graphics/Icon.h:
1848         * platform/graphics/svg/SVGResource.h:
1849         * platform/network/FormData.cpp:
1850         (WebCore::FormData::FormData):
1851         * platform/network/FormData.h:
1852         * platform/network/ResourceHandle.h:
1853         * platform/network/ResourceHandleClient.h:
1854         * rendering/RenderStyle.cpp:
1855         (WebCore::StyleSurroundData::StyleSurroundData):
1856         (WebCore::StyleBoxData::StyleBoxData):
1857         (WebCore::StyleVisualData::StyleVisualData):
1858         (WebCore::StyleBackgroundData::StyleBackgroundData):
1859         (WebCore::StyleMarqueeData::StyleMarqueeData):
1860         (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
1861         (WebCore::StyleMultiColData::StyleMultiColData):
1862         (WebCore::StyleTransformData::StyleTransformData):
1863         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1864         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1865         (WebCore::StyleInheritedData::StyleInheritedData):
1866         * rendering/RenderStyle.h:
1867         * rendering/SVGCharacterLayoutInfo.h:
1868         (WebCore::SVGCharOnPath::SVGCharOnPath):
1869         * storage/SQLResultSetRowList.h:
1870         * xml/DOMParser.h:
1871         * xml/XMLHttpRequest.h:
1872         * xml/XMLSerializer.h:
1873         * xml/XPathEvaluator.h:
1874         * xml/XPathExpression.h:
1875         * xml/XPathNSResolver.h:
1876         * xml/XPathResult.h:
1877         * xml/XPathValue.h:
1878         * xml/XSLTProcessor.h:
1879
1880 2007-11-13  Brady Eidson  <beidson@apple.com>
1881
1882         Reviewed by Mark Rowe
1883
1884         Remove errantly added files, and fix the idl (for reference's sake)
1885
1886         * storage/JSCustomSQLStatementCallback.h: Removed.
1887         * storage/JSCustomSQLStatementErrorCallback.h: Removed.
1888         * storage/JSCustomSQLTransactionCallback.h: Removed.
1889         * storage/JSCustomSQLTransactionErrorCallback.h: Removed.
1890         * storage/SQLStatementCallback.idl:
1891
1892 2007-11-13  Adam Roben  <aroben@apple.com>
1893
1894         Fix a bug and improve upon Brady's fix
1895
1896         Reviewed by Anders.
1897
1898         * bindings/js/JSSQLTransactionCustom.cpp:
1899         (WebCore::JSSQLTransaction::executeSql): Made the code a little
1900         clearer and more correct.
1901         * loader/icon/IconDatabase.cpp: Put parentheses around the expansion
1902         of IS_ICON_SYNC_THREAD() so that ASSERT_NOT_SYNC_THREAD() does the
1903         comparison it meant to.
1904
1905 2007-11-13  Sam Weinig  <sam@webkit.org>
1906
1907         Fix Qt and Gtk builds.
1908
1909         * WebCore.pro: Remove non-generated idl files.
1910
1911 2007-11-13  Mark Rowe  <mrowe@apple.com>
1912
1913         Remove removed file from the project.
1914
1915         * WebCore.pro:
1916
1917 2007-11-13  Brady Eidson  <beidson@apple.com>
1918
1919         Release build fix
1920
1921         * bindings/js/JSSQLTransactionCustom.cpp:
1922         (WebCore::JSSQLTransaction::executeSql):
1923
1924 2007-11-13  Adam Roben  <aroben@apple.com>
1925
1926         Add WindowMessageBroadcaster
1927
1928         This class is used to listen in on messages sent to HWNDs. Multiple
1929         WindowMessageListeners can be notified about messages sent to a single
1930         HWND, and one WindowMessageListener can listen to messages from
1931         multiple HWNDs.
1932
1933         Reviewed by Ada.
1934
1935         * WebCore.vcproj/WebCore.vcproj: Added new files to project.
1936         * platform/win/WindowMessageBroadcaster.cpp: Added.
1937         (WebCore::instancesMap): Static helper.
1938         (WebCore::WindowMessageBroadcaster::addListener): Registers a listener
1939         for a particular HWND.
1940         (WebCore::WindowMessageBroadcaster::removeListener): Removes a
1941         listener for a particular HWND.
1942         (WebCore::WindowMessageBroadcaster::WindowMessageBroadcaster):
1943         (WebCore::WindowMessageBroadcaster::~WindowMessageBroadcaster):
1944         (WebCore::WindowMessageBroadcaster::destroy): Removes this broadcaster
1945         from the instancesMap, removes all of its listeners, unsubclasses the
1946         window, and deletes the broadcaster.
1947         (WebCore::WindowMessageBroadcaster::unsubclassWindow): Unsubclasses
1948         the window (which means that SubclassedWndProc won't be called again
1949         for this window).
1950         (WebCore::WindowMessageBroadcaster::SubclassedWndProc): Notifies all
1951         the listeners about every message sent to the HWND
1952         * platform/win/WindowMessageBroadcaster.h: Added.
1953         (WebCore::WindowMessageBroadcaster::listeners):
1954         (WebCore::WindowMessageBroadcaster::originalWndProc):
1955         * platform/win/WindowMessageListener.h: Added.
1956
1957 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
1958
1959         Reviewed by Sam Weinig.
1960
1961         Moved Shared.h into wtf so it could be used in more places. Retained 
1962         TreeShared, but moved it to its own file, TreeShared.h.
1963
1964         * ForwardingHeaders/wtf/Shared.h: Added.
1965         * WebCore.xcodeproj/project.pbxproj:
1966         * bindings/js/JSSVGPODTypeWrapper.h:
1967         * css/CSSFontFace.h:
1968         * css/CSSRuleList.h:
1969         * css/Counter.h:
1970         * css/Pair.h:
1971         * css/Rect.h:
1972         * css/StyleBase.h:
1973         * css/StyleSheetList.h:
1974         * dom/Clipboard.h:
1975         * dom/DOMImplementation.h:
1976         * dom/Event.h:
1977         * dom/EventListener.h:
1978         * dom/NamedNodeMap.h:
1979         * dom/NodeFilterCondition.h:
1980         * dom/NodeList.h:
1981         * dom/Range.h:
1982         * dom/RangeException.h:
1983         * dom/RegisteredEventListener.h:
1984         * dom/Traversal.h:
1985         * history/BackForwardList.h:
1986         * history/CachedPage.h:
1987         * history/HistoryItem.h:
1988         * html/CanvasGradient.h:
1989         * html/CanvasPattern.h:
1990         * html/HTMLCollection.h:
1991         * html/MediaError.h:
1992         * html/TimeRanges.h:
1993         * html/VoidCallback.h:
1994         * ksvg2/css/SVGRenderStyleDefs.h:
1995         * ksvg2/svg/SVGAnimatedTemplate.h:
1996         * ksvg2/svg/SVGElementInstanceList.h:
1997         * ksvg2/svg/SVGList.h:
1998         * ksvg2/svg/SVGPathSeg.h:
1999         * ksvg2/svg/SVGPreserveAspectRatio.h:
2000         * ksvg2/svg/SVGRenderingIntent.h:
2001         * ksvg2/svg/SVGTransform.h:
2002         * ksvg2/svg/SVGUnitTypes.h:
2003         * loader/DocumentLoader.h:
2004         * loader/FormState.h:
2005         * loader/ResourceLoader.h:
2006         * loader/TextResourceDecoder.h:
2007         * loader/icon/IconRecord.h:
2008         * page/BarInfo.h:
2009         * page/Console.h:
2010         * page/DOMSelection.h:
2011         * page/DOMWindow.h:
2012         * page/History.h:
2013         * page/InspectorController.cpp:
2014         * page/Plugin.h:
2015         * page/Screen.h:
2016         * platform/ArrayImpl.h:
2017         * platform/CString.h:
2018         * platform/DeprecatedValueListImpl.cpp:
2019         * platform/FontFallbackList.h:
2020         * platform/FontFamily.h:
2021         * platform/FontSelector.h:
2022         * platform/GlyphPageTreeNode.h:
2023         * platform/PopupMenu.h:
2024         * platform/RegularExpression.cpp:
2025         * platform/ScrollBar.h:
2026         * platform/Shared.h: Removed.
2027         * platform/SharedBuffer.h:
2028         * platform/StringImpl.h:
2029         * platform/graphics/Icon.h:
2030         * platform/graphics/svg/SVGResource.h:
2031         * platform/network/FormData.h:
2032         * platform/network/ResourceHandleClient.h:
2033         * rendering/RenderStyle.h:
2034         * rendering/SVGCharacterLayoutInfo.h:
2035         * storage/SQLResultSetRowList.h:
2036         * xml/DOMParser.h:
2037         * xml/XMLSerializer.h:
2038         * xml/XPathEvaluator.h:
2039         * xml/XPathExpression.h:
2040         * xml/XPathNSResolver.h:
2041         * xml/XPathResult.h:
2042
2043 2007-11-13  Brady Eidson  <beidson@apple.com>
2044
2045         JS bindings by Anders, reviewed by Brady
2046         WebCore changes by Brady, reviewed by Anders and Tim
2047
2048         Adapt to the new iteration of the HTML5 client-side storage spec.
2049
2050         Based largely on implementation feedback we generated in landing our first version of this API and also
2051         on the input of others in the community, the database spec went through a large overhaul that addresses
2052         many concerns.  Amongst other changes/improvements:
2053         - SQLTransaction object is added and all transactions are explicit.  In addition, since the API manages
2054           transactions explicitly, transaction-related language in SQL statements is disallowed
2055         - executeSql() is now on a transaction object instead of the database object.
2056         - Database.changeVersion() now takes place within the context of a transaction.  Therefore the version 
2057           change can be atomic along with the statements that modify the DB schema
2058
2059         Most of the logic now takes place during the "transaction steps," which the specification clearly lays out
2060         as a chain of events on the SQLTransaction object where processing is handed off between being processed 
2061         asynchronously and calling back up to javascript.  To accomplish this voodoo, SQLTransaction has a series of 
2062         methods that roughly match up with the "transaction steps" and it keeps a pointer to the next step.
2063
2064         * DerivedSources.make:
2065         * WebCore.xcodeproj/project.pbxproj:
2066
2067         * bindings/js/JSDatabaseCustom.cpp:
2068         (WebCore::JSDatabase::changeVersion): Adapt to the new API
2069         (WebCore::JSDatabase::transaction): Added
2070
2071         * bindings/js/JSSQLTransactionCustom.cpp: Added.
2072         (WebCore::JSSQLTransaction::executeSql): Added
2073
2074         * page/DOMWindow.cpp:
2075         (WebCore::DOMWindow::openDatabase): Add the new arguments
2076         * page/DOMWindow.h:
2077         * page/DOMWindow.idl:
2078
2079         * page/inspector/DatabasePanel.js: Use the new API
2080
2081         * storage/ChangeVersionWrapper.cpp: Added.  Implementation of "SQLTransactionWrapper" that enforces
2082           changing the version of the database
2083         (WebCore::ChangeVersionWrapper::ChangeVersionWrapper):
2084         (WebCore::ChangeVersionWrapper::performPreflight):
2085         (WebCore::ChangeVersionWrapper::performPostflight):
2086         * storage/ChangeVersionWrapper.h: Added.
2087         (WebCore::ChangeVersionWrapper::sqlError):
2088
2089         * storage/Database.cpp: Removed the "main thread" and "background thread" sqlite handles as all sqlite operations can now
2090           happen solely on the background thread - most of these changes result from that change
2091         (WebCore::Database::Database): Removed an obsolete FIXME
2092         (WebCore::Database::openAndVerifyVersion): 
2093         (WebCore::Database::getVersionFromDatabase):
2094         (WebCore::Database::setVersionInDatabase):
2095         (WebCore::Database::versionMatchesExpected): Atomically guarantee that the current version and expected version are the same
2096         (WebCore::Database::performOpenAndVerify):
2097         (WebCore::Database::performTransactionStep): Added, as a hook for the DatabaseTransactionTask on the DatabaseThread
2098         (WebCore::Database::changeVersion): Changed for the new API from JS
2099         (WebCore::Database::transaction): Added, for the new API from JS
2100         (WebCore::Database::scheduleTransaction): Add a transaction to this Database's transaction queue
2101         (WebCore::Database::scheduleTransactionStep): Schedule the current transaction to be called on the background thread
2102         (WebCore::Database::scheduleTransactionCallback): Schedule the current transaction to perform a callback on the main thread
2103         (WebCore::Database::performGetTableNames):
2104         (WebCore::Database::deliverAllPendingCallbacks):
2105         (WebCore::Database::deliverPendingCallback):
2106         (WebCore::Database::setExpectedVersion):
2107         * storage/Database.h: 
2108         * storage/Database.idl:
2109
2110         * storage/DatabaseTask.cpp:  Changed DatabaseTask to create a mutex on demand, and use the existence of that mutex
2111           to replace the m_synchronous flag
2112         (WebCore::DatabaseTask::performTask):
2113         (WebCore::DatabaseTask::lockForSynchronousScheduling):
2114         (WebCore::DatabaseTask::waitForSynchronousCompletion):
2115         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
2116         * storage/DatabaseTask.h:
2117
2118         * storage/SQLError.h: New API object
2119
2120         * storage/SQLResultSet.cpp:
2121         (WebCore::SQLResultSet::SQLResultSet): Small changes to the API object
2122         * storage/SQLResultSet.h:
2123         * storage/SQLResultSet.idl:
2124
2125         * storage/SQLStatement.cpp: Added.
2126         (WebCore::SQLStatement::SQLStatement):
2127         (WebCore::SQLStatement::execute): Actually execute the sql statement on the SQLiteDatabase if it's still valid
2128         (WebCore::SQLStatement::setVersionMismatchedError): Flag this statement as bad before it even starts in case
2129           of an actual version vs. expected version mismatch
2130         (WebCore::SQLStatement::performCallback): Call the right callback (SQLStatement or SQLStatementError) for this statement
2131         * storage/SQLStatement.h: Added.
2132         (WebCore::SQLStatement::hasStatementCallback):
2133         (WebCore::SQLStatement::hasStatementErrorCallback):
2134         (WebCore::SQLStatement::sqlError): Get the error for this statement, if any
2135
2136         * storage/SQLTransaction.cpp: Added.
2137         (WebCore::SQLTransaction::SQLTransaction):
2138         (WebCore::SQLTransaction::executeSQL): Entry point for the API from JS
2139         (WebCore::SQLTransaction::enqueueStatement): Add a new statement onto the queue
2140         (WebCore::SQLTransaction::performNextStep): Call the method for the next step
2141         (WebCore::SQLTransaction::performPendingCallback): Call the method for the pending callback
2142         (WebCore::SQLTransaction::openTransactionAndPreflight): Open a transaction to the database and preflight 
2143           using the SQLTransactionWrapper, if any
2144         (WebCore::SQLTransaction::deliverTransactionCallback): Deliver the transaction callback to the javascript thread
2145         (WebCore::SQLTransaction::scheduleToRunStatements): Convinience to schedule this transaction on the database thread 
2146           and make runStatements() the next step
2147         (WebCore::SQLTransaction::runStatements): Start running the sql statements queued up for this transaction 
2148         (WebCore::SQLTransaction::getNextStatement): Bring the next statement off the queue
2149         (WebCore::SQLTransaction::runCurrentStatement): Execute the current statement
2150         (WebCore::SQLTransaction::deliverStatementCallback): Deliver the SQLStatementCallback for this statement
2151         (WebCore::SQLTransaction::postflightAndCommit): Postflight the transaction using SQLTransactionWrapper and commit it
2152         (WebCore::SQLTransaction::handleTransactionError): Make the right call for any error that occurred on the Transaction
2153         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Deliver the SQLTransactionErrorCallback
2154         (WebCore::SQLTransaction::cleanupAfterTransactionErrorCallback): Either do a final commit or rollback to cleanup the
2155           transaction after it error'ed out
2156         * storage/SQLTransaction.h:
2157         (WebCore::SQLTransactionWrapper::~SQLTransactionWrapper): 
2158         (WebCore::SQLTransaction::database):
2159         * storage/SQLTransaction.idl:
2160
2161         The following were made obsolete by the new version of the API:
2162         * bindings/js/JSCustomSQLCallback.cpp: Removed.
2163         * bindings/js/JSCustomSQLCallback.h: Removed.
2164         * bindings/js/JSCustomVersionChangeCallback.cpp: Removed.
2165         * bindings/js/JSCustomVersionChangeCallback.h: Removed.
2166         * storage/DatabaseCallback.cpp: Removed.
2167         * storage/DatabaseCallback.h: Removed.
2168         * storage/SQLCallback.h: Removed.
2169         * storage/SQLCallback.idl: Removed.
2170         * storage/VersionChangeCallback.h: Removed.
2171         * storage/VersionChangeCallback.idl: Removed.
2172
2173 2007-11-13  Dan Bernstein  <mitz@apple.com>
2174
2175         Reviewed by Beth Dakin.
2176
2177         - fix <rdar://problem/5551163> REGRESSION: Cursor does not change to arrow on "X" button in google maps, making it hard to click
2178
2179         * css/html4.css: Added a 'cursor: auto' rule for links.
2180         * manual-tests/link-cursor-auto.html: Added.
2181
2182 2007-11-13  Dan Bernstein  <mitz@apple.com>
2183
2184         Reviewed by Beth Dakin.
2185
2186         - fix <rdar://problem/5516272> Reproducible crash in RenderObject::setStyle involving going Back from a non-HTML document (Bookmarks view, PDF view)
2187
2188         The root cause for the crash is that when a non-HTML view enters the
2189         frame, the frame's document pointer keeps pointing at the last HTML-type
2190         document it contained. This patch does not address the root cause, but
2191         makes changes to account for that condition.
2192
2193         * loader/FrameLoader.cpp:
2194         (WebCore::FrameLoader::receivedMainResourceError): Do not change the
2195         frame's current document's page cache state here.
2196         (WebCore::FrameLoader::invalidateCurrentItemCachedPage): If the frame's
2197         current document is in fact the history item being invalidated, then
2198         set its page cache state here.
2199
2200 2007-11-12  Antti Koivisto  <antti@apple.com>
2201
2202         Reviewed by Adele.
2203
2204         Fix that 'timeupdate' and 'waiting' events were never dispatched.
2205         
2206         Add explicit m_paused attribute instead of trying to derive paused state from
2207         underlying media. Call updatePlayState() to start/stop media playback
2208         when any attribute that affects active playback state changes. This matches 
2209         specification text.
2210         
2211         Test: http/tests/media/video-play-stall.html
2212
2213         * html/HTMLMediaElement.cpp:
2214         (WebCore::HTMLMediaElement::HTMLMediaElement):
2215         (WebCore::HTMLMediaElement::setReadyState):
2216         (WebCore::HTMLMediaElement::paused):
2217         (WebCore::HTMLMediaElement::play):
2218         (WebCore::HTMLMediaElement::pause):
2219         (WebCore::HTMLMediaElement::checkIfSeekNeeded):
2220         (WebCore::HTMLMediaElement::movieDidEnd):
2221         (WebCore::HTMLMediaElement::updatePlayState):
2222         * html/HTMLMediaElement.h:
2223
2224 2007-11-13  John Sullivan  <sullivan@apple.com>
2225
2226         Reviewed by Darin.
2227
2228         removed recently-added PreferredType concept; we found a better way to do what
2229         ths was accomplishing
2230
2231         * bridge/WindowFeatures.h:
2232         (WebCore::WindowFeatures::WindowFeatures):
2233         removed definition of PreferredType
2234                         
2235         * page/ContextMenuController.cpp:
2236         (WebCore::openNewWindow):
2237         removed use of PreferredType
2238
2239 2007-11-12  Alexey Proskuryakov  <ap@webkit.org>
2240
2241         Reviewed by Darin.
2242
2243         http://bugs.webkit.org/show_bug.cgi?id=15954
2244         Move DOM Selection operations out of SelectionController
2245
2246         No change in functionality.
2247
2248         * editing/SelectionController.cpp:
2249         (WebCore::SelectionController::setSelectedRange):
2250         * editing/SelectionController.h:
2251         * page/DOMSelection.cpp:
2252         (WebCore::DOMSelection::anchorNode):
2253         (WebCore::DOMSelection::baseNode):
2254         (WebCore::DOMSelection::anchorOffset):
2255         (WebCore::DOMSelection::baseOffset):
2256         (WebCore::DOMSelection::focusNode):
2257         (WebCore::DOMSelection::extentNode):
2258         (WebCore::DOMSelection::focusOffset):
2259         (WebCore::DOMSelection::extentOffset):
2260         (WebCore::DOMSelection::isCollapsed):
2261         (WebCore::DOMSelection::type):
2262         (WebCore::DOMSelection::rangeCount):
2263         (WebCore::DOMSelection::collapse):
2264         (WebCore::DOMSelection::collapseToEnd):
2265         (WebCore::DOMSelection::collapseToStart):
2266         (WebCore::DOMSelection::empty):
2267         (WebCore::DOMSelection::setBaseAndExtent):
2268         (WebCore::DOMSelection::setPosition):
2269         (WebCore::DOMSelection::modify):
2270         (WebCore::DOMSelection::extend):
2271         (WebCore::DOMSelection::getRangeAt):
2272         (WebCore::DOMSelection::removeAllRanges):
2273         (WebCore::DOMSelection::addRange):
2274         (WebCore::DOMSelection::deleteFromDocument):
2275         (WebCore::DOMSelection::containsNode):
2276         (WebCore::DOMSelection::selectAllChildren):
2277         (WebCore::DOMSelection::toString):
2278         * page/DOMSelection.h:
2279         Moved all DOM API methods to DOMSelection; changed SelectionController::setSelectedRange()
2280         to return its result directly instead of via an ExceptionCode that no caller wanted.
2281
2282         * editing/Editor.cpp:
2283         (WebCore::Editor::deleteRange):
2284         (WebCore::Editor::removeFormattingAndStyle):
2285         (WebCore::Editor::selectComposition):
2286         (WebCore::Editor::setComposition):
2287         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
2288         Adapted for SelectionController::setSelectedRange() now returning a bool.
2289         SelectionController::toString() is no longer avasilable, use plainText() explicitly.
2290
2291         * WebCore.base.exp: Changed SelectionController::setSelectedRange() signature.
2292
2293 2007-11-12  Dan Bernstein  <mitz@apple.com>
2294
2295         Reviewed by Darin Adler.
2296
2297         - <http://bugs.webkit.org/show_bug.cgi?id=15890>
2298           Most of www.aol.com still redraws unnecessarily when headline/photo section changes
2299
2300         Test: fast/repaint/invisible-objects.html
2301
2302         Avoid repainting invisible blocks if they are enclosed in a layer that
2303         contains no visible objects.
2304
2305         * rendering/RenderBlock.cpp:
2306         (WebCore::RenderBlock::layoutBlock):
2307         * rendering/RenderBox.cpp:
2308         (WebCore::RenderBox::absoluteClippedOverflowRect):
2309
2310 2007-11-12  Timothy Hatcher  <timothy@apple.com>
2311
2312         Reviewed by Mark Rowe.
2313
2314         Prevent selecting a word in the breadcrumb or the styles section when double
2315         clicking on a DOM node in the outline tree.
2316
2317         * page/inspector/DocumentPanel.js: Call preventDefault() when a mousedown event
2318           with a detail of 2 or higher comes in. This prevents the selection.
2319         * page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
2320
2321 2007-11-12  Oliver Hunt  <oliver@apple.com>
2322
2323         Reviewed by John S.
2324
2325         <rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)
2326         
2327         EventHandler needs to reset these fields when a drag terminates, otherwise
2328         EventHandler is left in an inconsistent state when a drag is initiated on a
2329         page with multiple frames.
2330
2331         * page/EventHandler.cpp:
2332         (WebCore::EventHandler::cancelDragAndDrop):
2333         (WebCore::EventHandler::performDragAndDrop):
2334         (WebCore::EventHandler::clearDragState):
2335         * page/EventHandler.h:
2336
2337 2007-11-12  Oliver Hunt  <oliver@apple.com>
2338
2339         Reviewed by Darin and Antti.
2340
2341         Return behaviour for 0 sized pattern back to what it was prior to r27704
2342
2343         This change in behaviour broke two layout tests in DRT, so correcting it
2344         corrects existing tests.
2345
2346         * platform/graphics/cg/ImageBufferCG.cpp:
2347
2348 2007-11-12  Timothy Hatcher  <timothy@apple.com>
2349
2350         Reviewed by John.
2351
2352         <rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]
2353
2354         * page/mac/WebCoreFrameBridge.mm:
2355         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
2356         If the SharedBuffer is null insert an empty NSData instead of nil.
2357
2358 2007-11-12  Darin Adler  <darin@apple.com>
2359
2360         Reviewed by Tim.
2361
2362         - http://bugs.webkit.org/show_bug.cgi?id=15947
2363           speed up page loading a bit by inlining
2364
2365         * loader/FrameLoader.cpp: (WebCore::FrameLoader::isLocationChange):
2366         Factored out the slow case of isScheduledLocationChangePending into this.
2367
2368         * loader/FrameLoader.h:
2369         (WebCore::FrameLoader::isScheduledLocationChangePending): Added an
2370         inline check of the far and away most common case, where m_scheduledRedirection
2371         is 0; the rest is in the isLocationChange function.
2372
2373 2007-11-12  George Staikos  <staikos@kde.org>
2374
2375         Reviewed by Tim.
2376
2377         Extract the text match marker highlight color into RenderTheme instead
2378         of the hardcoded yellow.
2379
2380         * rendering/InlineTextBox.cpp:
2381         (WebCore::InlineTextBox::paintTextMatchMarker):
2382         * rendering/RenderTheme.cpp:
2383         (WebCore::RenderTheme::platformTextSearchHighlightColor):
2384         * rendering/RenderTheme.h:
2385
2386 2007-11-12  Mark Rowe  <mrowe@apple.com>
2387
2388         Fix deadlock on launch on the Mac.
2389
2390         * loader/icon/IconDatabase.cpp:
2391         (WebCore::IconDatabase::open): Restore unlock that was mistakenly removed in r27717.
2392
2393 2007-11-12  Justin Haygood  <jhaygood@reaktix.com>
2394
2395         Reviewed by Brady.
2396
2397         http://bugs.webkit.org/show_bug.cgi?id=15955
2398         Reimplement threading functions in IconDatabase and SQLiteDatabase in terms of the threading abstractions
2399
2400         * loader/icon/IconDatabase.cpp:
2401         (WebCore::IconDatabase::open):
2402         (WebCore::IconDatabase::close):
2403         * loader/icon/IconDatabase.h:
2404         * platform/sql/SQLiteDatabase.cpp:
2405         (WebCore::SQLiteDatabase::SQLiteDatabase):
2406         (WebCore::SQLiteDatabase::open):
2407         (WebCore::SQLiteDatabase::close):
2408         * platform/sql/SQLiteDatabase.h:
2409
2410 2007-11-12  Adam Roben  <aroben@apple.com>
2411
2412         Windows build fix
2413
2414         * config.h: Touch because VS apparently can't figure out which files
2415         depend on ResourceResponse.h.
2416         * WebCore.vcproj/WebCore.vcproj: Add ResourceResponseBase files to
2417         project and remove old ResourceResponse files.
2418
2419 2007-11-12  Julien Chaffraix  <julien.chaffraix@gmail.com>
2420
2421         Reviewed by Darin.
2422
2423         http://bugs.webkit.org/show_bug.cgi?id=15334
2424         Split ResourceResponse into platform specific files
2425
2426         * WebCore.base.exp:
2427         * WebCore.pro:
2428         * WebCore.vcproj/WebCore.vcproj:
2429         * WebCore.xcodeproj/project.pbxproj:
2430         * platform/network/ResourceResponse.cpp: Removed.
2431         * platform/network/ResourceResponse.h: Removed.
2432         * platform/network/ResourceResponseBase.cpp: Copied from platform/network/ResourceResponse.cpp.
2433         (WebCore::ResourceResponseBase::asResourceResponse):
2434         (WebCore::ResourceResponseBase::isHTTP):
2435         (WebCore::ResourceResponseBase::url):
2436         (WebCore::ResourceResponseBase::setUrl):
2437         (WebCore::ResourceResponseBase::mimeType):
2438         (WebCore::ResourceResponseBase::setMimeType):
2439         (WebCore::ResourceResponseBase::expectedContentLength):
2440         (WebCore::ResourceResponseBase::setExpectedContentLength):
2441         (WebCore::ResourceResponseBase::textEncodingName):
2442         (WebCore::ResourceResponseBase::setTextEncodingName):
2443         (WebCore::ResourceResponseBase::suggestedFilename):
2444         (WebCore::ResourceResponseBase::setSuggestedFilename):
2445         (WebCore::ResourceResponseBase::httpStatusCode):
2446         (WebCore::ResourceResponseBase::setHTTPStatusCode):
2447         (WebCore::ResourceResponseBase::httpStatusText):
2448         (WebCore::ResourceResponseBase::setHTTPStatusText):
2449         (WebCore::ResourceResponseBase::httpHeaderField):
2450         (WebCore::ResourceResponseBase::setHTTPHeaderField):
2451         (WebCore::ResourceResponseBase::httpHeaderFields):
2452         (WebCore::ResourceResponseBase::isAttachment):
2453         (WebCore::ResourceResponseBase::setExpirationDate):
2454         (WebCore::ResourceResponseBase::expirationDate):
2455         (WebCore::ResourceResponseBase::setLastModifiedDate):
2456         (WebCore::ResourceResponseBase::lastModifiedDate):
2457         (WebCore::ResourceResponseBase::updateResourceResponse):
2458         * platform/network/ResourceResponseBase.h: Copied from platform/network/ResourceResponse.h.
2459         (WebCore::ResourceResponseBase::ResourceResponseBase):
2460         * platform/network/cf/ResourceResponse.h: Added.
2461         (WebCore::ResourceResponse::ResourceResponse):
2462         * platform/network/curl/ResourceResponse.h: Added.
2463         (WebCore::ResourceResponse::ResourceResponse):
2464         (WebCore::ResourceResponse::doUpdateResourceResponse):
2465         * platform/network/mac/ResourceResponse.h: Added.
2466         (WebCore::ResourceResponse::ResourceResponse):
2467         * platform/network/qt/ResourceResponse.h: Added.
2468         (WebCore::ResourceResponse::ResourceResponse):
2469         (WebCore::ResourceResponse::doUpdateResourceResponse):
2470
2471 2007-11-11  Justin Haygood  <jhaygood@reaktix.com>
2472
2473         Reviewed by Adam Roben.
2474
2475         http://bugs.webkit.org/show_bug.cgi?id=15939
2476         Adds a currentThread API for use by SQLiteDatabase, etc.
2477
2478         * platform/Threading.h:
2479         * platform/ThreadingNone.cpp:
2480         (WebCore::currentThread):
2481         * platform/gtk/ThreadingGtk.cpp:
2482         (WebCore::identifierByGthreadHandle):
2483         (WebCore::):
2484         * platform/pthreads/ThreadingPthreads.cpp:
2485         (WebCore::identifierByPthreadHandle):
2486         (WebCore::currentThread):
2487
2488 2007-11-11  Dan Bernstein  <mitz@apple.com>
2489
2490         Reviewed by Adam Roben.
2491
2492         - fix http://bugs.webkit.org/show_bug.cgi?id=15942
2493           REGRESSION: Selecting "Edit Html" tab in Blogger causes crash (Assertion failed: isRange())
2494
2495         Test: editing/selection/cleared-by-relayout.html
2496
2497         * editing/Selection.cpp:
2498         (WebCore::Selection::toRange): Check if the selection has been cleared
2499         by updating layout.
2500
2501 2007-11-11  Darin Adler  <darin@apple.com>
2502
2503         Reviewed by Mark Rowe.
2504
2505         - fix line numbers that were off since my recent patch
2506
2507         * platform/SegmentedString.h:
2508         (WebCore::SegmentedSubstring::SegmentedSubstring): Reversed the sense of m_excludeLineNumbers
2509         and rename it to m_doNotExcludeLineNumbers.
2510         (WebCore::SegmentedSubstring::excludeLineNumbers): Updated.
2511         (WebCore::SegmentedSubstring::doNotExcludeLineNumbers): Added.
2512         (WebCore::SegmentedSubstring::setExcludeLineNumbers): Updated.
2513         (WebCore::SegmentedString::advance): Use doNotExcludeLineNumbers to reverse the sense and fix
2514         the regression, but keep the speediness. I accidentally had removed a ! here.
2515
2516         * platform/SegmentedString.cpp:
2517         (WebCore::SegmentedString::advanceSlowCase): Use doNotExcludeLineNumbers.
2518
2519 2007-11-11  Oliver Hunt  <oliver@apple.com>
2520
2521         Reviewed by Darin.
2522
2523         Fix for <rdar://problem/5585334> numfuzz: integer overflows opening
2524         malformed SVG file in WebCore::ImageBuffer::create. Add protection
2525         against a potential overflow.
2526
2527         * platform/graphics/cg/ImageBufferCG.cpp:
2528
2529 2007-11-11  Antti Koivisto  <antti@apple.com>
2530
2531         Reviewed by Darin.
2532
2533         Fix a bunch of cases where the exception code is checked by the function but is not zeroed first.
2534
2535         * bindings/js/kjs_binding.cpp:
2536         (KJS::setDOMException):
2537         * dom/Attr.cpp:
2538         (WebCore::Attr::setPrefix):
2539         * dom/Document.cpp:
2540         (WebCore::Document::createElement):
2541         * dom/Element.cpp:
2542         (WebCore::Element::setPrefix):
2543         * dom/Range.cpp:
2544         (WebCore::Range::setStart):
2545         (WebCore::Range::setEnd):
2546         (WebCore::Range::isPointInRange):
2547         (WebCore::Range::comparePoint):
2548         (WebCore::Range::compareBoundaryPoints):
2549         (WebCore::Range::deleteContents):
2550         (WebCore::Range::processContents):
2551         (WebCore::Range::extractContents):
2552         (WebCore::Range::insertNode):
2553         (WebCore::Range::setStartAfter):
2554         (WebCore::Range::setEndBefore):
2555         (WebCore::Range::setEndAfter):
2556         (WebCore::Range::selectNode):
2557         (WebCore::Range::surroundContents):
2558         (WebCore::Range::setStartBefore):
2559         * editing/TextIterator.cpp:
2560         (WebCore::TextIterator::TextIterator):
2561         * html/CanvasRenderingContext2D.cpp:
2562         (WebCore::CanvasRenderingContext2D::createPattern):
2563         * html/HTMLMediaElement.cpp:
2564         (WebCore::HTMLMediaElement::play):
2565         (WebCore::HTMLMediaElement::pause):
2566         * html/HTMLSelectElement.cpp:
2567         (WebCore::HTMLSelectElement::add):
2568         (WebCore::HTMLSelectElement::setOption):
2569         * xml/XPathEvaluator.cpp:
2570         (WebCore::XPathEvaluator::evaluate):
2571
2572 2007-11-11  Darin Adler  <darin@apple.com>
2573
2574         Reviewed by Mitz.
2575
2576         - http://bugs.webkit.org/show_bug.cgi?id=15945
2577           speed up GraphicsContextCG typical case by skipping roundToDevicePixels
2578
2579         * platform/graphics/cg/GraphicsContextCG.cpp:
2580         (WebCore::GraphicsContext::restorePlatformState): Clear the flag since we no
2581         longer know if the transform is identity or not.
2582         (WebCore::GraphicsContext::strokeArc): Removed an extra set of redundant
2583         CGContextSave/RestoreGState.
2584         (WebCore::GraphicsContext::beginTransparencyLayer): Clear the flag since we no
2585         longer know if the transform is identity or not.
2586         (WebCore::GraphicsContext::endTransparencyLayer): Ditto.
2587         (WebCore::GraphicsContext::scale): Ditto.
2588         (WebCore::GraphicsContext::rotate): Ditto.
2589         (WebCore::GraphicsContext::translate): Ditto.
2590         (WebCore::GraphicsContext::concatCTM): Ditto.
2591         (WebCore::GraphicsContext::roundToDevicePixels): Return quickly if the transform
2592         is known to be identity, and record that fact when we discover it otherwise.
2593
2594         * platform/graphics/cg/GraphicsContextPlatformPrivate.h:
2595         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2596         Added a m_userToDeviceTransformKnownToBeIdentity flag, initialized to false.
2597
2598 2007-11-11  Darin Adler  <darin@apple.com>
2599
2600         Reviewed by Mitz.
2601
2602         - http://bugs.webkit.org/show_bug.cgi?id=15944
2603           streamline SegmentedString to speed up parsing
2604
2605         I measured a speed-up of the page load test while developing this patch. I don't
2606         have a precise figure, though.
2607
2608         * html/HTMLTokenizer.h: Removed unneeded lineNumberPtr() function. Also renamed
2609         lineno to m_lineNumber.
2610         * html/HTMLTokenizer.cpp:
2611         (WebCore::HTMLTokenizer::processListing): Don't pass 0 to the advance function
2612         since we don't want to update a line number.
2613         (WebCore::HTMLTokenizer::parseSpecial): Ditto.
2614         (WebCore::HTMLTokenizer::parseComment): Pass the line number data member directly
2615         instead of lineNumberPtr() since the advance function now takes a reference.
2616         (WebCore::HTMLTokenizer::parseServer): Ditto.
2617         (WebCore::HTMLTokenizer::parseProcessingInstruction): Ditto.
2618         (WebCore::HTMLTokenizer::parseText): Ditto.
2619         (WebCore::HTMLTokenizer::parseEntity): Ditto.
2620         (WebCore::HTMLTokenizer::parseTag): Ditto.
2621         (WebCore::HTMLTokenizer::write): Ditto.
2622
2623         * loader/FTPDirectoryDocument.cpp: (WebCore::FTPDirectoryTokenizer::write):
2624         * loader/TextDocument.cpp: (WebCore::TextTokenizer::write):
2625         Don't pass 0 to the advance function.
2626
2627         * platform/SegmentedString.h: (WebCore::SegmentedString::advance): Streamlined
2628         the most common case, and pushed less common cases into a separate function
2629         that is not inlined. Also got rid of a branch by separating the case with a
2630         line number from the case without one.
2631
2632         * platform/SegmentedString.cpp: (WebCore::SegmentedString::advanceSlowCase):
2633         Added. The aforementioned less common cases are here.
2634
2635 2007-11-11  Antti Koivisto  <antti@apple.com>
2636
2637         Forgot to do this review change (and test HTTP commit).
2638
2639         * html/HTMLMediaElement.cpp:
2640         (WebCore::HTMLMediaElement::play):
2641
2642 2007-11-11  Antti Koivisto  <antti@apple.com>
2643
2644         Reviewed by Darin.
2645         
2646         - Update play() and pause() to match current HTML5 draft
2647             - send events asynchronously
2648             - add timeupdate event to pause
2649             - rethrow load() exception, not others
2650         - Use list for async events to get ordering right
2651
2652         Tests: media/video-pause-empty-events.html
2653                media/video-play-empty-events.html
2654                media/video-play-pause-events.html
2655                media/video-play-pause-exception.html
2656
2657         * html/HTMLMediaElement.cpp:
2658         (WebCore::HTMLMediaElement::dispatchEventAsync): 
2659         (WebCore::HTMLMediaElement::asyncEventTimerFired):
2660         (WebCore::HTMLMediaElement::play):
2661         (WebCore::HTMLMediaElement::pause):
2662         * html/HTMLMediaElement.h:
2663
2664 2007-11-11  Nikolas Zimmermann  <zimmermann@kde.org>
2665
2666         Reviewed by Eric.
2667
2668         Fixes: http://bugs.webkit.org/show_bug.cgi?id=6424 (<text>, <tspan> dominant-baseline attribute is not respected)
2669
2670         Add (basic) support for dominant-baseline / alignment-baseline text properties.
2671         Note: there are no official testcases, and no-one implemented it before. Only ASV3
2672               supported dominant-baseline, but not correct it seems.
2673
2674         * rendering/SVGRootInlineBox.cpp:
2675         (WebCore::dominantBaselineToShift):
2676         (WebCore::alignmentBaselineToShift):
2677         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2678
2679 2007-11-11  Adam Roben  <aroben@apple.com>
2680
2681         Add wrappers around CoCreateInstance to COMPtr
2682
2683         I followed the example of the Query constructor and query method by
2684         adding a Create constructor and create method.
2685
2686         Reviewed by Darin.
2687
2688         * platform/win/COMPtr.h:
2689         (COMPtr::COMPtr): Added a new constructor that calls
2690         CoCreateInstance.
2691         (COMPtr::create): Added.
2692         (COMPtr::createInstance): Added.
2693
2694 2007-11-11  Alexey Proskuryakov  <ap@nypop.com>
2695
2696         Reviewed by Darin.
2697
2698         http://bugs.webkit.org/show_bug.cgi?id=15896
2699         More editing cleanup
2700
2701         No functionality changes.
2702
2703         * dom/Node.h: Moved several editing-related methods elsewhere.
2704         * dom/Node.cpp: (WebCore::Node::maxCharacterOffset): Renamed from maxOffset()
2705         to highlight that it is a match to offsetInCharacters(), and much different from other
2706         offset-related methods. Added ASSERT_NOT_REACHED(), as callers are supposed to check
2707         offsetInCharacters() before calling this.
2708
2709         * dom/CharacterData.cpp: (WebCore::CharacterData::maxCharacterOffset):
2710         * dom/CharacterData.h: (WebCore::CharacterData::isCharacterDataNode):
2711         Updated for above renamings.
2712
2713         * dom/Comment.{h,cpp}: Removed an override for offsetInCharacters(), which is already present in CharacterData.
2714
2715         * dom/Document.{h,cpp}: Folded updateSelection() into Frame::selectionLayoutChanged().
2716
2717         * dom/Position.h:
2718         * dom/Position.cpp:
2719         (WebCore::Position::uncheckedPreviousOffset): Moved from Node::previousOffset().
2720         (WebCore::Position::uncheckedNextOffset): Moved from Node::NextOffset().
2721         (WebCore::Position::previous): Adapted to the above move.
2722         (WebCore::Position::next): Ditto.
2723         (WebCore::Position::upstream): Removed an isBR() check, since a non-BR element cannot have a BR renderer (I think),
2724         and BR elements are covered by editingIgnoresContent().
2725         (WebCore::Position::downstream): Ditto.
2726         (WebCore::caretMaxRenderedOffset): Moved from Node::caretMaxRenderedOffset().
2727         (WebCore::Position::rendersInDifferentPosition): Updated for the above moves.
2728
2729         * dom/PositionIterator.h: Added a comment describing this class from the original check-in.
2730         * dom/PositionIterator.cpp:
2731         (WebCore::PositionIterator::increment): Updated for the above moves.
2732         (WebCore::PositionIterator::decrement): Ditto.
2733
2734         * dom/ProcessingInstruction.h:
2735         * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::maxCharacterOffset):
2736         ProcessingInstruction was already returning true from offsetInCharacters(), but didn't override maxCharacterOffset().
2737         I think that implementing it has no actual effect, as PIs are not rendered, but it looks cleaner this way.
2738
2739         * dom/Range.cpp:
2740         (WebCore::Range::selectNodeContents):
2741         * editing/ApplyStyleCommand.cpp:
2742         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2743         (WebCore::ApplyStyleCommand::applyInlineStyle):
2744         (WebCore::maxRangeOffset):
2745         (WebCore::ApplyStyleCommand::removeInlineStyle):
2746         (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
2747         (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
2748         (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
2749         (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
2750         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2751         * editing/CompositeEditCommand.cpp:
2752         (WebCore::CompositeEditCommand::insertNodeAt):
2753         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
2754         * editing/DeleteSelectionCommand.cpp:
2755         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2756         * editing/InsertLineBreakCommand.cpp:
2757         (WebCore::InsertLineBreakCommand::doApply):
2758         * editing/InsertParagraphSeparatorCommand.cpp:
2759         (WebCore::InsertParagraphSeparatorCommand::doApply):
2760         * editing/InsertTextCommand.cpp:
2761         (WebCore::InsertTextCommand::insertTab):
2762         * editing/visible_units.cpp:
2763         (WebCore::previousLinePosition):
2764         (WebCore::nextLinePosition):
2765         Updated for the above moves.
2766
2767         * editing/Editor.cpp:
2768         (WebCore::Editor::advanceToNextMisspelling): Added a missing rangeCompliantEquivalent() call.
2769
2770         * editing/TextIterator.cpp:
2771         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Changed the condition to obviously
2772         match a maxCharacterOffset() call made after it; hopefully, this doesn't break any border cases.
2773         (WebCore::SimplifiedBackwardsTextIterator::advance): Updated for the above moves.
2774
2775         * editing/htmlediting.h:
2776         * editing/htmlediting.cpp:
2777         (WebCore::canHaveChildrenForEditing): Removed a bogus comment: I don't thin BRs have a special ability to accept
2778         child nodes, other than via DOM manipulation, which is not specific to BRs.
2779         (WebCore::rangeCompliantEquivalent): Removed a check for BR, which is already covered by editingIgnoresContent().
2780         (WebCore::maxDeepOffset): Ditto.
2781         (WebCore::caretMinOffset): Moved from Node. Changed some runtime checks that seemingly cannot fail into assertions.
2782         (WebCore::caretMaxOffset): Ditto.
2783
2784         * page/EventHandler.cpp:
2785         (WebCore::EventHandler::handleMousePressEventSingleClick): Pass 0 to VisiblePosition constructor instead of
2786         caretMinOffset. I didn't want to include htmlediting.h here, and I think that VisiblePosition constructor
2787         will take care of adjusting the offset.
2788
2789         * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Folded Document::updateSelection() here.
2790         * page/mac/WebCoreFrameBridge.mm:
2791         (-[WebCoreFrameBridge smartDeleteRangeForProposedRange:]): Added missing rangeCompliantEquivalent() calls.
2792         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForRenderer): Changed to not round-trip via editing.
2793         Changed some runtime checks that seemingly cannot fail into assertions.
2794
2795 2007-11-11  Darin Adler  <darin@apple.com>
2796
2797         Reviewed by Sam.
2798
2799         - updated for JSRegExp function changes
2800
2801         * platform/RegularExpression.cpp:
2802         (WebCore::RegularExpression::Private::compile):
2803         (WebCore::RegularExpression::match):
2804
2805 2007-11-10  Mark Rowe  <mrowe@apple.com>
2806
2807         Qt Linux build fix.
2808
2809         * platform/UnicodeRange.h:
2810
2811 2007-11-10  Mark Rowe  <mrowe@apple.com>
2812
2813         Qt Windows build fix.
2814
2815         * platform/UnicodeRange.h:
2816
2817 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
2818
2819         Reviewed by Eric.
2820
2821         Fixes: http://bugs.webkit.org/show_bug.cgi?id=15937 (Add glyph-orientation-horizontal/vertical support)
2822         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13971 (text-anchor support on vertical text seems slightly off)
2823
2824         Add glyph-orientation-* support for text & textPath. (90/180/270 and 'auto')
2825         Also fix all vertical text handling - for text & textPath! (especially latin1 characters auto orientation in vertical writing modes)
2826
2827         * WebCore.pro: Add platform/UnicodeRange.cpp to build
2828         * WebCore.xcodeproj/project.pbxproj: Dito.
2829         * rendering/SVGCharacterLayoutInfo.cpp: Respect orientationShiftX/Y & angle in characterTransform()
2830         (WebCore::SVGChar::characterTransform):
2831         * rendering/SVGCharacterLayoutInfo.h: New variables.
2832         (WebCore::SVGCharOnPath::SVGCharOnPath):
2833         (WebCore::SVGChar::SVGChar):
2834         * rendering/SVGRootInlineBox.cpp: Added glyph-orientation-* handling.
2835         (WebCore::glyphOrientationToAngle):
2836         (WebCore::glyphOrientationIsMultiplyOf180Degrees):
2837         (WebCore::calculateGlyphAdvanceAndShiftRespectingOrientation):
2838         (WebCore::cummulatedHeightOfInlineBoxCharacterRange):
2839         (WebCore::cummulatedWidthOrHeightOfTextChunk):
2840         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox):
2841
2842 2007-11-10  Timothy Hatcher  <timothy@apple.com>
2843
2844         Reviewed by Sam Weinig.
2845
2846         * page/inspector/StylesSidebarPane.js: Fix the wording of a comment
2847           and switch over to use getUniqueProperties in another place.
2848
2849 2007-11-10  John Sullivan  <sullivan@apple.com>
2850
2851         Reviewed by Sam Weinig
2852
2853         Rest of fix for 5394877
2854
2855         * bindings/js/kjs_window.cpp:
2856         (KJS::Window::isSafeScript):
2857         Don't log unsafe JavaScript attempts in the other version of isSafeScript() if in
2858         private browsing mode either.
2859
2860 2007-11-10  Nikolas Zimmermann  <zimmermann@kde.org>
2861
2862         Reviewed by Oliver.
2863
2864         Fix function name difference - header said 'unicodeRangeForCharacter', actually
2865         implemented function is 'findCharUnicodeRange'. They are not compiled yet.
2866
2867         * platform/UnicodeRange.h:
2868
2869 2007-11-10  Dan Bernstein  <mitz@apple.com>
2870
2871         Reviewed by Darin Adler.
2872
2873         - fix <rdar://problem/5450655> Control-clicking text in a link can surprisingly select only part of the link, should select entire link
2874
2875         No test because context menu events cannot be tested in DumpRenderTree.
2876
2877         * page/EventHandler.cpp:
2878         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Added.
2879         If the click occurred in an active link, selects the entire link
2880         element. Otherwise selects the closest word.
2881         (WebCore::EventHandler::sendContextMenuEvent): Call
2882         selectClosestWordOrLinkFromMouseEvent().
2883         * page/EventHandler.h:
2884
2885 2007-11-10  John Sullivan  <sullivan@apple.com>
2886
2887         Reviewed by Tim Hatcher
2888
2889         - fixed <rdar://problem/5394877> Safari should not log unsafe JavaScript attempts when 
2890           in private browsing mode (only an issue if Log JavaScript Exceptions is turned on)
2891
2892         * bindings/js/kjs_window.cpp:
2893         (KJS::Window::isSafeScript):
2894         Don't log unsafe JavaScript attempts to console or chromeClient if in private browsing mode
2895
2896 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
2897
2898         Reviewed by Darin.
2899
2900         http://bugs.webkit.org/show_bug.cgi?id=15922
2901         Implement more of Mozilla Selection API
2902
2903         Tests: editing/selection/containsNode.html
2904                editing/selection/deleteFromDocument.html
2905                editing/selection/extend.html
2906                editing/selection/selectAllChildren.html
2907
2908         * editing/SelectionController.cpp:
2909         (WebCore::SelectionController::deleteFromDocument):
2910         (WebCore::SelectionController::containsNode):
2911         (WebCore::SelectionController::selectAllChildren):
2912         (WebCore::SelectionController::extend):
2913         * editing/SelectionController.h:
2914         Added deleteFromDocument(), containsNode(), and selectAllChildren(). Reimplemented extend(),
2915         which existed, but didn't match Firefox behavior and wasn't exposed via bindings.
2916         Removed a comment mentioning removeRange(), as this method makes no sense without multiple
2917         selection range support.
2918
2919         * page/DOMSelection.cpp:
2920         (WebCore::DOMSelection::extend):
2921         (WebCore::DOMSelection::deleteFromDocument):
2922         (WebCore::DOMSelection::containsNode):
2923         (WebCore::DOMSelection::selectAllChildren):
2924         * page/DOMSelection.h:
2925         * page/DOMSelection.idl:
2926         Exposed the new methods.
2927
2928 2007-11-10  Alexey Proskuryakov  <ap@webkit.org>
2929
2930         Reviewed by Darin.
2931
2932         http://bugs.webkit.org/show_bug.cgi?id=15892
2933         DOM Range operations are not implemented for ProcessingInstruction nodes
2934
2935         Test: fast/dom/Range/range-processing-instructions.html
2936
2937         * dom/Range.cpp:
2938         (WebCore::Range::processContents): Implemented ProcessingInstruction cases.
2939         (WebCore::Range::checkNodeWOffset): Removed a FIXME - yes, I think that we are supposed
2940         to use ProcessingInstruction.data.
2941
2942 2007-11-09  Timothy Hatcher  <timothy@apple.com>
2943
2944         Reviewed by Mark Rowe.
2945
2946         Bug 12054: Ability to serialize an element subtree (into clipboard?) from the DOM inspector
2947         http://bugs.webkit.org/show_bug.cgi?id=12054
2948
2949         - Add support code for routing copy events to the focused element.
2950         - Implement copying the currently selected DOM node. The node
2951           and it's subtree is copied to the clipboard. If the node has no
2952           outerHTML, the nodeValue is copied (text nodes, etc.)
2953         - Implement copy for the resource sidebar. The URL is copied for the
2954           currently selected resource.
2955
2956         * page/inspector/DocumentPanel.js:
2957         * page/inspector/inspector.js:
2958
2959 2007-11-09  Antti Koivisto  <antti@apple.com>
2960
2961         Reviewed by Adele.
2962
2963         Fix occasional blank video with poster attribute.
2964
2965         * ChangeLog:
2966         * html/HTMLMediaElement.cpp:
2967         (WebCore::HTMLMediaElement::load):
2968         (WebCore::HTMLMediaElement::didRestoreFromCache):
2969         Just calling updateFromElement() does the right thing for both poster image and video.
2970
2971 2007-11-04  Sam Weinig  <sam@webkit.org>
2972
2973         Reviewed by Adam Roben.
2974
2975         <rdar://problem/5435940>
2976         The COM bindings for the DOM should be autogenerated like the other DOM bindings
2977
2978         Initial commit of the autogeneration of the COM DOM Bindings.  No behavior change
2979         is being introduced in this patch and to insure that no conflicts arise, a temporary
2980         prefix of "GEN_" has been used for all the new classes.
2981
2982         The build architecture for these bindings differs slightly from the other autogenerated
2983         bindings.  Instead of building in WebCore and migrating the resuting code to WebKit (as
2984         is done for the Objective-C bindigs currently), the IDLs and generation scripts are
2985         migrated to WebKit and built there.  This is done with a series of scripts and Makefiles.
2986
2987         This commit includes:
2988             - Hand rolled root class/Interface GEN_DOMObject used to facilated object creation
2989               and ref-counting.
2990             - Generating all of the Core DOM and most of HTML and CSS
2991             - Generating Event, EventTarget, and EventListener
2992
2993         * WebCore.vcproj/MigrateIDLAndScripts.make: Added.
2994         * WebCore.vcproj/WebCore.vcproj:
2995         * WebCore.vcproj/migrate-idls.sh: Added.
2996         * bindings/scripts/CodeGenerator.pm:
2997         * bindings/scripts/CodeGeneratorCOM.pm: Added.
2998         * dom/EventListener.h: Make the isWindowEvent parameter default to false
2999         to allow autogeneration based on the IDL.
3000
3001 2007-11-09  Tristan O'Tierney  <tristan@apple.com>
3002
3003         Reviewed by Timothy Hatcher.
3004         
3005         This patch is for the WebKit side of <rdar://problem/5591115>.
3006         We need a way to tell context menu navigations, such as "Open in New Window"
3007         to override any sort of browser preference for tab based navigation.
3008
3009         * bridge/WindowFeatures.h:
3010         (WebCore::WindowFeatures::WindowFeatures):
3011         Added a new struct member var, preferredType
3012         and an accompanying enum type PreferredType
3013         to send a window type recommendation up to the Chrome. 
3014         
3015         * page/ContextMenuController.cpp:
3016         (WebCore::openNewWindow):
3017         Set the window features to recommend a new Window for
3018         "Open in New Window" context menu action.
3019
3020 2007-11-08  Adam Roben  <aroben@apple.com>
3021
3022         Fix <rdar://5483519> Pressing Enter on selected buttons should fire onclick
3023
3024         We now match the behavior of Firefox and IE, which is to always just
3025         send a click event to the focused button when the Enter key is pressed
3026         (previously we were submitting forms directly in some cases).
3027
3028         Reviewed by Adele.
3029
3030         Test: fast/forms/enter-clicks-buttons.html
3031
3032         * html/HTMLButtonElement.cpp:
3033         (WebCore::HTMLButtonElement::defaultEventHandler): Don't do anything
3034         fancy when Enter is pressed on a <button type=button> -- just send a
3035         click event like we do for other button types.
3036         * html/HTMLInputElement.cpp:
3037         (WebCore::HTMLInputElement::defaultEventHandler): Treat type=button
3038         the same way we treat type=submit and type=reset: just send a click
3039         event when Enter is pressed.
3040
3041 2007-11-09  Dan Bernstein  <mitz@apple.com>
3042
3043         Reviewed by Antti Koivisto.
3044
3045         - fix a bug in invisible layer culling: dynamically changing a 
3046           descendant of an invisible layer to be visible did not work
3047
3048         Test: fast/layers/layer-content-visibility-change.html
3049
3050         * rendering/RenderLayer.cpp:
3051         (WebCore::RenderLayer::setHasVisibleContent): If we got visible content,
3052         make sure that our stacking context rebuilds its z-order lists to
3053         include us.
3054
3055 2007-11-09  David Hyatt  <hyatt@apple.com>
3056
3057         Clean up matrix() parsing.  Make sure the first four arguments can be lengths or numbers.  The last two
3058         args can be lengths or numbers or percents.
3059
3060         Reviewed by Beth
3061
3062         * WebCore.xcodeproj/project.pbxproj:
3063         * css/CSSParser.cpp:
3064         (WebCore::TransformOperationInfo::TransformOperationInfo):
3065         (WebCore::CSSParser::parseTransform):
3066         * rendering/RenderStyle.h:
3067         (WebCore::MatrixTransformOperation::apply):
3068
3069 2007-11-09  Beth Dakin  <bdakin@apple.com>
3070
3071         Reviewed by Oliver.
3072
3073         Fix for <rdar://problem/5586370> CSS Transform - incorrect matrix 
3074         math leads to crazy problems
3075
3076         Transform matrices accept the first four parameters as CSS lengths. 
3077         CSS lengths get mapped into WebCore::Lengths as percents by 
3078         WebCore::convertToLength(). Percent lengths cannot call value(). It 
3079         does not yield a correct result and it asserts on Debug builds. 
3080
3081         * rendering/RenderStyle.h:
3082         (WebCore::MatrixTransformOperation::apply): Instead of calling 
3083         value() on the lengths, call calcValue. This fixes the assert and 
3084         the bad rendering. 
3085
3086 2007-11-09  Simon Hausmann  <hausmann@kde.org>
3087
3088         Reviewed by nobody, build/link fix for Qt/Windows.
3089
3090         userIdleTime() is stubbed in win/SystemTimeWin.cpp, so don't
3091         define it twice.
3092
3093         * platform/qt/TemporaryLinkStubs.cpp:
3094
3095 2007-11-09  Simon Hausmann  <hausmann@kde.org>
3096
3097         Reviewed by Holger.
3098
3099         Fix ContextMenu allocation in the Qt port.
3100
3101         Store all items and submenus value based in ContextMenu and ContextMenuItem.
3102         That fixes the crashes when the context menu was populated with sub-menus because
3103         of the use of temporary ContextMenu objects like this:
3104
3105         ContextMenu subMenu(...);
3106         subMenu.appendItem(...);
3107         subMenu.appendItem(...);
3108
3109         subMenuItem.setSubMenu(&subMenu); // temporary pointer, need to _copy_ contents
3110
3111         * platform/ContextMenu.h:
3112         * platform/ContextMenuItem.h:
3113         * platform/PlatformMenuDescription.h:
3114         * platform/qt/ContextMenuItemQt.cpp:
3115         (WebCore::ContextMenuItem::ContextMenuItem):
3116         (WebCore::ContextMenuItem::platformSubMenu):
3117         * platform/qt/ContextMenuQt.cpp:
3118         (WebCore::ContextMenu::ContextMenu):
3119         (WebCore::ContextMenu::~ContextMenu):
3120         (WebCore::ContextMenu::appendItem):
3121         (WebCore::ContextMenu::itemCount):
3122
3123 2007-11-09  Peter Kasting  <zerodpx@gmail.com>
3124
3125         Reviewed by Mark Rowe.
3126
3127         http://bugs.webkit.org/show_bug.cgi?id=15909
3128         Malformed GIFs should not result in memory corruption.
3129
3130         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3131         (WebCore::GIFImageDecoder::haveDecodedRow):
3132
3133 2007-11-08  Timothy Hatcher  <timothy@apple.com>
3134
3135         Reviewed by Sam Weinig.
3136
3137         Some Web Inspector CSS editing changes.
3138         - Only delete the property if all the text is delete or the new user input correctly parses.
3139           This prevents deleting the existing property if the new text is invalid.
3140         - Intercept the Escape key and cancel editing, not saving any changes.
3141
3142         * page/inspector/StylesSidebarPane.js:
3143
3144 2007-11-08  Kevin Ollivier  <kevino@theolliviers.com>
3145
3146         Bakefiles for building WebCore, needed by wx port.
3147
3148         Reviewed by Mark Rowe.
3149
3150         * WebCoreSources.bkl: Added.
3151         * webcore-base.bkl: Added.
3152         * webcore-wx.bkl: Added.
3153
3154 2007-11-08  Justin Haygood  <jhaygood@reaktix.com>
3155
3156         Reviewed by Mark Rowe.
3157
3158         http://bugs.webkit.org/show_bug.cgi?id=15905
3159
3160         Fix builds with HTML 5 Storage support disabled.
3161         ENABLE(DATABASE) needs to be added in a few places.
3162
3163         * page/InspectorController.cpp:
3164         * storage/Database.h:
3165
3166 2007-11-08  Steve Falkenburg  <sfalken@apple.com>
3167
3168         <rdar://problem/5524082> Allow images to be dragged out directly into other apps
3169         
3170         We weren't including CF_HDROP in our image drops.  This broke drag of
3171         images out of the browser window directly into other apps (examples
3172         include notepad, mspaint, msword).
3173         
3174         Reviewed by Oliver, Ada.
3175
3176         * platform/win/ClipboardWin.cpp:
3177         (WebCore::createGlobalImageFileContent): Removed unused variable.
3178         (WebCore::createGlobalHDropContent): Added
3179         (WebCore::writeFileToDataObject): Write HDROP data if available.
3180         (WebCore::writeImageToDataObject): Write HDROP for dragged images.
3181         (WebCore::ClipboardWin::writeURL): Don't write HDROP for dragged URLs.
3182
3183 2007-11-08  Xan Lopez  <xan@gnome.org>
3184
3185         Reviewed by Alp.
3186
3187         http://bugs.webkit.org/show_bug.cgi?id=15908
3188         Use g_object_ref_sink when available
3189
3190         * platform/gtk/PopupMenuGtk.cpp:
3191         (WebCore::PopupMenu::show):
3192         * platform/gtk/ScrollViewGtk.cpp:
3193         (WebCore::ScrollView::setGtkAdjustments):
3194
3195 2007-11-08  Dan Bernstein  <mitz@apple.com>
3196
3197         Reviewed by Beth Dakin.
3198
3199         - fix <rdar://problem/5491922> REGRESSION (Safari 2-3): Flash-based "Cash Optimizer" on etrade.com does not draw completely
3200
3201         Test: fast/dom/length-attribute-mapping.html
3202
3203         * dom/StyledElement.cpp:
3204         (WebCore::StyledElement::addCSSLength): Changed the garbage-stripping
3205         logic to stop after the first "%" or "*" in the string. This allows for
3206         "100%25" to be mapped to "100%" like it is in Firefox and WinIE.
3207
3208 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
3209
3210         - Build fix.
3211
3212         * loader/FrameLoaderClient.h:
3213         * platform/graphics/svg/SVGImageEmptyClients.h:
3214         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
3215
3216 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
3217
3218         Reviewed by Sam.
3219
3220         - windowObjectCleared() is no longer const.  It needs to setup the
3221         script debugger and cannot be const to do so.
3222
3223         * loader/FrameLoaderClient.h:
3224         * platform/graphics/svg/SVGImageEmptyClients.h:
3225         (WebCore::SVGEmptyFrameLoaderClient::windowObjectCleared):
3226
3227 2007-11-08  Adam Roben  <aroben@apple.com>
3228
3229         Hopeful Windows build fix
3230
3231         * rendering/RenderObject.cpp: Touch this file to make it recompile.
3232
3233 2007-11-08  Sam Weinig  <sam@webkit.org>
3234
3235         Reviewed by Darin.
3236
3237         Convert JavaScript internal function objects to use one class per
3238         function.  This avoids a switch statement inside what used to be
3239         the shared function classes and will allow Shark to better analyze
3240         the code.
3241
3242         To make this switch, the value property of the HashEntry was changed
3243         to a union of an intptr_t (which is used to continue handle valueGetters)
3244         and function pointer which points to a static constructor for the
3245         individual new function objects.
3246
3247         SunSpider claims this is a 1.0% speedup.
3248
3249         - On the WebCore side, I updated CodeGeneratorJS.pm to generate the
3250           new classes and hand updated the remain non-generated (groan) classes.
3251
3252         * bindings/js/JSDOMWindowCustom.cpp:
3253         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
3254         * bindings/js/JSEventTargetNode.cpp:
3255         (WebCore::JSEventTargetNodePrototypeFunctionAddEventListener::callAsFunction):
3256         (WebCore::JSEventTargetNodePrototypeFunctionRemoveEventListener::callAsFunction):
3257         (WebCore::JSEventTargetNodePrototypeFunctionDispatchEvent::callAsFunction):
3258         * bindings/js/JSEventTargetNode.h:
3259         * bindings/js/JSHTMLInputElementBase.cpp:
3260         (WebCore::JSHTMLInputElementBaseFunctionSetSelectionRange::callAsFunction):
3261         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot):
3262         * bindings/js/JSHTMLInputElementBase.h:
3263         (WebCore::JSHTMLInputElementBase::):
3264         * bindings/js/JSXMLHttpRequest.cpp:
3265         (KJS::JSXMLHttpRequestPrototypeFunctionAbort::callAsFunction):
3266         (KJS::JSXMLHttpRequestPrototypeFunctionGetAllResponseHeaders::callAsFunction):
3267         (KJS::JSXMLHttpRequestPrototypeFunctionGetResponseHeader::callAsFunction):
3268         (KJS::JSXMLHttpRequestPrototypeFunctionOpen::callAsFunction):
3269         (KJS::JSXMLHttpRequestPrototypeFunctionSend::callAsFunction):
3270         (KJS::JSXMLHttpRequestPrototypeFunctionSetRequestHeader::callAsFunction):
3271         (KJS::JSXMLHttpRequestPrototypeFunctionOverrideMIMEType::callAsFunction):
3272         (KJS::JSXMLHttpRequestPrototypeFunctionAddEventListener::callAsFunction):
3273         (KJS::JSXMLHttpRequestPrototypeFunctionRemoveEventListener::callAsFunction):
3274         (KJS::JSXMLHttpRequestPrototypeFunctionDispatchEvent::callAsFunction):
3275         * bindings/js/JSXMLHttpRequest.h:
3276         (KJS::JSXMLHttpRequest::impl):
3277         * bindings/js/JSXSLTProcessor.cpp:
3278         (KJS::JSXSLTProcessorPrototypeFunctionImportStylesheet::callAsFunction):
3279         (KJS::JSXSLTProcessorPrototypeFunctionTransformToFragment::callAsFunction):
3280         (KJS::JSXSLTProcessorPrototypeFunctionTransformToDocument::callAsFunction):
3281         (KJS::JSXSLTProcessorPrototypeFunctionSetParameter::callAsFunction):
3282         (KJS::JSXSLTProcessorPrototypeFunctionGetParameter::callAsFunction):
3283         (KJS::JSXSLTProcessorPrototypeFunctionRemoveParameter::callAsFunction):
3284         (KJS::JSXSLTProcessorPrototypeFunctionClearParameters::callAsFunction):
3285         (KJS::JSXSLTProcessorPrototypeFunctionReset::callAsFunction):
3286         * bindings/js/JSXSLTProcessor.h:
3287         * bindings/js/kjs_events.cpp:
3288         (WebCore::JSClipboardPrototypeFunctionClearData::callAsFunction):
3289         (WebCore::JSClipboardPrototypeFunctionGetData::callAsFunction):
3290         (WebCore::JSClipboardPrototypeFunctionSetData::callAsFunction):
3291         (WebCore::JSClipboardPrototypeFunctionSetDragImage::callAsFunction):
3292         * bindings/js/kjs_events.h:
3293         * bindings/js/kjs_navigator.cpp:
3294         (KJS::Plugins::):
3295         (KJS::Navigator::getOwnPropertySlot):
3296         (KJS::Plugins::getOwnPropertySlot):
3297         (KJS::PluginsFunctionRefresh::callAsFunction):
3298         (KJS::NavigatorProtoFuncJavaEnabled::callAsFunction):
3299         * bindings/js/kjs_navigator.h:
3300         (KJS::Navigator::):
3301         * bindings/js/kjs_window.cpp:
3302         (KJS::Window::getOwnPropertySlot):
3303         (KJS::Window::put):
3304         (KJS::WindowProtoFuncAToB::callAsFunction):
3305         (KJS::WindowProtoFuncBToA::callAsFunction):
3306         (KJS::WindowProtoFuncOpen::callAsFunction):
3307         (KJS::WindowProtoFuncScrollBy::callAsFunction):
3308         (KJS::WindowProtoFuncScrollTo::callAsFunction):
3309         (KJS::WindowProtoFuncMoveBy::callAsFunction):
3310         (KJS::WindowProtoFuncMoveTo::callAsFunction):
3311         (KJS::WindowProtoFuncResizeBy::callAsFunction):
3312         (KJS::WindowProtoFuncResizeTo::callAsFunction):
3313         (KJS::WindowProtoFuncSetTimeout::callAsFunction):
3314         (KJS::WindowProtoFuncClearTimeout::callAsFunction):
3315         (KJS::WindowProtoFuncSetInterval::callAsFunction):
3316         (KJS::WindowProtoFuncAddEventListener::callAsFunction):
3317         (KJS::WindowProtoFuncRemoveEventListener::callAsFunction):
3318         (KJS::WindowProtoFuncShowModalDialog::callAsFunction):
3319         (KJS::WindowProtoFuncNotImplemented::callAsFunction):
3320         (KJS::Location::getOwnPropertySlot):
3321         (KJS::Location::put):
3322         (KJS::LocationProtoFuncReplace::callAsFunction):
3323         (KJS::LocationProtoFuncReload::callAsFunction):
3324         (KJS::LocationProtoFuncAssign::callAsFunction):
3325         (KJS::LocationProtoFuncToString::callAsFunction):
3326         * bindings/js/kjs_window.h:
3327         (KJS::Window::):
3328         * bindings/scripts/CodeGeneratorJS.pm:
3329
3330 2007-11-08  Mark Rowe  <mrowe@apple.com>
3331
3332         Fix the Gtk, Qt and Wx builds.
3333
3334         * platform/gtk/TemporaryLinkStubs.cpp:
3335         * platform/qt/TemporaryLinkStubs.cpp:
3336         * platform/wx/TemporaryLinkStubs.cpp:
3337
3338 2007-11-08  Mark Rowe  <mrowe@apple.com>
3339
3340         Not reviewed.  Fix two instances of includes using the wrong case in the filename.
3341
3342         * platform/graphics/mac/MoviePrivateQTKit.mm:
3343         * platform/wx/MimeTypeRegistryWx.cpp:
3344
3345 2007-11-08  Darin Adler  <darin@apple.com>
3346
3347         Reviewed by Adam.
3348
3349         - fix <rdar://problem/5552943> accesskey does not focus <button> elements
3350
3351         Test: fast/forms/access-key.html
3352
3353         * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::accessKeyAction):
3354         Added a call to focus.
3355
3356 2007-11-07  Darin Adler  <darin@apple.com>
3357
3358         Reviewed by Steve.
3359
3360         - cut down on notImplemented() functions on Windows
3361
3362         * bridge/AXObjectCache.h: Put #if around the accessibility
3363         global.
3364
3365         * bridge/win/FrameWin.cpp: (WebCore::Frame::setNeedsReapplyStyles):
3366         Moved here from TemporaryLinkStubs.
3367
3368         * dom/Document.cpp: (WebCore::Document::lastModified): Re-implemented
3369         using the ResourceResponse that's now available from the DocumentLoader.
3370
3371         * editing/JSEditor.cpp: (execTranspose): Changed to call transpose() on
3372         the Editor instead of the obsolete one on the Frame.
3373
3374         * loader/DocumentLoader.h: Removed getResponseModifiedHeader.
3375         * loader/FrameLoader.h: Removed overrideMediaType.
3376
3377         * loader/gtk/DocumentLoaderGtk.cpp: Removed.
3378         * loader/mac/DocumentLoaderMac.mm: Removed.
3379         * loader/qt/DocumentLoaderQt.cpp: Removed.
3380
3381         * page/Frame.cpp: Removed transpose.
3382         * page/Frame.h: Ditto.
3383         * page/FrameView.h: Removed updateBorder.
3384         * page/gtk/FrameGtk.cpp: Removed issueTransposeCommand.
3385         * page/mac/FrameMac.mm: Ditto.
3386         * page/mac/WebCoreFrameBridge.h: Removed issueTransposeCommand and
3387         overrideMediaType.
3388         * page/qt/FrameQt.cpp: Removed issueTransposeCommand.
3389
3390         * platform/gtk/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled.
3391         * platform/qt/TemporaryLinkStubs.cpp: Ditto.
3392         * platform/win/TemporaryLinkStubs.cpp: Removed or moved all but 3 of the stubs.
3393         * platform/wx/TemporaryLinkStubs.cpp: Removed gAccessibilityEnabled,
3394         issueTransposeCommand, and overrideMediaType.
3395
3396         * platform/network/cf/ResourceHandleCFNet.cpp:
3397         (WebCore::ResourceHandle::loadsBlocked): Moved here from TemporaryLinkStubs.
3398         (WebCore::ResourceHandle::willLoadFromCache): Ditto.
3399         * platform/win/GraphicsContextWin.cpp:
3400         (WebCore::GraphicsContextPlatformPrivate::clip): Ditto.
3401         * platform/win/ScrollViewWin.cpp: (WebCore::ScrollView::inWindow): Ditto.
3402         * platform/win/SystemTimeWin.cpp: (WebCore::userIdleTime): Ditto.
3403         * platform/win/WidgetWin.cpp: (WebCore::Widget::setIsSelected): Ditto.
3404
3405         * WebCore.pro: Updated for removed files.
3406         * WebCore.xcodeproj/project.pbxproj: Updated for removed file.
3407
3408 2007-11-08  Mark Rowe  <mrowe@apple.com>
3409
3410        Build fix for case-sensitive file systems.  Fix case of file names
3411        in #include's.
3412
3413         * html/HTMLMediaElement.cpp:
3414         * platform/graphics/Movie.cpp:
3415
3416 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3417
3418         Reviewed by Lars Knoll <lars@trolltech.com>.
3419
3420         Remove some warnings about not implemented methods.
3421
3422         * ResourceHandle::loadsBlocked and ResourceHandle::supportsBufferedData are
3423         specific to the NS API and won't be implemented on Qt.
3424         * ResourceHandle::bufferedData can not be reached as we return false in
3425         ResourceHandle::supportsBufferedData.
3426
3427
3428         * platform/network/qt/ResourceHandleQt.cpp:
3429         (WebCore::ResourceHandle::supportsBufferedData):
3430
3431 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3432
3433         Reviewed by Lars Knoll <lars@trolltech.com>.
3434
3435         Cleanup checking for the request method.
3436
3437         * Check the request method only in QWebNetworkManager::add.
3438         * Currently HEAD, GET, POST are allowed and for everything else
3439         QWebNetworkManager::add returns false.
3440         * Returning false is compatible with ResourceHandle::start and it
3441         can be used in ResourceHandle::loadResourceSynchronously to generate
3442         a ResourceError
3443
3444
3445         * platform/network/qt/ResourceHandleQt.cpp:
3446         (WebCore::ResourceHandle::start):
3447         (WebCore::ResourceHandle::loadResourceSynchronously):
3448
3449 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3450
3451         Reviewed by Lars Knoll <lars@trolltech.com>.
3452
3453         Implement WebCore::callOnMainThread
3454
3455         Implemented using a global QObject, that is moved to the main thread
3456         and then sending a custom event to it.
3457         Picked a number below QEvent::User but above any other documented value.
3458
3459
3460         * platform/qt/ThreadingQt.cpp:
3461         (WebCore::PerformFunctionEvent::PerformFunctionEvent):
3462         (WebCore::MainThreadInvoker::MainThreadInvoker):
3463         (WebCore::MainThreadInvoker::event):
3464         (WebCore::callOnMainThread):
3465
3466 2007-11-08  Holger Hans Peter Freyther  <holger.freyther@trolltech.com>
3467
3468         Reviewed by Lars Knoll <lars@trolltech.com>.
3469
3470         Avoid problems with calling QPainter::begin() on an already active paintdevice
3471
3472         * Partial pick from 6200e04c3e0a77873c3b3f3969b65bc701020326 to avoid getting
3473         crashes on Qt/Mac 4.4 with QPainter::begin to fail because we already draw.
3474         * If we are in a layout or need one do not paint. This can happen for the PlatformScrollBar
3475         used by the ScrollView on a layout triggered by QWebPage::paintEvent.
3476
3477
3478         * platform/qt/WidgetQt.cpp:
3479         (WebCore::Widget::invalidateRect):
3480
3481 2007-11-08  Eric Seidel  <eric@webkit.org>
3482
3483         No review.
3484
3485         * ksvg2/svg/SVGPathElement.h: remove old comment
3486
3487 2007-11-07  Antti Koivisto  <antti@apple.com>
3488
3489         Reviewed by Ollie.
3490
3491         Ensure video renderer has correct size if video has already been loaded
3492         when it is constructed.
3493
3494         * rendering/RenderVideo.cpp:
3495         (WebCore::RenderVideo::RenderVideo):
3496
3497 2007-11-07  Antti Koivisto  <antti@apple.com>
3498
3499         Reviewed by Ollie.
3500
3501         Ensure video is visible when it should be.
3502
3503         * rendering/RenderVideo.cpp:
3504         (WebCore::RenderVideo::updateMovie):
3505
3506 2007-11-07  Dan Bernstein  <mitz@apple.com>
3507
3508         Reviewed by Darin Adler.
3509
3510         - fix <rdar://problem/5523503> Safari crashes clicking scroll bar in FaceBook 'Trips'
3511
3512         Layers and listboxes are two kinds of ScrollBarClient that can be
3513         removed while the scrollbar is tracking the mouse. The scrollbar is not
3514         destroyed until later, and meanwhile it can try to call the client,
3515         which results in a crash.
3516
3517         * manual-tests/stale-scrollbar-client-crash.html: Added.
3518         * platform/ScrollBar.h:
3519         (WebCore::Scrollbar::setClient): Added.
3520         * rendering/RenderLayer.cpp:
3521         (WebCore::RenderLayer::destroyScrollbar): Call Scrollbar::setClient().
3522         * rendering/RenderListBox.cpp:
3523         (WebCore::RenderListBox::~RenderListBox): Ditto.
3524
3525 2007-11-07  Adam Roben  <aroben@apple.com>
3526
3527         Fix <rdar://5569268> Crash when opening any FTP site in second tab/window
3528
3529         Reviewed by Sam.
3530
3531         No test possible.
3532
3533         * platform/win/SharedBufferWin.cpp:
3534         (WebCore::SharedBuffer::createWithContentsOfFile): Bail if we get an
3535         empty path, because _wfopen_s will crash if we pass it a null pointer.
3536
3537 2007-11-07  David Kilzer  <ddkilzer@apple.com>
3538
3539         WebKit confuses width/height for Media Queries device-aspect-ratio evaluation
3540         <http://bugs.webkit.org/show_bug.cgi?id=14893>
3541         <rdar://problem/5380295>
3542
3543         Reviewed by Darin.
3544
3545         Tests: fast/css/device-aspect-ratio.html
3546                fast/css/max-device-aspect-ratio.html
3547                fast/css/min-device-aspect-ratio.html
3548
3549         * css/MediaQueryEvaluator.cpp:
3550         (WebCore::parseAspectRatio): Renamed method parameters from a/b to h/v.
3551         (WebCore::device_aspect_ratioMediaFeatureEval): Renamed local variables from
3552         a/b to h/v.  Switched first two arguments of the call to cmpvalue() to fix
3553         the bug.
3554
3555 2007-11-07  Dan Bernstein  <mitz@apple.com>
3556
3557         Reviewed by Dave Hyatt.
3558
3559         - fix http://bugs.webkit.org/show_bug.cgi?id=15887
3560           REGRESSION (r27576): Crash in RenderStyle::affectedByHoverRules clicking link on Digg
3561
3562         Test: fast/css/display-none-inline-style-change-crash.html
3563
3564         * dom/Element.cpp:
3565         (WebCore::Element::recalcStyle): Fixed the crash by null-checking
3566         the current style and removed other checks that are not strictly
3567         necessary.
3568
3569 2007-11-07  Brady Eidson  <beidson@apple.com>
3570
3571         Rubberstamped by Sam
3572
3573         Remove FrameLoaderClient methods from SVG that were pruned awhile ago
3574
3575         * platform/graphics/svg/SVGImageEmptyClients.h:
3576
3577 2007-11-07  Dan Bernstein  <mitz@apple.com>
3578
3579         Reviewed by Darin Adler.
3580
3581         - fix a bug where CSS rules with :hover in the ancestor chain stopped
3582           working after changing the inline style declaration of the ancestor
3583
3584         Test: fast/css/affected-by-hover-after-style-change.html
3585
3586         * dom/Element.cpp:
3587         (WebCore::Element::recalcStyle): If we are not forcing style
3588         recalculation for all descendants, preserve any "affected by
3589         {hover|active|drag} bits that we may have acquired from them.
3590         Also renamed _style to currentStyle.
3591
3592 2007-11-06  Timothy Hatcher  <timothy@apple.com>