2011-06-27 Adrienne Walker Reviewed by Simon Fraser. Overlap map for compositing needs to consider clipping https://bugs.webkit.org/show_bug.cgi?id=63493 Test: compositing/layer-creation/overlap-clipping.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): * rendering/RenderLayerCompositor.h: 2011-07-15 Sheriff Bot Unreviewed, rolling out r90592. http://trac.webkit.org/changeset/90592 https://bugs.webkit.org/show_bug.cgi?id=64627 Causes crashes with the web audio async decoding API (Requested by jamesr on #webkit). * html/canvas/ArrayBuffer.cpp: (WebCore::ArrayBuffer::~ArrayBuffer): (WebCore::ArrayBuffer::tryAllocate): * manual-tests/array-buffer-memory.html: Removed. 2011-07-15 Kenneth Russell Don't restore WebGL context if it was guilty of a graphics reset https://bugs.webkit.org/show_bug.cgi?id=64497 Reviewed by Stephen White. Use getGraphicsResetStatusARB already defined in Extensions3D to determine why the context was lost, and respond to guilty context notifications by forbidding restoration of the context. It isn't currently possible to write an automated test for this. We might consider extending the WEBKIT_lose_context extension to allow a reason to be provided why the context was lost. It was tested manually in Chromium on Windows and Linux with some test cases that provoke actual graphics card resets. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::WebGLRenderingContextRestoreTimer::fired): (WebCore::WebGLRenderingContext::forceLostContext): (WebCore::WebGLRenderingContext::maybeRestoreContext): * html/canvas/WebGLRenderingContext.h: 2011-07-15 Chris Marrin Move TransformState to platform/graphics and give it the option to transform just a FloatQuad https://bugs.webkit.org/show_bug.cgi?id=64542 Reviewed by Simon Fraser. This is to make it possible to use TransformState in some GraphicsLayer work. HitTestingTransformState was split out and left in rendering since it's not needed in the platform code. Also added a FIXME because HitTestingTransformState should eventually be replaced by TransformState. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/transforms/TransformState.cpp: Copied from Source/WebCore/rendering/TransformState.cpp. (WebCore::TransformState::move): (WebCore::TransformState::flattenWithTransform): * platform/graphics/transforms/TransformState.h: Copied from Source/WebCore/rendering/TransformState.h. (WebCore::TransformState::TransformState): (WebCore::TransformState::setQuad): * rendering/HitTestingTransformState.cpp: Copied from Source/WebCore/rendering/TransformState.cpp. * rendering/HitTestingTransformState.h: Copied from Source/WebCore/rendering/TransformState.h. * rendering/RenderLayer.cpp: * rendering/RenderObject.cpp: (WebCore::RenderObject::localToContainerQuad): * rendering/RenderingAllInOne.cpp: * rendering/TransformState.cpp: Removed. * rendering/TransformState.h: Removed. 2011-07-15 Pratik Solanki Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. Minor changes needed to keep the compiler happy. No new tests because no change in functionality. * platform/network/cf/FormDataStreamCFNet.cpp: * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformCopy): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::WebCoreSynchronousLoaderClient::willSendRequest): * platform/network/cf/ResourceResponseCFNet.cpp: (WebCore::toTimeT): 2011-07-15 Dan Bernstein REGRESSION: Mouse cursor doesn’t hide when full screen video HUD hides https://bugs.webkit.org/show_bug.cgi?id=64615 Reviewed by Anders Carlsson. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::enteredFullscreen): Hide the mouse cursor immediately when entering full screen. (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): Hide the mouse cursor when hiding the HUD. * loader/EmptyClients.h: (WebCore::EmptyChromeClient::setCursorHiddenUntilMouseMoves): Added empty implementation. * page/Chrome.cpp: (WebCore::Chrome::setCursorHiddenUntilMouseMoves): Added. Calls through to the client. * page/Chrome.h: * page/ChromeClient.h: * platform/HostWindow.h: 2011-07-14 Gavin Barraclough https://bugs.webkit.org/show_bug.cgi?id=64250 Global strict mode function leaking global object as "this". Reviewed by Oliver Hunt. * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::call): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): - Change call to pass DOM Window shell, instead of the global varaible object. 2011-07-15 Brian Salomon [SKIA] Must make skia's GL context current before drawing in GraphicsContext::clearRect https://bugs.webkit.org/show_bug.cgi?id=64612 Reviewed by Stephen White. Tested by compositing/shadows/shadow-drawing.html * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clearRect): 2011-07-15 Ian Henderson Avoid rounded rect corner-drawing overhead if no corners are visible https://bugs.webkit.org/show_bug.cgi?id=64584 Reviewed by Simon Fraser. No new tests, rendering is visually identical. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::paintBoxDecorations): Pass PaintInfo into paintBorder. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Ditto. * rendering/RenderBoxModelObject.cpp: (WebCore::unroundClippedCorners): (WebCore::RenderBoxModelObject::paintBorder): Any invisible corner may be replaced with a corner of radius zero, as long as the stroke style is solid. Change the GraphicsContext parameter into a PaintInfo parameter so we can get the rect to be drawn. * rendering/RenderBoxModelObject.h: * rendering/RenderFieldset.cpp: (WebCore::RenderFieldset::paintBoxDecorations): Pass PaintInfo into paintBorder. * rendering/RenderTable.cpp: (WebCore::RenderTable::paintBoxDecorations): Ditto. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paintBoxDecorations): Ditto. 2011-07-15 Jeff Miller Add UserAgentStyleSheetsData.cpp to WebCore.vcproj https://bugs.webkit.org/show_bug.cgi?id=64609 Add UserAgentStyleSheetsData.cpp to WebCore.vcproj for convenient access, but don't compile it. This matches what we do with other generated DerivedSources. Reviewed by Brian Weinstein. No new tests, just adding a file. * WebCore.vcproj/WebCore.vcproj: Add UserAgentStyleSheetsData.cpp. 2011-07-15 Pratik Solanki Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. No new tests because no change in functionality and option is not enabled on Mac. * platform/network/cf/AuthenticationCF.h: Just use AuthenticationMac.h instead of having Mac-specific declarations here. * platform/network/cf/CredentialStorageCFNet.cpp: * platform/network/mac/AuthenticationMac.h: 2011-07-15 Pratik Solanki Part of https://bugs.webkit.org/show_bug.cgi?id=63674 Get webkit to compile with USE(CFNETWORK) enabled on Mac Reviewed by David Kilzer. Get LoaderRunLoop to work on Mac when USE(CFNETWORK) is enabled. Although we could use the main run loop, it's better to have a separate thread handling the loads so that it can work in parallel to the main thread. This is similar to what NSURLConnection does for us internally when we use the NS APIs. No new tests because no change in functionality and option is not enabled on Mac. * platform/network/cf/LoaderRunLoopCF.cpp: (WebCore::runLoaderThread): Create an autorelease pool for objc code that might be called in the run loop. (WebCore::loaderRunLoop): * platform/network/cf/LoaderRunLoopCF.h: 2011-07-15 Xiaomei Ji --webkit-visual-word crash on mixed editability https://bugs.webkit.org/show_bug.cgi?id=61978 --webkit-visual-word crashes (VisiblePosition.getInlineBoxAndOffset could return null box) https://bugs.webkit.org/show_bug.cgi?id=62814 Reviewed by Ryosuke Niwa. Replace previousWordPosition/nextWordPosition with previousBoundary/nextBoundary which do not honor editable bounary. Honor editable boundary as the last stage of leftWordPosition and rightWordPosition. Check previousBoundary/nextBoundary against NULL. Have a static function to encapsulate the usage of getInlineBoxAndOffset and check the visible position is not NULL before passing to getInlineBoxAndOffset. Check the box returned from getInlineBoxAndOffset is not NULL before accessing. Test: editing/selection/move-by-word-visually-null-box.html * editing/visible_units.cpp: (WebCore::positionIsInBox): (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): (WebCore::lastWordBreakInBox): (WebCore::positionIsVisuallyOrderedInBoxInBlockWithDifferentDirectionality): (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality): (WebCore::positionIsInsideBox): (WebCore::leftWordPositionAcrossBoundary): (WebCore::rightWordPositionAcrossBoundary): (WebCore::leftWordPosition): (WebCore::rightWordPosition): 2011-07-15 Pratik Solanki Remove unncessary creation of connectionProperties dictionary https://bugs.webkit.org/show_bug.cgi?id=63958 Reviewed by Alexey Proskuryakov. No new tests because no change in functionality. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): 2011-07-15 Pavel Feldman Web Inspector: Focusing on another node while editing CSS property does not update styles https://bugs.webkit.org/show_bug.cgi?id=64283 Reviewed by Yury Semikhatsky. Test: inspector/styles/styles-change-node-while-editing.html * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSProperty.prototype.setText): (WebInspector.CSSProperty.prototype.setText.callback): * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._inlineStyleInvalidated): (WebInspector.DOMDispatcher.prototype.inlineStyleInvalidated): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._attributesUpdated): (WebInspector.ElementsPanel.prototype.updateStyles): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane): (WebInspector.MetricsSidebarPane.prototype.update): (WebInspector.MetricsSidebarPane.prototype._innerUpdate.callback): (WebInspector.MetricsSidebarPane.prototype._innerUpdate.inlineStyleCallback): (WebInspector.MetricsSidebarPane.prototype._innerUpdate): (WebInspector.MetricsSidebarPane.prototype._styleSheetChanged): (WebInspector.MetricsSidebarPane.prototype._attributesUpdated): (WebInspector.MetricsSidebarPane.prototype.startEditing): (WebInspector.MetricsSidebarPane.prototype.editingEnded): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane): (WebInspector.StylesSidebarPane.prototype.update): (WebInspector.StylesSidebarPane.prototype._innerUpdate.stylesCallback): (WebInspector.StylesSidebarPane.prototype._innerUpdate.computedStyleCallback): (WebInspector.StylesSidebarPane.prototype._innerUpdate): (WebInspector.StylesSidebarPane.prototype._styleSheetChanged): (WebInspector.StylesSidebarPane.prototype._attributesUpdated): (WebInspector.StylesSidebarPane.prototype._refreshUpdate): (WebInspector.StylesSidebarPane.prototype._rebuildUpdate): (WebInspector.StylesSidebarPane.prototype._nodeStylesUpdatedForTest): (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane): (WebInspector.StylesSidebarPane.prototype._createElementStatePane.clickListener): (WebInspector.StylePropertyTreeElement.prototype): (WebInspector.StylePropertyTreeElement.prototype.event): (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection): (WebInspector.StylePropertyTreeElement.prototype.styleText.updateInterface.majorChange.isRevert): 2011-07-15 Mike Reed [skia] remove legacy draw-text-as-paths code, as skia now draws all text as text https://bugs.webkit.org/show_bug.cgi?id=64368 Reviewed by James Robinson. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::FontPlatformData::RefCountedHFONT::~RefCountedHFONT): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::skiaDrawText): (WebCore::setupPaintForFont): (WebCore::paintSkiaText): * platform/graphics/skia/SkiaFontWin.h: 2011-07-15 Piroska András Pixel difference in FEMorphology effect https://bugs.webkit.org/show_bug.cgi?id=63930 Reviewed by Zoltan Herczeg. Using short-circuit evaluation in the setFilterEffectAttribute function was wrong. We should call both setRadius functions and evaluate the changes separately. * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute): 2011-07-15 Jeff Miller Fullscreen content doesn't use fullscreen controller on Windows https://bugs.webkit.org/show_bug.cgi?id=64540 Reviewed by Darin Adler. RenderThemeWin needs to override extraFullScreenStyleSheet() to return the fullscreenQuickTime stylesheet. Test added to fullscreen/video-controls-override.html. * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::extraFullScreenStyleSheet): Added. * rendering/RenderThemeWin.h: Override extraFullScreenStyleSheet(). 2011-07-15 Nikolas Zimmermann Not reviewed. Fix build failure introduced in r91061. * page/Console.cpp: (WebCore::Console::markTimeline): Remove argument name from unused parameter. 2011-07-15 Kenneth Rohde Christiansen Upstream QtWebKit/N9 changes related to visibleContentRect https://bugs.webkit.org/show_bug.cgi?id=64589 Reviewed by Simon Hausmann. Rename setActualVisibleContentRect to setFixedVisibleContentRect as that makes it more obvious that it is an override. It is also consistent with the setFixedLayout which is often used in conjunction with it. Make visibleContentRect return the fixed value if set, and remove all calls to actualVisibleContentRect. Also updated the documentation. This is similar to what we have on our QtWebKit/N9 branch and is pretty well tested. * platform/ScrollView.cpp: (WebCore::ScrollView::visibleContentRect): If a fixed visibleContentRect is set, return that. Remove the code returning the contents size when in paintsEntireContents mode as that is wrong and already ifdeffed out for EFL. (WebCore::ScrollView::setScrollPosition): Do not try to be smart and update the fixed visibleContentsRect automatically, as the embedder might ignore the scroll request for various reasons. * platform/ScrollView.h: (WebCore::ScrollView::setFixedVisibleContentRect): (WebCore::ScrollView::fixedVisibleContentRect): 2011-07-15 Mike West Web Inspector: Rename console.markTimeline() to console.timeStamp() for Firebug compatibility. https://bugs.webkit.org/show_bug.cgi?id=63317 Reviewed by Pavel Feldman. Test: inspector/timeline/timeline-time-stamp.html * inspector/InspectorConsoleInstrumentation.h: (WebCore::InspectorInstrumentation::consoleTimeStamp): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::consoleTimeStampImpl): * inspector/InspectorInstrumentation.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didTimeStamp): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createTimeStampData): * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelineOverviewPane.js: (WebInspector.TimelineOverviewPane.prototype.update.markPercentagesForRecord): (WebInspector.TimelineOverviewPane.prototype.update): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._updateEventDividers): (WebInspector.TimelinePanel.prototype._createEventDivider): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): * page/Console.cpp: (WebCore::Console::markTimeline): (WebCore::Console::timeStamp): * page/Console.h: * page/Console.idl: 2011-07-15 Jonathan Dong LocalStorage: Changed the value type of ItemTable from TEXT to BLOB to avoid string truncation. This patch will also convert the exsisting ItemTable and perform the DATA MIGRATION job. https://bugs.webkit.org/show_bug.cgi?id=58762 Reviewed by Jeremy Orlow. Tests: manual-tests/localstorage-value-truncation.html * manual-tests/localstorage-value-truncation.html: Added. Demostrate the testcase shown in bug 58762. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::isColumnDeclearedAsBlob): Test if the pre-defined type of column is BLOB. * platform/sql/SQLiteStatement.h: * storage/StorageAreaSync.cpp: Change the localStorage value type from Text to BLOB to avoid the value string truncation at \x00. (WebCore::StorageAreaSync::openDatabase): Change the database structure, use BLOB to replace the TEXT type of value segment in ItemTable. (WebCore::StorageAreaSync::migrateItemTableIfNeeded): Migrate the ItemTable if the pre-defined type of value is TEXT. (WebCore::StorageAreaSync::performImport): Use getColumnBlobAsString() to import the BLOB value. (WebCore::StorageAreaSync::sync): Use bindBlob() to bind value string to the SQLiteStatement for the database execution. * storage/StorageAreaSync.h: 2011-07-15 Kentaro Hara Clear the content of a search input form when 'Escape' is pressed. https://bugs.webkit.org/show_bug.cgi?id=51897 This change added handleKeydownEvent() to a search input form, which clears the form and triggers a 'search' event when 'Escape' is pressed. Reviewed by Kent Tamura. Test: fast/forms/input-search-press-escape-key.html * html/SearchInputType.cpp: (WebCore::SearchInputType::handleKeydownEvent): * html/SearchInputType.h: 2011-07-15 Alexandru Chiculita Move useRepaintBounds from RenderBlock::layoutRunsAndFloats to LineLayoutState https://bugs.webkit.org/show_bug.cgi?id=64360 Reviewed by Hajime Morita. No new tests needed because the patch is just a refactor. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::LineLayoutState::LineLayoutState): (WebCore::LineLayoutState::usesRepaintBounds): (WebCore::LineLayoutState::setRepaintRange): (WebCore::LineLayoutState::updateRepaintRangeFromBox): (WebCore::RenderBlock::layoutRunsAndFloats): (WebCore::RenderBlock::determineStartPosition): 2011-07-14 MORITA Hajime ExceptionCodePlaceholder should have its own ExceptionCodePlaceholder.cpp file https://bugs.webkit.org/show_bug.cgi?id=64503 Reviewed by Darin Adler. No new tests. Just a file reorg. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/ExceptionCodePlaceholder.cpp: Added. (WebCore::NoExceptionAssertionChecker::NoExceptionAssertionChecker): (WebCore::NoExceptionAssertionChecker::~NoExceptionAssertionChecker): * dom/ExceptionCodePlaceholder.h: Removed NoExceptionAssertionChecker::m_function, which is loonger used. 2011-07-14 Mark Pilgrim Remove LegacyDefaultOptionalArguments flag from WebGL https://bugs.webkit.org/show_bug.cgi?id=64549 Reviewed by Kenneth Russell. * html/canvas/WebGLRenderingContext.idl: 2011-07-14 Yuta Kitamura WebSocket: Introduce pywebsocket-0.6b2 https://bugs.webkit.org/show_bug.cgi?id=64534 Reviewed by Kent Tamura. pywebsocket now accepts "Sec-WebSocket-Version: 8" as required in hybi-10 specification. No new functionality is added, thus no new tests. Existing WebSocket tests should keep passing. * websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): 2011-07-14 SravanKumar S Replaced isChecked() with shouldAppearChecked() in HTMLInputElement.cpp along with all the corresponding function calls. https://bugs.webkit.org/show_bug.cgi?id=54476 Reviewed by Darin Adler. No new tests, since existing fast/dom/HTMLInputElement/checked-pseudo-selector.html verifies the patch. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isChecked): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * dom/CheckedRadioButtons.cpp: (WebCore::CheckedRadioButtons::removeButton): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::shouldAppearChecked): * html/HTMLInputElement.h: Removed virtual declaration from shouldAppearChecked(). * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isChecked): 2011-07-14 Kenichi Ishibashi should not associate the input with any forms when there is no form with id="x" https://bugs.webkit.org/show_bug.cgi?id=64509 Don't set form owner when a form associated element has the form attribute but there is no such form element. Reviewed by Kent Tamura. Test: fast/forms/form-attribute-nonexistence-form-id.html * dom/Document.cpp: (WebCore::Document::resetFormElementsOwner): Removed the argument which is no longer needed. * dom/Document.h: Ditto. * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::insertedIntoTree): Resets m_form whenever the element has the form attribute. (WebCore::FormAssociatedElement::resetFormOwner): Don't set m_form when there is no form element which has the given id. (WebCore::FormAssociatedElement::formAttributeChanged): Removed the argument of resetFormOwner(). * html/FormAssociatedElement.h: Ditto. * html/HTMLFormElement.cpp: Ditto. (WebCore::HTMLFormElement::insertedIntoDocument): (WebCore::HTMLFormElement::removedFromDocument): 2011-07-14 Kent Tamura REGRESSION (r90809): Setting a checkbox's checked property, doesn't render as checked until app window loses focus https://bugs.webkit.org/show_bug.cgi?id=64537 Reviewed by Darin Adler. We stopped to call updateCheckedRadioButtons() for checkboxes since r90809, but we need to call RenderTheme::stateChanged(), which was in updateCheckedRadioButtons(), for checkboxes. Tests: fast/forms/checkbox-appearance-change-by-checked-expected.html fast/forms/checkbox-appearance-change-by-checked.html * html/HTMLInputElement.cpp: Move the RenderTheme::stateChanged() call from updateCheckedRadioButtons() to setChecked(). (WebCore::HTMLInputElement::updateCheckedRadioButtons): (WebCore::HTMLInputElement::setChecked): 2011-07-14 Adam Barth The beforeload event allows tracking URI changes in a frame https://bugs.webkit.org/show_bug.cgi?id=64482 Reviewed by Nate Chapin. Tests: http/tests/security/beforeload-iframe-client-redirect.html http/tests/security/beforeload-iframe-server-redirect.html Only dispatch the beforeload event for a frame if we haven't yet committed our first real load. The URL that we send to our parent will be the same URL the parent seens in the src attribute. * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadWithDocumentLoader): 2011-07-14 Dan Bernstein LLVM Compiler build fix. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyComputeLength::applyValue): 2011-07-14 Darin Adler [Mac] Use [NSCursor operationNotAllowedCursor] for CSS no-drop as well as CSS not-allowed https://bugs.webkit.org/show_bug.cgi?id=64570 Reviewed by Alexey Proskuryakov. Mac OS X documentation and usage makes it clear that this cursor is usually used for no-drop, and that it's also reasonable to use it for not-allowed. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): Use [NSCursor operationNotAllowedCursor] for Cursor::NoDrop. 2011-07-14 Luke Macpherson Reviewed by Dimitri Glazkov. Introduce templated compute length class in CSSStyleApplyProperty, and use to handle several CSS properties. https://bugs.webkit.org/show_bug.cgi?id=62957 No new tests / refactoring only. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): Add computeLength function that returns unsigned short. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyComputeLength::ApplyPropertyComputeLength): Added class to handle computeLength based properties. (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize ApplyPropertyComputeLength for appropriate properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::useSVGZoomRules): Make this a public member function instead of a private static function. (WebCore::CSSStyleSelector::applyProperty): Removed code now implemented in CSSStyleApplyProperty. (WebCore::CSSStyleSelector::setFontSize): Use new useSVGZoomRules function. * css/CSSStyleSelector.h: Add interface for useSVGZoomRules. 2011-07-14 Antti Koivisto REGRESSION: Should not dispatch didFirstVisuallyNonEmptyLayout for the initial empty document https://bugs.webkit.org/show_bug.cgi?id=64557 Reviewed by Kenneth Rohde Christiansen. Avoid sending didFirstVisuallyNonEmptyLayout for the initial empty document of the frame. The clients may not expect it and it doesn't make much sense in any case. * page/FrameView.cpp: (WebCore::FrameView::performPostLayoutTasks): 2011-07-14 Jeffrey Pfau Character reference parser for new XML parser https://bugs.webkit.org/show_bug.cgi?id=64398 Reviewed by Adam Barth. Refactored out the HTML entity parser and added a common template for parsing character references. * WebCore.xcodeproj/project.pbxproj: * html/parser/HTMLEntityParser.cpp: (WebCore::consumeHTMLEntity): * xml/parser/CharacterReferenceParserInlineMethods.h: Copied from Source/WebCore/html/parser/HTMLEntityParser.cpp. (WebCore::isHexDigit): (WebCore::unconsumeCharacters): (WebCore::consumeCharacterReference): * xml/parser/XMLCharacterReferenceParser.cpp: Added. (WebCore::consumeXMLCharacterReference): * xml/parser/XMLCharacterReferenceParser.h: Added. 2011-07-14 Ilya Tikhonovsky Reviewed by Pavel Feldman. Web Inspector: panel switching is too slow. https://bugs.webkit.org/show_bug.cgi?id=60959 * inspector/front-end/inspector.css: (.panel): (.panel.visible): 2011-07-14 Andrey Kosyakov Web Inspector: remove more unused CSS from inspector.css https://bugs.webkit.org/show_bug.cgi?id=64529 Reviewed by Pavel Feldman. * inspector/front-end/inspector.css: 2011-07-14 Ryosuke Niwa Move subtreeHasChanged from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64476 Reviewed by Kent Tamura. Moved subtreeHasChanged from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine to HTMLTextFormControlElement, HTMLInputElement, and HTMLTextAreaElement. Also moved m_searchEventTimer and related functions from RenderTextSingleLine to SearchInputType. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): Moved from RenderTextControlSingleLine. (WebCore::HTMLInputElement::onSearch): Calls stopSearchEventTimer. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::subtreeHasChanged): Moved from RenderTextMultiLine. * html/HTMLTextAreaElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::defaultEventHandler): Calls subtreeHasChanged. (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Added; calls respondToChangeByUser. * html/HTMLTextFormControlElement.h: * html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): Initializes m_searchEventTimer. (WebCore::SearchInputType::startSearchEventTimer): Moved from RenderTextControlSingleLine. (WebCore::SearchInputType::stopSearchEventTimer): Ditto. (WebCore::SearchInputType::searchEventTimerFired): Ditto. * html/SearchInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): Updated comment. * rendering/RenderTextControl.cpp: * rendering/RenderTextControl.h: (WebCore::RenderTextControl::respondToChangeByUser): Renamed from subtreeHasChanged. * rendering/RenderTextControlMultiLine.cpp: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): No longer initializes m_searchEventTimer. * rendering/RenderTextControlSingleLine.h: 2011-07-14 Vsevolod Vlasov Move XML errors handling out from XMLDocumentParser (refactoring). https://bugs.webkit.org/show_bug.cgi?id=64305 XML errors handling logic is moved out from XMLDocumentParser to allow using it for XSLT error handling as well. Reviewed by Adam Barth. No tests needed as there is no new functionality added. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * xml/XMLErrors.cpp: Added. (WebCore::XMLErrors::XMLErrors): (WebCore::XMLErrors::handleError): (WebCore::XMLErrors::appendErrorMessage): (WebCore::createXHTMLParserErrorHeader): (WebCore::XMLErrors::insertErrorMessageBlock): * xml/XMLErrors.h: Added. * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::pushCurrentNode): (WebCore::XMLDocumentParser::handleError): (WebCore::XMLDocumentParser::insertErrorMessageBlock): * xml/parser/XMLDocumentParser.h: * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::error): (WebCore::warningHandler): (WebCore::fatalErrorHandler): (WebCore::normalErrorHandler): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::doEnd): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::parseStartElement): (WebCore::XMLDocumentParser::parseDtd): 2011-07-14 Vsevolod Vlasov Web Inspector: InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache. https://bugs.webkit.org/show_bug.cgi?id=64356 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache): * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache): * inspector/InspectorResourceAgent.h: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype.resourceLoadedFromMemoryCache): (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._frameNavigated): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadedResourceFromMemoryCache): * loader/FrameLoader.h: 2011-07-14 Tim Horton Clear SVGElementInstance's children immediately upon detachment https://bugs.webkit.org/show_bug.cgi?id=63739 Reviewed by Nikolas Zimmermann. In addition to clearing the instance's children in the destructor, clear them when the instance is detached from its . This way, we won't attempt to use them after we're detached but before the destructor has been called. Test: svg/custom/use-crash-using-children-before-destroy.svg * svg/SVGElementInstance.cpp: (WebCore::SVGElementInstance::~SVGElementInstance): (WebCore::SVGElementInstance::clearChildren): * svg/SVGElementInstance.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::detachInstance): 2011-07-14 Nate Chapin Don't skip custom cursors if an Image* is null, since this can lead to a non-custom Cursor flickering back in when the custom cursor hasn't finished loading yet. https://bugs.webkit.org/show_bug.cgi?id=64321 Reviewed by Darin Fisher. Manual test, since we're testing visual flickering. * manual-tests/canvas-cursor.html: Added. * page/EventHandler.cpp: (WebCore::EventHandler::selectCursor): * platform/Cursor.cpp: (WebCore::determineHotSpot): 2011-07-14 Young Han Lee Reviewed by Dirk Schulze. REGRESSION (r89774): svg/W3C-SVG-1.1/animate-elem-82-t.svg hits assertion failure. https://bugs.webkit.org/show_bug.cgi?id=63911 Some functions assumed calculateKeyTimesIndex() does not return the last index of the keyTimes, but it would be right behavior for calculateKeyTimesIndex() when it accepts 1 as the percent argument. To avoid the assumption, and for more efficiency, this patch allows the functions using calculateKeyTimesIndex() to return early when it accepts 1 as the percent argument. These functions have always returned the last element of the corresponding vector in that situation. * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::calculatePercentFromKeyPoints): (WebCore::SVGAnimationElement::currentValuesForValuesAnimation): 2011-07-14 Andrey Kosyakov Web Inspector: remove more dead code https://bugs.webkit.org/show_bug.cgi?id=64524 Reviewed by Yury Semikhatsky. * WebCore.gypi: * inspector/front-end/SummaryBar.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.css: * inspector/front-end/inspector.html: 2011-07-14 Peter Varga [Qt][V8] Build fix after r90830. Reviewed by Csaba Osztrogonác. The histogramEnumeration() function isn't available from the Qt port's PlatformBridge.h because this function is Chromium specific. Since the http://trac.webkit.org/changeset/90830 change we need to guard the usage of the histogramEnumeration() function. No new tests needed. * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::V8InspectorFrontendHost::recordActionTakenCallback): (WebCore::V8InspectorFrontendHost::recordPanelShownCallback): (WebCore::V8InspectorFrontendHost::recordSettingChangedCallback): 2011-07-14 Yury Semikhatsky Web Inspector: show only Console and Scripts panels in shared worker inspector front-end https://bugs.webkit.org/show_bug.cgi?id=64519 Reviewed by Pavel Feldman. * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager): (WebInspector.WorkerManager.isWorkerFrontend): (WebInspector.WorkerManager.isSharedWorkerFrontend): (WebInspector.WorkerManager.prototype._openInspectorWindow): (WebInspector.DedicatedWorkerMessageForwarder): 2011-07-14 MORITA Hajime Unreviewed, rolling out r90976, r90981, and r90985. http://trac.webkit.org/changeset/90976 http://trac.webkit.org/changeset/90981 http://trac.webkit.org/changeset/90985 https://bugs.webkit.org/show_bug.cgi?id=64251 build break * WebCore.exp.in: * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): * dom/NodeRenderingContext.h: * dom/ShadowContentElement.cpp: (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): * dom/ShadowContentElement.h: * dom/ShadowContentSelector.cpp: (WebCore::ShadowContentSelector::ShadowContentSelector): (WebCore::ShadowContentSelector::selectInclusion): (WebCore::ShadowContentSelector::willAttachContentFor): (WebCore::ShadowContentSelector::didAttachContent): (WebCore::ShadowContentSelector::activeElement): * dom/ShadowContentSelector.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::~ShadowRoot): (WebCore::ShadowRoot::activeContentElement): * dom/ShadowRoot.h: * testing/Internals.cpp: * testing/Internals.h: * testing/Internals.idl: 2011-07-13 Ryosuke Niwa Move forwardEvent from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=64475 Reviewed by Kent Tamura. Moved forwardEvent from RenderTextControl, RenderTextControlSingleLine, and RenderTextControlMultiLine to HTMLTextFormControlElement, HTMLInputElement, and HTMLTextAreaElement. This removes the last dependency on Event.h and EventNames.h in the cpp files for the above render objects classes. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::defaultEventHandler): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::forwardEvent): * html/HTMLTextFormControlElement.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::forwardEvent): * rendering/RenderTextControl.cpp: * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: * rendering/RenderTextControlSingleLine.h: 2011-07-13 Ilya Tikhonovsky Web Inspector: if you rename an element into the INPUT element the browser will crash. https://bugs.webkit.org/show_bug.cgi?id=64292 Reviewed by Joseph Pecoraro. * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setNodeName): Unnecessary function call copyNonAttributeProperties was removed. 2011-07-13 Yuta Kitamura WebSocket: Implement hybi handshake https://bugs.webkit.org/show_bug.cgi?id=64344 Reviewed by Kent Tamura. Implement WebSocket handshake which is described at . Notable differences from hixie-76 protocol are: - Challenge-response scheme has been changed dramatically. - Servers do not send Sec-WebSocket-Location and Sec-WebSocket-Origin anymore. - The value of "Upgrade" header has been changed to "websocket" (lower-case only). - "Origin" header in client's request is renamed to "Sec-WebSocket-Origin". New tests: http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header.html http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header.html http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header.html Note: Tests under hybi/ directory (including the new ones) are skipped and cannot be enabled yet, because pywebsocket does not accept requests from half-baked client implementation (i.e. hybi handshake + hixie-76 framing). They will be unskipped when hybi framing is landed in WebCore. * websockets/WebSocketHandshake.cpp: Functions and members only used for hixie-76 handshake are renamed so that they are not confused with hybi-10's ones. (WebCore::generateHixie76SecWebSocketKey): (WebCore::generateHixie76Key3): (WebCore::generateHixie76ExpectedChallengeResponse): (WebCore::generateSecWebSocketKey): Generates a value for Sec-WebSocket-Key as stated in hybi-10. (WebCore::getExpectedWebSocketAccept): Calculates the expected value of Sec-WebSocket-Accept. (WebCore::WebSocketHandshake::WebSocketHandshake): (WebCore::WebSocketHandshake::clientHandshakeMessage): (WebCore::WebSocketHandshake::clientHandshakeRequest): (WebCore::WebSocketHandshake::readServerHandshake): (WebCore::WebSocketHandshake::serverWebSocketAccept): (WebCore::WebSocketHandshake::serverWebSocketExtensions): (WebCore::WebSocketHandshake::checkResponseHeaders): * websockets/WebSocketHandshake.h: 2011-07-13 MORITA Hajime [ShadowContentElement] forwarded node should be able to access its hosting content element. https://bugs.webkit.org/show_bug.cgi?id=64251 Reviewed by Dimitri Glazkov. - Introduced ShadowInclusionSet to manage included nodes to its includer content element. ShadowInclusionSet instance is owned by ShadowRoot. - Updated the set on inclusion list changes. - Used the set to retrieve the content element of NodeRenderingContext. There are also related refactoring and cleanup: - Renamed NodeRenderingContext::m_contentElement to m_includer - ShadowContentSelector::m_activeElement is no longer used, thus removed. Test: fast/dom/shadow/content-element-includer.html * WebCore.exp.in: * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): * dom/NodeRenderingContext.h: (WebCore::NodeRenderingContext::includer): * dom/ShadowContentElement.cpp: (WebCore::removeFromSet): Added (WebCore::addToSet): Added (WebCore::ShadowContentElement::attach): (WebCore::ShadowContentElement::detach): * dom/ShadowContentElement.h: (WebCore::ShadowInclusionSet::add): (WebCore::ShadowInclusionSet::remove): (WebCore::ShadowInclusionSet::isEmpty): (WebCore::ShadowInclusionSet::Translator::hash): (WebCore::ShadowInclusionSet::Translator::equal): (WebCore::ShadowInclusionSet::Hash::hash): (WebCore::ShadowInclusionSet::Hash::equal): (WebCore::ShadowInclusionSet::find): * dom/ShadowContentSelector.cpp: (WebCore::ShadowContentSelector::ShadowContentSelector): (WebCore::ShadowContentSelector::selectInclusion): * dom/ShadowContentSelector.h: * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::~ShadowRoot): (WebCore::ShadowRoot::includerFor): Replaced activeElement() (WebCore::ShadowRoot::inclusions): Added (WebCore::ShadowRoot::ensureInclusions): Added * dom/ShadowRoot.h: (WebCore::toShadowRoot): * testing/Internals.cpp: (WebCore::Internals::includerFor): * testing/Internals.h: * testing/Internals.idl: 2011-07-12 Dominic Cooney Raise if dispatchEvent dispatches an event that is being dispatched https://bugs.webkit.org/show_bug.cgi?id=64150 Reviewed by Dimitri Glazkov. Spec: http://www.w3.org/TR/DOM-Level-3-Events/#events-EventTarget-dispatchEvent Test: fast/events/dispatch-event-being-dispatched.html * dom/Event.h: (WebCore::Event::isBeingDispatched): Added. * dom/EventException.h: * dom/EventException.idl: Add DISPATCH_REQUEST_ERR. * dom/EventTarget.cpp: (WebCore::EventTarget::dispatchEvent): Raise if being dispatched. * dom/ExceptionCode.cpp: Add gunk for DISPATCH_REQUEST_ERR. 2011-07-13 Kent Tamura Implement text field placeholders using shadow DOM https://bugs.webkit.org/show_bug.cgi?id=64253 Reviewed by Dimitri Glazkov. Represents a placeholder text as a shadow element, and its visibility is controlled by 'visibility' CSS property. This patch removes all of existing code about placeholder from RenderTextControl*. RenderTextControl* have only small code about placeholder layout. Also, this patch removes INPUT_PLACEHOLDER legacy pseudo ID, and the placeholder style uses Element::shadowPseudoId(). This fixes the following regressions: - https://bugs.webkit.org/show_bug.cgi?id=51290 - https://bugs.webkit.org/show_bug.cgi?id=54797 - https://bugs.webkit.org/show_bug.cgi?id=54814 - https://bugs.webkit.org/show_bug.cgi?id=63367 Test: fast/forms/textarea-placeholder-wrapping.html * css/CSSSelector.cpp: Remove INPUT_PLACEHOLDER legacy pseudo ID. (WebCore::CSSSelector::pseudoId): (WebCore::nameToPseudoTypeMap): (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: ditto. * css/html.css: (::-webkit-input-placeholder): Added. This contains properties common in and