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