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