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