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