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