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