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