2012-11-28 Zeno Albisser [Qt][Win] Enable usage of QTWEBKIT_PLUGIN_PATH. https://bugs.webkit.org/show_bug.cgi?id=103529 This patch enables the same behavior for Windows as it is currently implemented for all other operating systems supported by Qt. Directories listed in the environment variable QTWEBKIT_PLUGIN_PATH are being searched for additional plugins. The only difference is that directories on Windows need to be separated by a semicolon instead of a colon. Reviewed by Kenneth Rohde Christiansen. * plugins/win/PluginDatabaseWin.cpp: (WebCore): (WebCore::addQtWebKitPluginPath): (WebCore::PluginDatabase::defaultPluginDirectories): 2011-06-10 Konstantin Tokarev Reviewed by Joseph Pecoraro. Fixed build with enabled workers and disabled inspector https://bugs.webkit.org/show_bug.cgi?id=62461 * inspector/InspectorWorkerAgent.cpp: Added inspector guard 2011-11-01 Zeno Albisser [Qt] bad codegen, pointer diff in JSC::JSCallbackConstructor::JSCallbackConstructor https://bugs.webkit.org/show_bug.cgi?id=60951 Adjust symbols visibility for WebCore. Reviewed by Simon Hausmann. * WebCore.pro: 2011-10-28 Zeno Albisser [Qt] Unreviewed: Build fix for MSVC2005 Patch by Andy Shaw * platform/win/SystemTimeWin.cpp: 2011-10-13 Zeno Albisser [Qt] QtWebKit build error for Mac 32bit https://bugs.webkit.org/show_bug.cgi?id=69914 In WebCore.pro and QtWebKit.pro we define NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES when compiling with ENABLE_VIDEO and with WTF_USE_QTKIT. But this is meant to be defined in NSGeometry.h under certain preconditions. Without setting NS_BUILD_32_LIKE_64 none of these preconditions is met and therefore NSGeometry.h will create several conflicting type definitions. With this patch we create consistent definitions again. Due to the order of include files we cannot remove NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES from WebCore.pro. Reviewed by Andreas Kling. * WebCore.pro: 2011-09-12 Adam Klein Fix out-of-bounds access in Gradient::sortStopsIfNecessary https://bugs.webkit.org/show_bug.cgi?id=67958 Reviewed by Darin Adler. Reported by Valgrind in http://crbug.com/77049. The errant code was added as an optimization in r67804. This patch reverts that one, as all parties agree that the optimization doesn't seem worthwhile, and there clearly aren't any tests covering the special case. No new tests, as existing tests should cover the remaining call to |std::stable_sort|. * platform/graphics/Gradient.cpp: (WebCore::Gradient::sortStopsIfNecessary): 2011-09-09 Dominic Mazzoni Assert being hit in AccessibilityRenderObject::addChildren() https://bugs.webkit.org/show_bug.cgi?id=61805 Reviewed by Chris Fleizach. Fix nextSibling and previousSibling to handle adjacent continuations properly, otherwise nodes end up appearing in the accessibility tree twice (or a debug assertion could be raised). Test: accessibility/adjacent-continuations-cause-assertion-failure.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::previousSibling): (WebCore::AccessibilityRenderObject::nextSibling): 2011-09-08 Abhishek Arya :before content rendering issues with list markers and run-ins. https://bugs.webkit.org/show_bug.cgi?id=67735 1) Remove the isAnonymous checks for run-in detection since the run-in can belong to a node. 2) When the parent has block children, then the list marker will be enclosed in an anonymous block. In that case, for going to the next list marker, we need to traverse one level up. We don't need this check when searching for generated run-in (loop 2), since we know parent will have inline children, so the list marker wont be enclosed in an anonymous block. Reviewed by Dave Hyatt. Tests: fast/lists/list-marker-before-content-table.html fast/runin/runin-generated-before-content.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::beforePseudoElementRenderer): 2011-09-10 Ken Buchanan Crash due to bad data in SVGDocumentExtensions m_pendingResources https://bugs.webkit.org/show_bug.cgi?id=67488 Reviewed by Nikolas Zimmermann. Resolving a crash condition caused by the deletion of elements while pending resource entries for those elements are still recorded. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::registerResource) * svg/SVGDocumentExtensions.h: (WebCore::SVGDocumentExtensions::isElementInPendingResources) * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::addPendingResource) (WebCore::SVGDocumentExtensions::isElementInPendingResources) (WebCore::SVGDocumentExtensions::removeElementFromPendingResources) * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded) (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged) 2011-09-08 Alexey Proskuryakov REGRESSION (r66874): Missing RefPtr in ScriptController https://bugs.webkit.org/show_bug.cgi?id=67748 Reviewed by Adam Barth. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): 2011-09-06 Abhishek Arya Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Share propagateStyleToAnonymousChildren with RenderBlock::styleDidChange. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: 2011-09-04 Abhishek Arya Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Tests: fast/ruby/ruby-block-style-not-updated-with-before-after-content.html fast/ruby/ruby-block-style-not-updated.html fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html fast/ruby/ruby-inline-style-not-updated.html fast/table/table-row-style-not-updated-with-after-content.html fast/table/table-row-style-not-updated-with-before-content.html fast/table/table-row-style-not-updated.html fast/table/table-style-not-updated.html * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: (WebCore::RenderObject::isBeforeAfterContent): * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::styleDidChange): (WebCore::RenderRubyAsBlock::styleDidChange): * rendering/RenderRuby.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::styleDidChange): (WebCore::RenderTableSection::addChild): * rendering/RenderTableSection.h: 2011-09-05 Abhishek Arya Crash in RenderObjectChildList::destroyLeftOverChildren() https://bugs.webkit.org/show_bug.cgi?id=64753 Reviewed by James Robinson. If any of the ancestors between column span element and containing column's block is a continuation, then don't attempt to render the column span by splitting the block into continuations. Test: fast/multicol/column-span-parent-continuation-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::columnsBlockForSpanningElement): 2011-08-30 Abhishek Arya Removed m_owner accessed in custom scrollbars. https://bugs.webkit.org/show_bug.cgi?id=64737 Reviewed by David Hyatt. Problem does not reproduce in DRT, even with Eventhandler tricks and gc(). So, adding a manual test. * manual-tests/custom-scrollbar-renderer-removed-crash.html: Added. * page/FrameView.cpp: (WebCore::FrameView::clearOwningRendererForCustomScrollbars): * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): when this renderbox is getting destroyed, clear the custom scrollbar in this frameview having this renderbox as its owning renderer. * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::getScrollbarPseudoStyle): fix the null check. 2011-09-04 Abhishek Arya Crash in Range::processAncestorsAndTheirSiblings. https://bugs.webkit.org/show_bug.cgi?id=67556 Reviewed by Ryosuke Niwa. Create a temporary RefPtr Node vector to keep all the ancestor's childs so that we don't access removed child nodes. Test: fast/dom/Range/range-delete-contents-event-fire-crash.html * dom/Range.cpp: (WebCore::Range::processContents): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-08-30 Adam Barth Flaky crash with JavaScript URLs https://bugs.webkit.org/show_bug.cgi?id=66360 Reviewed by Nate Chapin. This patch teaches DocumentWriter::begin to make a copy of the URL before beginning a new document to avoid a crash. Test: fast/loader/javascript-url-iframe-crash.html * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::begin): 2011-08-30 Caio Marcelo de Oliveira Filho Emit last progress notification before calling dispatchDidFinishLoad https://bugs.webkit.org/show_bug.cgi?id=28851 Reviewed by Adam Barth. Original patch by Xan Lopez. Change FrameLoader to dispatch the notifications in a more natural sequence. Test: http/tests/loading/progress-finished-callback.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): 2011-08-22 Nate Chapin Unload events can crash us when they blank out a parent frame. https://bugs.webkit.org/show_bug.cgi?id=64741 Reviewed by Adam Barth. Test: fast/loader/document-destruction-within-unload.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Prevent unload events from going into infinite recursion. (WebCore::FrameLoader::setDocumentLoader): Ensure we don't let set m_documentLoader to a DocumentLoader with a null Frame*. (WebCore::FrameLoader::detachChildren): Save off a vector of children to detach, rather than doing it inline. 2011-08-30 Abhishek Arya Style not updated for table parts in :before, :after content. https://bugs.webkit.org/show_bug.cgi?id=66141 Reviewed by Dave Hyatt. Tests: fast/table/table-before-child-style-update.html fast/table/table-row-before-child-style-update.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2011-08-25 Abhishek Arya Incorrect layout of :before and :after content, with display table, table-row and table-cell. https://bugs.webkit.org/show_bug.cgi?id=66699 Reviewed by David Hyatt. Tests: fast/table/table-after-child-in-table.html fast/table/table-before-child-in-table.html fast/table/table-cell-after-child-in-block.html fast/table/table-cell-after-child-in-table.html fast/table/table-cell-before-child-in-block.html fast/table/table-cell-before-child-in-table.html fast/table/table-row-after-child-in-block.html fast/table/table-row-after-child-in-table.html fast/table/table-row-before-child-in-block.html fast/table/table-row-before-child-in-table.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Fix the looping condition to detect :after child correctly. isAnonymousBlock() does not apply to tables, instead using isAnonymous(). * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild): Don't add the new child in the generatedContainer with :before, :after content. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): Don't add the new child in the generatedContainer with :before, :after content. 2011-08-29 Abhishek Arya Crash in InlineBox::deleteLine due to accessing removed renderer. https://bugs.webkit.org/show_bug.cgi?id=66015 Reviewed by Simon Fraser. Test: fast/block/line-layout/inline-box-wrapper-crash.html * rendering/RenderBox.cpp: (WebCore::RenderBox::positionLineBox): Make sure that the previous inline box wrapper is destroyed properly, before setting a new one. 2011-08-30 Ademar de Souza Reis Jr. [Qt] Do not unconditionally use pkg-config in .pro files https://bugs.webkit.org/show_bug.cgi?id=67055 Reviewed by Andreas Kling. Original patch from Rohan McGovern Using the first pkg-config in PATH is prone to errors when cross compiling inside the Qt repository (using Qt's build-system). This patch protect calls for pkg-config with !contains(QT_CONFIG, no-pkg-config). no-pkg-config is added to QT_CONFIG by Qt's 'configure' when cross-compiling on systems without pkg-config. The respective change in Qt's configure has been submited already. No new tests as this is just a build change. * features.pri: protect pkg-config calls 2011-08-25 Ademar de Souza Reis Jr. [Qt] Enable password echo on Symbian builds https://bugs.webkit.org/show_bug.cgi?id=66954 Reviewed by Chang Shu. No tests, as this is just a build change. * config.h: 2011-08-23 Chang Shu Added support for momentarily revealing last typed character in password input. Code change was partially based on Apple's iOS code and Samuel Nevala's work. https://bugs.webkit.org/show_bug.cgi?id=32509 Reviewed by Alexey Proskuryakov. * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): * rendering/RenderText.cpp: (WebCore::SecureTextTimer::SecureTextTimer): (WebCore::SecureTextTimer::restartWithNewText): (WebCore::SecureTextTimer::invalidate): (WebCore::SecureTextTimer::lastTypedCharacterOffset): (WebCore::SecureTextTimer::fired): (WebCore::RenderText::willBeDestroyed): (WebCore::RenderText::setTextInternal): (WebCore::RenderText::secureText): (WebCore::RenderText::momentarilyRevealLastTypedCharacter): * rendering/RenderText.h: (WebCore::RenderText::isSecure): * testing/Internals.cpp: (WebCore::Internals::setPasswordEchoEnabled): Fixed some silly coding in Internals. (WebCore::Internals::setPasswordEchoDurationInSeconds): (WebCore::Internals::reset): 2011-07-08 Chang Shu Update calling sites after function renamed. https://bugs.webkit.org/show_bug.cgi?id=59114 Reviewed by Alexey Proskuryakov. No new tests, just refactoring. * editing/visible_units.cpp: (WebCore::previousBoundary): (WebCore::nextBoundary): * rendering/RenderText.cpp: (WebCore::RenderText::setTextInternal): 2011-08-18 Chang Shu Add support of setPasswordEchoEnabled and setPasswordEchoDuration for password echo feature https://bugs.webkit.org/show_bug.cgi?id=66052 Reviewed by Alexey Proskuryakov. Added runtime settings in WebCore. Added support in window.internals for testing. Tests: editing/input/password-echo-passnode.html editing/input/password-echo-passnode2.html editing/input/password-echo-passnode3.html editing/input/password-echo-textnode.html * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setPasswordEchoEnabled): (WebCore::Settings::passwordEchoEnabled): (WebCore::Settings::setPasswordEchoDurationInSeconds): (WebCore::Settings::passwordEchoDurationInSeconds): * testing/Internals.cpp: (WebCore::Internals::Internals): (WebCore::Internals::setPasswordEchoEnabled): (WebCore::Internals::setPasswordEchoDurationInSeconds): (WebCore::Internals::reset): * testing/Internals.h: * testing/Internals.idl: 2011-08-16 Chang Shu Support reset in WebCore::Internals https://bugs.webkit.org/show_bug.cgi?id=66307 Reviewed by Dimitri Glazkov. New tests will be added when function reset is implemented. Added framework code in WebCoreTestSupport. The real implementation of Internals::reset() depends on the need from the settings that require a reset. * testing/Internals.cpp: (WebCore::Internals::reset): * testing/Internals.h: * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): * testing/js/WebCoreTestSupport.h: * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): * testing/v8/WebCoreTestSupport.h: 2011-06-09 Robert Hogan Reviewed by Andreas Kling. Teach Qt about window.internals https://bugs.webkit.org/show_bug.cgi?id=61074 A weakness of the Qt DRT setup is that things like JSContextRef are abstracted away from the QtWebKit API so we need DumpRenderTreeSupportQt to access WebCore internals. Since the window.internals object requires JSContextRef we need to implement it in DumpRenderTreeSupportQt where we can access it. DumpRenderTreeSupportQt cannot be compiled outside Qt's WebCore and as it is our only possible route into the WebCoreTestSupport class neither can the new window.internals plumbing. Likewise we can't put the accessor in WebCoreTestSupport because it would then need to know about QWebFrame and others. The only alternative seems like a compile time guard which we would have to teach the bots about. * CodeGenerators.pri: * WebCore.pri: * WebCore.pro: 2011-06-02 Dimitri Glazkov Reviewed by Darin Adler. Add build logistics and plumbing for window.internals object. https://bugs.webkit.org/show_bug.cgi?id=60313 Test: fast/harness/internals-object.html * Configurations/WebCoreTestSupport.xcconfig: Added. * DerivedSources.make: Added support for generating from Internals.idl. * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library. * WebCore.gypi: Ditto. * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library. * testing/Internals.cpp: Added. * testing/Internals.h: Added. * testing/Internals.idl: Added. * testing/js/WebCoreTestSupport.cpp: Added. * testing/js/WebCoreTestSupport.h: Added. * testing/v8/WebCoreTestSupport.cpp: Added. * testing/v8/WebCoreTestSupport.h: Added. 2011-08-22 Abhishek Arya Crash in FocusController::advanceFocusInDocumentOrder https://bugs.webkit.org/show_bug.cgi?id=66678 RefPtr the focusable node to prevent getting deleted by mutation event. Reviewed by Dave Hyatt. Test: fast/frames/focus-controller-crash-change-event.html * page/FocusController.cpp: (WebCore::FocusController::advanceFocusInDocumentOrder): 2011-08-18 Ryosuke Niwa SimplifiedBackwardsTextIterator returns incorrect offset with first-letter rule https://bugs.webkit.org/show_bug.cgi?id=66086 Reviewed by Darin Adler. The bug was caused by SimplifiedBackwardsTextIterator's not taking care of first-letter at all. Fixing the bug by detecting RenderTextFragment in handleTextNode. Also added m_shouldHandleFirstLetter to SimplifiedBackwardsTextIterator to keep track of whether or not the next call to handleTextNode needs to process the first-letter part of the text fragment. Test: editing/text-iterator/backward-textiterator-first-letter-crash.html * editing/TextIterator.cpp: (WebCore::firstRenderTextInFirstLetter): Extracted from handleTextNodeFirstLetter. (WebCore::TextIterator::handleTextNodeFirstLetter): Calls firstRenderTextInFirstLetter. (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): Added. * editing/TextIterator.h: 2011-08-23 Tor Arne Vestbø [Qt] Fix build on Lion https://bugs.webkit.org/show_bug.cgi?id=66770 Reviewed by Andreas Kling. We were mistakenly picking up mac/WebCoreSystemInterface.h instead of the Qt one, and building on Lion revealed this when a typedef for IOSurfaceRef was wrapped in PLATFORM(MAC). For now we fix this by including WebCoreSystemInterface using brackets, so that we'll pick up the right file based on the include paths. This also means exposing a few missing enums in our own version of the file, so those were added. Lasty, we need to link against the right system interface library on Lion. * platform/mac/WebVideoFullscreenHUDWindowController.mm: * platform/qt/WebCoreSystemInterface.h: 2011-08-08 Cris Neckar Remove counter nodes from the tree and fix-up children when they are removed from the counter map. https://bugs.webkit.org/show_bug.cgi?id=65346 Reviewed by Adam Barth. Covered by existing CSS counter tests. * rendering/CounterNode.cpp: (WebCore::CounterNode::~CounterNode): 2011-08-17 Oliver Hunt Move towards supporting user controlled prototypes on CanvasPixelArray https://bugs.webkit.org/show_bug.cgi?id=66429 Reviewed by Gavin Barraclough. Start using a per-global object structure for canvas pixel array. * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): 2011-08-17 Abhishek Arya Crash in Document::recalcStyleSelector https://bugs.webkit.org/show_bug.cgi?id=66335 Reviewed by Simon Fraser. When node is getting destroyed and its removedFromDocument is not called due to entire document structure torn down(using removeAllChildren), make sure to clear out the stylesheet candidate node from document's structures in its destructor. Test: svg/dom/stylesheet-candidate-node-crash-main.html * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::~ProcessingInstruction): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::~HTMLLinkElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::~HTMLStyleElement): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::~SVGStyleElement): 2011-08-12 Abhishek Arya Crash in WebCore::editingIgnoresContent https://bugs.webkit.org/show_bug.cgi?id=66125 Reviewed by Ryosuke Niwa. RefPtr a few nodes in case they get blown away in dispatchEvent calls. Test: editing/selection/select-start-remove-root-crash.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::selectAll): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): 2011-08-13 Abhishek Arya Crash in HTMLTreeBuilder::processAnyOtherEndTagForInBody https://bugs.webkit.org/show_bug.cgi?id=66187 Reviewed by Adam Barth. RefPtr a few ContainerNodes to prevent premature deletion. Test: fast/html/process-end-tag-for-inbody-crash.html * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::processCloseWhenNestedTag): (WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody): (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-08-10 Abhishek Arya Check that we do not need layout before trying to dirty m_originatingLine for our floats. https://bugs.webkit.org/show_bug.cgi?id=65938 Reviewed by Dave Hyatt. Test: fast/block/float/float-originating-line-deleted-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::removeFloatingObject): (WebCore::RenderBlock::clearFloats): 2011-08-11 Alexis Menard Unreviewed build fix for Qt. Make sure we build when Qt is namespaced. * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: 2011-08-06 Aron Rosenberg Reviewed by Benjamin Poulain. [Qt] Fix build with Intel compiler on Windows https://bugs.webkit.org/show_bug.cgi?id=65088 Intel compiler needs .lib suffixes instead of .a * WebCore.pri: 2011-08-03 Kent Tamura Fix incorrect checks for HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=65590 Reviewed by Dimitri Glazkov.