2011-06-04 Darin Adler Reviewed by Anders Carlsson. [Mac WebKit2] REGRESSION (r86692): Synchronous XMLHttpRequest hangs in credential shim (affects Netgear ReadyNAS admin page) https://bugs.webkit.org/show_bug.cgi?id=62094 rdar://problem/9539204 * WebCore.exp.in: Export ResourceHandle::synchronousLoadRunLoopMode. * platform/network/ResourceHandle.h: Add synchronousLoadRunLoopMode. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::synchronousLoadRunLoopMode): Added. (WebCore::ResourceHandle::loadResourceSynchronously): Call synchronousLoadRunLoopMode. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::synchronousLoadRunLoopMode): Added. (WebCore::ResourceHandle::loadResourceSynchronously): Call synchronousLoadRunLoopMode. 2011-06-04 Eric Seidel Reviewed by Adam Barth. Add InlineWalker class to hold state for repeated calls to bidiNext https://bugs.webkit.org/show_bug.cgi?id=60724 This is one more little step towards removing (naked) bidiNext usage. More refactoring is required before all callers of bidiNext can move onto using an InlineWalker instead of bidiNext directly. No change in behavior, thus no tests. * rendering/InlineIterator.h: (WebCore::InlineWalker::InlineWalker): (WebCore::InlineWalker::root): (WebCore::InlineWalker::current): (WebCore::InlineWalker::atEndOfInline): (WebCore::InlineWalker::atEnd): (WebCore::InlineWalker::advance): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::simplifiedNormalFlowLayout): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): 2011-06-04 Sam Weinig Reviewed by Anders Carlsson. WebKit2 needs to know when a scroll is happening due to the ScrollAnimator https://bugs.webkit.org/show_bug.cgi?id=62093 Add additional ChromeClient functions to indicate the beginning and end of the various ScrollAnimator animations. Change existing notification that a rubber-band has completed for the main frame to be triggered for all frames. * page/ChromeClient.h: (WebCore::ChromeClient::didStartRubberBandForFrame): (WebCore::ChromeClient::didCompleteRubberBandForFrame): (WebCore::ChromeClient::didStartAnimatedScroll): (WebCore::ChromeClient::didCompleteAnimatedScroll): * page/FrameView.cpp: (WebCore::FrameView::didStartRubberBand): (WebCore::FrameView::didCompleteRubberBand): (WebCore::FrameView::didStartAnimatedScroll): (WebCore::FrameView::didCompleteAnimatedScroll): * page/FrameView.h: * platform/ScrollableArea.h: (WebCore::ScrollableArea::didStartRubberBand): (WebCore::ScrollableArea::didStartAnimatedScroll): (WebCore::ScrollableArea::didCompleteAnimatedScroll): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[ScrollAnimationHelperDelegate _immediateScrollToPoint:]): (WebCore::ScrollAnimatorMac::scroll): (WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): 2011-06-04 Martin Robinson Touch a file to try to fix the GTK+ build on the 32-bit bot. * testing/Internals.idl: Touch this IDL file in an effort to fix the build. 2011-06-04 Martin Robinson Fix the GTK+ build. * bindings/gobject/GNUmakefile.am: Make the GObject build less noisy. 2011-06-03 Dimitri Glazkov Reviewed by Darin Adler. Convert file to use the new shadow DOM model https://bugs.webkit.org/show_bug.cgi?id=59005 Refactoring, covered by existing tests. * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Removed FILE_UPLOAD_BUTTON pseudoId and all references to it. (WebCore::nameToPseudoTypeMap): Ditto. (WebCore::CSSSelector::extractPseudoType): Ditto. * css/CSSSelector.h: Ditto. * css/html.css: (input[type="button"], input[type="submit"], input[type="reset"]): Moved -webkit-file-upload-button to its own rule. (input[type="file"]::-webkit-file-upload-button): Added and moved all previously hard-coded properties there. * html/FileInputType.cpp: (WebCore::UploadButtonElement::create): Added. (WebCore::UploadButtonElement::UploadButtonElement): Added. (WebCore::UploadButtonElement::shadowPseudoId): Added. (WebCore::FileInputType::createShadowSubtree): Added. * html/FileInputType.h: Added createShadowSubtree decl. * page/DragController.cpp: (WebCore::asFileInput): Changed the logic to use new shadow DOM. * rendering/RenderFileUploadControl.cpp: Removed UploadButton class. (WebCore::RenderFileUploadControl::~RenderFileUploadControl): Removed initializer for m_button. (WebCore::RenderFileUploadControl::updateFromElement): Removed attachment logic that's no longer necessary. (WebCore::nodeWidth): Added a helper. (WebCore::RenderFileUploadControl::maxFilenameWidth): Changed to use uploadButton and nodeWidth. (WebCore::RenderFileUploadControl::paintObject): Ditto. (WebCore::RenderFileUploadControl::uploadButton): Added a helper to retrieve the button. (WebCore::RenderFileUploadControl::buttonValue): Changed to use uploadButton. * rendering/RenderFileUploadControl.h: Changed decls. * rendering/style/RenderStyleConstants.h: Removed FILE_UPLOAD_BUTTON decls. 2011-06-04 Alexey Proskuryakov Reviewed by Darin Adler. Input value sanitization for text fields is incorrect https://bugs.webkit.org/show_bug.cgi?id=62061 Newline characters should be removed according to HTML5, not replaced with spaces. This also matches Safari 5 behavior. * html/TextFieldInputType.cpp: (WebCore::isASCIILineBreak): A functor for removeCharacters(). (WebCore::limitLength): Do one thing at once. (WebCore::TextFieldInputType::sanitizeValue): Sanitization removes newlines. (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Moved (somewhat surprising) code that replaces newlines with spaces here. 2011-06-04 Jeffrey Pfau Reviewed by Beth Dakin. Crash in WebCore::RenderMathMLSubSup::baselinePosition() https://bugs.webkit.org/show_bug.cgi?id=57897 Simple patch adding NULL checks in each function. Test: mathml/msubsup-remove-children.xhtml * rendering/mathml/RenderMathMLSubSup.cpp: (WebCore::RenderMathMLSubSup::stretchToHeight): (WebCore::RenderMathMLSubSup::baselinePosition): 2011-06-04 Nico Weber Reviewed by James Robinson. Give IDBBackingStore::Transaction a virtual destructor https://bugs.webkit.org/show_bug.cgi?id=62063 IDBLevelDBBackingStore::createTransaction() hands out a PassRefPtr, which means the missing virtual destructor is a real bug. * storage/IDBBackingStore.h: (WebCore::IDBBackingStore::Transaction::~Transaction): 2011-06-04 Emil A Eklund Reviewed by Eric Seidel. Convert RenderBox::overflowClipRect to IntPoint https://bugs.webkit.org/show_bug.cgi?id=62032 Covered by existing tests. * editing/Editor.cpp: (WebCore::Editor::insideVisibleArea): * platform/graphics/IntRect.h: (WebCore::IntRect::contract): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::overflowClipRect): * rendering/RenderBox.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::repaintBlockSelectionGaps): * rendering/RenderLayerBacking.cpp: (WebCore::clipBox): * rendering/RenderTable.cpp: (WebCore::RenderTable::overflowClipRect): (WebCore::RenderTable::nodeAtPoint): * rendering/RenderTable.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): 2011-06-04 Adam Barth Reviewed by Eric Seidel. V8Proxy::disconnectFrame doesn't do anything https://bugs.webkit.org/show_bug.cgi?id=62051 Dead code should die. * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::~ScriptController): * bindings/v8/V8Proxy.cpp: * bindings/v8/V8Proxy.h: 2011-06-04 Nico Weber Reviewed by James Robinson. Make the destructors of DataTransferItem and DataTransferItems virtual https://bugs.webkit.org/show_bug.cgi?id=62052 Clang has grown a new warning that warns on |delete ptr| if ptr's class is non-final, has virtual methods, but no virtual destructor. This warning finds real bugs, so we want to keep it enabled. However, it also warns about DataTransferItem[s]. Since these are subclassed, they can't be made final, so make their destructors virtual. (Maybe clang's warning even points out an actual bug here.) * dom/DataTransferItem.h: (WebCore::DataTransferItem::~DataTransferItem): * dom/DataTransferItems.h: (WebCore::DataTransferItems::~DataTransferItems): 2011-06-04 Nico Weber Reviewed by James Robinson. [chromium] Make LayerPainterChromium destructor virtual https://bugs.webkit.org/show_bug.cgi?id=62056 LayerTextureUpdaterCanvas has an OwnPtr, which means that without this patch, the destructor of classes implementing LayerPainterChromium wasn't called correctly in that case. * platform/graphics/chromium/LayerPainterChromium.h: (WebCore::LayerPainterChromium::~LayerPainterChromium): 2011-06-04 Emil A Eklund Reviewed by Andreas Kling. Fix IntRect::expand(const IntSize& size) https://bugs.webkit.org/show_bug.cgi?id=62042 No new tests. * platform/graphics/IntRect.h: (WebCore::IntRect::expand): Fix IntRect::expand to expand the size rather than move the location. Currently unused. 2011-06-03 Alexey Proskuryakov Reviewed by Darin Adler. ResourceHandleMac should always respond to an authentication challenge https://bugs.webkit.org/show_bug.cgi?id=61667 I don't know if this can actually happen in practice, so no new tests. * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]): Cancel authentication challenge if we don't have a client. We must always respond to the challenge to release the connection, and there is nothing else to do in this state anyway. 2011-06-03 Dan Bernstein Try to fix the Apple LLVM Compiler build after r88087. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintMask): * rendering/RenderTableCell.h: 2011-06-03 Chris Rogers Unreviewed build fix. Fix clang build - take 2 https://bugs.webkit.org/show_bug.cgi?id=62081 * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): 2011-06-03 Chris Rogers Unreviewed clang build fix. Fix clang build https://bugs.webkit.org/show_bug.cgi?id=62080 * webaudio/AudioParamTimeline.cpp: (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): 2011-06-03 Levi Weintraub Reviewed by Eric Seidel. Switch paintMask and paintObject to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62077 Switching paintMask and paintObject to use IntPoint for their paint offset instead of a pair of ints. paintObject is still on tx/ty, but paintMask was converted to IntSize passed by value -- bringing it in-line with the agreed-upon convention of a const IntPoint&. No new tests since this is simple refactoring. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paint): (WebCore::RenderBlock::paintObject): * rendering/RenderBlock.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMask): (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::popContentsClip): * rendering/RenderBox.h: (WebCore::RenderBox::paintObject): * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintMask): * rendering/RenderFieldset.h: * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): * rendering/RenderFileUploadControl.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject): * rendering/RenderListBox.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderReplica.cpp: (WebCore::RenderReplica::paint): * rendering/RenderTable.cpp: (WebCore::RenderTable::paint): (WebCore::RenderTable::paintObject): (WebCore::RenderTable::paintMask): * rendering/RenderTable.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paint): (WebCore::RenderTableSection::paintObject): * rendering/RenderTableSection.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::paintPlaceholder): (WebCore::RenderTextControl::paintObject): * rendering/RenderTextControl.h: * rendering/RenderView.cpp: (WebCore::RenderView::paint): * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): 2011-06-03 Cary Clark Reviewed by Eric Seidel. Support FontCustomPlatformData on Skia-Mac-Chrome variant https://bugs.webkit.org/show_bug.cgi?id=62040 Canvas text is only recognized by Skia if it is registered by creating a new SkTypeface. Skia uses CGFont to measure and render the glyphs, then takes care of managing the glyph cache. Skia on Mac Chrome is not yet enabled, so this change does not affect existing code, and requires no new tests. * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::RemoteFontStream::RemoteFontStream): (WebCore::RemoteFontStream::~RemoteFontStream): (WebCore::RemoteFontStream::rewind): (WebCore::RemoteFontStream::read): Turn the buffer into a stream. This is identical to the implementation in skia/FontCustomPlatformData.cpp. While that file could be modified instead of this one, it was simpler to add SkTypeface streaming to this instead of adding all CGFont support to the skia platform file. (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Release the SkTypeface reference. (WebCore::createFontCustomPlatformData): Associate the buffer stream with a SkTypeface so Skia can find the custom font data. * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): Add a slot to hold the SkTypeface. 2011-06-03 Steve Falkenburg Reviewed by Brian Weinstein. HistoryItem children persist across page loads https://bugs.webkit.org/show_bug.cgi?id=62071 Not testable since there's no way to check for the presence/absence of children for a HistoryItem. * history/HistoryItem.cpp: (WebCore::HistoryItem::reset): Call clearChildren when we're reusing a HistoryItem. 2011-06-03 Chris Rogers Reviewed by Kenneth Russell. Allow existing AudioParams to use scheduled parameter changes https://bugs.webkit.org/show_bug.cgi?id=62046 No new tests since audio API is not yet implemented. * platform/audio/AudioBus.cpp: (WebCore::AudioBus::processWithGainFrom): (WebCore::AudioBus::copyWithSampleAccurateGainValuesFrom): * platform/audio/AudioBus.h: * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): * webaudio/AudioGainNode.cpp: (WebCore::AudioGainNode::AudioGainNode): (WebCore::AudioGainNode::process): * webaudio/AudioGainNode.h: * webaudio/HighPass2FilterNode.cpp: (WebCore::HighPass2FilterNode::HighPass2FilterNode): * webaudio/LowPass2FilterNode.cpp: (WebCore::LowPass2FilterNode::LowPass2FilterNode): 2011-06-03 Chris Rogers Reviewed by Kenneth Russell. Biquad filter coefficient naming is incorrect https://bugs.webkit.org/show_bug.cgi?id=62053 No new tests since audio API is not yet implemented. * platform/audio/Biquad.cpp: (WebCore::Biquad::Biquad): (WebCore::Biquad::process): (WebCore::Biquad::processFast): (WebCore::Biquad::setLowpassParams): (WebCore::Biquad::setHighpassParams): (WebCore::Biquad::setLowShelfParams): (WebCore::Biquad::setZeroPolePairs): * platform/audio/Biquad.h: 2011-06-03 Adam Barth Reviewed by Eric Seidel. DOMWindow::setLocation doesn't understand that DOMWindow can be inactive https://bugs.webkit.org/show_bug.cgi?id=62057 This code gets confused when dealing with inactive DOMWindows. We should just block inactive DOMWindows because there's no compatibility reason to support them in this code path. Test: http/tests/security/xss-DENIED-contentWindow-eval.html * page/DOMWindow.cpp: (WebCore::DOMWindow::isInsecureScriptAccess): 2011-05-31 Martin Robinson Reviewed by Ryosuke Niwa. [GTK] Support smart replace for the pasteboard https://bugs.webkit.org/show_bug.cgi?id=61734 Add smart replace support to WebCore and add hooks for it in WebKit via DumpRenderTreeSupportGtk. When a platform supports smart replace, WebCore will remove extra spaces that appear when pasting text. Eventually WebKitGTK+ may want to expose this in the public API. * platform/gtk/PasteboardGtk.cpp: (WebCore::Pasteboard::writeSelection): Now pass whether or not to use smart replace when calling writeSelection. (WebCore::Pasteboard::canSmartReplace): Added an implementation that checks the clipboard for whether or not it supports smart paste. * platform/gtk/PasteboardHelper.cpp: (WebCore::initGdkAtoms): Added initialization for smart replace atom. (WebCore::PasteboardHelper::fillSelectionData): Added no-op handler for smart replace atom. (WebCore::PasteboardHelper::targetListForDataObject): Properly handle new smart replace parameter. (WebCore::PasteboardHelper::writeClipboardContents): Properly handle new smart replace parameter. (WebCore::PasteboardHelper::clipboardContentSupportsSmartReplace): Added helper for Pasteboard. * platform/gtk/PasteboardHelper.h: Add new method definition. 2011-06-03 Levi Weintraub Reviewed by Eric Seidel. Switch paintCell to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62033 Switching paintCell to take an IntPoint representing the paint offset instead of a pair of ints. No new tests since this is simple refactoring. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): (WebCore::RenderTableSection::paintObject): * rendering/RenderTableSection.h: 2011-06-03 Martin Robinson Reviewed by Dimitri Glazkov. Teach Gtk build about window.internals https://bugs.webkit.org/show_bug.cgi?id=61071 * GNUmakefile.am: Add new internals directories to the VPATH (for idl processing) and the include list. 2011-06-03 Levi Weintraub Reviewed by Eric Seidel. Switch paintBackgroundsBehindCell to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62031 Switching paintBackgroundsBehindCell to take an IntPoint representing the paint offset instead of a pair of ints. No new tests as this is simple refactoring. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBackgroundsBehindCell): (WebCore::RenderTableCell::paintBoxDecorations): * rendering/RenderTableCell.h: * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::paint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintCell): 2011-06-03 Levi Weintraub Reviewed by Eric Seidel. Switch paintCaret and paintDragCaret to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62037 Switching paintCaret and paintDragCaret to use an IntPoint representing the paint offset instead of a pair of ints. No new tests since this is simple refactoring. * editing/FrameSelection.cpp: (WebCore::FrameSelection::paintCaret): (WebCore::CaretBase::paintCaret): (WebCore::DragCaretController::paintDragCaret): * editing/FrameSelection.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintCaret): (WebCore::RenderBlock::paintObject): (WebCore::RenderBlock::positionForPoint): (WebCore::RenderBlock::offsetForContents): * rendering/RenderBlock.h: 2011-06-03 Levi Weintraub Reviewed by Eric Seidel. Switch paintItemForeground and paintItemForeground to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=62035 Switching paintItemFore/Background to use IntPoint instead of a pair of ints. No new tests since this is simple refactoring. * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject): (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::paintItemBackground): * rendering/RenderListBox.h: 2011-06-03 Alexis Menard Reviewed by Andreas Kling. To support building namespaced Qt, we require that forward-declarations of Qt classes be wrapped in QT_BEGIN_NAMESPACE and QT_END_NAMESPACE. * platform/network/qt/QtMIMETypeSniffer.h: 2011-06-03 Rob Buis Reviewed by Nikolas Zimmermann. Cleanup member variable usage in svg/animation classes https://bugs.webkit.org/show_bug.cgi?id=62029 Cleanup member variables. * svg/animation/SMILTimeContainer.cpp: (WebCore::SMILTimeContainer::SMILTimeContainer): (WebCore::SMILTimeContainer::sampleAnimationAtTime): (WebCore::SMILTimeContainer::updateAnimations): * svg/animation/SMILTimeContainer.h: * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::SVGSMILElement): * svg/animation/SVGSMILElement.h: 2011-06-03 Chris Rogers Reviewed by Kenneth Russell. Add AudioParam parameter scheduling implementation https://bugs.webkit.org/show_bug.cgi?id=61830 No new tests since audio API is not yet implemented. * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * webaudio/AudioParam.cpp: (WebCore::AudioParam::value): (WebCore::AudioParam::smoothedValue): (WebCore::AudioParam::smooth): (WebCore::AudioParam::calculateSampleAccurateValues): * webaudio/AudioParam.h: (WebCore::AudioParam::setContext): (WebCore::AudioParam::context): (WebCore::AudioParam::setValueAtTime): (WebCore::AudioParam::linearRampToValueAtTime): (WebCore::AudioParam::exponentialRampToValueAtTime): (WebCore::AudioParam::setTargetValueAtTime): (WebCore::AudioParam::setValueCurveAtTime): (WebCore::AudioParam::cancelScheduledValues): (WebCore::AudioParam::hasTimelineValues): * webaudio/AudioParam.idl: * webaudio/AudioParamTimeline.cpp: Added. (WebCore::AudioParamTimeline::setValueAtTime): (WebCore::AudioParamTimeline::linearRampToValueAtTime): (WebCore::AudioParamTimeline::exponentialRampToValueAtTime): (WebCore::AudioParamTimeline::setTargetValueAtTime): (WebCore::AudioParamTimeline::setValueCurveAtTime): (WebCore::isValidNumber): (WebCore::AudioParamTimeline::insertEvent): (WebCore::AudioParamTimeline::cancelScheduledValues): (WebCore::AudioParamTimeline::valueForContextTime): (WebCore::AudioParamTimeline::valuesForTimeRange): (WebCore::timeToSampleFrame): (WebCore::AudioParamTimeline::valuesForTimeRangeImpl): * webaudio/AudioParamTimeline.h: Added. (WebCore::AudioParamTimeline::AudioParamTimeline): (WebCore::AudioParamTimeline::hasValues): (WebCore::AudioParamTimeline::ParamEvent::ParamEvent): (WebCore::AudioParamTimeline::ParamEvent::type): (WebCore::AudioParamTimeline::ParamEvent::value): (WebCore::AudioParamTimeline::ParamEvent::time): (WebCore::AudioParamTimeline::ParamEvent::timeConstant): (WebCore::AudioParamTimeline::ParamEvent::duration): (WebCore::AudioParamTimeline::ParamEvent::curve): 2011-06-01 Jer Noble Reviewed by Simon Fraser. Flash of broken page when exiting full screen at jerryseinfeld.com https://bugs.webkit.org/show_bug.cgi?id=61897 Test: fullscreen/full-screen-placeholder.html Entering full-screen mode is causing the page layout to change because the full-screen element is taken out of the normal flow. To counteract this effect, insert a placeholder block as a parent of the full-screen renderer with the same size and style as the full-screen element pre-full-screen. Only create a placeholder for block-level elements; the technique required for inline elements would be vastly more complicated. * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): Create a placeholder based on the size and style of the full-screen element. (WebCore::Document::setFullScreenRenderer): Persist the placeholder size and style across new renderers. * rendering/RenderFullScreen.cpp: (RenderFullScreen::RenderFullScreen): Added ivar. (RenderFullScreen::destroy): Make sure to safely destroy our placeholder. (RenderFullScreen::createPlaceholder): Added. * rendering/RenderFullScreen.h: (WebCore::RenderFullScreen::placeholder): Ivar accessor. 2011-06-03 Levi Weintraub Reviewed by Eric Seidel. Switch paintBoxDecorations to IntPoint https://bugs.webkit.org/show_bug.cgi?id=61968 Switching paintBoxDecorations to take an IntPoint representing the paint offset instead of a pair of ints. Also cleaning up some duplicated code in InlineFlowBox related to constraining the paint rect to the linetop and linebottom. No new tests since this is just refactoring. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded): Added to remove duplicate code in paintBoxDecorations and paintMask. (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintObject): * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): * rendering/RenderBox.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): * rendering/RenderFieldset.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderTable.cpp: (WebCore::RenderTable::paintObject): (WebCore::RenderTable::paintBoxDecorations): * rendering/RenderTable.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBoxDecorations): * rendering/RenderTableCell.h: * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): * rendering/RenderView.h: * rendering/RenderWidget.cpp: (WebCore::RenderWidget::paint): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::paint): 2011-06-03 Doreen Jiang Reviewed by Benjamin Poulain. [Qt]The minimum size of the select menu list is incorrect for qtwebkit https://bugs.webkit.org/show_bug.cgi?id=56752 The minimum width of the select-box is calculated to be as small as possible instead of hardcoded value (width of 7 characters) in minimumMenuListSize() function This will avoid overapping the select lists in popular websites. Test: fast/forms/selectlist-minsize.html * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::minimumMenuListSize): 2011-06-02 Dimitri Glazkov Reviewed by Darin Adler. Prevent event dispatch for events with related target when host is the target. https://bugs.webkit.org/show_bug.cgi?id=61979 Turns out, even if we trim the ancestor chain to 0, the event is still dispatched during AT_TARGET. So might as well be explicit about what we are trying to do and add a flag to prevent dispatch in these cases. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::adjustToShadowBoundaries): Added preventing dispatch when the ancestor chain is trimmed to nothing. (WebCore::EventDispatcher::EventDispatcher): Added initializer. (WebCore::EventDispatcher::dispatchEvent): Added a check to prevent dispatch. * dom/EventDispatcher.h: Added a def. 2011-06-03 Dan Bernstein Mac build fix. * WebCore.xcodeproj/project.pbxproj: 2011-06-03 Naoki Takano Reviewed by Eric Seidel. [Chromium] Call setToolTipText() in WebPopupMenuImpl mouse move handler to show tool tip in select popup window. https://bugs.webkit.org/show_bug.cgi?id=61260 http://code.google.com/p/chromium/issues/detail?id=12721 Manual test: select-popup-tooltip-test.html * manual-tests/select-popup-tooltip-test.html: Added. * platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupContainer::getSelectedItemToolTip): Get selected item tooltip string according to hovering mouse position. * platform/chromium/PopupMenuChromium.h: Add getSelectedItemToolTip() declaration. 2011-06-03 Rob Buis Reviewed by Nikolas Zimmermann. Creating elements via javascript do not execute https://bugs.webkit.org/show_bug.cgi?id=34301 Enable constructors for SVGMPathElement and SVGAnimateMotionElement. * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * page/DOMWindow.idl: 2011-06-03 Hans Wennborg Reviewed by Steve Block. IndexedDB: Clean-up use of INT64_MAX in LevelDB back-end https://bugs.webkit.org/show_bug.cgi?id=62009 This constant should only be needed inside IDBLevelDBCoding.cpp. No new functionality, no new tests. * storage/IDBLevelDBBackingStore.cpp: (WebCore::getNewDatabaseId): (WebCore::IDBLevelDBBackingStore::getObjectStores): (WebCore::getNewObjectStoreId): (WebCore::IDBLevelDBBackingStore::deleteObjectStore): (WebCore::getNewIndexId): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::IndexMetaDataKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encodeMaxKey): (WebCore::IDBLevelDBCoding::IndexFreeListKey::encodeMaxKey): * storage/IDBLevelDBCoding.h: 2011-06-03 Siddharth Mathur Reviewed by Benjamin Poulain. [Qt] Build flag for experimental ICU library support https://bugs.webkit.org/show_bug.cgi?id=60786 Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental ICU powered Unicode support. No new tests as no new features added. * WebCore.pri: Removed text_breaking_with_icu CONFIG flag. * WebCore.pro: Added TextCodecICU.cpp and qt/TextBreakIteratorInternalICUQt.cpp. * editing/qt/SmartReplaceQt.cpp: * features.pri: Support for use_system_icu CONFIG flag. * platform/text/TextCodecICU.cpp: Guard with USE(ICU_UNICODE). * platform/text/qt/TextBreakIteratorInternalICUQt.cpp: Added. (WebCore::Q_GLOBAL_STATIC_WITH_INITIALIZER): (WebCore::currentSearchLocaleID): (WebCore::currentTextBreakLocaleID): * platform/text/qt/TextBreakIteratorQt.cpp: Moved out currentTextBreakLocaleID(). (WebCore::isTextBreak): * platform/text/qt/TextCodecQt.cpp: Guard with USE(QT4_UNICODE). (WebCore::TextCodecQt::registerEncodingNames): (WebCore::TextCodecQt::registerCodecs): 2011-06-03 Yael Aharon Reviewed by Kenneth Rohde Christiansen. Frame flattening is broken with nested frames https://bugs.webkit.org/show_bug.cgi?id=61491 Do not flatten offscreen iframes during frame flattening, as flattening might make them visible. Test: fast/frames/flattening/iframe-flattening-out-of-view.html fast/frames/flattening/iframe-flattening-out-of-view-and-scroll.html fast/frames/flattening/iframe-flattening-out-of-view-scroll-and-relayout.html * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::flattenFrame): 2011-06-03 Nikolas Zimmermann Reviewed by Andreas Kling. Incorrect embedded document replaced size calculation for box-sizing: border-box https://bugs.webkit.org/show_bug.cgi?id=62007 When using to embed foo.svg which has an intrinsic width/height, the embedded document intrinsic size is incorrect. RenderPart::computeEmbeddedDocumentReplacedWidth/Height has to ask the content renderer for the replaced width/height not ourselves. Tests: svg/as-image/img-preserveAspectRatio-support-2.html svg/as-object/object-box-sizing-no-width-height.html * rendering/RenderPart.cpp: (WebCore::RenderPart::computeEmbeddedDocumentReplacedWidth): (WebCore::RenderPart::computeEmbeddedDocumentReplacedHeight): 2011-06-03 Sheriff Bot Unreviewed, rolling out r88004. http://trac.webkit.org/changeset/88004 https://bugs.webkit.org/show_bug.cgi?id=62008 This patch broke 4 tests in the GTK bots (Requested by msanchez on #webkit). * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleScrolledToAnchor): 2011-06-03 Nikolas Zimmermann Reviewed by Andreas Kling. Zooming doesn't work as expected https://bugs.webkit.org/show_bug.cgi?id=62005 Zooming an object with auto size, that references a svg with fixed size was broken. The svg size stayed the same. Get rid of the dependency between RenderSVGRoot and SVGSVGElement::currentScale(), always ask for the effective zoom in the RenderStyle instead of asking SVGSVGElement. The SVGSVGElement::currentScale()/setCurrentScale() methods are now only used when called from the bindings (eg. JS). They only take effect on the outermost element in standalone documents, otherwhise they are no-ops. Test: svg/zoom/page/zoom-svg-through-object-with-auto-size.html * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeIntrinsicWidth): (WebCore::RenderSVGRoot::computeIntrinsicHeight): (WebCore::RenderSVGRoot::localToBorderBoxTransform): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::SVGSVGElement): (WebCore::SVGSVGElement::currentScale): (WebCore::SVGSVGElement::setCurrentScale): * svg/SVGSVGElement.h: 2011-06-03 Mario Sanchez Prada Reviewed by Martin Robinson. Focus and caret position should be updated when same-page links are followed https://bugs.webkit.org/show_bug.cgi?id=59737 Update the caret position to the anchor's position after scrolling. This behavior is specific to the Gtk port and requested because of accessibility needs, that's why it's implemented in AXObjectCache. Test: platform/gtk/accessibility/caret-browsing-anchor-followed.html * accessibility/gtk/AXObjectCacheAtk.cpp: (WebCore::AXObjectCache::handleScrolledToAnchor): Make sure the caret is updated to be in the anchor's position after scrolling. 2011-06-03 Dominic Cooney Reviewed by Kent Tamura. Cloned keygen shadows should have -webkit-keygen-select pseudoclass. https://bugs.webkit.org/show_bug.cgi?id=61984 When cloneNode's tag name-based cloning algorithm clones the KeygenSelectElements of a keygen shadow as select elements. These lack the -webkit-keygen-select pseudoclass. Test: fast/html/clone-keygen.html * html/HTMLKeygenElement.cpp: (WebCore::KeygenSelectElement::cloneElementWithoutAttributesAndChildren): Create a KeygenSelectElement when being cloned. 2011-06-02 MORITA Hajime Unreviewed ChangeLog fix. 2011-06-03 Peter Varga Rubber-stamped by Csaba Osztrogonác. [Qt][V8] Buildfix after r87988. No new tests needed. * bindings/v8/ScheduledAction.cpp: Add missing guards. (WebCore::ScheduledAction::execute): * bindings/v8/V8EventListener.cpp: Ditto. (WebCore::V8EventListener::callListenerFunction): 2011-06-03 Dominic Cooney Reviewed by Kent Tamura. Cloned range input sliders should be SliderThumbElements, not divs. https://bugs.webkit.org/show_bug.cgi?id=61982 Test: fast/html/clone-range.html * html/shadow/SliderThumbElement.h: (WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren): Create a SliderThumbElement when being cloned. 2011-06-02 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: add an option for automatically attaching to new workers https://bugs.webkit.org/show_bug.cgi?id=61930 Worker list is extended with a checkbox that makes inspector attach to each new worker. Whenever a new worker context starts a new inspector window will be opened for it. Also worker agent and worker list will be updated when worker context is terminated. * inspector/Inspector.json: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::workerContextTerminatedImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::workerContextTerminated): * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel): (WebCore::InspectorWorkerAgent::create): (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): (WebCore::InspectorWorkerAgent::clearFrontend): (WebCore::InspectorWorkerAgent::setAutoconnectToWorkers): (WebCore::InspectorWorkerAgent::didStartWorkerContext): (WebCore::InspectorWorkerAgent::workerContextTerminated): * inspector/InspectorWorkerAgent.h: * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.prototype._workerCreated): (WebInspector.WorkerManager.prototype._workerTerminated): (WebInspector.WorkerManager.prototype.openWorkerInspector): (WebInspector.WorkerManager.prototype._openInspectorWindow): (WebInspector.WorkerManager.prototype.reset): (WebInspector.WorkerMessageForwarder.prototype.workerCreated): (WebInspector.WorkerMessageForwarder.prototype.workerTerminated): * inspector/front-end/WorkersSidebarPane.js: (WebInspector.WorkerListSidebarPane): (WebInspector.WorkerListSidebarPane.prototype._workerAdded): (WebInspector.WorkerListSidebarPane.prototype._workerRemoved): (WebInspector.WorkerListSidebarPane.prototype._workersCleared): (WebInspector.WorkerListSidebarPane.prototype._addWorker): (WebInspector.WorkerListSidebarPane.prototype._workerItemClicked): (WebInspector.WorkerListSidebarPane.prototype._autoattachToWorkersClicked): * inspector/front-end/inspector.js: (WebInspector.reset): 2011-06-02 Hayato Ito Reviewed by Ryosuke Niwa. Show a shadow root node itself in Node::traverseNextNodeAcrossFrame. https://bugs.webkit.org/show_bug.cgi?id=61992 It's better to show a shadow root node itself for debugging. Skipping it didn't add any values. No new tests since the function is only available in debug builds. * dom/Node.cpp: (WebCore::traverseNextNodeAcrossFrame): 2011-06-02 James Robinson Unreviewed, rolling out r87901. http://trac.webkit.org/changeset/87901 https://bugs.webkit.org/show_bug.cgi?id=61894 Might be responsible for performance regression on Chromium page cyclers, reverting to see... * loader/DocumentLoader.h: (WebCore::DocumentLoader::didTellClientAboutLoad): (WebCore::DocumentLoader::haveToldClientAboutLoad): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): 2011-06-02 Levi Weintraub Reviewed by Eric Seidel. Switch paintReplaced to use IntPoint https://bugs.webkit.org/show_bug.cgi?id=61891 Switching paintReplaced to use IntPoint to represent the paint offset instead of a pair of ints. Also renaming the IntPoint flavor of IntRect::move to moveBy to clear up the fact that the IntPoint is added as an offset as opposed to being relocated to that point. No tests because this is just a refactoring. * page/FrameView.cpp: (WebCore::FrameView::invalidateScrollbarRect): (WebCore::FrameView::convertFromRenderer): (WebCore::FrameView::convertToRenderer): * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::invalidatePart): * platform/graphics/gpu/Texture.cpp (WebCore::Texture::updateSubRect) * platform/graphics/IntRect.h: (WebCore::IntRect::moveBy): * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paint): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::logicalRectToPhysicalRect): (WebCore::RenderBlock::selectionGaps): * rendering/RenderBox.cpp: (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::localCaretRect): * rendering/RenderDetailsMarker.cpp: (WebCore::RenderDetailsMarker::paint): * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintReplaced): * rendering/RenderEmbeddedObject.h: * rendering/RenderHTMLCanvas.cpp: (WebCore::RenderHTMLCanvas::paintReplaced): * rendering/RenderHTMLCanvas.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderImage.h: * rendering/RenderInline.cpp: (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox): * rendering/RenderLayer.cpp: (WebCore::expandClipRectForDescendantsAndReflection): (WebCore::RenderLayer::paintScrollCorner): (WebCore::RenderLayer::paintResizer): (WebCore::RenderLayer::paintChildLayerIntoColumns): (WebCore::RenderLayer::hitTestChildLayerColumns): (WebCore::RenderLayer::boundingBox): (WebCore::RenderLayer::setBackingNeedsRepaintInRect): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::paintScrollbar): (WebCore::RenderLayerBacking::paintContents): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): (WebCore::RenderLayerCompositor::layerWillBeRemoved): (WebCore::paintScrollbar): (WebCore::RenderLayerCompositor::paintContents): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::controlClipRect): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::positionListMarker): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::paint): * rendering/RenderReplaced.h: (WebCore::RenderReplaced::paintReplaced): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computeRectForRepaint): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::controlClipRect): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::paintReplaced): * rendering/RenderVideo.h: * rendering/RenderView.cpp: (WebCore::RenderView::repaintViewRectangle): 2011-06-02 James Robinson Reviewed by Dimitri Glazkov. [chromium][V8] Add trace events for timer fires and event listener dispatches https://bugs.webkit.org/show_bug.cgi?id=61977 Adds TRACE_EVENT macro around timer and event listener dispatches. When tracing (a chromium feature) is enabled, this allows correlating these events with painting, compositing, and everything else in chromium that is traced. When tracing is disabled, this macro does nothing useful. Trace points are very cheap when tracing is disabled so this should have no performance impact for non-developers. * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): * bindings/v8/V8EventListener.cpp: (WebCore::V8EventListener::callListenerFunction): 2011-06-02 John Bates Reviewed by James Robinson. DrawingBufferChromium cleanup: - Correct FIXME comment about synchronization. - Remove unnecessary DrawingBufferInternal indirection struct and its unused offscreenColorTexture member. https://bugs.webkit.org/show_bug.cgi?id=61953 * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::~DrawingBuffer): (WebCore::DrawingBuffer::publishToPlatformLayer): (WebCore::DrawingBuffer::didReset): (WebCore::DrawingBuffer::platformLayer): * platform/graphics/gpu/DrawingBuffer.h: 2011-06-02 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: ResourceCookiesView.resize() is missing https://bugs.webkit.org/show_bug.cgi?id=61868 * inspector/front-end/ResourceCookiesView.js: (WebInspector.ResourceCookiesView.prototype.resize): 2011-06-02 Kent Tamura Reviewed by Dimitri Glazkov. REGRESSION(r87014): Cloned text