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