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