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