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