487d656e4d368440bb66e79862979d9b630d4b8c
[WebKit-https.git] / WebCore / ChangeLog
1 2009-06-10  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2
3         Reviewed by Simon Hausmann.
4
5         [Qt] Use absolute path for install_name on Mac
6
7         * WebCore.pro:
8
9 2009-06-10  Xan Lopez  <xlopez@igalia.com>
10
11         Reviewed by Jan Alonzo.
12
13         https://bugs.webkit.org/show_bug.cgi?id=25415
14         [GTK][ATK] Please implement support for get_text_at_offset
15
16         Reduce duplicated code to access the text of a AtkText
17         object. doAXStringForRange calls text() internally, so we are
18         doing exactly the same after the change.
19
20         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
21         (getGailTextUtilForAtk):
22         (getPangoLayoutForAtk):
23
24 2009-06-10  Xan Lopez  <xlopez@igalia.com>
25
26         Reviewed by Jan Alonzo.
27
28         https://bugs.webkit.org/show_bug.cgi?id=25415
29         [GTK][ATK] Please implement support for get_text_at_offset
30
31         Pass a PangoLayout to the GailTextUtil function calls.
32
33         It's needed for LINE boundary calls to work correctly.
34
35         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
36         (updateLayout):
37         (getPangoLayoutForAtk):
38         (webkit_accessible_text_get_text_after_offset):
39         (webkit_accessible_text_get_text_at_offset):
40
41 2009-06-10  Xan Lopez  <xlopez@igalia.com>
42
43         Reviewed by Jan Alonzo.
44
45         https://bugs.webkit.org/show_bug.cgi?id=25415
46         [GTK][ATK] Please implement support for get_text_at_offset
47
48         Use GailUtilText instead of my crappy partial reimplementation of
49         it. This should add support for LINE boundaries too, although it's
50         mostly untested for now.
51
52         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
53         (getGailTextUtilForAtk):
54         (webkit_accessible_text_get_text_after_offset):
55         (webkit_accessible_text_get_text_at_offset):
56
57 2009-06-10  Jan Michael Alonzo  <jmalonzo@webkit.org>
58
59         Gtk build fix: include <stdio.h> as it is required in jpeglib.h
60
61         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
62
63 2009-06-09  Peter Kasting  <pkasting@google.com>
64
65         Reviewed by Eric Seidel.
66
67         https://bugs.webkit.org/show_bug.cgi?id=25709 part four
68         Most of the remaining Cairo changes needed before merging Skia/Cairo
69         image decoders.  Most of these involve plumbing more error detection and
70         handling (or, in some cases, merely the capability to detect errors, as
71         e.g. Skia detects and handles image allocation failure while Cairo
72         currently doesn't).  There is also some general cleanup and
73         simplification; RGBA32Buffer::m_height and all associated functions have
74         been removed (set but never used) and some places now rely on superclass
75         implementations.
76
77         * platform/image-decoders/ImageDecoder.h:
78         (WebCore::RGBA32Buffer::RGBA32Buffer): Remove m_height, ensureHeight() and associated stuff
79         (WebCore::RGBA32Buffer::copyBitmapData): Add API function so refcounted backing stores (like Skia uses) can be used with GIFs
80         (WebCore::RGBA32Buffer::setSize): Zero-fill image to avoid garbage
81         (WebCore::RGBA32Buffer::height): Remove
82         (WebCore::RGBA32Buffer::ensureHeight): Remove
83         (WebCore::ImageDecoder::ImageDecoder): Keep member initialization in order, force subclasses to go through size() instead of accessing m_size directly
84         (WebCore::ImageDecoder::isSizeAvailable): Check that decoding hasn't failed
85         (WebCore::ImageDecoder::size): Check that decoding hasn't failed
86         (WebCore::ImageDecoder::setSize): Protect against integer overflow
87         (WebCore::ImageDecoder::isOverSize): Protect against integer overflow
88         * platform/image-decoders/gif/GIFImageDecoder.cpp: Remove prepEmptyFrameBuffer()
89         (WebCore::GIFImageDecoder::isSizeAvailable): Rely on superclass isSizeAvailable() for better failure handling
90         (WebCore::GIFImageDecoder::sizeNowAvailable): Add return values for better failure handling, rely on superclass setSize() for overflow protection
91         (WebCore::GIFImageDecoder::initFrameBuffer): Add return values for better failure handling, remove prepEmptyFrameBuffer(), use RGBA32Buffer::setSize() to handle potential allocation failures (won't happen with Cairo port, can in Skia), use RGBA32Buffer::copyBitmapData() so backing store can be refcounted internally (Cairo won't be, Skia is), rely on superclass size() for better failure handling
92         (WebCore::GIFImageDecoder::haveDecodedRow): Fix style violation, remove RGBA32Buffer::ensureHeight()
93         (WebCore::GIFImageDecoder::frameComplete): Remove RGBA32Buffer::ensureHeight()
94         * platform/image-decoders/gif/GIFImageDecoder.h: Remove prepEmptyFrameBuffer(), add return values for better failure handling
95         * platform/image-decoders/gif/GIFImageReader.cpp:
96         (GIFImageReader::do_lzw): Protect against array overflow, add comments
97         (GIFImageReader::read): Protect against array overflow, be more tolerant of bad data, better failure handling
98         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Remove MSVC-specific warning disable (bfulgham will move into build files)
99         (WebCore::JPEGImageReader::decode): Better failure handling
100         (WebCore::JPEGImageDecoder::isSizeAvailable): Rely on superclass isSizeAvailable() for better failure handling
101         (WebCore::JPEGImageDecoder::outputScanlines): Use RGBA32Buffer::setSize() to handle potential allocation failures (won't happen with Cairo port, can in Skia), rely on superclass size() for better failure handling, remove RGBA32Buffer::ensureHeight()
102         * platform/image-decoders/jpeg/JPEGImageDecoder.h: Rely on superclass setSize() for overflow protection
103         * platform/image-decoders/png/PNGImageDecoder.cpp: Remove MSVC-specific warning disable (bfulgham will move into build files)
104         (WebCore::PNGImageDecoder::PNGImageDecoder): Don't allocate a slot in the framebuffer cache until it's needed
105         (WebCore::PNGImageDecoder::isSizeAvailable): Rely on superclass isSizeAvailable() for better failure handling
106         (WebCore::PNGImageDecoder::frameBufferAtIndex): Don't allocate a slot in the framebuffer cache until it's needed
107         (WebCore::PNGImageDecoder::decode): Don't allocate a slot in the framebuffer cache until it's needed
108         (WebCore::PNGImageDecoder::decodingFailed): Fix style violation
109         (WebCore::PNGImageDecoder::headerAvailable): Rely on superclass isSizeAvailable() and setSize() for overflow protection and better failure handling
110         (WebCore::PNGImageDecoder::rowAvailable): Don't allocate a slot in the framebuffer cache until it's needed, use RGBA32Buffer::setSize() to handle potential allocation failures (won't happen with Cairo port, can in Skia), remove RGBA32Buffer::ensureHeight()
111         (WebCore::PNGImageDecoder::pngComplete): Don't allocate a slot in the framebuffer cache until it's needed
112
113 2009-06-09  Kevin Ollivier  <kevino@theolliviers.com>
114
115         wx build fix, adding JSCore/assembler to the list of include dirs, and
116         adding editing/ReplaceNodeSpanCommand.cpp to the build.
117         
118         * WebCoreSources.bkl:
119         * webcore-base.bkl:
120
121 2009-06-09  Yury Semikhatsky  <yurys@chromium.org>
122
123         Reviewed by Timothy Hatcher.
124
125         When checking if the loader is the main resource loader make sure that the loader's frame is the main frame. 
126
127         https://bugs.webkit.org/show_bug.cgi?id=26218
128
129         * inspector/InspectorController.cpp:
130         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
131         (WebCore::InspectorController::identifierForInitialRequest):
132         (WebCore::InspectorController::isMainResourceLoader):
133         * inspector/InspectorController.h:
134
135 2009-06-09  Pierre d'Herbemont  <pdherbemont@apple.com>
136
137         Reviewed by Eric Seidel.
138
139         https://bugs.webkit.org/show_bug.cgi?id=26190
140
141         Test: media/controls-css-overload.html
142
143         * rendering/RenderMedia.cpp:
144         (WebCore::RenderMedia::updateControls): Prevent NULL dereference in case containers gets hidden.
145
146 2009-06-08  Peter Kasting  <pkasting@google.com>
147
148         Reviewed by Eric Seidel.
149
150         https://bugs.webkit.org/show_bug.cgi?id=25709 part three
151         Various minor cleanups to the Skia files.  Mostly non-functional, except
152         for two specific changes:
153         * JPEGs and PNGs were always marked as transparent; now they are only
154           marked as transparent when they actually are.  I doubt this has much
155           of an effect but in theory it could be used to optimize their display.
156         * Instead of arbitrarily disallowing images over 32 * 1024 * 1024 px^2,
157           only disallow images which are so large they will cause overflow in
158           other parts of the code.  This should fix the testcase on
159           http://code.google.com/p/chromium/issues/detail?id=3643.
160
161         * platform/image-decoders/skia/BMPImageReader.h:
162         (WebCore::BMPImageReader::setRGBA): Use simpler non-static setRGBA() form
163         * platform/image-decoders/skia/GIFImageDecoder.cpp:
164         (WebCore::GIFImageDecoder::initFrameBuffer): Remove unneeded code, use more readable setRGBA() form
165         (WebCore::GIFImageDecoder::haveDecodedRow): Fix style violation
166         * platform/image-decoders/skia/GIFImageDecoder.h: Remove unneeded code
167         * platform/image-decoders/skia/ImageDecoder.h:
168         (WebCore::RGBA32Buffer::setSize): setSize() should just setStatus() when it fails since all callers were doing it
169         (WebCore::ImageDecoder::isOverSize): Ease "oversized" image constraints to allow any image that won't overflow
170         * platform/image-decoders/skia/JPEGImageDecoder.cpp:
171         (WebCore::JPEGImageDecoder::outputScanlines): Remove unneeded code, mark JPEGs as non-transparent
172         * platform/image-decoders/skia/PNGImageDecoder.cpp:
173         (WebCore::PNGImageDecoder::decodingFailed): Fix style violation
174         (WebCore::PNGImageDecoder::rowAvailable): Mark un-decoded PNGs as non-transparent (this will get reset later as needed)
175         * platform/image-decoders/skia/XBMImageDecoder.cpp:
176         (WebCore::XBMImageDecoder::frameBufferAtIndex): Remove unneeded code
177
178 2009-06-09  Darin Fisher  <darin@chromium.org>
179
180         Fix Chromium build bustage.
181         
182         CachedResource.cpp no longer compiles if USE(JSC) is not defined.  The
183         problem is that this file is using a macro from StdLibExtras.h without
184         including that file.  It just happenes to get that file via a JSC
185         specific include.
186
187         * loader/CachedResource.cpp:
188
189 2009-06-09  Dean McNamee  <deanm@chromium.org>
190
191         Reviewed by Oliver Hunt.
192
193         Make sure the graphics backends are in sync with the canvas lineWidth state.
194         https://bugs.webkit.org/show_bug.cgi?id=26187
195
196         Test: fast/canvas/canvas-line-width.html
197
198         * html/CanvasRenderingContext2D.cpp:
199         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
200
201 2009-06-09  Michael Nordman  <michaeln@google.com>
202
203         Reviewed by Eric Seidel.
204
205         Proactively cancel pending requests at DocLoader dtor time,
206         otherwise crashes can occur. 
207
208         https://bugs.webkit.org/show_bug.cgi?id=26230
209         http://code.google.com/p/chromium/issues/detail?id=12161
210
211         Test: fast/frames/javascript-url-as-framesrc-crash.html
212
213         * loader/DocLoader.cpp:
214         (WebCore::DocLoader::~DocLoader):
215
216 2009-06-09  Eric Seidel  <eric@webkit.org>
217
218         Reviewed by Darin Adler.
219
220         Fix ASSERT seen in shadow tree testing
221         https://bugs.webkit.org/show_bug.cgi?id=25092
222
223         Test: svg/custom/use-mutation-event-crash.svg
224
225         * svg/SVGUseElement.cpp:
226         (WebCore::SVGUseElement::instanceForShadowTreeElement):
227
228 2009-06-09  Brent Fulgham  <bfulgham@webkit.org>
229
230         Reviewed by Eric Seidel.
231
232         Fixes https://bugs.webkit.org/show_bug.cgi?id=22891
233         Scrolling in Windows Cairo Broken if no background color set.
234
235         * platform/graphics/cairo/GradientCairo.cpp:
236         (WebCore::Gradient::fill):  Use the GraphicsContext save and restore
237           methods (rather than the Cairo-only functions) so that the Windows
238           device context is kept in sync.
239         * platform/graphics/cairo/GraphicsContextCairo.cpp:
240         (WebCore::GraphicsContext::GraphicsContext): Add new constructor call
241           to sync Windows HDC with Cairo surface.
242         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
243         (WebCore::GraphicsContextPlatformPrivate::syncContext): Provide
244           declaration for Windows HDC sync method (and stub for non-Windows
245           Cairo implementations).
246         * platform/graphics/cairo/ImageCairo.cpp:
247         (WebCore::BitmapImage::draw): Use GraphicsContext save and restore
248           methods (rather than the Cairo-only functions) so that the Windows
249           device context is kept in sync.
250         * platform/graphics/win/GraphicsContextCairoWin.cpp:
251         (WebCore::CairoContextWithHDC): New method to create a valid Cairo
252           context for a given HDC.
253         (WebCore::GraphicsContext::GraphicsContext): Modify constructor to
254           use new CairoContextWithHDC call.
255         (WebCore::GraphicsContext::getWindowsContext): Revise to match
256           behavior of CG implementation.
257         (WebCore::GraphicsContext::releaseWindowsContext): Revise to match
258           behavior of CG implementation.
259         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Get rid of
260           incorrect new HDC, and use object's HDC member for dealing with
261           concatCTM operations.
262         (WebCore::GraphicsContextPlatformPrivate::syncContext): New method
263           to sync Windows HDC with Cairo context.
264         * platform/graphics/win/ImageCairoWin.cpp:
265         (WebCore::BitmapImage::getHBITMAPOfSize): Revise implementation to
266           match CG behavior.
267
268 2009-06-09  Jian Li  <jianli@chromium.org>
269
270         Reviewed by David Levin.
271
272         Bug 26196: Fix the problem that worker's importScripts fails if the
273         script URL is redirected from different origin.
274         https://bugs.webkit.org/show_bug.cgi?id=26196
275
276         Test: http/tests/workers/worker-importScripts.html
277
278         The fix is to pass an additional enum parameter to the loader in
279         order to tell it to perform the redirect origin check or not.
280
281         * loader/DocumentThreadableLoader.cpp:
282         (WebCore::DocumentThreadableLoader::create):
283         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
284         (WebCore::DocumentThreadableLoader::willSendRequest):
285         * loader/DocumentThreadableLoader.h:
286         * loader/ThreadableLoader.cpp:
287         (WebCore::ThreadableLoader::create):
288         (WebCore::ThreadableLoader::loadResourceSynchronously):
289         * loader/ThreadableLoader.h:
290         (WebCore::):
291         * loader/WorkerThreadableLoader.cpp:
292         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
293         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
294         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
295         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
296         * loader/WorkerThreadableLoader.h:
297         (WebCore::WorkerThreadableLoader::create):
298         * workers/WorkerContext.cpp:
299         (WebCore::WorkerContext::importScripts):
300         * xml/XMLHttpRequest.cpp:
301         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
302
303 2009-06-09  Anand K. Mistry  <amistry@google.com>
304
305         Reviewed by Dimitri Glazkov.
306
307         Paint bitmaps with the alpha channel in Skia.
308         https://bugs.webkit.org/show_bug.cgi?id=26037
309
310         Test: fast/canvas/drawImage-with-globalAlpha.html
311
312         * platform/graphics/skia/ImageSkia.cpp:
313         (WebCore::paintSkBitmap):
314         * platform/graphics/skia/PlatformContextSkia.cpp:
315         (PlatformContextSkia::getAlpha):
316         * platform/graphics/skia/PlatformContextSkia.h:
317
318 2009-06-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
319
320         Reviewed by Xan Lopez.
321
322         https://bugs.webkit.org/show_bug.cgi?id=26104
323         [GTK] Make NetworkRequest a proper GObject and expose SoupMessage
324
325         Refactor how SoupMessage is handled, so that our ResourceRequest
326         object doesn't have to store it as a member, which complicates
327         managing ResourceRequest's lifetime.
328
329         * platform/network/soup/ResourceHandleSoup.cpp:
330         (WebCore::ResourceHandle::startHttp):
331         * platform/network/soup/ResourceRequest.h:
332         (WebCore::ResourceRequest::ResourceRequest):
333         (WebCore::ResourceRequest::doUpdatePlatformRequest):
334         (WebCore::ResourceRequest::doUpdateResourceRequest):
335         * platform/network/soup/ResourceRequestSoup.cpp:
336         (WebCore::ResourceRequest::toSoupMessage):
337         (WebCore::ResourceRequest::updateFromSoupMessage):
338
339 2009-06-09  Simon Hausmann  <simon.hausmann@nokia.com>
340
341         Fix the Qt build, the time functions moved into the WTF namespace.
342
343         * bridge/qt/qt_runtime.cpp:
344         (JSC::Bindings::convertValueToQVariant):
345         (JSC::Bindings::convertQVariantToValue):
346
347 2009-06-08  Brady Eidson  <beidson@apple.com>
348
349         Reviewed by Antti Koivisto
350
351         <rdar://problem/6727495> Repro crash in WebCore::Loader::Host::servePendingRequests() and dupes.
352
353         Test: http/tests/loading/deleted-host-in-resource-load-delegate-callback.html
354
355         Loader::Host objects were manually managed via new/delete.
356         There's a variety of circumstances where a Host might've been deleted while it was still in the middle
357         of a resource load delegate callback.
358         Changing them to be RefCounted then adding protectors in the callbacks makes this possibility disappear.
359
360         At the same time, remove ProcessingResource which was an earlier fix for this same problem that wasn't
361         fully implemented.
362
363         * loader/loader.cpp:
364         (WebCore::Loader::Loader):
365         (WebCore::Loader::load):
366         (WebCore::Loader::servePendingRequests):
367         (WebCore::Loader::resumePendingRequests):
368         (WebCore::Loader::cancelRequests):
369         (WebCore::Loader::Host::didFinishLoading):
370         (WebCore::Loader::Host::didFail):
371         (WebCore::Loader::Host::didReceiveResponse):
372         (WebCore::Loader::Host::didReceiveData):
373         * loader/loader.h:
374         (WebCore::Loader::Host::create):
375
376 2009-06-08  Dmitry Titov  <dimich@chromium.org>
377
378         Reviewed by David Levin.
379
380         https://bugs.webkit.org/show_bug.cgi?id=26126
381         Refactor methods of WorkerMessagingProxy used to talk to main-thread loader into new interface.
382
383         Split a couple of methods used to schedule cross-thread tasks between worker thread and loader thread
384         implemented on WorkerMessagingProxy into a separate interface so the loading can be implemented in
385         Chromium's workers.
386
387         No changes in functionality so no tests added.
388
389         * GNUmakefile.am:
390         * WebCore.vcproj/WebCore.vcproj:
391         * WebCore.xcodeproj/project.pbxproj:
392         Added WorkerLoaderProxy.h to the bulid.
393
394         * bindings/js/WorkerScriptController.cpp:
395         (WebCore::WorkerScriptController::evaluate): WorkerThread::workerObjectProxy() now returns & instead of *
396         * bindings/v8/WorkerScriptController.cpp:
397         (WebCore::WorkerScriptController::evaluate): same.
398         * workers/WorkerContext.cpp:
399         (WebCore::WorkerContext::~WorkerContext): same.
400         (WebCore::WorkerContext::reportException): same.
401         (WebCore::WorkerContext::addMessage): same.
402         (WebCore::WorkerContext::postMessage): same.
403
404         * loader/WorkerThreadableLoader.cpp:
405         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
406         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
407         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
408         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
409         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
410         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
411         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
412         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
413         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
414         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
415         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
416         Use WorkerLoaderProxy instead of WorkerMessagingProxy for the MainThreadBridge.
417         Mostly rename.
418
419         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
420         In addition to using WorkerLoaderProxy instead of WorkerMessagingProxy, the check for
421         AskedToTerminate is removed. It seems to be an optimization for a very small number of cases
422         when worker termination is requested a very short time before the request to load something
423         (XHR or importScript) was dispatched on the main thread.
424
425         * loader/WorkerThreadableLoader.h:
426         Now keeps a pointer to WorkerLoaderProxy rather then to a WorkerMessagingProxy. This allows
427         to implement WorkerThreadableLoader for Chromium.
428
429         * workers/WorkerLoaderProxy.h: Added.
430         (WebCore::WorkerLoaderProxy::~WorkerLoaderProxy):
431
432         * workers/WorkerMessagingProxy.cpp:
433         (WebCore::WorkerMessagingProxy::startWorkerContext):
434         (WebCore::WorkerMessagingProxy::postTaskToLoader): Added ASSERT since this needs to be implemented for nested workers.
435         * workers/WorkerMessagingProxy.h:
436         Derived from WorkerLoaderProxy, the methods for posting tasks cross-thread are now virtual.
437         Removed unused postTaskToWorkerContext() method.
438
439         * workers/WorkerThread.cpp:
440         (WebCore::WorkerThread::create):
441         (WebCore::WorkerThread::WorkerThread):
442         * workers/WorkerThread.h:
443         (WebCore::WorkerThread::workerLoaderProxy):
444         * workers/WorkerThread.cpp:
445         (WebCore::WorkerThread::create):
446         (WebCore::WorkerThread::WorkerThread):
447         (WebCore::WorkerThread::workerThread):
448         * workers/WorkerThread.h:
449         (WebCore::WorkerThread::workerLoaderProxy):
450         (WebCore::WorkerThread::workerObjectProxy):
451         WorkerThread gets a new member of type WorkerLoaderProxy&, and accessor.
452         Also, existing WorkerObjectProxy* member is now WorkerObjectProxy& because it can't be null.
453
454 2009-06-08  Dimitri Glazkov  <dglazkov@chromium.org>
455
456         Reviewed by Eric Seidel.
457
458         https://bugs.webkit.org/show_bug.cgi?id=26238
459         Add parseDate helper to HTTPParsers, which uses WTF::parseDateFromNullTerminatedCharacters.
460
461         * ForwardingHeaders/runtime/DateMath.h: Removed.
462         * ForwardingHeaders/wtf/DateMath.h: Copied from WebCore/ForwardingHeaders/runtime/DateMath.h.
463         * platform/network/HTTPParsers.cpp:
464         (WebCore::parseDate): Added.
465         * platform/network/HTTPParsers.h:
466         * platform/network/ResourceResponseBase.cpp:
467         (WebCore::parseDateValueInHeader): Changed to use the new helper.
468
469 2009-06-08  Adam Langley  <agl@google.com>
470
471         Reviewed by Eric Siedel.
472
473         Chromium Linux ignored the background color on <select>s. Rather
474         than encode magic colours, we start with a base color (specified
475         via CSS) and derive the other colors from it. Thus, setting the
476         CSS background-color now correctly changes the colour of the
477         control.
478
479         This should not change the appearence controls without
480         background-colors. However, <select>s with a background-color
481         will now renderer correctly, which may require rebaselining
482         pixel tests in the Chromium tree.
483
484         https://bugs.webkit.org/show_bug.cgi?id=26030
485         http://code.google.com/p/chromium/issues/detail?id=12596
486
487         * platform/graphics/Color.cpp:
488         (WebCore::Color::getHSL): new member
489         * platform/graphics/Color.h:
490         * rendering/RenderThemeChromiumLinux.cpp:
491         (WebCore::RenderThemeChromiumLinux::systemColor):
492         (WebCore::brightenColor):
493         (WebCore::paintButtonLike):
494
495 2009-06-08  Victor Wang <victorw@chromium.org>
496
497         Reviewed by Dimitri Glazkov.
498
499         https://bugs.webkit.org/show_bug.cgi?id=26087
500         Bug 26087: Removing element in JS crashes Chrome tab if it fired the change event
501
502         Fix tab crash caused by destroying the popup list that fired the change event on abandon.
503
504         If a popup list is abandoned (press a key to jump to an item
505         and then use tab or mouse to get away from the select box),
506         the current code fires a change event in PopupListBox::updateFromElemt().
507         The JS that listens to this event may destroy the object and cause the
508         rest of popup list code crashes.
509
510         The updateFromElement() is called before abandon() and this causes
511         the selected index to be discarded after updateFromElement(). From
512         the code comments, this appears to be the reason why valueChanged is
513         called in updateFromElement.
514
515         Fix the issue by removing the valueChanged call in updateFromElement,
516         saving the selected index that we should accept on abandon and pass
517         it to the valueChange in abandon().
518
519         A manual test has been added.
520
521         * manual-tests/chromium: Added.
522         * manual-tests/chromium/onchange-reload-popup.html: Added.
523         * platform/chromium/PopupMenuChromium.cpp:
524         (WebCore::PopupListBox::PopupListBox):
525         (WebCore::PopupListBox::handleKeyEvent):
526         (WebCore::PopupListBox::abandon):
527         (WebCore::PopupListBox::updateFromElement):
528
529 2009-06-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
530
531         Reviewed by Simon Hausmann.
532
533         [Qt] Disable a few warnings on Windows
534
535         * WebCore.pro:
536
537 2009-06-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
538
539         Reviewed by Simon Hausmann.
540
541         [Qt] Don't enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH on Windows
542         
543         This define was brought in after refactoring some code from
544         PluginPackage(Qt|Gtk).cpp into the shared PluginPackage.cpp.
545
546         * WebCore.pro:
547
548 2009-06-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
549
550         Reviewed by Simon Hausmann.
551
552         [Qt] Use $QMAKE_PATH_SEP instead of hardcoded / to fix Windows build
553
554         * WebCore.pro:
555
556 2009-06-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
557
558         Reviewed by Ariya Hidayat.
559
560         [Qt] Build fix when NETSCAPE_PLUGIN_API support is turned off
561         https://bugs.webkit.org/show_bug.cgi?id=26244
562
563         * WebCore.pro: Define PLUGIN_PACKAGE_SIMPLE_HASH only if
564         NETSCAPE_PLUGIN_API is turned on
565         * plugins/PluginPackage.cpp: Guard initializeBrowserFuncs()
566         * plugins/PluginViewNone.cpp: Match guards with PluginView.h
567
568 2009-06-07  Dan Bernstein  <mitz@apple.com>
569
570         Reviewed by Sam Weinig.
571
572         - fix <rdar://problem/6931661> -[WebView _selectionIsAll] returns YES
573           when the selection is inside a text field.
574
575         * editing/VisibleSelection.cpp:
576         (WebCore::VisibleSelection::isAll): Return false if the selection is in
577         a shadow tree.
578
579 2009-06-07  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
580
581         Reviewed by Holger Freyther.
582
583         https://bugs.webkit.org/show_bug.cgi?id=26106
584         [GTK] Crashes when you keep a combo open during a page transition, then close it
585
586         Hide the combo popup and disconnect from its signals during
587         PopupMenu destruction to handle this exceptional case with no
588         crash.
589
590         * platform/gtk/PopupMenuGtk.cpp:
591         (WebCore::PopupMenu::~PopupMenu):
592         (WebCore::PopupMenu::menuUnmapped):
593
594 2009-06-06  Sam Weinig  <sam@webkit.org>
595
596         Reviewed by Dan Bernstein.
597
598         Fix for <rdar://problem/6930540>
599         REGRESSION (r43797): Serif and fantasy font-family names are wrong in result of getComputedStyle
600
601         Test: fast/css/font-family-builtins.html
602
603         * css/CSSComputedStyleDeclaration.cpp:
604         (WebCore::identifierForFamily): Fix typo. Fantasy family should be
605         -webkit-fantasy not, -webkit-serif.
606
607 2009-06-06  Sam Weinig  <sam@webkit.org>
608
609         Reviewed by Brady Eidson.
610
611         Fix for <rdar://problem/6936235>
612         Need to support StorageEvent.storageArea to meet the Web Storage spec
613
614         * storage/LocalStorageArea.cpp:
615         (WebCore::LocalStorageArea::dispatchStorageEvent): Pass the localStorage for
616         the frame being dispatched to.
617         * storage/SessionStorageArea.cpp:
618         (WebCore::SessionStorageArea::dispatchStorageEvent): Ditto, only for sessionStorage.
619
620         * storage/StorageEvent.cpp:
621         (WebCore::StorageEvent::StorageEvent):
622         (WebCore::StorageEvent::initStorageEvent):
623         * storage/StorageEvent.h:
624         (WebCore::StorageEvent::create):
625         (WebCore::StorageEvent::storageArea):
626         * storage/StorageEvent.idl:
627         Add storageArea member.
628
629 2009-06-05  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
630
631         Reviewed by Anders Carlsson.
632
633         Fix WMLInputElement initialization code. Don't call initialize() on attach(), let
634         WMLCardElement handle initialization once, after the document has been parsed.
635
636         To keep layout tests working introduce a new function in Document.idl: initializeWMLPageState().
637         WMLTestCase.js (the wml/ layout test framework) will use it to simulate a regular WML document,
638         whose variable state gets initialized on WMLDocument::finishedParsing(). Force initialization
639         of the WML variable state, right after the dynamically created elements have been inserted into the tree.
640
641         * dom/Document.cpp:
642         (WebCore::Document::initializeWMLPageState):
643         * dom/Document.h:
644         * dom/Document.idl:
645         * wml/WMLCardElement.cpp:
646         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
647         * wml/WMLDocument.cpp:
648         (WebCore::WMLDocument::finishedParsing):
649         (WebCore::WMLDocument::initialize):
650         * wml/WMLDocument.h:
651         * wml/WMLInputElement.cpp:
652         (WebCore::WMLInputElement::initialize):
653         * wml/WMLInputElement.h:
654
655 2009-06-05  Sam Weinig  <sam@webkit.org>
656
657         Reviewed by Anders Carlsson.
658
659         Add ononline and onoffline attributes for the <body> element. 
660
661         * html/HTMLAttributeNames.in: Added ononlineAttr and onofflineAttr.
662         * html/HTMLBodyElement.cpp:
663         (WebCore::HTMLBodyElement::parseMappedAttribute): Map ononlineAttr
664         and onofflineAttr to window event listeners.
665
666 2009-06-05  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
667
668         Reviewed by Simon Hausmann.
669
670         [Qt] Add missing includes of config.h
671
672         * platform/qt/QWebPopup.cpp:
673         * platform/text/qt/TextBreakIteratorQt.cpp:
674
675 2009-06-05  Fumitoshi Ukai  <ukai@google.com>
676
677         Reviewed by Dimitri Glazkov.
678
679         https://bugs.webkit.org/show_bug.cgi?id=26215
680         Try to fix the Chromium build.
681
682         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
683         (WebCore::fillBMPGlyphs):
684         (WebCore::fillNonBMPGlyphs):
685
686 2009-06-05  Shinichiro Hamaji  <hamaji@chromium.org>
687
688         Bug 26160: Compile fails in MacOSX when GNU fileutils are installed
689
690         <https://bugs.webkit.org/show_bug.cgi?id=26160>
691
692         Reviewed by Alexey Proskuryakov.
693
694         Use /bin/ln instead of ln for cases where this command is used with -h option.
695         As this option is not supported by GNU fileutils, this change helps users 
696         who have GNU fileutils in their PATH.
697
698         * WebCore.xcodeproj/project.pbxproj:
699
700 2009-06-03  Ben Murdoch  <benm@google.com>
701
702         <https://bugs.webkit.org/show_bug.cgi?id=25710> HTML5 Database stops executing transactions if the URL hash changes while a transaction is open and an XHR is in progress.
703
704         Reviewed by Alexey Proskuryakov.
705
706         Fix a bug that causes database transactions to fail if a history navigation to a hash fragment of the same document is made while resources (e.g. an XHR) are loading
707
708         Test: storage/hash-change-with-xhr.html
709
710         * loader/DocumentLoader.cpp:
711         (WebCore::DocumentLoader::stopLoading):
712         * loader/DocumentLoader.h:
713         * loader/FrameLoader.cpp:
714         (WebCore::FrameLoader::stopLoading):
715         (WebCore::FrameLoader::stopAllLoaders):
716         * loader/FrameLoader.h:
717         * loader/FrameLoaderTypes.h:
718         (WebCore::):
719         * page/Page.cpp:
720         (WebCore::Page::goToItem):
721         * WebCore.base.exp:
722
723 2009-06-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
724
725         Reviewed by Simon Hausmann.
726
727         [Qt] Make sure the correct config.h is included when shadowbuilding
728
729         * WebCore.pro:
730
731 2009-06-05  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
732
733         Reviewed by Simon Hausmann.
734
735         Fix Qt build after r44452
736
737         * platform/network/qt/QNetworkReplyHandler.cpp:
738         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
739
740 2009-06-05  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
741
742         Reviewed by Simon Hausmann.
743
744         [Qt] Remove some dead code (MenuEventProxy)
745
746         * WebCore.pro:
747         * platform/ContextMenu.h:
748         * platform/qt/ContextMenuQt.cpp:
749         * platform/qt/MenuEventProxy.h: Removed.
750
751 2009-06-05  Xan Lopez  <xlopez@igalia.com>
752
753         More build fixes.
754
755         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp:
756         (WebCore::GlyphPage::fill):
757
758 2009-06-05  Xan Lopez  <xlopez@igalia.com>
759
760         Fix the GTK+ build.
761
762         * GNUmakefile.am:
763         * platform/graphics/gtk/FontCacheGtk.cpp:
764         (WebCore::FontCache::getFontDataForCharacters):
765         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
766         (WebCore::GlyphPage::fill):
767
768 2009-06-05  Antti Koivisto  <antti@apple.com>
769
770         Try to fix Windows (and possibly other platforms) build.
771
772         Restore ResourceResponseBase::lastModifiedDate() and setLastModifiedDate() removed in previous commit.
773         for now since PluginStream used on some platforms expects them and calculations differ from plain 
774         Last-modified header value.
775         
776         Also include <wtf/MathExtras.h> to get isfinite().
777
778         * platform/network/ResourceResponseBase.cpp:
779         (WebCore::ResourceResponseBase::adopt):
780         (WebCore::ResourceResponseBase::copyData):
781         (WebCore::ResourceResponseBase::setLastModifiedDate):
782         (WebCore::ResourceResponseBase::lastModifiedDate):
783         * platform/network/ResourceResponseBase.h:
784         * platform/network/cf/ResourceResponseCFNet.cpp:
785         (WebCore::ResourceResponse::platformLazyInit):
786
787 2009-06-03  Antti Koivisto  <antti@apple.com>
788
789         Reviewed by Dave Kilzer.
790
791         https://bugs.webkit.org/show_bug.cgi?id=13128
792         Safari not obeying cache header
793         
794         Implement RFC 2616 cache expiration calculations in WebKit instead of
795         relying on the networking layer.
796
797         * ForwardingHeaders/runtime/DateMath.h: Added.
798         * WebCore.base.exp:
799         * loader/Cache.cpp:
800         (WebCore::Cache::revalidationSucceeded):
801         * loader/CachedResource.cpp:
802         (WebCore::CachedResource::CachedResource):
803         (WebCore::CachedResource::isExpired):
804         (WebCore::CachedResource::currentAge):
805         (WebCore::CachedResource::freshnessLifetime):
806         (WebCore::CachedResource::setResponse):
807         (WebCore::CachedResource::updateResponseAfterRevalidation):
808         (WebCore::CachedResource::mustRevalidate):
809         * loader/CachedResource.h:
810         * platform/network/ResourceResponseBase.cpp:
811         (WebCore::ResourceResponseBase::ResourceResponseBase):
812         (WebCore::ResourceResponseBase::adopt):
813         (WebCore::ResourceResponseBase::copyData):
814         (WebCore::ResourceResponseBase::setHTTPHeaderField):
815         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
816         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
817         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
818         (WebCore::ResourceResponseBase::cacheControlMaxAge):
819         (WebCore::parseDateValueInHeader):
820         (WebCore::ResourceResponseBase::date):
821         (WebCore::ResourceResponseBase::age):
822         (WebCore::ResourceResponseBase::expires):
823         (WebCore::ResourceResponseBase::lastModified):
824         (WebCore::ResourceResponseBase::isAttachment):
825         (WebCore::ResourceResponseBase::compare):
826         * platform/network/ResourceResponseBase.h:
827         * platform/network/cf/ResourceResponseCFNet.cpp:
828         (WebCore::ResourceResponse::platformLazyInit):
829         * platform/network/mac/ResourceResponseMac.mm:
830         (WebCore::ResourceResponse::platformLazyInit):
831
832 2009-06-04  Roland Steiner <rolandsteiner@google.com>
833
834         Reviewed by Eric Seidel.
835
836         Bug 26201: Remove superfluous 'if' statements in RenderTable::addChild
837         https://bugs.webkit.org/show_bug.cgi?id=26201
838
839         * rendering/RenderTable.cpp:
840         (WebCore::RenderTable::addChild): remove superfluous 'if' statements
841        
842
843 2009-06-04  Roland Steiner <rolandsteiner@google.com>
844
845         Reviewed by Eric Seidel.
846
847         Bug 26202: add macros for primitive values to simplify CSSStyleSelector::applyProperty
848         https://bugs.webkit.org/show_bug.cgi?id=26202
849
850         * css/CSSStyleSelector.cpp: add HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE[_WITH_VALUE] macros
851         (WebCore::CSSStyleSelector::applyProperty): use new macros
852
853 2009-06-04  Roland Steiner <rolandsteiner@google.com>
854
855         Reviewed by Eric Seidel
856
857         Bug 26203: Move parsing of 'attr(X)' values to own method
858         https://bugs.webkit.org/show_bug.cgi?id=26203
859
860         * css/CSSParser.cpp:
861         (WebCore::CSSParser::parseAttr): new method
862         (WebCore::CSSParser::parseContent): use new parseAttr method
863         * css/CSSParser.h:
864         (WebCore::CSSParser::parseAttr): new method
865
866 2009-06-04  Roland Steiner <rolandsteiner@google.com>
867
868         Reviewed by Eric Seidel.
869
870         Bug 26205: RenderTableSection::addChild : correct comment
871         https://bugs.webkit.org/show_bug.cgi?id=26205
872
873         * rendering/RenderTableSection.cpp:
874         (WebCore::RenderTableSection::addChild): correct comment
875
876 2009-06-04  Roland Steiner <rolandsteiner@google.com>
877
878         Reviewed by Eric Seidel.
879
880         Bug 26204: RenderBlock : simplify handleSpecialChild, comment correction
881         https://bugs.webkit.org/show_bug.cgi?id=26204
882
883         * rendering/RenderBlock.cpp:
884         (WebCore::RenderBlock::handleSpecialChild): simplify usage
885         (WebCore::RenderBlock::handlePositionedChild): simplify usage
886         (WebCore::RenderBlock::handleFloatingChild): simplify usage
887         (WebCore::RenderBlock::handleRunInChild): simplify usage
888         (WebCore::RenderBlock::layoutBlock): correct comment
889         (WebCore::RenderBlock::layoutBlockChildren): simplify loop, change call to handleSpecialChild
890         * rendering/RenderBlock.h: 
891         (WebCore::RenderBlock::handleSpecialChild): change signature
892         (WebCore::RenderBlock::handlePositionedChild): change signature
893         (WebCore::RenderBlock::handleFloatingChild): change signature
894         (WebCore::RenderBlock::handleRunInChild): change signature
895
896 2009-06-04  Dan Bernstein  <mitz@apple.com>
897
898         - retry to fix the Tiger build
899
900         * platform/graphics/mac/SimpleFontDataMac.mm:
901         (WebCore::initFontData):
902
903 2009-06-04  Dan Bernstein  <mitz@apple.com>
904
905         - try to fix the Tiger build
906
907         * platform/graphics/SimpleFontData.h:
908
909 2009-06-04  Dan Bernstein  <mitz@apple.com>
910
911         - try to fix the Leopard and Tiger builds
912
913         * platform/graphics/SimpleFontData.h:
914
915 2009-06-04  Dan Bernstein  <mitz@apple.com>
916
917         - try to fix the Windows build
918
919         * platform/graphics/win/UniscribeController.cpp:
920         (WebCore::UniscribeController::shapeAndPlaceItem):
921
922 2009-06-04  Dan Bernstein  <mitz@apple.com>
923
924         Reviewed by Sam Weinig.
925
926         - make SimpleFontData's data members private
927         - rename SimpleFontData's m_font member to m_platformData
928
929         * platform/graphics/Font.h:
930         (WebCore::Font::spaceWidth):
931         * platform/graphics/SimpleFontData.cpp:
932         (WebCore::SimpleFontData::SimpleFontData):
933         * platform/graphics/SimpleFontData.h:
934         (WebCore::SimpleFontData::platformData):
935         (WebCore::SimpleFontData::spaceWidth):
936         (WebCore::SimpleFontData::adjustedSpaceWidth):
937         (WebCore::SimpleFontData::syntheticBoldOffset):
938         (WebCore::SimpleFontData::spaceGlyph):
939         (WebCore::SimpleFontData::getNSFont):
940         (WebCore::SimpleFontData::getQtFont):
941         (WebCore::SimpleFontData::getWxFont):
942         * platform/graphics/WidthIterator.cpp:
943         (WebCore::WidthIterator::advance):
944         * platform/graphics/cairo/FontCairo.cpp:
945         (WebCore::Font::drawGlyphs):
946         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
947         (WebCore::SimpleFontData::platformInit):
948         (WebCore::SimpleFontData::smallCapsFontData):
949         (WebCore::SimpleFontData::determinePitch):
950         (WebCore::SimpleFontData::platformWidthForGlyph):
951         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
952         (WebCore::SimpleFontData::platformInit):
953         (WebCore::SimpleFontData::smallCapsFontData):
954         (WebCore::SimpleFontData::containsCharacters):
955         (WebCore::SimpleFontData::platformWidthForGlyph):
956         * platform/graphics/gtk/FontGtk.cpp:
957         (WebCore::setPangoAttributes):
958         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
959         (WebCore::SimpleFontData::platformInit):
960         (WebCore::SimpleFontData::containsCharacters):
961         (WebCore::SimpleFontData::determinePitch):
962         (WebCore::SimpleFontData::platformWidthForGlyph):
963         (WebCore::SimpleFontData::setFont):
964         * platform/graphics/gtk/SimpleFontDataPango.cpp:
965         (WebCore::SimpleFontData::platformInit):
966         (WebCore::SimpleFontData::containsCharacters):
967         (WebCore::SimpleFontData::determinePitch):
968         (WebCore::SimpleFontData::platformWidthForGlyph):
969         (WebCore::SimpleFontData::setFont):
970         * platform/graphics/mac/CoreTextController.cpp:
971         (WebCore::CoreTextController::adjustGlyphsAndAdvances):
972         * platform/graphics/mac/FontMac.mm:
973         (WebCore::Font::drawGlyphs):
974         * platform/graphics/mac/FontMacATSUI.mm:
975         (WebCore::initializeATSUStyle):
976         (WebCore::overrideLayoutOperation):
977         (WebCore::ATSULayoutParameters::initialize):
978         * platform/graphics/mac/SimpleFontDataMac.mm:
979         (WebCore::initFontData):
980         (WebCore::SimpleFontData::platformInit):
981         (WebCore::SimpleFontData::platformCharWidthInit):
982         (WebCore::SimpleFontData::smallCapsFontData):
983         (WebCore::SimpleFontData::containsCharacters):
984         (WebCore::SimpleFontData::determinePitch):
985         (WebCore::SimpleFontData::platformWidthForGlyph):
986         (WebCore::SimpleFontData::checkShapesArabic):
987         (WebCore::SimpleFontData::getCTFont):
988         * platform/graphics/qt/SimpleFontDataQt.cpp:
989         (WebCore::SimpleFontData::determinePitch):
990         (WebCore::SimpleFontData::platformInit):
991         (WebCore::SimpleFontData::platformCharWidthInit):
992         * platform/graphics/win/FontCGWin.cpp:
993         (WebCore::drawGDIGlyphs):
994         (WebCore::Font::drawGlyphs):
995         * platform/graphics/win/SimpleFontDataCGWin.cpp:
996         (WebCore::SimpleFontData::platformInit):
997         (WebCore::SimpleFontData::platformCharWidthInit):
998         (WebCore::SimpleFontData::platformWidthForGlyph):
999         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1000         (WebCore::SimpleFontData::platformInit):
1001         (WebCore::SimpleFontData::platformDestroy):
1002         (WebCore::SimpleFontData::platformWidthForGlyph):
1003         (WebCore::SimpleFontData::setFont):
1004         * platform/graphics/win/SimpleFontDataWin.cpp:
1005         (WebCore::SimpleFontData::initGDIFont):
1006         (WebCore::SimpleFontData::smallCapsFontData):
1007         (WebCore::SimpleFontData::containsCharacters):
1008         (WebCore::SimpleFontData::determinePitch):
1009         (WebCore::SimpleFontData::widthForGDIGlyph):
1010         (WebCore::SimpleFontData::scriptFontProperties):
1011         * platform/graphics/wx/SimpleFontDataWx.cpp:
1012         (WebCore::SimpleFontData::platformInit):
1013         (WebCore::SimpleFontData::determinePitch):
1014         (WebCore::SimpleFontData::platformWidthForGlyph):
1015
1016 2009-06-04  Paul Godavari  <paul@chromium.org>
1017
1018         Reviewed by Eric Seidel.
1019
1020         Initialize the width of PopupMenuListBox properly for Mac Chromium.
1021
1022         Added a test that works only with this patch applied. The test is
1023         a manual one, since the hit testing infrastructure in the layout
1024         tests sends keyboard and mouse events to the main window and not
1025         the cocoa control that implements the popup up, which means we can't
1026         select items from the popup up.
1027
1028         https://bugs.webkit.org/show_bug.cgi?id=25904
1029
1030
1031         * manual-tests/select-narrow-width.html: Added.
1032         * platform/chromium/PopupMenuChromium.cpp:
1033         (WebCore::PopupListBox::PopupListBox):
1034         (WebCore::PopupContainer::showExternal):
1035
1036 2009-06-04  Brent Fulgham  <bfulgham@webkit.org>
1037
1038         Unreviewed Windows build correction.
1039
1040         * WebCore.vcproj/WebCore.vcproj: Add missing 'ReplaceNodeWithSpanCommand.cpp'
1041           and 'ReplaceNodeWithSpanCommand.h'
1042
1043 2009-02-03  Eric Seidel  <eric@webkit.org>
1044
1045         Reviewed by Justin Garcia.
1046
1047         Make sure execCommand("bold") on <b style="text-decoration: underline">test</b>
1048         only removes the bold and not the underline.
1049         https://bugs.webkit.org/show_bug.cgi?id=23496
1050
1051         Test: editing/execCommand/convert-style-elements-to-spans.html
1052
1053         * WebCore.xcodeproj/project.pbxproj:
1054         * css/CSSStyleDeclaration.h:
1055         (WebCore::CSSStyleDeclaration::isEmpty):
1056         * dom/NamedAttrMap.h:
1057         (WebCore::NamedAttrMap::isEmpty):
1058         * editing/ApplyStyleCommand.cpp:
1059         (WebCore::isUnstyledStyleSpan):
1060         (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan):
1061         (WebCore::ApplyStyleCommand::applyBlockStyle):
1062         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1063         (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle):
1064         (WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
1065         (WebCore::ApplyStyleCommand::removeCSSStyle):
1066         (WebCore::ApplyStyleCommand::applyTextDecorationStyle):
1067         (WebCore::ApplyStyleCommand::removeInlineStyle):
1068         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
1069         * editing/ApplyStyleCommand.h:
1070         * editing/CompositeEditCommand.cpp:
1071         (WebCore::CompositeEditCommand::replaceNodeWithSpanPreservingChildrenAndAttributes):
1072         * editing/CompositeEditCommand.h:
1073         * editing/RemoveNodePreservingChildrenCommand.cpp:
1074         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
1075         * editing/ReplaceNodeWithSpanCommand.cpp: Added.
1076         (WebCore::ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand):
1077         (WebCore::swapInNodePreservingAttributesAndChildren):
1078         (WebCore::ReplaceNodeWithSpanCommand::doApply):
1079         (WebCore::ReplaceNodeWithSpanCommand::doUnapply):
1080         * editing/ReplaceNodeWithSpanCommand.h: Added.
1081         (WebCore::ReplaceNodeWithSpanCommand::create):
1082
1083 2009-06-04  Brent Fulgham  <bfulgham@webkit.org>
1084
1085         Unreviewed build fix for Windows Cairo target.
1086
1087         Add missing post-build command to copy history/cf contents
1088         to output directory.
1089
1090         * WebCore.vcproj/WebCore.vcproj: Update Debug_Cairo and Release_Cairo
1091           target post-build steps with copy commands.
1092
1093 2009-06-04  Pierre d'Herbemont  <pdherbemont@apple.com>
1094
1095         Reviewed by Simon Fraser.
1096
1097         <rdar://problem/6854695> Movie controller thumb fails to scale with full page zoom
1098         
1099         Account for zoom level when drawing media controller thumb on Windows.
1100
1101         * rendering/RenderMediaControls.cpp:
1102         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
1103
1104 2009-06-04  David Hyatt  <hyatt@apple.com>
1105
1106         Reviewed by Sam Weinig.
1107
1108         Move DOM window focus/blur out of SelectionController and into FocusController.  Make sure it
1109         fires on the focused frame when the page activation state changes also.  This is covered by an existing
1110         layout test (albeit badly).  I have modified the test to be correct.
1111
1112         * editing/SelectionController.cpp:
1113         (WebCore::SelectionController::setFocused):
1114         * page/FocusController.cpp:
1115         (WebCore::FocusController::setFocusedFrame):
1116         (WebCore::FocusController::setActive):
1117
1118 2009-06-04  Albert J. Wong  <ajwong@chromium.org>
1119
1120         Reviewed by Eric Seidel.
1121
1122         https://bugs.webkit.org/show_bug.cgi?id=26148
1123         Adding in empty files to stage the extract of RenderThemeChromiumSkia
1124         from RenderThemeChromiumLinux and RenderThemeChromiumWindows.
1125
1126         * rendering/RenderThemeChromiumSkia.cpp: Added.
1127         * rendering/RenderThemeChromiumSkia.h: Added.
1128
1129 2009-06-04  Andrei Popescu <andreip@google.com>
1130
1131         Reviewed by Alexey Proskuryakov.
1132
1133         https://bugs.webkit.org/show_bug.cgi?id=25562
1134         Potential crash after ApplicationCacheStorage::storeNewestCache() fails
1135
1136               Fix the crash by checking the return value of cacheStorage().storeNewestCache(this)
1137               in WebCore::ApplicationCacheGroup::checkIfLoadIsComplete. If storeNewestCache failed,
1138               we run the cache failure steps:
1139
1140         1. Fire the error events to all pending master entries, as well any other cache hosts
1141            currently associated with a cache in this group.
1142         2. Disassociate the pending master entries from the failed new cache.
1143         3. Reinstate the old "newest cache", if there was one.
1144
1145         We also introduce two other changes:
1146
1147         1. a mechanism to rollback storageID changes to the in-memory resource
1148            objects when the storing of an ApplicationCache object fails.
1149
1150         2. defer removing the pending master entries from the list of pending master entries
1151            until the entire load is complete. This matches the HTML 5 spec better. To track
1152            if the load is complete we now introduce a counter for those pending master entries
1153            that haven't yet finshed downloading.
1154
1155         * loader/appcache/ApplicationCacheGroup.cpp:
1156         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): initializes the new counter to 0
1157         (WebCore::ApplicationCacheGroup::selectCache): increments the counter when a new pending
1158         master entry is added.
1159         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): decrements the counter
1160         instead of removing the pending master entry.
1161         (WebCore::ApplicationCacheGroup::failedLoadingMainResource): decrements the counter
1162         instead of removing the pending master entry.
1163         (WebCore::ApplicationCacheGroup::setNewestCache): removes an assertion that no longer
1164         holds true. In particular, the newest cache is not necessarily new anymore. We can
1165         set an old cache as the new cache. This can happen if we failed to store a newly
1166         downloaded cache to the database and we are now reinstating the former newest cache.
1167         (WebCore::ApplicationCacheGroup::manifestNotFound): resets the counter to 0.
1168         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): check if the loading is complete
1169         based on the counter instead of the list of pending master entries. Empty the list of
1170         master entries if the load is complete.
1171         * loader/appcache/ApplicationCacheGroup.h: add the new counter.
1172         * loader/appcache/ApplicationCacheStorage.cpp: introduce the journaling mechanism for
1173         in-memory resource objects.
1174         (WebCore::ResourceStorageIDJournal::~ResourceStorageIDJournal):
1175         (WebCore::ResourceStorageIDJournal::add):
1176         (WebCore::ResourceStorageIDJournal::commit):
1177         (WebCore::ResourceStorageIDJournal::Record::Record):
1178         (WebCore::ResourceStorageIDJournal::Record::restore):
1179         (WebCore::ApplicationCacheStorage::store): log the changes to the in-memory resource
1180         objects.
1181         (WebCore::ApplicationCacheStorage::storeNewestCache): create the journal object.
1182         * loader/appcache/ApplicationCacheStorage.h:  modify the signature of
1183         bool store(ApplicationCache*) to add a pointer to the logger object used to
1184         trace the changes to the storageID of the resource objects.
1185
1186 2009-06-04  Jeremy Orlow  <jorlow@chromium.org>
1187
1188         Reviewed by Darin Adler.
1189
1190         https://bugs.webkit.org/show_bug.cgi?id=26154
1191         Allow underscores in the hostnames we parse out of databaseIdentifiers.
1192         This code is used for HTML 5 database support.
1193
1194         * page/SecurityOrigin.cpp:
1195         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
1196
1197 2009-06-04  Mihnea Ovidenie  <mihnea@adobe.com>
1198
1199         Reviewed by Darin Adler.
1200
1201         Bug 26084: Multiple missing images in webkit-mask-image prevent rendering
1202         https://bugs.webkit.org/show_bug.cgi?id=26084
1203
1204         When painting multiple images, make sure that at least one image is valid before pushing a transparency layer.
1205
1206         Added a manual test.
1207
1208         * manual-tests/mask-composite-missing-images.html: Added.
1209         * rendering/RenderBox.cpp:
1210         (WebCore::RenderBox::paintMaskImages):
1211
1212 2009-06-04  Jeremy Orlow  <jorlow@chromium.org>
1213
1214         Reviewed by Darin Adler.
1215
1216         https://bugs.webkit.org/show_bug.cgi?id=26180
1217         Add a fast path for SecurityOrigin::equal. If "other == this" (where
1218         other is the other security origin), then we really don't need to do
1219         all the other (expensive) comparisons. We know it's equal.
1220
1221         * page/SecurityOrigin.cpp:
1222         (WebCore::SecurityOrigin::equal):
1223
1224 2009-06-03  David Hyatt  <hyatt@apple.com>
1225
1226         Reviewed by Sam Weinig.
1227
1228         Improvements in how selection behaves with focus/activation and a reversion back to using isActive
1229         in the scrollbar theme code to remove a Chromium ifdef.
1230
1231         * editing/SelectionController.cpp:
1232         (WebCore::SelectionController::SelectionController):
1233         Make the controller set its focused state correctly upon initial creation.
1234
1235         (WebCore::SelectionController::setSelection):
1236         Make selection willing to shift the focus node if the selection is focused even if the
1237         selection is not active.  Whether or not the Page is active is irrelevant to focus changes.
1238
1239         (WebCore::SelectionController::setFocused):
1240         * editing/SelectionController.h:
1241         (WebCore::SelectionController::isFocused):
1242         Add a new isFocused() method so that code can check if the Selection is focused without caring
1243         about the active state.
1244
1245         * page/Frame.cpp:
1246         (WebCore::Frame::setFocusedNodeIfNeeded):
1247         Allow focus shifts even when the selection is not active.
1248
1249         * platform/mac/ScrollbarThemeMac.mm:
1250         (WebCore::ScrollbarThemeMac::paint):
1251         Revert Dan's change to directly talk to AppKit for checking active state.  Now that the WebCore isActive
1252         method works, ditch the Chromium-specific #ifdef and go back to the original code.
1253
1254 2009-06-04  Pierre d'Herbemont  <pdherbemont@apple.com>
1255
1256         Reviewed by Darin Adler.
1257
1258         Test: media/before-load-member-access.html
1259         
1260         https://bugs.webkit.org/show_bug.cgi?id=26081
1261
1262         * html/HTMLMediaElement.cpp:
1263         (WebCore::HTMLMediaElement::played): Ensure that if m_playedTimeRanges,
1264         is not initialized we return a valid range, and don't attempt to use it.
1265
1266 2009-06-03  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1267
1268         Reviewed by Simon Hausmann.
1269
1270         Implement a way to invalidate the FontCache used by the Qt port.
1271
1272         * platform/graphics/qt/FontCacheQt.cpp:
1273         (WebCore::FontCache::invalidate):
1274
1275 2009-06-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1276
1277         Reviewed by Ariya Hidayat.
1278
1279         https://bugs.webkit.org/show_bug.cgi?id=26015
1280
1281         [Qt] Single-threaded QtWebKit configuration
1282
1283         Turn off Database, DOM storage, icon database and Web Workers support
1284         when ENABLE_SINGLE_THREADED is turned on.
1285
1286         Set SQLITE_THREADSAFE to false to turn off SQLite mutexes
1287         when ENABLE_SINGLE_THREADED is turned on.
1288
1289         * WebCore.pro:
1290
1291 2009-06-03  Dan Bernstein  <mitz@apple.com>
1292
1293         Reviewed by Sam Weinig.
1294
1295         - add some assertions that Font methods are used on the main thread
1296
1297         * platform/graphics/Font.cpp:
1298         (WebCore::Font::setShouldUseSmoothing):
1299         * platform/graphics/Font.h:
1300         (WebCore::Font::primaryFont):
1301         * platform/graphics/FontFastPath.cpp:
1302         (WebCore::Font::glyphDataForCharacter):
1303
1304 2009-06-03  Dan Bernstein  <mitz@apple.com>
1305
1306         - Windows build fix
1307
1308         Rolled out apparently-accidental changes to config.h from r44398. These
1309         were not part of the patch as reviewed.
1310
1311         * config.h:
1312
1313 2009-06-03  Dmitry Titov  <dimich@chromium.org>
1314
1315         Not reviewed, Chromium build fix.
1316
1317         https://bugs.webkit.org/show_bug.cgi?id=26177
1318         Reverting 'private' to 'protected' on 2 classes.
1319         Chromium glue layer (not yet in Webkit tree) relies on ability to derive
1320         Chromium-specific platform classes and access the data members.
1321         See bug for more details.
1322
1323         * platform/PlatformMouseEvent.h:
1324         * platform/PlatformWheelEvent.h:
1325
1326 2009-06-03  Chris Marrin  <cmarrin@apple.com>
1327
1328         Reviewed by Simon Fraser <simonfr@apple.com>.
1329
1330         Fixed https://bugs.webkit.org/show_bug.cgi?id=26162
1331
1332         This corrects an error when destroying an animation
1333         or transition where endAnimation was never getting
1334         called and therefore the hardware animation was never
1335         getting removed.
1336
1337         This includes a manual-test since it's really impossible
1338         to make a meaningful automatic test for an animation
1339         bug like this.
1340
1341         This has no effect unless accelerated compositing is 
1342         enabled.
1343
1344         * manual-tests/interrupted-compound-transform.html: Added.
1345         * page/animation/ImplicitAnimation.cpp:
1346         (WebCore::ImplicitAnimation::~ImplicitAnimation):
1347         * page/animation/KeyframeAnimation.cpp:
1348         (WebCore::KeyframeAnimation::~KeyframeAnimation):
1349
1350 2009-06-03  Adam Langley  <agl@google.com>
1351
1352         Reviewed by Eric Seidel.
1353
1354         Make the scrollbar thumb size twice the width for Chromium Linux. This
1355         matches Firefox on Linux.
1356
1357         This will need layout test pixel results to be rebaselined in the
1358         Chromium tree.
1359
1360         http://code.google.com/p/chromium/issues/detail?id=12602
1361         https://bugs.webkit.org/show_bug.cgi?id=26176
1362
1363         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1364         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
1365         * platform/chromium/ScrollbarThemeChromiumLinux.h:
1366
1367 2009-06-03  Adam Langley  <agl@google.com>
1368
1369         Reviewed by Eric Seidel.
1370
1371         Change Chromium scrollbar theme code to use different classes on
1372         Windows and Linux rather than suppling symbols. The ScrollbarTheme
1373         class is already using virtual dispatch, so there's no reason not to.
1374
1375         This should not affect any layout tests.
1376
1377         https://bugs.webkit.org/show_bug.cgi?id=26174
1378
1379         * platform/chromium/ScrollbarThemeChromium.cpp:
1380         * platform/chromium/ScrollbarThemeChromium.h:
1381         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1382         (WebCore::ScrollbarTheme::nativeTheme):
1383         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
1384         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
1385         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1386         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1387         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
1388         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
1389         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1390         (WebCore::ScrollbarTheme::nativeTheme):
1391         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
1392         (WebCore::ScrollbarThemeChromiumWin::invalidateOnMouseEnterExit):
1393         (WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin):
1394         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
1395         (WebCore::ScrollbarThemeChromiumWin::paintButton):
1396         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
1397         (WebCore::ScrollbarThemeChromiumWin::getThemeState):
1398         (WebCore::ScrollbarThemeChromiumWin::getThemeArrowState):
1399         (WebCore::ScrollbarThemeChromiumWin::getClassicThemeState):
1400         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
1401         * platform/chromium/ScrollbarThemeChromiumWin.h: Added.
1402
1403 2009-06-03  Pavel Feldman  <pfeldman@chromium.org>
1404
1405         Reviewed by Timothy Hatcher.
1406
1407         Enabling debugger requires that Scripts panel is already attached to the
1408         render tree. The reason is that recompile events result in script sources
1409         being added into the source frames. Prior to the global options introduced,
1410         debugger was enabled from the Scripts panel, so that it was guaranteed to
1411         exist. The InspectorController::enableDebugger API calls with no inspector
1412         frontend showing were failing though.
1413
1414         https://bugs.webkit.org/show_bug.cgi?id=26145
1415
1416         * WebCore.base.exp:
1417         * inspector/InspectorController.cpp:
1418         (WebCore::InspectorController::setWindowVisible):
1419         (WebCore::InspectorController::scriptObjectReady):
1420         (WebCore::InspectorController::enableDebuggerFromFrontend):
1421         (WebCore::InspectorController::enableDebugger):
1422         * inspector/InspectorController.h:
1423         * inspector/InspectorController.idl:
1424         * inspector/InspectorFrontend.cpp:
1425         (WebCore::InspectorFrontend::attachDebuggerWhenShown):
1426         * inspector/InspectorFrontend.h:
1427         * inspector/front-end/ScriptsPanel.js:
1428         (WebInspector.ScriptsPanel.prototype.show):
1429         (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown):
1430         * inspector/front-end/inspector.js:
1431         (WebInspector.attachDebuggerWhenShown):
1432
1433 2009-06-03  Dan Bernstein  <mitz@apple.com>
1434
1435         Reviewed by Anders Carlsson.
1436
1437         - fix a regression from the previous patch
1438
1439         * platform/graphics/Font.cpp: Initialize shouldUseFontSmoothing to true.
1440
1441 2009-06-03  Dan Bernstein  <mitz@apple.com>
1442
1443         Reviewed by Anders Carlsson.
1444
1445         - eliminate WebCoreTextRenderer
1446
1447         * WebCore.base.exp: Updated.
1448         * WebCore.xcodeproj/project.pbxproj: Removed WebCoreTextRenderer.{h,mm}
1449             and promoted WebFontCache.h to private.
1450         * platform/graphics/Font.cpp:
1451         (WebCore::Font::setShouldUseSmoothing): Added this static setter for
1452             a new file-static boolean.
1453         (WebCore::Font::shouldUseSmoothing): Added this static getter.
1454         * platform/graphics/Font.h: Decleared setShouldUseSmoothing() and
1455             shouldUseSmoothing().
1456         * platform/graphics/mac/FontMac.mm:
1457         (WebCore::Font::drawGlyphs): Use Font::shouldUseSmoothing() instead of
1458         WebCoreShouldUseFontSmoothing().
1459         * platform/graphics/mac/WebLayer.mm: Removed unneeded #import.
1460         * platform/mac/WebCoreTextRenderer.h: Removed.
1461         * platform/mac/WebCoreTextRenderer.mm: Removed.
1462
1463 2009-06-03  David Levin  <levin@chromium.org>
1464
1465         Reviewed by Dimitri Glazkov.
1466
1467         v8's ScriptController::evaluate should protect the Frame like the jsc version.
1468         https://bugs.webkit.org/show_bug.cgi?id=26172
1469
1470         This change is simply copying protections done for Frame in the method
1471         WebCore::ScriptController::evaluate in the file js/ScriptController.cpp.
1472
1473         * bindings/v8/ScriptController.cpp:
1474         (WebCore::ScriptController::evaluate):
1475
1476 2009-06-03  Dan Bernstein  <mitz@apple.com>
1477
1478         Reviewed by John Sullivan.
1479
1480         - fix <rdar://problem/6841120> Use CTFontManager notifications instead
1481           of ATS notifications
1482
1483         * platform/graphics/FontCache.h: Made it an error to destroy a
1484         FontCache instance.
1485         * platform/graphics/mac/FontCacheMac.mm:
1486         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Added
1487         this notification callback for the
1488         kCTFontManagerRegisteredFontsChangedNotification, which calls
1489         invalidate().
1490         (WebCore::FontCache::platformInit): Register for
1491         kCTFontManagerRegisteredFontsChangedNotification.
1492
1493 2009-06-03  Kevin Watters  <kevinwatters@gmail.com>
1494
1495         Reviewed by Kevin Ollivier.
1496
1497         Use CGContextShowGlyphsWithAdvances to get more accurate text rendering on Mac.
1498         
1499         https://bugs.webkit.org/show_bug.cgi?id=26161
1500
1501         * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
1502         (WebCore::drawTextWithSpacing):
1503
1504 2009-06-03  Pavel Feldman  <pfeldman@chromium.org>
1505
1506         Reviewed by Timothy Hatcher.
1507
1508         Reorder ResourcesPanel components initialization to unfreeze resource list scroller.
1509
1510         https://bugs.webkit.org/show_bug.cgi?id=26159
1511
1512         * inspector/front-end/ResourcesPanel.js:
1513         (WebInspector.ResourcesPanel):
1514
1515 2009-06-03  Pavel Feldman  <pfeldman@chromium.org>
1516
1517         Reviewed by Timothy Hatcher.
1518
1519         - Fix for crash (preceded by assertion) in InspectorController::didCommitLoad
1520           when reloading or navigating with the Inspector open.
1521         - Fix for Inspector's Elements panel being empty when Inspector first appears.
1522
1523         https://bugs.webkit.org/show_bug.cgi?id=26134
1524         https://bugs.webkit.org/show_bug.cgi?id=26135
1525
1526         * inspector/InspectorController.cpp:
1527         (WebCore::InspectorController::scriptObjectReady):
1528         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
1529         (WebCore::InspectorController::identifierForInitialRequest):
1530         (WebCore::InspectorController::ensureResourceTrackingSettingsLoaded):
1531         * inspector/InspectorController.h:
1532
1533 2009-06-03  Adam Roben  <aroben@apple.com>
1534
1535         Windows build fix after r44379
1536
1537         * svg/graphics/SVGImage.cpp: Move EmptyClients.h back down below the
1538         other #includes to fix a compiler warning on Windows.
1539
1540 2009-06-02  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1541
1542         Reviewed by Simon Hausmann.
1543
1544         Add workaround for crash in Linux Flash Player when hosted by
1545         another toolkit than GTK+. Bug fixed at the Flash Player bugzilla,
1546         issue (FP-2140).
1547
1548         * plugins/qt/PluginViewQt.cpp:
1549         (WebCore::PluginView::setNPWindowIfNeeded):
1550
1551 2009-06-01  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1552
1553         Reviewed by Simon Hausmann.
1554
1555         Refactor the Qt plugin code to use NPP_SetWindow correctly,
1556         to make resizing of plugins work.
1557
1558         Attention was paid to make sure that the windowed plugins scroll
1559         synchronized with the page view. A manual test has been added.
1560
1561         * manual-tests/qt/plugin-iframe.html: Added.
1562         * plugins/PluginView.cpp:
1563         (WebCore::PluginView::setFrameRect):
1564         (WebCore::PluginView::frameRectsChanged):
1565         * plugins/PluginView.h:
1566         * plugins/qt/PluginContainerQt.cpp:
1567         (PluginContainerQt::PluginContainerQt):
1568         * plugins/qt/PluginContainerQt.h:
1569         * plugins/qt/PluginPackageQt.cpp:
1570         (WebCore::PluginPackage::load):
1571         * plugins/qt/PluginViewQt.cpp:
1572         (WebCore::PluginView::updatePluginWidget):
1573         (WebCore::PluginView::paint):
1574         (WebCore::PluginView::setParent):
1575         (WebCore::PluginView::setNPWindowRect):
1576         (WebCore::PluginView::setNPWindowIfNeeded):
1577         (WebCore::PluginView::handlePostReadFile):
1578         (WebCore::PluginView::getValue):
1579         (WebCore::PluginView::invalidateRect):
1580         (WebCore::PluginView::init):
1581
1582 2009-06-02  Darin Adler  <darin@apple.com>
1583
1584         Reviewed by David Hyatt.
1585
1586         Bug 26112: viewless WebKit -- make events work
1587         https://bugs.webkit.org/show_bug.cgi?id=26112
1588
1589         The main fix here is to make mouse and wheel event coordinates in the coordinate
1590         system of the top level NSView rather than the NSWindow when in the viewless mode.
1591         This is the design Hyatt chose, but the event part of it wasn't done yet.
1592
1593         Also fix FrameView to do normal reference counting instead of a strange model with
1594         an explicit deref near creation time.
1595
1596         * WebCore.base.exp: Updated.
1597
1598         * page/EventHandler.cpp:
1599         (WebCore::EventHandler::eventLoopHandleMouseUp): Moved this function into the file
1600         to reduce conditionals in the header.
1601         (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto.
1602
1603         * page/EventHandler.h: Reduced includes. Fixed formatting of Objective-C types.
1604         Made currentNSEvent a static member function. Added sendContextMenuEvent and
1605         eventMayStartDrag functions that takes NSEvent * so the conversion to PlatformMouseEvent
1606         can be done here rather than in WebKit. Reduced #if by making eventLoopHandleMouseUp and
1607         eventLoopHandleMouseDragged unconditional.
1608
1609         * page/Frame.cpp:
1610         (WebCore::Frame::setView): Made this take a PassRefPtr since it takes ownership.
1611         (WebCore::Frame::createView): Changed to use RefPtr and FrameView::create and remove
1612         the explicit deref.
1613
1614         * page/Frame.h: Changed setView to take a PassRefPtr.
1615
1616         * page/FrameTree.cpp: Added newly-needed include.
1617
1618         * page/FrameView.cpp:
1619         (WebCore::FrameView::FrameView): Got rid of one of the two constructors, and removed
1620         the initialization of m_refCount and call to show from the reamining one.
1621         (WebCore::FrameView::create): Added two create functions that do what the two
1622         constructors did before, except that they return a PassRefPtr to make sure the
1623         reference counting is handled correctly.
1624         (WebCore::FrameView::~FrameView): Removed assertion from when FrameView implemented
1625         its own reference counting.
1626
1627         * page/FrameView.h: Inherit from RefCounted for reference counting. Made the
1628         constructor private and added create functions. Got rid of the hand-implemented
1629         reference counting in this class.
1630
1631         * page/mac/EventHandlerMac.mm:
1632         (WebCore::currentNSEventSlot): Renamed currentEvent to currentNSEventSlot to
1633         make it more clear how it relates to currentNSEvent.
1634         (WebCore::EventHandler::currentNSEvent): Updated.
1635         (WebCore::CurrentEventScope::CurrentEventScope): Added. Use to set/reset the
1636         current event in a foolproof way.
1637         (WebCore::CurrentEventScope::~CurrentEventScope): Ditto.
1638         (WebCore::EventHandler::wheelEvent): Use CurrentEventScope. Pass the platform
1639         window in when constructing the PlatformWheelEvent.
1640         (WebCore::EventHandler::keyEvent): Use CurrentEventScope.
1641         (WebCore::lastEventIsMouseUp): Use currentNSEvent.
1642         (WebCore::EventHandler::passMouseDownEventToWidget): Ditto.
1643         (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto.
1644         (WebCore::EventHandler::eventLoopHandleMouseUp): Ditto.
1645         (WebCore::EventHandler::passSubframeEventToSubframe): Use
1646         currentPlatformMouseEvent to get a mouse event that has the appropriate
1647         platform window passed to create it.
1648         (WebCore::EventHandler::passWheelEventToWidget): Ditto.
1649         (WebCore::EventHandler::mouseDown): Ditto.
1650         (WebCore::EventHandler::mouseDragged): Ditto.
1651         (WebCore::EventHandler::mouseUp): Ditto.
1652         (WebCore::EventHandler::mouseMoved): Ditto.
1653         (WebCore::EventHandler::currentPlatformMouseEvent): Added. Passes the
1654         platform window that's now needed to create a PlatformMouseEvent.
1655         (WebCore::EventHandler::sendContextMenuEvent): Added.
1656         (WebCore::EventHandler::eventMayStartDrag): Added.
1657
1658         * platform/HostWindow.h: Removed unneeded includes and constructor definition.
1659
1660         * platform/PlatformMouseEvent.h: Sorted things in alphabetical order.
1661         Changed Mac constructor to take a windowView as well as the event. This is
1662         needed in viewless mode, since the "window" is actually an NSView, so the
1663         event has to know which view to compute the coordinates with. Made the
1664         same change to pointForEvent.
1665         * platform/PlatformWheelEvent.h: Ditto.
1666
1667         * platform/mac/PlatformMouseEventMac.mm:
1668         (WebCore::pointForEvent): Convert point from window coordinates to view
1669         coordinates if a windowView is passed in. This is used in viewless mode.
1670         (WebCore::PlatformMouseEvent::PlatformMouseEvent): Ditto.
1671         * platform/mac/WheelEventMac.mm:
1672         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Ditto.
1673
1674         * platform/mac/WidgetMac.mm:
1675         (WebCore::Widget::convertFromContainingWindow): Fixed case where there
1676         is no platform widget and no parent. Before it would yield unpredictable
1677         results because of dispatching to a nil object and returning a structure.
1678         Now it returns the point without changing coordinates at all, which is what
1679         we need for this case in viewless mode.
1680
1681         * rendering/RenderApplet.cpp: Removed unneeded includes.
1682         (WebCore::RenderApplet::intrinsicSize): Use widget function.
1683         (WebCore::RenderApplet::createWidgetIfNecessary): Ditto.
1684
1685         * rendering/RenderApplet.h: Make more things private. Get rid of unneeded
1686         explicit destructor.
1687
1688         * rendering/RenderFrame.cpp: Removed unneeded includes.
1689         (WebCore::RenderFrame::edgeInfo): Updated to use node function so header
1690         doesn't have to define element function.
1691         (WebCore::RenderFrame::viewCleared): Ditto. Also changed to use widget
1692         function.
1693
1694         * rendering/RenderFrame.h: Removed unneeded includes. Made some things
1695         private. Got rid of element function.
1696
1697         * rendering/RenderPart.cpp: Removed unneeded includes.
1698         (WebCore::RenderPart::~RenderPart): Changed to use clearWidget function.
1699         (WebCore::RenderPart::setWidget): Changed to use widget function.
1700         (WebCore::RenderPart::deleteWidget): Changed to use passed-in widget.
1701         This is now only called by the clearWidget function.
1702
1703         * rendering/RenderPart.h: Removed unneeded forward declarations.
1704         Made more functions private. Updated deleteWidget to take widget argument.
1705
1706         * rendering/RenderPartObject.cpp:
1707         (WebCore::RenderPartObject::~RenderPartObject): use frameView function
1708         instead of getting at m_view directly.
1709         (WebCore::RenderPartObject::updateWidget): Ditto.
1710         (WebCore::RenderPartObject::layout): Ditto. Same for widget and m_widget.
1711         (WebCore::RenderPartObject::viewCleared): Ditto.
1712
1713         * rendering/RenderPartObject.h: Made some functions private.
1714
1715         * rendering/RenderWidget.cpp:
1716         (WebCore::RenderWidget::RenderWidget): Initialize m_frameView with
1717         construction syntax instead of assignment.
1718         (WebCore::RenderWidget::destroy): Updated for name change of m_view
1719         to m_frameView.
1720         (WebCore::RenderWidget::~RenderWidget): Use clearWidget to delete
1721         the widget.
1722         (WebCore::RenderWidget::setWidget): Use clearWidget.
1723         (WebCore::RenderWidget::paint): Updated for name change of m_view
1724         to m_frameView.
1725         (WebCore::RenderWidget::deleteWidget): Changed to use passed-in widget.
1726
1727         * rendering/RenderWidget.h: Made many functions protected, others
1728         private and made all data members private.
1729
1730         * svg/animation/SMILTime.h: Removed unhelpful max and min functions. These
1731         just do what std::max and std::min will already do automatically for this
1732         type, so they are not helpful.
1733
1734         * svg/graphics/SVGImage.cpp:
1735         (WebCore::SVGImage::SVGImage): Removed unneeded initial values for types
1736         that initialize to zero without anything explicit.
1737         (WebCore::SVGImage::~SVGImage): Update since m_frame and m_frameView are
1738         no longer stored.
1739         (WebCore::SVGImage::setContainerSize): Ditto.
1740         (WebCore::SVGImage::usesContainerSize): Ditto.
1741         (WebCore::SVGImage::size): Ditto.
1742         (WebCore::SVGImage::hasRelativeWidth): Ditto.
1743         (WebCore::SVGImage::hasRelativeHeight): Ditto.
1744         (WebCore::SVGImage::draw): Ditto.
1745         (WebCore::SVGImage::nativeImageForCurrentFrame): Ditto.
1746         (WebCore::SVGImage::dataChanged): Ditto.
1747
1748         * svg/graphics/SVGImage.h: Removed unneeded includes and unneeded data
1749         members m_document, m_frame, m_frameView, and m_minSize.
1750
1751 2009-06-02  Adam Langley  <agl@google.com>
1752
1753         Reviewed by Eric Seidel.
1754
1755         The previous code was assuming that we'll be painting buttons on the scrollbar
1756         which isn't true on Linux. To reproduce, resize a page with scrollbars until
1757         they are less than two widths high.
1758
1759         This will need pixel test baselines to be updated in the Chromium tree.
1760
1761         * platform/chromium/ScrollbarThemeChromium.cpp: move this function...
1762         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1763         (WebCore::ScrollbarThemeChromium::trackRect): ... to here
1764         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1765         (WebCore::ScrollbarThemeChromium::trackRect): add an alternative which
1766         doesn't remove the track when the scrollbar is less than two widths
1767         high.
1768
1769 2009-06-02  Mark Rowe  <mrowe@apple.com>
1770
1771         Reviewed by Anders Carlsson.
1772
1773         Remove workaround that was added to address <rdar://problem/5488678> as it no longer affects our Tiger builds.
1774
1775         * Configurations/Base.xcconfig:
1776
1777 2009-06-02  Eric Seidel  <eric@webkit.org>
1778
1779         Reviewed by Maciej Stachowiak.
1780
1781         Insert*List on an stand-alone image in a content editable region ASSERTS
1782         ASSERTION FAILED: isStartOfParagraph(startOfParagraphToMove)
1783         https://bugs.webkit.org/show_bug.cgi?id=19066
1784
1785         Attempt to fix this by noticing that we inserted the list inside
1786         the selection which includes the image, and re-adjust the selection
1787         to not include the list before trying to move the image into
1788         the list item.
1789         
1790         Test: editing/execCommand/list-wrapping-image-crash.html
1791
1792         * editing/InsertListCommand.cpp:
1793         (WebCore::InsertListCommand::doApply):
1794
1795 2009-06-02  Eric Seidel  <eric@webkit.org>
1796
1797         Reviewed by Darin Adler.
1798
1799         Rename PositionIterator members in hope of further clarity
1800         https://bugs.webkit.org/show_bug.cgi?id=24854
1801
1802         Rename m_parent to m_anchorNode (since although it's always the parent
1803         of the previous m_child member, it is not always the parent of the effective position)
1804         Rename m_child to m_nodeAfterPositionInAnchor to make clear that it's the node
1805         directly following the position.  This member is often NULL, but is always
1806         a child of m_parent, now m_anchorNode if set.
1807         Rename m_offset to m_offsetInAnchor (since it's interpreted relative to m_anchorNode)
1808
1809         * dom/PositionIterator.cpp:
1810         (WebCore::PositionIterator::operator Position):
1811         (WebCore::PositionIterator::increment):
1812         (WebCore::PositionIterator::decrement):
1813         (WebCore::PositionIterator::atStart):
1814         (WebCore::PositionIterator::atEnd):
1815         (WebCore::PositionIterator::atStartOfNode):
1816         (WebCore::PositionIterator::atEndOfNode):
1817         (WebCore::PositionIterator::isCandidate):
1818         * dom/PositionIterator.h:
1819         (WebCore::PositionIterator::PositionIterator):
1820         (WebCore::PositionIterator::node):
1821         (WebCore::PositionIterator::offsetInLeafNode):
1822
1823 2009-06-02  Julien Chaffraix  <jchaffraix@webkit.org>
1824
1825         Reviewed by Eric Seidel.
1826
1827         Bug 17167: Failures in fast/dom/Node/initial-values.html
1828
1829         This partly solve a compatibility issue with other browsers. It will also
1830         make us more consistent while handling XHTML element.
1831
1832         The issue is that when we create an XHTML element inside an HTML document
1833         (as it is the case when calling createElementNS), we default to the HTML
1834         behaviour in nodeName. As we cannot test if an HTMLElement is an XHTML
1835         element, our fix is to check whether it has a prefix and then default
1836         to XML behaviour for nodeName.
1837
1838         * html/HTMLElement.cpp:
1839         (WebCore::HTMLElement::nodeName): Add a prefix check before
1840         returning the uppercase tagName (HTML behaviour).
1841
1842 2009-06-02  Eric Seidel  <eric@webkit.org>
1843
1844         Reviewed by Maciej Stachowiak.
1845
1846         Add a compareBoundaryPoints which takes RangeBoundaryPoints
1847         https://bugs.webkit.org/show_bug.cgi?id=25500
1848
1849         I noticed the need for this function when removing compareBoundaryPoints(Position, Position)
1850         This patch is almost entirely minus lines.
1851
1852         No functional changes, thus no tests.
1853
1854         * dom/Range.cpp:
1855         (WebCore::Range::setStart):
1856         (WebCore::Range::setEnd):
1857         (WebCore::Range::compareBoundaryPoints):
1858         (WebCore::Range::boundaryPointsValid):
1859         * dom/Range.h:
1860
1861 2009-06-02  Eric Seidel  <eric@webkit.org>
1862
1863         Reviewed by Maciej Stachowiak.
1864
1865         Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in bug 25056
1866         https://bugs.webkit.org/show_bug.cgi?id=25500
1867
1868         Darin indicated the Range should deal only with primitive DOM node/offset
1869         pairs, and that Position (which is a more robust editing construct) should have
1870         its own comparison functions and that Range.h should not mention Position at all.
1871
1872         Turns out that Position already has a comparePositions() function (which knows
1873         how to additionally handled positions in shadow trees).  So I've just changed
1874         all callers of compareBoundaryPoints(Position, Position) to use the existing
1875         comparePositions() function.  I've also added a comparePositions which takes
1876         VisiblePositions for convenience.
1877
1878         * dom/Range.cpp:
1879         * dom/Range.h:
1880         * editing/ApplyStyleCommand.cpp:
1881         (WebCore::ApplyStyleCommand::updateStartEnd):
1882         (WebCore::ApplyStyleCommand::applyBlockStyle):
1883         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1884         (WebCore::ApplyStyleCommand::applyInlineStyle):
1885         (WebCore::ApplyStyleCommand::applyInlineStyleToRange):
1886         (WebCore::ApplyStyleCommand::removeInlineStyle):
1887         (WebCore::ApplyStyleCommand::nodeFullySelected):
1888         (WebCore::ApplyStyleCommand::nodeFullyUnselected):
1889         * editing/CompositeEditCommand.cpp:
1890         (WebCore::CompositeEditCommand::deleteInsignificantText):
1891         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1892         (WebCore::CompositeEditCommand::moveParagraphs):
1893         * editing/DeleteSelectionCommand.cpp:
1894         (WebCore::DeleteSelectionCommand::initializeStartEnd):
1895         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1896         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1897         * editing/SelectionController.cpp:
1898         (WebCore::SelectionController::nodeWillBeRemoved):
1899         * editing/VisibleSelection.cpp:
1900         (WebCore::VisibleSelection::toNormalizedRange):
1901         * editing/htmlediting.cpp:
1902         (WebCore::comparePositions):
1903         * editing/htmlediting.h:
1904         * page/EventHandler.cpp:
1905         (WebCore::EventHandler::handleMousePressEventSingleClick):
1906
1907 2009-06-02  Albert J. Wong  <ajwong@chromium.org>
1908
1909         Reviewed by Dimitri Glazkov.
1910
1911         https://bugs.webkit.org/show_bug.cgi?id=26122
1912         Upstream v8_utility.h functions into V8Utilities.h.  This patch has
1913         some transitional code to make upstreaming easier.  This code will
1914         be deleted in a few days.
1915
1916         * bindings/v8/ScriptFunctionCall.cpp:
1917         (WebCore::ScriptFunctionCall::construct): NewInstance -> newInstance.
1918         * bindings/v8/V8Utilities.h:
1919         (WebCore::AllowAllocation::AllowAllocation): Function added.
1920         (WebCore::AllowAllocation::~AllowAllocation): Function added.
1921         (WebCore::SafeAllocation::NewInstance): Function added.
1922         * bindings/v8/WorkerContextExecutionProxy.cpp:
1923         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
1924         NewInstance -> newInstance.
1925         (WebCore::WorkerContextExecutionProxy::toV8): NewInstance ->
1926         newInstance.
1927
1928 2009-06-02  Dan Bernstein  <mitz@apple.com>
1929
1930         Reviewed by John Sullivan.
1931
1932         - fix <rdar://problem/6940747> Search field’s focus ring is outset
1933
1934         * rendering/RenderThemeWin.cpp:
1935         (WebCore::RenderThemeWin::adjustSearchFieldStyle): Set the focused
1936         search field outline offset to -2.
1937
1938 2009-06-02  Sam Weinig  <sam@webkit.org>
1939
1940         Reviewed by Alexey Proskuryakov.
1941
1942         Add list of unimplemented event handlers to DOMWindow.
1943
1944         * page/DOMWindow.idl:
1945
1946 2009-06-02  Alexey Proskuryakov  <ap@webkit.org>
1947
1948         Reviewed by Sam Weinig.
1949
1950         https://bugs.webkit.org/show_bug.cgi?id=26133
1951         Adapt and import py-dom-xpath tests
1952
1953         Tests: fast/xpath/py-dom-xpath/abbreviations.html
1954                fast/xpath/py-dom-xpath/axes.html
1955                fast/xpath/py-dom-xpath/data.html
1956                fast/xpath/py-dom-xpath/expressions.html
1957                fast/xpath/py-dom-xpath/functions.html
1958                fast/xpath/py-dom-xpath/nodetests.html
1959                fast/xpath/py-dom-xpath/paths.html
1960                fast/xpath/py-dom-xpath/predicates.html
1961
1962         Fix bugs found with this test suite:
1963         - name and local-name were incorrect for processing instructions (XPath expanded-name
1964         doesn't match DOM exactly);
1965         - name, local-name and namespace functions should crash on attribute nodes;
1966         - attemps to make node sets from other types were not detected as errors.
1967
1968         No performance impact.
1969
1970         * xml/XPathExpressionNode.h: Track type conversion errors that happen during evaluation.
1971         An error won't stop evaluation, but an exception will be raised afterwards. We could also
1972         detect conversion errors at compile time, but not if we're going to support XPath variables
1973         (which is unnecessary for XPathEvaluator, but will be necessary if we decide to make our own
1974         XSLT one day).
1975
1976         * xml/XPathExpression.cpp: (WebCore::XPathExpression::evaluate): Check whether a type
1977         conversion exception occurred during evaluation, and raise an excpetion if it did.
1978
1979         * xml/XPathFunctions.cpp:
1980         (WebCore::XPath::expandedNameLocalPart):
1981         (WebCore::XPath::expandedName):
1982         XPath name(), local-name() and namespace-uri() functions are defined in terms of expanded-name,
1983         which doesn't match anything available via DOM exactly. Calculate the expanded name properly.
1984         (WebCore::XPath::FunNamespaceURI::evaluate): This function could crash if used with an
1985         attribute node, because it released what was possibly the only reference to attribute node
1986         before using it. Changed the function to avoid such situation.
1987         (WebCore::XPath::FunLocalName::evaluate): Ditto. Also, used the new expandedNameLocalPart()
1988         to work properly with processing instruction nodes.
1989         (WebCore::XPath::FunName::evaluate): Ditto (using expandedName()).
1990         (WebCore::XPath::FunCount::evaluate): Signal an error if the argument is not a node-set
1991         (by using toNodeSet unconditionally, which will raise an error, and return an empty set).
1992
1993         * xml/XPathPath.cpp: (WebCore::XPath::Filter::evaluate): Signal an error if the expression
1994         evaluation result is not a node-set.
1995
1996         * xml/XPathPath.h: (WebCore::XPath::Filter::resultType): A Filter's result is actually
1997         always a node-set (this is not so for FilterExpr production in the spec, but is for us,
1998         because we don't naively map BNF productions to classes).
1999
2000         * xml/XPathPredicate.cpp: (WebCore::XPath::Union::evaluate): Signal an error if either side
2001         is not a node-set.
2002
2003         * xml/XPathStep.cpp: Removed an unnecesary include.
2004
2005         * xml/XPathValue.cpp:
2006         (WebCore::XPath::Value::toNodeSet): Signal an error if conversion fails.
2007         (WebCore::XPath::Value::modifiableNodeSet): Ditto.
2008         (WebCore::XPath::Value::toNumber): Don't allow inputs that don't match XPath Number production
2009         (in particular, those using exponential notation).
2010
2011 2009-06-01  Sam Weinig  <sam@webkit.org>
2012
2013         Reviewed by Brady Eidson.
2014
2015         Part of https://bugs.webkit.org/show_bug.cgi?id=26100
2016         Add missing event handler properties to the DOMWindow
2017
2018         Added oncontextmenu, oninput, and onmessage event handlers to
2019         the DOMWindow. Aditionally, the onloadstart, onprogress, onstalled,
2020         and onsuspend event handlers were implemented but not added to
2021         DOMWindow.idl.
2022
2023         * page/DOMWindow.cpp:
2024         (WebCore::DOMWindow::oninput):
2025         (WebCore::DOMWindow::setOninput):
2026         (WebCore::DOMWindow::onmessage):
2027         (WebCore::DOMWindow::setOnmessage):
2028         (WebCore::DOMWindow::oncontextmenu):
2029         (WebCore::DOMWindow::setOncontextmenu):
2030         * page/DOMWindow.h:
2031         * page/DOMWindow.idl:
2032
2033 2009-06-01  Jeremy Orlow  <jorlow@chromium.org>
2034
2035         Reviewed by Darin Adler.  Landed by Adam Barth.
2036
2037         https://bugs.webkit.org/show_bug.cgi?id=26123
2038
2039         Remove a redundant checkEncodedString call when constructing a
2040         KURL object from a string.
2041
2042         * platform/KURL.cpp:
2043         (WebCore::KURL::KURL):
2044
2045 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2046
2047         Unreviewed, build fix.
2048
2049         Reposition platform guard, improperly placed by http://trac.webkit.org/changeset/44340
2050         Bad Dimitri.
2051
2052         * platform/KeyboardCodes.h: Repositioned the guard to avoid nested
2053             WebCore namespace declarations.
2054
2055 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2056
2057         Unreviewed, build fix.
2058
2059         * platform/KeyboardCodes.h: Integrated contents of platform/chromium/KeyboardCodes.h
2060             with a stern FIXME.
2061         * platform/chromium/KeyboardCodes.h: Removed.
2062
2063 2009-06-01  Nikolas Zimmermann  <zimmermann@kde.org>
2064
2065         Reviewed by Eric Seidel.
2066
2067         Fix assertion error in --filters enabled debug builds.
2068         Instead of using RefPtr<AtomicStringImpl> as keys for the hash maps in SVGFilterBuilder, just use AtomicString objects.
2069
2070         * svg/graphics/filters/SVGFilterBuilder.cpp:
2071         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2072         (WebCore::SVGFilterBuilder::add):
2073         (WebCore::SVGFilterBuilder::getEffectById):
2074         * svg/graphics/filters/SVGFilterBuilder.h:
2075
2076 2009-06-01  Nikolas Zimmermann  <zimmermann@kde.org>
2077
2078         Reviewed by Eric Seidel.
2079
2080         Fix --filters enabled build on Mac.
2081         Remove unnecessary 'boundingBox' parameter from finishRenderSVGContent() method.
2082         Kill several warnings, to make build pass.
2083
2084         * rendering/RenderPath.cpp:
2085         (WebCore::RenderPath::paint):
2086         * rendering/RenderSVGContainer.cpp:
2087         (WebCore::RenderSVGContainer::paint):
2088         * rendering/RenderSVGImage.cpp:
2089         (WebCore::RenderSVGImage::paint):
2090         * rendering/RenderSVGRoot.cpp:
2091         (WebCore::RenderSVGRoot::paint):
2092         * rendering/SVGRenderSupport.cpp:
2093         (WebCore::SVGRenderBase::finishRenderSVGContent):
2094         * rendering/SVGRenderSupport.h:
2095         * rendering/SVGRootInlineBox.cpp:
2096         (WebCore::SVGRootInlineBoxPaintWalker::chunkEndCallback):
2097         * svg/SVGFEGaussianBlurElement.cpp:
2098         (WebCore::SVGFEGaussianBlurElement::setStdDeviation):
2099         * svg/graphics/filters/SVGFEFlood.cpp:
2100         (WebCore::FEFlood::FEFlood):
2101
2102 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2103
2104         Reviewed by Dave Hyatt.
2105
2106         Fix Chromium build by adding an #ifdef, restoring the code path to that
2107         before http://trac.webkit.org/changeset/44287.
2108
2109         * platform/mac/ScrollbarThemeMac.mm:
2110         (WebCore::ScrollbarThemeMac::paint): Added an #ifdef.
2111
2112 2009-06-01  Dirk Schulze  <krit@webkit.org>
2113
2114         Reviewed by Nikolas Zimmermann.
2115
2116         Remove last pieces of the old SVG filter system. They are not
2117         usable with our current filter system. The new filter effects
2118         will replace the functionality step by step.
2119
2120         * GNUmakefile.am:
2121         * WebCore.pro:
2122         * WebCore.vcproj/WebCore.vcproj:
2123         * WebCore.xcodeproj/project.pbxproj:
2124         * svg/graphics/cairo: Removed.
2125         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Removed.
2126         * svg/graphics/cg: Removed.
2127         * svg/graphics/cg/SVGResourceFilterCg.cpp: Removed.
2128         * svg/graphics/cg/SVGResourceFilterCg.mm: Removed.
2129         * svg/graphics/filters/SVGFilterEffect.cpp: Removed.
2130         * svg/graphics/filters/SVGFilterEffect.h: Removed.
2131         * svg/graphics/filters/cg: Removed.
2132         * svg/graphics/filters/cg/SVGFEHelpersCg.h: Removed.
2133         * svg/graphics/filters/cg/SVGFEHelpersCg.mm: Removed.
2134         * svg/graphics/filters/cg/SVGFilterEffectCg.mm: Removed.
2135         * svg/graphics/filters/cg/WKArithmeticFilter.cikernel: Removed.
2136         * svg/graphics/filters/cg/WKArithmeticFilter.h: Removed.
2137         * svg/graphics/filters/cg/WKArithmeticFilter.m: Removed.
2138         * svg/graphics/filters/cg/WKComponentMergeFilter.cikernel: Removed.
2139         * svg/graphics/filters/cg/WKComponentMergeFilter.h: Removed.
2140         * svg/graphics/filters/cg/WKComponentMergeFilter.m: Removed.
2141         * svg/graphics/filters/cg/WKDiffuseLightingFilter.cikernel: Removed.
2142         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h: Removed.
2143         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m: Removed.
2144         * svg/graphics/filters/cg/WKDiscreteTransferFilter.cikernel: Removed.
2145         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h: Removed.
2146         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m: Removed.
2147         * svg/graphics/filters/cg/WKDisplacementMapFilter.cikernel: Removed.
2148         * svg/graphics/filters/cg/WKDisplacementMapFilter.h: Removed.
2149         * svg/graphics/filters/cg/WKDisplacementMapFilter.m: Removed.
2150         * svg/graphics/filters/cg/WKDistantLightFilter.cikernel: Removed.
2151         * svg/graphics/filters/cg/WKDistantLightFilter.h: Removed.
2152         * svg/graphics/filters/cg/WKDistantLightFilter.m: Removed.
2153         * svg/graphics/filters/cg/WKGammaTransferFilter.cikernel: Removed.
2154         * svg/graphics/filters/cg/WKGammaTransferFilter.h: Removed.
2155         * svg/graphics/filters/cg/WKGammaTransferFilter.m: Removed.
2156         * svg/graphics/filters/cg/WKIdentityTransferFilter.h: Removed.
2157         * svg/graphics/filters/cg/WKIdentityTransferFilter.m: Removed.
2158         * svg/graphics/filters/cg/WKLinearTransferFilter.cikernel: Removed.
2159         * svg/graphics/filters/cg/WKLinearTransferFilter.h: Removed.
2160         * svg/graphics/filters/cg/WKLinearTransferFilter.m: Removed.
2161         * svg/graphics/filters/cg/WKNormalMapFilter.cikernel: Removed.
2162         * svg/graphics/filters/cg/WKNormalMapFilter.h: Removed.
2163         * svg/graphics/filters/cg/WKNormalMapFilter.m: Removed.
2164         * svg/graphics/filters/cg/WKPointLightFilter.cikernel: Removed.
2165         * svg/graphics/filters/cg/WKPointLightFilter.h: Removed.
2166         * svg/graphics/filters/cg/WKPointLightFilter.m: Removed.
2167         * svg/graphics/filters/cg/WKSpecularLightingFilter.cikernel: Removed.
2168         * svg/graphics/filters/cg/WKSpecularLightingFilter.h: Removed.
2169         * svg/graphics/filters/cg/WKSpecularLightingFilter.m: Removed.
2170         * svg/graphics/filters/cg/WKSpotLightFilter.cikernel: Removed.
2171         * svg/graphics/filters/cg/WKSpotLightFilter.h: Removed.
2172         * svg/graphics/filters/cg/WKSpotLightFilter.m: Removed.
2173         * svg/graphics/filters/cg/WKTableTransferFilter.cikernel: Removed.
2174         * svg/graphics/filters/cg/WKTableTransferFilter.h: Removed.
2175         * svg/graphics/filters/cg/WKTableTransferFilter.m: Removed.
2176         * svg/graphics/mac: Removed.
2177         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h: Removed.
2178         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm: Removed.
2179         * svg/graphics/qt: Removed.
2180         * svg/graphics/qt/SVGResourceFilterQt.cpp: Removed.
2181         * svg/graphics/skia: Removed.
2182         * svg/graphics/skia/SVGResourceFilterSkia.cpp: Removed.
2183
2184 2009-06-01  Dmitry Titov  <dimich@chromium.org>
2185
2186         Fix the previous checkin (ttp://trac.webkit.org/changeset/44327).
2187         This adds a comment suggested during review.
2188
2189         * platform/ThreadGlobalData.cpp:
2190         (WebCore::ThreadGlobalData::~ThreadGlobalData): Add comment clarifying the change.
2191
2192 2009-06-01  Dmitry Titov  <dimich@chromium.org>
2193
2194         Reviewed by Darin Adler.
2195
2196         https://bugs.webkit.org/show_bug.cgi?id=25973
2197         Avoid calling CurrentThread() in thread-specific destructors in OSX Chromium.
2198         Pthreads invoke thread-specific destructors after WTF::detachThread() is called and ThreadIdentifier
2199         for the thread removed from the WTF thread map. Calling CurrentThread() in such destructor causes
2200         the ThreadIdentifier to be re-created and inserted into the map again. Since Pthreads on OSX reuse
2201         the pthread_t between threads, the next created thread will have the same pthread_t and cause an assert
2202         in establishIdentifierForPthreadHandle() since the id is already in the map.
2203
2204         The behavior is covered by existing test LayoutTests/fast/workers/worker-terminate.html, which currently fails
2205         on OSX Chromium and will stop failing after this change.
2206
2207         * platform/ThreadGlobalData.h:
2208         * platform/ThreadGlobalData.cpp:
2209         (WebCore::ThreadGlobalData::~ThreadGlobalData):
2210         Store the result of "isMainThread()" in a member variable during construction of thread-specific data
2211         to avoid calling IsMainThread() in destructor, since the latter calls CurrentThread() in OSX Chromium.
2212
2213 2009-06-01  David Levin  <levin@chromium.org>
2214
2215         Reviewed by Darin Alder and Maciej Stachowiak.
2216
2217         Bug 26057: StringImpl should share buffers with UString.
2218         https://bugs.webkit.org/show_bug.cgi?id=26057
2219
2220         This change results in the following performance improvements:
2221         On http://www.hixie.ch/tests/adhoc/perf/dom/artificial/core/001.html
2222         the time went from 78ms to 40ms for append (other times remained constant).
2223
2224         On http://www.hixie.ch/tests/adhoc/perf/dom/artificial/core/002.html,
2225         the time went from 3900ms to 2600ms.
2226
2227         For http://dromaeo.com/?dom, the time for DomModification improved by ~6%.
2228         Other tests in dom seemed to be faster across several runs but within the
2229         margin of error (except DOM Attributes which was slightly ~1.5% worse).
2230
2231         Existing tests cover this code and there is no new functionality
2232         that is exposed to test.
2233
2234         * platform/text/AtomicString.cpp:
2235         (WebCore::AtomicString::add):
2236         * platform/text/String.cpp:
2237         (WebCore::String::String):
2238         (WebCore::String::operator UString):
2239         * platform/text/StringImpl.cpp:
2240         (WebCore::StringImpl::StringImpl):
2241         (WebCore::StringImpl::~StringImpl):
2242         (WebCore::StringImpl::create): Consumes a shared buffer.
2243         (WebCore::StringImpl::ustring): Shares the StringImpl's buffer with the UString.
2244         (WebCore::StringImpl::sharedBuffer): Exposes the buffer that may be shared.
2245         * platform/text/StringImpl.h:
2246         (WebCore::StringImpl::hasTerminatingNullCharacter):
2247         (WebCore::StringImpl::inTable):
2248         (WebCore::StringImpl::setInTable): Converted the bools to be inside of PtrAndFlags
2249         to avoid growing StringImpl in size.
2250
2251 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2252
2253         Unreviewed, build fix.
2254
2255         V8 bindings follow-up to to DOMWindow-related cleanup:
2256         http://trac.webkit.org/changeset/44215
2257
2258         * bindings/v8/ScriptController.cpp: Removed disconnectFrame(), relocated
2259             its body to destructor.
2260         * bindings/v8/ScriptController.h: Removed disconnectFrame() decl.
2261
2262 2009-05-28  Pavel Feldman  <pfeldman@chromium.org>
2263
2264         Reviewed by Timothy Hatcher.
2265
2266         - Add panel enabler to the resources panel.
2267         - Add session / always options into the panel enabler.
2268         - Make enabled status for three panels sticky (globally).
2269         - Persist enabled status using InspectorController::Settings
2270         - Make InspectorController produce no network-related overhead when
2271           resources panel is not enabled.
2272
2273         https://bugs.webkit.org/show_bug.cgi?id=26046
2274
2275         * inspector/InspectorController.cpp:
2276         (WebCore::InspectorController::InspectorController):
2277         (WebCore::InspectorController::setWindowVisible):
2278         (WebCore::InspectorController::populateScriptObjects):
2279         (WebCore::InspectorController::identifierForInitialRequest):
2280         (WebCore::InspectorController::willSendRequest):
2281         (WebCore::InspectorController::didReceiveResponse):
2282         (WebCore::InspectorController::didReceiveContentLength):
2283         (WebCore::InspectorController::didFinishLoading):
2284         (WebCore::InspectorController::didFailLoading):
2285         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
2286         (WebCore::InspectorController::scriptImported):
2287         (WebCore::InspectorController::enableResourceTracking):
2288         (WebCore::InspectorController::disableResourceTracking):
2289         (WebCore::InspectorController::startUserInitiatedProfiling):
2290         (WebCore::InspectorController::enableProfiler):
2291         (WebCore::InspectorController::disableProfiler):
2292         (WebCore::InspectorController::enableDebugger):
2293         (WebCore::InspectorController::disableDebugger):
2294         * inspector/InspectorController.h:
2295         (WebCore::InspectorController::Setting::Setting):
2296         (WebCore::InspectorController::resourceTrackingEnabled):
2297         * inspector/InspectorController.idl:
2298         * inspector/InspectorFrontend.cpp:
2299         (WebCore::InspectorFrontend::resourceTrackingWasEnabled):
2300         (WebCore::InspectorFrontend::resourceTrackingWasDisabled):
2301         * inspector/InspectorFrontend.h:
2302         * inspector/front-end/PanelEnablerView.js:
2303         (WebInspector.PanelEnablerView.enableOption):
2304         (WebInspector.PanelEnablerView):
2305         (WebInspector.PanelEnablerView.prototype._windowResized):
2306         (WebInspector.PanelEnablerView.prototype.alwaysWasChosen):
2307         * inspector/front-end/ProfilesPanel.js:
2308         (WebInspector.ProfilesPanel.prototype._enableProfiling):
2309         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2310         * inspector/front-end/ResourcesPanel.js:
2311         (WebInspector.ResourcesPanel):
2312         (WebInspector.ResourcesPanel.prototype.get statusBarItems):
2313         (WebInspector.ResourcesPanel.prototype.resourceTrackingWasEnabled):
2314         (WebInspector.ResourcesPanel.prototype.resourceTrackingWasDisabled):
2315         (WebInspector.ResourcesPanel.prototype.reset):
2316         (WebInspector.ResourcesPanel.prototype._updateSidebarWidth):
2317         (WebInspector.ResourcesPanel.prototype._enableResourceTracking):
2318         (WebInspector.ResourcesPanel.prototype._toggleResourceTracking):
2319         * inspector/front-end/ScriptsPanel.js:
2320         (WebInspector.ScriptsPanel.prototype._enableDebugging):
2321         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2322         * inspector/front-end/inspector.css:
2323         * inspector/front-end/inspector.js:
2324         (WebInspector.resourceTrackingWasEnabled):
2325         (WebInspector.resourceTrackingWasDisabled):
2326
2327 2009-06-01  Drew Wilson  <atwilson@google.com>
2328
2329         Reviewed by Darin Adler.  Landed (and tweaked) by Adam Barth.
2330
2331         https://bugs.webkit.org/show_bug.cgi?id=25902
2332
2333         Added WorkerContext.close()
2334
2335         Test: fast/workers/worker-close.html
2336
2337         * workers/WorkerContext.cpp:
2338         (WebCore::WorkerContext::close):
2339         * workers/WorkerContext.h:
2340         * workers/WorkerContext.idl:
2341         * workers/WorkerMessagingProxy.cpp:
2342         (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal):
2343
2344 2009-06-01  Alexey Proskuryakov  <ap@webkit.org>
2345
2346         Reviewed by Darin Adler.
2347
2348         https://bugs.webkit.org/show_bug.cgi?id=12471
2349         XPathResult not invalidated for documents retrieved via XMLHttpRequest
2350
2351         Test: fast/xpath/detached-subtree-invalidate-iterator.html and existing tests in dom/svg/level3/xpath.
2352
2353         Use DOM tree version instead of DOMSubtreeModified events to invalidate, which is more
2354         reliable and much faster.
2355
2356         * xml/XPathExpression.cpp:
2357         (WebCore::XPathExpression::evaluate):
2358         * xml/XPathResult.cpp:
2359         (WebCore::XPathResult::XPathResult):
2360         (WebCore::XPathResult::~XPathResult):
2361         (WebCore::XPathResult::invalidIteratorState):
2362         (WebCore::XPathResult::iterateNext):
2363         * xml/XPathResult.h:
2364         (WebCore::XPathResult::create):
2365
2366 2009-06-01  Brett Wilson  <brettw@chromium.org>
2367
2368         Reviewed by Darin Adler.  Landed by Adam Barth.
2369
2370         https://bugs.webkit.org/show_bug.cgi?id=25750
2371
2372         Test: fast/transforms/bounding-rect-zoom.html
2373
2374         Make getClientRects and getBoundingClientRect account for ther zoom
2375         factor.
2376
2377         * dom/Element.cpp:
2378         (WebCore::adjustFloatPointForAbsoluteZoom):
2379         (WebCore::adjustFloatQuadForAbsoluteZoom):
2380         (WebCore::adjustIntRectForAbsoluteZoom):
2381         (WebCore::Element::getClientRects):
2382         (WebCore::Element::getBoundingClientRect):
2383
2384 2009-06-01  Tony Chang  <tony@chromium.org>
2385
2386         Reviewed by Dimitri Glazkov.  Landed by Adam Barth.
2387
2388         https://bugs.webkit.org/show_bug.cgi?id=26026
2389
2390         Fix an infinite loop when using the keyboard in Chromium select
2391         popups.
2392
2393         Not testable since it involves sending a keyboard event to
2394         the popup, which is not possible (eventSender sends the key
2395         events through webview, we want to go through the webwidget).
2396
2397         * platform/chromium/PopupMenuChromium.cpp:
2398
2399 2009-06-01  Nate Chapin  <japhet@google.com>
2400
2401         Reviewed by Dimitri Glazkov.  Landed by Adam Barth.
2402
2403         If a url with an anchor is being loaded, ensure that the anchor remains locked in view until the page
2404         has finished loading compeltely or the user has manually scrolled.  Refreshing an anchor url after
2405         scrolling to a new location on the page will still result in jumping to the new location.
2406         
2407         https://bugs.webkit.org/show_bug.cgi?id=26034
2408
2409         * loader/FrameLoader.cpp:
2410         (WebCore::FrameLoader::gotoAnchor): Set anchor lock after navigating to anchor.
2411         (WebCore::FrameLoader::completed): Release anchor lock.
2412         * page/FrameView.cpp:
2413         (WebCore::FrameView::FrameView): Ensure anchor lock starts unset.
2414         (WebCore::FrameView::reset): Ensure anchor lock starts unset.
2415         (WebCore::FrameView::layout): If anchor lock is set, force a gotoAnchor() after layout.
2416         (WebCore::FrameView::scrollRectIntoViewRecursively): Release anchor lock if a programmatic scroll begins.
2417         (WebCore::FrameView::setWasScrolledByUser): Release anchor lock if user manually scrolls.
2418         (WebCore::FrameView::setScrollPosition): Release anchor lock if a programmatic scroll begins.
2419         * page/FrameView.h:
2420         (WebCore::FrameView::lockedToAnchor): Added.
2421         (WebCore::FrameView::setLockedToAnchor): Added.
2422
2423 2009-05-31  Dirk Schulze  <krit@webkit.org>
2424
2425         Reviewed by Nikolas Zimmermann.
2426
2427         WebKit needs cross-platform filter system
2428         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2429
2430         A short clean-up. FilterBuilder is SVG specific. Move it
2431         to svg/graphics/filters and rename it to SVGFilterBuilder. 
2432
2433         * GNUmakefile.am:
2434         * WebCore.pro:
2435         * WebCore.xcodeproj/project.pbxproj:
2436         * svg/FilterBuilder.cpp: Removed.
2437         * svg/FilterBuilder.h: Removed.
2438         * svg/SVGFilterElement.cpp:
2439         * svg/SVGFilterPrimitiveStandardAttributes.h:
2440         * svg/graphics/SVGResourceFilter.cpp:
2441         (WebCore::SVGResourceFilter::SVGResourceFilter):
2442         * svg/graphics/SVGResourceFilter.h:
2443         (WebCore::SVGResourceFilter::builder):
2444         * svg/graphics/filters/SVGFilterBuilder.cpp: Added.
2445         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2446         (WebCore::SVGFilterBuilder::add):
2447         (WebCore::SVGFilterBuilder::getEffectById):
2448         (WebCore::SVGFilterBuilder::clearEffects):
2449         * svg/graphics/filters/SVGFilterBuilder.h: Added.
2450         (WebCore::SVGFilterBuilder::lastEffect):
2451
2452 2009-05-31  Alexey Proskuryakov  <ap@webkit.org>
2453
2454         Reviewed by Darin Adler.
2455
2456         https://bugs.webkit.org/show_bug.cgi?id=13233
2457         Need to implement an optimizing XPath evaluator
2458
2459         Avoid sorting results of hierarchical paths that are naturally sorted. On a flat data structure
2460         with 128K nodes and a simple XPath expression, this changes evaluation time from 1.5 minutes
2461         to 33 ms.
2462
2463         * xml/XPathNodeSet.h: Keep track of whether subtrees rooted at nodes in set are disjoint,
2464         which is useful for optimization.
2465         (WebCore::XPath::NodeSet::NodeSet): Removed, it was identical to compiler generated one.
2466         (WebCore::XPath::NodeSet::operator=): Ditto.
2467         (WebCore::XPath::NodeSet::swap): Ditto.
2468         (WebCore::XPath::NodeSet::isSorted): Single element sets are always sorted, even if sort()
2469         was never called.
2470         (WebCore::XPath::NodeSet::markSubtreesDisjoint): Just like being sorted, the new flag is
2471         maintained by callers.
2472         (WebCore::XPath::NodeSet::subtreesAreDisjoint): A single element set only has one subtree.
2473         Currently, the only way for a set to gain this flag is to be produced from a single element
2474         set with a hierarchical location path.
2475
2476         * xml/XPathPath.cpp: (WebCore::XPath::LocationPath::evaluate): Use the new flag to avoid
2477         maintaining a set of unique nodes, and to avoid sorting the result.
2478
2479 2009-05-31  Alexey Proskuryakov  <ap@webkit.org>
2480
2481         Reviewed by Darin Adler.
2482
2483         https://bugs.webkit.org/show_bug.cgi?id=13233
2484         Need to implement an optimizing XPath evaluator
2485
2486         This patch adds some infrastructure and simple optimizations. Namely,
2487         - we now avoid building a full NodeSet just to evaluate a predicate in some cases;
2488         - "/descendant-or-self::node()/child::" is optimized to iterate the tree once when possible;
2489
2490         * xml/XPathExpressionNode.cpp:
2491         (WebCore::XPath::Expression::Expression):
2492         * xml/XPathExpressionNode.h:
2493         (WebCore::XPath::Expression::addSubExpression):
2494         (WebCore::XPath::Expression::isContextNodeSensitive):
2495         (WebCore::XPath::Expression::isContextPositionSensitive):
2496         (WebCore::XPath::Expression::isContextSizeSensitive):
2497         (WebCore::XPath::Expression::setIsContextNodeSensitive):
2498         (WebCore::XPath::Expression::setIsContextPositionSensitive):
2499         (WebCore::XPath::Expression::setIsContextSizeSensitive):
2500         XPath expression now knows its result type, and whether evaluation depends on context.
2501
2502         * xml/XPathFunctions.cpp:
2503         (WebCore::XPath::FunLast::resultType):
2504         (WebCore::XPath::FunLast::FunLast):
2505         (WebCore::XPath::FunPosition::resultType):
2506         (WebCore::XPath::FunPosition::FunPosition):
2507         (WebCore::XPath::FunCount::resultType):
2508         (WebCore::XPath::FunId::resultType):
2509         (WebCore::XPath::FunLocalName::resultType):
2510         (WebCore::XPath::FunLocalName::FunLocalName):
2511         (WebCore::XPath::FunNamespaceURI::resultType):
2512         (WebCore::XPath::FunNamespaceURI::FunNamespaceURI):
2513         (WebCore::XPath::FunName::resultType):
2514         (WebCore::XPath::FunName::FunName):
2515         (WebCore::XPath::FunString::resultType):
2516         (WebCore::XPath::FunString::FunString):
2517         (WebCore::XPath::FunConcat::resultType):
2518         (WebCore::XPath::FunStartsWith::resultType):
2519         (WebCore::XPath::FunContains::resultType):
2520         (WebCore::XPath::FunSubstringBefore::resultType):
2521         (WebCore::XPath::FunSubstringAfter::resultType):
2522         (WebCore::XPath::FunSubstring::resultType):
2523         (WebCore::XPath::FunStringLength::resultType):
2524         (WebCore::XPath::FunStringLength::FunStringLength):
2525         (WebCore::XPath::FunNormalizeSpace::resultType):
2526         (WebCore::XPath::FunNormalizeSpace::FunNormalizeSpace):
2527         (WebCore::XPath::FunTranslate::resultType):
2528         (WebCore::XPath::FunBoolean::resultType):
2529         (WebCore::XPath::FunNot::resultType):
2530         (WebCore::XPath::FunTrue::resultType):
2531         (WebCore::XPath::FunFalse::resultType):
2532         (WebCore::XPath::FunLang::resultType):
2533         (WebCore::XPath::FunLang::FunLang):
2534         (WebCore::XPath::FunNumber::resultType):
2535         (WebCore::XPath::FunNumber::FunNumber):
2536         (WebCore::XPath::FunSum::resultType):
2537         (WebCore::XPath::FunFloor::resultType):
2538         (WebCore::XPath::FunCeiling::resultType):
2539         (WebCore::XPath::FunRound::resultType):
2540         (WebCore::XPath::Function::setArguments):
2541         Set optimization details for the expression. Normally, a function does not introduce context
2542         node set dependency, but some use context node as default argument, or otherwise use the context.
2543
2544         * xml/XPathFunctions.h: Tweaked style.
2545
2546         * xml/XPathPath.cpp:
2547         (WebCore::XPath::Filter::Filter): A filter is as context node set sensitive as its expression is.
2548         (WebCore::XPath::LocationPath::LocationPath): A location path can only be context node sensitive,
2549         and only if the path relative.
2550         (WebCore::XPath::LocationPath::appendStep): Invoke compile-time Step optimizations.
2551         (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
2552         (WebCore::XPath::Path::Path): A path is as context node set sensitive as its filter is.
2553
2554         * xml/XPathPath.h:
2555         (WebCore::XPath::Filter::resultType): Result type of a filter is the same as of its expression
2556         (useful filters return NodeSets, of course).
2557         (WebCore::XPath::LocationPath::setAbsolute): An absolute location path if context node set
2558         insensitive.
2559         (WebCore::XPath::LocationPath::resultType): A path's result is always a node set.
2560         (WebCore::XPath::Path::resultType): Ditto.
2561
2562         * xml/XPathPredicate.h:
2563         (WebCore::XPath::Number::resultType): Return a proper result type.
2564         (WebCore::XPath::StringExpression::resultType): Ditto.
2565         (WebCore::XPath::Negative::resultType): Ditto.
2566         (WebCore::XPath::NumericOp::resultType): Ditto.
2567         (WebCore::XPath::EqTestOp::resultType): Ditto.
2568         (WebCore::XPath::LogicalOp::resultType): Ditto.
2569         (WebCore::XPath::Union::resultType): Ditto.
2570         (WebCore::XPath::Predicate::isContextPositionSensitive): A predicate can be context position
2571         sensitive even if its expression is not, because e.g. [5] is a shortcut for [position()=5].
2572         (WebCore::XPath::Predicate::isContextSizeSensitive): This matches expression result.
2573
2574         * xml/XPathStep.h:
2575         (WebCore::XPath::Step::NodeTest::Kind): Removed unused ElementNodeTest, which was previously
2576         borrowed from XPath 2.0 to express some optimizations.
2577         (WebCore::XPath::Step::NodeTest::mergedPredicates): To avoid building a huge node set and
2578         filtering it with predicates, we now try to apply predicates while enumerating an axis.
2579         (WebCore::XPath::Step::nodeTest): Expose m_nodeTest.
2580
2581         * xml/XPathStep.cpp:
2582         (WebCore::XPath::Step::~Step): The step owns NodeTest merged predicates, so it is still
2583         possible to copy NodeTests.
2584         (WebCore::XPath::Step::optimize): Merge predicates into NodeTest if possible.
2585         (WebCore::XPath::optimizeStepPair): Optimize some expressions containing "//".
2586         (WebCore::XPath::Step::predicatesAreContextListInsensitive): The above optimization is only
2587         possible if there are no context sensitive predicates for "//".
2588         (WebCore::XPath::Step::evaluate): Track context position for the first merged predicate.
2589         (WebCore::XPath::nodeMatchesBasicTest): Check whether the node matches node test, ignoring
2590         merged predicates.
2591         (WebCore::XPath::nodeMatches): Additionally check merged predicates, and update position.
2592         (WebCore::XPath::Step::nodesInAxis): Check merged predicates in optimized attribute code
2593         path.
2594
2595         * xml/XPathVariableReference.h: (WebCore::XPath::VariableReference::resultType): Variable
2596         references are not used with XPathEvaluator, so we'll only need them if we decide to
2597         reimplement XSLT. The type of variable reference is not known at compile time.
2598
2599 2009-05-31  Sam Weinig  <sam@webkit.org>
2600
2601         Rubber-stamped by Dan Bernstein.
2602
2603         Remove unused JSEventTargetBase.h
2604
2605         * GNUmakefile.am:
2606         * WebCore.vcproj/WebCore.vcproj:
2607         * WebCore.xcodeproj/project.pbxproj:
2608         * bindings/js/JSEventTargetBase.h: Removed.
2609
2610 2009-05-31  Sam Weinig  <sam@webkit.org>
2611
2612         Reviewed by Dan Bernstein.
2613
2614         Part of https://bugs.webkit.org/show_bug.cgi?id=26100
2615         Add missing event handler properties to the DOMWindow
2616
2617         Add missing oncanplay, oncanplaythrough, ondurationchange, onemptied,
2618         onended, onloadeddata, onloadedmetadata, onpause, onplay, onplaying,
2619         onratechange, onseeked, onseeking, ontimeupdate, onvolumechange,
2620         onwaiting, onloadstart, onprogress, onstalled, onsuspend, ondrag,
2621         ondragend, ondragenter, ondragleave, ondragover, ondragstart and 
2622         ondrop event handlers to the DOMWindow.
2623
2624         * page/DOMWindow.cpp:
2625         (WebCore::DOMWindow::ondrag):
2626         (WebCore::DOMWindow::setOndrag):
2627         (WebCore::DOMWindow::ondragend):
2628         (WebCore::DOMWindow::setOndragend):
2629         (WebCore::DOMWindow::ondragenter):
2630         (WebCore::DOMWindow::setOndragenter):
2631         (WebCore::DOMWindow::ondragleave):
2632         (WebCore::DOMWindow::setOndragleave):
2633         (WebCore::DOMWindow::ondragover):
2634         (WebCore::DOMWindow::setOndragover):
2635         (WebCore::DOMWindow::ondragstart):
2636         (WebCore::DOMWindow::setOndragstart):
2637         (WebCore::DOMWindow::ondrop):
2638         (WebCore::DOMWindow::setOndrop):
2639         (WebCore::DOMWindow::oncanplay):
2640         (WebCore::DOMWindow::setOncanplay):
2641         (WebCore::DOMWindow::oncanplaythrough):
2642         (WebCore::DOMWindow::setOncanplaythrough):
2643         (WebCore::DOMWindow::ondurationchange):
2644         (WebCore::DOMWindow::setOndurationchange):
2645         (WebCore::DOMWindow::onemptied):
2646         (WebCore::DOMWindow::setOnemptied):
2647         (WebCore::DOMWindow::onended):
2648         (WebCore::DOMWindow::setOnended):
2649         (WebCore::DOMWindow::onloadeddata):
2650         (WebCore::DOMWindow::setOnloadeddata):
2651         (WebCore::DOMWindow::onloadedmetadata):
2652         (WebCore::DOMWindow::setOnloadedmetadata):
2653         (WebCore::DOMWindow::onpause):
2654         (WebCore::DOMWindow::setOnpause):
2655         (WebCore::DOMWindow::onplay):
2656         (WebCore::DOMWindow::setOnplay):
2657         (WebCore::DOMWindow::onplaying):
2658         (WebCore::DOMWindow::setOnplaying):
2659         (WebCore::DOMWindow::onratechange):
2660         (WebCore::DOMWindow::setOnratechange):
2661         (WebCore::DOMWindow::onseeked):
2662         (WebCore::DOMWindow::setOnseeked):
2663         (WebCore::DOMWindow::onseeking):
2664         (WebCore::DOMWindow::setOnseeking):
2665         (WebCore::DOMWindow::ontimeupdate):
2666         (WebCore::DOMWindow::setOntimeupdate):
2667         (WebCore::DOMWindow::onvolumechange):
2668         (WebCore::DOMWindow::setOnvolumechange):
2669         (WebCore::DOMWindow::onwaiting):
2670         (WebCore::DOMWindow::setOnwaiting):
2671         (WebCore::DOMWindow::onloadstart):
2672         (WebCore::DOMWindow::setOnloadstart):
2673         (WebCore::DOMWindow::onprogress):
2674         (WebCore::DOMWindow::setOnprogress):
2675         (WebCore::DOMWindow::onstalled):
2676         (WebCore::DOMWindow::setOnstalled):
2677         (WebCore::DOMWindow::onsuspend):
2678         (WebCore::DOMWindow::setOnsuspend):
2679         * page/DOMWindow.h:
2680         * page/DOMWindow.idl:
2681
2682 2009-05-31  Sam Weinig  <sam@webkit.org>
2683
2684         Reviewed by Anders Carlsson.
2685
2686         Part of https://bugs.webkit.org/show_bug.cgi?id=26100
2687         Add missing event handler properties to the DOMWindow
2688
2689         Add missing onstorage event handler to the DOMWindow.
2690
2691         * page/DOMWindow.cpp:
2692         (WebCore::DOMWindow::onstorage):
2693         (WebCore::DOMWindow::setOnstorage):
2694         * page/DOMWindow.h:
2695         * page/DOMWindow.idl:
2696
2697 2009-05-30  Sam Weinig  <sam@webkit.org>
2698
2699         Reviewed by Mark Rowe.
2700
2701         Fix for https://bugs.webkit.org/show_bug.cgi?id=26110
2702         Update online/offline events to match the current spec.
2703         - Also adds window.ononline and window.onoffline event handler
2704           properties.
2705
2706         * page/DOMWindow.cpp:
2707         (WebCore::DOMWindow::onoffline):
2708         (WebCore::DOMWindow::setOnoffline):
2709         (WebCore::DOMWindow::ononline):
2710         (WebCore::DOMWindow::setOnonline):
2711         * page/DOMWindow.h:
2712         * page/DOMWindow.idl:
2713         * page/Page.cpp:
2714         (WebCore::networkStateChanged):
2715
2716 2009-05-31  Dirk Schulze  <krit@webkit.org>
2717
2718         Reviewed by Nikolas Zimmermann.
2719
2720         WebKit needs cross-platform filter system
2721         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2722
2723         Make use of the new filter system in WebCore for SVG. Deleted Mac bindings
2724         and replace it by a platform independent code. Calculation of subRegions
2725         is missing but needed for a first filter effect.
2726
2727         * GNUmakefile.am:
2728         * WebCore.pro:
2729         * WebCore.vcproj/WebCore.vcproj:
2730         * WebCore.xcodeproj/project.pbxproj:
2731         * platform/graphics/filters/Filter.h:
2732         (WebCore::Filter::~Filter):
2733         (WebCore::Filter::setSourceImage):
2734         * rendering/SVGRenderSupport.cpp:
2735         (WebCore::SVGRenderBase::prepareToRenderSVGContent):
2736         (WebCore::SVGRenderBase::finishRenderSVGContent):
2737         * svg/FilterBuilder.h:
2738         (WebCore::FilterBuilder::lastEffect):
2739         * svg/SVGFEBlendElement.cpp:
2740         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
2741         (WebCore::SVGFEBlendElement::build):
2742         * svg/SVGFEBlendElement.h:
2743         * svg/SVGFEColorMatrixElement.cpp:
2744         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
2745         (WebCore::SVGFEColorMatrixElement::build):
2746         * svg/SVGFEColorMatrixElement.h:
2747         * svg/SVGFEComponentTransferElement.cpp:
2748         (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
2749         (WebCore::SVGFEComponentTransferElement::build):
2750         * svg/SVGFEComponentTransferElement.h:
2751         * svg/SVGFECompositeElement.cpp:
2752         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
2753         (WebCore::SVGFECompositeElement::build):
2754         * svg/SVGFECompositeElement.h:
2755         * svg/SVGFEDiffuseLightingElement.cpp:
2756         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
2757         (WebCore::SVGFEDiffuseLightingElement::build):
2758         * svg/SVGFEDiffuseLightingElement.h:
2759         * svg/SVGFEDisplacementMapElement.cpp:
2760         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
2761         (WebCore::SVGFEDisplacementMapElement::build):
2762         * svg/SVGFEDisplacementMapElement.h:
2763         * svg/SVGFEFloodElement.cpp:
2764         (WebCore::SVGFEFloodElement::SVGFEFloodElement):
2765         (WebCore::SVGFEFloodElement::build):
2766         * svg/SVGFEFloodElement.h:
2767         * svg/SVGFEGaussianBlurElement.cpp:
2768         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2769         (WebCore::SVGFEGaussianBlurElement::build):
2770         * svg/SVGFEGaussianBlurElement.h:
2771         * svg/SVGFEImageElement.cpp:
2772         (WebCore::SVGFEImageElement::SVGFEImageElement):
2773         (WebCore::SVGFEImageElement::notifyFinished):
2774         (WebCore::SVGFEImageElement::build):
2775         * svg/SVGFEImageElement.h:
2776         * svg/SVGFEMergeElement.cpp:
2777         (WebCore::SVGFEMergeElement::SVGFEMergeElement):
2778         (WebCore::SVGFEMergeElement::build):
2779         * svg/SVGFEMergeElement.h:
2780         * svg/SVGFEOffsetElement.cpp:
2781         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
2782         (WebCore::SVGFEOffsetElement::build):
2783         * svg/SVGFEOffsetElement.h:
2784         * svg/SVGFESpecularLightingElement.cpp:
2785         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
2786         (WebCore::SVGFESpecularLightingElement::build):
2787         * svg/SVGFESpecularLightingElement.h:
2788         * svg/SVGFETileElement.cpp:
2789         (WebCore::SVGFETileElement::SVGFETileElement):
2790         (WebCore::SVGFETileElement::build):
2791         * svg/SVGFETileElement.h:
2792         * svg/SVGFETurbulenceElement.cpp:
2793         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
2794         (WebCore::SVGFETurbulenceElement::build):
2795         * svg/SVGFETurbulenceElement.h:
2796         * svg/SVGFilterElement.cpp:
2797         (WebCore::SVGFilterElement::canvasResource):
2798         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2799         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
2800         * svg/SVGFilterPrimitiveStandardAttributes.h:
2801         (WebCore::SVGFilterPrimitiveStandardAttributes::contextElement):
2802         * svg/graphics/SVGResourceFilter.cpp:
2803         (WebCore::SVGResourceFilter::SVGResourceFilter):
2804         (WebCore::SVGResourceFilter::addFilterEffect):
2805         (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
2806         (WebCore::SVGResourceFilter::prepareFilter):
2807         (WebCore::SVGResourceFilter::applyFilter):
2808         (WebCore::SVGResourceFilter::externalRepresentation):
2809         * svg/graphics/SVGResourceFilter.h:
2810         (WebCore::SVGResourceFilter::filterBoundingBox):
2811         (WebCore::SVGResourceFilter::setFilterBoundingBox):
2812         (WebCore::SVGResourceFilter::itemBoundingBox):
2813         (WebCore::SVGResourceFilter::setItemBoundingBox):
2814         (WebCore::SVGResourceFilter::builder):
2815
2816 2009-05-31  Dirk Schulze  <krit@webkit.org>
2817
2818         Reviewed by Nikolas Zimmermann.
2819
2820         WebKit needs cross-platform filter system
2821         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2822
2823         Adding 'in1' attribute support for <feFlood>, as specified in SVG 1.1.
2824         This change helps creating test cases, once filters are activated.
2825
2826         * svg/SVGFEFloodElement.cpp:
2827         (WebCore::SVGFEFloodElement::SVGFEFloodElement):
2828         (WebCore::SVGFEFloodElement::parseMappedAttribute):
2829         (WebCore::SVGFEFloodElement::build):
2830         * svg/SVGFEFloodElement.h:
2831         * svg/SVGFEFloodElement.idl:
2832         * svg/graphics/filters/SVGFEFlood.cpp:
2833         (WebCore::FEFlood::FEFlood):
2834         (WebCore::FEFlood::create):
2835         * svg/graphics/filters/SVGFEFlood.h:
2836
2837 2009-05-31  Dirk Schulze  <krit@webkit.org>
2838
2839         Reviewed by Nikolas Zimmermann.
2840
2841         WebKit needs cross-platform filter system
2842         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2843
2844         Replace all occurrences of SVGResourceFilter by Filter. This is the last 
2845         step for a SVG independent filter system. Every other part of WebCore can
2846         use the filter system by creating a new Filter object.
2847
2848         * GNUmakefile.am:
2849         * WebCore.pro:
2850         * WebCore.xcodeproj/project.pbxproj:
2851         * platform/graphics/filters/FEBlend.cpp:
2852         (WebCore::FEBlend::apply):
2853         * platform/graphics/filters/FEBlend.h:
2854         * platform/graphics/filters/FEColorMatrix.cpp:
2855         (WebCore::FEColorMatrix::apply):
2856         * platform/graphics/filters/FEColorMatrix.h:
2857         * platform/graphics/filters/FEComponentTransfer.cpp:
2858         (WebCore::FEComponentTransfer::apply):
2859         * platform/graphics/filters/FEComponentTransfer.h:
2860         * platform/graphics/filters/FEComposite.cpp:
2861         (WebCore::FEComposite::apply):
2862         * platform/graphics/filters/FEComposite.h:
2863         * platform/graphics/filters/Filter.h: Added.
2864         (WebCore::Filter::setSourceImage):
2865         (WebCore::Filter::sourceImage):
2866         * platform/graphics/filters/FilterEffect.h:
2867         * platform/graphics/filters/SourceAlpha.cpp:
2868         (WebCore::SourceAlpha::apply):
2869         * platform/graphics/filters/SourceAlpha.h:
2870         * platform/graphics/filters/SourceGraphic.cpp:
2871         (WebCore::SourceGraphic::apply):
2872         * platform/graphics/filters/SourceGraphic.h:
2873         * svg/Filter.cpp: Removed.
2874         * svg/Filter.h: Removed.
2875         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
2876         (WebCore::FEConvolveMatrix::apply):
2877         * svg/graphics/filters/SVGFEConvolveMatrix.h:
2878         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
2879         (WebCore::FEDiffuseLighting::apply):
2880         * svg/graphics/filters/SVGFEDiffuseLighting.h:
2881         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
2882         (WebCore::FEDisplacementMap::apply):
2883         * svg/graphics/filters/SVGFEDisplacementMap.h:
2884         * svg/graphics/filters/SVGFEFlood.cpp:
2885         (WebCore::FEFlood::apply):
2886         * svg/graphics/filters/SVGFEFlood.h:
2887         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
2888         (WebCore::FEGaussianBlur::apply):
2889         * svg/graphics/filters/SVGFEGaussianBlur.h:
2890         * svg/graphics/filters/SVGFEImage.cpp:
2891         (WebCore::FEImage::apply):
2892         * svg/graphics/filters/SVGFEImage.h:
2893         * svg/graphics/filters/SVGFEMerge.cpp:
2894         (WebCore::FEMerge::apply):
2895         * svg/graphics/filters/SVGFEMerge.h:
2896         * svg/graphics/filters/SVGFEMorphology.cpp:
2897         (WebCore::FEMorphology::apply):
2898         * svg/graphics/filters/SVGFEMorphology.h:
2899         * svg/graphics/filters/SVGFEOffset.cpp:
2900         (WebCore::FEOffset::apply):
2901         * svg/graphics/filters/SVGFEOffset.h:
2902         * svg/graphics/filters/SVGFESpecularLighting.cpp:
2903         (WebCore::FESpecularLighting::apply):
2904         * svg/graphics/filters/SVGFESpecularLighting.h:
2905         * svg/graphics/filters/SVGFETile.cpp:
2906         (WebCore::FETile::apply):
2907         * svg/graphics/filters/SVGFETile.h:
2908         * svg/graphics/filters/SVGFETurbulence.cpp:
2909         (WebCore::FETurbulence::apply):
2910         * svg/graphics/filters/SVGFETurbulence.h:
2911         * svg/graphics/filters/SVGFilter.cpp: Added.
2912         (WebCore::SVGFilter::SVGFilter):
2913         (WebCore::SVGFilter::calculateEffectSubRegion):
2914         (WebCore::SVGFilter::create):
2915         * svg/graphics/filters/SVGFilter.h: Added.
2916
2917 2009-05-30  Kevin Ollivier  <kevino@theolliviers.com>
2918
2919         Build fix for platforms without plugins support.
2920
2921         * plugins/PluginViewNone.cpp:
2922         (WebCore::PluginView::userAgentStatic):
2923         (WebCore::PluginView::getValueStatic):
2924
2925 2009-05-30  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2926
2927         Reviewed by Darin Adler.
2928
2929         Fixes: https://bugs.webkit.org/show_bug.cgi?id=25979
2930
2931         Fix regression, local WML files won't load anymore, as the mimetype isn't correctly detected.    
2932         Bug filed at <rdar://problem/6917571> to cover this CFNetwork limitation.
2933
2934         * platform/network/mac/ResourceHandleMac.mm:
2935         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
2936
2937 2009-05-29  Sam Weinig  <sam@webkit.org>
2938
2939         Reviewed by Anders Carlsson.
2940
2941         Fix for https://bugs.webkit.org/show_bug.cgi?id=26091
2942         Make storage events match the current spec.
2943         - Storage event listeners are added to the window.
2944         - Storage events are dispatched to the window.
2945
2946         Updated existing tests.
2947
2948         * dom/Document.cpp:
2949         (WebCore::Document::dispatchWindowEvent):
2950         * dom/Document.h:
2951         * dom/Node.cpp:
2952         * dom/Node.h:
2953         * html/HTMLBodyElement.cpp:
2954         (WebCore::HTMLBodyElement::parseMappedAttribute):
2955         * storage/LocalStorageArea.cpp:
2956         (WebCore::LocalStorageArea::dispatchStorageEvent):
2957         * storage/SessionStorageArea.cpp:
2958         (WebCore::SessionStorageArea::dispatchStorageEvent):
2959
2960 2009-05-30  Darin Adler  <darin@apple.com>
2961
2962         Reviewed by Adele Peterson.
2963
2964         Bug 26097: REGRESSION (r44283): Tab key doesn't work when focus is on a <select> element
2965
2966         Test: fast/forms/focus-control-to-page.html
2967
2968         * dom/SelectElement.h: Made destructor protected. Tweaked a bit.
2969
2970         * html/HTMLSelectElement.cpp: Removed unneeded includes.
2971         (WebCore::HTMLSelectElement::remove): Removed unneeded range check of the
2972         result of optionToListIndex.
2973         (WebCore::HTMLSelectElement::parseMappedAttribute): Removed code to set the
2974         unused attribute, m_minwidth.
2975         (WebCore::HTMLSelectElement::defaultEventHandler): The actual bug fix.
2976         Call through to the base class defaultEventHandler if the event hasn't
2977         been handled yet.
2978
2979         * html/HTMLSelectElement.h: Removed unneeded includes. Made a lot more functions
2980         private. Removed unused minWidth function and m_minwidth data member.
2981
2982 2009-05-30  Fridrich Strba  <fridrich.strba@bluewin.ch>
2983
2984         Reviewed by Holger Freyther.
2985
2986         The two KeyboardCodes.h files are basically identical and the
2987         qt one is properly #ifdef-ed for different win32 systems. Share
2988         them between Qt and Gtk implementations.
2989
2990         * GNUmakefile.am:
2991         * platform/KeyboardCodes.h: Copied from WebCore/platform/qt/KeyboardCodes.h.
2992         * platform/gtk/KeyboardCodes.h: Removed.
2993         * platform/qt/KeyboardCodes.h: Removed.
2994
2995 2009-05-30  Jeremy Orlow  <jorlow@chromium.org>
2996
2997         Reviewed by Sam Weinig.
2998
2999         LocalStorage and SessionStorage's implicit setters do not correctly 
3000         handle null.  The custom JS bindings should convert to strings
3001         unconditionally and not try to handle null specially.
3002         https://bugs.webkit.org/show_bug.cgi?id=25970
3003
3004         Tests: storage/domstorage/localstorage/string-conversion.html
3005                storage/domstorage/sessionstorage/string-conversion.html
3006
3007         * bindings/js/JSStorageCustom.cpp:
3008         (WebCore::JSStorage::customPut):
3009
3010 2009-05-30  Dan Bernstein  <mitz@apple.com>
3011
3012         Reviewed by Darin Adler.
3013
3014         - fix <rdar://problem/6935192> REGRESSION (Safari 3-TOT): Scroll
3015           bars in key window draw as inactive if the WebView is not active
3016
3017         Test: platform/mac/scrollbars/key-window-not-first-responder.html
3018
3019         * platform/mac/ScrollbarThemeMac.mm:
3020         (WebCore::ScrollbarThemeMac::paint): Use the window's key state instead
3021         of the WebView's first responder state to switch between active and
3022         inactive state.
3023
3024 2009-05-30  Dan Bernstein  <mitz@apple.com>
3025
3026         Reviewed by Simon Fraser.
3027
3028         - fix https://bugs.webkit.org/show_bug.cgi?id=18445
3029           <rdar://problem/5931174> Assertion failure in CSSGradientValue::image
3030           with -webkit-gradient as body's background
3031
3032         Test: fast/backgrounds/body-generated-image-propagated-to-root.html
3033
3034         * rendering/RenderBoxModelObject.cpp:
3035         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Check if this
3036         is the root element painting a background layer propagated from the
3037         body, and if it is, use the body's renderer as the client to
3038         StyleImage::image().
3039
3040 2009-05-30  Holger Hans Peter Freyther  <zecke@selfish.org>
3041
3042         Unreviewed build fix for AXObjectCache.
3043
3044         For !HAVE(ACCESSIBILITY) postNotification was defined twice. Move
3045         that into the #ifdef.
3046
3047         * accessibility/AXObjectCache.cpp:
3048
3049 2009-05-29  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3050
3051         Reviewed by George Staikos.
3052
3053         Fixes: https://bugs.webkit.org/show_bug.cgi?id=26072
3054
3055         Add support for the last missing WML element: <select>. This patch adds WMLSelectElement, providing
3056         the same functionality HTMLSelectElement has. The WML specific features will follow soon.
3057     
3058         Add simple testcase covering <select> element rendering: fast/wml/select.wml
3059
3060         * GNUmakefile.am:
3061         * WebCore.pro:
3062         * WebCore.vcproj/WebCore.vcproj:
3063         * WebCore.xcodeproj/project.pbxproj:
3064         * dom/OptionElement.cpp:
3065         (WebCore::OptionElement::optionIndex):
3066         (WebCore::isOptionElement):
3067         * dom/OptionElement.h:
3068         * dom/OptionGroupElement.cpp:
3069         (WebCore::isOptionGroupElement):
3070         * dom/OptionGroupElement.h:
3071         * dom/SelectElement.cpp:
3072         (WebCore::SelectElement::accessKeySetSelectedIndex):
3073         (WebCore::toSelectElement):
3074         * dom/SelectElement.h:
3075         * html/HTMLOptionElement.cpp:
3076         (WebCore::HTMLOptionElement::index):
3077         * html/HTMLSelectElement.cpp:
3078         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3079         * rendering/RenderListBox.cpp:
3080         (WebCore::RenderListBox::paintItemForeground):
3081         * rendering/RenderMenuList.cpp:
3082         (WebCore::RenderMenuList::itemIsEnabled):
3083         (WebCore::RenderMenuList::itemIsLabel):
3084         * wml/WMLFormControlElement.cpp:
3085         (WebCore::WMLFormControlElement::attach):
3086         (WebCore::WMLFormControlElement::recalcStyle):
3087         * wml/WMLFormControlElement.h:
3088         * wml/WMLInputElement.cpp:
3089         (WebCore::WMLInputElement::attach):
3090         * wml/WMLOptGroupElement.cpp:
3091         (WebCore::WMLOptGroupElement::insertBefore):
3092         (WebCore::WMLOptGroupElement::replaceChild):
3093         (WebCore::WMLOptGroupElement::removeChild):
3094         (WebCore::WMLOptGroupElement::appendChild):
3095         (WebCore::WMLOptGroupElement::removeChildren):
3096         (WebCore::ownerSelectElement):
3097         (WebCore::WMLOptGroupElement::accessKeyAction):
3098         (WebCore::WMLOptGroupElement::childrenChanged):
3099         (WebCore::WMLOptGroupElement::parseMappedAttribute):
3100         (WebCore::WMLOptGroupElement::attach):
3101         (WebCore::WMLOptGroupElement::detach):
3102         (WebCore::WMLOptGroupElement::recalcSelectOptions):
3103         * wml/WMLOptionElement.cpp:
3104         (WebCore::ownerSelectElement):
3105         (WebCore::WMLOptionElement::accessKeyAction):
3106         (WebCore::WMLOptionElement::childrenChanged):
3107         (WebCore::WMLOptionElement::parseMappedAttribute):
3108         (WebCore::WMLOptionElement::attach):
3109         (WebCore::WMLOptionElement::detach):
3110         (WebCore::WMLOptionElement::insertedIntoDocument):
3111         * wml/WMLSelectElement.cpp: Added.
3112         (WebCore::WMLSelectElement::WMLSelectElement):
3113         (WebCore::WMLSelectElement::~WMLSelectElement):
3114         (WebCore::WMLSelectElement::formControlType):
3115         (WebCore::WMLSelectElement::isKeyboardFocusable):
3116         (WebCore::WMLSelectElement::isMouseFocusable):
3117         (WebCore::WMLSelectElement::selectAll):
3118         (WebCore::WMLSelectElement::recalcStyle):
3119         (WebCore::WMLSelectElement::dispatchFocusEvent):
3120         (WebCore::WMLSelectElement::dispatchBlurEvent):
3121         (WebCore::WMLSelectElement::selectedIndex):
3122         (WebCore::WMLSelectElement::setSelectedIndex):
3123         (WebCore::WMLSelectElement::saveFormControlState):
3124         (WebCore::WMLSelectElement::restoreFormControlState):
3125         (WebCore::WMLSelectElement::childrenChanged):
3126         (WebCore::WMLSelectElement::parseMappedAttribute):
3127         (WebCore::WMLSelectElement::createRenderer):
3128         (WebCore::WMLSelectElement::appendFormData):
3129         (WebCore::WMLSelectElement::optionToListIndex):
3130         (WebCore::WMLSelectElement::listToOptionIndex):
3131         (WebCore::WMLSelectElement::reset):
3132         (WebCore::WMLSelectElement::defaultEventHandler):
3133         (WebCore::WMLSelectElement::accessKeyAction):
3134         (WebCore::WMLSelectElement::setActiveSelectionAnchorIndex):
3135         (WebCore::WMLSelectElement::setActiveSelectionEndIndex):
3136         (WebCore::WMLSelectElement::updateListBoxSelection):
3137         (WebCore::WMLSelectElement::listBoxOnChange):
3138         (WebCore::WMLSelectElement::menuListOnChange):
3139         (WebCore::WMLSelectElement::activeSelectionStartListIndex):
3140         (WebCore::WMLSelectElement::activeSelectionEndListIndex):
3141         (WebCore::WMLSelectElement::accessKeySetSelectedIndex):
3142         (WebCore::WMLSelectElement::setRecalcListItems):
3143         (WebCore::WMLSelectElement::scrollToSelection):
3144         (WebCore::WMLSelectElement::insertedIntoTree):
3145         * wml/WMLSelectElement.h: Added.
3146         (WebCore::WMLSelectElement::canSelectAll):
3147         (WebCore::WMLSelectElement::canStartSelection):
3148         (WebCore::WMLSelectElement::size):
3149         (WebCore::WMLSelectElement::multiple):
3150         (WebCore::WMLSelectElement::listItems):
3151         * wml/WMLTagNames.in:
3152
3153 2009-05-29  David Levin  <levin@chromium.org>
3154
3155         Reviewed by NOBODY (build fix for windows).
3156
3157         http://trac.webkit.org/changeset/44279 left in a "Vector<WCHAR> localeNameBuf"
3158         that it was trying to replace.  Resulting in this variable being defined twice (and
3159         the second time incorrectly).
3160
3161         * platform/win/Language.cpp:
3162         (WebCore::localeInfo):
3163
3164 2009-05-29  Takeshi Yoshino  <tyoshino@google.com>
3165
3166         Reviewed by Darin Alder.
3167
3168         https://bugs.webkit.org/show_bug.cgi?id=26018
3169
3170         Fix behavior of the Element View of the Web Inspector for double
3171         clicking the element outline tree.
3172
3173         Double clicking the element outline tree should
3174         1) on attribute: enter attribute editing mode
3175         2) on text: enter text editing mode
3176         3) otherwise: change root node to the parent element of double clicked
3177            element.
3178
3179         Now, 3) is broken. For example, clicking <html> clears the element
3180         outline view.
3181
3182         rootDOMNode should be updated to this.representedObject.parentNode, not
3183         this.parent.representedObject which is parent inside the element
3184         outline tree itself.
3185
3186         * inspector/front-end/ElementsTreeOutline.js:
3187         (WebInspector.ElementsTreeElement.prototype.ondblclick):
3188
3189 2009-05-29  David Moore  <davemoore@google.com>
3190
3191         Reviewed by Darin Alder.
3192
3193         https://bugs.webkit.org/show_bug.cgi?id=26001
3194         Change many of the uses of String::adopt() to String::createUninitialized().
3195         This allows those strings to use an inlined buffer for their characters.
3196
3197         * dom/StyleElement.cpp:
3198         Loop over nodes to precompute length of string and then
3199         write the characters into the allocated inline buffer
3200         (WebCore::StyleElement::process):
3201         * dom/Text.cpp:
3202         Loop over nodes to precompute length of string and then
3203         write the characters into the allocated inline buffer
3204         (WebCore::Text::wholeText):
3205         (WebCore::Text::rendererIsNeeded):
3206         (WebCore::Text::createRenderer):
3207         (WebCore::Text::createWithLengthLimit):
3208         (WebCore::Text::formatForDebugger):
3209         * platform/text/String.cpp:
3210         (WebCore::String::append):
3211         (WebCore::String::insert):
3212         (WebCore::String::truncate):
3213         (WebCore::String::remove):
3214         * platform/text/StringBuilder.cpp:
3215         (WebCore::StringBuilder::toString):
3216         * platform/text/StringImpl.cpp:
3217         (WebCore::StringImpl::lower):
3218         (WebCore::StringImpl::upper):
3219         (WebCore::StringImpl::secure):
3220         (WebCore::StringImpl::foldCase):
3221         (WebCore::StringImpl::replace):
3222         * platform/text/TextCodecLatin1.cpp:
3223         (WebCore::TextCodecLatin1::decode):
3224         * platform/text/TextCodecUserDefined.cpp:
3225         (WebCore::TextCodecUserDefined::decode):
3226         * platform/win/Language.cpp:
3227         (WebCore::localeInfo):
3228
3229 2009-05-29  Takeshi Yoshino  <tyoshino@google.com>
3230
3231         Reviewed by Darin Alder.
3232
3233         Bug 25911: Apply href in base elements to anchors shown on the source viewer
3234         https://bugs.webkit.org/show_bug.cgi?id=25911
3235
3236         In rendering HTML sources, parse base elements to apply the base URI to
3237         anchors shown on the source viewer.
3238
3239         This issue was originally reported to the Chromium issue tracker.
3240         http://code.google.com/p/chromium/issues/detail?id=2418
3241
3242         Test: fast/frames/viewsource-link-on-href-value.html
3243
3244         * html/HTMLViewSourceDocument.cpp:
3245         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
3246
3247 2009-05-29  Rob Buis  <rwlbuis@gmail.com>
3248
3249         Reviewed by David Hyatt.
3250
3251         https://bugs.webkit.org/show_bug.cgi?id=22429
3252         document.styleSheets collection ignores media=presentation
3253
3254         Ensure that stylesheets though <link> show up in document.styleSheets regardless of media attribute.
3255
3256         Test: fast/css/sheet-collection-link.html
3257
3258         * html/HTMLLinkElement.cpp:
3259         (WebCore::HTMLLinkElement::process):
3260
3261 2009-05-29  Jian Li  <jianli@chromium.org>
3262
3263         Reviewed by Dimitri Glazkov.
3264
3265         https://bugs.webkit.org/show_bug.cgi?id=26069
3266         Fix a crash in custom V8 bindings code for XMLHttpRequest.
3267
3268         Test: fast/xmlhttprequest/xmlhttprequest-open-after-iframe-onload-remove-self.html
3269
3270         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3271         (WebCore::CALLBACK_FUNC_DECL):
3272
3273 2009-05-29  David Levin  <levin@chromium.org>
3274
3275         Reviewed by Darin Adler.
3276
3277         Bug 26074: SQLTransaction::executeSQL does an unnecessary call to String::copy.
3278         https://bugs.webkit.org/show_bug.cgi?id=26074
3279
3280         The constructor for SQLStatement already does a copy for this string.
3281
3282         * storage/SQLTransaction.cpp:
3283         (WebCore::SQLTransaction::executeSQL):
3284
3285 2009-05-29  Darin Adler  <darin@apple.com>
3286
3287         Fix build; the new Cairo code compiled on Windows only.
3288
3289         * platform/graphics/gtk/FontPlatformData.h: Added syntheticBold
3290         and syntheticOblique functions as in the Windows version to make it
3291         easier to use this cross-platform. Later we can make data members
3292         private as in the Windows version.
3293         * platform/graphics/mac/FontPlatformData.h: Ditto.
3294
3295 2009-05-29  Alexander Macdonald  <alexmac@adobe.com>
3296
3297         Reviewed by Darin Adler.
3298
3299         Added support for synthetic bold/oblique font rendering
3300         on platforms that use cairo.
3301
3302         * platform/graphics/SimpleFontData.h:
3303         * platform/graphics/cairo/FontCairo.cpp:
3304         (WebCore::Font::drawGlyphs):
3305         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
3306         (WebCore::SimpleFontData::platformInit):
3307         * platform/graphics/gtk/SimpleFontDataPango.cpp:
3308         (WebCore::SimpleFontData::platformInit):
3309         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3310         (WebCore::SimpleFontData::platformInit):
3311
3312 2009-05-29  Chris Fleizach  <cfleizach@apple.com>
3313
3314         Reviewed by Beth Dakin.
3315
3316         Bug 26024: AX: possible to fail assertion because AXPostNotification calls accessibilityIsIgnored
3317         https://bugs.webkit.org/show_bug.cgi?id=26024
3318
3319         AX notifications are posted after a one shot timer so that notifications are not performed mid-layout.
3320         Consolidated postNotification and postNotificationToElement into one method.
3321
3322         * accessibility/AXObjectCache.cpp:
3323         (WebCore::AXObjectCache::AXObjectCache):
3324         (WebCore::AXObjectCache::notificationPostTimerFired):
3325         (WebCore::AXObjectCache::postNotification):
3326         (WebCore::AXObjectCache::selectedChildrenChanged):
3327         * accessibility/AXObjectCache.h:
3328         (WebCore::AXObjectCache::postNotification):
3329         (WebCore::AXObjectCache::postPlatformNotification):
3330         * accessibility/AccessibilityRenderObject.cpp:
3331         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
3332         * accessibility/chromium/AXObjectCacheChromium.cpp:
3333         (WebCore::AXObjectCache::postPlatformNotification):
3334         * accessibility/gtk/AXObjectCacheAtk.cpp:
3335         (WebCore::AXObjectCache::postPlatformNotification):
3336         * accessibility/mac/AXObjectCacheMac.mm:
3337         (WebCore::AXObjectCache::postPlatformNotification):
3338         * accessibility/win/AXObjectCacheWin.cpp:
3339         (WebCore::AXObjectCache::postPlatformNotification):
3340         * dom/Document.cpp:
3341         (WebCore::Document::implicitClose):
3342         * editing/Editor.cpp:
3343         (WebCore::Editor::respondToChangedContents):
3344         * editing/mac/SelectionControllerMac.mm:
3345         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
3346         * page/FrameView.cpp:
3347         (WebCore::FrameView::layout):
3348         * rendering/RenderTextControl.cpp:
3349         (WebCore::RenderTextControl::setInnerTextValue):
3350
3351 2009-05-29  Brent Fulgham  <bfulgham@webkit.org>
3352
3353         Reviewed by Adam Roben.
3354
3355         Build fix for Windows Cairo target.
3356         https://bugs.webkit.org/show_bug.cgi?id=25972
3357
3358         Compiler mistakenly selects SMILTime min/max instead of STL version,
3359         resulting in a build error.  This change makes the meaning of the
3360         min/max explicit and avoids the problem.
3361
3362         * html/TimeRanges.h:
3363         (WebCore::TimeRanges::Range::unionWithOverlappingOrContiguousRange):
3364
3365 2009-05-29  Gustavo Noronha Silva  <gns@gnome.org>
3366
3367         Reviewed by Jan Alonzo.
3368
3369         Make SoupMessage a member of ResourceRequest, instead of creating
3370         it in startHttp. Implement updating of ResourceRequest from
3371         SoupMessage, and vice versa.
3372
3373         * GNUmakefile.am:
3374         * platform/network/soup/ResourceHandleSoup.cpp:
3375         (WebCore::ResourceHandle::~ResourceHandle):
3376         (WebCore::gotHeadersCallback):
3377         (WebCore::ResourceHandle::startHttp):
3378         * platform/network/soup/ResourceRequest.h:
3379         (WebCore::ResourceRequest::ResourceRequest):
3380         (WebCore::ResourceRequest::~ResourceRequest):
3381         * platform/network/soup/ResourceRequestSoup.cpp: Added.
3382         (WTF::SoupURI):
3383         (WebCore::ResourceRequest::soupMessage):
3384         (WebCore::ResourceRequest::ResourceRequest):
3385         (WebCore::ResourceRequest::doUpdateResourceRequest):
3386         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3387
3388 2009-05-28  Dmitry Titov  <dimich@chromium.org>
3389
3390         Reviewed by Dimitri Glazkov.
3391
3392         https://bugs.webkit.org/show_bug.cgi?id=26068
3393         V8: Remove the remaining b8::Locker usage in worker code.
3394         This completes the fix for https://bugs.webkit.org/show_bug.cgi?id=25944,
3395         since the patches for enabling timers and that bug have "crossed in the queue".
3396         Existing LayoutTests/fast/workers/worker-timeout.html covers this fix (will start work in Chromium).
3397
3398         * bindings/v8/ScheduledAction.cpp:
3399         (WebCore::ScheduledAction::execute):
3400
3401 2009-05-28  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3402
3403         Reviewed by Xan Lopez.
3404
3405         Simplify the Accept-Encoding header we are sending out, for it
3406         seems some servers do not enjoy parsing the full, explicit
3407         version.
3408
3409         * platform/network/soup/ResourceHandleSoup.cpp:
3410         (WebCore::ResourceHandle::startHttp):
3411
3412 2009-05-28  Dirk Schulze  <krit@webkit.org>
3413
3414         Reviewed by Nikolas Zimmermann.
3415
3416         Added a new build flag --filters. This replaces the old --svg-filters and enables
3417         other parts of WebKit to use some basic filters of platform/graphics/filters if needed.
3418         This patch also fixes a bug in dom/DOMImplementation.cpp where we used SVG_FILTER. This flag
3419         doesn't exist and was replaced by FILTERS as well as all SVG_FILTERS occurrences.
3420         Filters are not working yet. This patch is just a preperation. Filters are deactivated by
3421         default. 
3422
3423         * Configurations/FeatureDefines.xcconfig:
3424         * DerivedSources.make:
3425         * GNUmakefile.am:
3426         * WebCore.pro:
3427         * bindings/objc/DOM.mm:
3428         (WebCore::createElementClassMap):
3429         * dom/DOMImplementation.cpp:
3430         (WebCore::isSVG10Feature):
3431         (WebCore::isSVG11Feature):
3432         * page/DOMWindow.idl:
3433         * platform/graphics/filters/FEBlend.cpp:
3434         * platform/graphics/filters/FEBlend.h:
3435         * platform/graphics/filters/FEColorMatrix.cpp:
3436         * platform/graphics/filters/FEColorMatrix.h:
3437         * platform/graphics/filters/FEComponentTransfer.cpp:
3438         * platform/graphics/filters/FEComponentTransfer.h:
3439         * platform/graphics/filters/FEComposite.cpp:
3440         * platform/graphics/filters/FEComposite.h:
3441         * platform/graphics/filters/FilterEffect.cpp:
3442         * platform/graphics/filters/FilterEffect.h:
3443         * platform/graphics/filters/SourceAlpha.cpp:
3444         * platform/graphics/filters/SourceAlpha.h:
3445         * platform/graphics/filters/SourceGraphic.cpp:
3446         * platform/graphics/filters/SourceGraphic.h:
3447         * rendering/RenderSVGContainer.cpp:
3448         (WebCore::RenderSVGContainer::selfWillPaint):
3449         * rendering/RenderSVGModelObject.cpp:
3450         * rendering/RenderSVGRoot.cpp:
3451         (WebCore::RenderSVGRoot::selfWillPaint):
3452         * rendering/SVGRenderSupport.cpp:
3453         (WebCore::SVGRenderBase::prepareToRenderSVGContent):
3454         (WebCore::SVGRenderBase::finishRenderSVGContent):
3455         (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
3456         * svg/Filter.cpp:
3457         * svg/Filter.h:
3458         * svg/FilterBuilder.cpp:
3459         * svg/FilterBuilder.h:
3460         * svg/SVGComponentTransferFunctionElement.cpp:
3461         * svg/SVGComponentTransferFunctionElement.h:
3462         * svg/SVGComponentTransferFunctionElement.idl:
3463         * svg/SVGFEBlendElement.cpp:
3464         * svg/SVGFEBlendElement.h:
3465         * svg/SVGFEBlendElement.idl:
3466         * svg/SVGFEColorMatrixElement.cpp:
3467         * svg/SVGFEColorMatrixElement.h:
3468         * svg/SVGFEColorMatrixElement.idl:
3469         * svg/SVGFEComponentTransferElement.cpp:
3470         * svg/SVGFEComponentTransferElement.h:
3471         * svg/SVGFEComponentTransferElement.idl:
3472         * svg/SVGFECompositeElement.cpp:
3473         * svg/SVGFECompositeElement.h:
3474         * svg/SVGFECompositeElement.idl:
3475         * svg/SVGFEDiffuseLightingElement.cpp:
3476         * svg/SVGFEDiffuseLightingElement.h:
3477         * svg/SVGFEDiffuseLightingElement.idl:
3478         * svg/SVGFEDisplacementMapElement.cpp:
3479         * svg/SVGFEDisplacementMapElement.h:
3480         * svg/SVGFEDisplacementMapElement.idl:
3481         * svg/SVGFEDistantLightElement.cpp:
3482         * svg/SVGFEDistantLightElement.h:
3483         * svg/SVGFEDistantLightElement.idl:
3484         * svg/SVGFEFloodElement.cpp:
3485         * svg/SVGFEFloodElement.h:
3486         * svg/SVGFEFloodElement.idl:
3487         * svg/SVGFEFuncAElement.cpp:
3488         * svg/SVGFEFuncAElement.h:
3489         * svg/SVGFEFuncAElement.idl:
3490         * svg/SVGFEFuncBElement.cpp:
3491         * svg/SVGFEFuncBElement.h:
3492         * svg/SVGFEFuncBElement.idl:
3493         * svg/SVGFEFuncGElement.cpp:
3494         * svg/SVGFEFuncGElement.h:
3495         * svg/SVGFEFuncGElement.idl:
3496         * svg/SVGFEFuncRElement.cpp:
3497         * svg/SVGFEFuncRElement.h:
3498         * svg/SVGFEFuncRElement.idl:
3499         * svg/SVGFEGaussianBlurElement.cpp:
3500         * svg/SVGFEGaussianBlurElement.h:
3501         * svg/SVGFEGaussianBlurElement.idl:
3502         * svg/SVGFEImageElement.cpp:
3503         * svg/SVGFEImageElement.h:
3504         * svg/SVGFEImageElement.idl:
3505         * svg/SVGFELightElement.cpp:
3506         * svg/SVGFELightElement.h:
3507         * svg/SVGFEMergeElement.cpp:
3508         * svg/SVGFEMergeElement.h:
3509         * svg/SVGFEMergeElement.idl:
3510         * svg/SVGFEMergeNodeElement.cpp:
3511         * svg/SVGFEMergeNodeElement.h:
3512         * svg/SVGFEMergeNodeElement.idl:
3513         * svg/SVGFEOffsetElement.cpp:
3514         * svg/SVGFEOffsetElement.h:
3515         * svg/SVGFEOffsetElement.idl:
3516         * svg/SVGFEPointLightElement.cpp:
3517         * svg/SVGFEPointLightElement.h:
3518         * svg/SVGFEPointLightElement.idl:
3519         * svg/SVGFESpecularLightingElement.cpp:
3520         * svg/SVGFESpecularLightingElement.h:
3521         * svg/SVGFESpecularLightingElement.idl:
3522         * svg/SVGFESpotLightElement.cpp:
3523         * svg/SVGFESpotLightElement.h:
3524         * svg/SVGFESpotLightElement.idl:
3525         * svg/SVGFETileElement.cpp:
3526         * svg/SVGFETileElement.h:
3527         * svg/SVGFETileElement.idl:
3528         * svg/SVGFETurbulenceElement.cpp:
3529         * svg/SVGFETurbulenceElement.h:
3530         * svg/SVGFETurbulenceElement.idl:
3531         * svg/SVGFilterElement.cpp:
3532         * svg/SVGFilterElement.h:
3533         * svg/SVGFilterElement.idl:
3534         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3535         * svg/SVGFilterPrimitiveStandardAttributes.h:
3536         * svg/graphics/SVGResourceFilter.cpp:
3537         * svg/graphics/SVGResourceFilter.h:
3538         * svg/graphics/cairo/SVGResourceFilterCairo.cpp:
3539         * svg/graphics/cg/SVGResourceFilterCg.cpp:
3540         * svg/graphics/cg/SVGResourceFilterCg.mm:
3541         * svg/graphics/filters/SVGDistantLightSource.h:
3542         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
3543         * svg/graphics/filters/SVGFEConvolveMatrix.h:
3544         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
3545         * svg/graphics/filters/SVGFEDiffuseLighting.h:
3546         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
3547         * svg/graphics/filters/SVGFEDisplacementMap.h:
3548         * svg/graphics/filters/SVGFEFlood.cpp:
3549         * svg/graphics/filters/SVGFEFlood.h:
3550         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
3551         * svg/graphics/filters/SVGFEGaussianBlur.h:
3552         * svg/graphics/filters/SVGFEImage.cpp:
3553         * svg/graphics/filters/SVGFEImage.h:
3554         * svg/graphics/filters/SVGFEMerge.cpp:
3555         * svg/graphics/filters/SVGFEMerge.h:
3556         * svg/graphics/filters/SVGFEMorphology.cpp:
3557         * svg/graphics/filters/SVGFEMorphology.h:
3558         * svg/graphics/filters/SVGFEOffset.cpp:
3559         * svg/graphics/filters/SVGFEOffset.h:
3560         * svg/graphics/filters/SVGFESpecularLighting.cpp:
3561         * svg/graphics/filters/SVGFESpecularLighting.h:
3562         * svg/graphics/filters/SVGFETile.cpp:
3563         * svg/graphics/filters/SVGFETile.h:
3564         * svg/graphics/filters/SVGFETurbulence.cpp:
3565         * svg/graphics/filters/SVGFETurbulence.h:
3566         * svg/graphics/filters/SVGFilterEffect.cpp:
3567         * svg/graphics/filters/SVGFilterEffect.h:
3568         * svg/graphics/filters/SVGLightSource.cpp:
3569         * svg/graphics/filters/SVGLightSource.h:
3570         * svg/graphics/filters/SVGPointLightSource.h:
3571         * svg/graphics/filters/SVGSpotLightSource.h:
3572         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
3573         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
3574         * svg/graphics/filters/cg/SVGFilterEffectCg.mm:
3575         * svg/graphics/filters/cg/WKArithmeticFilter.h:
3576         * svg/graphics/filters/cg/WKArithmeticFilter.m:
3577         * svg/graphics/filters/cg/WKComponentMergeFilter.h:
3578         * svg/graphics/filters/cg/WKComponentMergeFilter.m:
3579         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h:
3580         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m:
3581         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h:
3582         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m:
3583         * svg/graphics/filters/cg/WKDisplacementMapFilter.h:
3584         * svg/graphics/filters/cg/WKDisplacementMapFilter.m:
3585         * svg/graphics/filters/cg/WKDistantLightFilter.h:
3586         * svg/graphics/filters/cg/WKDistantLightFilter.m:
3587         * svg/graphics/filters/cg/WKGammaTransferFilter.h:
3588         * svg/graphics/filters/cg/WKGammaTransferFilter.m:
3589         * svg/graphics/filters/cg/WKIdentityTransferFilter.h:
3590         * svg/graphics/filters/cg/WKIdentityTransferFilter.m:
3591         * svg/graphics/filters/cg/WKLinearTransferFilter.h:
3592         * svg/graphics/filters/cg/WKLinearTransferFilter.m:
3593         * svg/graphics/filters/cg/WKNormalMapFilter.h:
3594         * svg/graphics/filters/cg/WKNormalMapFilter.m:
3595         * svg/graphics/filters/cg/WKPointLightFilter.h:
3596         * svg/graphics/filters/cg/WKPointLightFilter.m:
3597         * svg/graphics/filters/cg/WKSpecularLightingFilter.h:
3598         * svg/graphics/filters/cg/WKSpecularLightingFilter.m:
3599         * svg/graphics/filters/cg/WKSpotLightFilter.h:
3600         * svg/graphics/filters/cg/WKSpotLightFilter.m:
3601         * svg/graphics/filters/cg/WKTableTransferFilter.h:
3602         * svg/graphics/filters/cg/WKTableTransferFilter.m:
3603         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
3604         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
3605         * svg/graphics/qt/SVGResourceFilterQt.cpp:
3606         * svg/graphics/skia/SVGResourceFilterSkia.cpp:
3607         * svg/svgtags.in:
3608
3609 2009-05-28  Brett Wilson  <brettw@chromium.org>
3610
3611         Unreviewed, build fix.
3612
3613         https://bugs.webkit.org/show_bug.cgi?id=26067
3614
3615         Add casts for scale function to make more explicit what is happening
3616         and fix a compiler warning.
3617
3618         * platform/graphics/IntSize.h:
3619         (WebCore::IntSize::scale):
3620
3621 2009-05-28  Sam Weinig  <sam@webkit.org>
3622
3623         Reviewed by Darin Adler.
3624
3625         Remove the returnValueSlot concept from JSDOMWindowBase. Now that windows
3626         are not cleared on navigation it is no longer necessary.
3627
3628         * bindings/js/JSDOMWindowBase.cpp:
3629         (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData):
3630         (WebCore::JSDOMWindowBase::willRemoveFromWindowShell):
3631         * bindings/js/JSDOMWindowBase.h:
3632         * bindings/js/JSDOMWindowCustom.cpp:
3633         (WebCore::JSDOMWindow::showModalDialog):
3634
3635 2009-05-19  Xan Lopez  <xlopez@igalia.com>
3636
3637         Reviewed by Jan Alonzo and Gustavo Noronha.
3638
3639         https://bugs.webkit.org/show_bug.cgi?id=25415
3640         [GTK][ATK] Please implement support for get_text_at_offset
3641
3642         Implement atk_text_get_text_{at,after,before}_offset.
3643
3644         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3645
3646 2009-05-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3647
3648         Rubber-stamped by Darin Adler.
3649
3650         Remove unnecessary destructor from InputElementData/OptionElementData.
3651
3652         * dom/InputElement.cpp:
3653         * dom/InputElement.h:
3654         * dom/OptionElement.cpp:
3655         * dom/OptionElement.h:
3656
3657 2009-05-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3658
3659         Reviewed by Darin Adler.
3660
3661         Fixes: https://bugs.webkit.org/show_bug.cgi?id=26062
3662
3663         Refactor code from all virtual methods in HTMLSelectElement (that are also needed for WMLSelectElement)
3664         in the recently introduced SelectElement abstract base class. Follow the same design sheme that InputElement uses.
3665
3666         A follow-up patch can now easily add WMLSelectElement.
3667
3668         * dom/OptionElement.h:
3669         * dom/SelectElement.cpp:
3670         (WebCore::SelectElement::selectAll):
3671         (WebCore::SelectElement::saveLastSelection):
3672         (WebCore::isOptionElement):
3673         (WebCore::isOptionGroupElement):
3674         (WebCore::SelectElement::nextSelectableListIndex):
3675         (WebCore::SelectElement::previousSelectableListIndex):
3676         (WebCore::SelectElement::setActiveSelectionAnchorIndex):
3677         (WebCore::SelectElement::setActiveSelectionEndIndex):
3678         (WebCore::SelectElement::updateListBoxSelection):
3679         (WebCore::SelectElement::listBoxOnChange):
3680         (WebCore::SelectElement::menuListOnChange):
3681         (WebCore::SelectElement::scrollToSelection):
3682         (WebCore::SelectElement::recalcStyle):
3683         (WebCore::SelectElement::setRecalcListItems):
3684         (WebCore::SelectElement::recalcListItems):
3685         (WebCore::SelectElement::selectedIndex):
3686         (WebCore::SelectElement::setSelectedIndex):
3687         (WebCore::SelectElement::optionToListIndex):
3688         (WebCore::SelectElement::listToOptionIndex):
3689         (WebCore::SelectElement::dispatchFocusEvent):
3690         (WebCore::SelectElement::dispatchBlurEvent):
3691         (WebCore::SelectElement::deselectItems):
3692         (WebCore::SelectElement::saveFormControlState):
3693         (WebCore::SelectElement::restoreFormControlState):
3694         (WebCore::SelectElement::parseMultipleAttribute):
3695         (WebCore::SelectElement::appendFormData):
3696         (WebCore::SelectElement::reset):
3697         (WebCore::SelectElement::menuListDefaultEventHandler):
3698         (WebCore::SelectElement::listBoxDefaultEventHandler):
3699         (WebCore::SelectElement::defaultEventHandler):
3700         (WebCore::SelectElement::lastSelectedListIndex):
3701         (WebCore::stripLeadingWhiteSpace):
3702         (WebCore::SelectElement::typeAheadFind):
3703         (WebCore::SelectElement::insertedIntoTree):
3704         (WebCore::SelectElementData::SelectElementData):
3705         (WebCore::SelectElementData::checkListItems):
3706         (WebCore::SelectElementData::listItems):
3707         * dom/SelectElement.h:
3708         (WebCore::SelectElementData::multiple):
3709         (WebCore::SelectElementData::setMultiple):
3710         (WebCore::SelectElementData::size):
3711         (WebCore::SelectElementData::setSize):
3712         (WebCore::SelectElementData::usesMenuList):
3713         (WebCore::SelectElementData::lastOnChangeIndex):
3714         (WebCore::SelectElementData::setLastOnChangeIndex):
3715         (WebCore::SelectElementData::lastOnChangeSelection):
3716         (WebCore::SelectElementData::activeSelectionState):
3717         (WebCore::SelectElementData::setActiveSelectionState):
3718         (WebCore::SelectElementData::activeSelectionAnchorIndex):
3719         (WebCore::SelectElementData::setActiveSelectionAnchorIndex):
3720         (WebCore::SelectElementData::activeSelectionEndIndex):
3721         (WebCore::SelectElementData::setActiveSelectionEndIndex):
3722         (WebCore::SelectElementData::cachedStateForActiveSelection):
3723         (WebCore::SelectElementData::shouldRecalcListItems):
3724         (WebCore::SelectElementData::setShouldRecalcListItems):
3725         (WebCore::SelectElementData::rawListItems):
3726         (WebCore::SelectElementData::repeatingChar):
3727         (WebCore::SelectElementData::setRepeatingChar):
3728         (WebCore::SelectElementData::lastCharTime):
3729         (WebCore::SelectElementData::setLastCharTime):
3730         (WebCore::SelectElementData::typedString):
3731         (WebCore::SelectElementData::setTypedString):
3732         * html/HTMLOptionElement.h:
3733         * html/HTMLSelectElement.cpp:
3734         (WebCore::HTMLSelectElement::HTMLSelectElement):
3735         (WebCore::HTMLSelectElement::recalcStyle):
3736         (WebCore::HTMLSelectElement::formControlType):
3737         (WebCore::HTMLSelectElement::selectedIndex):
3738         (WebCore::HTMLSelectElement::deselectItems):
3739         (WebCore::HTMLSelectElement::setSelectedIndex):
3740         (WebCore::HTMLSelectElement::activeSelectionStartListIndex):
3741         (WebCore::HTMLSelectElement::activeSelectionEndListIndex):
3742         (WebCore::HTMLSelectElement::saveFormControlState):
3743         (WebCore::HTMLSelectElement::restoreFormControlState):
3744         (WebCore::HTMLSelectElement::parseMappedAttribute):
3745         (WebCore::HTMLSelectElement::canSelectAll):
3746         (WebCore::HTMLSelectElement::selectAll):
3747         (WebCore::HTMLSelectElement::createRenderer):
3748         (WebCore::HTMLSelectElement::appendFormData):
3749         (WebCore::HTMLSelectElement::optionToListIndex):
3750         (WebCore::HTMLSelectElement::listToOptionIndex):
3751         (WebCore::HTMLSelectElement::recalcListItems):
3752         (WebCore::HTMLSelectElement::setRecalcListItems):
3753         (WebCore::HTMLSelectElement::reset):
3754         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3755         (WebCore::HTMLSelectElement::dispatchBlurEvent):
3756         (WebCore::HTMLSelectElement::defaultEventHandler):
3757         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3758         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
3759         (WebCore::HTMLSelectElement::updateListBoxSelection):
3760         (WebCore::HTMLSelectElement::menuListOnChange):
3761         (WebCore::HTMLSelectElement::listBoxOnChange):
3762         (WebCore::HTMLSelectElement::saveLastSelection):
3763         (WebCore::HTMLSelectElement::setOption):
3764         (WebCore::HTMLSelectElement::scrollToSelection):
3765         (WebCore::HTMLSelectElement::insertedIntoTree):
3766         * html/HTMLSelectElement.h:
3767         (WebCore::HTMLSelectElement::size):
3768         (WebCore::HTMLSelectElement::multiple):
3769         (WebCore::HTMLSelectElement::listItems):
3770         * wml/WMLOptionElement.cpp:
3771         (WebCore::WMLOptionElement::text):
3772         * wml/WMLOptionElement.h:
3773
3774
3775         * dom/OptionElement.h:
3776         * dom/SelectElement.cpp:
3777         (WebCore::SelectElement::selectAll):
3778         (WebCore::SelectElement::saveLastSelection):
3779         (WebCore::isOptionElement):
3780         (WebCore::isOptionGroupElement):
3781         (WebCore::SelectElement::nextSelectableListIndex):
3782         (WebCore::SelectElement::previousSelectableListIndex):
3783         (WebCore::SelectElement::setActiveSelectionAnchorIndex):
3784         (WebCore::SelectElement::setActiveSelectionEndIndex):
3785         (WebCore::SelectElement::updateListBoxSelection):
3786         (WebCore::SelectElement::listBoxOnChange):
3787         (WebCore::SelectElement::menuListOnChange):
3788         (WebCore::SelectElement::scrollToSelection):
3789         (WebCore::SelectElement::recalcStyle):
3790         (WebCore::SelectElement::setRecalcListItems):
3791         (WebCore::SelectElement::recalcListItems):
3792         (WebCore::SelectElement::selectedIndex):
3793         (WebCore::SelectElement::setSelectedIndex):
3794         (WebCore::SelectElement::optionToListIndex):
3795         (WebCore::SelectElement::listToOptionIndex):
3796         (WebCore::SelectElement::dispatchFocusEvent):
3797         (WebCore::SelectElement::dispatchBlurEvent):
3798         (WebCore::SelectElement::deselectItems):
3799         (WebCore::SelectElement::saveFormControlState):
3800         (WebCore::SelectElement::restoreFormControlState):
3801         (WebCore::SelectElement::parseMultipleAttribute):
3802         (WebCore::SelectElement::appendFormData):
3803         (WebCore::SelectElement::reset):
3804         (WebCore::SelectElement::menuListDefaultEventHandler):
3805         (WebCore::SelectElement::listBoxDefaultEventHandler):
3806         (WebCore::SelectElement::defaultEventHandler):
3807         (WebCore::SelectElement::lastSelectedListIndex):
3808         (WebCore::stripLeadingWhiteSpace):
3809         (WebCore::SelectElement::typeAheadFind):
3810         (WebCore::SelectElement::insertedIntoTree):
3811         (WebCore::SelectElementData::SelectElementData):
3812         (WebCore::SelectElementData::~SelectElementData):
3813         (WebCore::SelectElementData::checkListItems):
3814         (WebCore::SelectElementData::listItems):
3815         * dom/SelectElement.h:
3816         (WebCore::SelectElementData::multiple):
3817         (WebCore::SelectElementData::setMultiple):
3818         (WebCore::SelectElementData::size):
3819         (WebCore::SelectElementData::setSize):
3820         (WebCore::SelectElementData::usesMenuList):
3821         (WebCore::SelectElementData::lastOnChangeIndex):
3822         (WebCore::SelectElementData::setLastOnChangeIndex):
3823         (WebCore::SelectElementData::lastOnChangeSelection):
3824         (WebCore::SelectElementData::activeSelectionState):
3825         (WebCore::SelectElementData::setActiveSelectionState):
3826         (WebCore::SelectElementData::activeSelectionAnchorIndex):
3827         (WebCore::SelectElementData::setActiveSelectionAnchorIndex):
3828         (WebCore::SelectElementData::activeSelectionEndIndex):
3829         (WebCore::SelectElementData::setActiveSelectionEndIndex):
3830         (WebCore::SelectElementData::cachedStateForActiveSelection):
3831         (WebCore::SelectElementData::shouldRecalcListItems):
3832         (WebCore::SelectElementData::setShouldRecalcListItems):
3833         (WebCore::SelectElementData::rawListItems):
3834         (WebCore::SelectElementData::repeatingChar):
3835         (WebCore::SelectElementData::setRepeatingChar):
3836         (WebCore::SelectElementData::lastCharTime):
3837         (WebCore::SelectElementData::setLastCharTime):
3838         (WebCore::SelectElementData::typedString):
3839         (WebCore::SelectElementData::setTypedString):
3840         * html/HTMLOptionElement.h:
3841         * html/HTMLSelectElement.cpp:
3842         (WebCore::HTMLSelectElement::HTMLSelectElement):
3843         (WebCore::HTMLSelectElement::recalcStyle):
3844         (WebCore::HTMLSelectElement::formControlType):
3845         (WebCore::HTMLSelectElement::selectedIndex):
3846         (WebCore::HTMLSelectElement::deselectItems):
3847         (WebCore::HTMLSelectElement::setSelectedIndex):
3848         (WebCore::HTMLSelectElement::activeSelectionStartListIndex):
3849         (WebCore::HTMLSelectElement::activeSelectionEndListIndex):
3850         (WebCore::HTMLSelectElement::saveFormControlState):
3851         (WebCore::HTMLSelectElement::restoreFormControlState):
3852         (WebCore::HTMLSelectElement::parseMappedAttribute):
3853         (WebCore::HTMLSelectElement::canSelectAll):
3854         (WebCore::HTMLSelectElement::selectAll):
3855         (WebCore::HTMLSelectElement::createRenderer):
3856         (WebCore::HTMLSelectElement::appendFormData):
3857         (WebCore::HTMLSelectElement::optionToListIndex):
3858         (WebCore::HTMLSelectElement::listToOptionIndex):
3859         (WebCore::HTMLSelectElement::recalcListItems):
3860         (WebCore::HTMLSelectElement::setRecalcListItems):
3861         (WebCore::HTMLSelectElement::reset):
3862         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3863         (WebCore::HTMLSelectElement::dispatchBlurEvent):
3864         (WebCore::HTMLSelectElement::defaultEventHandler):
3865         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3866         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
3867         (WebCore::HTMLSelectElement::updateListBoxSelection):
3868         (WebCore::HTMLSelectElement::menuListOnChange):
3869         (WebCore::HTMLSelectElement::listBoxOnChange):
3870         (WebCore::HTMLSelectElement::saveLastSelection):
3871         (WebCore::HTMLSelectElement::setOption):
3872         (WebCore::HTMLSelectElement::scrollToSelection):
3873         (WebCore::HTMLSelectElement::insertedIntoTree):
3874         * html/HTMLSelectElement.h:
3875         (WebCore::HTMLSelectElement::size):
3876         (WebCore::HTMLSelectElement::multiple):
3877         (WebCore::HTMLSelectElement::listItems):
3878         * wml/WMLOptionElement.cpp:
3879         (WebCore::WMLOptionElement::text):
3880         * wml/WMLOptionElement.h:
3881
3882 2009-05-28  Adam Roben  <aroben@apple.com>
3883
3884         Don't try to use the new combobox parts on Vista in Classic mode
3885
3886         Fixes:
3887         <rdar://problem/6929277> REGRESSION (r42289+r42350): Windows Classic
3888         theme: drop down lists in Preferences get a line/square
3889         <rdar://problem/6929298> REGRESSION (r42289): Windows Classic: drop
3890         down lists are black with a circle on many sites
3891
3892         Reviewed by Steve Falkenburg.
3893
3894         * rendering/RenderThemeWin.cpp:
3895         (WebCore::RenderThemeWin::paintMenuList): Only use the new combobox
3896         parts when we have a theme (i.e., when we're not in Classic mode).
3897         When we don't have a theme, fall back to the pre-r42289 code.
3898
3899 2009-05-27  Peter Kasting  <pkasting@google.com>
3900
3901         Reviewed by Simon Fraser.
3902
3903         https://bugs.webkit.org/show_bug.cgi?id=25659
3904         Avoid calling frameCount() unnecessarily (which could lead to extra
3905         GIF decoding).
3906
3907         * platform/graphics/BitmapImage.cpp:
3908         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
3909
3910 2009-05-28  Simon Fraser  <simon.fraser@apple.com>
3911
3912         Reviewed by Oliver Hunt.
3913         
3914         https://bugs.webkit.org/show_bug.cgi?id=8736
3915
3916         Tests: fast/borders/border-radius-constraints.html
3917                fast/borders/border-radius-split-inline.html
3918                
3919         When the sum of the corner radii on a side exceed the length of the side,
3920         reduce the radii according to CSS 3 rules.
3921         
3922         Add RenderStyle::getBorderRadiiForRect() to fetch corner radii, applying
3923         the constraints. Use that for painting borders, box-shadow, clipping replaced
3924         elements
3925
3926         * platform/graphics/IntSize.h:
3927         (WebCore::IntSize::scale):
3928         Add a scale method that scales by a float (using C rounding rules, like IntRect::scale()).
3929
3930         * platform/graphics/Path.cpp:
3931         Make the QUARTER const static.
3932
3933         * rendering/RenderBox.cpp:
3934         (WebCore::RenderBox::pushContentsClip):
3935         Use getBorderRadiiForRect to fetch border radii.
3936
3937         * rendering/RenderBoxModelObject.cpp:
3938         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3939         Use getBorderRadiiForRect to fetch border radii.
3940
3941         (WebCore::RenderBoxModelObject::paintBorder):
3942         Use getBorderRadiiForRect to fetch border radii, and fix a bug when drawing
3943         borders for split inlines, which used to apply the radii for each segment,
3944         and no longer does.
3945
3946         (WebCore::RenderBoxModelObject::paintBoxShadow):
3947         Use getBorderRadiiForRect to fetch border radii.
3948
3949         * rendering/RenderReplaced.cpp:
3950         (WebCore::RenderReplaced::paint):
3951         Use getBorderRadiiForRect to fetch border radii for clipping.
3952
3953         * rendering/RenderWidget.cpp:
3954         (WebCore::RenderWidget::paint):
3955         Use getBorderRadiiForRect to fetch border radii for clipping.
3956
3957         * rendering/style/RenderStyle.h:
3958         * rendering/style/RenderStyle.cpp:
3959         (WebCore::RenderStyle::getBorderRadiiForRect):
3960         New bottleneck method to fetch corner radiil given a rect, applying the constraint
3961         rules.
3962
3963 2009-05-28  Alexey Proskuryakov  <ap@webkit.org>
3964
3965         Reviewed by Darin Adler.
3966
3967         https://bugs.webkit.org/show_bug.cgi?id=26005
3968         Optimization for XPath //* does not preserve context size
3969
3970         Test: fast/xpath/position.html
3971
3972         Fixed the bug by removing the incorrect optimization, and made enough micro-optimizations to
3973         get a performance progression on my tests.
3974
3975         * xml/XPathPath.h: Removed broken optimizeStepPair().
3976
3977         * xml/XPathPath.cpp:
3978         (WebCore::XPath::LocationPath::evaluate): Style fix.
3979         (WebCore::XPath::LocationPath::appendStep): Don't call optimizeStepPair().
3980         (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
3981         (WebCore::XPath::Path::Path): Style fix.
3982
3983         * xml/XPathStep.cpp:
3984         (WebCore::XPath::primaryNodeType): Turned this member function into a static inline helper.
3985         (WebCore::XPath::nodeMatches): Ditto. Don't check for namespace axis, which is unsupported
3986         (and might never be).
3987         (WebCore::XPath::Step::nodesInAxis): Updated for the new nodeMatches() signature.
3988
3989         * xml/XPathStep.h:
3990         (WebCore::XPath::Step::NodeTest::data):
3991         (WebCore::XPath::Step::NodeTest::namespaceURI):
3992         Made these data members AtomicString to avoid repeated conversions. This is the biggest
3993         performance win here.
3994
3995         * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): Reserve some capacity upfront.
3996
3997 2009-05-28  Stephen White  <senorblanco@chromium.org>
3998
3999         Reviewed by Dimitri Glazkov.
4000
4001         When creating a linear or radial gradient with a single stop
4002         at offset 1.0, the Skia layer was allocating 3 stops, but only
4003         filling 2, leaving one uninitialized.  Only 2 stops are necessary
4004         in this case, at offsets (0.0, 1.0).
4005
4006         http://bugs.webkit.org/show_bug.cgi?id=26063
4007
4008         Covered by: LayoutTests/svg/W3C-SVG-1.1/pservers-grad-16-b.svg
4009                     LayoutTests/svg/custom/gradient-stop-corner-cases.svg
4010                     LayoutTests/svg/custom/js-late-gradient-and-object-creation.svg
4011
4012         * platform/graphics/skia/GradientSkia.cpp:
4013         (WebCore::totalStopsNeeded):
4014
4015 2009-05-28  Yury Semikhatsky  <yurys@chromium.org>
4016
4017         Reviewed by Timothy Hatcher.
4018
4019         https://bugs.webkit.org/show_bug.cgi?id=26041
4020         Allow adding resource source to WebInspector.SourceFrame asynchronously.
4021
4022         Provide common implementation for InspectorController::addResourceSourceToFrame and
4023         InspectorController::addSourceToFrame methods.
4024
4025         * bindings/js/JSInspectorControllerCustom.cpp:
4026         * bindings/v8/custom/V8InspectorControllerCustom.cpp:
4027         * inspector/InspectorController.cpp:
4028         (WebCore::InspectorController::addResourceSourceToFrame):
4029         * inspector/InspectorController.h:
4030         * inspector/InspectorController.idl:
4031         * inspector/front-end/SourceFrame.js:
4032         (WebInspector.SourceFrame.prototype.revealLine):
4033         (WebInspector.SourceFrame.prototype.highlightLine):
4034         (WebInspector.SourceFrame.prototype._loaded):
4035         (WebInspector.SourceFrame.prototype._isContentLoaded):
4036         * inspector/front-end/SourceView.js:
4037         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
4038         (WebInspector.SourceView.prototype._contentLoaded):
4039
4040 2009-05-28  Holger Hans Peter Freyther  <zecke@selfish.org>
4041
4042         Reviewed by Xan Lopez.
4043
4044         After r44177 we had a problem when increasing the size
4045         of the window the scrollbars stayed and were not hidden.
4046         This was due WebCore giving up on the Scrollbar as it became
4047         unnecessary but the GtkAdjustment remained unchanged.
4048         So from the point of view of the GtkScrolledWindow scrolling
4049         was still necessary and the GtkScrollbar kept being displayed.
4050
4051         Solve the issue by resetting the GtkAdjustment in the
4052         destructor of ScrollbarGtk.
4053
4054         * platform/gtk/ScrollbarGtk.cpp:
4055         (ScrollbarGtk::~ScrollbarGtk):
4056
4057 2009-05-28  Adam Barth  <abarth@webkit.org>
4058
4059         Reviewed by Darin Adler.
4060
4061         Clean up window.open()'s use of lexical and dynamic scope.
4062
4063         (Added one unreviewed tweak: use dynamicFrame instead of lexicalFrame
4064         for DOMWindow::allowPopUp.)
4065
4066         Test: http/tests/security/frameNavigation/context-for-window-open.html
4067
4068         * bindings/js/JSDOMBinding.cpp:
4069         (WebCore::toDynamicFrame):
4070         (WebCore::processingUserGesture):
4071         (WebCore::completeURL):
4072         * bindings/js/JSDOMBinding.h:
4073         * bindings/js/JSDOMWindowCustom.cpp:
4074         (WebCore::createWindow):
4075         (WebCore::JSDOMWindow::open):
4076         (WebCore::JSDOMWindow::showModalDialog):
4077         * bindings/v8/custom/V8DOMWindowCustom.cpp:
4078         (WebCore::CALLBACK_FUNC_DECL):
4079         (WebCore::createWindow):
4080
4081 2009-05-27  Alexey Proskuryakov  <ap@webkit.org>
4082
4083         Reviewed by Oliver Hunt.
4084
4085         https://bugs.webkit.org/show_bug.cgi?id=26056
4086         XPath string() function can be very slow
4087
4088         * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): Use an intermediate Vector when appending.
4089
4090 2009-05-27  Dan Bernstein  <mitz@apple.com>
4091
4092         Reviewed by Sam Weinig.
4093
4094         - fix <rdar://problem/6927761> <isindex> placeholder text is unstylable
4095           and initially not visible
4096
4097         Test: fast/forms/isindex-placeholder.html
4098
4099         * css/html4.css: Added a default style for <isindex> placeholder text.
4100         * html/HTMLInputElement.cpp:
4101         (WebCore::HTMLInputElement::parseMappedAttribute): Changed to call
4102         the new protected function updatePlaceholderVisibility().
4103         * html/HTMLInputElement.h:
4104         (WebCore::HTMLInputElement::updatePlaceholderVisibility): Added this
4105         protected function to allow HTMLIsIndexElement::parseMappedAttribute()
4106         to invoke InputElement::updatePlaceholderVisibility().
4107         * html/HTMLIsIndexElement.cpp:
4108         (WebCore::HTMLIsIndexElement::parseMappedAttribute): Call
4109         updatePlaceholderVisibility() when parsing the placeholder attribute.
4110         * rendering/RenderTextControlSingleLine.cpp:
4111         (WebCore::RenderTextControlSingleLine::createInnerTextStyle): If there
4112         is no placeholder pseudo-element style, use the normal style.
4113
4114 2009-05-27  Sam Weinig  <sam@webkit.org>
4115
4116         Reviewed by Maciej Stachowiak.
4117
4118         More cleanup of DOMWindow related functions.
4119
4120         * bindings/js/JSDOMWindowBase.cpp:
4121         (WebCore::JSDOMWindowBase::willRemoveFromWindowShell): Renamed from JSDOMWindowBase::clear()
4122         * bindings/js/JSDOMWindowBase.h:
4123
4124         * bindings/js/JSDOMWindowCustom.cpp:
4125         (WebCore::JSDOMWindow::showModalDialog): Update Comment.
4126
4127         * bindings/js/JSDOMWindowShell.cpp:
4128         * bindings/js/JSDOMWindowShell.h:
4129         Remove JSDOMWindowShell::clear().  It was unused.
4130
4131         * bindings/js/ScriptController.cpp:
4132         (WebCore::ScriptController::clearWindowShell):
4133
4134 2009-05-27  Sam Weinig  <sam@webkit.org>
4135
4136         Reviewed by David Hyatt.
4137
4138         Miscellaneous cleanup of DOMWindow related functions.
4139
4140         * bindings/js/JSDOMGlobalObject.cpp:
4141         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): Fix poorly named variables.
4142         * bindings/js/JSDOMWindowBase.cpp:
4143         (WebCore::JSDOMWindowBase::supportsProfiling): Don't jump through hoops
4144         checking for null frames if the build does not support profiling.
4145         (WebCore::JSDOMWindowBase::clear): Use setCurrentEvent(0) instead of calling
4146         clearHelperObjectProperties().  It is clearer.
4147         * bindings/js/JSDOMWindowBase.h:
4148         Removed now unused clearHelperObjectProperties() function, empty disconnectFrame()
4149         function, and the empty destructor.
4150         * bindings/js/JSDOMWindowShell.cpp:
4151         * bindings/js/JSDOMWindowShell.h:
4152         Remove disconnectFrame() which only called JSDOMWindowBase::disconnectFrame(), which
4153         is a no-op.
4154         * page/Frame.cpp:
4155         (WebCore::Frame::~Frame):
4156         (WebCore::Frame::pageDestroyed):
4157         Remove calls to JSDOMWindowShell::disconnectFrame() which only called
4158         JSDOMWindowBase::disconnectFrame(), which is a no-op.
4159
4160 2009-05-27  Dimitri Glazkov  <dglazkov@chromium.org>
4161
4162         Unreviewed, build fix.
4163
4164         https://bugs.webkit.org/show_bug.cgi?id=25974
4165         Remove extra qualifiers from the ScheduledAction decl.
4166
4167         * bindings/v8/ScheduledAction.h: Removed extraneous class qualifiers.
4168