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