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