Fix two SVG test failures in 64-bit.
[WebKit-https.git] / WebCore / ChangeLog
1 2009-03-27  Mark Rowe  <mrowe@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Fix two SVG test failures in 64-bit.
6
7         getSubStringLength's arguments were declared as unsigned in the IDL and as signed long in the implementation.
8         This led to a value of -1 in JavaScript being converted to MAX_UINT in the bindings.  In 32-bit this was
9         identical to -1 when interpeted as signed long, but in 64-bit it was still equal to MAX_UINT.
10
11         The solution for this is to use the IsIndex attribute on arguments that the SVG spec declares as "unsigned long"
12         but requires an exception be thrown when a negative value is passed.  This results in the JS bindings handling the
13         check for a negative value and lets the implementation treat the arguments purely as unsigned values.
14
15         * svg/SVGTextContentElement.cpp:
16         (WebCore::SVGTextContentElement::getNumberOfChars):
17         (WebCore::SVGTextContentElement::getSubStringLength):
18         (WebCore::SVGTextContentElement::getStartPositionOfChar):
19         (WebCore::SVGTextContentElement::getEndPositionOfChar):
20         (WebCore::SVGTextContentElement::getExtentOfChar):
21         (WebCore::SVGTextContentElement::getRotationOfChar):
22         (WebCore::SVGTextContentElement::getCharNumAtPosition):
23         (WebCore::SVGTextContentElement::selectSubString):
24         * svg/SVGTextContentElement.h:
25         * svg/SVGTextContentElement.idl:
26
27 2009-03-27  Darin Adler  <darin@apple.com>
28
29         Reviewed by Sam Weinig.
30
31         Get mailto code out of FrameLoader.
32
33         * html/HTMLFormElement.cpp:
34         (WebCore::transferMailtoPostFormDataToURL): Added. Factored out the mailto
35         logic so HTMLFormElement::submit isn't full of ugly bits. This includes the
36         part of the logic that involves transformeing the URL that was previously
37         inside FrameLoader.
38         (WebCore::HTMLFormElement::submit): Call transferMailtoPostFormDataToURL and
39         also release the data for slightly less refcount churn.
40
41         * loader/FrameLoader.cpp:
42         (WebCore::FrameLoader::submitForm): Removed all the special casing for mailto,
43         since HTMLFormElement now properly prepares both the URL and the form data.
44
45 2009-03-27  Dan Bernstein  <mitz@apple.com>
46
47         Reviewed by Mark Rowe.
48
49         - fix <rdar://problem/6724514> A bit of OpenTypeUtilities cleanup
50
51         * platform/graphics/chromium/FontCustomPlatformData.cpp:
52         (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
53         (WebCore::createFontCustomPlatformData): Ditto.
54         * platform/graphics/opentype/OpenTypeUtilities.cpp:
55         (WebCore::EOTHeader::EOTHeader): Added. Initializes the buffer size to
56         the size of an EOTPrefix.
57         (WebCore::EOTHeader::updateEOTSize): Added. Updates the size field in
58         the prefix.
59         (WebCore::EOTHeader::appendBigEndianString): Changed the static
60         appendBigEndianStringToEOTHeader() into this member function.
61         (WebCore::EOTHeader::appendPaddingShort): Added.
62         (WebCore::getEOTHeader): Changed to use EOTHeader.
63         * platform/graphics/opentype/OpenTypeUtilities.h:
64         (WebCore::EOTHeader::size):
65         (WebCore::EOTHeader::data):
66         (WebCore::EOTHeader::prefix):
67         * platform/graphics/win/FontCustomPlatformData.cpp:
68         (WebCore::EOTStream::EOTStream): Changed to use EOTHeader.
69         (WebCore::createFontCustomPlatformData): Ditto.
70
71 2009-03-27  Darin Adler  <darin@apple.com>
72
73         Reviewed by Sam Weinig.
74
75         To prepare for work on a form loading fix, remove some unused functions,
76         consolidate some functions, and make many more functions private in
77         FrameLoader.
78
79         * WebCore.base.exp: Remove some unused entry points, update another.
80
81         * dom/Document.cpp:
82         (WebCore::Document::detach): Clear m_frame directly instead of using
83         clearFramePointer.
84         * dom/Document.h: Ditto.
85
86         * loader/FrameLoader.cpp:
87         (WebCore::FrameLoader::urlSelected): Consolidate the two functions
88         of this name into a single function. Also changed the event argument
89         to be PassRefPtr<Event>.
90         (WebCore::FrameLoader::submitForm): Changed the event argument to
91         be PassRefPtr<Event>.
92         (WebCore::FrameLoader::scheduleLocationChange): Call completeURL
93         explicitly so we can remove the version of changeLocation that does
94         completeURL for us.
95         (WebCore::FrameLoader::redirectionTimerFired): Ditto.
96         (WebCore::FrameLoader::loadURLIntoChildFrame): Set m_provisionalHistoryItem
97         directly so we don't need a setProvisionalHistoryItem function.
98         (WebCore::FrameLoader::canCachePageContainingThisFrame): Get at
99         m_quickRedirectComing directly so we don't need a isQuickRedirectComing
100         function.
101         (WebCore::FrameLoader::logCanCacheFrameDecision): Ditto.
102         (WebCore::FrameLoader::loadFrameRequestWithFormAndValues): Changed the
103         event argument to be PassRefPtr<Event>.
104         (WebCore::FrameLoader::loadURL): Move the logic of the continueLoadWithData
105         function here because this is the only caller. If we want to make the
106         resulting function smaller we should refactor some other way. Also
107         streamlined the user-chosen encoding logic, but did not change what it does.
108         (WebCore::FrameLoader::finishedLoadingDocument): Changed the event argument
109         to be PassRefPtr<Event>.
110         (WebCore::FrameLoader::loadPostRequest): Ditto.
111         (WebCore::FrameLoader::receivedMainResourceError): Moved the logic from
112         the didNotOpenURL function here, since this was the only caller.
113
114         * loader/FrameLoader.h: Removed include of FormState.h and used a forward
115         declaration instead. Removed unneeded forward declation of Element.
116         Moved many functions into the private section, and removed some other
117         unused or uneeded functions.
118
119 2009-03-27  Xiaomei Ji  <xji@chromium.org>
120
121         Reviewed by Dan Bernstein.
122
123         Fix https://bugs.webkit.org/show_bug.cgi?id=24303
124         Using keyboard select RTL text, Highlights goes to opposite direction from Firefox and IE.
125
126         Test: editing/selection/extend-selection.html
127
128         * editing/SelectionController.cpp:
129         (WebCore::SelectionController::directionOfEnclosingBlock): Added
130         (WebCore::SelectionController::modifyExtendingRight): Added. Currenctly 
131         implemented for character and word granularity, all other granularities
132         are treated as "forward".
133         (WebCore::SelectionController::modifyExtendingForward): Renamed 
134         modifyExtendingRightForward() to this.
135         (WebCore::SelectionController::modifyExtendingLeft): Added. Currenctly
136         implemented for character and word granularity, all other granularities
137         are treated as "backward".
138         (WebCore::SelectionController::modifyExtendingBackward): Renamed
139         modifyExtendingLeftBackward() to this.
140         (WebCore::SelectionController::modify): Change to call either the 
141         left/right or backward/forward methods depending on the 'dir' argument
142         for extends.
143         * editing/SelectionController.h:
144
145 2009-03-27  John Abd-El-Malek  <jam@google.com>
146
147         Reviewed by Eric Seidel.
148
149         https://bugs.webkit.org/show_bug.cgi?id=24836
150         Fix navigator.plugins.refresh(false) in Chromium.
151
152         * plugins/chromium/PluginDataChromium.cpp:
153         (WebCore::PluginData::refresh):
154
155 2009-03-27  Timothy Hatcher  <timothy@apple.com>
156
157         Make scrollLeft, scrollTop, scrollWidth, and scrollHeight
158         virtual to fix the broken layout tests from my last commit.
159
160         Reviewed by Mark Rowe.
161
162         * dom/Element.cpp:
163         (WebCore::Element::scrollLeft):
164         (WebCore::Element::scrollTop):
165         (WebCore::Element::scrollWidth):
166         (WebCore::Element::scrollHeight):
167         * dom/Element.h:
168         * html/HTMLBodyElement.h:
169
170 2009-03-27  Mark Rowe  <mrowe@apple.com>
171
172         Reviewed by Sam Weinig.
173
174         Fix <https://bugs.webkit.org/show_bug.cgi?id=24876>.
175         Bug 24876: fast/forms/select-max-length.html times out in debug builds due to HTMLSelectElement::setLength being O(N^2)
176
177         * html/HTMLSelectElement.cpp:
178         (WebCore::HTMLSelectElement::setLength): Repeatedly calling remove to remove elements causes us to recalculate the list
179         items after each node is removed, leading to O(N^2) behaviour.  By inlining the batch removal in to setLength we can avoid
180         this gratuitous recalcuation.
181
182 2009-03-27  Dirk Schulze  <krit@webkit.org>
183
184         Reviewed by Eric Seidel.
185
186         We don't support images for GtkCursors yet. We need a  placeholder to avoid crashes.
187         I took crosshair to have a common behavior with firefox.
188
189         [GTK] SVG - Crash on setting the cursor icon
190         https://bugs.webkit.org/show_bug.cgi?id=24565
191
192         * platform/gtk/CursorGtk.cpp:
193         (WebCore::Cursor::Cursor):
194
195 2009-03-27  Timothy Hatcher  <timothy@apple.com>
196
197         Remove redundant attributes and functions from IDL files that have the
198         same attributes and functions defined in the super class.
199
200         Reviewed by Simon Fraser.
201
202         * WebCore.xcodeproj/project.pbxproj: Remove DOMHTMLBodyElementPrivate.h.
203         * bindings/objc/PublicDOMInterfaces.h: Remove focus and blur from DOMHTMLElement.
204         * html/HTMLBodyElement.idl: Remove scrollLeft, scrollTop, scrollWidth
205         and scrollHeight.
206         * html/HTMLElement.idl: Remove blur and focus.
207
208 2009-03-27  Adam Roben  <aroben@apple.com>
209
210         Don't include substitute data URLs in global history redirect chains
211
212         <rdar://6690169>
213
214         Reviewed by Darin Adler.
215
216         This might be testable if:
217           - support were added to DRT for providing substitute data on failed
218             loads
219           - support were added to DRT for dumping redirect chains
220
221         I tried doing the above and was still unable to make a test.
222
223         * loader/FrameLoader.cpp:
224         (WebCore::FrameLoader::updateHistoryForStandardLoad):
225         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedBackForwardList):
226         Call updateGlobalHistoryRedirectLinks only if the load succeeded
227         (i.e., there is no unreachableURL). Previous the FrameLoaderClient
228         implementations were unconditionally calling
229         updateGlobalHistoryRedirectLinks from within updateGlobalHistory.
230
231 2009-03-27  Peter Kasting  <pkasting@google.com>
232
233         Reviewed by Eric Seidel.
234
235         https://bugs.webkit.org/show_bug.cgi?id=24861
236         Chromium port did not render decorations for <input type="search">.
237         This copies RenderThemeWin.*.
238
239         * css/themeChromiumWin.css: Removed.
240         * rendering/RenderThemeChromiumLinux.cpp:
241         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
242         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldCancelButtonStyle):
243         (WebCore::RenderThemeChromiumLinux::paintSearchFieldCancelButton):
244         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldDecorationStyle):
245         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsDecorationStyle):
246         (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsDecoration):
247         (WebCore::RenderThemeChromiumLinux::adjustSearchFieldResultsButtonStyle):
248         (WebCore::RenderThemeChromiumLinux::paintSearchFieldResultsButton):
249         * rendering/RenderThemeChromiumLinux.h:
250         (WebCore::RenderThemeChromiumLinux::paintSearchField):
251         * rendering/RenderThemeChromiumWin.cpp:
252         (WebCore::):
253         (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
254         (WebCore::RenderThemeChromiumWin::adjustSearchFieldCancelButtonStyle):
255         (WebCore::RenderThemeChromiumWin::paintSearchFieldCancelButton):
256         (WebCore::RenderThemeChromiumWin::adjustSearchFieldDecorationStyle):
257         (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsDecorationStyle):
258         (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsDecoration):
259         (WebCore::RenderThemeChromiumWin::adjustSearchFieldResultsButtonStyle):
260         (WebCore::RenderThemeChromiumWin::paintSearchFieldResultsButton):
261         * rendering/RenderThemeChromiumWin.h:
262         (WebCore::RenderThemeChromiumWin::paintSearchField):
263
264 2009-03-27  David Hyatt  <hyatt@apple.com>
265
266         Reviewed by Simon Fraser
267
268         If an object has a self-painting layer, don't count it as part of a block's visual overflow.
269         This fix has only been made for block-level children.   The inline-level case is still broken
270         (and covered by an existing bug).
271
272         Added fast/block/positioning/negative-rel-position.html
273
274         * rendering/InlineFlowBox.cpp:
275         (WebCore::InlineFlowBox::placeBoxesVertically):
276         * rendering/RenderBlock.cpp:
277         (WebCore::RenderBlock::layoutBlockChildren):
278         (WebCore::RenderBlock::lowestPosition):
279         (WebCore::RenderBlock::rightmostPosition):
280         (WebCore::RenderBlock::leftmostPosition):
281
282 2009-03-27  Anders Carlsson  <andersca@apple.com>
283
284         Reviewed by Darin Adler.
285
286         <rdar://problem/6642221>
287         REGRESSION: With the Movie widget, movie trailer fails to load if movie had been previously viewed
288         
289         Add a dashboard specific workaround so that we always create renderers for object elements, even if display:none is set.
290         
291         I've filed <rdar://problem/6731022> against the Movies widget.
292         
293         * html/HTMLObjectElement.cpp:
294         (WebCore::HTMLObjectElement::rendererIsNeeded):
295
296 2009-03-25  Timothy Hatcher  <timothy@apple.com>
297
298         Expose new DOM methods as public Objective-C API.
299
300         <rdar://problem/5837350> Expose new DOM classes and methods
301         as public API (match the additions to the JavaScript DOM)
302
303         Reviewed by Mark Rowe and Darin Adler.
304
305         * WebCore.xcodeproj/project.pbxproj:
306         * bindings/objc/DOMHTML.h:
307         * bindings/objc/DOMPrivate.h:
308         * bindings/objc/PublicDOMInterfaces.h:
309
310 2009-03-27  Zack Rusin <zack@kde.org>
311
312         Reviewed by Simon Hausmann.
313
314         https://bugs.webkit.org/show_bug.cgi?id=24280
315
316         Fix propagation of fill rules when rendering paths in the Qt build.
317
318         * platform/graphics/qt/GraphicsContextQt.cpp:
319         (WebCore::toQtFillRule):
320         (WebCore::GraphicsContext::fillPath):
321         (WebCore::GraphicsContext::strokePath):
322
323 2009-03-27  Zack Rusin <zack@kde.org>
324
325         Reviewed by Tor Arne Vestbø.
326
327         https://bugs.webkit.org/show_bug.cgi?id=24275
328
329         Fix text field theming in the Qt build with the KDE 4 Oxygen
330         style by adjusting the size vertically and horizontally to
331         set padding on the element equal to the width of the style painted border.
332
333         * platform/qt/RenderThemeQt.cpp:
334         (WebCore::RenderThemeQt::RenderThemeQt):
335         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
336         (WebCore::RenderThemeQt::adjustTextFieldStyle):
337         (WebCore::RenderThemeQt::paintTextField):
338         * platform/qt/RenderThemeQt.h:
339
340 2009-03-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
341
342         Reviewed by Simon Hausmann.
343
344         https://bugs.webkit.org/show_bug.cgi?id=24852
345         Build fix for GNU mode RVCT compilation
346
347         * html/PreloadScanner.cpp:
348
349 2009-03-27  Erik L. Bunce  <elbunce@xendom.com>
350
351         Reviewed by Simon Hausmann.
352
353         https://bugs.webkit.org/show_bug.cgi?id=24868
354
355         Make text of the writing direction items more user friendly.
356
357         * platform/qt/Localizations.cpp:
358         (WebCore::contextMenuItemTagLeftToRight):
359         (WebCore::contextMenuItemTagRightToLeft):
360
361 2009-03-27  Erik L. Bunce  <elbunce@xendom.com>
362
363         Reviewed by Simon Hausmann.
364
365         https://bugs.webkit.org/show_bug.cgi?id=24274
366
367         Fixed the Qt 4.4 Mac build with netscape plugins enabled.
368
369         * plugins/mac/PluginViewMac.cpp:
370
371 2009-03-26  Mark Rowe  <mrowe@apple.com>
372
373         Try and fix the Qt build.
374
375         * platform/text/TextEncodingDetectorNone.cpp:
376         (WebCore::detectTextEncoding):
377
378 2009-03-26  Eric Carlson  <eric.carlson@apple.com>
379
380         Reviewed by Simon Fraser.
381
382         https://bugs.webkit.org/show_bug.cgi?id=24874
383         24874: HTMLMediaElement: 'duration' defaults to NaN, deal with it
384         
385         The 'duration' attribute is NaN when no media is available, so the
386         media element should take care when comparing with duration().
387
388         * html/HTMLMediaElement.cpp:
389         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Don't compare with duration when
390         it is NaN.
391         (WebCore::HTMLMediaElement::endedPlayback): Ditto.
392
393 2009-03-26  Mark Rowe  <mrowe@apple.com>
394
395         Fix the build.
396
397         * platform/text/TextEncodingDetectorICU.cpp:
398         * platform/text/TextEncodingDetectorNone.cpp:
399
400 2009-03-26  Jungshik Shin  <jshin@chromium.org>
401
402         Reviewed by Cameron Zwarich.
403
404         1. Fix the crash in setHintEncoding
405         2. Fix build failures on Tiger and Qt.
406         UnusedParam.h was not included by TextEncodingDetector{None,ICU}.cpp
407         in the patch landed in r42023
408         for http://bugs.webkit.org/show_bug.cgi?id=16482
409
410         * loader/TextResourceDecoder.h:
411         (WebCore::TextResourceDecoder::setHintEncoding):
412         * platform/text/TextEncodingDetectorICU.cpp:
413         * platform/text/TextEncodingDetectorNone.cpp:
414
415 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
416
417         Build fix when ACCELERATED_COMPOSITING is turned on.
418
419         * rendering/RenderLayerBacking.cpp:
420         (WebCore::RenderLayerBacking::canUseDirectCompositing):
421
422 2009-03-26  Eric Seidel  <eric@webkit.org>
423
424         No additional review, committing previously reviewed files for build fix only.
425
426         Add files I missed when commiting Jungshik's patch in r42022.
427         https://bugs.webkit.org/show_bug.cgi?id=16482
428
429         * icu/unicode/ucsdet.h: Added.
430         * platform/text/TextEncodingDetector.h: Added.
431         * platform/text/TextEncodingDetectorICU.cpp: Added.
432         (WebCore::detectTextEncoding):
433         * platform/text/TextEncodingDetectorNone.cpp: Added.
434         (WebCore::detectTextEncoding):
435
436 2009-03-26  Jungshik Shin  <jshin@chromium.org>
437
438         Reviewed by Alexey Proskuryakov.
439
440         Add an encoding detector 'hook' to TextResourceDecoder.
441          - add |usesEncodingDetector| to Settings. It's off by default.
442          - add a new encoding source type |EncodingFromParent| 
443            to distinguish cases when the encoding is inherited from
444            the parent frame from cases when it's actually auto-detected.
445          - add TextEncodingDetector* to platform/text. Currently,
446            the only implementation uses ICU. Stub is added for 
447            ports that do not use ICU and a build on Tiger. Mac OS 
448            Tiger comes with ICU 3.2 that does not support encoding detector.
449          - add ucsdet.h to icu/unicode for ports using ICU.
450
451         Layout tests will be added once bug 20534 is fixed and a WebPreference
452         can be controlled in test_shell. With UsesEncodingDetector off, there
453         is no change to test. 
454
455         http://bugs.webkit.org/show_bug.cgi?id=16482
456
457         * WebCore.vcproj/WebCore.vcproj:
458         * WebCore.xcodeproj/project.pbxproj:
459         * WebCore/GNUmakefile.am
460         * WebCore/WebCore.pro
461         * WebCore/WebCore.scons
462         * WebCore/WebCoreSources.bkl
463         * WebCore.base.exp
464         * icu/unicode/ucsdet.h
465         * loader/FrameLoader.cpp:
466         (WebCore::FrameLoader::write): turn on/off encoding detector depending on Settings and set hintEncoding of TextResourceDecoder to the parent frame encoding if necessary and the security policy allows refering to the parent frame encoding.
467         * loader/TextResourceDecoder.cpp:
468         (WebCore::TextResourceDecoder::TextResourceDecoder):
469         (WebCore::TextResourceDecoder::checkForCSSCharset): add check for EncodingFromParentFrame
470         (WebCore::TextResourceDecoder::checkForHeadCharset): ditto
471         (WebCore::TextResourceDecoder::shouldAutoDetect):
472         (WebCore::TextResourceDecoder::decode): call encoding detector if shouldAutoDetect returns true.
473         (WebCore::TextResourceDecoder::flush): if encoding is not determined by now, call encoding detector if shouldAutoDetect returns true.
474         * loader/TextResourceDecoder.h:
475         (WebCore::TextResourceDecoder::):
476         (WebCore::TextResourceDecoder::create):
477         (WebCore::TextResourceDecoder::setHintEncoding):
478         (WebCore::TextResourceDecoder::source):
479         * page/Settings.cpp: add m_usesEncodingDetector
480         (WebCore::Settings::Settings):
481         (WebCore::Settings::setUsesEncodingDetector):
482         * page/Settings.h:
483         (WebCore::Settings::usesEncodingDetector):
484         * platform/text/TextEncodingDetector.h: Added.
485         * platform/text/TextEncodingDetectorICU.cpp: Added.
486         (WebCore::detectTextEncoding):
487         * platform/text/TextEncodingDetectorNone.cpp: Added.
488         (WebCore::detectTextEncoding):
489
490 2009-03-26  Darin Adler  <darin@apple.com>
491
492         Reviewed by Geoff Garen.
493
494         Removed code that casts EventListener down to derived classes
495         without type checking. A crash could happen if you added event
496         listeners with Objective-C and then manipulated the class with
497         JavaScript.
498
499         * bindings/js/JSDOMApplicationCacheCustom.cpp:
500         (WebCore::JSDOMApplicationCache::mark): Removed all the casts
501         and used the markIfNotNull function and mark functions on
502         EventListener instead.
503         * bindings/js/JSMessagePortCustom.cpp:
504         (WebCore::JSMessagePort::mark): Ditto.
505         * bindings/js/JSWorkerContextCustom.cpp:
506         (WebCore::JSWorkerContext::mark): Ditto.
507         * bindings/js/JSWorkerCustom.cpp:
508         (WebCore::JSWorker::mark): Ditto.
509         * bindings/js/JSXMLHttpRequestCustom.cpp:
510         (WebCore::JSXMLHttpRequest::mark): Ditto.
511         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
512         (WebCore::JSXMLHttpRequestUpload::mark): Ditto.
513
514         * bindings/js/JSEventListener.cpp:
515         (WebCore::JSAbstractEventListener::handleEvent): Used function,
516         the new name for what used to be called listenerObj.
517         (WebCore::JSAbstractEventListener::virtualIsInline): Renamed since
518         this doesn't need to be virtual for callers who have a pointer to
519         this class, not the base class.
520         (WebCore::JSEventListener::function): Renamed from listenerObj.
521         (WebCore::JSProtectedEventListener::function): Ditto.
522
523         * bindings/js/JSEventListener.h: Removed unneeded forward class
524         declarations. Made all virtual functions private since there's no
525         need to call any of them on a particular derived class, only on
526         EventListener. Explicitly declare JSEventListener::mark as virtual
527         since it's now overriding a function in the EventListener base class.
528         Made JSProtectedEventListener::m_globalObject protected so the
529         JSLazyEventListener derived class can use it directly instead of using
530         a virtual function to get the pointer.
531
532         * bindings/js/JSLazyEventListener.cpp:
533         (WebCore::JSLazyEventListener::parseCode): Use m_globalObject instead
534         of globalObject since the latter is a virtual function and there's no
535         need to pay virtual function overhead.
536         (WebCore::JSLazyEventListener::function): Renamed from listenerObj.
537
538         * bindings/js/JSLazyEventListener.h: Moved forward declaration of the
539         Node class here from JSEventListener.h.
540
541         * bindings/scripts/CodeGeneratorJS.pm: Removed now-unneeded cast to
542         JSEventListener when getting the script object from a listener.
543
544         * dom/EventListener.h: Added virtual function and mark functions
545         so we can extract the JavaScript function object or mark a JavaScript
546         event listener in a type safe manner.
547
548 2009-03-26  Peter Kasting  <pkasting@google.com>
549
550         Reviewed by Adele Peterson.
551
552         https://bugs.webkit.org/show_bug.cgi?id=24859
553         Use CSS file instead of code to adjust search field styling.
554
555         * css/themeWin.css:
556         * rendering/RenderThemeWin.cpp:
557         * rendering/RenderThemeWin.h:
558
559 2009-03-26  Darin Adler  <darin@apple.com>
560
561         Reviewed by Geoff Garen.
562
563         Split JSLazyEventListener out into its own separate source file.
564         We'll be removing JSAbstractEventListener and JSProtectedEventListener soon,
565         so leave those in the same file with JSEventListener.
566
567         * GNUmakefile.am: Added JSLazyEventListener.
568         * WebCore.pro: Ditto.
569         * WebCore.scons: Ditto.
570         * WebCore.vcproj/WebCore.vcproj: Ditto.
571         * WebCore.xcodeproj/project.pbxproj: Ditto.
572         * WebCoreSources.bkl: Ditto.
573
574         * bindings/js/JSEventListener.cpp: Removed the JSLazyEventListener part.
575         Removed unneeded includes. Removed incorrect ASSERT_CLASS_FITS_IN_CELL, since
576         JSAbstractEventListener is not derived from JSCell.
577
578         * bindings/js/JSEventListener.h: Removed the JSLazyEventListener part
579         and the now-unneeded include of PlatformString.h.
580
581         * bindings/js/JSLazyEventListener.cpp: Copied from bindings/js/JSEventListener.cpp.
582         Kept only the JSLazyEventListener part.
583         (WebCore::eventParameterName): Made this have internal linkage by adding "static".
584         Also moved the default case out of the switch statement so we will get a warning
585         if we omit any cases in the future.
586
587         * bindings/js/JSLazyEventListener.h: Copied from bindings/js/JSEventListener.h.
588         Kept only the JSLazyEventListener part.
589
590         * bindings/js/ScriptController.cpp: Removed unneeded includes and sorted the
591         remanining ones. Include JSLazyEventListener.h instead of JSEventListener.h.
592
593 2009-03-26  Darin Adler  <darin@apple.com>
594
595         Reviewed by Geoff Garen.
596
597         Renamed JSUnprotectedEventListener to JSEventListener.
598         And related renames.
599
600         Soon Geoff will make all JavaScript event listeners use mark instead
601         of protect, so there's no need to emphasize "unprotected".
602
603         * bindings/js/JSDOMApplicationCacheCustom.cpp:
604         (WebCore::JSDOMApplicationCache::mark):
605         (WebCore::JSDOMApplicationCache::addEventListener):
606         (WebCore::JSDOMApplicationCache::removeEventListener):
607         * bindings/js/JSDOMGlobalObject.cpp:
608         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
609         (WebCore::JSDOMGlobalObject::findJSEventListener):
610         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
611         (WebCore::JSDOMGlobalObject::jsEventListeners):
612         (WebCore::JSDOMGlobalObject::jsInlineEventListeners):
613         * bindings/js/JSDOMGlobalObject.h:
614         * bindings/js/JSDOMWindowBase.h:
615         * bindings/js/JSEventListener.cpp:
616         (WebCore::JSEventListener::JSEventListener):
617         (WebCore::JSEventListener::~JSEventListener):
618         (WebCore::JSEventListener::listenerObj):
619         (WebCore::JSEventListener::globalObject):
620         (WebCore::JSEventListener::clearGlobalObject):
621         (WebCore::JSEventListener::mark):
622         * bindings/js/JSEventListener.h:
623         (WebCore::JSEventListener::create):
624         * bindings/js/JSMessagePortCustom.cpp:
625         (WebCore::JSMessagePort::mark):
626         (WebCore::JSMessagePort::addEventListener):
627         (WebCore::JSMessagePort::removeEventListener):
628         * bindings/js/JSWorkerContextCustom.cpp:
629         (WebCore::JSWorkerContext::mark):
630         (WebCore::JSWorkerContext::addEventListener):
631         (WebCore::JSWorkerContext::removeEventListener):
632         * bindings/js/JSWorkerCustom.cpp:
633         (WebCore::JSWorker::mark):
634         (WebCore::JSWorker::addEventListener):
635         (WebCore::JSWorker::removeEventListener):
636         * bindings/js/JSXMLHttpRequestCustom.cpp:
637         (WebCore::JSXMLHttpRequest::mark):
638         (WebCore::JSXMLHttpRequest::addEventListener):
639         (WebCore::JSXMLHttpRequest::removeEventListener):
640         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
641         (WebCore::JSXMLHttpRequestUpload::mark):
642         (WebCore::JSXMLHttpRequestUpload::addEventListener):
643         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
644         * bindings/scripts/CodeGeneratorJS.pm:
645         All just renaming.
646
647 2009-03-26  Darin Adler  <darin@apple.com>
648
649         Reviewed by Geoff Garen.
650
651         Renamed JSEventListener to JSProtectedEventListener.
652         And related renames.
653
654         Soon Geoff will make all JavaScript event listeners use mark instead
655         of protect, and so this class will be be obsolete. We will rename
656         JSUnrpotectedEventListener to JSEventListener in the next check-in,
657         since that one will remain.
658
659         * bindings/js/JSDOMGlobalObject.cpp:
660         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
661         (WebCore::JSDOMGlobalObject::findJSProtectedEventListener):
662         (WebCore::JSDOMGlobalObject::findOrCreateJSProtectedEventListener):
663         (WebCore::JSDOMGlobalObject::jsProtectedEventListeners):
664         (WebCore::JSDOMGlobalObject::jsProtectedInlineEventListeners):
665         * bindings/js/JSDOMGlobalObject.h:
666         * bindings/js/JSDOMWindowBase.h:
667         * bindings/js/JSDOMWindowCustom.cpp:
668         (WebCore::JSDOMWindow::addEventListener):
669         (WebCore::JSDOMWindow::removeEventListener):
670         * bindings/js/JSEventListener.cpp:
671         (WebCore::JSProtectedEventListener::JSProtectedEventListener):
672         (WebCore::JSProtectedEventListener::~JSProtectedEventListener):
673         (WebCore::JSProtectedEventListener::listenerObj):
674         (WebCore::JSProtectedEventListener::globalObject):
675         (WebCore::JSProtectedEventListener::clearGlobalObject):
676         (WebCore::JSLazyEventListener::JSLazyEventListener):
677         (WebCore::JSLazyEventListener::parseCode):
678         * bindings/js/JSEventListener.h:
679         (WebCore::JSProtectedEventListener::create):
680         * bindings/js/JSNodeCustom.cpp:
681         (WebCore::JSNode::addEventListener):
682         (WebCore::JSNode::removeEventListener):
683         * bindings/js/JSSVGElementInstanceCustom.cpp:
684         (WebCore::JSSVGElementInstance::addEventListener):
685         (WebCore::JSSVGElementInstance::removeEventListener):
686         * bindings/scripts/CodeGeneratorJS.pm:
687         All just renaming.
688
689 2009-03-26  Dan Bernstein  <mitz@apple.com>
690
691         Reviewed by Anders Carlsson.
692
693         - fix <rdar://problem/6725042> BidiResolver::createBidiRunsForLine can
694           create runs extending beyond the end
695
696         No test because Safari does not use this version of
697         createBidiRunsForLine() with the end iterator not pointing to the end
698         of the text run.
699
700         * platform/text/BidiResolver.h:
701         (WebCore::BidiResolver::appendRun): Cap the end of the run at the end
702         of the line and set the reachedEndOfLine flag. This mirrors the logic
703         in the specialized version of appendRun() in bidi.cpp, which is why the
704         problem did not show up in HTML. Also avoid creating empty runs.
705
706 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
707
708         Reviewed by Dave Hyatt
709         
710         https://bugs.webkit.org/show_bug.cgi?id=24864
711
712         Change the terminology from "inner content layer" to "direct compositing"
713         for cases where we can push an image directly over to the compositing system,
714         without having to draw it.
715         
716         Clean up much of the code which looks at style to determine if this is possible,
717         and fix some bugs when backgrounds change dynamically.
718         
719         * rendering/RenderLayerBacking.cpp:
720         (WebCore::hasBorderOutlineOrShadow):
721         (WebCore::hasBoxDecorations):
722         (WebCore::hasBoxDecorationsWithBackgroundImage):
723         (WebCore::RenderLayerBacking::canBeSimpleContainerCompositingLayer):
724         (WebCore::RenderLayerBacking::canUseDirectCompositing):
725         (WebCore::RenderLayerBacking::detectDrawingOptimizations):
726         (WebCore::RenderLayerBacking::rendererContentChanged):
727         (WebCore::RenderLayerBacking::updateImageContents):
728         * rendering/RenderLayerBacking.h:
729
730 2009-03-26  Simon Fraser  <simon.fraser@apple.com>
731
732         Reviewed by Dave Hyatt
733         
734         https://bugs.webkit.org/show_bug.cgi?id=23914
735
736         Tests: compositing/overflow/ancestor-overflow.html
737                compositing/overflow/parent-overflow.html
738
739         * rendering/RenderLayer.cpp:
740         (WebCore::RenderLayer::calculateClipRects):
741         * rendering/RenderLayer.h:
742         (WebCore::ClipRects::infiniteRect):
743         New static method that returns a large rect that is used by the clipping
744         logic.
745         
746         * rendering/RenderLayerBacking.cpp:
747         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
748         Use parentClipRects(), rather than calculateRects(), to compute the overflow
749         rect that we'll use to create a masking layer for composited clipping.
750         
751         * rendering/RenderLayerCompositor.cpp:
752         (WebCore::RenderLayerCompositor::clippedByAncestor):
753         Use parentClipRects() to see whether there's a layer between us and our
754         compositing ancestor which applies clipping.
755         
756         (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
757         A layer which imposes clipping to its children doesn't have to be a stacking
758         context; it might be a normal flow layer; in either case, we can rely on the
759         hasCompositingDescendant() bit.
760
761 2009-03-26  Steve Falkenburg  <sfalken@apple.com>
762
763         https://bugs.webkit.org/show_bug.cgi?id=24837
764         Escape key should dismiss select menu
765
766         Reviewed by Adam Roben.
767
768         * platform/win/PopupMenuWin.cpp:
769         (WebCore::PopupWndProc):
770
771 2009-03-26  Kevin Ollivier  <kevino@theolliviers.com>
772
773         Reviewed by Alexey Proskuryakov.
774
775         Make sure the script uses LF line endings even on Windows.
776         
777         https://bugs.webkit.org/show_bug.cgi?id=24805
778
779         * WebCore/make-generated-sources.sh: Change svn:eol-style to LF
780
781 2009-03-26  Eli Fidler  <eli.fidler@torchmobile.com>
782
783         Reviewed by George Staikos.
784
785         Remove warnings all over the place by making operator precedence
786         explicit in cases like x && y || z.  No functional change.
787
788         * css/CSSFontSelector.cpp:
789         (WebCore::CSSFontSelector::addFontFaceRule):
790         * css/CSSParser.cpp:
791         (WebCore::CSSParser::parseValue):
792         (WebCore::CSSParser::parseShadow):
793         * dom/Document.cpp:
794         (WebCore::Document::shouldScheduleLayout):
795         * dom/Node.cpp:
796         (WebCore::Node::isBlockFlowOrBlockTable):
797         * dom/Node.h:
798         (WebCore::Node::document):
799         * dom/Position.cpp:
800         (WebCore::Position::next):
801         (WebCore::Position::upstream):
802         (WebCore::Position::downstream):
803         (WebCore::Position::getInlineBoxAndOffset):
804         * dom/PositionIterator.cpp:
805         (WebCore::PositionIterator::atStart):
806         * dom/Range.cpp:
807         (WebCore::Range::intersectsNode):
808         * editing/Editor.cpp:
809         (WebCore::Editor::setBaseWritingDirection):
810         * editing/InsertParagraphSeparatorCommand.cpp:
811         (WebCore::InsertParagraphSeparatorCommand::doApply):
812         * editing/ReplaceSelectionCommand.cpp:
813         (WebCore::ReplaceSelectionCommand::doApply):
814         * editing/TextIterator.cpp:
815         (WebCore::TextIterator::advance):
816         (WebCore::SimplifiedBackwardsTextIterator::advance):
817         * editing/VisiblePosition.cpp:
818         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
819         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
820         (WebCore::VisiblePosition::canonicalPosition):
821         * editing/htmlediting.cpp:
822         (WebCore::isMailBlockquote):
823         (WebCore::lineBreakExistsAtPosition):
824         * html/HTMLSelectElement.cpp:
825         (WebCore::HTMLSelectElement::parseMappedAttribute):
826         * loader/FTPDirectoryDocument.cpp:
827         (WebCore::processFileDateString):
828         * loader/ImageLoader.cpp:
829         (WebCore::ImageLoader::updateFromElement):
830         * loader/TextResourceDecoder.cpp:
831         (WebCore::TextResourceDecoder::checkForHeadCharset):
832         * page/AccessibilityObject.cpp:
833         (WebCore::updateAXLineStartForVisiblePosition):
834         * page/EventHandler.cpp:
835         (WebCore::EventHandler::sendContextMenuEvent):
836         * page/animation/AnimationBase.cpp:
837         (WebCore::PropertyWrapperGetter::equals):
838         (WebCore::PropertyWrapperShadow::equals):
839         * platform/ContextMenu.cpp:
840         (WebCore::ContextMenu::populate):
841         * platform/ScrollView.cpp:
842         (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount):
843         * platform/text/Base64.cpp:
844         (WebCore::base64Encode):
845         * platform/text/BidiResolver.h:
846         (WebCore::::raiseExplicitEmbeddingLevel):
847         (WebCore::::createBidiRunsForLine):
848         * rendering/InlineTextBox.cpp:
849         (WebCore::InlineTextBox::placeEllipsisBox):
850         * rendering/RenderBlock.cpp:
851         (WebCore::RenderBlock::addChild):
852         (WebCore::RenderBlock::repaintOverhangingFloats):
853         (WebCore::RenderBlock::fillInlineSelectionGaps):
854         (WebCore::RenderBlock::positionForPoint):
855         (WebCore::RenderBlock::calcInlinePrefWidths):
856         (WebCore::RenderBlock::hasLineIfEmpty):
857         * rendering/RenderBox.cpp:
858         (WebCore::RenderBox::imageChanged):
859         (WebCore::RenderBox::localCaretRect):
860         (WebCore::RenderBox::positionForPoint):
861         (WebCore::RenderBox::shrinkToAvoidFloats):
862         * rendering/RenderObject.h:
863         (WebCore::objectIsRelayoutBoundary):
864         * rendering/RenderTableCell.cpp:
865         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
866         * rendering/RenderText.cpp:
867         (WebCore::RenderText::calcPrefWidths):
868         * rendering/bidi.cpp:
869         (WebCore::RenderBlock::determineStartPosition):
870         (WebCore::textWidth):
871         * rendering/style/RenderStyle.cpp:
872         (WebCore::RenderStyle::diff):
873         * rendering/style/StyleInheritedData.cpp:
874         (WebCore::cursorDataEquivalent):
875         * rendering/style/StyleRareInheritedData.cpp:
876         (WebCore::StyleRareInheritedData::shadowDataEquivalent):
877         * rendering/style/StyleRareNonInheritedData.cpp:
878         (WebCore::StyleRareNonInheritedData::shadowDataEquivalent):
879         (WebCore::StyleRareNonInheritedData::animationDataEquivalent):
880         (WebCore::StyleRareNonInheritedData::transitionDataEquivalent):
881
882 2009-03-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
883
884         Reviewed by Holger Freyther.
885
886         https://bugs.webkit.org/show_bug.cgi?id=24804
887         [GTK] 401 responses cause rogue content to be loaded
888
889         Our soup code handles 401 responses itself, so we should not feed
890         the headers and data of those responses to the loader.
891
892         * platform/network/soup/ResourceHandleSoup.cpp:
893         (WebCore::gotHeadersCallback):
894         (WebCore::gotChunkCallback):
895
896 2009-03-25  Geoffrey Garen  <ggaren@apple.com>
897
898         Reviewed by Oliver Hunt and Darin Adler.
899         
900         Fixed <rdar://problem/6603167> Crash in WebKit!JSC::JSGlobalObject::resetPrototype
901         during Stress test (#3 & #7 WER crashes for Safari 4 Beta)
902         
903         The problem was that allocation of the global object would, for just a
904         moment, leave the global object's prototype unprotected from GC. This
905         bug doesn't apply to non-global DOM objects because their prototypes are
906         cached and marked by the global object.
907
908         No test case because the crashing condition is hard to deterministically
909         produce in a normal build, and in a Windows Release build with
910         COLLECT_ON_EVERY_ALLOCATION set to 1, existing tests crash/hang.
911
912         * bindings/js/JSDOMWindowShell.cpp:
913         (WebCore::JSDOMWindowShell::setWindow):
914         * bindings/js/WorkerScriptController.cpp:
915         (WebCore::WorkerScriptController::initScript): Protect the global object's
916         prototype from GC during construction, since the global object does not
917         yet point to it, and therefore won't mark it.
918
919 2009-03-25  Dean Jackson  <dino@apple.com>
920
921         Reviewed by Simon Fraser
922
923         https://bugs.webkit.org/show_bug.cgi?id=23361
924
925         When using hardware compositing, some images can be directly
926         rendered by the hardware - no need to draw them into a separate
927         context, therefore saving memory.
928         Only images with certain style properties can be directly
929         composited - basically anything that is not a simple image requires
930         the usual rendering path (eg. if the image has borders).
931
932         Test: compositing/direct-image-compositing.html
933
934         * manual-tests/resources/simple_image.png: Added.
935         * manual-tests/simple-image-compositing.html: Added.
936         * platform/graphics/Image.h:
937         (WebCore::Image::startAnimation):
938             - move this to public
939         * rendering/RenderImage.cpp:
940         (WebCore::RenderImage::imageChanged):
941             - poke compositing layer if image has changed
942         (WebCore::RenderImage::notifyFinished):
943             - let the compositing layer know that it can render the image
944         * rendering/RenderImage.h:
945         * rendering/RenderLayer.cpp:
946         (WebCore::RenderLayer::rendererContentChanged):
947         * rendering/RenderLayer.h:
948         * rendering/RenderLayerBacking.cpp:
949         (WebCore::RenderLayerBacking::canUseInnerContentLayer):
950         (WebCore::RenderLayerBacking::detectDrawingOptimizations):
951         (WebCore::RenderLayerBacking::rendererContentChanged):
952         * rendering/RenderLayerBacking.h:
953             - code to hook up direct compositing of images where
954               possible
955
956 2009-03-25  David Levin  <levin@chromium.org>
957
958         Reviewed by Dimitri Glazkov.
959
960         Chromium build fix. Fix #include in V8NodeFilterCondition.cpp due to the
961         rename of V8NodeFilter to V8NodeFilterCondition.
962
963         * bindings/v8/V8NodeFilterCondition.cpp:
964
965 2009-03-25  Simon Fraser  <simon.fraser@apple.com>
966
967         Reviewed by Darin Adler
968         
969         https://bugs.webkit.org/show_bug.cgi?id=24817
970         
971         When the slider range is zero, avoid a divide by zero, which caused the
972         thumb to be positioned off in the weeds, which broke painting.
973
974         Test: media/video-empty-source.html
975
976         * rendering/RenderSlider.cpp:
977         (WebCore::SliderRange::proportionFromValue):
978         (WebCore::SliderRange::valueFromProportion):
979         (WebCore::sliderPosition):
980         (WebCore::RenderSlider::setValueForPosition):
981
982 2009-03-24  Eric Seidel  <eric@webkit.org>
983
984         Reviewed by Darin Adler.
985
986         Remove dead code and style cleanup
987         https://bugs.webkit.org/show_bug.cgi?id=24684
988
989         * html/CanvasStyle.cpp:
990         (WebCore::CanvasStyle::CanvasStyle):
991           Coverty was annoyed that we didn't initialize all of our members.  I agree, but I didn't
992           want to paste all 8 members each time, so I just cleaned up the existing constructors and left them.
993         * page/FocusController.cpp:
994         (WebCore::FocusController::setFocusedNode):
995           "node" was checked just above and is already known to be non-null
996         * rendering/RenderLayer.cpp:
997         (WebCore::RenderLayer::insertOnlyThisLayer):
998           We were already using parentLayer w/o a NULL check above, so just add an explicit ASSERT and use it w/o NULL check
999         (WebCore::RenderLayer::resize):
1000           element is already ASSERTed above, no need to null check it here
1001         * rendering/RenderTableSection.cpp:
1002         (WebCore::RenderTableSection::addCell):
1003           currentCell.cell was just assigned to the value "cell" which is known to be non-null, no need to null check again.
1004
1005 2009-03-24  Eric Seidel  <eric@webkit.org>
1006
1007         Reviewed by Darin Adler.
1008
1009         Move ASSERT(foo) to before where foo-> is used
1010         https://bugs.webkit.org/show_bug.cgi?id=24684
1011
1012         * platform/chromium/PasteboardChromium.cpp:
1013         (WebCore::Pasteboard::writeImage):
1014           Move ASSERTs to the top of the function, code was using "node" before ASSERT(node), once I moved
1015           ASSERT(node) to the top of the function it made sense to move the rest of them there too.
1016         * rendering/SVGRenderSupport.cpp:
1017         (WebCore::prepareToRenderSVGContent):
1018           move ASSERT(object) to *before* we use "object" :)
1019
1020 2009-03-24  Eric Seidel  <eric@webkit.org>
1021
1022         Reviewed by Simon Fraser.
1023
1024         Make TextTokenizer ASSERT that the buffer was freed
1025         https://bugs.webkit.org/show_bug.cgi?id=24684
1026
1027         * loader/TextDocument.cpp:
1028         (WebCore::TextTokenizer::TextTokenizer):
1029         (WebCore::TextTokenizer::~TextTokenizer):
1030         (WebCore::TextTokenizer::finish):
1031           Make it clear by adding a ~TextTokenizer that finish() will always be called and the memory never leaked.
1032
1033 2009-03-24  Eric Seidel  <eric@webkit.org>
1034
1035         Reviewed by Darin Adler.
1036
1037         Fix case where lBreak.obj->isBR() when lBreak.obj was NULL
1038         https://bugs.webkit.org/show_bug.cgi?id=24684
1039
1040         I don't have a test case where we were taking the wrong path here
1041         However, adding an ASSERT(lBreak.obj) before this usage caused
1042         multiple bidi tests to fail, so lBreak.obj can be null here.
1043
1044         * rendering/bidi.cpp:
1045         (WebCore::RenderBlock::findNextLineBreak):
1046           lBreak.obj can be null, so we can't call ->isBR() on it unconditionally.
1047
1048 2009-03-24  Eric Seidel  <eric@webkit.org>
1049
1050         Reviewed by Simon Fraser.
1051
1052         Style cleanup and dead code removal in dom, editing
1053         https://bugs.webkit.org/show_bug.cgi?id=24684
1054
1055         * dom/ContainerNode.cpp:
1056         (WebCore::ContainerNode::getUpperLeftCorner):
1057         (WebCore::ContainerNode::getLowerRightCorner):
1058         (WebCore::ContainerNode::getRect):
1059           Coverty was (rightly) confused as to what the hell "o" was being used for
1060           and whether or not it would ever be NULL.  I added some ASSERTS so that people (and machines)
1061           would be less confused about the logic in getUpperLeftCorner/getLowerRightCorner
1062         * dom/Document.cpp:
1063         (WebCore::Document::recalcStyle):
1064           Remove dead code, this block already checked that change == Force
1065         * editing/ApplyStyleCommand.cpp:
1066         (WebCore::ApplyStyleCommand::removeInlineStyle):
1067           Coverty correctly identified that traversePreviousNodePostOrder can return NULL, thus
1068           prev will be null, and we don't really explicitly handle it (like we probably should)
1069           It's OK though, because we end up creating a null position object, which may not have
1070           been what we intended, but we certainly don't crash.
1071         * editing/InsertParagraphSeparatorCommand.cpp:
1072         (WebCore::InsertParagraphSeparatorCommand::doApply):
1073           Remove dead code, insertionPosition.node() is already checked to be non-null above.
1074         * editing/markup.cpp:
1075         (WebCore::appendStartMarkup):
1076           removed dead code, annotate is already known to be true at this point in the file
1077           !annotate was checked above, and break; was called.
1078
1079 2009-03-24  Eric Seidel  <eric@webkit.org>
1080
1081         Reviewed by Simon Fraser.
1082
1083         CSS dead code removal and cleanup from Coverty errors
1084         https://bugs.webkit.org/show_bug.cgi?id=24684
1085
1086         * css/CSSStyleSelector.cpp:
1087         (WebCore::CSSStyleSelector::applyProperty):
1088           Every other place in the code we check settings() for NULL, so I made these places
1089           check too, even though we should never be resolving style against a document which has
1090           no frame (which I believe is the only time settings() can be null)
1091         * css/CSSStyleSheet.cpp:
1092         (WebCore::CSSStyleSheet::styleSheetChanged):
1093           Removing dead code, "root" can never be null here.
1094         * css/SVGCSSStyleSelector.cpp:
1095         (WebCore::colorFromSVGColorCSSValue):
1096         (WebCore::CSSStyleSelector::applySVGProperty):
1097           Extra returns in the old macros caused dead code.  Removing the old macros and use modern
1098           ones instead. :)
1099           Extra null checks to value were not needed.  Added an ASSERT at the top of the function
1100           to make it clear that value will never be NULL.
1101           Added colorFromSVGColorCSSValue to clean up the code a little.
1102
1103 2009-03-24  Eric Seidel  <eric@webkit.org>
1104
1105         Reviewed by Simon Fraser.
1106
1107         Font fallback cleanup and added ASSERT for GlyphPageTreeNode
1108         https://bugs.webkit.org/show_bug.cgi?id=24684
1109
1110         * css/CSSFontSelector.cpp:
1111         (WebCore::compareFontFaces):
1112           Coverty was concerned that it was possible to index off the end of weightFallbackRuleSets
1113           I can't read the code well enough to tell, so I tried to make the code clearer
1114           and added an ASSERT.        
1115         * platform/graphics/GlyphPageTreeNode.cpp:
1116         (WebCore::GlyphPageTreeNode::initializePage):
1117           Coverty believes we can crash here due to j being larger than GlyphPage::size.  I think to is already
1118           known to be < GlyphPage::size due to the min() statement above, but not being sure I added an ASSERT.
1119
1120 2009-03-24  Eric Seidel  <eric@webkit.org>
1121
1122         Reviewed by Simon Fraser.
1123
1124         Coverty inspired fixes in Animations/Transforms
1125         https://bugs.webkit.org/show_bug.cgi?id=24684
1126
1127         * page/animation/AnimationBase.h:
1128           Fix animate() signatures to match so that the virtual methods actually override one another. :)
1129         * page/animation/AnimationController.cpp:
1130         (WebCore::AnimationControllerPrivate::removeFromStartTimeResponseWaitList):
1131           Attempt to fix this method, prevAnimation was never set to anything but NULL,
1132           as far as I can tell the author originally intended to update it at the end
1133           of the loop, which is what I changed this code to do.
1134         * page/animation/ImplicitAnimation.cpp:
1135         (WebCore::ImplicitAnimation::animate):
1136           Make method signature match AnimationBase::animate
1137         * page/animation/ImplicitAnimation.h:
1138         * page/animation/KeyframeAnimation.cpp:
1139         (WebCore::KeyframeAnimation::animate):
1140           Make method signature match AnimationBase::animate
1141         * page/animation/KeyframeAnimation.h:
1142         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1143         (WebCore::PerspectiveTransformOperation::blend):
1144           if (blendToIdentity) already returned above.
1145         * platform/graphics/transforms/RotateTransformOperation.cpp:
1146         (WebCore::RotateTransformOperation::blend):
1147           if (blendToIdentity) already returned above.
1148
1149 2009-03-25  Eli Fidler  <eli.fidler@torchmobile.com>
1150
1151         Reviewed by George Staikos.
1152
1153         Fix compiler warnings regarding assignments in if statements.
1154
1155         * html/HTMLFormElement.cpp:
1156         (WebCore::HTMLFormElement::createFormData):
1157         * plugins/PluginPackage.cpp:
1158         (WebCore::PluginPackage::compare):
1159
1160 2009-03-25  Dan Bernstein  <mitz@apple.com>
1161
1162         Reviewed by Dave Hyatt.
1163
1164         - fix <rdar://problem/6472150> repro crash in
1165           RenderBlock::rightmostPosition(bool, bool) const at mercotte.fr using
1166           menus
1167
1168         Test: fast/inline/continuation-positioned-reparenting.html
1169
1170         * rendering/RenderInline.cpp:
1171         (WebCore::RenderInline::splitFlow): When repurposing the existing
1172         container as the "pre" block, clear its positioned objects list, because
1173         positioned descendants may end up in a different block after the split.
1174
1175 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
1176
1177         Reviewed by Dave Hyatt
1178         
1179         https://bugs.webkit.org/show_bug.cgi?id=24784
1180         
1181         Length values in transform operations need to take zoom into account.
1182
1183         Test: fast/transforms/transforms-with-zoom.html
1184
1185         * css/CSSStyleSelector.cpp:
1186         (WebCore::CSSStyleSelector::createTransformOperations):
1187
1188 2009-03-25  David Hyatt  <hyatt@apple.com>
1189
1190         Reviewed by Simon Fraser.
1191
1192         https://bugs.webkit.org/show_bug.cgi?id=24809, background-clip/origin don't use the correct
1193         values.  Add support for the new values (while preserving the old values for backwards
1194         compatibility).
1195
1196         Changed some existing test cases to use the new values.
1197
1198         * css/CSSParser.cpp:
1199         (WebCore::CSSParser::parseFillProperty):
1200         * css/CSSPrimitiveValueMappings.h:
1201         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1202         (WebCore::CSSPrimitiveValue::operator EFillBox):
1203         * css/CSSValueKeywords.in:
1204
1205 2009-03-25  Brett Wilson  <brettw@dhcp-172-22-71-191.mtv.corp.google.com>
1206
1207         Reviewed by Dimitri Glazkov.
1208
1209         Fix complex text opacity on the Chromium Windows port.
1210         https://bugs.webkit.org/show_bug.cgi?id=24757
1211
1212         Test: fast/text/complex-text-opacity.html
1213
1214         * platform/graphics/chromium/FontChromiumWin.cpp:
1215         (WebCore::):
1216         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
1217         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init):
1218         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
1219         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
1220         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter):
1221         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter):
1222         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds):
1223         (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs):
1224         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc):
1225         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter):
1226         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter):
1227         (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds):
1228         (WebCore::Font::drawGlyphs):
1229         (WebCore::Font::drawComplexText):
1230
1231 2009-03-25  David Hyatt  <hyatt@apple.com>
1232
1233         Reviewed by Eric Seidel
1234
1235         Fix for bug 23198, border images should not clip to border radii.  The border-image should just ignore
1236         the border-radius, since the assumption is that any desired rounding will be built into the border-image
1237         itself.
1238
1239         Note that I do not agree with this change, but I am matching the spec.
1240
1241         Added fast/borders/border-image-border-radius.html
1242
1243         * rendering/RenderBoxModelObject.cpp:
1244         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1245
1246 2009-03-25  Gustavo Noronha Silva  <gns@gnome.org>
1247
1248         Reviewed by Holger Freyther.
1249
1250         https://bugs.webkit.org/show_bug.cgi?id=24750
1251         [GTK] requests download instead of displaying page
1252
1253         Fix the Content-Type headers we get from soup, so that we set a
1254         proper media type on the ResourceResponse.
1255
1256         * platform/network/soup/ResourceHandleSoup.cpp:
1257         (WebCore::fillResponseFromMessage):
1258
1259 2009-03-25  Gustavo Noronha Silva  <gns@gnome.org>
1260
1261         Reviewed by Holger Freyther.
1262
1263         https://bugs.webkit.org/show_bug.cgi?id=24600
1264         [GTK] responses with status code >= 400 should not be given special treatment
1265
1266         Do not special case requests that have HTTP responses >=
1267         400. Redirects are handled automatically by libsoup, but the rest
1268         of the responses should be treated like any other.
1269
1270         * platform/network/soup/ResourceHandleSoup.cpp:
1271         (WebCore::):
1272         (WebCore::gotHeadersCallback):
1273         (WebCore::gotChunkCallback):
1274         (WebCore::finishedCallback):
1275
1276 2009-03-25  Darin Adler  <darin@apple.com>
1277
1278         Reviewed by John Sullivan.
1279
1280         Tidy up LegacyWebArchive a bit. And don't include favicons in web archives when
1281         they are being used only for selections, not an entire document.
1282
1283         * WebCore.base.exp: Remove exported function that's not used in WebKit.
1284
1285         * loader/archive/cf/LegacyWebArchive.cpp:
1286         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Made a static member
1287         function so it can share private things with other member functions. Added some FIXME
1288         comments to a branch of code I think is dead. Changed boolean argument into a named
1289         one. Renamed to match other similar functions.
1290         (WebCore::LegacyWebArchive::createResourceResponseFromPropertyListData): Ditto.
1291         (WebCore::LegacyWebArchive::createResource): Ditto.
1292         (WebCore::LegacyWebArchive::create): Merged the create and init functions.
1293         (WebCore::LegacyWebArchive::rawDataRepresentation): Added some assertions because
1294         we should never fail to write (we can fail to read).
1295         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Made a static
1296         member function as above.
1297         (WebCore::LegacyWebArchive::createFromSelection): Ditto.
1298         (WebCore::LegacyWebArchive::create): Iterate the vector with indices rather than
1299         iterators. Only include the favicon if the first node is the document since we don't
1300         want to include the favicon when copying and pasting.
1301
1302         * loader/archive/cf/LegacyWebArchive.h: Made one of the create functions private.
1303         Made the Mac-specific functions be static member functions. Made other helpers be
1304         static member functions. Removed the nit function.
1305
1306         * loader/archive/cf/LegacyWebArchiveMac.mm:
1307         (WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Updated
1308         comment and made this a static member function.
1309         (WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto. Also made
1310         it so we only type cast in one place.
1311
1312 2009-03-25  Darin Adler  <darin@apple.com>
1313
1314         Reviewed by David Hyatt.
1315
1316         Bug 24740: crash in RenderSlider::setPositionFromValue when calling pause() after setting <video> to display: none
1317         https://bugs.webkit.org/show_bug.cgi?id=24740
1318         rdar://problem/6679873
1319
1320         Bug 12104: Native Slider: When the thumb's height is specified as a percentage, it is not centered properly
1321         https://bugs.webkit.org/show_bug.cgi?id=12104
1322
1323         Test: media/video-display-none-crash.html
1324
1325         The problem here was that RenderSlider was trying to position its thumb in a way that
1326         requires it to call updateLayout inside rendering code. The right way to position a
1327         child renderer is to do layout, so I had to write a layout function. And then fix a few
1328         other small problems shown by the same test case.
1329
1330         * rendering/RenderSlider.cpp: Made defaultTrackLength have internal linkage.
1331         Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
1332         prefix for public DOM classes, not elements used as implementation details.
1333         Made SliderThumbElement function members private and got rid of unneeded default
1334         argument value for shadowParent.
1335         (WebCore::SliderRange::SliderRange): Added. Parses precision, max, and min attributes.
1336         (WebCore::SliderRange::clampValue): Added. Does standard clamping based on the above.
1337         (WebCore::SliderRange::valueFromElement): Added. Reads the value from the element in
1338         a way that clamps to the range.
1339         (WebCore::sliderPosition): Added. Computes the slider position: a double.
1340         (WebCore::SliderThumbElement::SliderThumbElement): Removed unneeded explicit
1341         initialization of m_initialClickPoint.
1342         (WebCore::SliderThumbElement::defaultEventHandler): Call setValueForPosition instead
1343         of calling setCurrentPosition and valueChanged.
1344         (WebCore::RenderSlider::RenderSlider): Remove unneeded explicit initialization of m_thumb.
1345         (WebCore::RenderSlider::styleDidChange): Remove unneeded second argument to createThumbStyle.
1346         (WebCore::RenderSlider::createThumbStyle): Remove unneeded second argument. Get rid of code
1347         setting the position to relative and setting the left and top. We now handle positioning
1348         in a custom layout function.
1349         (WebCore::RenderSlider::layout): Rewrote to handle positioning of the thumb as layout.
1350         (WebCore::RenderSlider::updateFromElement): Added code to immediately update the value
1351         in the element if it's out of range. This clamping used to be done as a side effect of
1352         setPositionFromValue. Also, this has nothing to do with the renderer, so at some point
1353         it could be moved into HTMLInputElement. Removed call to setPositionFromValue
1354         and instead just rely on the call to setNeedsLayout. Fix the setNeedsLayout call to be
1355         a normal setNeedsLayout(true), not a setNeedsLayout(true, false), because we do want
1356         this to be propagated to the parent -- it's not called during layout.
1357         (WebCore::RenderSlider::setValueForPosition): Refactor to use the new SliderRange
1358         class. Also don't call setCurrentPosition; instead just call setNeedsLayout.
1359         (WebCore::RenderSlider::currentPosition): Use the actual position of the renderer rather
1360         than the style to find the position; that means this needs to be done after layout is done.
1361         Also removed unneeded runtime checks and replaced them with assertions, after checking
1362         all callers to see they already guarantee this.
1363         (WebCore::RenderSlider::trackSize): Removed unneeded runtime checks and replaced them
1364         with assertions, after checking all callers to see they already guarantee this.
1365         (WebCore::RenderSlider::inDragMode): Added a null check for m_thumb so this won't
1366         crash if called early on a brand new RenderSlider.
1367
1368         * rendering/RenderSlider.h: Made all functions private except for forwardEvent and inDragMode.
1369         Renamed HTMLSliderThumbElement to SliderThumbElement because we only use the HTML
1370         prefix for public DOM classes, not elements used as implementation details. Made the
1371         mouseEventIsInThumb function non-virtual. Removed the return value and argument from
1372         setPositionFromValue. Removed valueChanged and setCurrentPosition. Removed the oldStyle
1373         argument to createThumbStyle (see above). Made SliderThumbElement a friend so it can use some
1374         private member functions.
1375
1376 2009-03-25  Eli Fidler  <eli.fidler@torchmobile.com>
1377
1378         Reviewed by George Staikos.
1379
1380         Fix ambiguous else cases by adding braces to nested if()s with elses.
1381
1382         * loader/MainResourceLoader.cpp:
1383         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1384         * page/EventHandler.cpp:
1385         (WebCore::EventHandler::updateDragAndDrop):
1386         * rendering/RenderListMarker.cpp:
1387         (WebCore::toArmenianUnder10000):
1388         * rendering/TextControlInnerElements.cpp:
1389         (WebCore::TextControlInnerTextElement::defaultEventHandler):
1390
1391 2009-03-24  Eli Fidler  <eli.fidler@torchmobile.com>
1392
1393         Reviewed by George Staikos.
1394
1395         Move variable into proper platform block to quiet warning.
1396
1397         * html/CanvasRenderingContext2D.cpp:
1398         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1399
1400 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
1401
1402         Reviewed by Antti Koivisto.
1403
1404         Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies
1405
1406         *  WebCore/html/HTMLMediaElement.cpp:
1407         (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having
1408         network state of NETWORK_NO_SOURCE.
1409
1410         *  WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1411         (WebCore::MediaPlayerPrivate::updateStates): Reset m_readyState at each state change since
1412         some types of movies currently cause QTKit's load state to bounce around. QTMovieLoadStatePlaythroughOK
1413         corresponds to HaveFutureData, not HaveEnoughData.
1414
1415 2009-03-24  Adele Peterson  <adele@apple.com>
1416
1417         Reviewed by Darin Adler.
1418
1419         Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
1420         <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
1421
1422         * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
1423         After breaking out of an empty mail blockquote, we still want continue with the deletion
1424         so actual content will get deleted, and not just the quote style.
1425
1426 2009-03-24  Darin Adler  <darin@apple.com>
1427
1428         Reviewed by Brady Eidson.
1429
1430         <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!)
1431
1432         * loader/archive/cf/LegacyWebArchive.cpp:
1433         (WebCore::LegacyWebArchive::create): Added a null check.
1434
1435 2009-03-24  Adam Langley  <agl@google.com>
1436
1437         Reviewed by Darin Fisher.
1438
1439         https://bugs.webkit.org/show_bug.cgi?id=24685
1440
1441         The Skia drawLine function takes subpixel values and attempts to draw
1442         a line with subpixel precision. This is complex and slow for drawing
1443         scrollbars which use only vertical and horizontal lines.
1444
1445         This changes the Chromium Linux scrollbar code to use drawIRect.
1446
1447         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1448         (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit):
1449         (WebCore::drawVertLine):
1450         (WebCore::drawHorizLine):
1451         (WebCore::drawBox):
1452         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
1453         (WebCore::ScrollbarThemeChromium::paintThumb):
1454
1455 2009-03-24  David Kilzer  <ddkilzer@apple.com>
1456
1457         Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
1458
1459         <https://bugs.webkit.org/show_bug.cgi?id=23310>
1460
1461         Reviewed by Darin Adler.
1462
1463         Test: fast/frames/iframe-no-src-set-location.html
1464
1465         * dom/Document.cpp:
1466         (WebCore::Document::completeURL): If m_baseURL is empty or is
1467         about:blank and we have a parent document, use the parent
1468         document's URL for the base when completing a new URL.
1469
1470 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
1471
1472         Reviewed by Dave Hyatt
1473         
1474         https://bugs.webkit.org/show_bug.cgi?id=24659
1475         
1476         When hit-testing 3d-transformed layers, it doesn't make sense to project the hitTestRect
1477         into the coordinate space of the layer, and doing so can result in pathalogical quads
1478         that break hit testing. In that case, simply use the same bounds as used for painting,
1479         which are the composited bounds for this layer.
1480
1481         Test: transforms/3d/hit-testing/rotated-hit-test.html
1482
1483         * rendering/RenderLayer.cpp:
1484         (WebCore::RenderLayer::hitTestLayer):
1485
1486 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
1487
1488         Reviewed by Dave Hyatt
1489
1490         https://bugs.webkit.org/show_bug.cgi?id=24436
1491         
1492         When compositing is enabled, painting and hit testing end up using different
1493         clipping roots, because, for painting, every composited layer is a clipping root,
1494         but for hit testing only layers with transforms are. To fix this, we use
1495         temporary clip rects for hit testing, if the page is in compositing mode.
1496
1497         * rendering/RenderLayer.cpp:
1498         (WebCore::RenderLayer::paintLayer):
1499         (WebCore::RenderLayer::hitTestLayer):
1500         (WebCore::RenderLayer::parentClipRects):
1501         (WebCore::RenderLayer::calculateRects):
1502         * rendering/RenderLayer.h:
1503
1504 2009-03-24  Simon Fraser  <simon.fraser@apple.com>
1505
1506         Reviewed by Dan Bernstein
1507         
1508         https://bugs.webkit.org/show_bug.cgi?id=24782
1509
1510         Fix regression with CSS clip rects with non-length values, by reverting to
1511         the original code, but passing the zoom multiplier through convertToLength().
1512         
1513         Also make stylistic change in createTransformOperations(), renaming 'inStyle'
1514         to 'style.
1515         
1516         Tested by existing tests.
1517
1518         * css/CSSStyleSelector.cpp:
1519         (WebCore::convertToLength):
1520         (WebCore::CSSStyleSelector::applyProperty):
1521         (WebCore::CSSStyleSelector::createTransformOperations):
1522
1523 2009-03-24  David Hyatt  <hyatt@apple.com>
1524
1525         Reviewed by Simon Fraser
1526
1527         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents
1528         to a border-radius.
1529
1530         This patch makes non-self-painting overflow layers and control clips work with border-radius.  RenderLayers
1531         that should be clipped by overflow ancestors with border-radius are still broken.
1532
1533         Added fast/clip/overflow-border-radius-clip.html
1534
1535         * rendering/RenderBox.cpp:
1536         (WebCore::RenderBox::pushContentsClip):
1537
1538 2009-03-24  David Hyatt  <hyatt@apple.com>
1539
1540         Reviewed by Simon Fraser
1541
1542         https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents.
1543         
1544         This first patch makes overflow:hidden properly clip the foreground contents of overflow:hidden replaced elements.  Common
1545         replaced elements now default to overflow:hidden in the UA stylesheet (this is what the spec specifically recommends be
1546         done).
1547     
1548         Added fast/replaced/border-radius-clip.html
1549
1550         * css/html4.css:
1551         * rendering/RenderReplaced.cpp:
1552         (WebCore::RenderReplaced::paint):
1553         * rendering/RenderWidget.cpp:
1554         (WebCore::RenderWidget::paint):
1555
1556 2009-03-24  Adele Peterson  <adele@apple.com>
1557
1558         RS by Mark Rowe.
1559
1560         Only build these Mail quirks checks in on the Mac.
1561
1562         * dom/Document.cpp: (WebCore::disableRangeMutation):
1563         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
1564
1565 2009-03-24  Brent Fulgham  <bfulgham@webkit.org>
1566
1567         Build fix, no review.
1568
1569         Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas
1570         and Debug targets.
1571
1572         * WebCore.vcproj/WebCore.vcproj:
1573
1574 2009-03-24  Eric Carlson  <eric.carlson@apple.com>
1575
1576         Fix layout tests broken by r41907.
1577
1578         * html/HTMLMediaElement.cpp:
1579         (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state
1580
1581 2009-03-24  Dmitry Titov  <dimich@chromium.org>
1582
1583         Reviewed by Dimitri Glazkov.
1584
1585         https://bugs.webkit.org/show_bug.cgi?id=24689
1586         Fix Chromium compilation errors.
1587
1588         * bindings/v8/WorkerContextExecutionProxy.cpp:
1589         (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
1590         (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
1591
1592 2009-03-24  Yury Semikhatsky  <yurys@chromium.org>
1593
1594         Reviewed by Darin Adler.
1595
1596         https://bugs.webkit.org/show_bug.cgi?id=24759
1597         Add missing methods Element.prototype.removeMatchingStyleClasses and
1598         Node.prototype.enclosingNodeOrSelfWithNodeNameInArray to SourceFrame content
1599         iframe. These methods are called by Element.prototype.removeStyleClass and
1600         Node.prototype.enclosingNodeOrSelfWithNodeName.
1601
1602         * inspector/front-end/SourceFrame.js:
1603         (WebInspector.SourceFrame.prototype._loaded):
1604
1605 2009-03-24  Mark Mentovai  <mark@chromium.org>
1606
1607         Reviewed by Mark Rowe.
1608
1609         https://bugs.webkit.org/show_bug.cgi?id=24653
1610         WebKit should be buildable without prefix header injection.
1611         Adds missing #includes and forward declarations as needed.
1612
1613         * editing/SmartReplaceCF.cpp:
1614         * platform/graphics/mac/ColorMac.mm:
1615         * platform/graphics/mac/FontCacheMac.mm:
1616         * platform/graphics/mac/FontCustomPlatformData.h:
1617         * platform/graphics/mac/FontMac.mm:
1618         * platform/graphics/mac/FontMacATSUI.mm:
1619         * platform/graphics/mac/FontPlatformData.h:
1620         * platform/graphics/mac/FontPlatformDataMac.mm:
1621         * platform/graphics/mac/GraphicsContextMac.mm:
1622         * platform/graphics/mac/SimpleFontDataMac.mm:
1623         * platform/mac/FoundationExtras.h:
1624         * platform/mac/LocalCurrentGraphicsContext.h:
1625         * platform/mac/WebCoreSystemInterface.h:
1626         * platform/mac/WebCoreSystemInterface.mm:
1627         * platform/mac/WebCoreTextRenderer.h:
1628         * platform/mac/WebCoreTextRenderer.mm:
1629         * platform/mac/WebFontCache.h:
1630         * platform/mac/WebFontCache.mm:
1631         * platform/text/PlatformString.h:
1632         * platform/text/mac/ShapeArabic.c:
1633         * platform/text/mac/StringMac.mm:
1634         * rendering/RenderThemeChromiumMac.h:
1635
1636 2009-03-24  Dan Bernstein  <mitz@apple.com>
1637
1638         Reviewed by Darin Adler.
1639
1640         - fix <rdar://problem/6107874> by capping the nesting depth of
1641           "block-level" elements generated by the parser
1642
1643         Test: fast/parser/block-nesting-cap.html
1644
1645         * html/HTMLParser.cpp:
1646         (WebCore::HTMLParser::HTMLParser):
1647         (WebCore::HTMLParser::insertNode):
1648         (WebCore::HTMLParser::pushBlock):
1649         (WebCore::HTMLParser::popOneBlockCommon):
1650         (WebCore::HTMLParser::freeBlock):
1651         * html/HTMLParser.h:
1652
1653 2009-03-23  Greg Bolsinga  <bolsinga@apple.com>
1654
1655         Reviewed by David Kilzer.
1656
1657         https://bugs.webkit.org/show_bug.cgi?id=24771
1658         
1659         DOMTimeStamps are based upon 1970.
1660
1661         * platform/mac/GeolocationServiceMac.mm:
1662         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
1663
1664 2009-03-23  Eric Seidel  <eric@webkit.org>
1665
1666         Build fix, no review.
1667
1668         * rendering/RenderObject.cpp:
1669         (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull()
1670
1671 2009-03-23  Eric Seidel  <eric@webkit.org>
1672
1673         Reviewed by Darin Adler.
1674
1675         Rename Position::container to m_anchorNode and make it private
1676         https://bugs.webkit.org/show_bug.cgi?id=24760
1677
1678         More code cleanup for Position.
1679
1680         Change all uses of m_container to node()
1681         Eventually most uses of node() should change to anchorNode() to designate
1682         that it's the node the Position is anchored to, but not necessarily the
1683         container of the position (it could be the before/after neighbor).
1684
1685         Remove any code which sets m_container, and change it to use a new
1686         Position::moveToPosition function which takes a node and offset.
1687         It never makes sense to change the node and leave the offset.
1688
1689         * dom/Position.h:
1690         (WebCore::Position::Position):
1691         (WebCore::Position::clear):
1692         (WebCore::Position::anchorNode):
1693         (WebCore::Position::node):
1694         (WebCore::Position::moveToPosition):
1695         (WebCore::Position::moveToOffset):
1696         (WebCore::Position::isNull):
1697         (WebCore::Position::isNotNull):
1698         (WebCore::operator==):
1699         * dom/Range.cpp:
1700         (WebCore::Range::create):
1701         (WebCore::Range::compareBoundaryPoints):
1702         * dom/RangeBoundaryPoint.h:
1703         (WebCore::RangeBoundaryPoint::container):
1704         (WebCore::RangeBoundaryPoint::set):
1705         (WebCore::RangeBoundaryPoint::setOffset):
1706         (WebCore::RangeBoundaryPoint::setToChild):
1707         (WebCore::RangeBoundaryPoint::setToStart):
1708         (WebCore::RangeBoundaryPoint::setToEnd):
1709
1710 2009-03-17  Eric Seidel  <eric@webkit.org>
1711
1712         Reviewed by David Hyatt.
1713
1714         document.write() should be able to make a document strict mode
1715         https://bugs.webkit.org/show_bug.cgi?id=24336
1716
1717         Remove an implicit write of "<html>" on the first document.write call
1718         this was added as part of a KDE import http://trac.webkit.org/changeset/798
1719         with no layout test or explanation.  I can't think of any reason why
1720         an implicit <html> write is necessary (or correct), so I'm removing it and
1721         adding a test for the correct behavior.  The parser will add any necessary
1722         HTMLHTMLElements during the write() anyway.
1723
1724         Our behavior is now tested by fast/dom/Document/document-write-doctype
1725         and matches IE, FF fails this new test.  Mozilla bug filed:
1726         https://bugzilla.mozilla.org/show_bug.cgi?id=483908
1727
1728         * dom/Document.cpp:
1729         (WebCore::Document::write):
1730
1731 2009-03-23  Sam Weinig  <sam@webkit.org>
1732
1733         Reviewed by Dan Bernstein.
1734
1735         Fix for <rdar://problem/6140966>
1736         Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
1737
1738         * WebCore.base.exp:
1739         * WebCore.xcodeproj/project.pbxproj:
1740         * loader/CrossOriginPreflightResultCache.cpp:
1741         (WebCore::CrossOriginPreflightResultCache::empty):
1742         * loader/CrossOriginPreflightResultCache.h:
1743
1744 2009-03-23  Darin Adler  <darin@apple.com>
1745
1746         Reviewed by Adele Peterson.
1747
1748         Bug 24726: hit testing doesn't work right when the click is on anonymous content
1749         https://bugs.webkit.org/show_bug.cgi?id=24726
1750         rdar://problem/6696992
1751
1752         Test: editing/selection/hit-test-anonymous.html
1753
1754         * rendering/RenderBR.cpp:
1755         (WebCore::RenderBR::positionForPoint): Call createVisiblePosition instead of
1756         creating a VisiblePosition directly. It will handle finding non-anonymous
1757         content nearby if node() is 0.
1758         * rendering/RenderBlock.cpp:
1759         (WebCore::positionForPointRespectingEditingBoundaries): Ditto.
1760         (WebCore::positionForPointWithInlineChildren): Ditto.
1761         (WebCore::RenderBlock::positionForPoint): Ditto.
1762         * rendering/RenderBox.cpp:
1763         (WebCore::RenderBox::positionForPoint): Ditto.
1764         * rendering/RenderObject.cpp:
1765         (WebCore::RenderObject::positionForPoint): Ditto.
1766         (WebCore::RenderObject::createVisiblePosition): Added.
1767         * rendering/RenderObject.h: Added createVisiblePosition.
1768         * rendering/RenderReplaced.cpp:
1769         (WebCore::RenderReplaced::positionForPoint): Call createVisiblePosition.
1770         * rendering/RenderSVGInlineText.cpp:
1771         (WebCore::RenderSVGInlineText::positionForPoint): Ditto.
1772         * rendering/RenderText.cpp:
1773         (WebCore::RenderText::positionForPoint): Ditto.
1774
1775 2009-03-23  Adele Peterson  <adele@apple.com>
1776
1777         Reviewed by Darin Adler & Dave Hyatt.
1778
1779         Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade
1780
1781         Leopard Mail doesn't expect <style> to be in the body.  This change reverts back to the old behavior of
1782         moving <style> to <head> for that version of Mail.
1783
1784         * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
1785
1786 2009-03-23  Adele Peterson  <adele@apple.com>
1787
1788         Reviewed by Mark Rowe & Dave Hyatt.
1789
1790         Merge some of the individual Mail quirks into two settings that we can check for future quirks.
1791
1792         * WebCore.base.exp:
1793         * dom/Document.cpp:
1794         (WebCore::disableRangeMutation):
1795         (WebCore::Document::nodeChildrenChanged):
1796         (WebCore::Document::nodeWillBeRemoved):
1797         (WebCore::Document::textInserted):
1798         (WebCore::Document::textRemoved):
1799         (WebCore::Document::textNodesMerged):
1800         (WebCore::Document::textNodeSplit):
1801         * page/Settings.cpp:
1802         (WebCore::Settings::Settings):
1803         (WebCore::Settings::setNeedsLeopardMailQuirks):
1804         (WebCore::Settings::setNeedsTigerMailQuirks):
1805         * page/Settings.h:
1806         (WebCore::Settings::needsLeopardMailQuirks):
1807         (WebCore::Settings::needsTigerMailQuirks):
1808
1809 2009-03-23  Ada Chan  <adachan@apple.com>
1810
1811         https://bugs.webkit.org/show_bug.cgi?id=24762
1812         Support text-indent in <option> elements on windows platform.
1813
1814         Reviewed by Adele Peterson.
1815
1816         * css/themeWin.css:
1817         * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now.  Make this
1818         explicit via windows themed default stylesheet.
1819         (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
1820         (WebCore::PopupMenuStyle::textIndent):
1821         (WebCore::PopupMenuStyle::textDirection):
1822         * platform/win/PopupMenuWin.cpp:
1823         (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and 
1824         text-indent is specified with LTR direction.
1825         * rendering/RenderMenuList.cpp:
1826         (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
1827         (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
1828         (WebCore::RenderMenuList::menuStyle): Ditto.
1829         * rendering/RenderTextControlSingleLine.cpp:
1830         (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
1831         * rendering/RenderTheme.h:
1832         (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added.  Default is false since we are only supporting it in windows for now.
1833         * rendering/RenderThemeWin.h:
1834         (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.
1835
1836 2009-03-23  Sam Weinig  <sam@webkit.org>
1837
1838         Reviewed by Anders Carlsson.
1839
1840         Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
1841         REGRESSION: Java Applets broken
1842         <rdar://problem/6707494>
1843
1844         Fix loading Java applets without a codeBase. Only pass the base (up to the
1845         the last path component) of the baseURL to the plug-in.
1846
1847         * html/HTMLAppletElement.cpp:
1848         (WebCore::HTMLAppletElement::createRenderer):
1849         * platform/KURL.cpp:
1850         (WebCore::KURL::baseAsString):
1851         * platform/KURL.h:
1852
1853 2009-03-23  Darin Adler  <darin@apple.com>
1854
1855         Reviewed by Sam Weinig.
1856
1857         * platform/KURL.h: Removed now-incorrect comments.
1858         None of the parts include the separator characters any more, now that
1859         query doesn't include the "?", so the comments explaining which do and do
1860         not are no-longer helpful.
1861
1862 2009-03-23  David Levin  <levin@chromium.org>
1863
1864         Reviewed by Dimitri Glazkov.
1865
1866         https://bugs.webkit.org/show_bug.cgi?id=24764
1867
1868         Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
1869         class names.  Also fixed some headers that got mangled in search/replace
1870         operations.
1871
1872         No change in behavior, so no test.
1873
1874         * bindings/v8/V8NodeFilter.h: Removed.
1875         * bindings/v8/V8NodeFilterCondition.cpp: Renamed from WebCore/bindings/v8/V8NodeFilter.cpp.
1876         * bindings/v8/V8NodeFilterCondition.h: Added.
1877         * bindings/v8/custom/V8ClipboardCustom.cpp:
1878         * bindings/v8/custom/V8DocumentCustom.cpp:
1879         * bindings/v8/custom/V8ElementCustom.cpp:
1880         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1881         * bindings/v8/custom/V8NavigatorCustom.cpp:
1882
1883 2009-03-23  Darin Fisher  <darin@chromium.org>
1884
1885         Reviewed by Antti Koivisto.
1886
1887         https://bugs.webkit.org/show_bug.cgi?id=24741
1888
1889         Adds a unique across-browser-sessions identifier to FormData, which may
1890         be used by ResourceHandle as a secondary cache key to enable cached
1891         form submissions.
1892
1893         At issue: two otherwise identical form submissions may result in
1894         completely independent responses, which may each be appropriate to
1895         store and reuse from cache.
1896
1897         * html/HTMLFormElement.cpp: Added call to FormData::setIdentifier so that
1898         we only enable cached form submissions for those generated by HTML.  This
1899         way we do not bother with POSTs generated by XMLHttpRequest.
1900         (WebCore::generateFormDataIdentifier):
1901         (WebCore::HTMLFormElement::createFormData):
1902         * platform/network/FormData.cpp: Initialize m_identifier to 0, which means
1903         the unspecified identifier.  So by default there is no identifier and
1904         nothing changes.
1905         (WebCore::FormData::FormData):
1906         * platform/network/FormData.h: Added m_identifier with setter and getter.
1907         (WebCore::FormData::setIdentifier):
1908         (WebCore::FormData::identifier):
1909
1910 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
1911
1912         Reviewed by Antti Koivisto
1913         
1914         https://bugs.webkit.org/show_bug.cgi?id=24733
1915         
1916         Fix media controller with full-page zoom. Previously, the media controller
1917         shadow nodes never saw style changes on the RenderMedia, so did not respond
1918         to zooming at all. Now, we update the style on the shadow renderers
1919         whenever RenderMedia gets a style change. Also fix the video thumb in
1920         the theme to be scaled properly.
1921
1922         Test: media/video-controls-zoomed.html
1923
1924         * rendering/MediaControlElements.cpp:
1925         (WebCore::MediaControlShadowRootElement::updateStyle):
1926         (WebCore::MediaTextDisplayElement::MediaTextDisplayElement):
1927         (WebCore::MediaTextDisplayElement::updateStyle):
1928         (WebCore::MediaControlInputElement::MediaControlInputElement):
1929         (WebCore::MediaControlInputElement::updateStyle):
1930         * rendering/MediaControlElements.h:
1931         * rendering/RenderMedia.cpp:
1932         (WebCore::RenderMedia::styleDidChange):
1933         * rendering/RenderMedia.h:
1934         * rendering/RenderThemeMac.mm:
1935         (WebCore::RenderThemeMac::adjustSliderThumbSize):
1936
1937 2009-03-23  Mike Belshe  <mike@belshe.com>
1938
1939         Reviewed by Darin Adler.
1940
1941         https://bugs.webkit.org/show_bug.cgi?id=24739
1942
1943         Rework StringImpl::create methods to try to allocate a single buffer
1944         rather than allocating both the StringImpl class and a separate data
1945         buffer.
1946
1947         * platform/text/StringImpl.cpp:
1948         * platform/text/StringImpl.h:
1949
1950 2009-03-23  Darin Adler  <darin@apple.com>
1951
1952         Reviewed by Antti Koivisto.
1953
1954         Based on a patch by Nico Weber <nicolasweber@gmx.de>
1955
1956         Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression
1957         https://bugs.webkit.org/show_bug.cgi?id=24755
1958
1959         * platform/text/TextEncoding.cpp:
1960         (WebCore::TextEncoding::isUTF7Encoding): Added. Checks if the current encoding
1961         is UTF7 without loading extended codecs.
1962         (WebCore::TextEncoding::encodingForFormSubmission): Use isUTF7Encoding() instead
1963         of comparing with UTF7Encoding(). Eliminate the explicit check of
1964         noExtendedTextEncodingNameUsed() because that's now handled by the functions
1965         that this function calls instead.
1966
1967         * platform/text/TextEncoding.h: Added isUTF7Encoding function.
1968         Also tweaked formatting a bit.
1969
1970 2009-03-20  Peter Kasting  <pkasting@google.com>
1971
1972         Reviewed by Darin Fisher.
1973
1974         https://bugs.webkit.org/show_bug.cgi?id=24720
1975         RenderThemeChromium should draw something for Slider parts instead of
1976         dropping them on the floor.
1977
1978         * platform/chromium/ChromiumBridge.h:
1979         * rendering/RenderThemeChromiumWin.cpp:
1980         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
1981         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
1982         (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
1983         (WebCore::RenderThemeChromiumWin::getThemeData):
1984         * rendering/RenderThemeChromiumWin.h:
1985         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
1986
1987 2009-03-23  Glen Murphy  <glen@chromium.org>
1988
1989         Reviewed by Darin Fisher.
1990
1991         https://bugs.webkit.org/show_bug.cgi?id=24657
1992
1993         Fix Skia drawing of highly scaled bitmaps; the conversion to
1994         IntRect produced visible layout test failures in highly scaled 
1995         coordinate systems.
1996
1997         Test: svg/custom/image-small-width-height.svg
1998
1999         * WebCore\platform\graphics\skia\ImageSkia.cpp:
2000
2001 2009-03-23  David Kilzer  <ddkilzer@apple.com>
2002
2003         Provide JavaScript exception information after slow script timeout
2004
2005         Reviewed by Oliver Hunt.
2006
2007         * bindings/js/ScriptController.cpp:
2008         (WebCore::ScriptController::evaluate): Changed to report
2009         exceptions for the Interrupted completion type as well.
2010
2011 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
2012
2013         Reviewed by Darin Adler
2014
2015         https://bugs.webkit.org/show_bug.cgi?id=24736
2016         
2017         Fix three mostly-unrelated problems with full-page zoom:
2018         
2019         * dom/Document.cpp:
2020         (WebCore::Document::elementFromPoint):
2021         Document::elementFromPoint() needs to take full-page zoom into account.
2022         
2023         * dom/MouseRelatedEvent.cpp:
2024         (WebCore::MouseRelatedEvent::receivedTarget):
2025         Take full-page zoom into account when computing offsetX/offsetY.
2026         
2027         * html/HTMLSelectElement.cpp:
2028         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2029         Don't use offsetX/offsetY when hit testing list boxes; offsets were broken
2030         with full-page zoom, and using pageX/pageY is easier because we don't
2031         have to worry about the event target, and we already have a point in
2032         absolute coordinates.
2033
2034         Tests: fast/forms/listbox-hit-test-zoomed.html
2035                fast/forms/search-zoomed.html
2036                fast/forms/slider-zoomed.html
2037
2038 2009-03-23  Simon Fraser  <simon.fraser@apple.com>
2039
2040         Reviewed by Dan Bernstein
2041
2042         https://bugs.webkit.org/show_bug.cgi?id=24753
2043         
2044         The rect for CSS 'clip' needs to have zooming applied to it.
2045
2046         Test: fast/css/clip-zooming.html
2047
2048         * css/CSSStyleSelector.cpp:
2049         (WebCore::CSSStyleSelector::applyProperty):
2050
2051 2009-03-23  Eric Carlson  <eric.carlson@apple.com>
2052
2053         Reviewed by Adam Roben.
2054
2055         <rdar://problem/6704282>
2056         https://bugs.webkit.org/show_bug.cgi?id=24719
2057         QTMovieWinTimer logic inversion
2058
2059         Fix logic inversion in the Win32 timer used by QTMovieWin that caused it to always
2060         use SetTimer, even when the intervals was below USER_TIMER_MINIMUM. A side effect of
2061         this was that a movie timer would sometimes be blocked for significant amounts of time 
2062         because WM_TIMER messages are not processed when the thread's message queue has any
2063         higher priority messages, and WebCore/Win's timer uses PostMessage for low interval
2064         timers. Also change SetTimer call to use HWND and custom message instead of 
2065         timer function since the timer already has an HWND for processing PostMessage.
2066
2067         Not possible to make a test for this because it is so timing dependant.
2068
2069         * platform/graphics/win/QTMovieWinTimer.cpp:
2070         (TimerWindowWndProc):
2071         (setSharedTimerFireDelay):
2072
2073 2009-03-23  Eric Carlson  <eric.carlson@apple.com>
2074
2075         Reviewed by Adele Peterson.
2076
2077         https://bugs.webkit.org/show_bug.cgi?id=24588
2078         
2079         Update media element implementation to current HTML5 spec
2080
2081         New tests: 
2082                media/media-constants.html
2083                media/video-seek-no-src-exception.html
2084                media/video-source-add-src.html
2085                media/video-src-invalid-remove.html
2086                media/video-src-plus-source.html
2087                media/video-timeupdate-during-playback.html
2088
2089         * dom/EventNames.h: Remove obsolute events, add new ones.
2090         * html/HTMLMediaElement.cpp:
2091         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize new member vars.
2092         (WebCore::HTMLMediaElement::attributeChanged): Trigger load() only when we don't
2093         have a source.
2094         (WebCore::HTMLMediaElement::removedFromDocument): Deal with state name changes.
2095         (WebCore::HTMLMediaElement::scheduleProgressEvent): New, create a progress event and 
2096         add it to the event queue to be dispatch when the timer fires.
2097         (WebCore::HTMLMediaElement::scheduleEvent): New, create a generic event and add
2098         it to the event queue to be dispatch when the timer fires.
2099         (WebCore::HTMLMediaElement::enqueueEvent): Add an event to the queue and ticke the 
2100         asynch event timer.
2101         (WebCore::HTMLMediaElement::asyncEventTimerFired): Dispatch all pending events.
2102         (WebCore::HTMLMediaElement::loadTimerFired): Either trigger the initial load or
2103         try to load the next <source> url.
2104         (WebCore::HTMLMediaElement::load): Minor style change.
2105         (WebCore::HTMLMediaElement::loadInternal): The first part of the spec load algorithm, cleanup
2106         the current load (if any) and set up state for a new load.
2107         (WebCore::HTMLMediaElement::selectMediaResource): Deal with no 'src' or <source>, post 'loadstart'
2108         event, and initiate load from 'src' if present.
2109         (WebCore::HTMLMediaElement::loadNextSourceChild): Initiate load from next <source> url, or trigger
2110         noneSupported() if no more to consider.
2111         (WebCore::HTMLMediaElement::loadResource): Instantiate a new MediaPlayer and ask it to load a url.
2112         (WebCore::HTMLMediaElement::startProgressEventTimer): Start the repeating progress event timer.
2113         (WebCore::HTMLMediaElement::noneSupported): Post error event and set up state when no valid 
2114         media url was found.
2115         (WebCore::HTMLMediaElement::mediaEngineError): Post error event and set up state when no valid 
2116         media engine failed with a decode error or a network error.
2117         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
2118         (WebCore::HTMLMediaElement::setNetworkState): Updated for new spec network states.
2119         (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
2120         (WebCore::HTMLMediaElement::setReadyState): Updated for new spec ready state.
2121         (WebCore::HTMLMediaElement::progressEventTimerFired): Bail if the network is not active.
2122         (WebCore::HTMLMediaElement::seek): Return INVALID_STATE_ERR exception if state is too low or
2123         if player hasn't been set up yet. This is necessary becase load() is async. Clear the flag
2124         we use to guard against sending 'ended' more than once.
2125         (WebCore::HTMLMediaElement::duration): Don't bother calling media engine before it has metadata.
2126         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Remove exception param, 0 is no longer an
2127         invalid rate. 
2128         (WebCore::HTMLMediaElement::setPlaybackRate): Remove exception param, 0 is no longer an
2129         invalid rate. Cache rate being set so we can use it later if media engine isn't ready now.
2130         (WebCore::HTMLMediaElement::play): Remove exception param, play() before load() now just
2131         starts loading asynchronously.
2132         (WebCore::HTMLMediaElement::playInternal): Remove exception param. Fire 'waiting' or 'playing'
2133         event depending on current state.
2134         (WebCore::HTMLMediaElement::pause): Remove exception param, pause() before load() now just
2135         starts loading asynchronously.
2136         (WebCore::HTMLMediaElement::pauseInternal): Remove exception param.
2137         (WebCore::HTMLMediaElement::setVolume): dispatchEventAsync -> scheduleEvent
2138         (WebCore::HTMLMediaElement::setMuted): dispatchEventAsync -> scheduleEvent
2139         (WebCore::HTMLMediaElement::togglePlayState): Remove exception param.
2140         (WebCore::HTMLMediaElement::beginScrubbing): pause() doesn't take an exception param.
2141         (WebCore::HTMLMediaElement::startPlaybackProgressTimer): New, starts timer that fires 4 times per
2142         second when the movie is playing to timeupdate so we can post 'timeupdate' events.
2143         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Timer proc.
2144         (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Bottleneck around scheduling a 'timeupdate'
2145         event because we both fire them them when the spec says we should and when the media engine
2146         says that time has jumped, but we don't want to fire more than one at a given movie time. We also
2147         use this bottleneck to keep track of the last time one was posted so we won't fire too often
2148         during playback.
2149         (WebCore::HTMLMediaElement::canPlay): readyState now tracks whether or not we have metadata.
2150         (WebCore::HTMLMediaElement::havePotentialSourceChild): New, checks to see if there are a <source>
2151         element with a 'src' attribute that we have not tried to load yet.
2152         (WebCore::HTMLMediaElement::nextSourceChild): New, returns the url and content type of the next
2153         <source> element that we haven't tried to load.
2154         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Schedule 'seeked' event when seeking completes.
2155         Set a flag when we post the 'ended' event, clear it when time changed and we aren't at the end since
2156         some media engines call this proc more than once when playback reaches the end and stops, but we
2157         don't want to post 'ended' more than once.
2158         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): New, added so media engine can inform
2159         when the movie duration changes and we can post 'durationchanged' event.
2160         (WebCore::HTMLMediaElement::mediaPlayerRateChanged): New, added so media engine can inform when
2161         the rate changed and we can updated our cached rate. This is useful because we only want to know
2162         post periodic 'timeupdate' events when the movie is actually playing, and because we want to know
2163         the actual playback rate when it differs from what we tried to set.
2164         (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): New, added so media engine can inform when
2165         a movie's intrinsic size changes and we can inform the renderer.
2166         (WebCore::HTMLMediaElement::potentiallyPlaying): Renamed from activelyPlaying since the spec now
2167         uses "actively playing" for this concept. Update logic for new state names and un-comment calls
2168         to stoppedDueToErrors() and pausedForUserInteraction() since the spec says those condiditons
2169         are part of the answer.
2170         (WebCore::HTMLMediaElement::endedPlayback): Update logic for new state names. 
2171         (WebCore::HTMLMediaElement::stoppedDueToErrors): New, spec says this logic should be part of
2172         the determination of "potentially playing".
2173         (WebCore::HTMLMediaElement::pausedForUserInteraction): New, placeholder for when (if) user
2174         agent supports this spec concept.
2175         (WebCore::HTMLMediaElement::updatePlayState): Stop timer used to fire periodic 'timeupdate' 
2176         events when we pauses the movie. Set the media engine rate before calling play() in case it
2177         wasn't set up when the rate was changed.
2178         (WebCore::HTMLMediaElement::stopPeriodicTimers): New, stop the progress event and 'timeupate'
2179         event timers.
2180         (WebCore::HTMLMediaElement::userCancelledLoad): New, logic pulled out of documentWillBecomeInactive
2181         and updated for the current spec.
2182         (WebCore::HTMLMediaElement::documentWillBecomeInactive): Moved some logic to userCancelledLoad.
2183         (WebCore::HTMLMediaElement::documentDidBecomeActive): Update comments.
2184         (WebCore::HTMLMediaElement::initialURL): Update for refactoring of code that determines the 
2185         initial url.
2186         * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec,
2187         update for changes in .cpp.
2188         (WebCore::HTMLMediaElement::):
2189
2190         * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes.
2191         defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions.
2192
2193         * html/HTMLSourceElement.cpp:
2194         (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes.
2195
2196         * html/HTMLVideoElement.cpp:
2197         (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes.
2198
2199         * html/MediaError.h:
2200         (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED.
2201
2202         * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED.
2203
2204         * loader/MediaDocument.cpp:
2205         (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception.
2206
2207         * platform/graphics/MediaPlayer.cpp:
2208         (WebCore::NullMediaPlayerPrivate::readyState): Update for newtork state name changes.
2209         (WebCore::MediaPlayer::sizeChanged): New, so engine can report intrinsic size changes.
2210         (WebCore::MediaPlayer::rateChanged): New, so engine can report rate changes.
2211         (WebCore::MediaPlayer::durationChanged): New, so engine can report duration changes.
2212         * platform/graphics/MediaPlayer.h: Update NetworkState and ReadyState enum names to match spec
2213         states.
2214         (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
2215         (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
2216         (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.
2217         (WebCore::MediaPlayer::):
2218
2219         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
2220         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
2221         (WebCore::MediaPlayerPrivate::load): Ditto.
2222         (WebCore::MediaPlayerPrivate::updateStates): Ditto.
2223         (WebCore::MediaPlayerPrivate::loadingFailed): Ditto.
2224
2225         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Update for network/ready state name changes.
2226         Remove endPointTimer, it is no longer necessary. Add m_enabledTrackCount and m_duration.
2227         (WebCore::MediaPlayerPrivate::metaDataAvailable):
2228         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2229         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer or m_endTime. Initialize
2230         m_enabledTrackCount and m_duration. Update for network/ready state name changes.
2231         (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes.
2232         (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
2233         (WebCore::MediaPlayerPrivate::pause): Ditto.
2234         (WebCore::MediaPlayerPrivate::currentTime): No more m_endTime.
2235         (WebCore::MediaPlayerPrivate::seek): Ditto.
2236         (WebCore::MediaPlayerPrivate::doSeek): Ditto, plus don't call setRate(0) when the rate is
2237         already zero.
2238         (WebCore::MediaPlayerPrivate::setEndTime): No more m_endTime.
2239         (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes. Return
2240         different errors depending on what causes a failure. Watch for and report duration changes.
2241         (WebCore::MediaPlayerPrivate::rateChanged): Report rate changes.
2242         (WebCore::MediaPlayerPrivate::sizeChanged): Report size changes.
2243         (WebCore::MediaPlayerPrivate::didEnd): No more endpoint timer.
2244         (WebCore::MediaPlayerPrivate::setVisible): Update for network/ready state name changes.
2245         (WebCore::MediaPlayerPrivate::disableUnsupportedTracks): Don't return number of unsupported
2246         tracks, store in m_enabledTrackCount so we can use it to help determine causes of failure.
2247
2248         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2249         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Update for network/ready state name changes.
2250         (WebCore::MediaPlayerPrivate::load): Ditto.
2251         (WebCore::MediaPlayerPrivate::duration): Ditto.
2252         (WebCore::MediaPlayerPrivate::updateStates): Ditto.
2253         (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
2254
2255         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2256         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): No more m_endPointTimer. Update for 
2257         network/ready state name changes.
2258         (WebCore::MediaPlayerPrivate::load): Update for network/ready state name changes. No more
2259         m_endPointTimer.
2260         (WebCore::MediaPlayerPrivate::play): No more m_endPointTimer.
2261         (WebCore::MediaPlayerPrivate::pause): Ditto. 
2262         (WebCore::MediaPlayerPrivate::setEndTime): Ditto.
2263         (WebCore::MediaPlayerPrivate::updateStates): Update for network/ready state name changes.
2264         (WebCore::MediaPlayerPrivate::didEnd): No more m_endPointTimer.
2265         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
2266
2267         * rendering/MediaControlElements.cpp:
2268         (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state 
2269         name changes.
2270         (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
2271
2272 2009-03-22  Kevin Ollivier  <kevino@theolliviers.com>
2273
2274         wxGTK build fix. Add missing header.
2275
2276         * platform/wx/wxcode/gtk/non-kerned-drawing.cpp:
2277
2278 2009-03-22  Simon Fraser  <simon.fraser@apple.com>
2279
2280         Reviewed by Dan Bernstein
2281         
2282         https://bugs.webkit.org/show_bug.cgi?id=24665
2283         
2284         Image-map code in RenderImage could result in RenderImage::nodeAtPoint()
2285         setting HitTestResult::innerNode(), but returning false, which violates
2286         hit testing rules. Use a temporary HitTestResult so that we only fill in
2287         result when we know we've hit.
2288
2289         * rendering/RenderImage.cpp:
2290         (WebCore::RenderImage::nodeAtPoint):
2291
2292 2009-03-22  Simon Fraser  <simon.fraser@apple.com>
2293
2294         Reviewed by Dan Bernstein
2295         
2296         https://bugs.webkit.org/show_bug.cgi?id=24743
2297         
2298         Fix hit testing regression from r41840. We need to pass the temporary
2299         HitTestResult when testing sublayers, then only copy to 'result' when
2300         the layer is known to have been hit.
2301
2302         Test: fast/layers/zindex-hit-test.html
2303
2304         * rendering/RenderLayer.cpp:
2305         (WebCore::RenderLayer::hitTestLayer):
2306
2307 2009-03-20  Simon Fraser  <simon.fraser@apple.com>
2308
2309         Reviewed by Darin Adler
2310
2311         https://bugs.webkit.org/show_bug.cgi?id=24733
2312         
2313         Fix hit testing on video controls after full page zoom by fixing wider issue
2314         with event->pageX(), pageY() with zooming. pageX and pageY are "fixed" to be
2315         invariant under zooming (for JavaScript), so we keep an actual page point around
2316         in MouseEvent::absoluteLocation() to avoid the need to factor in zooming everywhere.
2317
2318         * dom/MouseRelatedEvent.cpp:
2319         (WebCore::MouseRelatedEvent::initCoordinates):
2320         (WebCore::MouseRelatedEvent::computePageLocation):
2321         * dom/MouseRelatedEvent.h:
2322         (WebCore::MouseRelatedEvent::absoluteLocation):
2323         (WebCore::MouseRelatedEvent::setAbsoluteLocation):
2324         Member var, and getter and setter for absoluteLocation.
2325         New method, computePageLocation(), to compute the actual page point,
2326         and call it when creating and initting mouse-related events.
2327
2328         * dom/Node.cpp:
2329         (WebCore::Node::dispatchMouseEvent):
2330         (WebCore::Node::dispatchWheelEvent):
2331         Keep non-adjusted pageX and pageY around, and call setAbsoluteLocation()
2332         on the event to replace a potentially rounded point.
2333         
2334         * html/HTMLInputElement.cpp:
2335         (WebCore::HTMLInputElement::defaultEventHandler):
2336         Clean up slider handling code.
2337         
2338         * html/HTMLSelectElement.cpp:
2339         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2340         Add FIXME comment for use of offsetX/offsetY.
2341         
2342         * page/ContextMenuController.cpp:
2343         (WebCore::ContextMenuController::handleContextMenuEvent):
2344         Use absoluteLocation() when hit testing for context menus.
2345         
2346         * rendering/RenderFrameSet.cpp:
2347         (WebCore::RenderFrameSet::userResize):
2348         Use absoluteLocation() when resizing frames.
2349         
2350         * rendering/RenderMedia.cpp:
2351         (WebCore::RenderMedia::forwardEvent):
2352         Use absoluteLocation() when hit testing media controls.
2353
2354         * rendering/RenderSlider.cpp:
2355         (WebCore::HTMLSliderThumbElement::defaultEventHandler):
2356         (WebCore::RenderSlider::mouseEventIsInThumb):
2357         Use absoluteLocation() when handling slider events.
2358
2359         (WebCore::RenderSlider::forwardEvent):
2360         Factor some code out of HTMLInputElement::defaultEventHandler().
2361         
2362         * rendering/RenderTextControlSingleLine.cpp:
2363         (WebCore::RenderTextControlSingleLine::forwardEvent):
2364         Use absoluteLocation() when hit testing search field buttons, which fixees
2365         bugs in the search field with zooming.
2366
2367 2009-03-21  David Levin  <levin@chromium.org>
2368
2369         Reviewed by Dimitri Glazkov.
2370
2371         https://bugs.webkit.org/show_bug.cgi?id=24727
2372         Add V8XMLHttpRequest*.
2373
2374         * bindings/v8/V8XMLHttpRequestUtilities.cpp: Added.
2375         * bindings/v8/V8XMLHttpRequestUtilities.h: Added.
2376         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Added.
2377         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: Added.
2378         * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp: Added.
2379
2380 2009-03-21  David Levin  <levin@chromium.org>
2381
2382         Reviewed by Dimitri Glazkov.
2383
2384         https://bugs.webkit.org/show_bug.cgi?id=24725
2385         Add V8NodeFilter.
2386
2387         * bindings/v8/V8NodeFilter.cpp: Added.
2388         * bindings/v8/V8NodeFilter.h: Added.
2389
2390 2009-03-21  Dan Bernstein  <mitz@apple.com>
2391
2392         Rubber-stamped by Kevin Decker
2393
2394         - remove some redundant #include statements
2395
2396         * bindings/js/JSDOMWindowBase.cpp:
2397
2398 2009-03-20  Dan Bernstein  <mitz@apple.com>
2399
2400         Reviewed by Mark Rowe.
2401
2402         - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code
2403
2404         * platform/graphics/win/FontCGWin.cpp:
2405         (WebCore::drawGDIGlyphs): Changed glyph stroking to fill and stroke each
2406         glyph as a separate path, instead of all glyphs as a single path. This
2407         matches what CGContextShowGlyphsWithAdvances() does, and has comparable
2408         performance.
2409
2410 2009-03-20  Dean Jackson  <dino@apple.com>
2411
2412         Reviewed by Simon Fraser
2413
2414         Build fix for ENABLE(3D_RENDERING)
2415
2416         * rendering/RenderObject.h:
2417         (WebCore::makeMatrixRenderable):
2418
2419 2009-03-20  Dave Moore  <davemoore@google.com>
2420
2421         Reviewed by Dimitri Glazkov.
2422
2423         https://bugs.webkit.org/show_bug.cgi?id=24705
2424
2425         A bug in the V8 bindings is preventing chromium from setting the href on the
2426         location object...any attempt throws a security error, not just for javascript
2427         protocol
2428
2429         * page/Location.idl:
2430
2431 2009-03-20  Craig Schlenter  <craig.schlenter@gmail.com>
2432
2433         Reviewed by Dimitri Glazkov.
2434
2435         https://bugs.webkit.org/show_bug.cgi?id=24608
2436
2437         Include stdio.h needed for printf on gcc 4.4.0
2438
2439         * platform/KURLGoogle.cpp:
2440
2441 2009-03-20  Mike Belshe <mike@belshe.com>
2442
2443         Reviewed by Darin Fisher.
2444
2445         https://bugs.webkit.org/show_bug.cgi?id=24577
2446
2447         Don't let comments at the end of an event handler
2448         break the event handler.
2449
2450         No change in behavior, so no test.
2451
2452         * bindings/v8/V8LazyEventListener.cpp:
2453         (WebCore::V8LazyEventListener::getWrappedListenerFunction):
2454
2455 2009-03-20  Norbert Leser  <norbert.leser@nokia.com>
2456
2457         Reviewed by Darin Adler.
2458
2459         https://bugs.webkit.org/show_bug.cgi?id=24535
2460
2461         Fixes missing line terminator character (;) after macro call.
2462         It is common practice to add the trailing ";" where macros are substituted
2463         and not where they are defined with #define.
2464         This change is consistent with other macro declarations across webkit,
2465         and it also solves compilation failure with symbian compilers. 
2466  
2467         No change in behavior, so no test.
2468
2469         * bindings/js/JSDOMWindowShell.cpp:
2470         * bindings/js/JSEventListener.cpp:
2471         * bindings/js/JSImageConstructor.cpp:
2472         * bindings/js/JSInspectedObjectWrapper.cpp:
2473         * bindings/js/JSInspectorCallbackWrapper.cpp:
2474         * bindings/js/JSNamedNodesCollection.cpp:
2475         * bindings/js/JSNodeFilterCondition.cpp:
2476         * bindings/js/JSOptionConstructor.cpp:
2477         * bindings/js/JSQuarantinedObjectWrapper.cpp:
2478         * bindings/js/JSRGBColor.cpp:
2479         * bindings/js/JSWorkerContextBase.cpp:
2480         * bindings/js/JSXMLHttpRequestConstructor.cpp:
2481         * bindings/js/JSXSLTProcessorConstructor.cpp:
2482         * bindings/scripts/CodeGeneratorJS.pm:
2483
2484 2009-03-20  Mike Belshe  <mike@belshe.com>
2485
2486         Reviewed by Dimitri Glazkov and Dave Hyatt.
2487
2488         https://bugs.webkit.org/show_bug.cgi?id=24324
2489
2490         Make the minimum timer configurable for different platforms.
2491
2492         * page/DOMTimer.cpp:
2493         (WebCore::DOMTimer::DOMTimer):
2494         (WebCore::DOMTimer::fired):
2495         * page/DOMTimer.h:
2496         (WebCore::DOMTimer::minTimerInterval):
2497         (WebCore::DOMTimer::setMinTimerInterval):
2498
2499 2009-03-20  Dean McNamee  <deanm@chromium.org>
2500
2501         Reviewed by Darin Adler.
2502
2503         https://bugs.webkit.org/show_bug.cgi?id=22834
2504
2505         Make sure to consistently match new/delete and fastMalloc/fastFree.
2506
2507         * css/CSSSelectorList.cpp:
2508         (WebCore::CSSSelectorList::adoptSelectorVector):
2509         (WebCore::CSSSelectorList::deleteSelectors):
2510
2511 2009-03-20  Dan Bernstein  <mitz@apple.com>
2512
2513         Reviewed by Dave Hyatt.
2514
2515         - fix https://bugs.webkit.org/show_bug.cgi?id=23739
2516           <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load
2517
2518         * rendering/RenderBlock.cpp:
2519         (WebCore::RenderBlock::percentHeightDescendants): Added this accessor.
2520         * rendering/RenderBlock.h:
2521         * rendering/RenderTableSection.cpp:
2522         (WebCore::RenderTableSection::layoutRows): Extended the check for
2523         children that flex to include other descendants with percent height
2524         which is relative to the cell.
2525
2526 2009-03-20  Dmitry Titov  <dimich@chromium.org>
2527
2528         Reviewed by Alexey Proskuryakov.
2529
2530         https://bugs.webkit.org/show_bug.cgi?id=24706
2531         Remove ScriptExecutionContext::encoding() since Workers do not need it.
2532         WorkerContext::encoding() is simply removed, while Document::encoding()
2533         made non-virtual and private. Workers use UTF-8 now except when instructed
2534         otherwise by http header. Also updated test.
2535
2536         * dom/Document.h: Made encoding() non-virtual and private.
2537         * dom/ScriptExecutionContext.h: removed encoding().
2538
2539         * workers/Worker.cpp:
2540         (WebCore::Worker::Worker):
2541         (WebCore::Worker::notifyFinished):
2542         * workers/WorkerContext.cpp: removed encoding() implementation.
2543         (WebCore::WorkerContext::WorkerContext):
2544         (WebCore::WorkerContext::completeURL):
2545         * workers/WorkerContext.h: removed encoding()
2546         (WebCore::WorkerContext::create):
2547         * workers/WorkerContextProxy.h:
2548         * workers/WorkerImportScriptsClient.cpp:
2549         (WebCore::WorkerImportScriptsClient::didReceiveData):
2550         * workers/WorkerMessagingProxy.cpp:
2551         (WebCore::WorkerMessagingProxy::startWorkerContext):
2552         * workers/WorkerMessagingProxy.h:
2553         * workers/WorkerThread.cpp:
2554         (WebCore::WorkerThreadStartupData::create):
2555         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
2556         (WebCore::WorkerThread::create):
2557         (WebCore::WorkerThread::WorkerThread):
2558         (WebCore::WorkerThread::workerThread):
2559         * workers/WorkerThread.h:
2560         In all these, removed storing encoding and 'inheriting' it from the parent.
2561         Instead, they are all using UTF-8 now.
2562
2563 2009-03-20  Timothy Hatcher  <timothy@apple.com>
2564
2565         Change how threading exceptions are checked so they are reported
2566         by what round they were added. That way WebKit can decided the
2567         behavior per-round based on linked-on-or-after checks.
2568
2569         <rdar://problem/6626741&6648478&6635474&6674079>
2570
2571         Reviewed by Darin Adler.
2572
2573         * WebCore.base.exp: Export the new symbols.
2574         * bindings/objc/DOMAbstractView.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
2575         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
2576         * platform/ThreadCheck.h:
2577         * platform/mac/ThreadCheck.mm:
2578         (WebCore::readThreadViolationBehaviorFromUserDefaults): Refactor how the default is read.
2579         (WebCore::setDefaultThreadViolationBehavior): Take a round argument.
2580         (WebCore::reportThreadViolation): Ditto.
2581         (WebCoreReportThreadViolation): Ditto.
2582
2583 2009-03-20  Geoffrey Garen  <ggaren@apple.com>
2584
2585         Reviewed by Sam Weinig.
2586
2587         Fixed up an out-of-date comment.
2588
2589         * bindings/js/JSDOMWindowCustom.h:
2590         (WebCore::JSDOMWindow::customPut):
2591
2592 2009-03-20  Beth Dakin  <bdakin@apple.com>
2593
2594         Reviewed by Dave Hyatt.
2595
2596         Fix for https://bugs.webkit.org/show_bug.cgi?id=20909 REGRESSION 
2597         (r35318): A press release at pfizer.com does not display correctly
2598         - and corresponding -
2599         <rdar://problem/6680073>
2600
2601         * rendering/RenderObject.cpp:
2602         (WebCore::RenderObject::invalidateContainerPrefWidths):
2603         * rendering/RenderObject.h:
2604         (WebCore::RenderObject::markContainingBlocksForLayout):
2605
2606 2009-03-20  Eric Seidel  <eric@webkit.org>
2607
2608         Reviewed by Justin Garcia.
2609
2610         maxDeepOffset is confusing and should be removed
2611         https://bugs.webkit.org/show_bug.cgi?id=24586
2612
2613         Abstract some hard-to-read (but shared) logic into a new renderedAsNonInlineTableOrHR function.
2614         Add first/lastDeepEditingPositionForNode Position creation functions
2615         and deploy them to places we used to call maxDeepOffset.
2616
2617         Rename Position::atStart and atEnd to atStartOfTree atEndOfTree
2618         Add a new Position::atFirst/atLastEditingPositionForNode() and use these
2619         to replace a few more callers for maxDeepOffset()
2620         
2621         Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)
2622
2623         "Editing positions" are confusing because they have one
2624         of two behaviors, depending on if the container node is ignored
2625         by editing (if editingIgnoresContent(node) returns true) or not.
2626         Positions referring to nodes ignored by editing are
2627         neighbor-relative (they are before or after the node) where as
2628         positions reffering to other nodes are container-relative
2629         (they are between two child nodes of the container, identified
2630         by the offset() member).  I will be fixing this confusion in
2631         future patches.  These renames hopefully make the current behavior clearer.
2632
2633         * dom/Position.cpp:
2634         (WebCore::Position::previous):
2635         (WebCore::Position::next):
2636         (WebCore::Position::atFirstEditingPositionForNode):
2637         (WebCore::Position::atLastEditingPositionForNode):
2638         (WebCore::Position::atStartOfTree):
2639         (WebCore::Position::atEndOfTree):
2640         (WebCore::Position::previousCharacterPosition):
2641         (WebCore::Position::nextCharacterPosition):
2642         (WebCore::Position::upstream):
2643         (WebCore::Position::isCandidate):
2644         (WebCore::firstDeepEditingPositionForNode):
2645         (WebCore::lastDeepEditingPositionForNode):
2646         * dom/Position.h:
2647         * dom/PositionIterator.cpp:
2648         (WebCore::PositionIterator::operator Position):
2649         (WebCore::PositionIterator::increment):
2650         (WebCore::PositionIterator::decrement):
2651         (WebCore::PositionIterator::atEnd):
2652         (WebCore::PositionIterator::atEndOfNode):
2653         * editing/CompositeEditCommand.cpp:
2654         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
2655         * editing/DeleteSelectionCommand.cpp:
2656         (WebCore::isTableCellEmpty):
2657         (WebCore::DeleteSelectionCommand::removeNode):
2658         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2659         * editing/Editor.cpp:
2660         (WebCore::Editor::advanceToNextMisspelling):
2661         * editing/InsertLineBreakCommand.cpp:
2662         (WebCore::InsertLineBreakCommand::doApply):
2663         * editing/InsertListCommand.cpp:
2664         (WebCore::InsertListCommand::doApply):
2665         * editing/ReplaceSelectionCommand.cpp:
2666         (WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent):
2667         * editing/TypingCommand.cpp:
2668         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2669         * editing/VisiblePosition.cpp:
2670         (WebCore::VisiblePosition::previous):
2671         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
2672         (WebCore::VisiblePosition::left):
2673         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
2674         (WebCore::VisiblePosition::right):
2675         * editing/VisibleSelection.cpp:
2676         (WebCore::VisibleSelection::selectionFromContentsOfNode):
2677         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
2678         * editing/htmlediting.cpp:
2679         (WebCore::nextVisuallyDistinctCandidate):
2680         (WebCore::previousVisuallyDistinctCandidate):
2681         (WebCore::firstEditablePositionAfterPositionInRoot):
2682         (WebCore::lastEditablePositionBeforePositionInRoot):
2683         (WebCore::lastOffsetForEditing):
2684         (WebCore::isFirstPositionAfterTable):
2685         (WebCore::isLastPositionBeforeTable):
2686         (WebCore::positionBeforeNode):
2687         (WebCore::positionAfterNode):
2688         (WebCore::enclosingEmptyListItem):
2689         (WebCore::caretMaxOffset):
2690         * editing/htmlediting.h:
2691         * editing/visible_units.cpp:
2692         (WebCore::renderedAsNonInlineTableOrHR):
2693         (WebCore::startOfParagraph):
2694         (WebCore::endOfParagraph):
2695         (WebCore::startOfEditableContent):
2696         (WebCore::endOfEditableContent):
2697         * page/AccessibilityObject.cpp:
2698         (WebCore::endOfStyleRange):
2699         * page/AccessibilityRenderObject.cpp:
2700         (WebCore::AccessibilityRenderObject::visiblePositionRange):
2701         * rendering/RenderBox.cpp:
2702         (WebCore::RenderBox::positionForPoint):
2703
2704 2009-03-20  Dmitry Titov  <dimich@chromium.org>
2705
2706         Reviewed by Dimitri Glazkov.
2707
2708         https://bugs.webkit.org/show_bug.cgi?id=24689
2709         Add (upstream) V8 bindings for Workers. Mostly style cleaning.
2710
2711         * bindings/v8/WorkerContextExecutionProxy.cpp: Added.
2712         * bindings/v8/WorkerContextExecutionProxy.h: Added.
2713         * bindings/v8/WorkerScriptController.cpp: Added.
2714         * bindings/v8/WorkerScriptController.h: Added.
2715         * bindings/v8/V8Index.h: Added. This is just a wrapper for v8_index.h, like V8Proxy.h
2716         * bindings/v8/V8Proxy.h: Added domObjectMap() function that wraps GetDOMObjectMap().
2717         * bindings/v8/V8WorkerContextEventListener.cpp:
2718         (WebCore::V8WorkerContextEventListener::callListenerFunction): TrackEvent() renamed trackEvent()
2719
2720 2009-03-20  Stephen White  <senorblanco@chromium.org>
2721
2722         Reviewed by Eric Seidel.
2723
2724         Fix for LayoutTests/fast/canvas/canvas-text-alignment.html
2725         on chromium/skia.  The problem was that the gradient matrix
2726         for text was being applied twice.  Fixed by reverting some of
2727         https://bugs.webkit.org/show_bug.cgi?id=23957, so that skiaDrawText
2728         is no longer responsible for measuring the text and scaling up
2729         the gradient matrix.  Instead, the text bounding box is passed
2730         in from SVGPaintServerGradient.  I didn't make this change for CG,
2731         since it uses a different method (the gradient is drawn using the
2732         text as a pre-rendered mask).
2733         https://bugs.webkit.org/show_bug.cgi?id=24687
2734
2735         * platform/graphics/skia/SkiaFontWin.cpp:
2736         (WebCore::skiaDrawText):
2737         * svg/graphics/SVGPaintServerGradient.cpp:
2738         (WebCore::SVGPaintServerGradient::setup):
2739
2740 2009-03-20  Xan Lopez  <xlopez@igalia.com>
2741
2742         Rubber-stamped by Holger Freyther.
2743
2744         There seems to be some rounding error in cairo (or in how we use
2745         cairo) with some fonts, like DejaVu Sans Mono, which makes cairo
2746         report a height smaller than ascent + descent, which is wrong and
2747         confuses WebCore's layout system. Workaround this while we figure
2748         out what's going on.
2749
2750         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
2751         (WebCore::SimpleFontData::platformInit):
2752         * platform/graphics/gtk/SimpleFontDataPango.cpp:
2753         (WebCore::SimpleFontData::platformInit):
2754
2755 2009-03-19  Alexey Proskuryakov  <ap@webkit.org>
2756
2757         Reviewed by Darin Adler.
2758
2759         https://bugs.webkit.org/show_bug.cgi?id=24122
2760         <rdar://problem/6674179>
2761         REGRESSION: DOM Range extractContents/deleteContents failures seen on Moxiecode tests
2762
2763         Test: fast/dom/Range/deleted-range-endpoints.html
2764
2765         * dom/Range.cpp: (WebCore::Range::processContents): Set the final range in accordance
2766         to the specification.
2767
2768 2009-03-19  Anders Carlsson  <andersca@apple.com>
2769
2770         Reviewed by Dan Bernstein.
2771
2772         <rdar://problem/6682554> Flash content not being rendered (Shockwave Flash 10.0 r22)
2773         
2774         If calling updateWidget for some reason resulted in another widget being added to m_widgetUpdateSet, then
2775         that object would never be updated.
2776         
2777         * page/FrameView.cpp:
2778         (WebCore::FrameView::updateWidgets):
2779         Factor the widget updating code out into this method. Return true if the update set is empty.
2780         
2781         (WebCore::FrameView::performPostLayoutTasks):
2782         Loop over the update set multiple times until all widgets have been updated or until we reach the cap.
2783         
2784         * page/FrameView.h:
2785
2786 2009-03-18  Timothy Hatcher  <timothy@apple.com>
2787
2788         Make the defered data loading timer honor the Page's scheduled runloop pairs.
2789         Introduces a new RunLoopTimer class that has an API mimicking Timer but
2790         allows it to be scheduled with one or more SchedulePairs.
2791
2792         <rdar://problem/6687342> -[WebView scheduleInRunLoop:forMode:] has no affect on timers
2793
2794         Reviewed by Darin Adler.
2795
2796         * WebCore.xcodeproj/project.pbxproj: Adds the new RunLoopTimer.{cpp,h} files.
2797         * loader/MainResourceLoader.cpp:
2798         (WebCore::MainResourceLoader::handleDataLoadNow): Use the MainResourceLoaderTimer typedef.
2799         (WebCore::MainResourceLoader::startDataLoadTimer): Added. Start the timer and on
2800         Mac platforms also schedule with the Page's SchedulePairs.
2801         (WebCore::MainResourceLoader::handleDataLoadSoon): Call startDataLoadTimer().
2802         (WebCore::MainResourceLoader::setDefersLoading): Ditto.
2803         * loader/MainResourceLoader.h:
2804         * platform/cf/RunLoopTimerCF.cpp: Added.
2805         (WebCore::RunLoopTimerBase::~RunLoopTimerBase):
2806         (WebCore::timerFired):
2807         (WebCore::RunLoopTimerBase::start):
2808         (WebCore::RunLoopTimerBase::schedule):
2809         (WebCore::RunLoopTimerBase::stop):
2810         (WebCore::RunLoopTimerBase::isActive):
2811         * platform/RunLoopTimer.h: Added.
2812         (WebCore::RunLoopTimerBase::RunLoopTimerBase):
2813         (WebCore::RunLoopTimerBase::startRepeating):
2814         (WebCore::RunLoopTimerBase::startOneShot):
2815         (WebCore::RunLoopTimer::RunLoopTimer):
2816         (WebCore::RunLoopTimer::fired):
2817
2818 2009-03-19  Dimitri Glazkov  <dglazkov@chromium.org>
2819
2820         Reviewed by Darin Fisher.
2821
2822         https://bugs.webkit.org/show_bug.cgi?id=24702
2823         Upstream miscellaneous bindings changes.
2824
2825         * bindings/v8/ScheduledAction.cpp:
2826         (WebCore::ScheduledAction::execute): Changed to call lower-case evaluate.
2827         * bindings/v8/ScriptCallStack.h: Added an extra include.
2828
2829 2009-03-19  Simon Fraser  <simon.fraser@apple.com>
2830
2831         Reviewed by Dave Hyatt
2832
2833         https://bugs.webkit.org/show_bug.cgi?id=24686
2834         
2835         When hit testing a RenderLayer whose parent lives in a preserves-3D hierarchy,
2836         we need to compare the computed z-offset with the depth-test z-offset before
2837         deciding that such a RenderLayer was hit. This fixes an issue, tested by the
2838         3d-point-mapping-overlapping.html test, where the child of a transformed element
2839         is found by hit testing, even when some other element with greater Z overlaps
2840         them both.
2841         
2842         Improved the code by adding a utility method, isHitCandidate(), which computes and tests
2843         z-depth when necessary.
2844
2845         Tests: transforms/3d/point-mapping/3d-point-mapping-coplanar.html
2846                transforms/3d/point-mapping/3d-point-mapping-overlapping.html
2847
2848         * rendering/RenderLayer.cpp:
2849         (WebCore::isHitCandidate):
2850         (WebCore::RenderLayer::hitTestLayer):
2851
2852 2009-03-19  Jeremy Moskovich  <jeremy@chromium.org>
2853
2854         Reviewed by Dimitri Glazkov.
2855
2856         https://bugs.webkit.org/show_bug.cgi?id=24456
2857         Split ColorChromium.cpp into Mac & Windows variants.
2858         Remove Chromium Dependency on platform/graphics/mac/ColorMac.mm since we
2859         ultimately need to take a different approach.  For now, createCGColor()
2860         is copied from ColorMac.mm.
2861
2862         No observable change in behavior, so no test.
2863
2864         * platform/graphics/chromium/ColorChromium.cpp:
2865         (WebCore::focusRingColor):
2866         * platform/graphics/chromium/ColorChromiumMac.mm: Added.
2867
2868 2009-03-19  Pavel Feldman  <pfeldman@chromium.org>
2869
2870         Reviewed by Dimitri Glazkov.
2871
2872         https://bugs.webkit.org/show_bug.cgi?id=24675
2873         Unforking frontend: add custom InspectorController methods
2874         implementation.
2875
2876         * bindings/v8/custom/V8InspectorControllerCustom.cpp: Added.
2877
2878 2009-03-19  Jay Campan  <jcampan@google.com>
2879
2880         Reviewed by Dimitri Glazkov.
2881
2882         https://bugs.webkit.org/show_bug.cgi?id=24625
2883         Adding an accessor to the currently selected index in the PopupMenuChromium.
2884         This is required for implementing the deletion of an autocomplete entry in Chromium.
2885
2886         * platform/chromium/PopupMenuChromium.cpp:
2887         (WebCore::PopupContainer::selectedIndex):
2888         * platform/chromium/PopupMenuChromium.h:
2889
2890 2009-03-19  Evan Stade  <estade@chromium.org>
2891
2892         Reviewed by Dimitri Glazkov.
2893
2894         https://bugs.webkit.org/show_bug.cgi?id=24526
2895         Improve windows skia text stroking.
2896
2897         Test: LayoutTests/svg/custom/struct-use-09-b.svg
2898
2899         * platform/graphics/skia/SkiaFontWin.cpp: Close the path representing
2900         each font glyph polygon, rather than only closing the path once per
2901         letter. This fixes stroking for letters with multiple polygons, such
2902         as 'A' or 'D'.
2903         (WebCore::getPathForGlyph):
2904         (WebCore::skiaDrawText):
2905
2906 2009-03-19  Simon Hausmann  <simon.hausmann@nokia.com>
2907
2908         Reviewed by Tor Arne Vestbø.
2909
2910         Fixed support for doing calls from JavaScript into NPAPI Plugins for the Qt port on Windows.
2911
2912         Removed dead code for distinguishing between Widget and PluginView in the Qt port.
2913
2914         * bindings/js/ScriptControllerQt.cpp:
2915         (WebCore::ScriptController::createScriptInstanceForWidget): Removed incorrect isNPAPI check.
2916         * plugins/PluginView.cpp:
2917         (WebCore::PluginView::PluginView): Removed m_isNPAPIPlugin variable.
2918         * plugins/PluginView.h: Removed setter/getter.
2919         * plugins/mac/PluginViewMac.cpp:
2920         (WebCore::PluginView::init): Removed call to setIsNPAPIPlugin.
2921         * plugins/qt/PluginViewQt.cpp:
2922         (WebCore::PluginView::init): Ditto.
2923
2924 2009-03-19  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
2925
2926         Reviewed by Oliver Hunt.
2927
2928         Bug 24596: ASSERT in JSC::PropertySlot::slotBase @ iGoogle homepage
2929         <https://bugs.webkit.org/show_bug.cgi?id=24596>
2930         <rdar://problem/6686493>
2931
2932         JSDOMWindow::customGetOwnPropertySlot() does an access check after calling
2933         JSGlobalObject::getOwnPropertySlot(). This causes the PropertySlot to be
2934         set twice, once to the value that is illegal to access, and then to undefined
2935         This causes an assertion failure in property access caching code.
2936
2937         The fix is to do the access check before calling JSGlobalObject::getOwnPropertySlot().
2938
2939         * bindings/js/JSDOMWindowCustom.h:
2940         (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2941
2942 2009-03-18  Alexey Proskuryakov  <ap@webkit.org>
2943
2944         Reviewed by Sam Weinig.
2945
2946         https://bugs.webkit.org/show_bug.cgi?id=24676
2947         Simple cross-origin requests shouldn't dispatch upload progress events
2948
2949         Test: http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
2950
2951         * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): Added a comment
2952         explaining the somewhat unexpected behavior of this function.
2953
2954         * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::hasListeners):
2955         * xml/XMLHttpRequestUpload.h:
2956         Report whether there are any event listeners registered.
2957
2958         * xml/XMLHttpRequest.h: Added m_uploadEventsAllowed.
2959
2960         * xml/XMLHttpRequest.cpp:
2961         (WebCore::XMLHttpRequest::createRequest): Set m_uploadEventsAllowed flag.
2962         (WebCore::XMLHttpRequest::makeSameOriginRequest): Ditto.
2963         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest): Ditto.
2964         (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest): Set request body - it can be
2965         non-empty for POST requests.
2966         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight): Set m_uploadEventsAllowed flag.
2967         (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult): Ditto.
2968         (WebCore::XMLHttpRequest::abort): Only dispatch upload progress events if allowed.
2969         (WebCore::XMLHttpRequest::networkError): Ditto.
2970         (WebCore::XMLHttpRequest::abortError): Ditto.
2971         (WebCore::XMLHttpRequest::didSendData): Ditto.
2972
2973 2009-03-18  Marc-Antoine Ruel  <maruel@chromium.org>
2974
2975         Reviewed by Darin Fisher.
2976
2977         https://bugs.webkit.org/show_bug.cgi?id=24398
2978         Fix a crash when loading a svg file in Chromium's test_shell and
2979         then reloading the page.
2980
2981         * history/BackForwardListChromium.cpp:
2982         (WebCore::BackForwardList::BackForwardList):
2983         (WebCore::BackForwardList::close):
2984
2985 2009-03-18  Eric Carlson  <eric.carlson@apple.com>
2986
2987         Reviewed by Simon Fraser.
2988
2989         Fix for <rdar://problem/6685235>
2990         <video> element poster cannot be set dynamically if not originally set up in HTML
2991         
2992         Allocate the media engine immediately so the plug-in proxy is available for
2993         scripting right away.
2994
2995         * platform/graphics/MediaPlayer.cpp:
2996         (WebCore::MediaPlayer::MediaPlayer):
2997
2998 2009-03-18  Beth Dakin  <bdakin@apple.com>
2999
3000         Reviewed by Dave Hyatt.
3001
3002         Fix for <rdar://problem/6636747> REGRESSION (Safari 4 PB-r41326): 
3003         Popup menu appears at the wrong location on page at http://
3004         www.signonsandiego.com/
3005
3006         This was a regression from http://trac.webkit.org/changeset/40769, 
3007         which changed the base class of RenderInline to 
3008         RenderBoxModelObject rather than RenderBox.
3009
3010         * rendering/RenderObject.cpp:
3011         (WebCore::RenderObject::offsetParent): offsetParent should return a 
3012         RenderBoxModelObject rather than just a RenderBox, which is more 
3013         restrictive. 
3014
3015 2009-03-18  Anders Carlsson  <andersca@apple.com>
3016
3017         Reviewed by Darin Adler.
3018
3019         <rdar://problem/6504776> 
3020         CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
3021
3022         Return early in case calling the client ends up spinning the run loop and completing/cancelling the load.
3023         
3024         * loader/NetscapePlugInStreamLoader.cpp:
3025         (WebCore::NetscapePlugInStreamLoader::didCancel):
3026
3027 2009-03-18  David Levin  <levin@chromium.org>
3028
3029         Reviewed by Dimitri Glazkov.
3030
3031         https://bugs.webkit.org/show_bug.cgi?id=24664
3032         Upstreaming v8 collection.h
3033
3034         No change in behavior, so no test.
3035
3036         * bindings/v8/V8Collection.h: Added.
3037
3038 2009-03-18  Sam Weinig  <sam@webkit.org>
3039
3040         Reviewed by Simon Fraser.
3041
3042         Fix for https://bugs.webkit.org/show_bug.cgi?id=23966
3043         REGRESSION: Custom arrow navigation functionality doesn't work at dropular.net
3044         <rdar://problem/6589657>
3045
3046         Match the CSSOM spec for getClientRects and getBoundingClientRect by
3047         returning a 0x0 rect at the correct top/left position for empty inline
3048         boxes.
3049
3050         * rendering/RenderInline.cpp:
3051         (WebCore::RenderInline::absoluteRects):
3052         (WebCore::RenderInline::absoluteQuads):
3053
3054 2009-03-18  David Levin  <levin@chromium.org>
3055
3056         Reviewed by Eric Seidel.
3057
3058         Match the changes done for windows in the bug
3059         https://bugs.webkit.org/show_bug.cgi?id=24530.
3060
3061         No change in behavior, so no test.
3062
3063         * rendering/RenderThemeChromiumLinux.cpp:
3064         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
3065
3066 2009-03-18  Dirk Schulze  <krit@webkit.org>
3067
3068         Reviewed by Holger Freyther.
3069
3070         Added support for SVG's stroked texts to Qt.
3071
3072         [Qt] SVGs stroked text support missing
3073         https://bugs.webkit.org/show_bug.cgi?id=24262
3074
3075         * platform/graphics/qt/FontQt.cpp:
3076         (WebCore::Font::drawComplexText):
3077
3078 2009-03-18  Mark Rowe  <mrowe@apple.com>
3079
3080         Reviewed by Alexey Proskuryakov.
3081
3082         Fix fast/encoding/char-decoding.html with recent ICU.
3083
3084         * platform/text/TextCodecICU.cpp:
3085         (WebCore::TextCodecICU::decode): Look for gb18030 case-insensitively,
3086         as newer versions of ICU use GB18030 as the canonical name.
3087
3088 2009-03-17  David Levin  <levin@chromium.org>
3089
3090         Reviewed by Dimitri Glazkov.
3091
3092         https://bugs.webkit.org/show_bug.cgi?id=24662
3093         Chromium build fixes.
3094
3095         Bug https://bugs.webkit.org/show_bug.cgi?id=24663 tracks
3096         the invalid implementation of ScriptCallStack.
3097
3098         No change in behavior, so no test.
3099
3100         * bindings/v8/ScriptCallStack.h:
3101         (WebCore::ScriptCallStack::state):
3102         * platform/graphics/skia/PlatformContextSkia.cpp:
3103         (PlatformContextSkia::drawRect):
3104
3105 2009-03-17  David Carson  <dacarson@apple.com>
3106
3107         Reviewed by David Hyatt.
3108
3109         Add anchor elements to the simple style sheet so that applications that 
3110         are using WebKit just for simple text and links will also take advantage
3111         of the fast path.
3112
3113         * css/CSSStyleSelector.cpp:
3114         (WebCore::elementCanUseSimpleDefaultStyle):
3115
3116 2009-03-17  Darin Adler  <darin@apple.com>
3117
3118         Reviewed by Adele Peterson.
3119
3120         <rdar://problem/6687005> Need support for new move-left/right selectors.
3121
3122         * editing/EditorCommand.cpp:
3123         (WebCore::executeMoveToLeftEndOfLine): Added.
3124         (WebCore::executeMoveToLeftEndOfLineAndModifySelection): Added.
3125         (WebCore::executeMoveToRightEndOfLine): Added.
3126         (WebCore::executeMoveToRightEndOfLineAndModifySelection): Added.
3127         Added command entries for the functions above.
3128
3129 2009-03-17  Ojan Vafai  <ojan@chromium.org>
3130
3131         Reviewed by Adele Peterson.
3132
3133         Put the padding inside scrollbars on textareas.
3134         https://bugs.webkit.org/show_bug.cgi?id=24370
3135         
3136         Put the padding inside the scrollbars on textareas. This is done by moving the
3137         overflow from the shadowNode to the RenderTextControlMultiline. As a result,
3138         all of the scroll handing methods that RenderTextControl overrides can be moved
3139         down into RenderTextControlSingleLine since RenderTextControlMultiline can now
3140         just use RenderBlock's versions. This also allows RenderTextControlMultiLine to
3141         no longer need a custom layout method since the shadowNode can now just size
3142         like a regular DIV.
3143
3144         * css/CSSStyleSelector.cpp:
3145         (WebCore::CSSStyleSelector::adjustRenderStyle):
3146         * rendering/RenderTextControl.cpp:
3147         (WebCore::RenderTextControl::styleDidChange):
3148         (WebCore::RenderTextControl::selection):
3149         (WebCore::RenderTextControl::calcHeight):
3150         (WebCore::RenderTextControl::hitInnerTextElement):
3151         * rendering/RenderTextControl.h:
3152         * rendering/RenderTextControlMultiLine.cpp:
3153         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3154         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
3155         * rendering/RenderTextControlMultiLine.h:
3156         * rendering/RenderTextControlSingleLine.cpp:
3157         (WebCore::RenderTextControlSingleLine::styleDidChange):
3158         (WebCore::RenderTextControlSingleLine::autoscroll):
3159         (WebCore::RenderTextControlSingleLine::scrollWidth):
3160         (WebCore::RenderTextControlSingleLine::scrollHeight):
3161         (WebCore::RenderTextControlSingleLine::scrollLeft):
3162         (WebCore::RenderTextControlSingleLine::scrollTop):
3163         (WebCore::RenderTextControlSingleLine::setScrollLeft):
3164         (WebCore::RenderTextControlSingleLine::setScrollTop):
3165         (WebCore::RenderTextControlSingleLine::scroll):
3166         * rendering/RenderTextControlSingleLine.h:
3167         * rendering/TextControlInnerElements.cpp:
3168         (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
3169         (WebCore::RenderTextControlInnerBlock::positionForPoint):
3170         (WebCore::TextControlInnerTextElement::createRenderer):
3171
3172 2009-03-17  Darin Adler  <darin@apple.com>
3173
3174         Reviewed by David Hyatt.
3175
3176         Bug 24517: REGRESSION (r41552): innerHTML does an updateLayout -- unneeded and can be slow
3177         https://bugs.webkit.org/show_bug.cgi?id=24517
3178
3179         * editing/DeleteButtonController.cpp:
3180         (WebCore::DeleteButtonController::enable): Added a call to updateRendering, since
3181         determining whether to display the delete button involves style and updateRendering
3182         also updates style (should probably be named updateStyle, in fact). Not needed to fix
3183         this bug, but would have prevented the crash that led to this bug in the first place.
3184
3185         * editing/EditCommand.cpp:
3186         (WebCore::EditCommand::EditCommand): Get rid of unneeded null check. All frames have
3187         delete button controllers.
3188         * editing/Editor.cpp:
3189         (WebCore::Editor::rangeForPoint): Ditto.
3190
3191         * editing/markup.cpp:
3192         (WebCore::appendStartMarkup): Changed a "&" to a "&&" so that generating markup
3193         doesn't depend on renderers at all when the convertBlocksToInlines boolean is false.
3194         This allows us to omit the call to updateLayoutIgnorePendingStylesheets in the
3195         createMarkup function that's called by innerHTML.
3196         (WebCore::MarkupAccumulator::appendMarkup): Turned this into a class with a member
3197         function. Added a feature where the accumulator will skip a node. Moved arguments
3198         that don't change during recursion into an object. This function still is a bit
3199         inefficient, since it creates a new HashMap at every level as it recurses, but for now
3200         I did not tackle that. Also replaced the onlyIncludeChildren boolean with EChildrenOnly
3201         for consistency and clarity.
3202         (WebCore::createMarkup): Removed the call to updateLayoutIgnorePendingStylesheets.
3203         Instead of calling disable/enable on the delete button controller's container element,
3204         pass it in to the markup accumulator as a node to skip.
3205
3206 2009-03-17  Scott Violet  <sky@google.com>
3207
3208         Reviewed by Eric Seidel.
3209
3210         https://bugs.webkit.org/show_bug.cgi?id=24651
3211         Skia does not always render text fill/stroke pattern/gradient/color correctly
3212
3213         Changes Skia's font rendering to only render gradient/pattern if current
3214         color space indicates the gradient/pattern should be used.
3215         This is covered by LayoutTests/fast/canvas/canvas-text-alignment.html .
3216     
3217         * platform/graphics/GraphicsContext.cpp:
3218         (WebCore::GraphicsContext::strokeColorSpace):
3219         (WebCore::GraphicsContext::fillColorSpace):
3220         * platform/graphics/GraphicsContext.h:
3221         (WebCore::):
3222         * platform/graphics/GraphicsContextPrivate.h:
3223         * platform/graphics/skia/SkiaFontWin.cpp:
3224         (WebCore::paintSkiaText):
3225
3226 2009-03-17  Adele Peterson  <adele@apple.com>
3227
3228         Reviewed by Darin Adler.
3229
3230         Fix for https://bugs.webkit.org/show_bug.cgi?id=24655
3231         <rdar://problem/6633727> Hitting return at the end of a line with an anchor jumps me to the bottom of the message
3232
3233         Test: editing/inserting/6633727.html
3234
3235         This changes does a few things:
3236         1) Renames pos to insertionPosition.
3237         2) Eliminates "startNode".  It doesn't work well to consider the node separately from the insertionPosition.  
3238            The insertionPosition gets updated at various times, and it seems likely that startNode can get out of sync.
3239         3) Before building up a list of ancestors to move around when we insert the new block, make sure to use the deepest
3240            representation of the insertionPosition, so all ancestor nodes are correctly included.
3241
3242         * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
3243
3244 2009-03-17  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3245
3246         Reviewed by Kevin Ollivier.
3247
3248         https://bugs.webkit.org/show_bug.cgi?id=24115
3249         Introduce platform independent stubs for plugins.
3250
3251         * plugins/PluginDataNone.cpp: Copied from WebCore/plugins/wx/PluginDataWx.cpp.
3252         * plugins/PluginPackageNone.cpp: Copied from WebCore/plugins/wx/PluginPackageWx.cpp.
3253         * plugins/PluginViewNone.cpp: Copied from WebCore/plugins/wx/PluginViewWx.cpp.
3254         * plugins/wx/PluginDataWx.cpp: Removed.
3255         * plugins/wx/PluginPackageWx.cpp: Removed.
3256         * plugins/wx/PluginViewWx.cpp: Removed.
3257         * webcore-wx.bkl:
3258
3259 2009-03-17  Darin Adler  <darin@apple.com>
3260
3261         Earlier version reviewed by Adele Peterson.
3262
3263         Bug 24304: REGRESSION (r39864): Hitting the space bar to select an <input type=radio>
3264         or push an <input type=button> or <button> causes the page to scroll down.
3265
3266         Would be best to add a regression test for Windows eventually; tested that this has
3267         no effect on the Mac OS X platform.
3268
3269         * html/HTMLInputElement.cpp:
3270         (WebCore::HTMLInputElement::defaultEventHandler): Added FIXMEs and tweaked formatting.
3271         Use the code that calls the base class's defaultEventHandler early only in the cases
3272         where it's needed: keydown and keypress events in text fields. In other cases, do the
3273         more typical thing and call the default handler only at the end of the function.
3274         This function already had code to make sure the keypress event for space never gets
3275         through, but it was running too late since the scrolling code was moved into the
3276         base class default event handler.
3277
3278 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
3279
3280         Reviewed by Dave Hyatt
3281
3282         https://bugs.webkit.org/show_bug.cgi?id=24632
3283
3284         Fix repaint issues when composited layers come and go (only applies
3285         when ACCELERATED_COMPOSITING is turned on).
3286         
3287         * rendering/RenderLayer.cpp:
3288         (WebCore::RenderLayer::RenderLayer):
3289         * rendering/RenderLayer.h:
3290         (WebCore::RenderLayer::mustOverlayCompositedLayers):
3291         (WebCore::RenderLayer::setMustOverlayCompositedLayers):
3292         * rendering/RenderLayerBacking.cpp:
3293         (WebCore::RenderLayerBacking::RenderLayerBacking):
3294         * rendering/RenderLayerBacking.h:
3295
3296         Move what used to be the 'forceCompositingLayer' flag from RenderLayerBacking
3297         to RenderLayer, because we don't want the side-effects of creating RenderLayerBacking
3298         when setting this flag.
3299         
3300         * rendering/RenderLayerCompositor.cpp:
3301         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
3302         When a RenderLayer flips into or out of compositing mode, compute a repaint
3303         rect relative to the containerForRepaint, and repaint it.
3304         
3305         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3306         Call layer->setMustOverlayCompositedLayers() rather than setForcedCompositingLayer().
3307         
3308         (WebCore::RenderLayerCompositor::needsToBeComposited):
3309         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
3310         (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
3311         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3312         * rendering/RenderLayerCompositor.h:
3313         
3314         Rename requiresCompositingLayerForTransform() to requiresCompositingForTransform()
3315         and make it a class static method to match requiresCompositingForAnimation(). Both
3316         now take RenderObjects, rathern than RenderLayers.
3317         
3318         * rendering/style/RenderStyle.h:
3319         (WebCore::InheritedFlags::hasTransformRelatedProperty):
3320         Minor tidyup using convenience methods added in an earlier commit.
3321
3322 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
3323
3324         Reviewed by Darin Adler
3325
3326         https://bugs.webkit.org/show_bug.cgi?id=24396
3327
3328         * config.h:
3329         Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some
3330         comments to make the #ifdefs more readable.
3331
3332         * css/CSSComputedStyleDeclaration.cpp:
3333         (WebCore::computedTransform):
3334         Add a comment to mention that we don't flatten the matrix.
3335         
3336         * css/MediaQueryEvaluator.cpp:
3337         (WebCore::transform_3dMediaFeatureEval):
3338         Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering
3339         is supported.
3340         
3341         * platform/graphics/mac/GraphicsLayerCA.mm:
3342         (WebCore::GraphicsLayerCA::animateTransform):
3343         No need for the #ifdef here. If we don't support 3d, we will have already flattened
3344         the matrix.
3345         
3346         * platform/graphics/transforms/TransformationMatrix.cpp:
3347         (WebCore::TransformationMatrix::makeAffine):
3348         * platform/graphics/transforms/TransformationMatrix.h:
3349         New method to convert the matrix to an affine matrix by throwing a way the non-affine
3350         parts.
3351         
3352         * rendering/RenderLayer.cpp:
3353         (WebCore::RenderLayer::updateTransform):
3354         (WebCore::RenderLayer::currentTransform):
3355         * rendering/RenderLayerBacking.cpp:
3356         (WebCore::RenderLayerBacking::updateLayerTransform):
3357         If 3d rendering is not supported, convert the matrix to an affine matrix
3358         which can be rendered, and used for hit testing.
3359         
3360         * rendering/RenderLayerCompositor.cpp:
3361         Change the name of the exported symbol that webkitdirs.pm uses to know if
3362         3d rendering is supported. There is no other 3d-rendering-specific symbol we can sniff.
3363         
3364         * rendering/RenderObject.cpp:
3365         (WebCore::RenderObject::transformFromContainer):
3366         Only take perspective into account if 3d rendering is supported.
3367
3368         * rendering/RenderObject.h:
3369         (WebCore::makeMatrixRenderable):
3370         Utility method that flattens a matrix if 3d rendering is not supported.
3371
3372 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
3373
3374         wx build fix. Fix typo after mouse wheel changes.
3375
3376         * platform/wx/MouseWheelEventWx.cpp:
3377         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3378
3379 2009-03-17  Darin Adler  <darin@apple.com>
3380
3381         * inspector/ConsoleMessage.cpp:
3382         (WebCore::ConsoleMessage::isEqual): Fix build, remove stray parenthesis.
3383
3384 2009-03-17  Darin Adler  <darin@apple.com>
3385
3386         Fix crash seen right away when running run-webkit-tests.
3387
3388         * inspector/ConsoleMessage.cpp:
3389         (WebCore::ConsoleMessage::isEqual): Restore assertion to its behavior pre-refactoring.
3390         Also tweaked formatting a bit.
3391
3392 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
3393
3394         Reviewed by Darin Adler.
3395
3396         HTMLSelectElement::add() doesn't look at exception code returned from insertBefore(), so 
3397         it doesn't need to zero it out before calling.
3398
3399         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): Removed "ec = 0" line.
3400
3401 2009-03-17  Dan Bernstein  <mitz@apple.com>
3402
3403         Reviewed by Adam Roben.
3404
3405         - WebCore part of adding a mechanism for controlling the caching of
3406           responses through WebFrameLoaderClient
3407
3408         Mac already has such a mechanism, and this adds one for CFNetwork ports.
3409
3410         * WebCore.vcproj/WebCore.vcproj: Added EmptyClients.h
3411         and ResourceLoaderCFNet.cpp.
3412
3413         * loader/EmptyClients.h:
3414         (WebCore::EmptyFrameLoaderClient::shouldCacheResponse): Added an
3415         implementation that always returns true.
3416
3417         * loader/FrameLoaderClient.h: Declared shouldCacheResponse().
3418
3419         * loader/ResourceLoader.h: Ditto.
3420
3421         * loader/cf/ResourceLoaderCFNet.cpp: Added.
3422         (WebCore::ResourceLoader::shouldCacheResponse): Added. Calls through to
3423         FrameLoaderClient::shouldCacheResponse().
3424
3425         * platform/network/ResourceHandleClient.h:
3426         (WebCore::ResourceHandleClient::shouldCacheResponse): Added an
3427         implementation that always returns true.
3428
3429         * platform/network/cf/ResourceHandleCFNet.cpp:
3430         (WebCore::willCacheResponse): Added a call to
3431         ResourceHandleClient::shouldCacheResponse(). If the client returns
3432         false, return 0, which will prevent CFNetwork from caching the response.
3433
3434 2009-03-17  Alexey Proskuryakov  <ap@webkit.org>
3435
3436         Reviewed by Darin Adler.
3437
3438         https://bugs.webkit.org/show_bug.cgi?id=13287
3439         Cannot change SELECT to a dynamically created option
3440
3441         Tests: fast/forms/add-and-remove-option.html
3442                fast/forms/add-remove-option-modification-event.html
3443                fast/forms/add-selected-option.html
3444                fast/forms/select-cache-desynchronization.html
3445
3446         * dom/ContainerNode.cpp:
3447         (WebCore::dispatchChildInsertionEvents): Increment DOM tree version. This will happen when
3448         dispatching DOMSubtreeModified again, but the version should be incremented for event
3449         listeners to have an up to date view of the DOM.
3450         (WebCore::dispatchChildRemovalEvents): Ditto.
3451
3452         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedIntoTree):
3453         Make sure that the select element knows about its new selected option.
3454
3455         * html/HTMLOptionElement.h: Use insertedIntoTree() instead of insertedIntoDocument(),
3456         because DOM also needs to be updated for forms that are not in document yet. Similar
3457         problems exist for node removing, but removedFromTree() is called at a wrong time, so
3458         those problems cannot be fixed without deeper refactoring.
3459
3460         * html/HTMLSelectElement.cpp:
3461         (WebCore::HTMLSelectElement::setRecalcListItems): Reset m_activeSelectionAnchorIndex - it
3462         doesn't make sense to keep the anchor after programmatically changing the selection, and
3463         keeping it was causing a failure in fast/forms/listbox-selection.html.
3464
3465         * html/HTMLSelectElement.h: Removed overrides for ContainerNode methods that only called
3466         base class versions.
3467
3468 2009-03-17  Steve Falkenburg  <sfalken@apple.com>
3469
3470         <rdar://problem/6690324> Accessing FTP sites reads unallocated memory, can result in garbled entries or crashes
3471         
3472         Reviewed by Darin Adler.
3473
3474         * loader/FTPDirectoryDocument.cpp:
3475         (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Assign CString to a local while we hold pointers into it.
3476
3477 2009-03-16  David Hyatt  <hyatt@apple.com>
3478
3479         <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
3480
3481         Make sure that the initial shouldPaint check that looks at enclosingLayers properly skips over
3482         layers that don't paint themselves.  This is done by adding a new enclosingSelfPaintingLayer method
3483         so that RenderObjects can walk up the enclosing layer chain and skip any layers that don't paint
3484         themselves.
3485
3486         Reviewed by Darin Adler.
3487
3488         Added fast/block/float/overlapping-floats-with-overflow-hidden.html
3489
3490         * WebCore.base.exp:
3491         * rendering/RenderBlock.cpp:
3492         (WebCore::RenderBlock::addOverhangingFloats):
3493         * rendering/RenderObject.cpp:
3494         (WebCore::RenderObject::enclosingSelfPaintingLayer):
3495         * rendering/RenderObject.h:
3496
3497 2009-03-17  Xan Lopez  <xlopez@igalia.com>
3498
3499         Reviewed by Holger Freyther.
3500
3501         https://bugs.webkit.org/show_bug.cgi?id=24592
3502         [GTK] Crash in FcPatternHash
3503
3504         Style fixes.
3505
3506         * platform/graphics/gtk/FontPlatformDataGtk.cpp:
3507         (WebCore::FontPlatformData::operator=):
3508         * platform/graphics/gtk/FontPlatformDataPango.cpp:
3509
3510 2009-03-17  Xan Lopez  <xlopez@igalia.com>
3511
3512         Reviewed by Holger Freyther.
3513
3514         https://bugs.webkit.org/show_bug.cgi?id=24592
3515         [GTK] Crash in FcPatternHash
3516
3517         Sani