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