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