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