1 2009-03-26 Darin Adler <darin@apple.com>
3 Reviewed by Geoff Garen.
5 Renamed JSUnprotectedEventListener to JSEventListener.
8 Soon Geoff will make all JavaScript event listeners use mark instead
9 of protect, so there's no need to emphasize "unprotected".
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:
55 2009-03-26 Darin Adler <darin@apple.com>
57 Reviewed by Geoff Garen.
59 Renamed JSEventListener to JSProtectedEventListener.
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.
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:
97 2009-03-26 Dan Bernstein <mitz@apple.com>
99 Reviewed by Anders Carlsson.
101 - fix <rdar://problem/6725042> BidiResolver::createBidiRunsForLine can
102 create runs extending beyond the end
104 No test because Safari does not use this version of
105 createBidiRunsForLine() with the end iterator not pointing to the end
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.
114 2009-03-26 Simon Fraser <simon.fraser@apple.com>
116 Reviewed by Dave Hyatt
118 https://bugs.webkit.org/show_bug.cgi?id=23914
120 Tests: compositing/overflow/ancestor-overflow.html
121 compositing/overflow/parent-overflow.html
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
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.
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.
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.
145 2009-03-26 Steve Falkenburg <sfalken@apple.com>
147 https://bugs.webkit.org/show_bug.cgi?id=24837
148 Escape key should dismiss select menu
150 Reviewed by Adam Roben.
152 * platform/win/PopupMenuWin.cpp:
153 (WebCore::PopupWndProc):
155 2009-03-26 Kevin Ollivier <kevino@theolliviers.com>
157 Reviewed by Alexey Proskuryakov.
159 Make sure the script uses LF line endings even on Windows.
161 https://bugs.webkit.org/show_bug.cgi?id=24805
163 * WebCore/make-generated-sources.sh: Change svn:eol-style to LF
165 2009-03-26 Eli Fidler <eli.fidler@torchmobile.com>
167 Reviewed by George Staikos.
169 Remove warnings all over the place by making operator precedence
170 explicit in cases like x && y || z. No functional change.
172 * css/CSSFontSelector.cpp:
173 (WebCore::CSSFontSelector::addFontFaceRule):
175 (WebCore::CSSParser::parseValue):
176 (WebCore::CSSParser::parseShadow):
178 (WebCore::Document::shouldScheduleLayout):
180 (WebCore::Node::isBlockFlowOrBlockTable):
182 (WebCore::Node::document):
184 (WebCore::Position::next):
185 (WebCore::Position::upstream):
186 (WebCore::Position::downstream):
187 (WebCore::Position::getInlineBoxAndOffset):
188 * dom/PositionIterator.cpp:
189 (WebCore::PositionIterator::atStart):
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):
266 2009-03-26 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
268 Reviewed by Holger Freyther.
270 https://bugs.webkit.org/show_bug.cgi?id=24804
271 [GTK] 401 responses cause rogue content to be loaded
273 Our soup code handles 401 responses itself, so we should not feed
274 the headers and data of those responses to the loader.
276 * platform/network/soup/ResourceHandleSoup.cpp:
277 (WebCore::gotHeadersCallback):
278 (WebCore::gotChunkCallback):
280 2009-03-25 Geoffrey Garen <ggaren@apple.com>
282 Reviewed by Oliver Hunt and Darin Adler.
284 Fixed <rdar://problem/6603167> Crash in WebKit!JSC::JSGlobalObject::resetPrototype
285 during Stress test (#3 & #7 WER crashes for Safari 4 Beta)
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.
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.
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.
303 2009-03-25 Dean Jackson <dino@apple.com>
305 Reviewed by Simon Fraser
307 https://bugs.webkit.org/show_bug.cgi?id=23361
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).
316 Test: compositing/direct-image-compositing.html
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
340 2009-03-25 David Levin <levin@chromium.org>
342 Reviewed by Dimitri Glazkov.
344 Chromium build fix. Fix #include in V8NodeFilterCondition.cpp due to the
345 rename of V8NodeFilter to V8NodeFilterCondition.
347 * bindings/v8/V8NodeFilterCondition.cpp:
349 2009-03-25 Simon Fraser <simon.fraser@apple.com>
351 Reviewed by Darin Adler
353 https://bugs.webkit.org/show_bug.cgi?id=24817
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.
358 Test: media/video-empty-source.html
360 * rendering/RenderSlider.cpp:
361 (WebCore::SliderRange::proportionFromValue):
362 (WebCore::SliderRange::valueFromProportion):
363 (WebCore::sliderPosition):
364 (WebCore::RenderSlider::setValueForPosition):
366 2009-03-24 Eric Seidel <eric@webkit.org>
368 Reviewed by Darin Adler.
370 Remove dead code and style cleanup
371 https://bugs.webkit.org/show_bug.cgi?id=24684
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.
389 2009-03-24 Eric Seidel <eric@webkit.org>
391 Reviewed by Darin Adler.
393 Move ASSERT(foo) to before where foo-> is used
394 https://bugs.webkit.org/show_bug.cgi?id=24684
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" :)
404 2009-03-24 Eric Seidel <eric@webkit.org>
406 Reviewed by Simon Fraser.
408 Make TextTokenizer ASSERT that the buffer was freed
409 https://bugs.webkit.org/show_bug.cgi?id=24684
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.
417 2009-03-24 Eric Seidel <eric@webkit.org>
419 Reviewed by Darin Adler.
421 Fix case where lBreak.obj->isBR() when lBreak.obj was NULL
422 https://bugs.webkit.org/show_bug.cgi?id=24684
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.
428 * rendering/bidi.cpp:
429 (WebCore::RenderBlock::findNextLineBreak):
430 lBreak.obj can be null, so we can't call ->isBR() on it unconditionally.
432 2009-03-24 Eric Seidel <eric@webkit.org>
434 Reviewed by Simon Fraser.
436 Style cleanup and dead code removal in dom, editing
437 https://bugs.webkit.org/show_bug.cgi?id=24684
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
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.
463 2009-03-24 Eric Seidel <eric@webkit.org>
465 Reviewed by Simon Fraser.
467 CSS dead code removal and cleanup from Coverty errors
468 https://bugs.webkit.org/show_bug.cgi?id=24684
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
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.
487 2009-03-24 Eric Seidel <eric@webkit.org>
489 Reviewed by Simon Fraser.
491 Font fallback cleanup and added ASSERT for GlyphPageTreeNode
492 https://bugs.webkit.org/show_bug.cgi?id=24684
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
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.
504 2009-03-24 Eric Seidel <eric@webkit.org>
506 Reviewed by Simon Fraser.
508 Coverty inspired fixes in Animations/Transforms
509 https://bugs.webkit.org/show_bug.cgi?id=24684
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.
533 2009-03-25 Eli Fidler <eli.fidler@torchmobile.com>
535 Reviewed by George Staikos.
537 Fix compiler warnings regarding assignments in if statements.
539 * html/HTMLFormElement.cpp:
540 (WebCore::HTMLFormElement::createFormData):
541 * plugins/PluginPackage.cpp:
542 (WebCore::PluginPackage::compare):
544 2009-03-25 Dan Bernstein <mitz@apple.com>
546 Reviewed by Dave Hyatt.
548 - fix <rdar://problem/6472150> repro crash in
549 RenderBlock::rightmostPosition(bool, bool) const at mercotte.fr using
552 Test: fast/inline/continuation-positioned-reparenting.html
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.
559 2009-03-24 Simon Fraser <simon.fraser@apple.com>
561 Reviewed by Dave Hyatt
563 https://bugs.webkit.org/show_bug.cgi?id=24784
565 Length values in transform operations need to take zoom into account.
567 Test: fast/transforms/transforms-with-zoom.html
569 * css/CSSStyleSelector.cpp:
570 (WebCore::CSSStyleSelector::createTransformOperations):
572 2009-03-25 David Hyatt <hyatt@apple.com>
574 Reviewed by Simon Fraser.
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
580 Changed some existing test cases to use the new values.
583 (WebCore::CSSParser::parseFillProperty):
584 * css/CSSPrimitiveValueMappings.h:
585 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
586 (WebCore::CSSPrimitiveValue::operator EFillBox):
587 * css/CSSValueKeywords.in:
589 2009-03-25 Brett Wilson <brettw@dhcp-172-22-71-191.mtv.corp.google.com>
591 Reviewed by Dimitri Glazkov.
593 Fix complex text opacity on the Chromium Windows port.
594 https://bugs.webkit.org/show_bug.cgi?id=24757
596 Test: fast/text/complex-text-opacity.html
598 * platform/graphics/chromium/FontChromiumWin.cpp:
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):
615 2009-03-25 David Hyatt <hyatt@apple.com>
617 Reviewed by Eric Seidel
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
623 Note that I do not agree with this change, but I am matching the spec.
625 Added fast/borders/border-image-border-radius.html
627 * rendering/RenderBoxModelObject.cpp:
628 (WebCore::RenderBoxModelObject::paintNinePieceImage):
630 2009-03-25 Gustavo Noronha Silva <gns@gnome.org>
632 Reviewed by Holger Freyther.
634 https://bugs.webkit.org/show_bug.cgi?id=24750
635 [GTK] requests download instead of displaying page
637 Fix the Content-Type headers we get from soup, so that we set a
638 proper media type on the ResourceResponse.
640 * platform/network/soup/ResourceHandleSoup.cpp:
641 (WebCore::fillResponseFromMessage):
643 2009-03-25 Gustavo Noronha Silva <gns@gnome.org>
645 Reviewed by Holger Freyther.
647 https://bugs.webkit.org/show_bug.cgi?id=24600
648 [GTK] responses with status code >= 400 should not be given special treatment
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.
654 * platform/network/soup/ResourceHandleSoup.cpp:
656 (WebCore::gotHeadersCallback):
657 (WebCore::gotChunkCallback):
658 (WebCore::finishedCallback):
660 2009-03-25 Darin Adler <darin@apple.com>
662 Reviewed by John Sullivan.
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.
667 * WebCore.base.exp: Remove exported function that's not used in WebKit.
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.
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.
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.
696 2009-03-25 Darin Adler <darin@apple.com>
698 Reviewed by David Hyatt.
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
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
707 Test: media/video-display-none-crash.html
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.
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.
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.
760 2009-03-25 Eli Fidler <eli.fidler@torchmobile.com>
762 Reviewed by George Staikos.
764 Fix ambiguous else cases by adding braces to nested if()s with elses.
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):
775 2009-03-24 Eli Fidler <eli.fidler@torchmobile.com>
777 Reviewed by George Staikos.
779 Move variable into proper platform block to quiet warning.
781 * html/CanvasRenderingContext2D.cpp:
782 (WebCore::CanvasRenderingContext2D::drawTextInternal):
784 2009-03-24 Eric Carlson <eric.carlson@apple.com>
786 Reviewed by Antti Koivisto.
788 Fix for <rdar://problem/6719375> Deal with QTKit loadstate changes when playing streaming movies
790 * WebCore/html/HTMLMediaElement.cpp:
791 (WebCore::HTMLMediaElement::setNetworkState): Deal with media engine reviving after having
792 network state of NETWORK_NO_SOURCE.
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.
799 2009-03-24 Adele Peterson <adele@apple.com>
801 Reviewed by Darin Adler.
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
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.
810 2009-03-24 Darin Adler <darin@apple.com>
812 Reviewed by Brady Eidson.
814 <rdar://problem/6624662> REGRESSION (r39904): can't save certain web pages as web archive (ones without favicons!)
816 * loader/archive/cf/LegacyWebArchive.cpp:
817 (WebCore::LegacyWebArchive::create): Added a null check.
819 2009-03-24 Adam Langley <agl@google.com>
821 Reviewed by Darin Fisher.
823 https://bugs.webkit.org/show_bug.cgi?id=24685
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.
829 This changes the Chromium Linux scrollbar code to use drawIRect.
831 * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
832 (WebCore::ScrollbarThemeChromium::invalidateOnMouseEnterExit):
833 (WebCore::drawVertLine):
834 (WebCore::drawHorizLine):
836 (WebCore::ScrollbarThemeChromium::paintTrackPiece):
837 (WebCore::ScrollbarThemeChromium::paintThumb):
839 2009-03-24 David Kilzer <ddkilzer@apple.com>
841 Bug 23310: Setting an absolute path (/abs) on an <iframe> with no src doesn't resolve the URL properly
843 <https://bugs.webkit.org/show_bug.cgi?id=23310>
845 Reviewed by Darin Adler.
847 Test: fast/frames/iframe-no-src-set-location.html
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.
854 2009-03-24 Simon Fraser <simon.fraser@apple.com>
856 Reviewed by Dave Hyatt
858 https://bugs.webkit.org/show_bug.cgi?id=24659
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.
865 Test: transforms/3d/hit-testing/rotated-hit-test.html
867 * rendering/RenderLayer.cpp:
868 (WebCore::RenderLayer::hitTestLayer):
870 2009-03-24 Simon Fraser <simon.fraser@apple.com>
872 Reviewed by Dave Hyatt
874 https://bugs.webkit.org/show_bug.cgi?id=24436
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.
881 * rendering/RenderLayer.cpp:
882 (WebCore::RenderLayer::paintLayer):
883 (WebCore::RenderLayer::hitTestLayer):
884 (WebCore::RenderLayer::parentClipRects):
885 (WebCore::RenderLayer::calculateRects):
886 * rendering/RenderLayer.h:
888 2009-03-24 Simon Fraser <simon.fraser@apple.com>
890 Reviewed by Dan Bernstein
892 https://bugs.webkit.org/show_bug.cgi?id=24782
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().
897 Also make stylistic change in createTransformOperations(), renaming 'inStyle'
900 Tested by existing tests.
902 * css/CSSStyleSelector.cpp:
903 (WebCore::convertToLength):
904 (WebCore::CSSStyleSelector::applyProperty):
905 (WebCore::CSSStyleSelector::createTransformOperations):
907 2009-03-24 David Hyatt <hyatt@apple.com>
909 Reviewed by Simon Fraser
911 https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents
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.
917 Added fast/clip/overflow-border-radius-clip.html
919 * rendering/RenderBox.cpp:
920 (WebCore::RenderBox::pushContentsClip):
922 2009-03-24 David Hyatt <hyatt@apple.com>
924 Reviewed by Simon Fraser
926 https://bugs.webkit.org/show_bug.cgi?id=21789, overflow:hidden elements should clip their foreground contents.
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
932 Added fast/replaced/border-radius-clip.html
935 * rendering/RenderReplaced.cpp:
936 (WebCore::RenderReplaced::paint):
937 * rendering/RenderWidget.cpp:
938 (WebCore::RenderWidget::paint):
940 2009-03-24 Adele Peterson <adele@apple.com>
944 Only build these Mail quirks checks in on the Mac.
946 * dom/Document.cpp: (WebCore::disableRangeMutation):
947 * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
949 2009-03-24 Brent Fulgham <bfulgham@webkit.org>
951 Build fix, no review.
953 Remove ResourceLoaderCFNet.cpp from build list for Cairo Releas
956 * WebCore.vcproj/WebCore.vcproj:
958 2009-03-24 Eric Carlson <eric.carlson@apple.com>
960 Fix layout tests broken by r41907.
962 * html/HTMLMediaElement.cpp:
963 (WebCore::HTMLMediaElement::setReadyState): Don't set "was playing" based on the new ready state
965 2009-03-24 Dmitry Titov <dimich@chromium.org>
967 Reviewed by Dimitri Glazkov.
969 https://bugs.webkit.org/show_bug.cgi?id=24689
970 Fix Chromium compilation errors.
972 * bindings/v8/WorkerContextExecutionProxy.cpp:
973 (WebCore::WorkerContextExecutionProxy::FindOrCreateEventListener):
974 (WebCore::WorkerContextExecutionProxy::RemoveEventListener):
976 2009-03-24 Yury Semikhatsky <yurys@chromium.org>
978 Reviewed by Darin Adler.
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.
986 * inspector/front-end/SourceFrame.js:
987 (WebInspector.SourceFrame.prototype._loaded):
989 2009-03-24 Mark Mentovai <mark@chromium.org>
991 Reviewed by Mark Rowe.
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.
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:
1020 2009-03-24 Dan Bernstein <mitz@apple.com>
1022 Reviewed by Darin Adler.
1024 - fix <rdar://problem/6107874> by capping the nesting depth of
1025 "block-level" elements generated by the parser
1027 Test: fast/parser/block-nesting-cap.html
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:
1037 2009-03-23 Greg Bolsinga <bolsinga@apple.com>
1039 Reviewed by David Kilzer.
1041 https://bugs.webkit.org/show_bug.cgi?id=24771
1043 DOMTimeStamps are based upon 1970.
1045 * platform/mac/GeolocationServiceMac.mm:
1046 (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
1048 2009-03-23 Eric Seidel <eric@webkit.org>
1050 Build fix, no review.
1052 * rendering/RenderObject.cpp:
1053 (WebCore::RenderObject::createVisiblePosition): change .container to .isNotNull()
1055 2009-03-23 Eric Seidel <eric@webkit.org>
1057 Reviewed by Darin Adler.
1059 Rename Position::container to m_anchorNode and make it private
1060 https://bugs.webkit.org/show_bug.cgi?id=24760
1062 More code cleanup for Position.
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).
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.
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==):
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):
1094 2009-03-17 Eric Seidel <eric@webkit.org>
1096 Reviewed by David Hyatt.
1098 document.write() should be able to make a document strict mode
1099 https://bugs.webkit.org/show_bug.cgi?id=24336
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.
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
1113 (WebCore::Document::write):
1115 2009-03-23 Sam Weinig <sam@webkit.org>
1117 Reviewed by Dan Bernstein.
1119 Fix for <rdar://problem/6140966>
1120 Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
1123 * WebCore.xcodeproj/project.pbxproj:
1124 * loader/CrossOriginPreflightResultCache.cpp:
1125 (WebCore::CrossOriginPreflightResultCache::empty):
1126 * loader/CrossOriginPreflightResultCache.h:
1128 2009-03-23 Darin Adler <darin@apple.com>
1130 Reviewed by Adele Peterson.
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
1136 Test: editing/selection/hit-test-anonymous.html
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.
1159 2009-03-23 Adele Peterson <adele@apple.com>
1161 Reviewed by Darin Adler & Dave Hyatt.
1163 Fix for <rdar://problem/6621310> REGRESSION(35185): Apple Travel HTML emails missing some style after Safari 4 upgrade
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.
1168 * html/HTMLElement.cpp: (WebCore::HTMLElement::inEitherTagList):
1170 2009-03-23 Adele Peterson <adele@apple.com>
1172 Reviewed by Mark Rowe & Dave Hyatt.
1174 Merge some of the individual Mail quirks into two settings that we can check for future quirks.
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):
1190 (WebCore::Settings::needsLeopardMailQuirks):
1191 (WebCore::Settings::needsTigerMailQuirks):
1193 2009-03-23 Ada Chan <adachan@apple.com>
1195 https://bugs.webkit.org/show_bug.cgi?id=24762
1196 Support text-indent in <option> elements on windows platform.
1198 Reviewed by Adele Peterson.
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.
1220 2009-03-23 Sam Weinig <sam@webkit.org>
1222 Reviewed by Anders Carlsson.
1224 Fix for https://bugs.webkit.org/show_bug.cgi?id=24699
1225 REGRESSION: Java Applets broken
1226 <rdar://problem/6707494>
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.
1231 * html/HTMLAppletElement.cpp:
1232 (WebCore::HTMLAppletElement::createRenderer):
1233 * platform/KURL.cpp:
1234 (WebCore::KURL::baseAsString):
1237 2009-03-23 Darin Adler <darin@apple.com>
1239 Reviewed by Sam Weinig.
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.
1246 2009-03-23 David Levin <levin@chromium.org>
1248 Reviewed by Dimitri Glazkov.
1250 https://bugs.webkit.org/show_bug.cgi?id=24764
1252 Renamed files V8NodeFilter -> V8NodeFilterCondition to reflect
1253 class names. Also fixed some headers that got mangled in search/replace
1256 No change in behavior, so no test.
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:
1267 2009-03-23 Darin Fisher <darin@chromium.org>
1269 Reviewed by Antti Koivisto.
1271 https://bugs.webkit.org/show_bug.cgi?id=24741
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
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.
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
1289 (WebCore::FormData::FormData):
1290 * platform/network/FormData.h: Added m_identifier with setter and getter.
1291 (WebCore::FormData::setIdentifier):
1292 (WebCore::FormData::identifier):
1294 2009-03-23 Simon Fraser <simon.fraser@apple.com>
1296 Reviewed by Antti Koivisto
1298 https://bugs.webkit.org/show_bug.cgi?id=24733
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.
1306 Test: media/video-controls-zoomed.html
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):
1321 2009-03-23 Mike Belshe <mike@belshe.com>
1323 Reviewed by Darin Adler.
1325 https://bugs.webkit.org/show_bug.cgi?id=24739
1327 Rework StringImpl::create methods to try to allocate a single buffer
1328 rather than allocating both the StringImpl class and a separate data
1331 * platform/text/StringImpl.cpp:
1332 * platform/text/StringImpl.h:
1334 2009-03-23 Darin Adler <darin@apple.com>
1336 Reviewed by Antti Koivisto.
1338 Based on a patch by Nico Weber <nicolasweber@gmx.de>
1340 Bug 24755: LayoutTests/http/tests/misc/url-in-utf16le.html regression
1341 https://bugs.webkit.org/show_bug.cgi?id=24755
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.
1351 * platform/text/TextEncoding.h: Added isUTF7Encoding function.
1352 Also tweaked formatting a bit.
1354 2009-03-20 Peter Kasting <pkasting@google.com>
1356 Reviewed by Darin Fisher.
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.
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):
1371 2009-03-23 Glen Murphy <glen@chromium.org>
1373 Reviewed by Darin Fisher.
1375 https://bugs.webkit.org/show_bug.cgi?id=24657
1377 Fix Skia drawing of highly scaled bitmaps; the conversion to
1378 IntRect produced visible layout test failures in highly scaled
1381 Test: svg/custom/image-small-width-height.svg
1383 * WebCore\platform\graphics\skia\ImageSkia.cpp:
1385 2009-03-23 David Kilzer <ddkilzer@apple.com>
1387 Provide JavaScript exception information after slow script timeout
1389 Reviewed by Oliver Hunt.
1391 * bindings/js/ScriptController.cpp:
1392 (WebCore::ScriptController::evaluate): Changed to report
1393 exceptions for the Interrupted completion type as well.
1395 2009-03-23 Simon Fraser <simon.fraser@apple.com>
1397 Reviewed by Darin Adler
1399 https://bugs.webkit.org/show_bug.cgi?id=24736
1401 Fix three mostly-unrelated problems with full-page zoom:
1404 (WebCore::Document::elementFromPoint):
1405 Document::elementFromPoint() needs to take full-page zoom into account.
1407 * dom/MouseRelatedEvent.cpp:
1408 (WebCore::MouseRelatedEvent::receivedTarget):
1409 Take full-page zoom into account when computing offsetX/offsetY.
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.
1418 Tests: fast/forms/listbox-hit-test-zoomed.html
1419 fast/forms/search-zoomed.html
1420 fast/forms/slider-zoomed.html
1422 2009-03-23 Simon Fraser <simon.fraser@apple.com>
1424 Reviewed by Dan Bernstein
1426 https://bugs.webkit.org/show_bug.cgi?id=24753
1428 The rect for CSS 'clip' needs to have zooming applied to it.
1430 Test: fast/css/clip-zooming.html
1432 * css/CSSStyleSelector.cpp:
1433 (WebCore::CSSStyleSelector::applyProperty):
1435 2009-03-23 Eric Carlson <eric.carlson@apple.com>
1437 Reviewed by Adam Roben.
1439 <rdar://problem/6704282>
1440 https://bugs.webkit.org/show_bug.cgi?id=24719
1441 QTMovieWinTimer logic inversion
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.
1451 Not possible to make a test for this because it is so timing dependant.
1453 * platform/graphics/win/QTMovieWinTimer.cpp:
1454 (TimerWindowWndProc):
1455 (setSharedTimerFireDelay):
1457 2009-03-23 Eric Carlson <eric.carlson@apple.com>
1459 Reviewed by Adele Peterson.
1461 https://bugs.webkit.org/show_bug.cgi?id=24588
1463 Update media element implementation to current HTML5 spec
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
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
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
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
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
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'
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
1570 * html/HTMLMediaElement.h: Change ReadyState and NetworkState enums to match names in the spec,
1571 update for changes in .cpp.
1572 (WebCore::HTMLMediaElement::):
1574 * html/HTMLMediaElement.idl: Update ready state and network state constants for spec changes.
1575 defaultPlaybackRate, playbackRate, play(), and pause() no longer raise exceptions.
1577 * html/HTMLSourceElement.cpp:
1578 (WebCore::HTMLSourceElement::insertedIntoDocument): Update for network state name changes.
1580 * html/HTMLVideoElement.cpp:
1581 (WebCore::HTMLVideoElement::updatePosterImage): Update for ready state name changes.
1583 * html/MediaError.h:
1584 (WebCore::MediaError::): add MEDIA_ERR_NONE_SUPPORTED.
1586 * html/MediaError.idl: add MEDIA_ERR_NONE_SUPPORTED.
1588 * loader/MediaDocument.cpp:
1589 (WebCore::MediaDocument::defaultEventHandler): play() and pause() don't take an exception.
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
1598 (WebCore::MediaPlayerClient::mediaPlayerDurationChanged): New.
1599 (WebCore::MediaPlayerClient::mediaPlayerRateChanged): New.
1600 (WebCore::MediaPlayerClient::mediaPlayerSizeChanged): New.
1601 (WebCore::MediaPlayer::):
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.
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
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.
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.
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
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:
1651 * rendering/MediaControlElements.cpp:
1652 (WebCore::MediaControlPlayButtonElement::defaultEventHandler): Update for network/ready state
1654 (WebCore::MediaControlSeekButtonElement::defaultEventHandler): Ditto.
1656 2009-03-22 Kevin Ollivier <kevino@theolliviers.com>
1658 wxGTK build fix. Add missing header.
1660 * platform/wx/wxcode/gtk/non-kerned-drawing.cpp:
1662 2009-03-22 Simon Fraser <simon.fraser@apple.com>
1664 Reviewed by Dan Bernstein
1666 https://bugs.webkit.org/show_bug.cgi?id=24665
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.
1673 * rendering/RenderImage.cpp:
1674 (WebCore::RenderImage::nodeAtPoint):
1676 2009-03-22 Simon Fraser <simon.fraser@apple.com>
1678 Reviewed by Dan Bernstein
1680 https://bugs.webkit.org/show_bug.cgi?id=24743
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.
1686 Test: fast/layers/zindex-hit-test.html
1688 * rendering/RenderLayer.cpp:
1689 (WebCore::RenderLayer::hitTestLayer):
1691 2009-03-20 Simon Fraser <simon.fraser@apple.com>
1693 Reviewed by Darin Adler
1695 https://bugs.webkit.org/show_bug.cgi?id=24733
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.
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.
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.
1718 * html/HTMLInputElement.cpp:
1719 (WebCore::HTMLInputElement::defaultEventHandler):
1720 Clean up slider handling code.
1722 * html/HTMLSelectElement.cpp:
1723 (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1724 Add FIXME comment for use of offsetX/offsetY.
1726 * page/ContextMenuController.cpp:
1727 (WebCore::ContextMenuController::handleContextMenuEvent):
1728 Use absoluteLocation() when hit testing for context menus.
1730 * rendering/RenderFrameSet.cpp:
1731 (WebCore::RenderFrameSet::userResize):
1732 Use absoluteLocation() when resizing frames.
1734 * rendering/RenderMedia.cpp:
1735 (WebCore::RenderMedia::forwardEvent):
1736 Use absoluteLocation() when hit testing media controls.
1738 * rendering/RenderSlider.cpp:
1739 (WebCore::HTMLSliderThumbElement::defaultEventHandler):
1740 (WebCore::RenderSlider::mouseEventIsInThumb):
1741 Use absoluteLocation() when handling slider events.
1743 (WebCore::RenderSlider::forwardEvent):
1744 Factor some code out of HTMLInputElement::defaultEventHandler().
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.
1751 2009-03-21 David Levin <levin@chromium.org>
1753 Reviewed by Dimitri Glazkov.
1755 https://bugs.webkit.org/show_bug.cgi?id=24727
1756 Add V8XMLHttpRequest*.
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.
1764 2009-03-21 David Levin <levin@chromium.org>
1766 Reviewed by Dimitri Glazkov.
1768 https://bugs.webkit.org/show_bug.cgi?id=24725
1771 * bindings/v8/V8NodeFilter.cpp: Added.
1772 * bindings/v8/V8NodeFilter.h: Added.
1774 2009-03-21 Dan Bernstein <mitz@apple.com>
1776 Rubber-stamped by Kevin Decker
1778 - remove some redundant #include statements
1780 * bindings/js/JSDOMWindowBase.cpp:
1782 2009-03-20 Dan Bernstein <mitz@apple.com>
1784 Reviewed by Mark Rowe.
1786 - fix <rdar://problem/6574185> REGRESSION (3.2.2-TOT): hang in text drawing code
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
1794 2009-03-20 Dean Jackson <dino@apple.com>
1796 Reviewed by Simon Fraser
1798 Build fix for ENABLE(3D_RENDERING)
1800 * rendering/RenderObject.h:
1801 (WebCore::makeMatrixRenderable):
1803 2009-03-20 Dave Moore <davemoore@google.com>
1805 Reviewed by Dimitri Glazkov.
1807 https://bugs.webkit.org/show_bug.cgi?id=24705
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
1813 * page/Location.idl:
1815 2009-03-20 Craig Schlenter <craig.schlenter@gmail.com>
1817 Reviewed by Dimitri Glazkov.
1819 https://bugs.webkit.org/show_bug.cgi?id=24608
1821 Include stdio.h needed for printf on gcc 4.4.0
1823 * platform/KURLGoogle.cpp:
1825 2009-03-20 Mike Belshe <mike@belshe.com>
1827 Reviewed by Darin Fisher.
1829 https://bugs.webkit.org/show_bug.cgi?id=24577
1831 Don't let comments at the end of an event handler
1832 break the event handler.
1834 No change in behavior, so no test.
1836 * bindings/v8/V8LazyEventListener.cpp:
1837 (WebCore::V8LazyEventListener::getWrappedListenerFunction):
1839 2009-03-20 Norbert Leser <norbert.leser@nokia.com>
1841 Reviewed by Darin Adler.
1843 https://bugs.webkit.org/show_bug.cgi?id=24535
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.
1851 No change in behavior, so no test.
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:
1868 2009-03-20 Mike Belshe <mike@belshe.com>
1870 Reviewed by Dimitri Glazkov and Dave Hyatt.
1872 https://bugs.webkit.org/show_bug.cgi?id=24324
1874 Make the minimum timer configurable for different platforms.
1876 * page/DOMTimer.cpp:
1877 (WebCore::DOMTimer::DOMTimer):
1878 (WebCore::DOMTimer::fired):
1880 (WebCore::DOMTimer::minTimerInterval):
1881 (WebCore::DOMTimer::setMinTimerInterval):
1883 2009-03-20 Dean McNamee <deanm@chromium.org>
1885 Reviewed by Darin Adler.
1887 https://bugs.webkit.org/show_bug.cgi?id=22834
1889 Make sure to consistently match new/delete and fastMalloc/fastFree.
1891 * css/CSSSelectorList.cpp:
1892 (WebCore::CSSSelectorList::adoptSelectorVector):
1893 (WebCore::CSSSelectorList::deleteSelectors):
1895 2009-03-20 Dan Bernstein <mitz@apple.com>
1897 Reviewed by Dave Hyatt.
1899 - fix https://bugs.webkit.org/show_bug.cgi?id=23739
1900 <rdar://problem/6556371> REGRESSION (r36513): iframe isn't sized properly upon load
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.
1910 2009-03-20 Dmitry Titov <dimich@chromium.org>
1912 Reviewed by Alexey Proskuryakov.
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.
1920 * dom/Document.h: Made encoding() non-virtual and private.
1921 * dom/ScriptExecutionContext.h: removed encoding().
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.
1947 2009-03-20 Timothy Hatcher <timothy@apple.com>
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.
1953 <rdar://problem/6626741&6648478&6635474&6674079>
1955 Reviewed by Darin Adler.
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.
1967 2009-03-20 Geoffrey Garen <ggaren@apple.com>
1969 Reviewed by Sam Weinig.
1971 Fixed up an out-of-date comment.
1973 * bindings/js/JSDOMWindowCustom.h:
1974 (WebCore::JSDOMWindow::customPut):
1976 2009-03-20 Beth Dakin <bdakin@apple.com>
1978 Reviewed by Dave Hyatt.
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>
1985 * rendering/RenderObject.cpp:
1986 (WebCore::RenderObject::invalidateContainerPrefWidths):
1987 * rendering/RenderObject.h:
1988 (WebCore::RenderObject::markContainingBlocksForLayout):
1990 2009-03-20 Eric Seidel <eric@webkit.org>
1992 Reviewed by Justin Garcia.
1994 maxDeepOffset is confusing and should be removed
1995 https://bugs.webkit.org/show_bug.cgi?id=24586
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.
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()
2005 Rename maxDeepOffset to lastEditingOffsetForNode (so that we mere mortals have some clue what it does)
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.
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):
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):
2088 2009-03-20 Dmitry Titov <dimich@chromium.org>
2090 Reviewed by Dimitri Glazkov.
2092 https://bugs.webkit.org/show_bug.cgi?id=24689
2093 Add (upstream) V8 bindings for Workers. Mostly style cleaning.
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()
2104 2009-03-20 Stephen White <senorblanco@chromium.org>
2106 Reviewed by Eric Seidel.
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
2119 * platform/graphics/skia/SkiaFontWin.cpp:
2120 (WebCore::skiaDrawText):
2121 * svg/graphics/SVGPaintServerGradient.cpp:
2122 (WebCore::SVGPaintServerGradient::setup):
2124 2009-03-20 Xan Lopez <xlopez@igalia.com>
2126 Rubber-stamped by Holger Freyther.
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.
2134 * platform/graphics/gtk/SimpleFontDataGtk.cpp:
2135 (WebCore::SimpleFontData::platformInit):
2136 * platform/graphics/gtk/SimpleFontDataPango.cpp:
2137 (WebCore::SimpleFontData::platformInit):
2139 2009-03-19 Alexey Proskuryakov <ap@webkit.org>
2141 Reviewed by Darin Adler.
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
2147 Test: fast/dom/Range/deleted-range-endpoints.html
2149 * dom/Range.cpp: (WebCore::Range::processContents): Set the final range in accordance
2150 to the specification.
2152 2009-03-19 Anders Carlsson <andersca@apple.com>
2154 Reviewed by Dan Bernstein.
2156 <rdar://problem/6682554> Flash content not being rendered (Shockwave Flash 10.0 r22)
2158 If calling updateWidget for some reason resulted in another widget being added to m_widgetUpdateSet, then
2159 that object would never be updated.
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.
2165 (WebCore::FrameView::performPostLayoutTasks):
2166 Loop over the update set multiple times until all widgets have been updated or until we reach the cap.
2170 2009-03-18 Timothy Hatcher <timothy@apple.com>
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.
2176 <rdar://problem/6687342> -[WebView scheduleInRunLoop:forMode:] has no affect on timers
2178 Reviewed by Darin Adler.
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):
2202 2009-03-19 Dimitri Glazkov <dglazkov@chromium.org>
2204 Reviewed by Darin Fisher.
2206 https://bugs.webkit.org/show_bug.cgi?id=24702
2207 Upstream miscellaneous bindings changes.
2209 * bindings/v8/ScheduledAction.cpp:
2210 (WebCore::ScheduledAction::execute): Changed to call lower-case evaluate.
2211 * bindings/v8/ScriptCallStack.h: Added an extra include.
2213 2009-03-19 Simon Fraser <simon.fraser@apple.com>
2215 Reviewed by Dave Hyatt
2217 https://bugs.webkit.org/show_bug.cgi?id=24686
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
2226 Improved the code by adding a utility method, isHitCandidate(), which computes and tests
2227 z-depth when necessary.
2229 Tests: transforms/3d/point-mapping/3d-point-mapping-coplanar.html
2230 transforms/3d/point-mapping/3d-point-mapping-overlapping.html
2232 * rendering/RenderLayer.cpp:
2233 (WebCore::isHitCandidate):
2234 (WebCore::RenderLayer::hitTestLayer):
2236 2009-03-19 Jeremy Moskovich <jeremy@chromium.org>
2238 Reviewed by Dimitri Glazkov.
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.
2246 No observable change in behavior, so no test.
2248 * platform/graphics/chromium/ColorChromium.cpp:
2249 (WebCore::focusRingColor):
2250 * platform/graphics/chromium/ColorChromiumMac.mm: Added.
2252 2009-03-19 Pavel Feldman <pfeldman@chromium.org>
2254 Reviewed by Dimitri Glazkov.
2256 https://bugs.webkit.org/show_bug.cgi?id=24675
2257 Unforking frontend: add custom InspectorController methods
2260 * bindings/v8/custom/V8InspectorControllerCustom.cpp: Added.
2262 2009-03-19 Jay Campan <jcampan@google.com>
2264 Reviewed by Dimitri Glazkov.
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.
2270 * platform/chromium/PopupMenuChromium.cpp:
2271 (WebCore::PopupContainer::selectedIndex):
2272 * platform/chromium/PopupMenuChromium.h:
2274 2009-03-19 Evan Stade <estade@chromium.org>
2276 Reviewed by Dimitri Glazkov.
2278 https://bugs.webkit.org/show_bug.cgi?id=24526
2279 Improve windows skia text stroking.
2281 Test: LayoutTests/svg/custom/struct-use-09-b.svg
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
2287 (WebCore::getPathForGlyph):
2288 (WebCore::skiaDrawText):
2290 2009-03-19 Simon Hausmann <simon.hausmann@nokia.com>
2292 Reviewed by Tor Arne Vestbø.
2294 Fixed support for doing calls from JavaScript into NPAPI Plugins for the Qt port on Windows.
2296 Removed dead code for distinguishing between Widget and PluginView in the Qt port.
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.
2308 2009-03-19 Cameron Zwarich <cwzwarich@uwaterloo.ca>
2310 Reviewed by Oliver Hunt.
2312 Bug 24596: ASSERT in JSC::PropertySlot::slotBase @ iGoogle homepage
2313 <https://bugs.webkit.org/show_bug.cgi?id=24596>
2314 <rdar://problem/6686493>
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.
2321 The fix is to do the access check before calling JSGlobalObject::getOwnPropertySlot().
2323 * bindings/js/JSDOMWindowCustom.h:
2324 (WebCore::JSDOMWindow::customGetOwnPropertySlot):
2326 2009-03-18 Alexey Proskuryakov <ap@webkit.org>
2328 Reviewed by Sam Weinig.
2330 https://bugs.webkit.org/show_bug.cgi?id=24676
2331 Simple cross-origin requests shouldn't dispatch upload progress events
2333 Test: http/tests/xmlhttprequest/simple-cross-origin-progress-events.html
2335 * loader/CrossOriginAccessControl.cpp: (WebCore::passesAccessControlCheck): Added a comment
2336 explaining the somewhat unexpected behavior of this function.
2338 * xml/XMLHttpRequestUpload.cpp: (WebCore::XMLHttpRequestUpload::hasListeners):
2339 * xml/XMLHttpRequestUpload.h:
2340 Report whether there are any event listeners registered.
2342 * xml/XMLHttpRequest.h: Added m_uploadEventsAllowed.
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.
2357 2009-03-18 Marc-Antoine Ruel <maruel@chromium.org>
2359 Reviewed by Darin Fisher.
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.
2365 * history/BackForwardListChromium.cpp:
2366 (WebCore::BackForwardList::BackForwardList):
2367 (WebCore::BackForwardList::close):
2369 2009-03-18 Eric Carlson <eric.carlson@apple.com>
2371 Reviewed by Simon Fraser.
2373 Fix for <rdar://problem/6685235>
2374 <video> element poster cannot be set dynamically if not originally set up in HTML
2376 Allocate the media engine immediately so the plug-in proxy is available for
2377 scripting right away.
2379 * platform/graphics/MediaPlayer.cpp:
2380 (WebCore::MediaPlayer::MediaPlayer):
2382 2009-03-18 Beth Dakin <bdakin@apple.com>
2384 Reviewed by Dave Hyatt.
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/
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.
2394 * rendering/RenderObject.cpp:
2395 (WebCore::RenderObject::offsetParent): offsetParent should return a
2396 RenderBoxModelObject rather than just a RenderBox, which is more
2399 2009-03-18 Anders Carlsson <andersca@apple.com>
2401 Reviewed by Darin Adler.
2403 <rdar://problem/6504776>
2404 CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
2406 Return early in case calling the client ends up spinning the run loop and completing/cancelling the load.
2408 * loader/NetscapePlugInStreamLoader.cpp:
2409 (WebCore::NetscapePlugInStreamLoader::didCancel):
2411 2009-03-18 David Levin <levin@chromium.org>
2413 Reviewed by Dimitri Glazkov.
2415 https://bugs.webkit.org/show_bug.cgi?id=24664
2416 Upstreaming v8 collection.h
2418 No change in behavior, so no test.
2420 * bindings/v8/V8Collection.h: Added.
2422 2009-03-18 Sam Weinig <sam@webkit.org>
2424 Reviewed by Simon Fraser.
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>
2430 Match the CSSOM spec for getClientRects and getBoundingClientRect by
2431 returning a 0x0 rect at the correct top/left position for empty inline
2434 * rendering/RenderInline.cpp:
2435 (WebCore::RenderInline::absoluteRects):
2436 (WebCore::RenderInline::absoluteQuads):
2438 2009-03-18 David Levin <levin@chromium.org>
2440 Reviewed by Eric Seidel.
2442 Match the changes done for windows in the bug
2443 https://bugs.webkit.org/show_bug.cgi?id=24530.
2445 No change in behavior, so no test.
2447 * rendering/RenderThemeChromiumLinux.cpp:
2448 (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
2450 2009-03-18 Dirk Schulze <krit@webkit.org>
2452 Reviewed by Holger Freyther.
2454 Added support for SVG's stroked texts to Qt.
2456 [Qt] SVGs stroked text support missing
2457 https://bugs.webkit.org/show_bug.cgi?id=24262
2459 * platform/graphics/qt/FontQt.cpp:
2460 (WebCore::Font::drawComplexText):
2462 2009-03-18 Mark Rowe <mrowe@apple.com>
2464 Reviewed by Alexey Proskuryakov.
2466 Fix fast/encoding/char-decoding.html with recent ICU.
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.
2472 2009-03-17 David Levin <levin@chromium.org>
2474 Reviewed by Dimitri Glazkov.
2476 https://bugs.webkit.org/show_bug.cgi?id=24662
2477 Chromium build fixes.
2479 Bug https://bugs.webkit.org/show_bug.cgi?id=24663 tracks
2480 the invalid implementation of ScriptCallStack.
2482 No change in behavior, so no test.
2484 * bindings/v8/ScriptCallStack.h:
2485 (WebCore::ScriptCallStack::state):
2486 * platform/graphics/skia/PlatformContextSkia.cpp:
2487 (PlatformContextSkia::drawRect):
2489 2009-03-17 David Carson <dacarson@apple.com>
2491 Reviewed by David Hyatt.
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
2497 * css/CSSStyleSelector.cpp:
2498 (WebCore::elementCanUseSimpleDefaultStyle):
2500 2009-03-17 Darin Adler <darin@apple.com>
2502 Reviewed by Adele Peterson.
2504 <rdar://problem/6687005> Need support for new move-left/right selectors.
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.
2513 2009-03-17 Ojan Vafai <ojan@chromium.org>
2515 Reviewed by Adele Peterson.
2517 Put the padding inside scrollbars on textareas.
2518 https://bugs.webkit.org/show_bug.cgi?id=24370
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
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):
2556 2009-03-17 Darin Adler <darin@apple.com>
2558 Reviewed by David Hyatt.
2560 Bug 24517: REGRESSION (r41552): innerHTML does an updateLayout -- unneeded and can be slow
2561 https://bugs.webkit.org/show_bug.cgi?id=24517
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.
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.
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.
2590 2009-03-17 Scott Violet <sky@google.com>
2592 Reviewed by Eric Seidel.
2594 https://bugs.webkit.org/show_bug.cgi?id=24651
2595 Skia does not always render text fill/stroke pattern/gradient/color correctly
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 .
2601 * platform/graphics/GraphicsContext.cpp:
2602 (WebCore::GraphicsContext::strokeColorSpace):
2603 (WebCore::GraphicsContext::fillColorSpace):
2604 * platform/graphics/GraphicsContext.h:
2606 * platform/graphics/GraphicsContextPrivate.h:
2607 * platform/graphics/skia/SkiaFontWin.cpp:
2608 (WebCore::paintSkiaText):
2610 2009-03-17 Adele Peterson <adele@apple.com>
2612 Reviewed by Darin Adler.
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
2617 Test: editing/inserting/6633727.html
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.
2626 * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply):
2628 2009-03-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2630 Reviewed by Kevin Ollivier.
2632 https://bugs.webkit.org/show_bug.cgi?id=24115
2633 Introduce platform independent stubs for plugins.
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.
2643 2009-03-17 Darin Adler <darin@apple.com>
2645 Earlier version reviewed by Adele Peterson.
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.
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.
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.
2662 2009-03-17 Simon Fraser <simon.fraser@apple.com>
2664 Reviewed by Dave Hyatt
2666 https://bugs.webkit.org/show_bug.cgi?id=24632
2668 Fix repaint issues when composited layers come and go (only applies
2669 when ACCELERATED_COMPOSITING is turned on).
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:
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.
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.
2689 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2690 Call layer->setMustOverlayCompositedLayers() rather than setForcedCompositingLayer().
2692 (WebCore::RenderLayerCompositor::needsToBeComposited):
2693 (WebCore::RenderLayerCompositor::requiresCompositingLayer):
2694 (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
2695 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2696 * rendering/RenderLayerCompositor.h:
2698 Rename requiresCompositingLayerForTransform() to requiresCompositingForTransform()
2699 and make it a class static method to match requiresCompositingForAnimation(). Both
2700 now take RenderObjects, rathern than RenderLayers.
2702 * rendering/style/RenderStyle.h:
2703 (WebCore::InheritedFlags::hasTransformRelatedProperty):
2704 Minor tidyup using convenience methods added in an earlier commit.
2706 2009-03-17 Simon Fraser <simon.fraser@apple.com>
2708 Reviewed by Darin Adler
2710 https://bugs.webkit.org/show_bug.cgi?id=24396
2713 Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now, and add some
2714 comments to make the #ifdefs more readable.
2716 * css/CSSComputedStyleDeclaration.cpp:
2717 (WebCore::computedTransform):
2718 Add a comment to mention that we don't flatten the matrix.
2720 * css/MediaQueryEvaluator.cpp:
2721 (WebCore::transform_3dMediaFeatureEval):
2722 Have the 'transform-3d' media query evaluate to 'true' if 3d-rendering
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
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
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.
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.
2748 * rendering/RenderObject.cpp:
2749 (WebCore::RenderObject::transformFromContainer):
2750 Only take perspective into account if 3d rendering is supported.
2752 * rendering/RenderObject.h:
2753 (WebCore::makeMatrixRenderable):
2754 Utility method that flattens a matrix if 3d rendering is not supported.
2756 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
2758 wx build fix. Fix typo after mouse wheel changes.
2760 * platform/wx/MouseWheelEventWx.cpp:
2761 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2763 2009-03-17 Darin Adler <darin@apple.com>
2765 * inspector/ConsoleMessage.cpp:
2766 (WebCore::ConsoleMessage::isEqual): Fix build, remove stray parenthesis.
2768 2009-03-17 Darin Adler <darin@apple.com>
2770 Fix crash seen right away when running run-webkit-tests.
2772 * inspector/ConsoleMessage.cpp:
2773 (WebCore::ConsoleMessage::isEqual): Restore assertion to its behavior pre-refactoring.
2774 Also tweaked formatting a bit.
2776 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
2778 Reviewed by Darin Adler.
2780 HTMLSelectElement::add() doesn't look at exception code returned from insertBefore(), so
2781 it doesn't need to zero it out before calling.
2783 * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::add): Removed "ec = 0" line.
2785 2009-03-17 Dan Bernstein <mitz@apple.com>
2787 Reviewed by Adam Roben.
2789 - WebCore part of adding a mechanism for controlling the caching of
2790 responses through WebFrameLoaderClient
2792 Mac already has such a mechanism, and this adds one for CFNetwork ports.
2794 * WebCore.vcproj/WebCore.vcproj: Added EmptyClients.h
2795 and ResourceLoaderCFNet.cpp.
2797 * loader/EmptyClients.h:
2798 (WebCore::EmptyFrameLoaderClient::shouldCacheResponse): Added an
2799 implementation that always returns true.
2801 * loader/FrameLoaderClient.h: Declared shouldCacheResponse().
2803 * loader/ResourceLoader.h: Ditto.
2805 * loader/cf/ResourceLoaderCFNet.cpp: Added.
2806 (WebCore::ResourceLoader::shouldCacheResponse): Added. Calls through to
2807 FrameLoaderClient::shouldCacheResponse().
2809 * platform/network/ResourceHandleClient.h:
2810 (WebCore::ResourceHandleClient::shouldCacheResponse): Added an
2811 implementation that always returns true.
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.
2818 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
2820 Reviewed by Darin Adler.
2822 https://bugs.webkit.org/show_bug.cgi?id=13287
2823 Cannot change SELECT to a dynamically created option
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
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.
2836 * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::insertedIntoTree):
2837 Make sure that the select element knows about its new selected option.
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.
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.
2849 * html/HTMLSelectElement.h: Removed overrides for ContainerNode methods that only called
2850 base class versions.
2852 2009-03-17 Steve Falkenburg <sfalken@apple.com>
2854 <rdar://problem/6690324> Accessing FTP sites reads unallocated memory, can result in garbled entries or crashes
2856 Reviewed by Darin Adler.
2858 * loader/FTPDirectoryDocument.cpp:
2859 (WebCore::FTPDirectoryTokenizer::parseAndAppendOneLine): Assign CString to a local while we hold pointers into it.
2861 2009-03-16 David Hyatt <hyatt@apple.com>
2863 <rdar://problem/6648411> REGRESSION: Layout of page is wrong at http://www.popcap.com/
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
2870 Reviewed by Darin Adler.
2872 Added fast/block/float/overlapping-floats-with-overflow-hidden.html
2875 * rendering/RenderBlock.cpp:
2876 (WebCore::RenderBlock::addOverhangingFloats):
2877 * rendering/RenderObject.cpp:
2878 (WebCore::RenderObject::enclosingSelfPaintingLayer):
2879 * rendering/RenderObject.h:
2881 2009-03-17 Xan Lopez <xlopez@igalia.com>
2883 Reviewed by Holger Freyther.
2885 https://bugs.webkit.org/show_bug.cgi?id=24592
2886 [GTK] Crash in FcPatternHash
2890 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
2891 (WebCore::FontPlatformData::operator=):
2892 * platform/graphics/gtk/FontPlatformDataPango.cpp:
2894 2009-03-17 Xan Lopez <xlopez@igalia.com>
2896 Reviewed by Holger Freyther.
2898 https://bugs.webkit.org/show_bug.cgi?id=24592
2899 [GTK] Crash in FcPatternHash
2901 Sanitize memory management in pango fonts.
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
2908 * platform/graphics/gtk/FontPlatformDataPango.cpp:
2909 (WebCore::FontPlatformData::~FontPlatformData):
2910 (WebCore::FontPlatformData::operator=):
2911 (WebCore::FontPlatformData::FontPlatformData):
2912 * platform/graphics/gtk/SimpleFontDataPango.cpp:
2914 2009-03-17 Darin Adler <darin@apple.com>
2916 Reviewed by Alexey Proskuryakov.
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
2923 Test: fast/dom/HTMLImageElement/image-load-cross-document.html
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.
2932 * dom/Document.h: Removed ImageLoader, dispatchImageLoadEventSoon,
2933 dispatchImageLoadEventsNow, removeImage, m_imageLoadEventDispatchSoonList,
2934 m_imageLoadEventDispatchingList, m_imageLoadEventTimer, and imageLoadEventTimerFired.
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.
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
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
2975 * svg/SVGImageLoader.cpp:
2976 (WebCore::SVGImageLoader::dispatchLoadEvent): Ditto.
2977 * wml/WMLImageLoader.cpp:
2978 (WebCore::WMLImageLoader::dispatchLoadEvent): Ditto.
2980 2009-03-17 Dimitri Glazkov <dglazkov@chromium.org>
2982 Reviewed by Timothy Hatcher.
2984 https://bugs.webkit.org/show_bug.cgi?id=24623
2985 Refactor ConsoleMessage to use ScriptFuncitonCall and eliminate JSC
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:
3008 2009-03-17 Kevin Ollivier <kevino@theolliviers.com>
3010 Reviewed by Mark Rowe.
3012 Get BUILDING_ON_* defines from Platform.h.
3014 https://bugs.webkit.org/show_bug.cgi?id=24630
3018 2009-03-16 Xan Lopez <xlopez@igalia.com>
3020 Reviewed by Holger Freyther.
3022 https://bugs.webkit.org/show_bug.cgi?id=24592
3023 [GTK] Crash in FcPatternHash
3025 Sanitize memory management in gtk fonts.
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
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):
3040 2009-03-17 Ariya Hidayat <ariya.hidayat@nokia.com>
3042 Build fix for Qt < 4.5.
3044 As reported by Yael Aharon <yael.aharon@nokia.com>
3046 * platform/graphics/qt/GraphicsContextQt.cpp:
3047 (WebCore::GraphicsContext::drawLine):
3049 2009-03-17 Alexey Proskuryakov <ap@webkit.org>
3051 Reviewed by Sam Weinig.
3053 https://bugs.webkit.org/show_bug.cgi?id=24614
3054 Access control checks are different in cached and uncached cases
3056 Test: http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached.html
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
3065 (WebCore::isSimpleCrossOriginAccessRequest): Use the above methods.
3067 * loader/CrossOriginAccessControl.h: Expose isOnAccessControlSimpleRequestMethodWhitelist.
3069 * loader/CrossOriginPreflightResultCache.cpp:
3070 (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod):
3071 (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
3072 Use the new checks for simple method and header.
3074 2009-03-16 Gustavo Noronha Silva <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
3076 Reviewed by Mark Rowe.
3078 https://bugs.webkit.org/show_bug.cgi?id=24638
3079 [GTK] HTML5 media tags do not work
3081 Add a repaint-requested signal to the video sink, and use it to
3082 call MediaPlayerPrivate::repaint, so that the video actually
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):
3093 2009-03-16 Gustavo Noronha Silva <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
3095 Reviewed by Holger Freyther.
3097 https://bugs.webkit.org/show_bug.cgi?id=24638
3098 [GTK] HTML5 media tags do not work
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)
3104 * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3105 (WebCore::MediaPlayerPrivate::duration):
3107 2009-03-16 Darin Adler <darin@apple.com>
3109 Reviewed by Kevin Decker.
3111 <rdar://problem/6642742> Top Sites malfunction when switching text zoom mode
3114 (WebCore::Frame::setNeedsReapplyStyles): Don’t do anything if the frame is
3115 currently showing a non-HTML view.
3117 2009-03-16 Darin Adler <darin@apple.com>
3119 Reviewed by Adele Peterson.
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
3125 Test: editing/selection/move-paragraph-document-edges.html
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
3133 (WebCore::nextParagraphPosition): Ditto.
3135 2009-03-16 Darin Adler <darin@apple.com>
3137 Reviewed by Adele Peterson.
3139 Bug 24619: RenderObject::selectionStartEnd does not need to be a virtual function
3140 https://bugs.webkit.org/show_bug.cgi?id=24619
3142 * rendering/RenderObject.h: Remove virtual keyword from selectionStartEnd declaration.
3143 * rendering/RenderView.h: Ditto.
3145 2009-03-16 Peter Kasting <pkasting@google.com>
3147 Reviewed by David Hyatt.
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.
3154 (WebCore::Node::dispatchWheelEvent):
3155 * dom/WheelEvent.cpp:
3156 (WebCore::WheelEvent::WheelEvent):
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):
3172 2009-03-16 Simon Fraser <simon.fraser@apple.com>
3174 Reviewed by Eric Seidel
3176 Clean up a few issues in the Animation code:
3178 * page/animation/AnimationBase.cpp:
3179 (WebCore::AnimationBase::updateStateMachine):
3182 (WebCore::AnimationBase::willNeedService):
3183 Don't round to float, use std::max
3185 * page/animation/AnimationController.cpp:
3186 (WebCore::AnimationControllerPrivate::startTimeResponse):
3187 Fix erroneously copied line to null out m_lastResponseWaiter.
3189 2009-03-12 David Hyatt <hyatt@apple.com>
3191 Reviewed by Eric Seidel
3193 https://bugs.webkit.org/show_bug.cgi?id=13632
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.
3198 Existing tests cover this.
3200 * rendering/RenderBlock.cpp:
3201 (WebCore::RenderBlock::lowestPosition):
3202 (WebCore::RenderBlock::rightmostPosition):
3204 2009-03-16 Sam Weinig <sam@webkit.org>
3206 Reviewed by Anders Carlsson.
3208 Fix for <rdar://problem/6320555>
3209 Add an upper limit for setting HTMLSelectElement.length.
3211 Test: fast/forms/select-max-length.html
3213 * html/HTMLSelectElement.cpp:
3214 (WebCore::HTMLSelectElement::setOption):
3215 (WebCore::HTMLSelectElement::setLength):
3217 2009-03-16 Eric Carlson <eric.carlson@apple.com>
3219 Reviewed by Simon Fraser.
3221 <rdar://problem/6686721> Media document crash in 64-bit WebKit
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
3228 2009-03-16 Dimitri Glazkov <dglazkov@chromium.org>
3230 Reviewed by Timothy Hatcher.
3232 https://bugs.webkit.org/show_bug.cgi?id=24590
3233 Refactor InspectorDOMStorageResource to use ScriptFunctionCall.
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:
3253 2009-03-16 Mike Belshe <mike@belse.com>
3255 Reviewed by Dimitri Glazkov.
3257 https://bugs.webkit.org/show_bug.cgi?id=24580
3258 Fix query() to match KURL behavior, this time with the code that
3261 * platform/KURLGoogle.cpp:
3262 (WebCore::KURL::query): Fix copy/paste mistake.
3264 2009-03-16 Alexey Proskuryakov <ap@webkit.org>
3266 Reviewed by Darin Adler.
3268 https://bugs.webkit.org/show_bug.cgi?id=21752
3269 REGRESSION: referencing XHR constructor for a not yet loaded frame permanently breaks it
3271 Test: fast/dom/Window/window-early-properties-xhr.html
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
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.
3304 2009-03-15 Alexey Proskuryakov <ap@webkit.org>
3306 Reviewed by Darin Adler.
3308 https://bugs.webkit.org/show_bug.cgi?id=24549
3309 Impose a limit on Access-Control-Max-Age value
3311 * loader/CrossOriginPreflightResultCache.cpp:
3312 (WebCore::CrossOriginPreflightResultCacheItem::parse):
3314 2009-03-15 Greg Bolsinga <bolsinga@apple.com>
3316 Reviewed by David Kilzer.
3318 <rdar://problem/6668875> Normalize Geolocation results
3320 * platform/mac/GeolocationServiceMac.mm:
3321 (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3323 2009-03-15 Greg Bolsinga <bolsinga@apple.com>
3325 Reviewed by David Kilzer.
3327 Update ::toString format as suggested by Darin Adler.
3329 * page/Geoposition.cpp:
3330 (WebCore::Geoposition::toString):
3332 2009-03-15 David Kilzer <ddkilzer@apple.com>
3334 <rdar://problem/6668238> WebCore is registering text encodings needlessly from KURL constructor.
3336 Reviewed by Darin Adler.
3338 Yet another case where we would trigger extended encoding loading needlessly.
3340 * platform/text/TextEncoding.cpp:
3341 (WebCore::TextEncoding::encodingForFormSubmission):
3343 2009-03-15 Simon Fraser <simon.fraser@apple.com>
3345 Build fix: no review.
3347 * rendering/style/ContentData.h:
3349 2009-03-15 David Kilzer <ddkilzer@apple.com>
3351 Bug 24542: Improve ContentData encapsulation
3353 <https://bugs.webkit.org/show_bug.cgi?id=24542>
3355 Reviewed by Simon Fraser.
3357 No tests since there is no change in behavior.
3359 * rendering/RenderObject.cpp:
3360 (WebCore::RenderObject::createObject): Used getter methods
3361 instead of data members on ContentData class. Used isImage()
3363 * rendering/RenderObjectChildList.cpp:
3364 (WebCore::RenderObjectChildList::updateBeforeAfterContent): Ditto.
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
3373 * rendering/style/ContentData.h: Made m_type, m_content and
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.
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().
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().
3408 2009-03-15 Gustavo Noronha Silva <gns@gnome.org>
3410 Reviewed by Anders Carlsson.
3412 https://bugs.webkit.org/show_bug.cgi?id=24602
3413 [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
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.
3420 * platform/network/soup/ResourceHandleSoup.cpp:
3421 (WebCore::restartedCallback):
3423 2009-03-15 Alexey Proskuryakov <ap@webkit.org>
3425 Reviewed by Darin Adler.
3427 https://bugs.webkit.org/show_bug.cgi?id=19737
3428 No cursor and paste not enabled right clicking text field/area
3430 Test: fast/events/right-click-focus.html
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).
3437 2009-03-15 Alexey Proskuryakov <ap@webkit.org>
3439 Reviewed by Adele Peterson.
3441 https://bugs.webkit.org/show_bug.cgi?id=23949
3442 HTMLSelectElement is in inconsistent state when handling mutation events
3444 Test: fast/forms/mutation-event-recalc.html
3446 * dom/ContainerNode.cpp:
3447 (WebCore::ContainerNode::insertBefore):
3448 (WebCore::ContainerNode::appendChild):
3449 Call childrenChanged() before dispatching modification events, not after.
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.
3468 2009-03-14 Greg Bolsinga <bolsinga@apple.com>
3470 <rdar://problem/6683465>
3472 Geolocation has to be able to handle NULL Frames.
3474 Reviewed by Mark Rowe
3476 2009-03-14 Greg Bolsinga <bolsinga@apple.com>
3478 Reviewed by David Kilzer.
3480 Geoposition::toString was missing the Coordinates after the update.
3482 * page/Geoposition.cpp:
3483 (WebCore::Geoposition::toString):
3485 2009-03-14 Jan Michael Alonzo <jmalonzo@webkit.org>
3487 Reviewed by Mark Rowe.
3489 [Gtk] Build fix - pass a Coordinate to Geoposition::create
3490 https://bugs.webkit.org/show_bug.cgi?id=24603
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
3496 Pass a Coordinate to Geoposition::create.
3498 * platform/gtk/GeolocationServiceGtk.cpp:
3499 (WebCore::GeolocationServiceGtk::updatePosition):
3501 2009-03-14 Alexey Proskuryakov <ap@webkit.org>
3503 Reviewed by Darin Adler.
3505 https://bugs.webkit.org/show_bug.cgi?id=24545
3506 Make cross-site XHR simple request definition match current spec draft
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
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.
3516 2009-03-14 Alexey Proskuryakov <ap@webkit.org>
3518 Reviewed by Darin Adler.
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
3523 https://bugs.webkit.org/show_bug.cgi?id=24548
3524 createElementNS("", name) should create an element in null namespace
3526 Tests: fast/dom/createElementNS-empty-namespace.html
3527 fast/dom/setAttributeNS-empty-namespace.html
3529 * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl):
3530 Convert empty namespaces to null.
3532 2009-03-13 Mark Rowe <mrowe@apple.com>
3534 Rubber-stamped by Dan Bernstein.
3536 Take advantage of the ability of recent versions of Xcode to easily switch the active
3539 * Configurations/DebugRelease.xcconfig:
3541 2009-03-13 John Abd-El-Malek <jam@google.com>
3543 Reviewed by Darin Fisher.
3545 https://bugs.webkit.org/show_bug.cgi?id=24593
3546 Added requestorID so we can track the request to its WebView without using frame (which was removed).
3548 * platform/network/chromium/ResourceRequest.h:
3549 (WebCore::ResourceRequest::ResourceRequest):
3550 (WebCore::ResourceRequest::requestorID):
3551 (WebCore::ResourceRequest::setRequestorID):
3552 (WebCore::ResourceRequest::setTargetType):
3553 (WebCore::ResourceRequest::policyURL):
3554 (WebCore::ResourceRequest::setPolicyURL):
3555 (WebCore::ResourceRequest::requestorPid):
3556 (WebCore::ResourceRequest::setRequestorPid):
3558 2009-03-13 Mike Belshe <mike@belshe.com>
3560 Reviewed by Dimitri Glazkov.
3562 https://bugs.webkit.org/show_bug.cgi?id=24561
3563 Add custom V8 bindings for HTMLElementCanvas, Location.
3565 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: Added.
3566 * bindings/v8/custom/V8LocationCustom.cpp: Added.
3568 2009-03-13 Stephen White <senorblanco@chromium.org>
3570 Reviewed by Eric Seidel.
3572 https://bugs.webkit.org/show_bug.cgi?id=24584
3574 Fix transparent text rendering on Chromium. FontChromiumWin
3575 was calling beginTransparencyLayer()/endTransparencyLayer(), with
3576 a TransparencyWin inside to do GDI ClearType rendering over an
3577 opaque background. TransparencyWin does its special sauce
3578 in the destructor, but it was being called too late to be used
3579 correctly in the layer. Put the special sauce into a new function,
3580 composite(), and call that explicitly instead.
3582 * platform/graphics/chromium/FontChromiumWin.cpp:
3583 (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
3584 * platform/graphics/chromium/TransparencyWin.cpp:
3585 (WebCore::TransparencyWin::~TransparencyWin):
3586 (WebCore::TransparencyWin::composite):
3587 (WebCore::TransparencyWin::init):
3588 * platform/graphics/chromium/TransparencyWin.h:
3589 * rendering/RenderThemeChromiumWin.cpp:
3592 2009-03-13 Mike Belshe <mike@belshe.com>
3594 Reviewed by Dimitri Glazkov.
3596 https://bugs.webkit.org/show_bug.cgi?id=24562
3597 Add custom implementation for getCSSCanvasContext to V8 bindings.
3599 * bindings/v8/custom/V8DocumentCustom.cpp: Added new method.
3601 2009-03-13 Mike Belshe <mike@belse.com>
3603 Reviewed by Dimitri Glazkov.
3605 https://bugs.webkit.org/show_bug.cgi?id=24580
3606 Fix query() to match KURL behavior.
3608 * platform/KURLGoogle.cpp:
3609 (WebCore::KURL::query): remove extra logic around question mark.
3611 2009-03-13 Chris Fleizach <cfleizach@apple.com>
3613 Reviewed by Beth Dakin.
3615 Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can return nil
3616 https://bugs.webkit.org/show_bug.cgi?id=24474
3618 Test: platform/mac-snowleopard/accessibility/table-multi-bodies.html
3620 * page/AccessibilityTable.cpp:
3621 (WebCore::AccessibilityTable::cellForColumnAndRow):
3623 2009-03-13 Jian Li <jianli@chromium.org>
3625 Reviewed by Dimitri Glazkov.
3627 https://bugs.webkit.org/show_bug.cgi?id=24589
3628 Upstream changes to V8 event listeners (Chromium r11133) in order to
3629 fix worker functionality break in Chromium.
3631 * bindings/v8/V8AbstractEventListener.cpp:
3632 (WebCore::V8AbstractEventListener::invokeEventHandler):
3633 (WebCore::V8AbstractEventListener::handleEvent):
3634 * bindings/v8/V8AbstractEventListener.h:
3635 * bindings/v8/V8WorkerContextEventListener.cpp:
3636 (WebCore::V8WorkerContextEventListener::handleEvent):
3638 2009-03-13 Dimitri Glazkov <dglazkov@chromium.org>
3640 Reviewed by Timothy Hatcher.
3642 https://bugs.webkit.org/show_bug.cgi?id=24524
3643 Introduce ScriptObject and ScriptFunctionCall abstractions.
3645 * GNUmakefile.am: Added ScriptObject and ScriptFunctionCall to project.
3646 * WebCore.pro: Ditto.
3647 * WebCore.vcproj/WebCore.vcproj: Ditto.
3648 * WebCore.xcodeproj/project.pbxproj: Ditto.
3649 * WebCoreSources.bkl: Ditto.
3650 * bindings/js/ScriptFunctionCall.cpp: Added.
3651 * bindings/js/ScriptFunctionCall.h: Added.
3652 * bindings/js/ScriptObject.cpp: Added.
3653 * bindings/js/ScriptObject.h: Added.
3654 * bindings/js/ScriptObjectQuarantine.cpp: Added.
3655 * bindings/js/ScriptObjectQuarantine.h: Added.
3656 * inspector/InspectorController.cpp:
3657 (WebCore::InspectorController::populateScriptObjects): Changed to use InspectorDatabaseResource::bind.
3658 (WebCore::InspectorController::resetScriptObjects): Changed to use InspectorDatabaseResource::unbind.
3659 (WebCore::InspectorController::didOpenDatabase): Changed to use InspectorDatabaseResource::unbind.
3660 * inspector/InspectorController.h: Removed addScriptDatabaseResource and
3661 removeScriptDatabaseResource declarations.
3662 * inspector/InspectorDatabaseResource.cpp:
3663 (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
3664 (WebCore::InspectorDatabaseResource::bind): Added.
3665 (WebCore::InspectorDatabaseResource::unbind): Added.
3666 * inspector/InspectorDatabaseResource.h: Added bind and unbind declarations.
3668 2009-03-13 Peter Kasting <pkasting@google.com>
3670 Reviewed by Eric Seidel.
3672 https://bugs.webkit.org/show_bug.cgi?id=24467
3673 Make Skia drawRect() and stroke behavior match CG.
3675 This makes drawRect() ignore the stroke width (like CG does), and
3676 adds a warning comment about that to the appropriate header.
3678 It also eliminates some hacky code in Skia's stroke preparation,
3679 which tried to adjust odd-width strokes to fall on pixel boundaries.
3680 Not only did this not match CG, it wouldn't necessarily work right,
3681 because there could be other transforms (e.g. full-page zoom) that
3682 would affect the stroke before it reached the device pixel level.
3684 * platform/graphics/GraphicsContext.h:
3685 * platform/graphics/skia/GraphicsContextSkia.cpp:
3686 (WebCore::GraphicsContext::drawRect):
3687 (WebCore::GraphicsContext::fillRect):
3688 * platform/graphics/skia/PlatformContextSkia.cpp:
3689 (PlatformContextSkia::drawRect):
3690 (PlatformContextSkia::setupPaintForStroking):
3692 2009-03-13 Jian Li <jianli@chromium.org>
3694 Reviewed by Dimitri Glazkov.
3696 https://bugs.webkit.org/show_bug.cgi?id=24583
3697 Need to change scope of constructor and destructor of V8ObjectEventListener from private
3698 to protected so that they could be used in its derived class V8WorkerContextEventListener.
3700 * bindings/v8/V8ObjectEventListener.h:
3702 2009-03-13 David Levin <levin@chromium.org>
3704 Reviewed by Dimitri Glazkov.
3706 https://bugs.webkit.org/show_bug.cgi?id=24579
3707 Many V8*Event* files are misplaced.
3709 This code is infrastructure for supporting the bindings and thus should
3710 be in the bindings/v8 directory.
3712 * bindings/v8/V8AbstractEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.cpp.
3713 * bindings/v8/V8AbstractEventListener.h: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.h.
3714 * bindings/v8/V8LazyEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.cpp.
3715 * bindings/v8/V8LazyEventListener.h: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.h.
3716 * bindings/v8/V8ObjectEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.cpp.
3717 * bindings/v8/V8ObjectEventListener.h: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.h.
3718 * bindings/v8/V8WorkerContextEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.cpp.
3719 * bindings/v8/V8WorkerContextEventListener.h: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.h.
3721 2009-03-13 Adele Peterson <adele@apple.com>
3723 Reviewed by Justin Garcia.
3725 Fix for <rdar://problem/5089327> Color of quoted content is wrong when pasted inside other quoted content
3727 Test: editing/pasteboard/5089327.html
3729 Handle spans being pasted within a quoted region in the same way we handle "paste as quotation" content.
3731 * editing/ReplaceSelectionCommand.cpp:
3732 (WebCore::handleStyleSpansBeforeInsertion):
3733 (WebCore::ReplaceSelectionCommand::handleStyleSpans):
3735 2009-03-13 Greg Bolsinga <bolsinga@apple.com>
3737 Reviewed by Simon Fraser.
3739 Update Geolocation perimission dialogs to be asynchronous.
3740 https://bugs.webkit.org/show_bug.cgi?id=24505
3742 Geolocation now requests permission from the Chrome asynchronously.
3743 The Chrome is passed the Geolocation object, and the Chrome sets the permission
3744 on the Geolocation. Geolocation also tracks if the Chrome should clear its cache
3745 of SecurityOrigins with geolocation permission. This is so that the GeolocationService
3746 can inform the Chrome of its request, and the Chrome is also free to implement its
3750 * WebCore.xcodeproj/project.pbxproj:
3752 (WebCore::Chrome::requestGeolocationPermissionForFrame):
3754 * page/ChromeClient.h:
3755 (WebCore::ChromeClient::requestGeolocationPermissionForFrame):
3756 * page/Geolocation.cpp:
3757 (WebCore::Geolocation::Geolocation):
3758 (WebCore::Geolocation::getCurrentPosition):
3759 (WebCore::Geolocation::watchPosition):
3760 (WebCore::Geolocation::setIsAllowed):
3761 (WebCore::Geolocation::displayChallengeIfNecessary):
3762 (WebCore::Geolocation::geolocationServicePositionChanged):
3763 * page/Geolocation.h:
3764 (WebCore::Geolocation::isAllowed):
3765 (WebCore::Geolocation::setShouldClearCache):
3766 (WebCore::Geolocation::shouldClearCache):
3767 (WebCore::Geolocation::):
3769 2009-03-13 Anders Carlsson <andersca@apple.com>
3771 Reviewed by Dan Bernstein.
3773 <rdar://problem/6610666> Revise the Cocoa event model text API
3775 Add a NPCocoaEventTextInput event type. Remove the text input variables.
3780 2009-03-13 Kevin Decker <kdecker@apple.com>
3784 <rdar://problem/6630340> REGRESSION (39114-39115): Unity Web Player no longer works if Flip4Mac is also installed
3786 The code assumed if we have a plug-in that supports "application/x-oleobject" we should always prefer the object tag
3787 over of an embed tag. That assumption can cause the Mac platform to load the wrong plug-in, as Flip4Mac claims supports
3790 * rendering/RenderPartObject.cpp:
3791 (WebCore::shouldUseEmbedDescendant): Made the Mac platform always return true here.
3793 2009-03-13 Jian Li <jianli@chromium.org>
3795 Reviewed by Dimitri Glazkov.
3797 https://bugs.webkit.org/show_bug.cgi?id=24559
3798 Need to port JSC fix (r41565) to V8 in order to fix layout test onload-single-line-comment.html.
3800 * bindings/v8/custom/V8LazyEventListener.cpp:
3801 (WebCore::V8LazyEventListener::getListenerFunction):
3802 (WebCore::V8LazyEventListener::getWrappedListenerFunction):
3804 2009-03-13 Jian Li <jianli@chromium.org>
3806 Reviewed by Dimitri Glazkov.
3808 https://bugs.webkit.org/show_bug.cgi?id=24557
3809 This is to support running multiple workers in a single worker process in chromium.
3811 * bindings/v8/custom/V8WorkerContextEventListener.cpp:
3812 (WebCore::V8WorkerContextEventListener::handleEvent):
3813 Add locker to v8 event listener of worker context.
3815 2009-03-13 Alexey Proskuryakov <ap@webkit.org>
3817 Reviewed by Sam Weinig.
3819 https://bugs.webkit.org/show_bug.cgi?id=24575
3820 XHR response is incorrect after a network error.
3822 Tests: http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
3823 http/tests/xmlhttprequest/cross-site-denied-response-sync.html
3824 http/tests/xmlhttprequest/cross-site-denied-response.html
3826 * xml/XMLHttpRequest.cpp:
3827 (WebCore::XMLHttpRequest::networkError): Call internalAbort() to fully reset the request.
3828 (WebCore::XMLHttpRequest::didFailRedirectCheck): No need to call internalAbort() here. Note
3829 that since internalAbort() can drop GC protection, it is not safe to use the object after
3831 (WebCore::XMLHttpRequest::didReceiveData): Check that the request wasn't aborted, and
3832 return early if it was. This can happen during sync requests, as the loader does not know
3833 that it was aborted, and just synthesizes all callbacks.
3835 2009-03-13 Adam Bergkvist <adam.bergkvist@ericsson.com>
3837 Reviewed by Alexey Proskuryakov.
3839 https://bugs.webkit.org/show_bug.cgi?id=3547
3840 XMLHttpRequest.statusText returns always "OK"
3842 Covered by existing tests (which now pass on all platforms but Mac).
3844 * xml/XMLHttpRequest.cpp:
3845 (WebCore::XMLHttpRequest::statusText): Return ResourceResponse status text. It is now up
3846 to each platform to correctly set the status text or set it to "OK" to retain current
3849 2009-03-13 Adam Bergkvist <adam.bergkvist@ericsson.com>
3851 Reviewed by Alexey Proskuryakov.
3853 https://bugs.webkit.org/show_bug.cgi?id=24349
3854 [QT] HTTP status text is never set
3856 Set HTTP status text to the reason phrase attribute of QNetworkReply.
3858 * platform/network/qt/QNetworkReplyHandler.cpp:
3859 (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
3861 2009-03-12 Simon Fraser <simon.fraser@apple.com>
3863 Reviewed by Mark Rowe
3865 <rdar://problem/6622300>: Reproducible crash on
3866 <http://www.editgrid.com/explore/tnc/dave/FusionChart%3A_Candlestick>
3868 Prevent CSSStyleSheet::checkLoaded() writing to freed memory when it gets
3869 deleted from under itself. The sheetLoaded() notification can allow scripts
3870 to run via HTMLTokenizer::executeScriptsWaitingForStylesheets(),
3871 which can cause the last ref to the CSSStyleSheet to be released.
3873 * css/CSSStyleSheet.cpp:
3874 (WebCore::CSSStyleSheet::checkLoaded):
3876 2009-03-12 Kevin Ollivier <kevino@theolliviers.com>
3878 wx build fix. Allow make-generated-sources.sh to pass args down to DerivedSources.make
3880 * make-generated-sources.sh:
3882 2009-03-12 Adam Treat <adam.treat@torchmobile.com>
3884 Reviewed by Oliver Hunt.
3886 https://bugs.webkit.org/show_bug.cgi?id=24498
3887 Fix the Qt port to use the same algorithm for drawing dashed and dotted
3888 borders as the other ports. This makes the Qt port pixel-for-pixel perfect
3889 compared to border drawing with Apple's canonical mac port and much closer
3890 to konqueror and firefox behavior.
3892 * platform/graphics/qt/GraphicsContextQt.cpp:
3893 (WebCore::GraphicsContext::drawLine):
3895 2009-02-26 Eric Seidel <eric@webkit.org>
3897 Reviewed by Justin Garcia.
3899 Clean up DOMSelection to use some helper functions
3900 making the code smaller, and less error-prone.
3901 https://bugs.webkit.org/show_bug.cgi?id=19221
3903 I tried moving DOMSelection off of rangeCompliantEquivalent
3904 but failed. VisibleSelection holds positions like (table, 1) to mean
3907 * page/DOMSelection.cpp:
3908 (WebCore::DOMSelection::visibleSelection):
3909 (WebCore::anchorPosition):
3910 (WebCore::focusPosition):
3911 (WebCore::basePosition):
3912 (WebCore::extentPosition):
3913 (WebCore::DOMSelection::anchorNode):
3914 (WebCore::DOMSelection::anchorOffset):
3915 (WebCore::DOMSelection::focusNode):
3916 (WebCore::DOMSelection::focusOffset):
3917 (WebCore::DOMSelection::baseNode):
3918 (WebCore::DOMSelection::baseOffset):
3919 (WebCore::DOMSelection::extentNode):
3920 (WebCore::DOMSelection::extentOffset):
3921 * page/DOMSelection.h:
3923 2009-03-12 Dmitry Titov <dimich@chromium.org>
3925 Reviewed by Dimitri Glazkov.
3927 https://bugs.webkit.org/show_bug.cgi?id=24563
3928 Change ResourceRequest to be a struct rather then a class to match other declarations.
3930 * platform/network/chromium/ResourceRequest.h:
3932 2009-03-12 David Levin <levin@chromium.org>
3934 Reviewed by Darin Fisher.
3936 Bug 24530: width100percent-searchfield.html should be fixed for chromium.
3937 <https://bugs.webkit.org/show_bug.cgi?id=24530>
3939 Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
3941 * css/themeChromiumWin.css: Added.
3942 Overrides the changes to start supporting input[type="search"] on Windows (since
3943 Chromium doesn't do anything special for this).
3945 * rendering/RenderThemeChromiumWin.cpp:
3946 (WebCore::supportsFocus):
3947 (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
3948 (WebCore::RenderThemeChromiumWin::determineState):
3949 (WebCore::RenderThemeChromiumWin::getThemeData):
3951 2009-03-12 Greg Bolsinga <bolsinga@apple.com>
3953 Reviewed by Antti Koivisto.
3955 https://bugs.webkit.org/show_bug.cgi?id=24506
3956 Geolocation in Safari differs from the spec, no Coordinates attribute on Position
3960 * DerivedSources.make:
3964 * WebCore.vcproj/WebCore.vcproj:
3965 * WebCore.xcodeproj/project.pbxproj:
3966 * WebCoreSources.bkl:
3967 * bindings/js/JSGeolocationCustom.cpp:
3968 (WebCore::createPositionOptions):
3969 * page/Coordinates.cpp: Added.
3970 (WebCore::Coordinates::toString):
3971 * page/Coordinates.h: Added.
3972 (WebCore::Coordinates::create):
3973 (WebCore::Coordinates::latitude):
3974 (WebCore::Coordinates::longitude):
3975 (WebCore::Coordinates::altitude):
3976 (WebCore::Coordinates::accuracy):
3977 (WebCore::Coordinates::altitudeAccuracy):
3978 (WebCore::Coordinates::heading):
3979 (WebCore::Coordinates::speed):
3980 (WebCore::Coordinates::Coordinates):
3981 * page/Coordinates.idl: Added.
3982 * page/Geoposition.cpp:
3983 (WebCore::Geoposition::toString):
3984 * page/Geoposition.h:
3985 (WebCore::Geoposition::create):
3986 (WebCore::Geoposition::coords):
3987 (WebCore::Geoposition::Geoposition):
3988 * page/Geoposition.idl:
3989 * page/PositionOptions.h:
3990 (WebCore::PositionOptions::create):
3991 (WebCore::PositionOptions::maximumAge):
3992 (WebCore::PositionOptions::setMaximumAge):
3993 (WebCore::PositionOptions::PositionOptions):
3994 * platform/mac/GeolocationServiceMac.mm:
3995 (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3997 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
3999 Reviewed by Darin Fisher.
4001 https://bugs.webkit.org/show_bug.cgi?id=24496
4002 Fix console logging of non-string values by coercing the argument to
4003 a string, for V8 bindings.
4005 Test: fast/js/console-non-string-values.html
4007 * bindings/v8/ScriptValue.cpp: Added toString method.
4008 (WebCore::ScriptValue::toString):
4009 * bindings/v8/ScriptValue.h: Added PlatformString, ScriptState includes
4010 and toString declaration.
4012 2009-03-12 Darin Fisher <darin@chromium.org>
4014 Reviewed by Dimitri Glazkov.
4016 Eliminate ChromiumBridge::uiResourceProtocol
4017 https://bugs.webkit.org/show_bug.cgi?id=24558
4019 * platform/chromium/ChromiumBridge.h:
4021 2009-03-12 Greg Bolsinga <bolsinga@apple.com>
4023 Reviewed by Simon Fraser.
4025 Missing breaks in switch statement
4026 https://bugs.webkit.org/show_bug.cgi?id=24556
4028 * platform/mac/GeolocationServiceMac.mm:
4029 (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
4031 2009-03-12 Darin Fisher <darin@chromium.org>
4033 Reviewed by Dimitri Glazkov.
4035 https://bugs.webkit.org/show_bug.cgi?id=24554
4036 Remove some unused functions from ChromiumBridge.
4038 * platform/chromium/ChromiumBridge.h:
4040 2009-03-02 Eric Seidel <eric@webkit.org>
4042 Reviewed by Darin Fisher and Justin Garcia.
4044 Safari crashes during drag and drop in Google presentations
4045 due to mutation event handlers removing DOM content during insertNode
4046 https://bugs.webkit.org/show_bug.cgi?id=22634
4048 Added a bunch of "null" checks to make sure nodes are still
4049 in the document before we operate on them. This is an
4050 inelegant solution, but it's the best we have for now.
4052 Test: editing/selection/crash-on-drag-with-mutation-events.html
4054 * editing/CompositeEditCommand.cpp:
4055 (WebCore::CompositeEditCommand::insertNodeAt):
4056 * editing/ReplaceSelectionCommand.cpp:
4057 (WebCore::ReplaceSelectionCommand::doApply):
4059 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
4061 Reviewed by Adam Treat.
4063 https://bugs.webkit.org/show_bug.cgi?id=24525
4064 REGRESSION: Inspector window doesn't close when inspected page is
4065 destroyed. This is a revert of r41158, which became unnecessary when
4066 InspectorController became ref-counted in r41462.
4068 * inspector/InspectorController.cpp:
4069 (WebCore::InspectorController::inspectedPageDestroyed): Reset m_inspectedPage
4070 after calling close().
4071 (WebCore::InspectorController::stopUserInitiatedProfiling): Remove
4072 m_inspectedPage check guard around profile logic.
4074 2009-03-12 Peter Kasting <pkasting@google.com>
4076 Reviewed by Darin Fisher.
4078 https://bugs.webkit.org/show_bug.cgi?id=24502
4079 Make horizontal scrolling on Windows always go the correct direction.
4081 * platform/PlatformWheelEvent.h:
4082 * platform/win/WheelEventWin.cpp:
4083 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
4085 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
4087 Reviewed by Simon Fraser.
4089 https://bugs.webkit.org/show_bug.cgi?id=24496
4090 Fix console logging of non-string values by coercing the argument to
4093 Test: fast/js/console-non-string-values.html
4095 * bindings/js/ScriptValue.cpp: Removed PlatformString include.
4096 * bindings/js/ScriptValue.h: Added toString method.
4097 (WebCore::ScriptValue::toString):
4099 (WebCore::getFirstArgumentAsString): Changed firstArgumentAsString method to use
4100 ScriptValue::toString.
4101 (WebCore::Console::addMessage): added extra ScriptState argument to callsite.
4102 (WebCore::Console::count): Ditto.
4104 2009-03-12 Simon Fraser <simon.fraser@apple.com>
4106 Reviewed by Adele Peterson.
4108 https://bugs.webkit.org/show_bug.cgi?id=24508
4110 Fix updating of text field with placeholder text when value is set
4111 by ensuring that updatePlaceholderVisibility() is called after
4112 the value has been updated, not before.
4114 Test: fast/forms/placeholder-set-value.html
4116 * html/HTMLInputElement.cpp:
4117 (WebCore::HTMLInputElement::setValue):
4119 2009-03-12 Simon Fraser <simon.fraser@apple.com>
4121 Reviewed by Dave Hyatt
4123 https://bugs.webkit.org/show_bug.cgi?id=24552
4125 Hit testing involving normal flow, self-painting layers (e.g. reflections)
4126 was broken because it was not null-testing the result of hitTestLayer(),
4127 so bailing early with a nil hit layer.
4129 Test: fast/layers/normal-flow-hit-test.html
4131 * rendering/RenderLayer.cpp:
4132 (WebCore::RenderLayer::hitTestLayer):
4134 2009-03-12 Dimitri Glazkov <dglazkov@chromium.org>
4136 Reviewed by Cameron Zwarich.
4138 Removed zero-sized files, left over from improperly applied patch.
4140 * platform/graphics/chromium/ThemeHelperChromiumWin.cpp: Removed.
4141 * platform/graphics/chromium/ThemeHelperChromiumWin.h: Removed.
4143 2009-03-12 Adam Treat <adam.treat@torchmobile.com>
4145 Reviewed by George Staikos.
4147 Do not ignore alpha color in optimization. Hard to believe, but there
4148 are websites that fill the entire page with a tiled image consisting of
4149 nothing but a 100% transparent 1x1 image. <cough>orbitz.com</cough>
4151 * platform/graphics/qt/ImageQt.cpp:
4152 (WebCore::BitmapImage::checkForSolidColor):
4154 2009-03-12 Julien Chaffraix <jchaffraix@webkit.org>
4156 Reviewed by Darin Adler.
4158 Bug 24110: cloneNode should call cloneElement and not the reverse
4160 - Splitted the code from cloneNode into cloneElementWithChildren and cloneElementWithChildren.
4161 Now cloneNode calls one of the 2 previous methods.
4163 - Renamed cloneElement to cloneElementWithoutChildren as it was the previous behaviour.
4165 - Moved cloneNode to the Element private section so that WebCore callers cannot use it.
4167 - Removed Element::cloneNode usage through WebCore.
4170 (WebCore::Element::cloneNode): Moved to Element's private section and it