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