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