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