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