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