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