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