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