9a1f059abc90694c134b3eec7c818ecf493e8ec0
[WebKit-https.git] / WebCore / ChangeLog
1 2009-01-09  Peter Kasting  <pkasting@google.com>
2
3         Reviewed by David Hyatt.
4
5         https://bugs.webkit.org/show_bug.cgi?id=22995
6         Fix flaky image animation by resetting the metadata for a frame when
7         we get new data for that frame.  This fixes animations that halted
8         when the next frame of the animation wasn't complete by the time the
9         current frame's duration expired.
10
11         * platform/graphics/BitmapImage.cpp:
12         (WebCore::BitmapImage::destroyDecodedData):
13         (WebCore::BitmapImage::dataChanged):
14         * platform/graphics/BitmapImage.h:
15         (WebCore::FrameData::~FrameData):
16         * platform/graphics/cairo/ImageCairo.cpp:
17         (WebCore::FrameData::clear):
18         * platform/graphics/cg/ImageCG.cpp:
19         (WebCore::FrameData::clear):
20         * platform/graphics/qt/ImageQt.cpp:
21         (WebCore::FrameData::clear):
22         * platform/graphics/wx/ImageWx.cpp:
23         (WebCore::FrameData::clear):
24
25 2009-01-09  Simon Hausmann  <simon.hausmann@nokia.com>
26
27         Rubber-stamped by Tor Arne Vestbø.
28
29         Swap the .h and the .cpp output in the Qt build for the
30         UserAgentStyleSheetData files, to put the definition in the .cpp file
31         and the declaration in the header file.
32
33         * WebCore.pro:
34
35 2009-01-09  David Levin  <levin@chromium.org>
36
37         Reviewed by Oliver Hunt.
38
39         https://bugs.webkit.org/show_bug.cgi?id=23175
40
41         Added forwarding header.
42
43         * ForwardingHeaders/wtf/PtrAndFlags.h: Added.
44
45 2009-01-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
46
47         Reviewed by Simon Hausmann.
48
49         Prevent qmake from generating duplicate rules for embedded stylesheets
50         
51         The STYLESHEETS_EMBED variable used to contain only one file name, but
52         now that it is a list of files we need to change it to be a dependency
53         for the stylesheet generator instead of the input.
54
55         * WebCore.pro:
56
57 2009-01-09  Simon Hausmann  <simon.hausmann@nokia.com>
58
59         Reviewed by Tor Arne Vestbø.
60
61         Fix qmake warning about missing test function, a contains() call was
62         missing.
63
64         * WebCore.pro:
65
66 2009-01-09  Simon Hausmann  <simon.hausmann@nokia.com>
67
68         Rubber-stamped by Tor Arne Vestbø.
69
70         Add the Qt API headers to HEADERS, too, for improved completion in IDEs.
71
72         * WebCore.pro:
73
74 2009-01-09  David Levin  <levin@chromium.org>
75
76         Reviewed by Alexey Proskuryakov.
77
78         https://bugs.webkit.org/show_bug.cgi?id=23199
79
80         Fix deref's of string happening on two different threads.
81
82         No observable change in behavior, so no test.  However, there are asserts
83         being added for https://bugs.webkit.org/show_bug.cgi?id=23175 which
84         will detect this issue while running the normal worker tests.
85
86         * dom/WorkerThread.cpp:
87         (WebCore::WorkerThreadStartupData::create):
88         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
89         (WebCore::WorkerThread::WorkerThread):
90         (WebCore::WorkerThread::workerThread):
91         * dom/WorkerThread.h:
92
93 2009-01-08  Dan Bernstein  <mitz@apple.com>
94
95         Reviewed by Adam Roben.
96
97         - use native glyph support in Core Graphics when available
98
99         * platform/graphics/win/FontCGWin.cpp:
100         (WebCore::Font::drawGlyphs): Changed to use drawGDIGlyphs() only if
101         native glyph support is not available or stroking is required. Changed
102         to pass the font's useGDI() flag to wkSetCGContextFontRenderingStyle to
103         request the use of native glyphs.
104         * platform/graphics/win/FontCustomPlatformData.cpp:
105         (WebCore::FontCustomPlatformData::fontPlatformData): Added a call to
106         wkSetFontPlatformInfo to attach the LOGFONT to the CGFont.
107         * platform/graphics/win/FontPlatformDataCGWin.cpp:
108         (WebCore::FontPlatformData::platformDataInit): Ditto.
109
110 2009-01-08  Peter Kasting  <pkasting@google.com>
111
112         Reviewed by Sam Weinig.
113
114         https://bugs.webkit.org/show_bug.cgi?id=22929
115         Fix memory regression when decoding large animated GIFs.
116
117         * platform/graphics/cg/ImageSourceCG.cpp:
118         (WebCore::ImageSource::clear):
119
120 2009-01-08  Scott Violet  <sky@chromium.org>
121
122         Reviewed by Eric Seidel (and Adam Barth).
123
124         Fix Images to return their file extension
125         http://code.google.com/p/chromium/issues/detail?id=5827
126
127         * platform/graphics/skia/ImageSourceSkia.cpp:
128         (WebCore::ImageSource::filenameExtension):
129
130 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
131
132         Reviewed by Eric Seidel.
133
134         Add PathSkia and PatternSkia implementations to WebCore
135         https://bugs.webkit.org/show_bug.cgi?id=23200
136
137         * platform/graphics/skia/PathSkia.cpp: Added.
138         (WebCore::Path::Path):
139         (WebCore::Path::~Path):
140         (WebCore::Path::operator=):
141         (WebCore::Path::isEmpty):
142         (WebCore::Path::contains):
143         (WebCore::Path::translate):
144         (WebCore::Path::boundingRect):
145         (WebCore::Path::moveTo):
146         (WebCore::Path::addLineTo):
147         (WebCore::Path::addQuadCurveTo):
148         (WebCore::Path::addBezierCurveTo):
149         (WebCore::Path::addArcTo):
150         (WebCore::Path::closeSubpath):
151         (WebCore::Path::addArc):
152         (WebCore::Path::addRect):
153         (WebCore::Path::addEllipse):
154         (WebCore::Path::clear):
155         (WebCore::convertPathPoints):
156         (WebCore::Path::apply):
157         (WebCore::Path::transform):
158         (WebCore::Path::debugString):
159         (WebCore::boundingBoxForCurrentStroke):
160         (WebCore::Path::strokeBoundingRect):
161         * platform/graphics/skia/PatternSkia.cpp: Added.
162         (WebCore::shaderRule):
163         (WebCore::Pattern::createPlatformPattern):
164
165 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
166
167         Reviewed by Eric Seidel.
168
169         Add ImageSourceSkia to platform/graphics/skia
170         https://bugs.webkit.org/show_bug.cgi?id=23200
171         
172         ImageSourceSkia is mostly a hack to support our
173         ICO decoder model.  See ImageSourceSkia.h for more
174         explanation.  Eventually we'd like to make our ICO
175         decoder lazy.
176
177         * platform/graphics/ImageSource.h: mark m_decoder as protected
178         * platform/graphics/skia/ImageSourceSkia.cpp: Added.
179         (WebCore::createDecoder):
180         (WebCore::ImageSource::ImageSource):
181         (WebCore::ImageSource::~ImageSource):
182         (WebCore::ImageSource::clear):
183         (WebCore::ImageSource::initialized):
184         (WebCore::ImageSource::setData):
185         (WebCore::ImageSource::isSizeAvailable):
186         (WebCore::ImageSource::size):
187         (WebCore::ImageSource::frameSizeAtIndex):
188         (WebCore::ImageSource::repetitionCount):
189         (WebCore::ImageSource::frameCount):
190         (WebCore::ImageSource::createFrameAtIndex):
191         (WebCore::ImageSource::frameIsCompleteAtIndex):
192         (WebCore::ImageSource::frameDurationAtIndex):
193         (WebCore::ImageSource::frameHasAlphaAtIndex):
194         (WebCore::ImageSourceSkia::setData):
195         (WebCore::ImageSource::filenameExtension):
196         * platform/graphics/skia/ImageSourceSkia.h: Added.
197
198 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
199
200         Reviewed by Eric Seidel.
201
202         Add NativeImageSkia (PlatformImagePtr) to platform/graphics/skia
203         https://bugs.webkit.org/show_bug.cgi?id=23200
204
205         * platform/graphics/skia/NativeImageSkia.cpp: Added.
206         (NativeImageSkia::NativeImageSkia):
207         (NativeImageSkia::decodedSize):
208         (NativeImageSkia::hasResizedBitmap):
209         (NativeImageSkia::resizedBitmap):
210         (NativeImageSkia::shouldCacheResampling):
211         * platform/graphics/skia/NativeImageSkia.h: Added.
212         (NativeImageSkia::setDataComplete):
213         (NativeImageSkia::isDataComplete):
214
215 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
216
217         Reviewed by Eric Seidel.
218
219         Add ImageBufferSkia and ImageSkia files.
220         https://bugs.webkit.org/show_bug.cgi?id=23200
221         For now we've left BitmapImage and BitmapImageSingleFrameSkia
222         implementations in the ImageSkia file (like ImageCG has), but
223         we intend to break them out into their own files.
224
225         * platform/graphics/skia/ImageBufferSkia.cpp: Added.
226         (WebCore::ImageBufferData::ImageBufferData):
227         (WebCore::ImageBuffer::ImageBuffer):
228         (WebCore::ImageBuffer::~ImageBuffer):
229         (WebCore::ImageBuffer::context):
230         (WebCore::ImageBuffer::image):
231         (WebCore::ImageBuffer::getImageData):
232         (WebCore::ImageBuffer::putImageData):
233         (WebCore::ImageBuffer::toDataURL):
234         * platform/graphics/skia/ImageSkia.cpp: Added.
235         (WebCore::):
236         (WebCore::FrameData::clear):
237         (WebCore::Image::loadPlatformResource):
238         (WebCore::Image::drawPattern):
239         (WebCore::BitmapImage::initPlatformData):
240         (WebCore::BitmapImage::invalidatePlatformData):
241         (WebCore::BitmapImage::checkForSolidColor):
242         (WebCore::BitmapImage::draw):
243         (WebCore::BitmapImageSingleFrameSkia::draw):
244         (WebCore::BitmapImageSingleFrameSkia::create):
245
246 2009-01-08  James Robinson  <jamesr@google.com>
247
248         Reviewed by Mark Rowe.
249         Landed by Pamela Greene.
250
251         WebCore::Event::timeStamp() is a simple accessor and should be const
252
253         https://bugs.webkit.org/show_bug.cgi?id=23176
254
255         * dom/Event.h:
256         (WebCore::Event::timeStamp):
257
258 2009-01-08  Antti Koivisto  <antti@apple.com>
259
260         Reviewed by Oliver Hunt.
261
262         Fix <rdar://problem/6467206> 
263         Resources loaded from the memory cache do not get correctly inserted into the DocLoader resource map (22994)
264         
265         Use CachedResourceHandle in document resource map so resources get updated correctly when using
266         using cache validation conditionals.
267
268         * loader/Cache.cpp:
269         (WebCore::Cache::evict):
270         * loader/DocLoader.cpp:
271         (WebCore::DocLoader::~DocLoader):
272         (WebCore::DocLoader::requestResource):
273         (WebCore::DocLoader::setAutoLoadImages):
274         (WebCore::DocLoader::removeCachedResource):
275         * loader/DocLoader.h:
276         (WebCore::DocLoader::cachedResource):
277         (WebCore::DocLoader::allCachedResources):
278         * loader/DocumentLoader.cpp:
279         (WebCore::DocumentLoader::getSubresources):
280         * loader/ImageLoader.cpp:
281         (WebCore::ImageLoader::updateFromElement):
282
283 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
284
285         Reviewed by Eric Seidel.
286
287         Add a cleaned-up GraphicsContextSkia implementation to WebKit.
288         https://bugs.webkit.org/show_bug.cgi?id=23191
289
290         * platform/graphics/skia/GraphicsContextSkia.cpp: Added.
291         (WebCore::):
292         (WebCore::GraphicsContext::GraphicsContext):
293         (WebCore::GraphicsContext::~GraphicsContext):
294         (WebCore::GraphicsContext::platformContext):
295         (WebCore::GraphicsContext::savePlatformState):
296         (WebCore::GraphicsContext::restorePlatformState):
297         (WebCore::GraphicsContext::beginTransparencyLayer):
298         (WebCore::GraphicsContext::endTransparencyLayer):
299         (WebCore::GraphicsContext::addInnerRoundedRectClip):
300         (WebCore::GraphicsContext::addPath):
301         (WebCore::GraphicsContext::beginPath):
302         (WebCore::GraphicsContext::clearPlatformShadow):
303         (WebCore::GraphicsContext::clearRect):
304         (WebCore::GraphicsContext::clip):
305         (WebCore::GraphicsContext::clipOut):
306         (WebCore::GraphicsContext::clipOutEllipseInRect):
307         (WebCore::GraphicsContext::clipPath):
308         (WebCore::GraphicsContext::clipToImageBuffer):
309         (WebCore::GraphicsContext::concatCTM):
310         (WebCore::GraphicsContext::drawConvexPolygon):
311         (WebCore::GraphicsContext::drawEllipse):
312         (WebCore::GraphicsContext::drawFocusRing):
313         (WebCore::GraphicsContext::drawLine):
314         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
315         (WebCore::GraphicsContext::drawLineForText):
316         (WebCore::GraphicsContext::drawRect):
317         (WebCore::GraphicsContext::fillPath):
318         (WebCore::GraphicsContext::fillRect):
319         (WebCore::GraphicsContext::fillRoundedRect):
320         (WebCore::GraphicsContext::getCTM):
321         (WebCore::GraphicsContext::roundToDevicePixels):
322         (WebCore::GraphicsContext::scale):
323         (WebCore::GraphicsContext::setAlpha):
324         (WebCore::GraphicsContext::setCompositeOperation):
325         (WebCore::GraphicsContext::setImageInterpolationQuality):
326         (WebCore::GraphicsContext::setLineCap):
327         (WebCore::GraphicsContext::setLineDash):
328         (WebCore::GraphicsContext::setLineJoin):
329         (WebCore::GraphicsContext::setMiterLimit):
330         (WebCore::GraphicsContext::setPlatformFillColor):
331         (WebCore::GraphicsContext::setPlatformShadow):
332         (WebCore::GraphicsContext::setPlatformStrokeColor):
333         (WebCore::GraphicsContext::setPlatformStrokeStyle):
334         (WebCore::GraphicsContext::setPlatformStrokeThickness):
335         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
336         (WebCore::GraphicsContext::setURLForRect):
337         (WebCore::GraphicsContext::setUseAntialiasing):
338         (WebCore::GraphicsContext::strokeArc):
339         (WebCore::GraphicsContext::strokePath):
340         (WebCore::GraphicsContext::strokeRect):
341         (WebCore::GraphicsContext::rotate):
342         (WebCore::GraphicsContext::translate):
343
344 2009-01-08  David Hyatt  <hyatt@apple.com>
345
346         Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll.
347
348         Make scrollRectIntoViewRecursively call out to the HostWindow to continue the recursive scroll for
349         any scrollable views that may contain a WebView.  Does nothing on platforms other than the Mac, but
350         might eventually be of interest to other platforms.
351
352         Reviewed by Oliver Hunt
353
354         * WebCore.base.exp:
355         * page/Chrome.cpp:
356         (WebCore::Chrome::scrollRectIntoView):
357         * page/Chrome.h:
358         * page/ChromeClient.h:
359         (WebCore::ChromeClient::scrollRectIntoView):
360         * platform/HostWindow.h:
361         * platform/ScrollView.cpp:
362         (WebCore::ScrollView::scrollRectIntoViewRecursively):
363
364 2009-01-08  Adam Treat  <adam.treat@torchmobile.com>
365
366         Reviewed by David Hyatt.
367
368         No need to make this part of HostWindow and moreover HostWindow should
369         not have any reference to non-platform parts of WebCore.
370
371         * page/Chrome.h:
372         * page/FrameView.cpp:
373         (WebCore::FrameView::setContentsSize):
374         * platform/HostWindow.h:
375
376 2009-01-08  Eric Carlson  <eric.carlson@apple.com>
377
378         Reviewed by Adele Peterson.
379
380         Simplify Mac interfaces for drawing media controller elements
381
382         <rdar://problem/6293969>
383
384         * WebCore.base.exp: update for changed WebKitSystemInterface media controller functions
385
386         * platform/mac/WebCoreSystemInterface.h: Ditto
387         * platform/mac/WebCoreSystemInterface.mm: Ditto
388
389         * rendering/MediaControlElements.h:
390         (WebCore::): Add MediaControlElements enum
391
392         * rendering/RenderThemeMac.mm:
393         (WebCore::RenderThemeMac::paintMediaFullscreenButton):  update for changed WebKitSystemInterface
394         media controller functions
395         (WebCore::RenderThemeMac::paintMediaMuteButton): Ditto
396         (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto
397         (WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto
398         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto
399         (WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto
400         (WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto
401
402 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
403
404         Reviewed by Eric Seidel.
405
406         Add two more files for platform/graphics/skia.
407         https://bugs.webkit.org/show_bug.cgi?id=23191
408
409         * platform/graphics/skia/GradientSkia.cpp: Added.
410         (WebCore::Gradient::platformDestroy):
411         (WebCore::F2B):
412         (WebCore::makeSkColor):
413         (WebCore::totalStopsNeeded):
414         (WebCore::fillStops):
415         (WebCore::compareStops):
416         (WebCore::Gradient::platformGradient):
417         (WebCore::Gradient::fill):
418         * platform/graphics/skia/GraphicsContextPlatformPrivate.h: Copied from WebCore/bindings/js/ScriptValue.h.
419         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
420         (WebCore::GraphicsContextPlatformPrivate::context):
421
422 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
423
424         Reviewed by Eric Seidel.
425
426         Commit the right files this time!  (Instead of the ugly unfixed ones.)
427         https://bugs.webkit.org/show_bug.cgi?id=23191
428
429         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
430         * platform/graphics/skia/FloatPointSkia.cpp:
431         * platform/graphics/skia/FloatRectSkia.cpp:
432         * platform/graphics/skia/IntPointSkia.cpp:
433         * platform/graphics/skia/IntRectSkia.cpp:
434         (WebCore::IntRect::operator SkRect):
435         * platform/graphics/skia/SkiaUtils.cpp:
436         (WebCore::):
437         (WebCore::WebCoreCompositeToSkiaComposite):
438         (WebCore::SkPMColorToWebCoreColor):
439         (WebCore::IntersectRectAndRegion):
440         (WebCore::ClipRectToCanvas):
441         (WebCore::SkPathContainsPoint):
442         (WebCore::scratchContext):
443         * platform/graphics/skia/SkiaUtils.h:
444         (WebCore::WebCoreFloatToSkScalar):
445         (WebCore::WebCoreDoubleToSkScalar):
446
447 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
448
449         Reviewed by Eric Seidel.
450
451         Add the first few files from platform/graphics/skia
452         https://bugs.webkit.org/show_bug.cgi?id=23191
453
454         These are all pretty simple.
455         Eventually BitmapImageSingleFrameSkia might grow a .cpp file, for now it's just a header.
456         SkiaUtils needs to die, but that can come later, no need to block up-streaming now.
457
458         * platform/graphics/skia/BitmapImageSingleFrameSkia.h: Added.
459         (WebCore::BitmapImageSingleFrameSkia::isBitmapImage):
460         (WebCore::BitmapImageSingleFrameSkia::size):
461         (WebCore::BitmapImageSingleFrameSkia::destroyDecodedData):
462         (WebCore::BitmapImageSingleFrameSkia::decodedSize):
463         (WebCore::BitmapImageSingleFrameSkia::nativeImageForCurrentFrame):
464         (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia):
465         * platform/graphics/skia/FloatPointSkia.cpp: Copied from WebCore/platform/graphics/mac/FloatPointMac.mm.
466         (WebCore::FloatPoint::FloatPoint):
467         (WebCore::FloatPoint::operator SkPoint):
468         * platform/graphics/skia/FloatRectSkia.cpp: Copied from WebCore/platform/graphics/qt/IntRectQt.cpp.
469         (WebCore::FloatRect::FloatRect):
470         (WebCore::FloatRect::operator SkRect):
471         * platform/graphics/skia/IntPointSkia.cpp: Copied from WebCore/platform/graphics/win/IntPointWin.cpp.
472         (WebCore::IntPoint::IntPoint):
473         (WebCore::IntPoint::operator SkIPoint):
474         (WebCore::IntPoint::operator SkPoint):
475         * platform/graphics/skia/IntRectSkia.cpp: Copied from WebCore/platform/graphics/qt/IntRectQt.cpp.
476         (WebCore::IntRect::operator SkIRect):
477         (WebCore::IntRect::operator SkRect):
478         (WebCore::IntRect::IntRect):
479         * platform/graphics/skia/SkiaUtils.cpp: Added.
480         (WebCore::WebCorePointToSkiaPoint):
481         (WebCore::WebCoreRectToSkiaRect):
482         (WebCore::):
483         (WebCore::WebCoreCompositeToSkiaComposite):
484         (WebCore::InvScaleByte):
485         (WebCore::SkPMColorToColor):
486         (WebCore::SkPMColorToWebCoreColor):
487         (WebCore::IntersectRectAndRegion):
488         (WebCore::ClipRectToCanvas):
489         (WebCore::SkPathContainsPoint):
490         (WebCore::scratchContext):
491         * platform/graphics/skia/SkiaUtils.h: Added.
492         (WebCore::WebCoreFloatToSkScalar):
493         (WebCore::WebCoreDoubleToSkScalar):
494
495 2009-01-08  Pierre-Olivier Latour  <pol@apple.com>
496
497         Reviewed by Dan Bernstein.
498
499         Fixed CSS Transitions with zero-duration but non-zero-delay not starting or ending properly.
500
501         Also updated AnimationController::numberOfActiveAnimations() which now returns the number of "active" animations,
502         instead of simply the "running" ones.
503
504         https://bugs.webkit.org/show_bug.cgi?id=23177
505
506         Tests: transitions/zero-duration-with-non-zero-delay-end.html
507                transitions/zero-duration-with-non-zero-delay-start.html
508
509         * page/animation/AnimationBase.cpp:
510         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
511         * page/animation/AnimationController.cpp:
512         (WebCore::AnimationControllerPrivate::animationTimerFired):
513         * page/animation/CompositeAnimation.cpp:
514         (WebCore::CompositeAnimationPrivate::numberOfActiveAnimations):
515
516 2009-01-08  Alexey Proskuryakov  <ap@webkit.org>
517
518         Reviewed by Oliver Hunt.
519
520         <rdar://problem/6477501> Repro crash loading HTML5 AppCache manifest directly
521
522         The crash happened whenever a cached resource was downloaded, as opposed to used directly.
523
524         No test, as downloading cannot be tested automatically.
525
526         * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy):
527         Cancel downloads that do not have an associated ResourceHandle, such as downloads from the
528         application cache. Activity window shows "The URL can't be shown", and the frame remains empty.
529
530 2009-01-08  Justin McPherson <justin.mcpherson@nokia.com>
531
532         Reviewed by Simon Hausmann.
533
534         Fix the Qt build on older X11 systems with special X paths.
535
536         * WebCore.pro: Use the x11 qmake config to pull in extra paths
537         needed for NPAPI.
538
539 2009-01-08  Adam Roben  <aroben@apple.com>
540
541         Windows build fix after r39699
542
543         * DerivedSources.cpp: Added JSDOMStringList.cpp.
544
545 2009-01-08  Kent Hansen  <khansen@trolltech.com>
546
547         Reviewed by Simon Hausmann.
548
549         Fix copy & paste of images in the Qt port.
550
551         Store the QPixmap itself in the mimedata, not a QPixmap* converted to bool.
552
553         * platform/qt/ClipboardQt.cpp:
554         (WebCore::ClipboardQt::declareAndWriteDragImage):
555
556 2009-01-08  Hiroyuki Ikezoe  <poincare@ikezoe.net>
557
558         Reviewed by Holger Freyther.
559
560         https://bugs.webkit.org/show_bug.cgi?id=23127
561
562         Invoke pango_coverage_get with each Unicode character.
563
564         * platform/graphics/gtk/SimpleFontDataPango.cpp:
565         (WebCore::SimpleFontData::containsCharacters):
566
567 2009-01-07  Alexey Proskuryakov  <ap@webkit.org>
568
569         Reviewed by Darin Adler.
570
571         Part one of 
572         https://bugs.webkit.org/show_bug.cgi?id=23165
573         Add support for application cache dynamic entries
574
575         Test: http/tests/appcache/dynamic-entries-no-cache.html
576
577         * DerivedSources.make:
578         * GNUmakefile.am:
579         * WebCore.pro:
580         * WebCore.scons:
581         * WebCore.vcproj/WebCore.vcproj:
582         * WebCore.xcodeproj/project.pbxproj:
583         * WebCoreSources.bkl:
584         Added new files.
585
586         * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::hasItem):
587         Added binding for hasItem(). Like other DOMApplicationCache methods, it needs to be custom
588         to resolve relative URLs correctly.
589
590         * bindings/js/JSDOMStringListCustom.cpp: Added.
591         * dom/DOMStringList.cpp: Added.
592         * dom/DOMStringList.h: Added.
593         * dom/DOMStringList.idl: Added.
594         Added an implementation of DOM 3 Core DOMStringList interface, which is returned by
595         DOMApplicationCache items attribute.
596
597         * dom/StaticStringList.cpp: Added.
598         * dom/StaticStringList.h: Added.
599         An implementation of DOMStringList that makes a snapshot (for DOMApplicationCache, this
600         matches Firefox, as the spec doesn't say whether the returned list should be live or not).
601
602         * loader/appcache/ApplicationCache.h: Added a list of pending dynamic entry actions, to be
603         used in the near future.
604
605         * loader/appcache/DOMApplicationCache.idl: Updated for spec changes. Instead of length 
606         attribute and item(), we now have an items attribute that returns a DOMStringList, and a
607         hasItem convenience method.
608
609         * loader/appcache/DOMApplicationCache.cpp:
610         (WebCore::DOMApplicationCache::items):
611         (WebCore::DOMApplicationCache::hasItem):
612         * loader/appcache/DOMApplicationCache.h:
613         Added implementations of items attribute and hasItem() (note that underlying ApplicationCache
614         methods are still unimplemented though).
615
616         * page/DOMWindow.idl: Expose a DOMStringList global constructor.
617
618 2009-01-07  Chris Marrin  <cmarrin@apple.com>
619
620         Reviewed by Eric Seidel.
621
622         https://bugs.webkit.org/show_bug.cgi?id=23122
623
624         This completes the removal of dependencies on WebKit from the platform code
625
626         * css/CSSComputedStyleDeclaration.cpp:
627         (WebCore::getDelayValue):
628         (WebCore::getDurationValue):
629         (WebCore::getTimingFunctionValue):
630         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
631         * css/CSSHelper.h:
632         * css/CSSStyleSelector.cpp:
633         (WebCore::CSSStyleSelector::mapAnimationDelay):
634         (WebCore::CSSStyleSelector::mapAnimationDirection):
635         (WebCore::CSSStyleSelector::mapAnimationDuration):
636         (WebCore::CSSStyleSelector::mapAnimationIterationCount):
637         (WebCore::CSSStyleSelector::mapAnimationName):
638         (WebCore::CSSStyleSelector::mapAnimationPlayState):
639         (WebCore::CSSStyleSelector::mapAnimationProperty):
640         (WebCore::CSSStyleSelector::mapAnimationTimingFunction):
641         * platform/animation/Animation.cpp:
642         (WebCore::Animation::Animation):
643         * platform/animation/Animation.h:
644         (WebCore::Animation::initialAnimationDelay):
645         (WebCore::Animation::initialAnimationDirection):
646         (WebCore::Animation::initialAnimationDuration):
647         (WebCore::Animation::initialAnimationIterationCount):
648         (WebCore::Animation::initialAnimationName):
649         (WebCore::Animation::initialAnimationPlayState):
650         (WebCore::Animation::initialAnimationProperty):
651         (WebCore::Animation::initialAnimationTimingFunction):
652         * rendering/style/RenderStyle.h:
653
654 2008-01-07  Peter Kasting  <pkasting@google.com>
655
656         Reviewed by Sam Weinig.
657
658         https://bugs.webkit.org/show_bug.cgi?id=22929
659
660         Fix errors while decoding GIFs by not calling setData() repeatedly
661         when it's not necessary.  Pushes the responsibility for calling
662         setData() after clear() into the ImageSource which presumably knows
663         better than BitmapImage what needs to be done.
664
665         NOTE: The above bug is mainly about a memory regression, which this
666         patch does not fix.
667
668         * platform/graphics/BitmapImage.cpp:
669         (WebCore::BitmapImage::destroyDecodedData):
670         * platform/graphics/ImageSource.h:
671         * platform/graphics/cairo/ImageSourceCairo.cpp:
672         (WebCore::ImageSource::clear):
673         * platform/graphics/cg/ImageSourceCG.cpp:
674         (WebCore::ImageSource::clear):
675         * platform/graphics/qt/ImageSourceQt.cpp:
676         (WebCore::ImageSource::~ImageSource):
677         (WebCore::ImageSource::clear):
678         * platform/graphics/wx/ImageSourceWx.cpp:
679         (WebCore::ImageSource::~ImageSource):
680         (WebCore::ImageSource::clear):
681
682 2009-01-07  Justin Garcia  <justin.garcia@apple.com>
683
684         Reviewed by Darin Adler.
685
686         <rdar://problem/6355786> Find fails for queries that contain a line break
687
688         * editing/TextIterator.cpp:
689         (WebCore::findPlainText): Allow find with queries that contain newlines.
690
691 2009-01-07  Dean Jackson  <dino@apple.com>
692
693         Reviewed by Dan Bernstein.
694
695         Allow removal of inline shorthand properties for
696         animation, transition and transform origin. Also
697         add getter for shorthand animation property.
698
699         https://bugs.webkit.org/show_bug.cgi?id=22605
700
701         Test: fast/css/transform-inline-style-remove.html
702
703         * css/CSSMutableStyleDeclaration.cpp:
704         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
705             Getter for animation property shorthand
706         (WebCore::initShorthandMap):
707             Adds initialisation for transform-origin, animation and transition
708
709 2009-01-07  Benjamin Otte  <otte@gnome.org>
710
711         Reviewed by Holger Freyther.
712
713         * platform/network/ResourceHandleInternal.h:
714         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
715         * platform/network/soup/ResourceHandleSoup.cpp:
716         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
717         (WebCore::parseDataUrl):
718         (WebCore::ResourceHandle::startData): keep track of the idle handler
719         we add and remove it in the destructor
720
721 2009-01-07  Dean Jackson  <dino@apple.com>
722
723         Reviewed by Darin Adler.
724
725         Finish renaming of AffineTransform to TransformationMatrix, this
726         time ensuring that the platform implementations get the correct
727         name. Also, clean up some whitespace cruft in old content.
728
729         https://bugs.webkit.org/show_bug.cgi?id=23151
730
731         * GNUmakefile.am:
732         * WebCore.pro:
733         * WebCore.scons:
734         * WebCore.vcproj/WebCore.vcproj:
735         * WebCore.xcodeproj/project.pbxproj:
736         * platform/graphics/cairo/AffineTransformCairo.cpp: Removed.
737         * platform/graphics/cairo/TransformationMatrixCairo.cpp: Copied from WebCore/platform/graphics/cairo/AffineTransformCairo.cpp.
738         * platform/graphics/cg/AffineTransformCG.cpp: Removed.
739         * platform/graphics/cg/TransformationMatrixCG.cpp: Copied from WebCore/platform/graphics/cg/AffineTransformCG.cpp.
740         * platform/graphics/qt/AffineTransformQt.cpp: Removed.
741         * platform/graphics/qt/TransformationMatrixQt.cpp: Copied from WebCore/platform/graphics/qt/AffineTransformQt.cpp.
742         * platform/graphics/transforms/TransformationMatrix.cpp:
743         * platform/graphics/transforms/TransformationMatrix.h:
744         * platform/graphics/wx/AffineTransformWx.cpp: Removed.
745         * platform/graphics/wx/TransformationMatrixWx.cpp: Copied from WebCore/platform/graphics/wx/AffineTransformWx.cpp.
746         * webcore-wx.bkl:
747
748 2009-01-07  Anders Carlsson  <andersca@apple.com>
749
750         Another build fix.
751         
752         * WebCore.LP64.exp:
753
754 2008-12-16  David Hyatt  <hyatt@apple.com>
755
756         Make Safari RSS behave nicely with full page zoom.  Need to add a new value to enable resetting of zoom
757         back to the document-level default.
758
759         Reviewed by Darin Adler
760
761         * css/CSSParser.cpp:
762         (WebCore::CSSParser::parseValue):
763         * css/CSSStyleSelector.cpp:
764         (WebCore::CSSStyleSelector::applyProperty):
765         * css/CSSValueKeywords.in:
766
767 2009-01-07  Darin Adler  <darin@apple.com>
768
769         Reviewed by Oliver Hunt.
770
771         Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
772         https://bugs.webkit.org/show_bug.cgi?id=23160
773
774         * WebCore.base.exp: Added Page::setMemoryCacheClientCallsEnabled.
775
776         * inspector/InspectorController.cpp:
777         (WebCore::InspectorController::didLoadResourceFromMemoryCache): Updated to take a CachedResource
778         so that there's no extra work the caller has to do when the inspector is disabled.
779         * inspector/InspectorController.h: Ditto.
780
781         * loader/DocumentLoader.h: Added recordMemoryCacheLoadForFutureClientNotification,
782         takeMemoryCacheLoadsForClientNotification, and m_resourcesLoadedFromMemoryCacheForClientNotification.
783
784         * loader/FrameLoader.cpp:
785         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Streamlined code so less work is done when
786         there's no inspector or client call needed. Added code to check areMemoryCacheClientCallsEnabled
787         and if it's false, use recordMemoryCacheLoadForFutureClientNotification.
788         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Added.
789         * loader/FrameLoader.h: Ditto.
790
791         * page/Page.cpp:
792         (WebCore::Page::Page): Initialize m_areMemoryCacheClientCallsEnabled to be compatible with old behavior.
793         (WebCore::Page::setMemoryCacheClientCallsEnabled): Added.
794         * page/Page.h: Added setMemoryCacheClientCallsEnabled, areMemoryCacheClientCallsEnabled,
795         and m_areMemoryCacheClientCallsEnabled.
796
797 2009-01-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
798
799         Rubber-stamped by Simon Hausmann.
800
801         Qt build fix after r39670.
802
803         * bridge/qt/qt_class.cpp:
804         (JSC::Bindings::QtClass::fallbackObject):
805         * bridge/qt/qt_class.h:
806         * bridge/qt/qt_instance.cpp:
807         (JSC::Bindings::QtInstance::mark):
808         (JSC::Bindings::QtInstance::invokeMethod):
809         (JSC::Bindings::QtInstance::defaultValue):
810         (JSC::Bindings::QtInstance::stringValue):
811         (JSC::Bindings::QtInstance::numberValue):
812         (JSC::Bindings::QtInstance::booleanValue):
813         (JSC::Bindings::QtInstance::valueOf):
814         (JSC::Bindings::QtField::valueFromInstance):
815         (JSC::Bindings::QtField::setValueToInstance):
816         * bridge/qt/qt_instance.h:
817         * bridge/qt/qt_runtime.cpp:
818         (JSC::Bindings::valueRealType):
819         (JSC::Bindings::convertValueToQVariant):
820         (JSC::Bindings::convertQVariantToValue):
821         (JSC::Bindings::findMethodIndex):
822         (JSC::Bindings::QtRuntimeMetaMethod::call):
823         (JSC::Bindings::QtRuntimeMetaMethod::lengthGetter):
824         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
825         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
826         (JSC::Bindings::QtRuntimeConnectionMethod::call):
827         (JSC::Bindings::QtRuntimeConnectionMethod::lengthGetter):
828         (JSC::Bindings::::setValueAt):
829         (JSC::Bindings::::valueAt):
830         * bridge/qt/qt_runtime.h:
831         (JSC::Bindings::QtRuntimeMethod::createStructure):
832
833 2009-01-06  Justin Garcia  <justin.garcia@apple.com>
834
835         Reviewed by Oliver Hunt.
836
837         <rdar://problem/6391734> SnowLeopard: Crash doing Copy Image from context menu
838         
839         Can't create an automated test case for specific contextual menu items yet and
840         a normal Copy doesn't cause a crash.
841
842         * platform/mac/PasteboardMac.mm:
843         (WebCore::fileWrapperForImage): The SharedBuffer may not have platform data.  It may,
844         for example, have a purgeable or regular buffer.
845
846 2009-01-06  Mark Rowe  <mrowe@apple.com>
847
848         Reviewed by Geoff Garen.
849
850         Fix <https://bugs.webkit.org/show_bug.cgi?id=23157>.
851         Bug 23157: Crashes on Acid 3
852
853         * dom/Document.cpp:
854         (WebCore::Document::recalcStyle): Null-check the frame.
855
856 2009-01-05  Gavin Barraclough  <baraclough@apple.com>
857
858         Rubber Stamped by Oliver Hunt.
859
860         Replace all uses of JSValue* with new wrapper class, JSValuePtr.
861         See JavaScriptCore/ChangeLog for more detailed description.
862
863         * bindings/js/JSAttrCustom.cpp:
864         (WebCore::JSAttr::setValue):
865         * bindings/js/JSCSSRuleCustom.cpp:
866         (WebCore::toJS):
867         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
868         (WebCore::JSCSSStyleDeclaration::nameGetter):
869         (WebCore::JSCSSStyleDeclaration::customPut):
870         * bindings/js/JSCSSValueCustom.cpp:
871         (WebCore::toJS):
872         * bindings/js/JSCanvasPixelArrayCustom.h:
873         (WebCore::JSCanvasPixelArray::getByIndex):
874         (WebCore::JSCanvasPixelArray::indexSetter):
875         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
876         (WebCore::toJS):
877         (WebCore::toHTMLCanvasStyle):
878         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
879         (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
880         (WebCore::JSCanvasRenderingContext2D::fillStyle):
881         (WebCore::JSCanvasRenderingContext2D::setFillStyle):
882         (WebCore::JSCanvasRenderingContext2D::setFillColor):
883         (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
884         (WebCore::JSCanvasRenderingContext2D::strokeRect):
885         (WebCore::JSCanvasRenderingContext2D::drawImage):
886         (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
887         (WebCore::JSCanvasRenderingContext2D::setShadow):
888         (WebCore::JSCanvasRenderingContext2D::createPattern):
889         (WebCore::JSCanvasRenderingContext2D::putImageData):
890         (WebCore::JSCanvasRenderingContext2D::fillText):
891         (WebCore::JSCanvasRenderingContext2D::strokeText):
892         * bindings/js/JSClipboardCustom.cpp:
893         (WebCore::JSClipboard::types):
894         (WebCore::JSClipboard::clearData):
895         (WebCore::JSClipboard::getData):
896         (WebCore::JSClipboard::setData):
897         (WebCore::JSClipboard::setDragImage):
898         * bindings/js/JSConsoleCustom.cpp:
899         (WebCore::JSConsole::profiles):
900         * bindings/js/JSCustomPositionCallback.cpp:
901         (WebCore::JSCustomPositionCallback::handleEvent):
902         * bindings/js/JSCustomPositionErrorCallback.cpp:
903         (WebCore::JSCustomPositionErrorCallback::handleEvent):
904         * bindings/js/JSCustomSQLStatementCallback.cpp:
905         (WebCore::JSCustomSQLStatementCallback::handleEvent):
906         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
907         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
908         * bindings/js/JSCustomSQLTransactionCallback.cpp:
909         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
910         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
911         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
912         * bindings/js/JSCustomVoidCallback.cpp:
913         (WebCore::JSCustomVoidCallback::handleEvent):
914         (WebCore::toVoidCallback):
915         * bindings/js/JSCustomVoidCallback.h:
916         * bindings/js/JSCustomXPathNSResolver.cpp:
917         (WebCore::JSCustomXPathNSResolver::create):
918         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
919         * bindings/js/JSCustomXPathNSResolver.h:
920         * bindings/js/JSDOMApplicationCacheCustom.cpp:
921         (WebCore::JSDOMApplicationCache::add):
922         (WebCore::JSDOMApplicationCache::remove):
923         (WebCore::JSDOMApplicationCache::addEventListener):
924         (WebCore::JSDOMApplicationCache::removeEventListener):
925         * bindings/js/JSDOMBinding.cpp:
926         (WebCore::jsStringOrNull):
927         (WebCore::jsOwnedStringOrNull):
928         (WebCore::jsStringOrUndefined):
929         (WebCore::jsStringOrFalse):
930         (WebCore::valueToStringWithNullCheck):
931         (WebCore::valueToStringWithUndefinedOrNullCheck):
932         (WebCore::reportException):
933         (WebCore::reportCurrentException):
934         (WebCore::setDOMException):
935         (WebCore::objectToStringFunctionGetter):
936         * bindings/js/JSDOMBinding.h:
937         (WebCore::getDOMObjectWrapper):
938         (WebCore::getDOMNodeWrapper):
939         (WebCore::toJS):
940         * bindings/js/JSDOMGlobalObject.cpp:
941         (WebCore::JSDOMGlobalObject::findJSEventListener):
942         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
943         (WebCore::JSDOMGlobalObject::findJSUnprotectedEventListener):
944         (WebCore::JSDOMGlobalObject::findOrCreateJSUnprotectedEventListener):
945         * bindings/js/JSDOMGlobalObject.h:
946         * bindings/js/JSDOMWindowBase.cpp:
947         (WebCore::createWindow):
948         (WebCore::showModalDialog):
949         (jsDOMWindowBaseCrypto):
950         (jsDOMWindowBaseEvent):
951         (jsDOMWindowBaseImage):
952         (jsDOMWindowBaseMessageChannel):
953         (jsDOMWindowBaseOption):
954         (jsDOMWindowBaseXMLHttpRequest):
955         (jsDOMWindowBaseAudio):
956         (jsDOMWindowBaseWorker):
957         (jsDOMWindowBaseXSLTProcessor):
958         (setJSDOMWindowBaseEvent):
959         (setJSDOMWindowBaseAudio):
960         (setJSDOMWindowBaseImage):
961         (setJSDOMWindowBaseMessageChannel):
962         (setJSDOMWindowBaseOption):
963         (setJSDOMWindowBaseWorker):
964         (setJSDOMWindowBaseXMLHttpRequest):
965         (setJSDOMWindowBaseXSLTProcessor):
966         (WebCore::JSDOMWindowBase::childFrameGetter):
967         (WebCore::JSDOMWindowBase::indexGetter):
968         (WebCore::JSDOMWindowBase::namedItemGetter):
969         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
970         (WebCore::JSDOMWindowBase::put):
971         (WebCore::JSDOMWindowBase::clear):
972         (windowProtoFuncOpen):
973         (windowProtoFuncShowModalDialog):
974         (windowProtoFuncNotImplemented):
975         (WebCore::JSDOMWindowBase::setReturnValueSlot):
976         (WebCore::JSDOMWindowBase::installTimeout):
977         (WebCore::toJS):
978         (WebCore::toJSDOMWindow):
979         * bindings/js/JSDOMWindowBase.h:
980         * bindings/js/JSDOMWindowCustom.cpp:
981         (WebCore::JSDOMWindow::lookupGetter):
982         (WebCore::JSDOMWindow::lookupSetter):
983         (WebCore::JSDOMWindow::setLocation):
984         (WebCore::JSDOMWindow::postMessage):
985         (WebCore::setTimeoutOrInterval):
986         (WebCore::JSDOMWindow::setTimeout):
987         (WebCore::JSDOMWindow::clearTimeout):
988         (WebCore::JSDOMWindow::setInterval):
989         (WebCore::JSDOMWindow::clearInterval):
990         (WebCore::JSDOMWindow::atob):
991         (WebCore::JSDOMWindow::btoa):
992         (WebCore::JSDOMWindow::addEventListener):
993         (WebCore::JSDOMWindow::removeEventListener):
994         (WebCore::toDOMWindow):
995         (WebCore::nonCachingStaticCloseFunctionGetter):
996         (WebCore::nonCachingStaticBlurFunctionGetter):
997         (WebCore::nonCachingStaticFocusFunctionGetter):
998         (WebCore::nonCachingStaticPostMessageFunctionGetter):
999         * bindings/js/JSDOMWindowCustom.h:
1000         (WebCore::JSDOMWindow::customPut):
1001         * bindings/js/JSDOMWindowShell.cpp:
1002         (WebCore::JSDOMWindowShell::put):
1003         (WebCore::JSDOMWindowShell::putWithAttributes):
1004         (WebCore::JSDOMWindowShell::lookupGetter):
1005         (WebCore::JSDOMWindowShell::lookupSetter):
1006         (WebCore::toJS):
1007         * bindings/js/JSDOMWindowShell.h:
1008         (WebCore::JSDOMWindowShell::createStructure):
1009         * bindings/js/JSDatabaseCustom.cpp:
1010         (WebCore::JSDatabase::changeVersion):
1011         (WebCore::JSDatabase::transaction):
1012         * bindings/js/JSDocumentCustom.cpp:
1013         (WebCore::JSDocument::location):
1014         (WebCore::JSDocument::setLocation):
1015         (WebCore::toJS):
1016         * bindings/js/JSElementCustom.cpp:
1017         (WebCore::JSElement::setAttribute):
1018         (WebCore::JSElement::setAttributeNode):
1019         (WebCore::JSElement::setAttributeNS):
1020         (WebCore::JSElement::setAttributeNodeNS):
1021         (WebCore::toJSNewlyCreated):
1022         * bindings/js/JSEventCustom.cpp:
1023         (WebCore::JSEvent::clipboardData):
1024         (WebCore::toJS):
1025         * bindings/js/JSEventListener.cpp:
1026         (WebCore::JSAbstractEventListener::handleEvent):
1027         (WebCore::eventParameterName):
1028         (WebCore::JSLazyEventListener::parseCode):
1029         * bindings/js/JSEventTarget.cpp:
1030         (WebCore::toJS):
1031         * bindings/js/JSEventTarget.h:
1032         * bindings/js/JSEventTargetBase.h:
1033         * bindings/js/JSEventTargetNodeCustom.cpp:
1034         (WebCore::JSEventTargetNode::addEventListener):
1035         (WebCore::JSEventTargetNode::removeEventListener):
1036         * bindings/js/JSGeolocationCustom.cpp:
1037         (WebCore::createPositionOptions):
1038         (WebCore::JSGeolocation::getCurrentPosition):
1039         (WebCore::JSGeolocation::watchPosition):
1040         * bindings/js/JSHTMLAllCollection.h:
1041         (WebCore::JSHTMLAllCollection::createStructure):
1042         * bindings/js/JSHTMLAppletElementCustom.cpp:
1043         (WebCore::JSHTMLAppletElement::customPut):
1044         (WebCore::JSHTMLAppletElement::nameGetter):
1045         * bindings/js/JSHTMLCollectionCustom.cpp:
1046         (WebCore::getNamedItems):
1047         (WebCore::callHTMLCollection):
1048         (WebCore::JSHTMLCollection::nameGetter):
1049         (WebCore::JSHTMLCollection::item):
1050         (WebCore::JSHTMLCollection::namedItem):
1051         (WebCore::toJS):
1052         * bindings/js/JSHTMLDocumentCustom.cpp:
1053         (WebCore::JSHTMLDocument::nameGetter):
1054         (WebCore::JSHTMLDocument::all):
1055         (WebCore::JSHTMLDocument::setAll):
1056         (WebCore::JSHTMLDocument::open):
1057         (WebCore::JSHTMLDocument::write):
1058         (WebCore::JSHTMLDocument::writeln):
1059         * bindings/js/JSHTMLEmbedElementCustom.cpp:
1060         (WebCore::JSHTMLEmbedElement::customPut):
1061         (WebCore::JSHTMLEmbedElement::nameGetter):
1062         * bindings/js/JSHTMLFormElementCustom.cpp:
1063         (WebCore::JSHTMLFormElement::nameGetter):
1064         * bindings/js/JSHTMLFrameElementCustom.cpp:
1065         (WebCore::JSHTMLFrameElement::setSrc):
1066         (WebCore::JSHTMLFrameElement::setLocation):
1067         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1068         (WebCore::JSHTMLFrameSetElement::nameGetter):
1069         * bindings/js/JSHTMLIFrameElementCustom.cpp:
1070         (WebCore::JSHTMLIFrameElement::setSrc):
1071         * bindings/js/JSHTMLInputElementCustom.cpp:
1072         (WebCore::JSHTMLInputElement::selectionStart):
1073         (WebCore::JSHTMLInputElement::selectionEnd):
1074         * bindings/js/JSHTMLObjectElementCustom.cpp:
1075         (WebCore::JSHTMLObjectElement::customPut):
1076         (WebCore::JSHTMLObjectElement::nameGetter):
1077         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1078         (WebCore::JSHTMLOptionsCollection::length):
1079         (WebCore::JSHTMLOptionsCollection::setLength):
1080         (WebCore::JSHTMLOptionsCollection::indexSetter):
1081         (WebCore::JSHTMLOptionsCollection::add):
1082         (WebCore::JSHTMLOptionsCollection::remove):
1083         * bindings/js/JSHTMLSelectElementCustom.cpp:
1084         (WebCore::JSHTMLSelectElement::remove):
1085         (WebCore::selectIndexSetter):
1086         (WebCore::JSHTMLSelectElement::indexSetter):
1087         * bindings/js/JSHTMLSelectElementCustom.h:
1088         * bindings/js/JSHistoryCustom.cpp:
1089         (WebCore::nonCachingStaticBackFunctionGetter):
1090         (WebCore::nonCachingStaticForwardFunctionGetter):
1091         (WebCore::nonCachingStaticGoFunctionGetter):
1092         (WebCore::JSHistory::customPut):
1093         * bindings/js/JSImageDataCustom.cpp:
1094         (WebCore::toJS):
1095         * bindings/js/JSInspectedObjectWrapper.cpp:
1096         (WebCore::JSInspectedObjectWrapper::wrap):
1097         (WebCore::JSInspectedObjectWrapper::prepareIncomingValue):
1098         * bindings/js/JSInspectedObjectWrapper.h:
1099         (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue):
1100         * bindings/js/JSInspectorCallbackWrapper.cpp:
1101         (WebCore::JSInspectorCallbackWrapper::wrap):
1102         (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue):
1103         * bindings/js/JSInspectorCallbackWrapper.h:
1104         (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue):
1105         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1106         (WebCore::JSJavaScriptCallFrame::evaluate):
1107         (WebCore::JSJavaScriptCallFrame::thisObject):
1108         (WebCore::JSJavaScriptCallFrame::type):
1109         (WebCore::JSJavaScriptCallFrame::scopeChain):
1110         * bindings/js/JSLocationCustom.cpp:
1111         (WebCore::nonCachingStaticReplaceFunctionGetter):
1112         (WebCore::nonCachingStaticReloadFunctionGetter):
1113         (WebCore::nonCachingStaticAssignFunctionGetter):
1114         (WebCore::JSLocation::customPut):
1115         (WebCore::JSLocation::setHref):
1116         (WebCore::JSLocation::setProtocol):
1117         (WebCore::JSLocation::setHost):
1118         (WebCore::JSLocation::setHostname):
1119         (WebCore::JSLocation::setPort):
1120         (WebCore::JSLocation::setPathname):
1121         (WebCore::JSLocation::setSearch):
1122         (WebCore::JSLocation::setHash):
1123         (WebCore::JSLocation::replace):
1124         (WebCore::JSLocation::reload):
1125         (WebCore::JSLocation::assign):
1126         (WebCore::JSLocation::toString):
1127         * bindings/js/JSMessageChannelConstructor.h:
1128         * bindings/js/JSMessagePortCustom.cpp:
1129         (WebCore::JSMessagePort::startConversation):
1130         (WebCore::JSMessagePort::addEventListener):
1131         (WebCore::JSMessagePort::removeEventListener):
1132         * bindings/js/JSMimeTypeArrayCustom.cpp:
1133         (WebCore::JSMimeTypeArray::nameGetter):
1134         * bindings/js/JSNamedNodeMapCustom.cpp:
1135         (WebCore::JSNamedNodeMap::nameGetter):
1136         * bindings/js/JSNamedNodesCollection.cpp:
1137         (WebCore::JSNamedNodesCollection::lengthGetter):
1138         (WebCore::JSNamedNodesCollection::indexGetter):
1139         * bindings/js/JSNamedNodesCollection.h:
1140         (WebCore::JSNamedNodesCollection::createStructure):
1141         * bindings/js/JSNavigatorCustom.cpp:
1142         (WebCore::needsYouTubeQuirk):
1143         (WebCore::JSNavigator::appVersion):
1144         * bindings/js/JSNodeCustom.cpp:
1145         (WebCore::JSNode::insertBefore):
1146         (WebCore::JSNode::replaceChild):
1147         (WebCore::JSNode::removeChild):
1148         (WebCore::JSNode::appendChild):
1149         (WebCore::createWrapper):
1150         (WebCore::toJSNewlyCreated):
1151         (WebCore::toJS):
1152         * bindings/js/JSNodeFilterCondition.cpp:
1153         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
1154         (WebCore::JSNodeFilterCondition::acceptNode):
1155         * bindings/js/JSNodeFilterCondition.h:
1156         (WebCore::JSNodeFilterCondition::create):
1157         * bindings/js/JSNodeFilterCustom.cpp:
1158         (WebCore::JSNodeFilter::acceptNode):
1159         (WebCore::toNodeFilter):
1160         * bindings/js/JSNodeIteratorCustom.cpp:
1161         (WebCore::JSNodeIterator::nextNode):
1162         (WebCore::JSNodeIterator::previousNode):
1163         * bindings/js/JSNodeListCustom.cpp:
1164         (WebCore::callNodeList):
1165         (WebCore::JSNodeList::nameGetter):
1166         * bindings/js/JSPluginArrayCustom.cpp:
1167         (WebCore::JSPluginArray::nameGetter):
1168         * bindings/js/JSPluginCustom.cpp:
1169         (WebCore::JSPlugin::nameGetter):
1170         * bindings/js/JSPluginElementFunctions.cpp:
1171         (WebCore::runtimeObjectGetter):
1172         (WebCore::runtimeObjectPropertyGetter):
1173         (WebCore::runtimeObjectCustomPut):
1174         (WebCore::callPlugin):
1175         * bindings/js/JSPluginElementFunctions.h:
1176         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1177         (WebCore::JSQuarantinedObjectWrapper::asWrapper):
1178         (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter):
1179         (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot):
1180         (WebCore::JSQuarantinedObjectWrapper::put):
1181         (WebCore::JSQuarantinedObjectWrapper::construct):
1182         (WebCore::JSQuarantinedObjectWrapper::hasInstance):
1183         (WebCore::JSQuarantinedObjectWrapper::call):
1184         * bindings/js/JSQuarantinedObjectWrapper.h:
1185         (WebCore::JSQuarantinedObjectWrapper::createStructure):
1186         * bindings/js/JSRGBColor.cpp:
1187         (WebCore::getJSRGBColor):
1188         (jsRGBColorRed):
1189         (jsRGBColorGreen):
1190         (jsRGBColorBlue):
1191         * bindings/js/JSRGBColor.h:
1192         (WebCore::JSRGBColor::createStructure):
1193         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1194         (WebCore::JSSQLResultSetRowList::item):
1195         * bindings/js/JSSQLTransactionCustom.cpp:
1196         (WebCore::JSSQLTransaction::executeSql):
1197         * bindings/js/JSSVGElementInstanceCustom.cpp:
1198         (WebCore::JSSVGElementInstance::addEventListener):
1199         (WebCore::JSSVGElementInstance::removeEventListener):
1200         * bindings/js/JSSVGLengthCustom.cpp:
1201         (WebCore::JSSVGLength::value):
1202         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1203         * bindings/js/JSSVGMatrixCustom.cpp:
1204         (WebCore::JSSVGMatrix::multiply):
1205         (WebCore::JSSVGMatrix::inverse):
1206         (WebCore::JSSVGMatrix::translate):
1207         (WebCore::JSSVGMatrix::scale):
1208         (WebCore::JSSVGMatrix::scaleNonUniform):
1209         (WebCore::JSSVGMatrix::rotate):
1210         (WebCore::JSSVGMatrix::rotateFromVector):
1211         (WebCore::JSSVGMatrix::flipX):
1212         (WebCore::JSSVGMatrix::flipY):
1213         (WebCore::JSSVGMatrix::skewX):
1214         (WebCore::JSSVGMatrix::skewY):
1215         * bindings/js/JSSVGPathSegCustom.cpp:
1216         (WebCore::toJS):
1217         * bindings/js/JSSVGPathSegListCustom.cpp:
1218         (WebCore::JSSVGPathSegList::clear):
1219         (WebCore::JSSVGPathSegList::initialize):
1220         (WebCore::JSSVGPathSegList::getItem):
1221         (WebCore::JSSVGPathSegList::insertItemBefore):
1222         (WebCore::JSSVGPathSegList::replaceItem):
1223         (WebCore::JSSVGPathSegList::removeItem):
1224         (WebCore::JSSVGPathSegList::appendItem):
1225         * bindings/js/JSSVGPointListCustom.cpp:
1226         (WebCore::finishGetter):
1227         (WebCore::finishSetter):
1228         (WebCore::finishSetterReadOnlyResult):
1229         (WebCore::JSSVGPointList::clear):
1230         (WebCore::JSSVGPointList::initialize):
1231         (WebCore::JSSVGPointList::getItem):
1232         (WebCore::JSSVGPointList::insertItemBefore):
1233         (WebCore::JSSVGPointList::replaceItem):
1234         (WebCore::JSSVGPointList::removeItem):
1235         (WebCore::JSSVGPointList::appendItem):
1236         * bindings/js/JSSVGTransformListCustom.cpp:
1237         (WebCore::finishGetter):
1238         (WebCore::finishSetter):
1239         (WebCore::finishSetterReadOnlyResult):
1240         (WebCore::JSSVGTransformList::clear):
1241         (WebCore::JSSVGTransformList::initialize):
1242         (WebCore::JSSVGTransformList::getItem):
1243         (WebCore::JSSVGTransformList::insertItemBefore):
1244         (WebCore::JSSVGTransformList::replaceItem):
1245         (WebCore::JSSVGTransformList::removeItem):
1246         (WebCore::JSSVGTransformList::appendItem):
1247         * bindings/js/JSStorageCustom.cpp:
1248         (WebCore::JSStorage::nameGetter):
1249         (WebCore::JSStorage::deleteProperty):
1250         (WebCore::JSStorage::customPut):
1251         * bindings/js/JSStyleSheetCustom.cpp:
1252         (WebCore::toJS):
1253         * bindings/js/JSStyleSheetListCustom.cpp:
1254         (WebCore::JSStyleSheetList::nameGetter):
1255         * bindings/js/JSTextCustom.cpp:
1256         (WebCore::toJSNewlyCreated):
1257         * bindings/js/JSTreeWalkerCustom.cpp:
1258         (WebCore::JSTreeWalker::parentNode):
1259         (WebCore::JSTreeWalker::firstChild):
1260         (WebCore::JSTreeWalker::lastChild):
1261         (WebCore::JSTreeWalker::nextSibling):
1262         (WebCore::JSTreeWalker::previousSibling):
1263         (WebCore::JSTreeWalker::previousNode):
1264         (WebCore::JSTreeWalker::nextNode):
1265         * bindings/js/JSWorkerContextBase.cpp:
1266         (WebCore::JSWorkerContextBase::put):
1267         * bindings/js/JSWorkerContextBase.h:
1268         * bindings/js/JSWorkerContextCustom.cpp:
1269         (WebCore::JSWorkerContext::self):
1270         (WebCore::JSWorkerContext::setSelf):
1271         (WebCore::JSWorkerContext::addEventListener):
1272         (WebCore::JSWorkerContext::removeEventListener):
1273         * bindings/js/JSWorkerCustom.cpp:
1274         (WebCore::JSWorker::addEventListener):
1275         (WebCore::JSWorker::removeEventListener):
1276         * bindings/js/JSXMLHttpRequestCustom.cpp:
1277         (WebCore::JSXMLHttpRequest::open):
1278         (WebCore::JSXMLHttpRequest::setRequestHeader):
1279         (WebCore::JSXMLHttpRequest::send):
1280         (WebCore::JSXMLHttpRequest::getResponseHeader):
1281         (WebCore::JSXMLHttpRequest::overrideMimeType):
1282         (WebCore::JSXMLHttpRequest::addEventListener):
1283         (WebCore::JSXMLHttpRequest::removeEventListener):
1284         (WebCore::JSXMLHttpRequest::responseText):
1285         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1286         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1287         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1288         * bindings/js/JSXSLTProcessorCustom.cpp:
1289         (WebCore::JSXSLTProcessor::importStylesheet):
1290         (WebCore::JSXSLTProcessor::transformToFragment):
1291         (WebCore::JSXSLTProcessor::transformToDocument):
1292         (WebCore::JSXSLTProcessor::setParameter):
1293         (WebCore::JSXSLTProcessor::getParameter):
1294         (WebCore::JSXSLTProcessor::removeParameter):
1295         * bindings/js/ScheduledAction.cpp:
1296         (WebCore::ScheduledAction::ScheduledAction):
1297         (WebCore::ScheduledAction::execute):
1298         * bindings/js/ScheduledAction.h:
1299         * bindings/js/ScriptCallStack.cpp:
1300         (WebCore::ScriptCallStack::ScriptCallStack):
1301         (WebCore::ScriptCallStack::initialize):
1302         * bindings/js/ScriptController.cpp:
1303         (WebCore::ScriptController::createScriptObjectForPluginElement):
1304         * bindings/js/ScriptValue.cpp:
1305         (WebCore::ScriptValue::getString):
1306         (WebCore::ScriptValue::isNull):
1307         (WebCore::ScriptValue::isUndefined):
1308         * bindings/js/ScriptValue.h:
1309         (WebCore::ScriptValue::ScriptValue):
1310         (WebCore::ScriptValue::jsValue):
1311         * bindings/objc/WebScriptObject.mm:
1312         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1313         (-[WebScriptObject evaluateWebScript:]):
1314         (-[WebScriptObject valueForKey:]):
1315         (-[WebScriptObject webScriptValueAtIndex:]):
1316         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1317         * bindings/objc/WebScriptObjectPrivate.h:
1318         * bindings/scripts/CodeGeneratorJS.pm:
1319         * bridge/NP_jsobject.cpp:
1320         (_NPN_InvokeDefault):
1321         (_NPN_Invoke):
1322         (_NPN_Evaluate):
1323         (_NPN_GetProperty):
1324         (_NPN_HasMethod):
1325         (_NPN_Construct):
1326         * bridge/c/c_instance.cpp:
1327         (JSC::Bindings::CInstance::invokeMethod):
1328         (JSC::Bindings::CInstance::invokeDefaultMethod):
1329         (JSC::Bindings::CInstance::invokeConstruct):
1330         (JSC::Bindings::CInstance::defaultValue):
1331         (JSC::Bindings::CInstance::stringValue):
1332         (JSC::Bindings::CInstance::numberValue):
1333         (JSC::Bindings::CInstance::booleanValue):
1334         (JSC::Bindings::CInstance::valueOf):
1335         * bridge/c/c_instance.h:
1336         * bridge/c/c_runtime.cpp:
1337         (JSC::Bindings::CField::valueFromInstance):
1338         (JSC::Bindings::CField::setValueToInstance):
1339         * bridge/c/c_runtime.h:
1340         * bridge/c/c_utility.cpp:
1341         (JSC::Bindings::convertValueToNPVariant):
1342         (JSC::Bindings::convertNPVariantToValue):
1343         * bridge/c/c_utility.h:
1344         * bridge/jni/jni_instance.cpp:
1345         (JavaInstance::stringValue):
1346         (JavaInstance::numberValue):
1347         (JavaInstance::booleanValue):
1348         (JavaInstance::invokeMethod):
1349         (JavaInstance::defaultValue):
1350         (JavaInstance::valueOf):
1351         * bridge/jni/jni_instance.h:
1352         * bridge/jni/jni_jsobject.h:
1353         * bridge/jni/jni_jsobject.mm:
1354         (JavaJSObject::call):
1355         (JavaJSObject::eval):
1356         (JavaJSObject::getMember):
1357         (JavaJSObject::getSlot):
1358         (JavaJSObject::convertValueToJObject):
1359         (JavaJSObject::convertJObjectToValue):
1360         * bridge/jni/jni_objc.mm:
1361         (JSC::Bindings::dispatchJNICall):
1362         * bridge/jni/jni_runtime.cpp:
1363         (JavaArray::convertJObjectToArray):
1364         (JavaField::dispatchValueFromInstance):
1365         (JavaField::valueFromInstance):
1366         (JavaField::dispatchSetValueToInstance):
1367         (JavaField::setValueToInstance):
1368         (JavaArray::setValueAt):
1369         (JavaArray::valueAt):
1370         * bridge/jni/jni_runtime.h:
1371         * bridge/jni/jni_utility.cpp:
1372         (JSC::Bindings::convertArrayInstanceToJavaArray):
1373         (JSC::Bindings::convertValueToJValue):
1374         * bridge/jni/jni_utility.h:
1375         * bridge/objc/WebScriptObject.h:
1376         * bridge/objc/objc_class.h:
1377         * bridge/objc/objc_class.mm:
1378         (JSC::Bindings::ObjcClass::fallbackObject):
1379         * bridge/objc/objc_instance.h:
1380         * bridge/objc/objc_instance.mm:
1381         (ObjcInstance::invokeMethod):
1382         (ObjcInstance::invokeDefaultMethod):
1383         (ObjcInstance::setValueOfUndefinedField):
1384         (ObjcInstance::getValueOfUndefinedField):
1385         (ObjcInstance::defaultValue):
1386         (ObjcInstance::stringValue):
1387         (ObjcInstance::numberValue):
1388         (ObjcInstance::booleanValue):
1389         (ObjcInstance::valueOf):
1390         * bridge/objc/objc_runtime.h:
1391         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
1392         * bridge/objc/objc_runtime.mm:
1393         (JSC::Bindings::ObjcField::valueFromInstance):
1394         (JSC::Bindings::convertValueToObjcObject):
1395         (JSC::Bindings::ObjcField::setValueToInstance):
1396         (JSC::Bindings::ObjcArray::setValueAt):
1397         (JSC::Bindings::ObjcArray::valueAt):
1398         (JSC::Bindings::ObjcFallbackObjectImp::put):
1399         (JSC::Bindings::callObjCFallbackObject):
1400         (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
1401         * bridge/objc/objc_utility.h:
1402         * bridge/objc/objc_utility.mm:
1403         (JSC::Bindings::convertValueToObjcValue):
1404         (JSC::Bindings::convertNSStringToString):
1405         (JSC::Bindings::convertObjcValueToValue):
1406         * bridge/runtime.cpp:
1407         (JSC::Bindings::Instance::getValueOfField):
1408         (JSC::Bindings::Instance::setValueOfField):
1409         * bridge/runtime.h:
1410         (JSC::Bindings::Class::fallbackObject):
1411         (JSC::Bindings::Instance::getValueOfUndefinedField):
1412         (JSC::Bindings::Instance::setValueOfUndefinedField):
1413         (JSC::Bindings::Instance::invokeDefaultMethod):
1414         (JSC::Bindings::Instance::invokeConstruct):
1415         (JSC::Bindings::Instance::valueOf):
1416         * bridge/runtime_array.cpp:
1417         (JSC::RuntimeArray::lengthGetter):
1418         (JSC::RuntimeArray::indexGetter):
1419         (JSC::RuntimeArray::put):
1420         * bridge/runtime_array.h:
1421         (JSC::RuntimeArray::createStructure):
1422         * bridge/runtime_method.cpp:
1423         (JSC::RuntimeMethod::lengthGetter):
1424         (JSC::callRuntimeMethod):
1425         * bridge/runtime_method.h:
1426         (JSC::RuntimeMethod::createStructure):
1427         * bridge/runtime_object.cpp:
1428         (JSC::RuntimeObjectImp::fallbackObjectGetter):
1429         (JSC::RuntimeObjectImp::fieldGetter):
1430         (JSC::RuntimeObjectImp::methodGetter):
1431         (JSC::RuntimeObjectImp::put):
1432         (JSC::RuntimeObjectImp::defaultValue):
1433         (JSC::callRuntimeObject):
1434         (JSC::callRuntimeConstructor):
1435         * bridge/runtime_object.h:
1436         (JSC::RuntimeObjectImp::createStructure):
1437         * inspector/InspectorController.cpp:
1438         * inspector/JavaScriptCallFrame.cpp:
1439         (WebCore::JavaScriptCallFrame::evaluate):
1440         * inspector/JavaScriptCallFrame.h:
1441         * inspector/JavaScriptProfile.cpp:
1442         (WebCore::toJS):
1443         * inspector/JavaScriptProfile.h:
1444         * inspector/JavaScriptProfileNode.cpp:
1445         (WebCore::toJS):
1446         * inspector/JavaScriptProfileNode.h:
1447         * xml/XMLHttpRequest.cpp:
1448         (WebCore::XMLHttpRequest::dropProtection):
1449
1450 2009-01-06  Pierre-Olivier Latour  <pol@apple.com>
1451
1452         Reviewed by Darin Adler.
1453
1454         Added new API on AnimationController::numberOfActiveAnimations() to be used by DRT.
1455
1456         https://bugs.webkit.org/show_bug.cgi?id=23126
1457
1458         Test: animations/animation-controller-drt-api.html
1459
1460         * WebCore.base.exp:
1461         * page/animation/AnimationController.cpp:
1462         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
1463         (WebCore::AnimationController::numberOfActiveAnimations):
1464         * page/animation/AnimationController.h:
1465         * page/animation/CompositeAnimation.cpp:
1466         (WebCore::CompositeAnimationPrivate::numberOfActiveAnimations):
1467         (WebCore::CompositeAnimation::numberOfActiveAnimations):
1468         * page/animation/CompositeAnimation.h:
1469
1470 2009-01-06  Eric Seidel  <eric@webkit.org>
1471
1472         Reviewed by Gavin Barraclough.
1473
1474         Upstream 3 more files to get the WebCore-Chromium build a bit further.
1475
1476         * WebCore.scons:
1477         * page/chromium/AccessibilityObjectChromium.cpp: Added.
1478         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
1479         * page/chromium/AccessibilityObjectWrapper.h: Added.
1480         (WebCore::AccessibilityObjectWrapper::~AccessibilityObjectWrapper):
1481         (WebCore::AccessibilityObjectWrapper::attached):
1482         (WebCore::AccessibilityObjectWrapper::accessibilityObject):
1483         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper):
1484         * platform/chromium/PasteboardPrivate.h: Added.
1485         (WebCore::PasteboardPrivate::):
1486
1487 2009-01-06  Chris Marrin  <cmarrin@apple.com>
1488
1489         Reviewed by David Hyatt.
1490
1491         Tests: animations/simultaneous-start-left.html
1492                animations/simultaneous-start-transform.html
1493
1494         Fixed https://bugs.webkit.org/show_bug.cgi?id=22870
1495  
1496         I added calls beginAnimationUpdate() and endAnimationUpdate() calls
1497         to AnimationController. These are called by Document at the start
1498         and end of the recalcStyle cycle. Right now, I'm just using the 
1499         beginAnimationUpdate() method to reset an animation time value.
1500         The first time the animation time is accessed after this reset I set
1501         it to the currentTime. So all animations in that cycle get the same
1502         start time. 
1503
1504         The test cases checked in test this, but in the case of the 'left'
1505         test it actually doesn't make any difference in most cases. This is
1506         because values are clamped to whole pixels, so the start times would 
1507         have to be pretty far off for the test to fail using the old
1508         currentTime() model. Still, under really heavy load, it's possible for
1509         the test to fail without these changes.
1510
1511         The 'transform' test is another story. It animates to the full resolution
1512         of a floating point number, so the test fails miserably without this
1513         fix.
1514
1515         * dom/Document.cpp:
1516         (WebCore::Document::recalcStyle):
1517         * page/animation/AnimationBase.cpp:
1518         (WebCore::AnimationBase::updateStateMachine):
1519         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1520         (WebCore::AnimationBase::willNeedService):
1521         (WebCore::AnimationBase::progress):
1522         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
1523         (WebCore::AnimationBase::beginAnimationUpdateTime):
1524         * page/animation/AnimationBase.h:
1525         * page/animation/AnimationController.cpp:
1526         (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
1527         (WebCore::AnimationControllerPrivate::setBeginAnimationUpdateTime):
1528         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
1529         (WebCore::AnimationController::updateAnimations):
1530         (WebCore::AnimationController::beginAnimationUpdateTime):
1531         (WebCore::AnimationController::beginAnimationUpdate):
1532         (WebCore::AnimationController::endAnimationUpdate):
1533         * page/animation/AnimationController.h:
1534         * page/animation/KeyframeAnimation.cpp:
1535         (WebCore::KeyframeAnimation::animate):
1536
1537 2009-01-06  Julien Chaffraix  <jchaffraix@webkit.org>
1538
1539         Reviewed by Nikolas Zimmermann.
1540
1541         Bug 22858: Simplify make_names.pl code for avoiding multiple definitions or inclusions
1542         https://bugs.webkit.org/show_bug.cgi?id=22858
1543
1544         I had introduced an awkward situation using hasCustomJSWrapper and
1545         sometimes boolean parameter in order to ensure JS wrapper generated once
1546         or header included once.
1547
1548         Simplified the code by using a %seenTag hash to detect multiple definitions
1549         or inclusions and skipping it.
1550
1551         Also cleaned up a bit make_names.pl by using more explicit names and moving
1552         code to where it belongs.
1553
1554         * dom/make_names.pl:
1555         * html/HTMLTagNames.in: Necessary changes that were not detected by
1556         the previous syntax but will be required for autogenerating HTMLElementFactory.
1557
1558 2009-01-06  Anders Carlsson  <andersca@apple.com>
1559
1560         Reviewed by Sam Weinig.
1561
1562         Add a way for frame loader clients to always create a PluginDocument, regardless of 
1563         the real document MIME type.
1564         
1565         * loader/FrameLoader.cpp:
1566         (WebCore::FrameLoader::begin):
1567         (WebCore::FrameLoader::shouldUsePlugin):
1568         * loader/FrameLoaderClient.h:
1569         (WebCore::FrameLoaderClient::shouldUsePluginDocument):
1570
1571 2009-01-06  Dean Jackson  <dino@apple.com>
1572
1573         Reviewed by Dave Hyatt.
1574
1575         Extend Media Queries to cover transitions,
1576         animations, transform-2d and transform-3d
1577         http://webkit.org/specs/MediaQueriesExtensions.html
1578         Note that the implementation uses -webkit- prefixes
1579         even though the spec doesn't have them.
1580         https://bugs.webkit.org/show_bug.cgi?id=22494
1581
1582         Tests: fast/media/mq-animation.html
1583                fast/media/mq-transform-01.html
1584                fast/media/mq-transform-02.html
1585                fast/media/mq-transform-03.html
1586                fast/media/mq-transform-04.html
1587                fast/media/mq-transition.html
1588
1589         * css/MediaFeatureNames.h:
1590         * css/MediaQueryEvaluator.cpp:
1591         (WebCore::animationMediaFeatureEval):
1592         (WebCore::transitionMediaFeatureEval):
1593         (WebCore::transform_2dMediaFeatureEval):
1594         (WebCore::transform_3dMediaFeatureEval):
1595
1596 2009-01-06  Eric Seidel  <eric@webkit.org>
1597
1598         Reviewed by Oliver Hunt.
1599
1600         Bring the Chromium-WebCore build closer to building
1601         by upstreaming PlatformWidget.h add adding the JSC
1602         plugin bridge files to the build.
1603
1604         * WebCore.scons:
1605         * platform/chromium/PlatformWidget.h: Added.
1606
1607 2009-01-06  Eric Seidel  <eric@webkit.org>
1608
1609         Build fix only, no review.
1610
1611         Bring the Chromium-WebCore build back closer to building
1612         by adding files from recent commits.
1613
1614         * WebCore.scons:
1615
1616 2009-01-06  Alexey Proskuryakov  <ap@webkit.org>
1617
1618         Reviewed by Darin Adler.
1619
1620         <rdar://problem/6474973> REGRESSION: PLT ~2% slower due to 39465 (consolidate thread data)
1621
1622         I could not reproduce the slowdown on my PowerPC test machine, but the change should bring
1623         performance back.
1624
1625         * platform/ThreadGlobalData.cpp: (WebCore::threadGlobalData): Don't use AtomicallyInitializedStatic.
1626         Prior to r39465, it was only used for cached converters, which was necessary because the
1627         first access to ICU or TEC one could happen on a secondary thread, but now they are all
1628         initialized from ThreadGlobalData constructor.
1629
1630 2009-01-06  David Smith  <catfish.man@gmail.com>
1631
1632         Reviewed by Darin Adler.
1633         
1634         https://bugs.webkit.org/show_bug.cgi?id=23129
1635         Devirtualize Node::childNodes().
1636
1637 2009-01-06  Simon Hausmann  <simon.hausmann@nokia.com>
1638
1639         Unreviewed build fix.
1640
1641         Fix the Qt build with Qt 4.4.x, the HTTP-only cookie support was
1642         added in Qt 4.5.
1643
1644         * platform/qt/CookieJarQt.cpp:
1645         (WebCore::setCookies):
1646         (WebCore::cookies):
1647
1648 2009-01-06  Zalan Bujtas  <zbujtas@gmail.com>
1649
1650         Reviewed by David Kilzer.
1651
1652         https://bugs.webkit.org/show_bug.cgi?id=23133
1653         Fix SVG disabled build. Move 'pointer-events' from SVGCSSPropertyNames.in to
1654         CSSPropertyNames.in and move PointerEvents functions out of #if ENABLE(SVG)
1655
1656         NOTE: Property name fixes landed as part of r39648.
1657
1658         * css/CSSPrimitiveValueMappings.h:
1659         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1660         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
1661         * css/CSSPropertyNames.in:
1662         * css/SVGCSSPropertyNames.in:
1663
1664 2009-01-06  David Kilzer  <ddkilzer@apple.com>
1665
1666         BUILD FIX (r39634): Fix build for non-SVG builds (Wx)
1667
1668         * css/CSSPropertyNames.in: Added 'pointer-events'.
1669         * css/SVGCSSPropertyNames.in: Commented out pointer-events
1670         since it's now a plain CSS property.
1671
1672 2009-01-06  Simon Hausmann  <simon.hausmann@nokia.com>
1673
1674         Reviewed by Lars Knoll.
1675
1676         Added support for HTTP-only cookies to the Qt build.
1677
1678         * platform/qt/CookieJarQt.cpp:
1679         (WebCore::setCookies): Don't set HTTP-only cookies through the DOM.
1680         (WebCore::cookies): Don't return HTTP-only cookies to the DOM.
1681
1682 2009-01-05  David Smith  <catfish.man@gmail.com>
1683
1684         Reviewed by Oliver Hunt.
1685
1686         https://bugs.webkit.org/show_bug.cgi?id=23084
1687         Avoid redundant AtomicString conversions
1688
1689         * dom/Node.cpp: Create an AtomicString early to avoid converting twice
1690         (WebCore::Node::getElementsByTagNameNS):
1691         * dom/QualifiedName.h: Use the appropriate AtomicString constructor instead of converting from a String
1692
1693 2009-01-05  Simon Fraser  <simon.fraser@apple.com>
1694
1695         Reviewed by Dave Hyatt
1696
1697         https://bugs.webkit.org/show_bug.cgi?id=22985
1698         
1699         Add an assertion that clip rects are being used when painting with the same
1700         rootLayer that they were computed with.
1701         
1702         Fix two issues detected by the assertion:
1703
1704         RenderLayer::updateClipRects() should not unconditionally update the clip rects
1705         on its parent, but stop when reaching rootLayer (just like calculateClipRects()).
1706         
1707         We need to pass the temporaryClipRects flag down through reflection painting
1708         to handle the case of nested reflections.
1709         
1710         Also use temporary clip rects in RenderTreeAsText, since that code does not
1711         reset the painting root for transformed layers, so cached clip rects will not
1712         match those used for painting.
1713
1714         * rendering/RenderLayer.cpp:
1715         (WebCore::RenderLayer::RenderLayer):
1716         (WebCore::RenderLayer::paintLayer):
1717         (WebCore::RenderLayer::updateClipRects):
1718         (WebCore::RenderLayer::clearClipRects):
1719         * rendering/RenderLayer.h:
1720         * rendering/RenderTreeAsText.cpp:
1721         (WebCore::writeLayers):
1722
1723 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
1724
1725         Fix the Qt build
1726
1727         * platform/graphics/qt/AffineTransformQt.cpp:
1728         (WebCore::TransformationMatrix::TransformationMatrix):
1729
1730 2009-01-05  Mark Rowe  <mrowe@apple.com>
1731
1732         Fix the build some more.
1733
1734         * platform/graphics/cairo/AffineTransformCairo.cpp:
1735         (WebCore::TransformationMatrix::TransformationMatrix):
1736
1737 2009-01-05  Oliver Hunt  <oliver@apple.com>
1738
1739         Reviewed by NOBODY (Build fix).
1740
1741         Fix Cairo/Gtk build
1742
1743         * platform/graphics/cairo/ImageBufferCairo.cpp:
1744         (WebCore::ImageBuffer::putImageData):
1745
1746 2009-01-05  Dean Jackson  <dino@apple.com>
1747
1748         Reviewed by Darin Adler.
1749
1750         Rename AffineTransform to TransformationMatrix in
1751         preparation for future enhancements (non-affine matrices)
1752
1753         https://bugs.webkit.org/show_bug.cgi?id=22943
1754
1755         * GNUmakefile.am:
1756         * WebCore.pro:
1757         * WebCore.scons:
1758         * WebCore.vcproj/WebCore.vcproj:
1759         * WebCore.xcodeproj/project.pbxproj:
1760         * WebCoreSources.bkl:
1761         * platform/graphics/transforms/AffineTransform.cpp: Removed.
1762         * platform/graphics/transforms/AffineTransform.h: Removed.
1763         * platform/graphics/transforms/TransformationMatrix.cpp: Copied from WebCore/platform/graphics/transforms/AffineTransform.cpp.
1764         * platform/graphics/transforms/TransformationMatrix.h: Copied from WebCore/platform/graphics/transforms/AffineTransform.h.
1765         * lots of other files with s/AffineTransform/TransformationMatrix/g
1766
1767 2008-01-05  Dean Jackson  <dino@apple.com>
1768
1769         Reviewed by David Hyatt.
1770
1771         Implement 'pointer-events' for HTML content. This involved
1772         adding a new value 'auto' which behaves as 'visiblePainted'
1773         in SVG content. 
1774         
1775         Moved the property out of the SVG CSS code and into
1776         the general CSS (both parsing and RenderStyle). 
1777         
1778         Changes to the hit testing functionality of the Render tree,
1779         specifically the nodeAtPoint methods. Where they used to 
1780         test for visibility, they now use a helper function defined
1781         on base classes (RenderObject and InlineBox) that checks both
1782         visibility and pointer-events.
1783         
1784         https://bugs.webkit.org/show_bug.cgi?id=11395
1785
1786         Tests: fast/events/pointer-events-2.html
1787                fast/events/pointer-events.html
1788
1789         * css/CSSComputedStyleDeclaration.cpp:
1790         (WebCore::):
1791         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1792         * css/CSSParser.cpp:
1793         (WebCore::CSSParser::parseValue):
1794         * css/CSSPrimitiveValueMappings.h:
1795         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1796         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
1797         * css/CSSStyleSelector.cpp:
1798         (WebCore::CSSStyleSelector::applyProperty):
1799         * css/SVGCSSComputedStyleDeclaration.cpp:
1800         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1801         * css/SVGCSSStyleSelector.cpp:
1802         (WebCore::CSSStyleSelector::applySVGProperty):
1803         * manual-tests/pointer-events.html: Added.
1804         * rendering/EllipsisBox.cpp:
1805         (WebCore::EllipsisBox::nodeAtPoint):
1806         * rendering/InlineBox.h:
1807         (WebCore::InlineBox::visibleToHitTesting):
1808         * rendering/InlineFlowBox.cpp:
1809         (WebCore::InlineFlowBox::nodeAtPoint):
1810         * rendering/InlineTextBox.cpp:
1811         (WebCore::InlineTextBox::nodeAtPoint):
1812         * rendering/PointerEventsHitRules.cpp:
1813         (WebCore::PointerEventsHitRules::PointerEventsHitRules):
1814         * rendering/PointerEventsHitRules.h:
1815         (WebCore::PointerEventsHitRules::):
1816         * rendering/RenderBlock.cpp:
1817         (WebCore::RenderBlock::nodeAtPoint):
1818         * rendering/RenderBox.cpp:
1819         (WebCore::RenderBox::nodeAtPoint):
1820         * rendering/RenderObject.h:
1821         (WebCore::RenderObject::visibleToHitTesting):
1822         * rendering/RenderPath.cpp:
1823         (WebCore::RenderPath::nodeAtPoint):
1824         * rendering/RenderSVGImage.cpp:
1825         (WebCore::RenderSVGImage::nodeAtPoint):
1826         * rendering/RenderSVGText.cpp:
1827         (WebCore::RenderSVGText::nodeAtPoint):
1828         * rendering/RootInlineBox.cpp:
1829         (WebCore::RootInlineBox::nodeAtPoint):
1830         * rendering/TextControlInnerElements.cpp:
1831         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1832         * rendering/style/RenderStyle.h:
1833         (WebCore::):
1834         (WebCore::InheritedFlags::setBitDefaults):
1835         (WebCore::InheritedFlags::pointerEvents):
1836         (WebCore::InheritedFlags::setPointerEvents):
1837         (WebCore::InheritedFlags::initialPointerEvents):
1838         * rendering/style/RenderStyleConstants.h:
1839         (WebCore::):
1840         * rendering/style/SVGRenderStyle.h:
1841         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
1842         (WebCore::SVGRenderStyle::setBitDefaults):
1843         * rendering/style/SVGRenderStyleDefs.h:
1844         * css/CSSValueKeywords.in:
1845         * css/SVGCSSValueKeywords.in:
1846
1847 2009-01-05  Oliver Hunt  <oliver@apple.com>
1848
1849         Reviewed by NOBODY (Build fix).
1850
1851         Fix Cairo/Gtk build
1852
1853         * platform/graphics/cairo/ImageBufferCairo.cpp:
1854         (WebCore::ImageBuffer::getImageData):
1855
1856 2009-01-05  Oliver Hunt  <oliver@apple.com>
1857
1858         Reviewed by Gavin Barraclough.
1859
1860         CanvasPixelArray performance is too slow 
1861         <https://bugs.webkit.org/show_bug.cgi?id=23123>
1862
1863         Remove the WebCore CanvasPixelArray implementation and replace
1864         CPA usage with JSC::ByteArray.  Replace the JSCanvasPixelArray
1865         wrapper with an explicitly instantiated JSByteArray put on the
1866         JSImageData object as an ordinary ReadOnly, DontDelete property.
1867
1868         * DerivedSources.make:
1869         * ForwardingHeaders/runtime/ByteArray.h: Added.
1870         * ForwardingHeaders/runtime/JSByteArray.h: Added.
1871         * GNUmakefile.am:
1872         * WebCore.pro:
1873         * WebCore.scons:
1874         * WebCore.vcproj/WebCore.vcproj:
1875         * WebCore.xcodeproj/project.pbxproj:
1876         * bindings/js/JSCanvasPixelArrayCustom.h: Removed.
1877         * bindings/js/JSImageDataCustom.cpp:
1878         (WebCore::toJS):
1879         * html/CanvasPixelArray.cpp: Removed.
1880         * html/CanvasPixelArray.h: Removed.
1881         * html/CanvasPixelArray.idl: Removed.
1882         * html/CanvasRenderingContext2D.cpp:
1883         (WebCore::createEmptyImageData):
1884         * html/ImageData.cpp:
1885         (WebCore::ImageData::ImageData):
1886         * html/ImageData.h:
1887         (WebCore::ImageData::data):
1888         * html/ImageData.idl:
1889         * platform/graphics/cg/ImageBufferCG.cpp:
1890         (WebCore::ImageBuffer::getImageData):
1891         (WebCore::ImageBuffer::putImageData):
1892
1893 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
1894
1895         Reviewed by George Staikos.
1896
1897         Add notification for contentsSizeChanged which the Qt API will
1898         introduce.
1899
1900         * loader/EmptyClients.h:
1901         (WebCore::EmptyChromeClient::contentsSizeChanged):
1902         * page/Chrome.cpp:
1903         (WebCore::Chrome::contentsSizeChanged):
1904         * page/Chrome.h:
1905         * page/ChromeClient.h:
1906         * page/FrameView.cpp:
1907         (WebCore::FrameView::setContentsSize):
1908         * page/FrameView.h:
1909         * platform/HostWindow.h:
1910         * platform/ScrollView.h:
1911
1912 2009-01-05  Anders Carlsson  <andersca@apple.com>
1913
1914         Build fix.
1915         
1916         * plugins/PluginView.h:
1917         (WebCore::PluginManualLoader::~PluginManualLoader):
1918
1919 2009-01-05  Anders Carlsson  <andersca@apple.com>
1920
1921         Reviewed by Kevin Decker.
1922         
1923         Add an abstract PluginManualLoader class and make PluginView inherit from it. 
1924         
1925         Add some error checking that currently exists in WebKit (but not for long!)
1926         
1927         * plugins/PluginView.cpp:
1928         (WebCore::PluginView::didReceiveResponse):
1929         (WebCore::PluginView::didReceiveData):
1930         (WebCore::PluginView::didFinishLoading):
1931         (WebCore::PluginView::didFail):
1932         * plugins/PluginView.h:
1933
1934 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
1935
1936         Reviewed by George Staikos.
1937
1938         Fixes FrameView to respect the state of scrollbarmode when it is explicitly
1939         set programatically via a webkit API.
1940
1941         * loader/FrameLoaderClient.cpp:
1942         (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
1943         * loader/FrameLoaderClient.h:
1944         * page/FrameView.cpp:
1945         (WebCore::FrameView::initScrollbars):
1946         (WebCore::FrameView::updateDefaultScrollbarState):
1947         * page/FrameView.h:
1948
1949 2009-01-05  Darin Adler  <darin@apple.com>
1950
1951         Reviewed by Dan Bernstein.
1952
1953         Bug 23109: REGRESSION: Backwards search in a long document matches incorrectly
1954         https://bugs.webkit.org/show_bug.cgi?id=23109
1955
1956         Test: fast/text/find-backwards.html
1957
1958         * editing/TextIterator.cpp:
1959         (WebCore::SearchBuffer::append): Fix incorrect size passed to memcpy.
1960         (WebCore::SearchBuffer::search): Handle case where we have an empty buffer but
1961         we're at a break; must not try to search because ICU will give us an error.
1962         Fix incorrect size passed to memcpy and memmove.
1963         (WebCore::findPlainText): Fix case where we found a match and need to search
1964         again because we want to find the last match. We need to try again without
1965         adding any more text or handling the break before moving on.
1966
1967 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
1968
1969         Fix the Qt build
1970
1971         * bridge/runtime_object.cpp:
1972         (JSC::RuntimeObjectImp::put):
1973
1974 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
1975
1976         Reviewed by Sam Weinig.
1977
1978         Fix platforms that don't have Workers enabled.
1979
1980         * platform/ThreadGlobalData.cpp: (WebCore::threadGlobalData): Create ThreadGlobalData in
1981         two stages, so that EventNames constructor can access the just-created atomic string table.
1982         This matches what happens in ThreadSpecific case.
1983
1984 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
1985
1986         Suggested by Dave Levin.
1987
1988         Mac release build fix.
1989
1990         * WebCore.base.exp: Remove ThreadGlobalData::eventNames(), which is now inline.
1991
1992 2009-01-05  Darin Adler  <darin@apple.com>
1993
1994         * dom/Document.cpp: Fix build. Oops again.
1995
1996 2009-01-05  Darin Adler  <darin@apple.com>
1997
1998         Reviewed by Anders Carlsson.
1999
2000         Fix hang whenever following an anchor.
2001
2002         * dom/Document.cpp:
2003         (WebCore::Document::findAnchor): Oops!
2004
2005 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2006
2007         Reviewed by Darin Adler.
2008
2009         https://bugs.webkit.org/show_bug.cgi?id=23073
2010         <rdar://problem/6471129> Workers crash on Windows Release builds
2011
2012         * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData):
2013         * platform/ThreadGlobalData.h: (WebCore::ThreadGlobalData::eventNames):
2014         Now that ThreadSpecific sets up the pointer before invoking data constructor, we can
2015         initialize EventNames right away.
2016
2017 2009-01-05  Darin Adler  <darin@apple.com>
2018
2019         Reviewed by Anders Carlsson.
2020
2021         Bug 23106: HTMLFormCollection::namedItem ignores caseSensitive argument
2022         https://bugs.webkit.org/show_bug.cgi?id=23106
2023
2024         This led me to a bunch of dead code. It turns out that HTML collections
2025         were carrying the case-insensitive code just so they could be used to
2026         find anchors, something we can do more simply and efficiently without
2027         creating a DOM HTMLCollection object.
2028
2029         No behavior change. Just adding a new function findAnchor function and
2030         removing some dead code.
2031
2032         * dom/Document.cpp:
2033         (WebCore::Document::findAnchor): Added.
2034         * dom/Document.h: Ditto.
2035
2036         * html/HTMLAnchorElement.cpp:
2037         (WebCore::HTMLAnchorElement::accessKey): Take and return AtomicString
2038         references for better efficiency.
2039         (WebCore::HTMLAnchorElement::setAccessKey): Ditto.
2040         (WebCore::HTMLAnchorElement::charset): Ditto.
2041         (WebCore::HTMLAnchorElement::setCharset): Ditto.
2042         (WebCore::HTMLAnchorElement::coords): Ditto.
2043         (WebCore::HTMLAnchorElement::setCoords): Ditto.
2044         (WebCore::HTMLAnchorElement::setHref): Ditto.
2045         (WebCore::HTMLAnchorElement::hreflang): Ditto.
2046         (WebCore::HTMLAnchorElement::setHreflang): Ditto.
2047         (WebCore::HTMLAnchorElement::name): Ditto.
2048         (WebCore::HTMLAnchorElement::setName): Ditto.
2049         (WebCore::HTMLAnchorElement::rel): Ditto.
2050         (WebCore::HTMLAnchorElement::setRel): Ditto.
2051         (WebCore::HTMLAnchorElement::rev): Ditto.
2052         (WebCore::HTMLAnchorElement::setRev): Ditto.
2053         (WebCore::HTMLAnchorElement::shape): Ditto.
2054         (WebCore::HTMLAnchorElement::setShape): Ditto.
2055         (WebCore::HTMLAnchorElement::setTarget): Ditto.
2056         (WebCore::HTMLAnchorElement::type): Ditto.
2057         (WebCore::HTMLAnchorElement::setType): Ditto.
2058         * html/HTMLAnchorElement.h: Ditto.
2059
2060         * html/HTMLCollection.cpp:
2061         (WebCore::HTMLCollection::checkForNameMatch): Changed argument to an
2062         AtomicString and removed the caseSensitive boolean, since we're now always
2063         case sensitive.
2064         (WebCore::HTMLCollection::namedItem): Ditto.
2065         (WebCore::HTMLCollection::nextNamedItem): Ditto.
2066         * html/HTMLCollection.h: Ditto.
2067         * html/HTMLFormCollection.cpp:
2068         (WebCore::HTMLFormCollection::getNamedItem): Ditto.
2069         (WebCore::HTMLFormCollection::getNamedFormItem): Ditto.
2070         (WebCore::HTMLFormCollection::nextNamedItemInternal): Ditto.
2071         (WebCore::HTMLFormCollection::namedItem): Ditto.
2072         (WebCore::HTMLFormCollection::nextNamedItem): Ditto.
2073         * html/HTMLFormCollection.h: Ditto.
2074         * html/HTMLSelectElement.cpp:
2075         (WebCore::HTMLSelectElement::namedItem): Ditto.
2076         * html/HTMLSelectElement.h: Ditto.
2077
2078         * loader/FrameLoader.cpp:
2079         (WebCore::FrameLoader::gotoAnchor): Use the new findAnchor function.
2080         * page/AccessibilityRenderObject.cpp:
2081         (WebCore::AccessibilityRenderObject::internalLinkElement): Ditto.
2082
2083 2009-01-05  Darin Adler  <darin@apple.com>
2084
2085         Reviewed by Anders Carlsson.
2086
2087         Bug 23104: minor mistakes in init functions for animation and transition events
2088         https://bugs.webkit.org/show_bug.cgi?id=23104
2089
2090         Test: fast/events/init-events.html
2091
2092         Also fixed two StorageEvent problems the test case uncovered:
2093
2094             Made document.createEvent("StorageEvent") work.
2095             Allow null values for StorageEvent.oldValue and StorageEvent.newValue.
2096
2097         * dom/Document.cpp:
2098         (WebCore::Document::createEvent): Sorted alphabetically by the name of the event
2099         class. Added StorageEvent.
2100
2101         * dom/UIEvent.idl: Fixed typo in a comment.
2102
2103         * dom/WebKitAnimationEvent.cpp:
2104         (WebCore::WebKitAnimationEvent::initWebKitAnimationEvent): Use all the arguments.
2105         * dom/WebKitTransitionEvent.cpp:
2106         (WebCore::WebKitTransitionEvent::initWebKitTransitionEvent): Ditto.
2107
2108         * storage/StorageEvent.idl: Use the ConvertNullToNullString keyword on the
2109         arguments to initStorageEvent so it can create events with null values for the
2110         oldValue and newValue, just like the real storage events. Note that the properties
2111         already had ConvertNullStringTo=Null, so this is just the other half of that.
2112
2113 2009-01-05  Darin Adler  <darin@apple.com>
2114
2115         Reviewed by Alexey Proskuryakov.
2116
2117         Bug 23102: turn on unused parameter warnings in WebCore
2118         https://bugs.webkit.org/show_bug.cgi?id=23102
2119
2120         First step: Fix the simple cases where we can just remove an argument name.
2121         Also made a few more things protected and private.
2122
2123         * many files
2124
2125 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2126
2127         Reviewed by Darin Adler.
2128
2129         https://bugs.webkit.org/show_bug.cgi?id=23115
2130         Create a version of ASSERT for use with otherwise unused variables
2131
2132         * loader/appcache/ApplicationCacheStorage.cpp:
2133         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Use the new ASSERT_UNUSED macro.
2134
2135 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2136
2137         Non-Mac build fix.
2138
2139         * loader/appcache/ApplicationCacheStorage.cpp: Include wtf/StringExtras.h for snprintf.
2140
2141 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2142
2143         Reviewed by George Staikos.
2144
2145         Remove unnecessary methods from EmptyFrameLoaderClient
2146
2147         * loader/EmptyClients.h:
2148
2149 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2150
2151         Reviewed by Darin Adler.
2152
2153         https://bugs.webkit.org/show_bug.cgi?id=23077
2154         Make application cache use SQLite built-in user_version
2155
2156         * loader/appcache/ApplicationCacheStorage.cpp:
2157         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Changed to track versions with
2158         PRAGMA user_version.
2159
2160         * loader/appcache/ApplicationCacheResource.h: (WebCore::ApplicationCacheResource::):
2161         Used the occasion to get rid of the hole in bitmask that was a leftover from opportunistic
2162         cache entries.
2163
2164 2009-01-04  David Smith  <catfish.man@gmail.com>
2165
2166         Reviewed by Oliver Hunt.
2167
2168         https://bugs.webkit.org/show_bug.cgi?id=23084
2169         Avoid redundant AtomicString conversions
2170
2171         * dom/Node.cpp:
2172         (WebCore::Node::getElementsByTagName): Pass starAtom instead of "*"
2173         (WebCore::Node::getElementsByTagNameNS): Take an AtomicString for the namespace URI
2174         (WebCore::Node::isDefaultNamespace): Ditto
2175         (WebCore::Node::lookupPrefix): Ditto
2176         (WebCore::Node::lookupNamespacePrefix): Ditto
2177         * dom/Node.h: Ditto
2178
2179 2009-01-04  Darin Adler  <darin@apple.com>
2180
2181         Reviewed by Oliver Hunt.
2182
2183         Bug 23105: canvas setFillColor function ignores alpha argument
2184         https://bugs.webkit.org/show_bug.cgi?id=23105
2185
2186         Test: fast/canvas/set-colors.html
2187
2188         * html/CanvasRenderingContext2D.cpp:
2189         (WebCore::CanvasRenderingContext2D::setFillColor): Pass alpha value through instead
2190         of ignoring it and always passing 1.
2191
2192         * html/CanvasStyle.cpp:
2193         (WebCore::CanvasStyle::applyStrokeColor): Fix spelling of transparent in comments.
2194         (WebCore::CanvasStyle::applyFillColor): Ditto.
2195
2196 2009-01-04  Darin Adler  <darin@apple.com>
2197
2198         Bug 23086: REGRESSION(r39540/r39541): Windows build fails due to ICU errors
2199         https://bugs.webkit.org/show_bug.cgi?id=23086
2200
2201         * editing/TextIterator.cpp: Check UCONFIG_NO_COLLATION and don't compile
2202         in the new search path if it's 0.
2203
2204 2009-01-04  David Kilzer  <ddkilzer@apple.com>
2205
2206         Don't install *.idl and *.in files as resources
2207
2208         Reviewed by Oliver Hunt.
2209
2210         Don't install these files as resources in the WebCore framework:
2211         - WMLAttributeNames.in
2212         - WMLTagNames.in
2213         - WorkerContext.idl
2214         - WorkerLocation.idl
2215         - WorkerNavigator.idl
2216
2217         * WebCore.xcodeproj/project.pbxproj: Removed resources.
2218
2219 2009-01-04  Simon Fraser  <simon.fraser@apple.com>
2220
2221         Reviewed by Darin Adler
2222
2223         https://bugs.webkit.org/show_bug.cgi?id=23090
2224         
2225         If an object gets a Layout hint, and the style change will result in
2226         the creation of a RenderLayer, then we need to repaint the old position
2227         of the object. This was done for transform, but we have to test opacity too.
2228
2229         Test: fast/repaint/create-layer-repaint.html
2230
2231         * rendering/RenderObject.cpp:
2232         (WebCore::RenderObject::styleWillChange):
2233
2234 2009-01-04  Darin Adler  <darin@apple.com>
2235
2236         Reviewed by Dan Bernstein.
2237
2238         Bug 23103: Safari's auto-fill no longer works for <select> elements
2239         https://bugs.webkit.org/show_bug.cgi?id=23103
2240         rdar://problem/6472061
2241
2242         * bindings/objc/DOMHTML.mm:
2243         (-[DOMHTMLSelectElement _activateItemAtIndex:]): Implemented this.
2244
2245 2009-01-04  Adam Treat  <adam.treat@torchmobile.com>
2246
2247         Reviewed by George Staikos.
2248
2249         Add fixedLayoutSize feature to ScrollView to allow for controlling the
2250         layout beyond the constraint of the current viewports dynamic size
2251
2252         * css/MediaQueryEvaluator.cpp:
2253         (WebCore::heightMediaFeatureEval):
2254         (WebCore::widthMediaFeatureEval):
2255         * dom/Element.cpp:
2256         (WebCore::Element::clientWidth):
2257         (WebCore::Element::clientHeight):
2258         * loader/FrameLoaderClient.cpp:
2259         (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
2260         * loader/FrameLoaderClient.h:
2261         * page/FrameView.cpp:
2262         (WebCore::FrameView::layout):
2263         * platform/ScrollView.cpp:
2264         (WebCore::ScrollView::ScrollView):
2265         (WebCore::ScrollView::layoutWidth):
2266         (WebCore::ScrollView::layoutHeight):
2267         (WebCore::ScrollView::fixedLayoutSize):
2268         (WebCore::ScrollView::setFixedLayoutSize):
2269         (WebCore::ScrollView::useFixedLayout):
2270         (WebCore::ScrollView::setUseFixedLayout):
2271         * platform/ScrollView.h:
2272         * rendering/RenderView.cpp:
2273         (WebCore::RenderView::viewHeight):
2274         (WebCore::RenderView::viewWidth):
2275         * rendering/RenderView.h:
2276
2277 2009-01-03  Rob Buis  <rwlbuis@gmail.com>
2278
2279         Reviewed by Darin.
2280
2281         https://bugs.webkit.org/show_bug.cgi?id=22660
2282         SVG elements that are moved are nor fully invalidated/earsed
2283
2284         Mark the SVG root as needing a layout when its position changes.
2285
2286         Tests: svg/custom/circle-move-invalidation.svg
2287
2288         * rendering/RenderSVGRoot.cpp:
2289         (WebCore::RenderSVGRoot::position):
2290         * rendering/RenderSVGRoot.h:
2291
2292 2009-01-03  Steve Falkenburg  <sfalken@apple.com>
2293
2294         Build fix.
2295
2296         * loader/FrameLoader.h:
2297
2298 2009-01-02  Cary Clark  <caryclark@google.com>
2299
2300         Reviewed and landed by Darin Adler.
2301
2302         Bug 22963: write icons before reading them
2303         https://bugs.webkit.org/show_bug.cgi?id=22963
2304
2305         Reverse the order in the icon database main thread loop to
2306         write the pending icons to the database before trying
2307         to read any requested icons. This ensures that a requested icon 
2308         has the correct data when read.
2309         
2310         * loader/icon/IconDatabase.cpp:
2311         (WebCore::IconDatabase::syncThreadMainLoop):
2312
2313 2009-01-02  Darin Adler  <darin@apple.com>
2314
2315         * loader/FrameLoader.cpp:
2316         (WebCore::FrameLoader::loadItem): One small thing I forgot in my last check-in.
2317         This cuts down on the number of hash table operations during loading.
2318
2319 2009-01-02  Dmitry Titov  <dimich@chromium.org>
2320
2321         Reviewed and landed by Darin Adler.
2322
2323         https://bugs.webkit.org/show_bug.cgi?id=23025
2324         DOMTimer lifetime cleanup: timeoutMap methods on Document now do not delete the timer.
2325         Instead, all 3 places that delete timers do it directly calling 'delete' and then timer's dtor removes the ID from the timeoutMap.
2326         Note that in case the context is destroyed and timers are deleted at once, the check in ~DOMTimer() prevents 
2327         unnecessary HashMap remove in case the Document is being destroyed.
2328
2329         * bindings/js/DOMTimer.cpp:
2330         (WebCore::DOMTimer::~DOMTimer): removes the id from the timeoutMap.
2331         (WebCore::DOMTimer::install):
2332         (WebCore::DOMTimer::removeById): simply uses 'delete this'.
2333         (WebCore::DOMTimer::fired): same.
2334         (WebCore::DOMTimer::contextDestroyed): same.
2335         * dom/Document.cpp:
2336         (WebCore::Document::removeTimeout): now it only removes the id from the map, does not delete the timer.
2337
2338 2009-01-02  Darin Adler  <darin@apple.com>
2339
2340         Reviewed by Sam Weinig.
2341
2342         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
2343         inside its web view when resizing its window
2344         https://bugs.webkit.org/show_bug.cgi?id=23072
2345         rdar://problem/6368028
2346
2347         The first attempt at fixing this did not work.
2348         This time I was able to reproduce the bug and test the fix.
2349
2350         Bug 11212: REGRESSION: Activity window doesn't always list all files until refresh
2351         https://bugs.webkit.org/show_bug.cgi?id=11212
2352         rdar://problem/4959702
2353
2354         I had to fix this second bug because otherwise the WebKit code to trigger the first
2355         fix didn't run.
2356
2357         Also fixes memory use that kept growing as we maintained a set of all URLs loaded in
2358         a particular frame. Bad idea! It's bad enough that we do it for each document, but
2359         the old version kept the set around forever as you moved from one document to the next.
2360
2361         * html/HTMLFrameElementBase.cpp:
2362         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Change this so that we allow
2363         turning off scrolling when the quirk is enabled. We just don't allow turning it on.
2364         This fixes one of the two problems with the initial patch; the other fix is in WebKit.
2365
2366         * loader/DocumentLoader.h: Moved didTellClientAboutLoad and haveToldClientAboutLoad
2367         here from FrameLoader. The old way meant that a given frame would forever remember
2368         the URL of any resources loaded in that frame and never send any "loaded from cache"
2369         client calls about those URLs.
2370
2371         * loader/FrameLoader.cpp:
2372         (WebCore::FrameLoader::loadResourceSynchronously): Removed call to didTellCientAboutLoad.
2373         This is now handled by dispatchWillSendRequest, which is safer since that's the actual
2374         function that tells the client about the load.
2375         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Changed calls to
2376         haveToldClientAboutLoad and didTellClientAboutLoad to call the document loader.
2377         Also removed the call in the case where we don't load from the cache, since
2378         dispatchWillSendRequest now takes care of it.
2379         (WebCore::FrameLoader::dispatchWillSendRequest): Put calls to didTellClientAboutLoad
2380         here. Call it both on the URL we pass in and the URL the client returns; we won't
2381         tell the client about either if it's loaded from the memory cache.
2382
2383         * loader/FrameLoader.h: Removed didTellClientAboutLoad, haveToldClientAboutLoad, and
2384         m_urlsClientKnowsAbout.
2385
2386         * loader/SubresourceLoader.cpp: Removed unneeded load function that called
2387         didTellClientAboutLoad. That's now taken care of in dispatchWillSendRequest.
2388
2389         * loader/SubresourceLoader.h: Removed load function. Also made all members private
2390         except for create and clearClient.
2391
2392 2009-01-02  Simon Fraser  <simon.fraser@apple.com>
2393
2394         Reviewed by Darin Adler
2395
2396         https://bugs.webkit.org/show_bug.cgi?id=23082
2397         
2398         Fix GIF animation by ensuring that the signature of
2399         startAnimation() in the base class matches the method in BitmapImage.
2400         
2401         Test: fast/backgrounds/animated-gif-as-background.html
2402
2403         * platform/graphics/Image.h:
2404         (WebCore::Image::startAnimation):
2405
2406 2009-01-02  David Smith  <catfish.man@gmail.com>
2407
2408         Reviewed by Darin Adler.
2409         
2410         https://bugs.webkit.org/show_bug.cgi?id=22699
2411         Enable NodeList caching for getElementsByTagName
2412         
2413         test: fast/dom/getelementsbytagnamens-mixed-namespaces.html
2414
2415         * dom/Document.cpp:
2416         (WebCore::FormElementKeyHash::hash): Use WTF::stringHashingStartValue
2417         * dom/Node.cpp:
2418         (WebCore::Node::getElementsByTagNameNS): Ensure rare data and add a node list cache
2419         (WebCore::NodeListsNodeData::invalidateCaches): Invalidate the tag name node list cache as well as the others
2420         (WebCore::NodeListsNodeData::isEmpty): Check the tag name node list cache as well as the others
2421         * dom/NodeRareData.h: Add m_tagNodeListCaches
2422         * dom/QualifiedName.cpp:
2423         * dom/QualifiedName.h: Move QNameHash to the header, make it work on QualifiedNames, and rename to QualifiedNameHash
2424         * dom/StyledElement.cpp:
2425         (WebCore::MappedAttributeHash::hash): Use WTF::stringHashingStartValue
2426         * dom/TagNodeList.cpp:
2427         (WebCore::TagNodeList::TagNodeList): Add a NodeList cache argument
2428         * dom/TagNodeList.h: 
2429         (WebCore::TagNodeList::create): Add a NodeList cache argument
2430         * platform/text/StringHash.h:
2431         (WebCore::CaseFoldingHash::hash): Use WTF::stringHashingStartValue
2432         * platform/text/TextEncodingRegistry.cpp:
2433         (WebCore::TextEncodingNameHash::hash): Use WTF::stringHashingStartValue
2434
2435 2009-01-02  Eric Carlson  <eric.carlson@apple.com>
2436
2437         Reviewed by Darin Adler
2438
2439         Fix for https://bugs.webkit.org/show_bug.cgi?id=23066 & <rdar://problem/6028417> 
2440         Full Page Zoom: a <video> element that doesn't include width/height attribute does not scale
2441
2442         * rendering/RenderVideo.cpp:
2443         (WebCore::RenderVideo::calcReplacedWidth): Multiply aspect ratio width by style()->effectiveZoom()
2444         (WebCore::RenderVideo::calcReplacedHeight): Multiply aspect ratio height by style()->effectiveZoom()
2445
2446 2009-01-02  David Kilzer  <ddkilzer@apple.com>
2447
2448         BUILD FIX (r39552): Add mediaControls.css to other build files
2449
2450         * GNUmakefile.am:
2451         * WebCore.pro:
2452         * WebCore.vcproj/WebCore.vcproj:
2453
2454 2009-01-02  David Kilzer  <ddkilzer@apple.com>
2455
2456         Try to fix Wx build after r39427
2457
2458         * platform/graphics/wx/PathWx.cpp:
2459         (WebCore::Path::strokeBoundingRect): Added stub.
2460
2461 2009-01-02  Alexey Proskuryakov  <ap@webkit.org>
2462
2463         Reviewed by Adele Peterson.
2464
2465         <rdar://problem/6471356> Failed assertion on quit
2466
2467         * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::~ThreadGlobalData):
2468         Only assert that empty string are all removed on secondary threads.
2469
2470 2009-01-02  David Kilzer  <ddkilzer@apple.com>
2471
2472         Bug 23081: These files are no longer part of the KDE libraries
2473
2474         <https://bugs.webkit.org/show_bug.cgi?id=23081>
2475
2476         Reviewed by Darin Adler.
2477
2478         Removed "This file is part of the KDE libraries" comment from
2479         source files.  Added or updated Apple copyrights as well.
2480
2481         No tests since there are only changes to comments.
2482
2483         * bridge/testbindings.cpp:
2484         * html/HTMLEntityNames.gperf:
2485         * loader/Cache.h:
2486         * loader/CachedCSSStyleSheet.h:
2487         * loader/CachedResourceClient.h:
2488         * loader/CachedResourceClientWalker.cpp:
2489         * loader/CachedResourceClientWalker.h:
2490         * loader/CachedScript.cpp:
2491         * loader/CachedScript.h:
2492         * loader/CachedXBLDocument.cpp:
2493         * loader/CachedXBLDocument.h:
2494         * loader/CachedXSLStyleSheet.cpp:
2495         * loader/CachedXSLStyleSheet.h:
2496         * rendering/GapRects.h:
2497         * xml/XMLSerializer.cpp:
2498
2499 2009-01-02  Simon Fraser  <simon.fraser@apple.com>
2500
2501         Reviewed by Darin Adler
2502
2503         Use an OwnPtr for m_chromeClient.
2504         
2505         * svg/graphics/SVGImage.cpp:
2506         (WebCore::SVGImage::~SVGImage):
2507         (WebCore::SVGImage::dataChanged):
2508         * svg/graphics/SVGImage.h:
2509
2510 2009-01-02  Simon Fraser  <simon.fraser@apple.com>
2511
2512         Reviewed by Darin Adler
2513
2514         https://bugs.webkit.org/show_bug.cgi?id=22981
2515
2516         Repaints inside of an SVGImage were thrown on the floor,
2517         which broke incremental painting due to loading, or SVG animation.
2518         Fix this by assigning the SVGImage a ChromeClient subclass that passes
2519         along repaints via a new method on ImageObserver, which also takes
2520         a rect parameter for the changed rect, allowing incremental repaints.
2521         Fix RenderImage::imageChanged to take advantage of this changedRect to
2522         only repaint the changed parts of the image.
2523         
2524         This also enables incremental painting for canvas-as-image, so
2525         add tests for that too.
2526
2527         Tests: fast/backgrounds/animated-svg-as-background.html
2528                fast/backgrounds/animated-svg-as-mask.html
2529                fast/canvas/canvas-as-image-incremental-repaint.html
2530                fast/canvas/canvas-as-image.html
2531                fast/images/animated-svg-as-image.html
2532
2533         * css/CSSCanvasValue.cpp:
2534         (WebCore::CSSCanvasValue::canvasChanged):
2535         * loader/CachedImage.cpp:
2536         (WebCore::CachedImage::notifyObservers):
2537         (WebCore::CachedImage::data):
2538         (WebCore::CachedImage::changedInRect):
2539         * loader/CachedImage.h:
2540         * loader/CachedResourceClient.h:
2541         (WebCore::CachedResourceClient::imageChanged):
2542         * platform/graphics/ImageObserver.h:
2543         * rendering/RenderBox.cpp:
2544         (WebCore::RenderBox::imageChanged):
2545         * rendering/RenderBox.h:
2546         * rendering/RenderImage.cpp:
2547         (WebCore::RenderImage::imageChanged):
2548         * rendering/RenderImage.h:
2549         * rendering/RenderListMarker.cpp:
2550         (WebCore::RenderListMarker::imageChanged):
2551         * rendering/RenderListMarker.h:
2552         * rendering/RenderObject.cpp:
2553         (WebCore::RenderObject::imageChanged):
2554         * rendering/RenderObject.h:
2555         (WebCore::RenderObject::imageChanged):
2556         * rendering/RenderSVGImage.cpp:
2557         (WebCore::RenderSVGImage::imageChanged):
2558         * rendering/RenderSVGImage.h:
2559         * rendering/RenderScrollbarPart.cpp:
2560         (WebCore::RenderScrollbarPart::imageChanged):
2561         * rendering/RenderScrollbarPart.h:
2562         * rendering/RenderTableCol.cpp:
2563         (WebCore::RenderTableCol::imageChanged):
2564         * rendering/RenderTableCol.h:
2565         * rendering/RenderTableRow.cpp:
2566         (WebCore::RenderTableRow::imageChanged):
2567         * rendering/RenderTableRow.h:
2568         * rendering/RenderTableSection.cpp:
2569         (WebCore::RenderTableSection::imageChanged):
2570         * rendering/RenderTableSection.h:
2571         * svg/graphics/SVGImage.cpp:
2572         (WebCore::SVGImageChromeClient::SVGImageChromeClient):
2573         (WebCore::SVGImageChromeClient::image):
2574         (WebCore::SVGImageChromeClient::chromeDestroyed):
2575         (WebCore::SVGImageChromeClient::repaint):
2576         (WebCore::SVGImage::SVGImage):
2577         (WebCore::SVGImage::~SVGImage):
2578         (WebCore::SVGImage::dataChanged):
2579         * svg/graphics/SVGImage.h:
2580
2581 2009-01-02  Eric Carlson  <eric.carlson@apple.com>
2582
2583         Reviewed by Darin Adler
2584
2585         https://bugs.webkit.org/show_bug.cgi?id=23043
2586
2587         Pull media controls css out of html4.css into separate file. Don't generate
2588         wml, svg, or media css globals unless the feature is enabled.
2589
2590         * DerivedSources.make:
2591             Don't include css for unused features.
2592
2593         * WebCore.xcodeproj/project.pbxproj:
2594             include mediaControls.css
2595
2596         * css/CSSStyleSelector.cpp:
2597         (WebCore::CSSStyleSelector::styleForElement):
2598             don't parse or add media css unless VIDEO feature is enabled and the target
2599             element is video or audio
2600
2601         * css/html4.css:
2602             moved media controls css to mediaControls.css
2603
2604         * css/mediaControls.css: Added.
2605
2606 2009-01-02  Alexey Proskuryakov  <ap@webkit.org>
2607
2608         Reviewed by Darin Adler.
2609
2610         https://bugs.webkit.org/show_bug.cgi?id=23022
2611         Fix multiple issues with appcache online whitelist handling
2612
2613         Test: http/tests/appcache/online-whitelist.html
2614
2615         * loader/appcache/ApplicationCache.cpp:
2616         (WebCore::ApplicationCache::isURLInOnlineWhitelist): Test whitelist entries as prefixes,
2617         making it possible to use them for CGI invocation (as required by HTML5).
2618
2619         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
2620         Re-ordered checks, so that resources that are cached, but are also listed in online whitelist
2621         are loaded from the cache. This is required by HTML5, although Firefox doesn't match.
2622
2623         * loader/appcache/ManifestParser.cpp:
2624         (WebCore::parseManifest):
2625         * loader/appcache/ManifestParser.h:
2626         * loader/appcache/ApplicationCache.h:
2627         (WebCore::ApplicationCache::onlineWhitelist):
2628         * loader/appcache/ApplicationCacheStorage.cpp:
2629         (WebCore::ApplicationCacheStorage::store):
2630         (WebCore::ApplicationCacheStorage::loadCache):
2631         Changed online whitelist to be a vector of URLs, which is better suited for the new algorithm.
2632
2633 2009-01-02  Darin Adler  <darin@apple.com>
2634
2635         Reviewed by Oliver Hunt.
2636
2637         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
2638         https://bugs.webkit.org/show_bug.cgi?id=23072
2639         rdar://problem/6368028
2640
2641         * WebCore.base.exp: Updated.
2642         * WebCore.xcodeproj/project.pbxproj: Mark HTMLHeadElement.h Private so it can be used in WebKit.
2643
2644         * dom/Document.cpp:
2645         (WebCore::Document::Document): Initialize m_frameElementsShouldIgnoreScrolling to false.
2646         * dom/Document.h: Added setFrameElementsShouldIgnoreScrolling, frameElementsShouldIgnoreScrolling,
2647         and m_frameElementsShouldIgnoreScrolling.
2648
2649         * html/HTMLFrameElementBase.cpp:
2650         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Don't allow changes to the scrolling attribute
2651         to affect the scrolling mode if frameElementsShouldIgnoreScrolling() returns true. This is only
2652         triggered on Mac OS X when running the Dictionary application.
2653
2654 2009-01-02  Alexey Proskuryakov  <ap@webkit.org>
2655
2656         Reviewed by Darin Adler.
2657
2658         https://bugs.webkit.org/show_bug.cgi?id=23036
2659         <rdar://problem/6451666> Implement AppCache fallback entries (23036)
2660
2661         Test: http/tests/appcache/fallback.html
2662
2663         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): Use fallback
2664         entries if normal loading fails.
2665
2666         * loader/DocumentLoader.cpp:
2667         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache): Do not prevent normal
2668         loading for resources that match fallback namespaces - they are only loaded from the cache
2669         if that fails.
2670         (WebCore::DocumentLoader::getApplicationCacheFallbackResource): Get a fallback entry for
2671         resource from associated appcache, or from passed in one, if any.
2672         (WebCore::DocumentLoader::scheduleLoadFallbackResourceFromApplicationCache): If a fallback
2673         entry for resourse exists, add it to pending substitute loads.
2674
2675         * loader/DocumentLoader.h: Added new functions for loading fallback data for resources.
2676
2677         * loader/ResourceLoader.h:
2678         * loader/ResourceLoader.cpp:
2679         (WebCore::ResourceLoader::scheduleLoadFallbackResourceFromApplicationCache): This function
2680         is called when normal loading fails (which includes network failures, 4xx and 5xx responses,
2681         and cross-origin redirects) to load appcache fallback data instead. It can use either the
2682         cache that is associated with the browsing context, or a custom one if association is yet
2683         to take place.
2684         (WebCore::ResourceLoader::willSendRequest): Try using fallback data.
2685         (WebCore::ResourceLoader::didReceiveResponse): Ditto.
2686         (WebCore::ResourceLoader::didFail): Ditto.
2687
2688         * loader/MainResourceLoader.cpp:
2689         (WebCore::MainResourceLoader::didReceiveResponse): Locate an appropriate cache and load
2690         fallback data from it if loading fails. The browsing context may still be associated with
2691         its previous document here, so the cache to load from must be passed explicitly.
2692         (WebCore::MainResourceLoader::didFail): Ditto.
2693         (WebCore::MainResourceLoader::load): Remove unnecessary check and FIXME.
2694
2695         * loader/appcache/ApplicationCache.cpp:
2696         (WebCore::ApplicationCache::setFallbackURLs):
2697         (WebCore::ApplicationCache::urlMatchesFallbackNamespace):
2698         * loader/appcache/ApplicationCache.h:
2699         (WebCore::ApplicationCache::fallbackURLs):
2700         * loader/appcache/ApplicationCacheStorage.cpp:
2701         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2702         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
2703         (WebCore::ApplicationCacheStorage::store):
2704         (WebCore::ApplicationCacheStorage::loadCache):
2705         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
2706         * loader/appcache/ApplicationCacheStorage.h:
2707         * loader/appcache/ApplicationCacheGroup.cpp:
2708         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
2709         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2710         * loader/appcache/ApplicationCacheGroup.h:
2711         Implement fallback map saving and loading, pass it to the cache.
2712
2713         * loader/appcache/ManifestParser.h: Use a correct data structure for fallback map - keys
2714         are matched by prefix, so HAshMap cannot be used.
2715
2716         * loader/appcache/ManifestParser.cpp: (WebCore::parseManifest): Fix bugs in fallback section
2717         parsing.
2718
2719 2009-01-01  Oliver Hunt  <oliver@apple.com>
2720
2721         Reviewed by Dan Bernstein.
2722
2723         <rdar://problem/6450530> WebCore::FontPlatformData should not leak
2724
2725         Whoops, previous patch should also have fixed the font referencing in
2726         the constructor.
2727
2728         * WebCore.xcodeproj/project.pbxproj:
2729         * platform/graphics/mac/FontPlatformDataMac.mm:
2730         (WebCore::FontPlatformData::FontPlatformData):
2731
2732 2009-01-01  Oliver Hunt  <oliver@apple.com>
2733
2734         Reviewed by Dan Bernstein.
2735
2736         <rdar://problem/6450530> WebCore::FontPlatformData should not leak
2737
2738         Make sure we only adopt the new font, rather than re-referencing (and so leaking).
2739
2740         * platform/graphics/mac/FontPlatformDataMac.mm:
2741         (WebCore::FontPlatformData::setFont):
2742
2743 2009-01-01  Darin Adler  <darin@apple.com>
2744
2745         Reviewed by Dan Bernstein.
2746
2747         Bug 23071: REGRESSION (r39536): New test failures after committing patch in bug 23051 (ICU search)
2748         https://bugs.webkit.org/show_bug.cgi?id=23071
2749
2750         Also fix some things that Dan suggested during review of the ICU search patch that I forgot
2751         the first time around.
2752
2753         * editing/TextIterator.cpp: Use ICU search on all platforms that use ICU, now that
2754         we've double checked it works everywhere, removing HAVE_ICU_SEARCH entirely.
2755         Removed unused m_atBreak data member from the non-ICU code path.
2756         (WebCore::TextIterator::TextIterator): Move null check up.
2757         (WebCore::TextIterator::handleTextBox): Fix mistake that made the iterator include
2758         collapsed whitespace. This was left over from an earlier version of the patch.
2759         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
2760         Move null check up.
2761
2762 2009-01-01  Simon Fraser  <simon.fraser@apple.com>
2763
2764         Reviewed by Darin Adler, Oliver Hunt
2765
2766         https://bugs.webkit.org/show_bug.cgi?id=23065
2767         
2768         Enable incremental painting of canvas. This turns incremental painting
2769         back on, and fixes issues with stroke width and miters, calling willDraw()
2770         for strokeText and fillText, and taking shadows into account.
2771         
2772         Test: fast/canvas/canvas-incremental-repaint.html
2773
2774         * html/CanvasRenderingContext2D.cpp:
2775         (WebCore::CanvasStrokeStyleApplier::CanvasStrokeStyleApplier):
2776         (WebCore::CanvasStrokeStyleApplier::strokeStyle):
2777         (WebCore::CanvasRenderingContext2D::stroke):
2778         (WebCore::CanvasRenderingContext2D::willDraw):
2779         (WebCore::CanvasRenderingContext2D::putImageData):
2780         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2781         * html/CanvasRenderingContext2D.h:
2782         * html/HTMLCanvasElement.cpp:
2783         (WebCore::HTMLCanvasElement::willDraw):
2784         * platform/graphics/FloatRect.h:
2785         (WebCore::mapRect): new method to map a rect contained
2786         in one rect to an equivalent rect inside another rect.
2787
2788 2008-12-29  Konstantin Käfer  <kkaefer@gmail.com>
2789
2790         Reviewed by Tim Hatcher.
2791
2792         Fix for https://bugs.webkit.org/show_bug.cgi?id=17229
2793         <rdar://problem/5732829> Inspector should show properties of all JS objects in Console
2794
2795         Prints objects not as plain text but makes them expandable so that
2796         they can be inspected.
2797
2798         * inspector/front-end/Console.js:
2799         (): added a parameter "inline" to the WebInspector.Console._format function which indicates
2800             whether the object is printed in the context of another string (with console.log()) or
2801             as sole element.
2802         (.): objects and DOM nodes are now printed in an expandable form when they are printed alone
2803             (i.e. not in the context of a console.log() string) so that they can be inspected.
2804         * inspector/front-end/PropertiesSection.js:
2805         (WebInspector.PropertiesSection.prototype.set title): Allow DOM Nodes as title instead of strings
2806             in that case, the Node is inserted into the title instead of the string value of the passed
2807             object. This is used for displaying linkified titles, for example when inspecting DOM nodes,
2808             the syntax highlighted HTML representation is shown instead of the plain source code.
2809         * inspector/front-end/inspector.css: correct the offsetParent for the expandable object inspector.
2810
2811 2009-01-01  Darin Adler  <darin@apple.com>
2812
2813         Reviewed by Dan Bernstein.
2814
2815         Bug 23051: web page searching should use ICU's search so it can ignore diacritical differences
2816         https://bugs.webkit.org/show_bug.cgi?id=23051
2817         rdar://problem/3574497
2818
2819         Test: editing/execCommand/findString-diacriticals.html
2820
2821         * editing/TextIterator.cpp: Changed the CircularSearchBuffer class to have a new
2822         name, since it doesn't always use a circular buffer any more. Changed the interface
2823         so it can work well in the new chunky comparison mode for ICU search, and also
2824         added private data members for both the ICU-search and non-ICU-search code paths.
2825         (WebCore::TextIterator::TextIterator): Use the versions of the Range functions
2826         that don't take an exception code.
2827         (WebCore::TextIterator::handleTextBox): Added a special case to handle the position
2828         of a collapsed-away space better. This is not needed for search mechanism, but was
2829         helpful in an earlier version of this patch, and is still an improvement.
2830         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Use the
2831         versions of the Range functions that don't take an exception code.
2832         (WebCore::CharacterIterator::range): Ditto.
2833         (WebCore::characterSubrange): Added. Helper function used in both places below where
2834         we want to convert a range and character offsets into a subrange.
2835         (WebCore::WordAwareIterator::advance): Use the versions of the Range functions that
2836         don't take an exception code.
2837         (WebCore::createSearcher): Added.
2838         (WebCore::searcher): Added.
2839         (WebCore::lockSearcher): Added.
2840         (WebCore::unlockSearcher): Added.
2841         (WebCore::SearchBuffer::SearchBuffer): Added.
2842         (WebCore::SearchBuffer::~SearchBuffer): Added.
2843         (WebCore::SearchBuffer::append): Added.
2844         (WebCore::SearchBuffer::atBreak): Added.
2845         (WebCore::SearchBuffer::reachedBreak): Added.
2846         (WebCore::SearchBuffer::search): Added.
2847         (WebCore::SearchBuffer::length): Added.
2848         (WebCore::TextIterator::subrange): Changed to call the characterSubrange
2849         function above.
2850         (WebCore::TextIterator::rangeFromLocationAndLength): Use the versions of the
2851         Range functions that don't take an exception code. Also tweak some other details
2852         of the code.
2853         (WebCore::isAllCollapsibleWhitespace): Added.
2854         (WebCore::collapsedToBoundary): Added.
2855         (WebCore::findPlainText): Rewrote to use new interface and streamline the
2856         logic a bit.
2857
2858         Add the relevant files in the icu directory. As icu/README says, the "icu"
2859         directory is really just for Mac OS X, where we have the ICU library but not
2860         the headers installed. It should be moved inside platform/mac at some point
2861         to make this more clear (and the copy in JavaScriptCore should be moved
2862         somewhere similar for the same reason).
2863
2864         * icu/unicode/ucoleitr.h: Added.
2865         * icu/unicode/usearch.h: Added.
2866
2867 2009-01-01  Oliver Hunt  <oliver@apple.com>
2868
2869         Reviewed by Cameron Zwarich.
2870
2871         CrashTracer: [REGRESSION] 1090 crashes in Safari at com.apple.JavaScriptCore: KJS::JSGlobalObject::stopTimeoutCheck + 0
2872         <rdar://problem/5821130>
2873
2874         This was caused by a plugin instance calling into JS code that removed the plugin
2875         object.  This fix is to cache the global object locally in a ProtectedPtr so we don't
2876         need to rely on the continued existence of the plugin instance.
2877
2878         * bridge/NP_jsobject.cpp:
2879         (_NPN_InvokeDefault):
2880         (_NPN_Invoke):
2881         (_NPN_Evaluate):
2882         (_NPN_Construct):
2883
2884 2008-12-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2885
2886         Reviewed by Holger Freyther.
2887
2888         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22964
2889
2890         MinGW build failure.
2891
2892         * platform/graphics/qt/SimpleFontDataQt.cpp:
2893         (WebCore::SimpleFontData::containsCharacters):
2894
2895 2008-12-31  Alexander V. Butenko  <alex@digiqube.com>
2896
2897         Reviewed by Holger Freyther.
2898
2899         https://bugs.webkit.org/show_bug.cgi?id=22750
2900         [gtk] webkit up to r39121 crash on image urls like
2901         http:///sitename.com
2902
2903         * platform/network/soup/ResourceHandleSoup.cpp:
2904         (WebCore::ResourceHandle::start):
2905
2906 2008-12-31  Hiroyuki Ikezoe  <poincare@ikezoe.net>
2907
2908         Reviewed by Holger Freyther.
2909
2910         https://bugs.webkit.org/show_bug.cgi?id=18310
2911
2912         * platform/graphics/gtk/SimpleFontDataPango.cpp:
2913         (WebCore::SimpleFontData::determinePitch): Do not invoke
2914         isFixedPitch() when the font is a custom font.
2915
2916 2008-12-31  Oliver Hunt  <oliver@apple.com>
2917
2918         Reviewed by Cameron Zwarich.
2919
2920         More work on Bug 3781: Animation via canvas could be faster
2921         <https://bugs.webkit.org/show_bug.cgi?id=3781>
2922
2923         Make use of the fast path parsing of color strings that Color
2924         uses.  This improves performance of '#rgb', '#rrggbb', etc and
2925         named (eg. 'green') colors.
2926
2927         Improves frame rate of test by around 40%
2928
2929         * html/CanvasStyle.cpp:
2930         (WebCore::CanvasStyle::applyStrokeColor):
2931         (WebCore::CanvasStyle::applyFillColor):
2932
2933 2008-12-30  Simon Fraser  <simon.fraser@apple.com>
2934
2935         Reviewed by Darin Adler
2936
2937         https://bugs.webkit.org/show_bug.cgi?id=23042
2938         
2939         Rather than doing a repaint() inside of computeAbsoluteRepaintRect()
2940         when there is a reflection, compute the location of the rect inside
2941         the reflection and take the union of the unreflected and reflected rects.
2942         
2943         Test: fast/repaint/reflection-redraw.html
2944
2945         * rendering/RenderBox.cpp:
2946         (WebCore::RenderBox::computeAbsoluteRepaintRect):
2947         * rendering/RenderObject.cpp:
2948         (WebCore::RenderObject::reflectedRect):
2949         * rendering/RenderObject.h:
2950
2951 2008-12-30  Dan Bernstein  <mitz@apple.com>
2952
2953         Reviewed by Adele Peterson.
2954
2955         - fix <rdar://problem/6469944> REGRESSION(3.2.1-ToT): Repro crash in WebCore::HTMLInputElement::updatePlaceholderVisibility opening http://billshrink.com
2956
2957         Test: fast/forms/placeholder-non-textfield.html
2958
2959         * html/HTMLInputElement.cpp:
2960         (WebCore::HTMLInputElement::parseMappedAttribute): Only call
2961         updatePlaceholderVisibility() when the placeholder attribute changes if
2962         the element is a text field.
2963
2964 2008-12-30  Oliver Hunt  <oliver@apple.com>
2965
2966         Reviewed by Antti Koivisto.
2967
2968         First step of Bug 3781: Animation via canvas could be faster
2969
2970         Amortise the cost of calling repaint by coalescing repaint rects
2971         while the canvas is drawn to.  In a later step we'll stop calling
2972         repaint() directly, and instead have all dirty canvases repaint
2973         at the end of JS execution.
2974
2975         * html/HTMLCanvasElement.cpp:
2976         (WebCore::HTMLCanvasElement::willDraw):
2977         (WebCore::HTMLCanvasElement::paint):
2978         * html/HTMLCanvasElement.h:
2979
2980 2008-12-30  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2981
2982         Reviewed by Antti Koivisto.
2983
2984         Bug 22931: Using the inspector with purgeable resources leads to assertion failures
2985         <https://bugs.webkit.org/show_bug.cgi?id=22931>
2986
2987         Change InspectorResource::sourceString() so that it doesn't attempt to
2988         unsafely get the data of a purgeable CachedResource.
2989
2990         * inspector/InspectorController.cpp:
2991         (WebCore::InspectorResource::sourceString): Attempt to make a purgeable
2992         resource unpurgeable, and if this not possible, return an empty string.
2993         * loader/CachedResource.h: Make InspectorResource a friend of CachedResource.
2994
2995 2008-12-29  Alexey Proskuryakov  <ap@webkit.org>
2996
2997         Reviewed by Sam Weinig.
2998
2999         https://bugs.webkit.org/show_bug.cgi?id=23023
3000         Remove incomplete support for opportunistic appcache entries
3001
3002         No change in behavior, thus no test.
3003
3004         * loader/appcache/ApplicationCacheResource.h:
3005         (WebCore::ApplicationCacheResource::Type): Removed Opportunistic bit, will re-use when schema
3006         version changes.
3007
3008         * loader/DocumentLoader.cpp:
3009         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
3010         * loader/appcache/ApplicationCacheGroup.cpp:
3011         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
3012         * loader/appcache/ApplicationCacheResource.cpp:
3013         (WebCore::ApplicationCacheResource::dumpType):
3014
3015 2008-12-29  Dirk Schulze  <krit@webkit.org>
3016
3017         Reviewed by Oliver Hunt.
3018
3019         Add arcTo support for Cairo. This is needed by Canvas.
3020         Cairo has no native support for arcTo. We have to make our
3021         own implementation.
3022
3023         [Canvas] Cairo needs arcTo
3024         https://bugs.webkit.org/show_bug.cgi?id=23003
3025
3026         * platform/graphics/cairo/PathCairo.cpp:
3027         (WebCore::Path::addArcTo):
3028
3029 2008-12-29  Oliver Hunt  <oliver@apple.com>
3030
3031         Reviewed by Cameron Zwarich.
3032
3033         Bug 23030: Cannot setTransform with a non-invertible ctm
3034
3035         Removed a series of unnecessary and incorrect checks for an invertible
3036         transform.
3037
3038         Test: fast/canvas/canvas-set-properties-with-non-invertible-ctm.html
3039
3040         * html/CanvasRenderingContext2D.cpp:
3041         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
3042         (WebCore::CanvasRenderingContext2D::setFillStyle):
3043             These properties are not effected by the current CTM, so there
3044             is no need to prevent them from being assigned.
3045
3046         (WebCore::CanvasRenderingContext2D::setTransform):
3047             The whole point of tracking whether the current CTM was expected to be
3048             non-invertible was to allow setTransform to be used when the CTM had become
3049             non-invertible.
3050
3051         (WebCore::CanvasRenderingContext2D::beginPath):
3052         (WebCore::CanvasRenderingContext2D::closePath):
3053             beginPath and closePath change the state of the path, but not any of
3054             its coordinates so there is no need prevent them from being called.
3055
3056 2008-12-29  Josh Roesslein  <jroesslein@gmail.com>
3057
3058         Reviewed by Oliver Hunt.
3059
3060         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22968
3061
3062         Context menu rendering error when full page zoomed
3063
3064         * page/ContextMenuController.cpp:
3065         (WebCore::ContextMenuController::handleContextMenuEvent):
3066
3067 2008-12-29  Sam Weinig  <sam@webkit.org>
3068
3069         Reviewed by Mark Rowe.
3070
3071         Add some basic memory statistic logging for Node.
3072
3073         * dom/Node.cpp:
3074         (WebCore::Node::dumpStatistics):
3075         (WebCore::Node::Node):
3076         (WebCore::Node::~Node):
3077         (WebCore::Node::setDocument):
3078         * dom/Node.h:
3079
3080 2008-12-29  Sam Weinig  <sam@webkit.org>
3081
3082         Reviewed by Anders Carlsson.
3083
3084         Remove one use of DeprecatedPtrList.
3085
3086         * css/CSSRuleList.cpp:
3087         (WebCore::CSSRuleList::~CSSRuleList):
3088         (WebCore::CSSRuleList::length):
3089         (WebCore::CSSRuleList::item):
3090         (WebCore::CSSRuleList::deleteRule):
3091         (WebCore::CSSRuleList::append):
3092         (WebCore::CSSRuleList::insertRule):
3093         * css/CSSRuleList.h: Change m_lstCSSRules from using DeprecatedPtrList to a Vector.
3094         I measured no performance change and was comforted by the fact that we use a Vector
3095         for StyleList, which serves the exact same purpose.
3096
3097 2008-12-29  Adele Peterson  <adele@apple.com>
3098
3099         Reviewed by Brady Eidson.
3100
3101         Fix for https://bugs.webkit.org/show_bug.cgi?id=21797
3102         <rdar://problem/6310682> REGRESSION: Crash in CFHTTPCookieStorageCopy beneath WebCore::cookies() when 
3103         running fast/dom/document-attribute-js-null.html and http/tests/security/cookies/create-document.html
3104         
3105         Return early if the document is trying to get or set a cookie with an empty cookie url.
3106
3107         * dom/Document.cpp:
3108         (WebCore::Document::cookie):
3109         (WebCore::Document::setCookie):
3110
3111 2008-12-28  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
3112
3113         Reviewed by Sam Weinig.
3114
3115         Bug 23016: JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while reparsing all functions
3116         <https://bugs.webkit.org/show_bug.cgi?id=23016>
3117         <rdar://problem/6425077>
3118
3119         JavaScriptDebugServer::recompileAllJSFunctions() calls sourceParsed() while
3120         reparsing all JS functions, which will execute JS in the inspector. Depending
3121         on the order in which functions are recompiled, a function could have a new
3122         body but other functions that have not been recompiled could have an optimized
3123         (in the sense of inline caching) call to it, bypassing the check of whether or
3124         not there is generated bytecode. This leads to a crash caused by accessing
3125         indices off of a null pointer.
3126
3127         To fix the problem, simply delay calling sourceParsed() until after all functions
3128         have been reparsed. The crash isn't 100% reproducible, but on the one test case
3129         I have, this makes it impossible to reproduce after a large number of attempts,
3130         when it used to happen every few attempts.
3131
3132         * inspector/JavaScriptDebugServer.cpp:
3133         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
3134
3135 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3136
3137         Rubber-stamped by Antti Koivisto.
3138         Oops, remove some last minute ASSERTS that are obviously wrong.
3139
3140         * rendering/RenderTextControlMultiLine.cpp:
3141         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
3142         * rendering/RenderTextControlSingleLine.cpp:
3143         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3144
3145 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3146
3147         Reviewed by Antti Koivisto.
3148
3149         Fixes: https://bugs.webkit.org/show_bug.cgi?id=23015
3150
3151         Don't rely on HTMLFormControlElement in RenderTextControl.
3152
3153         Introduce an abstract FormControlElement class, containing the
3154         valueMatchesRenderer/setValueMatchesRenderer, the only HTMLFormControlElement
3155         specific methods that RenderTextControl relies on.
3156
3157         This makes it possible for WML to reuse RenderTextControl.
3158         RenderTextControlSingleLine still relies on HTMLInputElement,
3159         this will change if WMLInputElement is introduced.
3160
3161         * GNUmakefile.am:
3162         * WebCore.vcproj/WebCore.vcproj:
3163         * WebCore.xcodeproj/project.pbxproj:
3164         * dom/FormControlElement.h: Added.
3165         (WebCore::FormControlElement::~FormControlElement):
3166         (WebCore::FormControlElement::FormControlElement):
3167         * html/HTMLFormControlElement.h:
3168         (WebCore::HTMLFormControlElement::valueMatchesRenderer):
3169         (WebCore::HTMLFormControlElement::setValueMatchesRenderer):
3170         * html/HTMLTextAreaElement.cpp:
3171         (WebCore::HTMLTextAreaElement::updateValue):
3172         * rendering/RenderTextControl.cpp:
3173         (WebCore::RenderTextControl::adjustInnerTextStyle):
3174         (WebCore::RenderTextControl::updateFromElement):
3175         (WebCore::RenderTextControl::setInnerTextValue):
3176         (WebCore::RenderTextControl::selectionChanged):
3177         (WebCore::RenderTextControl::formControlElement):
3178         * rendering/RenderTextControl.h:
3179         * rendering/RenderTextControlMultiLine.cpp:
3180         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
3181         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
3182         * rendering/RenderTextControlSingleLine.cpp:
3183         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3184         (WebCore::RenderTextControlSingleLine::updateFromElement):
3185
3186 2008-12-28  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
3187
3188         Reviewed by Darin Adler.
3189
3190         Bug 23006: Many Loader::Host member functions are not safe to use reentrantly
3191         <https://bugs.webkit.org/show_bug.cgi?id=23006>
3192         <rdar://problem/6216106>
3193
3194         Many Loader::Host member functions set m_processingResource to true when they
3195         begin processing a resource and set it to false when they are done. Thanks to
3196         JavaScript and the web inspector, almost anything can happen during the
3197         processing of a resource, including these functions being called reentrantly,
3198         which is unsafe due to this way of using m_processingResource.
3199
3200         This can theoretically cause a Loader::Host to be used after it is freed,
3201         because when Loader::servedPendingRequests() is called, it will free Hosts
3202         that have m_processingResource set to false.
3203
3204         To fix this, we replace m_processingResource with m_numResourcesProcessing,
3205         which is incremented and decremented using a helper object, ProcessingResource.
3206
3207         There are no occurrences of crashes caused by this bug that are reproducible
3208         by multiple people, but this fixes the problem of m_processingResource being
3209         set to false while a Host is still alive.
3210
3211         * loader/loader.cpp:
3212         (WebCore::Loader::Host::Host):
3213         (WebCore::Loader::Host::didFinishLoading): Change to use ProcessingResource
3214         instead of manually setting m_processingResource.
3215         (WebCore::Loader::Host::didFail): Ditto.
3216         (WebCore::Loader::Host::didReceiveData): Ditto.
3217         * loader/loader.h:
3218         (WebCore::Loader::Host::ProcessingResource::ProcessingResource): Added.
3219         (WebCore::Loader::Host::ProcessingResource::~ProcessingResource): Added.
3220         (WebCore::Loader::Host::processingResource): Change to use m_numResourcesProcessing
3221         instead of just getting m_processingResource.
3222
3223 2008-12-28  Alexey Proskuryakov  <ap@webkit.org>
3224
3225         Reviewed by Darin Adler.
3226
3227         https://bugs.webkit.org/show_bug.cgi?id=23007
3228         REGRESSION: Timer-related crash when closing Web Inspector
3229
3230         Test: fast/dom/Window/remove-timeout-crash.html
3231
3232         * bindings/js/DOMTimer.cpp: (WebCore::DOMTimer::fired): Besides deleting the timer, make
3233         sure to remove it from a Document map.
3234
3235 2008-12-28  Alexey Proskuryakov  <ap@webkit.org>
3236
3237         Reviewed by Anders Carlsson.
3238
3239         https://bugs.webkit.org/show_bug.cgi?id=23012
3240         Bring application cache manifest parsing up to date
3241
3242         Test: http/tests/appcache/manifest-parsing.html
3243
3244         * loader/appcache/ManifestParser.cpp:
3245         (WebCore::Mode): Added a constant for unknown sections, which are ignored when parsing. This
3246         is necessary for future extensions.
3247         (WebCore::parseManifest): Parse unknown sections correctly. Ignore trailing tokens in
3248         supported sections.
3249
3250 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3251
3252         Reviewed by Darin Adler.
3253
3254         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22996
3255
3256         RenderTextControl heavily depends on HTMLInputElement & HTMLTextAreaElement.
3257         It handles multi & single line text control rendering in one class. Split up
3258         in two new classes: RenderTextControlSingleLine & RenderTextControlMultiLine.
3259
3260         This has several benefits - code is more readable now, the memory usage
3261         for RenderTextControlMultiLine is reduced, as all stuff related to search fields
3262         lives in RenderTextControlSingleLine, and it's easier to introduce an
3263         abstraction for input/textarea-like elements for other HTML flavours like WML.
3264
3265         * GNUmakefile.am:
3266         * WebCore.order:
3267         * WebCore.pro:
3268         * WebCore.scons:
3269         * WebCore.vcproj/WebCore.vcproj:
3270         * WebCore.xcodeproj/project.pbxproj:
3271         * WebCoreSources.bkl:
3272         * html/HTMLInputElement.cpp:
3273         (WebCore::HTMLInputElement::createRenderer):
3274         (WebCore::HTMLInputElement::defaultEventHandler):
3275         (WebCore::HTMLInputElement::updatePlaceholderVisibility):
3276         (WebCore::HTMLInputElement::addSearchResult):
3277         (WebCore::HTMLInputElement::onSearch):
3278         * html/HTMLTextAreaElement.cpp:
3279         (WebCore::HTMLTextAreaElement::createRenderer):
3280         (WebCore::HTMLTextAreaElement::defaultEventHandler):
3281         * rendering/RenderTextControl.cpp:
3282         (WebCore::RenderTextControl::RenderTextControl):
3283         (WebCore::RenderTextControl::~RenderTextControl):
3284         (WebCore::RenderTextControl::styleDidChange):
3285         (WebCore::RenderTextControl::adjustInnerTextStyle):
3286         (WebCore::RenderTextControl::createSubtreeIfNeeded):
3287         (WebCore::RenderTextControl::textBlockHeight):
3288         (WebCore::RenderTextControl::textBlockWidth):
3289         (WebCore::RenderTextControl::updateFromElement):
3290         (WebCore::RenderTextControl::setInnerTextValue):
3291         (WebCore::RenderTextControl::setSelectionRange):
3292         (WebCore::RenderTextControl::visiblePositionForIndex):
3293         (WebCore::RenderTextControl::indexForVisiblePosition):
3294         (WebCore::RenderTextControl::subtreeHasChanged):
3295         (WebCore::RenderTextControl::scrollbarThickness):
3296         (WebCore::RenderTextControl::calcHeight):
3297         (WebCore::RenderTextControl::hitInnerTextBlock):
3298         (WebCore::RenderTextControl::forwardEvent):
3299         (WebCore::RenderTextControl::calcPrefWidths):
3300         (WebCore::RenderTextControl::selectionChanged):
3301         (WebCore::RenderTextControl::innerTextElement):
3302         * rendering/RenderTextControl.h:
3303         (WebCore::RenderTextControl::hasControlClip):
3304         (WebCore::RenderTextControl::canHaveChildren):
3305         (WebCore::RenderTextControl::avoidsFloats):
3306         (WebCore::RenderTextControl::isEdited):
3307         (WebCore::RenderTextControl::setEdited):
3308         * rendering/RenderTextControlMultiLine.cpp: Added.
3309         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
3310         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
3311         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
3312         (WebCore::RenderTextControlMultiLine::layout):
3313         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3314         (WebCore::RenderTextControlMultiLine::forwardEvent):
3315         (WebCore::RenderTextControlMultiLine::preferredContentWidth):
3316         (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
3317         (WebCore::RenderTextControlMultiLine::baselinePosition):
3318         (WebCore::RenderTextControlMultiLine::updateFromElement):
3319         (WebCore::RenderTextControlMultiLine::cacheSelection):
3320         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
3321         * rendering/RenderTextControlMultiLine.h: Added.
3322         (WebCore::RenderTextControlMultiLine::isTextArea):
3323         * rendering/RenderTextControlSingleLine.cpp: Added.
3324         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3325         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
3326         (WebCore::RenderTextControlSingleLine::placeholderShouldBeVisible):
3327         (WebCore::RenderTextControlSingleLine::updatePlaceholderVisibility):
3328         (WebCore::RenderTextControlSingleLine::addSearchResult):
3329         (WebCore::RenderTextControlSingleLine::stopSearchEventTimer):
3330         (WebCore::RenderTextControlSingleLine::showPopup):
3331         (WebCore::RenderTextControlSingleLine::hidePopup):
3332         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
3333         (WebCore::RenderTextControlSingleLine::paint):
3334         (WebCore::RenderTextControlSingleLine::layout):
3335         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
3336         (WebCore::RenderTextControlSingleLine::forwardEvent):
3337         (WebCore::RenderTextControlSingleLine::styleDidChange):
3338         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
3339         (WebCore::RenderTextControlSingleLine::textBlockWidth):
3340         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
3341         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
3342         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
3343         (WebCore::RenderTextControlSingleLine::updateFromElement):
3344         (WebCore::RenderTextControlSingleLine::cacheSelection):
3345         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
3346         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
3347         (WebCore::RenderTextControlSingleLine::createResultsButtonStyle):
3348         (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
3349         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
3350         (WebCore::RenderTextControlSingleLine::autosaveName):
3351         (WebCore::RenderTextControlSingleLine::startSearchEventTimer):
3352         (WebCore::RenderTextControlSingleLine::searchEventTimerFired):
3353         (WebCore::RenderTextControlSingleLine::valueChanged):
3354         (WebCore::RenderTextControlSingleLine::itemText):
3355         (WebCore::RenderTextControlSingleLine::itemIsEnabled):
3356         (WebCore::RenderTextControlSingleLine::itemStyle):
3357         (WebCore::RenderTextControlSingleLine::menuStyle):
3358         (WebCore::RenderTextControlSingleLine::clientInsetLeft):
3359         (WebCore::RenderTextControlSingleLine::clientInsetRight):
3360         (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
3361         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
3362         (WebCore::RenderTextControlSingleLine::listSize):
3363         (WebCore::RenderTextControlSingleLine::selectedIndex):
3364         (WebCore::RenderTextControlSingleLine::itemIsSeparator):
3365         (WebCore::RenderTextControlSingleLine::itemIsLabel):
3366         (WebCore::RenderTextControlSingleLine::itemIsSelected):
3367         (WebCore::RenderTextControlSingleLine::setTextFromItem):
3368         (WebCore::RenderTextControlSingleLine::fontSelector):
3369         (WebCore::RenderTextControlSingleLine::hostWindow):
3370         (WebCore::RenderTextControlSingleLine::createScrollbar):
3371         * rendering/RenderTextControlSingleLine.h: Added.
3372         (WebCore::RenderTextControlSingleLine::hasControlClip):
3373         (WebCore::RenderTextControlSingleLine::isTextField):
3374         (WebCore::RenderTextControlSingleLine::placeholderIsVisible):
3375         (WebCore::RenderTextControlSingleLine::popupIsVisible):
3376         (WebCore::RenderTextControlSingleLine::shouldPopOver):
3377         (WebCore::RenderTextControlSingleLine::valueShouldChangeOnHotTrack):
3378         * rendering/TextControlInnerElements.cpp:
3379         (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
3380         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
3381
3382 2008-12-28  Dmitry Titov  <dimich@chromium.org>
3383
3384         Reviewed by Darin Adler.
3385
3386         https://bugs.webkit.org/show_bug.cgi?id=22755
3387         Prepare to add create/remove timeout methods to JSWorkerContext by moving
3388         timer-specific code from JSDOMWindowBase to DOMTimer.
3389         Moved everything JS-related from DOMTimer to ScheduledAction.
3390         Now ScheduledAction is what it wanted to be all the time: a JS engine-specific 
3391         container for timer callback that knows how to invoke it.
3392         DOMTimer is not anymore JS-specific.
3393
3394         This is mostly moving the code around. No intended functional changes.
3395
3396         * bindings/js/DOMTimer.cpp:
3397         (WebCore::DOMTimer::DOMTimer):
3398         (WebCore::DOMTimer::~DOMTimer):
3399         (WebCore::DOMTimer::install):
3400         (WebCore::DOMTimer::removeById):
3401         (WebCore::DOMTimer::fired):
3402         (WebCore::DOMTimer::stop):
3403         * bindings/js/DOMTimer.h:
3404         * bindings/js/JSDOMWindowBase.cpp:
3405         (WebCore::JSDOMWindowBase::installTimeout):
3406         (WebCore::JSDOMWindowBase::removeTimeout):
3407         * bindings/js/JSDOMWindowBase.h:
3408         * bindings/js/ScheduledAction.cpp:
3409         (WebCore::ScheduledAction::execute):
3410         * bindings/js/ScheduledAction.h:
3411         * dom/Document.cpp:
3412         (WebCore::Document::addTimeout):
3413
3414 2008-12-26  Zalan Bujtas  <zbujtas@gmail.com>
3415
3416         Reviewed by Darin Adler.
3417
3418         https://bugs.webkit.org/show_bug.cgi?id=22999
3419         Check if database thread exists.
3420
3421         * storage/Database.cpp:
3422         (WebCore::Database::openAndVerifyVersion):
3423         (WebCore::Database::markAsDeletedAndClose):
3424         (WebCore::Database::tableNames):
3425
3426 2008-12-26  Alexey Proskuryakov  <ap@webkit.org>
3427
3428         Reviewed by Darin Adler.
3429
3430         https://bugs.webkit.org/show_bug.cgi?id=23001
3431         A call to applicationCache.update() from a cached event listener should be ignored
3432
3433         Test: http/tests/appcache/idempotent-update.html
3434
3435         * loader/appcache/ApplicationCacheGroup.cpp:
3436         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Only reset m_status after
3437         dispatching events.
3438
3439 2008-12-26  Alexey Proskuryakov  <ap@webkit.org>
3440
3441         Reviewed by Darin Adler.
3442
3443         https://bugs.webkit.org/show_bug.cgi?id=22997
3444         ASSERTION FAILED: !m_resources.contains(url) in ApplicationCache::addResource()
3445
3446         Tests: http/tests/appcache/top-frame-1.html
3447                http/tests/appcache/top-frame-2.html
3448                http/tests/appcache/top-frame-3.html
3449                http/tests/appcache/top-frame-4.html
3450
3451         * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
3452         Fixed one more instance of top level frame being used for caching purposes.
3453
3454 2008-12-26  Dmitry Titov  <dimich@chromium.org>
3455
3456         Reviewed by Darin Adler.
3457
3458         https://bugs.webkit.org/show_bug.cgi?id=22987
3459         Fix for broken test editing/execCommand/5763082.html
3460
3461         * editing/CompositeEditCommand.cpp:
3462         (WebCore::CompositeEditCommand::mergeIdenticalElements): Used local RefPtr to hold onto
3463         function parameter across multiple calls.
3464
3465 2008-12-25  Alexey Proskuryakov  <ap@webkit.org>
3466
3467         Reviewed by Darin Adler.
3468
3469         https://bugs.webkit.org/show_bug.cgi?id=22993
3470         Application cache shouldn't be inherited by subframes
3471
3472         <rdar://problem/6284708> AppCache crashes in ApplicationCacheResource::addType()
3473         This crash happened because main resource for subframe was looked up in top frame's
3474         appcache. If not for the spec change, it could have been fixed by preventing the load
3475         altogether.
3476
3477         Test: http/tests/appcache/foreign-iframe-main.html
3478         I intend to write additional tests for the behavior change.
3479
3480         * loader/DocumentLoader.cpp:
3481         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
3482         * loader/DocumentLoader.h:
3483         (WebCore::DocumentLoader::applicationCache):
3484         * loader/MainResourceLoader.cpp:
3485         (WebCore::MainResourceLoader::load):
3486         * loader/appcache/DOMApplicationCache.cpp:
3487         (WebCore::DOMApplicationCache::associatedCache):
3488         Removed DocumentLoader::topLevelApplicationCache(), and changed callers accordingly.
3489
3490         * loader/appcache/ApplicationCacheGroup.cpp:
3491         (WebCore::ApplicationCacheGroup::selectCache):
3492         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3493         Removed checks for the frame being top-level one, now that subframes are cached independently.
3494
3495 2008-12-25  Antti Koivisto  <antti@apple.com>
3496
3497         Reviewed by Oliver Hunt.
3498
3499         <rdar://problem/6465669> Frequent !isPurgeable() assertion in WebCore::CachedResource::addClient
3500         
3501         Disallow turning resources that are being revalidated to purgable state.
3502         
3503         No test, the condition is difficult to produce in DRT.
3504
3505         * loader/CachedCSSStyleSheet.cpp:
3506         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
3507         * loader/CachedImage.cpp:
3508         (WebCore::CachedImage::destroyDecodedData):
3509         * loader/CachedResource.cpp:
3510         (WebCore::CachedResource::isSafeToMakePurgeable):
3511         (WebCore::CachedResource::makePurgeable):
3512         * loader/CachedResource.h:
3513         * loader/CachedScript.cpp:
3514         (WebCore::CachedScript::destroyDecodedData):
3515
3516 2008-12-25  Alexey Proskuryakov  <ap@webkit.org>
3517
3518         Qt build fix.
3519
3520         * WebCore.pro: Added ThreadGlobalData.cpp.
3521
3522 2008-12-24  Mark Rowe  <mrowe@apple.com>
3523
3524         Build fix.
3525
3526         * WebCore.base.exp:  Remove a symbol from the export file now that it is no longer generated.
3527
3528 2008-12-24  Holger Hans Peter Freyther  <zecke@selfish.org>
3529
3530         Unreviewed build fix to find addSubresourceURL
3531
3532         This is needed to compile on WebKit/Gtk+
3533
3534         * css/CSSFontFaceSrcValue.cpp:
3535
3536 2008-12-23  Alexey Proskuryakov  <ap@webkit.org>
3537
3538         Reviewed by Darin Adler.
3539
3540         https://bugs.webkit.org/show_bug.cgi?id=22980
3541         WebCore uses more thread specific keys than it really needs
3542
3543         Consolidated ThreadSpecific data into a single ThreadGlobalData structure.
3544
3545         * GNUmakefile.am:
3546         * WebCore.base.exp:
3547         * WebCore.scons:
3548         * WebCore.vcproj/WebCore.vcproj:
3549         * WebCore.xcodeproj/project.pbxproj:
3550         * WebCoreSources.bkl:
3551         * dom/EventNames.cpp:
3552         * dom/EventNames.h:
3553         (WebCore::eventNames):
3554         * page/Frame.cpp:
3555         (WebCore::Frame::Frame):
3556         * platform/ThreadGlobalData.cpp: Added.
3557         (WebCore::threadGlobalData):
3558         (WebCore::ThreadGlobalData::ThreadGlobalData):
3559         (WebCore::ThreadGlobalData::~ThreadGlobalData):
3560         * platform/ThreadGlobalData.h: Added.
3561         (WebCore::ThreadGlobalData::eventNames):
3562         (WebCore::ThreadGlobalData::emptyString):
3563         (WebCore::ThreadGlobalData::atomicStringTable):
3564         (WebCore::ThreadGlobalData::cachedConverterICU):
3565         (WebCore::ThreadGlobalData::cachedConverterTEC):
3566         * platform/text/AtomicString.cpp:
3567         (WebCore::stringTable):
3568         (WebCore::AtomicString::add):
3569         (WebCore::AtomicString::remove):
3570         (WebCore::AtomicString::find):
3571         (WebCore::AtomicString::init):
3572         * platform/text/StringImpl.cpp:
3573         (WebCore::StringImpl::empty):
3574         * platform/text/StringImpl.h:
3575         * platform/text/TextCodecICU.cpp:
3576         (WebCore::ICUConverterWrapper::~ICUConverterWrapper):
3577         (WebCore::cachedConverterICU):
3578         * platform/text/TextCodecICU.h:
3579         (WebCore::ICUConverterWrapper::ICUConverterWrapper):
3580         * platform/text/mac/TextCodecMac.cpp:
3581         (WebCore::cachedConverterTEC):
3582         * platform/text/mac/TextCodecMac.h:
3583         (WebCore::TECConverterWrapper::TECConverterWrapper):
3584         (WebCore::TECConverterWrapper::~TECConverterWrapper):
3585
3586 2008-12-23  Mark Rowe  <mrowe@apple.com>
3587
3588         Build fix.
3589
3590         * WebCore.xcodeproj/project.pbxproj: CSSPropertyNames.h is a generated file so it needs to be explicitly copied
3591         into the PrivateHeaders directory, rather than relying on the automatic copying of headers which runs before the
3592         derived sources are generated.
3593
3594 2008-12-23  Simon Fraser  <simon.fraser@apple.com>
3595
3596         Reviewed by Dan Bernstein
3597
3598         https://bugs.webkit.org/show_bug.cgi?id=22941
3599         
3600         If the document element has opacity, we need to erase the view background to
3601         white before painting.
3602         
3603         Test: fast/backgrounds/opacity-on-document-element.html
3604
3605         * rendering/RenderView.cpp:
3606         (WebCore::rendererObscuresBackground):
3607
3608 2008-12-23  Simon Fraser  <simon.fraser@apple.com>
3609
3610         Reviewed by Dan Bernstein
3611
3612         https://bugs.webkit.org/show_bug.cgi?id=21910
3613         
3614         Fix SVGImage painting by ensuring that the SVGImage resizes its FrameView correctly.
3615         Otherwise the FrameView is left at 0x0, and nothing paints.
3616         
3617         * svg/graphics/SVGImage.cpp:
3618         (WebCore::SVGImage::draw):
3619
3620 2008-12-23  Darin Adler  <darin@apple.com>
3621
3622         Reviewed by John Sullivan.
3623
3624         - improve robustness of undo/redo in HTML editing to fix the following bugs
3625           <https://bugs.webkit.org/show_bug.cgi?id=19703> Crash in WebCore::InsertNodeBeforeCommand::doUnapply()
3626           <rdar://problem/4059423> DOM operations performed on editable HTML can cause a crash later during Undo
3627
3628         Major categories of improvements:
3629
3630             1) Added null checks.
3631             2) Eliminated type casts without corresponding type checks.
3632             3) Avoided possible infinite loops by building up lists of nodes to operate on
3633                before starting to make DOM changes.
3634             4) Use more RefPtr.
3635
3636         No test at this time, but test cases should follow in separate patches.
3637
3638         * WebCore.xcodeproj/project.pbxproj: Set the role of CSSPropertyNames.h to Private so it
3639         can be used in other Private headers, specifically editing ones.
3640
3641         * css/CSSStyleSelector.cpp:
3642         (WebCore::CSSStyleSelector::locateCousinList): Adopt parentElement.
3643         (WebCore::CSSStyleSelector::locateSharedStyle): Ditto.
3644         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
3645
3646         * dom/Element.cpp: (WebCore::Element::cloneElement): Added.
3647         * dom/Element.h: Added cloneElement and an implementation of parentElement.
3648         * dom/Node.h: Moved parentElement from here to Element.h and changed its
3649         implementation so it will return 0 when the parent is not an element
3650         (document, document fragment, etc.).
3651
3652         * editing/AppendNodeCommand.cpp:
3653         (WebCore::AppendNodeCommand::AppendNodeCommand): Made parent be an Element.
3654         Moved assertions from doApply in here.
3655         (WebCore::AppendNodeCommand::doApply): Simplified to just a single unchecked
3656         appendChild call.
3657         (WebCore::AppendNodeCommand::doUnapply): Simplified to just a single remove call.
3658         * editing/AppendNodeCommand.h: Updated.
3659
3660         * editing/ApplyStyleCommand.cpp:
3661         (WebCore::createStyleSpanElement): Eliminate casting by creating an element in a more
3662         direct way with new instead of createElementNS.
3663         (WebCore::ApplyStyleCommand::ApplyStyleCommand): Use PassRefPtr.
3664         (WebCore::ApplyStyleCommand::removeCSSStyle): Use CSSPropertyID.
3665         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Use cloneElement.
3666         * editing/ApplyStyleCommand.h:
3667
3668         * editing/BreakBlockquoteCommand.cpp:
3669         (WebCore::BreakBlockquoteCommand::doApply): Use Element* and cloneElement.
3670
3671         * editing/CompositeEditCommand.cpp:
3672         (WebCore::CompositeEditCommand::applyStyledElement): Use PassRefPtr and unsigned.
3673         (WebCore::CompositeEditCommand::removeStyledElement): Ditto.
3674         (WebCore::CompositeEditCommand::insertNodeBefore): Ditto.
3675         (WebCore::CompositeEditCommand::insertNodeAfter): Ditto.
3676         (WebCore::CompositeEditCommand::insertNodeAt): Ditto.
3677         (WebCore::CompositeEditCommand::appendNode): Ditto.
3678         (WebCore::CompositeEditCommand::removeChildrenInRange): Ditto. Also use a vector to
3679         make the list of children in case removing them has side effects.
3680         (WebCore::CompositeEditCommand::removeNode): Ditto.
3681         (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
3682         (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Ditto.
3683         (WebCore::CompositeEditCommand::splitTextNode): Ditto.
3684         (WebCore::CompositeEditCommand::splitElement): Ditto.
3685         (WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto.
3686         (WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto.
3687         (WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto.
3688         (WebCore::CompositeEditCommand::joinTextNodes): Ditto.
3689         (WebCore::CompositeEditCommand::inputText): Ditto.
3690         (WebCore::CompositeEditCommand::insertTextIntoNode): Ditto.
3691         (WebCore::CompositeEditCommand::deleteTextFromNode): Ditto.
3692         (WebCore::CompositeEditCommand::replaceTextInNode): Ditto.
3693         (WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition): Ditto.
3694         (WebCore::CompositeEditCommand::removeCSSProperty): Ditto.
3695         (WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Implement by calling
3696         setNodeAttribute instead of with its own SimpleEditCommand.
3697         (WebCore::CompositeEditCommand::setNodeAttribute): Ditto.
3698         (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto.
3699         (WebCore::CompositeEditCommand::appendBlockPlaceholder): Ditto.
3700         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
3701         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto. Don't
3702         bother using an undoable operation to put the break element into the paragraph
3703         element because there's no need to split them and redo this when doing undo/redo.
3704         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
3705         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
3706         * editing/CompositeEditCommand.h: Ditto.
3707
3708         * editing/DeleteFromTextNodeCommand.cpp:
3709         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Use unsigned.
3710         (WebCore::DeleteFromTextNodeCommand::doApply): Eliminated inappropriate assertions.
3711         (WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
3712         * editing/DeleteFromTextNodeCommand.h:
3713
3714         * editing/DeleteSelectionCommand.cpp:
3715         (WebCore::DeleteSelectionCommand::removeNode): Use PassRefPtr.
3716         (WebCore::DeleteSelectionCommand::deleteTextFromNode): Ditto.
3717         * editing/DeleteSelectionCommand.h:
3718
3719         * editing/FormatBlockCommand.cpp:
3720         (WebCore::FormatBlockCommand::FormatBlockCommand): Use AtomicString.
3721         (WebCore::FormatBlockCommand::doApply): Use Element.
3722         * editing/FormatBlockCommand.h:
3723
3724         * editing/IndentOutdentCommand.cpp:
3725         (WebCore::createIndentBlockquoteElement): Use new to create the element
3726         instead of calling a function so we have a more specific type.
3727         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
3728         Use RefPtr and Element.
3729         (WebCore::IndentOutdentCommand::indentRegion): Ditto.
3730         (WebCore::IndentOutdentCommand::outdentParagraph): Ditto.
3731         * editing/IndentOutdentCommand.h:
3732
3733         * editing/InsertIntoTextNodeCommand.cpp:
3734         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3735         Use unsigned. Added an assertion.
3736         (WebCore::InsertIntoTextNodeCommand::doApply): Eliminated inappropriate assertions.
3737         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
3738         * editing/InsertIntoTextNodeCommand.h:
3739
3740         * editing/InsertLineBreakCommand.cpp:
3741         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use Element.
3742         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
3743
3744         * editing/InsertListCommand.cpp:
3745         (WebCore::InsertListCommand::doApply): Use Element.
3746
3747         * editing/InsertNodeBeforeCommand.cpp:
3748         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Moved assertions
3749         here from doApply.
3750         (WebCore::InsertNodeBeforeCommand::doApply): Eliminated inappropriate assertions.
3751         Added a null check.
3752         (WebCore::InsertNodeBeforeCommand::doUnapply): Simplified to just a single remove call.
3753
3754         * editing/InsertParagraphSeparatorCommand.cpp:
3755         (WebCore::InsertParagraphSeparatorCommand::doApply): Use Element and cloneElement.
3756
3757         * editing/JoinTextNodesCommand.cpp:
3758         (WebCore::JoinTextNodesCommand::doApply): Eliminated inappropriate assertions.
3759         Added some runtime checks. Don't store anything in m_offset.
3760         (WebCore::JoinTextNodesCommand::doUnapply): Ditto.
3761         * editing/JoinTextNodesCommand.h:
3762
3763         * editing/MergeIdenticalElementsCommand.cpp:
3764         (WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Moved
3765         an assertion here from doApply.
3766         (WebCore::MergeIdenticalElementsCommand::doApply): Eliminated inappropriate assertions.
3767         Added a null check. Changed implementation to use remove to avoid null parent issue.
3768         Use a vector of nodes to avoid possible infinite loop if mutation happens while iterating.
3769         (WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
3770
3771         * editing/ModifySelectionListLevel.cpp:
3772         (WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange): Use Element*.
3773         (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
3774         * editing/ModifySelectionListLevel.h:
3775
3776         * editing/RemoveCSSPropertyCommand.cpp:
3777         (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Use PassRefPtr and
3778         CSSPropertyID. Also renamed m_decl to m_style.
3779         (WebCore::RemoveCSSPropertyCommand::doApply): Eliminated inappropriate assertions.
3780         (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
3781
3782         * editing/RemoveNodeAttributeCommand.cpp: Removed contents of this file. To be deleted.
3783         Use SetNodeAttributeCommand instead.
3784         * editing/RemoveNodeAttributeCommand.h: Ditto.
3785
3786         * editing/RemoveNodeCommand.cpp:
3787         (WebCore::RemoveNodeCommand::RemoveNodeCommand): Moved assertions here from doApply.
3788         Don't initialize m_refChild here; rather do it in doApply.
3789         (WebCore::RemoveNodeCommand::doApply): Eliminated inappropriate assertions. Added
3790         checks and streamlined implementation.
3791         (WebCore::RemoveNodeCommand::doUnapply): Ditto.
3792         * editing/RemoveNodeCommand.h:
3793
3794         * editing/RemoveNodePreservingChildrenCommand.cpp:
3795         (WebCore::RemoveNodePreservingChildrenCommand::doApply): Use a vector.
3796
3797         * editing/ReplaceSelectionCommand.cpp:
3798         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Removed now-unneeded cast.
3799
3800         * editing/SetNodeAttributeCommand.cpp:
3801         (WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Use AtomicString.
3802         Removed assertion that prevents us from using this to remove an attribute.
3803         (WebCore::SetNodeAttributeCommand::doApply): Eliminated inappropriate assertions.
3804         (WebCore::SetNodeAttributeCommand::doUnapply): Ditto.
3805         * editing/SetNodeAttributeCommand.h:
3806
3807         * editing/SplitElementCommand.cpp:
3808         (WebCore::SplitElementCommand::SplitElementCommand): Moved assertion here from doApply.
3809         (WebCore::SplitElementCommand::doApply): Check some more invariants and use a vector
3810         to avoid possible infinite loops.
3811         (WebCore::SplitElementCommand::doUnapply): Ditto.
3812
3813         * editing/SplitTextNodeCommand.cpp:
3814         (WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Moved assertions and comment
3815         here from doApply.
3816         (WebCore::SplitTextNodeCommand::doApply): Check for null and failures when applying.
3817         (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
3818
3819         * editing/SplitTextNodeContainingElementCommand.cpp:
3820         (WebCore::SplitTextNodeContainingElementCommand::doApply): Use Element.
3821
3822         * editing/WrapContentsInDummySpanCommand.cpp:
3823         (WebCore::WrapContentsInDummySpanCommand::doApply): Check for null and ignore failures.
3824         Don't reuse the dummy span. Simplified logic.
3825         (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
3826
3827         * editing/htmlediting.cpp:
3828         (WebCore::isBlock): Make sure this returns true only for elements.
3829         (WebCore::enclosingBlock): Return an Element*.
3830         (WebCore::enclosingTableCell): Ditto.
3831         (WebCore::enclosingList): Return an HTMLElement*.
3832         (WebCore::outermostEnclosingList): Return an HTMLElement*.
3833         (WebCore::createDefaultParagraphElement): Return an HTMLElement*.
3834         (WebCore::createBreakElement): Return an HTMLElement*.
3835         (WebCore::createOrderedListElement): Return an HTMLElement*.
3836         (WebCore::createUnorderedListElement): Return an HTMLElement*.
3837         (WebCore::createListItemElement): Return an HTMLElement*.
3838         (WebCore::createHTMLElement): Return an HTMLElement*.
3839         * editing/htmlediting.h:
3840
3841         * editing/markup.cpp:
3842         (WebCore::createFragmentFromText): Use createBreakElement and use Element*.
3843
3844         * page/MouseEventWithHitTestResults.cpp:
3845         (WebCore::MouseEventWithHitTestResults::targetNode): Use parentElement.
3846
3847 2008-12-23  Darin Adler  <darin@apple.com>
3848
3849         Reviewed by Dan Bernstein.
3850
3851         * dom/Node.h: Tweak comments and order of bits that Sam moved
3852         here last night.
3853         * dom/Node.cpp: Ditto.
3854
3855 2008-12-22  Julien Chaffraix  <jchaffraix@webkit.org>
3856
3857         Reviewed by Darin Adler.
3858
3859         Bug 11106: Some XMLHttpRequest URI resolving tests fail
3860         https://bugs.webkit.org/show_bug.cgi?id=11106
3861
3862         Use the ScriptExecutionContext to resolve the URI when calling open in JavaScript.
3863         The previous code was using the containing DOMWindow to do so which would fail for
3864         XMLHttpRequest object being passed between iframe.
3865
3866         Tests: http/tests/xmlhttprequest/uri-resolution-opera-open-004.html
3867                http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
3868                http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
3869                http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
3870                http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
3871                http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
3872                http/tests/xmlhttprequest/uri-resolution-opera-open-010.html
3873
3874         * bindings/js/JSXMLHttpRequestCustom.cpp:
3875         (WebCore::JSXMLHttpRequest::open): Use the ScriptExecutionContext
3876         to resolve the URL.
3877
3878         * dom/Document.cpp:
3879         (WebCore::Document::virtualCompleteURL): Virtual method added to
3880         avoid performance hit on completeURL call.
3881
3882         * dom/Document.h:
3883         * dom/ScriptExecutionContext.h:
3884         (WebCore::ScriptExecutionContext::completeURL): Non-virtual method
3885         that wrap the call to the virtual call.
3886         * dom/WorkerContext.cpp:
3887         (WebCore::WorkerContext::virtualCompleteURL): Pure virtual method.
3888         * dom/WorkerContext.h:
3889
3890 2008-12-23  Darin Adler  <darin@apple.com>
3891
3892         Reviewed by Dan Bernstein.
3893
3894         - https://bugs.webkit.org/show_bug.cgi?id=22978
3895           a couple tweaks to the new strokeBoundingRect functions
3896
3897         * platform/graphics/cairo/PathCairo.cpp:
3898         (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
3899         if the applier is non-null.
3900
3901         * platform/graphics/cg/PathCG.cpp:
3902         (WebCore::putBytesNowhere): Added.
3903         (WebCore::createScratchContext): Changed to use a "/dev/null" type
3904         function to discard bytes rather than using a data object. This
3905         eliminates the possibility that memory will be used if someone draws
3906         into the scratch context by accident. Also moved to the top of the
3907         file; it was in a slightly strange place before.
3908         (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
3909         if the applier is non-null. Simplify the empty path special case.
3910
3911 2008-12-22  Sam Weinig  <sam@webkit.org>
3912
3913         Reviewed by Mark Rowe.
3914
3915         Save a word in all Elements by moving the 5 loose bits to Node,
3916         where we had 16 spare.
3917
3918         * dom/Element.cpp:
3919         (WebCore::Element::Element):
3920         * dom/Element.h:
3921         * dom/Node.cpp:
3922         (WebCore::Node::Node):
3923         * dom/Node.h:
3924
3925 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3926
3927         Reviewed by George Staikos.
3928
3929         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22972
3930
3931         Add WML <meta> element support. All needed functionality is present
3932         in Document::processHttpEquiv, already covered by tests.
3933
3934         * GNUmakefile.am:
3935         * WebCore.pro:
3936         * WebCore.vcproj/WebCore.vcproj:
3937         * WebCore.xcodeproj/project.pbxproj:
3938         * wml/WMLMetaElement.cpp: Added.
3939         (WebCore::WMLMetaElement::WMLMetaElement):
3940         (WebCore::WMLMetaElement::parseMappedAttribute):
3941         (WebCore::WMLMetaElement::insertedIntoDocument):
3942         * wml/WMLMetaElement.h: Added.
3943         * wml/WMLTagNames.in:
3944
3945 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3946
3947         Rubber-stamped by Darin Adler.
3948
3949         Don't reference specific layout tests in comments.
3950
3951         * html/HTMLFormElement.cpp:
3952         (WebCore::HTMLFormElement::createFormData):
3953
3954 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3955
3956         Reviewed by George Staikos.
3957
3958         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22965
3959
3960         Add WML <head> element support. Doesn't require a WMLHeadElement.
3961         No functional behaviour, as we already created a WMLElement for headTag, by default.
3962         It's just cleaner to list <head> in WMLTagNames, forwarding to a WMLElement constructor.
3963
3964         * wml/WMLTagNames.in:
3965
3966 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3967
3968         Reviewed by George Staikos.
3969
3970         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22971
3971
3972         Fix regression caused by the HTMLFormElement refactorization.
3973         File form elements without a name have to be included in multipart/form-data
3974         submission. Cover this behaviour with a new test case.
3975
3976         Test: http/tests/misc/empty-file-formdata.html
3977
3978         * html/HTMLFormElement.cpp:
3979         (WebCore::HTMLFormElement::createFormData):
3980         * wml/WMLTagNames.in:
3981
3982 2008-12-22  David Kilzer  <ddkilzer@apple.com>
3983
3984         <rdar://problem/6438298> Bump schema version for app cache
3985
3986         Reviewed by Alexey Proskuryakov.
3987
3988         * loader/appcache/ApplicationCacheStorage.cpp: Increment
3989         SchemaVersion from 2 to 3.
3990
3991 2008-12-22  David Kilzer  <ddkilzer@apple.com>
3992
3993         Use Deque in CSSStyleSheet::addSubresourceStyleURLs()
3994
3995         Reviewed by Darin Adler.
3996
3997         * css/CSSStyleSheet.cpp:
3998         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Replaced
3999         use of ListHashSet with more efficient Deque.
4000
4001 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
4002
4003         Reviewed by Sam Weinig.
4004
4005         Fix obvious crash fix for WML enabled builds.
4006
4007         * css/CSSStyleSelector.cpp:
4008         (WebCore::CSSStyleSelector::adjustRenderStyle):
4009
4010 2008-12-22  David Kilzer  <ddkilzer@apple.com>
4011
4012         Bug 11850: Webarchive fails to save images referenced in CSS
4013
4014         <https://bugs.webkit.org/show_bug.cgi?id=11850>
4015
4016         Reviewed by Darin Adler.
4017
4018         This entry contains two parts since the tests for adding a
4019         completeURL() method to StyleSheet and CSSStyleSheet (part 1) depend
4020         on Bug 11850 being fixed (part 2).
4021
4022         --
4023
4024         Tests: http/tests/webarchive/test-css-url-encoding-shift-jis.html
4025                http/tests/webarchive/test-css-url-encoding-utf-8.html
4026                http/tests/webarchive/test-css-url-encoding.html
4027
4028         Added completeURL() methods to StyleSheet and CSSStyleSheet that
4029         match the behavior of Document::completeURL().  Most notably,
4030         CSSStyleSheet::completeURL() uses the charset of the stylesheet
4031         (if it exists) to construct URLs, just like Document::completeURL().
4032
4033         * css/CSSParser.cpp:
4034         (WebCore::CSSParser::parseValue): Use CSSStyleSheet::completeURL().
4035         (WebCore::CSSParser::parseContent): Ditto.
4036         (WebCore::CSSParser::parseFillImage): Ditto.
4037         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
4038         (WebCore::CSSParser::parseBorderImage): Ditto.
4039
4040         * css/CSSStyleSheet.cpp:
4041         (WebCore::CSSStyleSheet::completeURL): Added.
4042         * css/CSSStyleSheet.h:
4043         (WebCore::CSSStyleSheet::completeURL): Added declaration.
4044
4045         * css/StyleSheet.cpp:
4046         (WebCore::StyleSheet::completeURL): Added.
4047         * css/StyleSheet.h:
4048         (WebCore::StyleSheet::completeURL): Added declaration.
4049
4050         * dom/Document.cpp:
4051         (WebCore::Document::completeURL): Added comment referring to the new
4052         completeURL() methods in StyleSheet and CSSStyleSheet.
4053
4054         --
4055
4056         Tests: webarchive/test-css-url-resources-in-stylesheets.html
4057                webarchive/test-css-url-resources-inline-styles.html
4058
4059         Walk stylesheets and inline style attributes for url() references
4060         when building a list of URLs to include in a webarchive.  Note that
4061         not all URLs found this way will be included in the webarchive if
4062         they were not used (and thus not downloaded) when laying out the
4063         page.
4064
4065         The key method for CSS stylesheets is
4066         CSSStyleSheet::addSubresourceStyleURLs() which iterates over all
4067         CSSStyleSheet objects recursively referenced from its own stylesheet
4068         through @import rules.  Starting with the CSSRule objects in each
4069         sheet and continuing down through the CSSMutableStyleDeclaration and
4070         CSSValue objects, addSubresourceStyleURLs() methods are called to
4071         gather URLs.
4072
4073         For inline style attributes in HTML DOM elements,
4074         StyledElement::addSubresourceAttributeURLs() calls
4075         CSSMutableStyleDeclaration::addSubresourceStyleURLs() to gather URLs
4076         from each element, hence the need to call
4077         addSubresourceAttributeURLs() on superclasses when the method is
4078         implemented on the element class itself.
4079
4080         * css/CSSBorderImageValue.cpp:
4081         (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added.
4082         * css/CSSBorderImageValue.h:
4083         (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added
4084         declaration.
4085
4086         * css/CSSFontFaceRule.cpp:
4087         (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added.
4088         * css/CSSFontFaceRule.h:
4089         (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added
4090         declaration.
4091
4092         * css/CSSFontFaceSrcValue.cpp:
4093         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added.
4094         * css/CSSFontFaceSrcValue.h:
4095         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added
4096         declaration.
4097
4098         * css/CSSImportRule.cpp:
4099         (WebCore::CSSImportRule::addSubresourceStyleURLs): Added.
4100         * css/CSSImportRule.h:
4101         (WebCore::CSSImportRule::addSubresourceStyleURLs): Added
4102         declaration.
4103
4104         * css/CSSMutableStyleDeclaration.cpp:
4105         (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added.
4106         Iterates over m_properties vector of CSSProperty objects calling
4107         addSubresourceStyleURLs() on each property's CSSValue object.
4108         * css/CSSMutableStyleDeclaration.h:
4109         (WebCore::CSSMutableStyleDeclaration::addSubresourceStyleURLs): Added
4110         declaration.
4111
4112         * css/CSSPrimitiveValue.cpp:
4113         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added.
4114         * css/CSSPrimitiveValue.h:
4115         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Added
4116         declaration.
4117
4118         * css/CSSReflectValue.cpp:
4119         (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added.
4120         * css/CSSReflectValue.h:
4121         (WebCore::CSSReflectValue::addSubresourceStyleURLs): Added
4122         declaration.
4123
4124         * css/CSSRule.h:
4125         (WebCore::CSSRule::addSubresourceStyleURLs): Added.  Virtual
4126         method with empty implementation that's overridden by subclasses
4127         as needed.
4128
4129         * css/CSSStyleRule.cpp:
4130         (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added.
4131         * css/CSSStyleRule.h:
4132         (WebCore::CSSStyleRule::addSubresourceStyleURLs): Added
4133         declaration.
4134
4135         * css/CSSStyleSheet.cpp:
4136         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated to
4137         call CSSRule::addSubresourceStyleURLs on each rule to extract
4138         URLs.  Removed unneeded baseURL parameter now that the
4139         completeURL() method exists.
4140         * css/CSSStyleSheet.h:
4141         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Updated
4142         declaration.
4143
4144         * css/CSSValue.h:
4145         (WebCore::CSSValue::addSubresourceStyleURLs): Added.  Virtual
4146         method with empty implementation that's overridden by subclasses
4147         as needed.
4148
4149         * css/CSSValueList.cpp:
4150         (WebCore::CSSValueList::addSubresourceStyleURLs): Added.
4151         Iterates over m_values vector of CSSValue objects calling
4152         addSubresourceStyleURLs() on each.
4153         * css/CSSValueList.h:
4154         (WebCore::CSSValueList::addSubresourceStyleURLs): Added
4155         declaration.
4156
4157         * css/StyleSheet.h:
4158         (WebCore::StyleSheet::addSubresourceStyleURLs): Updated
4159         declaration to remove unneeded baseURL parameter.
4160
4161         * dom/ProcessingInstruction.cpp:
4162         (WebCore::ProcessingInstruction::addSubresourceAttributeURLs):
4163         Fixed to use the StyleBase::baseURL() method to get the
4164         stylesheet's URL instead of calling Document::completeURL().
4165
4166         * dom/StyledElement.cpp:
4167         (WebCore::StyledElement::addSubresourceAttributeURLs): Added method
4168         to extract URLs from inline style declarations.
4169         * dom/StyledElement.h:
4170         (WebCore::StyledElement::addSubresourceAttributeURLs): Added
4171         declaration.
4172
4173         * html/HTMLBodyElement.cpp:
4174         (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): Call
4175         addSubresourceAttributeURLs() in superclass to extract URLs
4176         from inline style declarations.
4177         * html/HTMLEmbedElement.cpp:
4178         (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): Ditto.
4179         * html/HTMLImageElement.cpp:
4180         (WebCore::HTMLImageElement::addSubresourceAttributeURLs): Ditto.
4181         * html/HTMLInputElement.cpp:
4182         (WebCore::HTMLInputElement::addSubresourceAttributeURLs): Ditto.
4183         * html/HTMLLinkElement.cpp:
4184         (WebCore::HTMLLinkElement::addSubresourceAttributeURLs): Ditto.
4185         * html/HTMLObjectElement.cpp:
4186         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): Ditto.
4187         * html/HTMLParamElement.cpp:
4188         (WebCore::HTMLParamElement::addSubresourceAttributeURLs): Ditto.
4189         * html/HTMLScriptElement.cpp:
4190         (WebCore::HTMLScriptElement::addSubresourceAttributeURLs): Ditto.
4191         * html/HTMLStyleElement.cpp:
4192         (WebCore::HTMLStyleElement::addSubresourceAttributeURLs): Ditto.
4193         * html/HTMLTableCellElement.cpp:
4194         (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): Ditto.
4195         * html/HTMLTableElement.cpp:
4196         (WebCore::HTMLTableElement::addSubresourceAttributeURLs): Ditto.
4197         * svg/SVGCursorElement.cpp:
4198         (WebCore::SVGCursorElement::addSubresourceAttributeURLs): Ditto.
4199         * svg/SVGFEImageElement.cpp:
4200         (WebCore::SVGFEImageElement::addSubresourceAttributeURLs): Ditto.
4201         * svg/SVGImageElement.cpp:
4202         (WebCore::SVGImageElement::addSubresourceAttributeURLs): Ditto.
4203         * svg/SVGScriptElement.cpp:
4204         (WebCore::SVGScriptElement::addSubresourceAttributeURLs): Ditto.
4205
4206 2008-12-22  Dhananjoy Chutia  <dhanrd@gmail.com>
4207
4208         Reviewed by David Kilzer.