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