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