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