2012-04-03 Kenichi Ishibashi [Chromium] Out-of-process font loading garbles text https://bugs.webkit.org/show_bug.cgi?id=83002 Reviewed by Kent Tamura. Initialize m_CTFont by using m_cgFont in FontPlatformData when we use out-of-process font loading. No new tests. This problem only occurs when the user uses a third party font management software like Font Explorer so it is difficult to add tests. * platform/graphics/chromium/CrossProcessFontLoading.mm: (WebCore): (WebCore::FontPlatformData::loadFont): If font loading fails, set null to outNSFont so that the FontPlatformData won't be used. * platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::ctFont): Modified to return the appropriate NSFont object when the font from the browser process. * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::createFontPlatformData): Returns null when the generated FontPlatformData object doesn't have NSFont object. 2012-04-03 Hironori Bono Prevent spellchecking text pasted to an element having spellchecking disabled https://bugs.webkit.org/show_bug.cgi?id=81323 Reviewed by Hajime Morita. This change prevent calling SpellChecker::requestCheckingFor when pasting text to an element whose spellcheck attribute is false or a password input. Test: editing/spelling/spellcheck-paste-disabled.html * editing/Editor.cpp: (WebCore::Editor::replaceSelectionWithFragment): Disabled spellchecking on password inputs. * editing/SpellChecker.cpp: (WebCore::SpellChecker::isCheckable): Return false when spellchecking is disabled. 2012-04-03 Hayato Ito Make FocusController use a ComposedShadowTreeWalker, instead of ReifiedTreeTraversal APIs. https://bugs.webkit.org/show_bug.cgi?id=82694 Reviewed by Dimitri Glazkov. Rewrite a focus controller so that it uses ComposedShadowTreeWalker since that is a preferred way to traverse composed shadow tree. I'll get rid of ReifiedTreeTraversal in follow-up patches, which is now deprecated. No new tests. No change in functionality. * page/FocusController.cpp: (WebCore::walkerFrom): (WebCore): (WebCore::walkerFromNext): (WebCore::walkerFromPrevious): (WebCore::nextNode): (WebCore::previousNode): (WebCore::FocusController::findNodeWithExactTabIndex): (WebCore::nextNodeWithGreaterTabIndex): (WebCore::previousNodeWithLowerTabIndex): (WebCore::FocusController::nextFocusableNode): (WebCore::FocusController::previousFocusableNode): 2012-04-03 Srikumar Bonda [Qt] Crash in ~GraphicsContext3D() when init failed https://bugs.webkit.org/show_bug.cgi?id=82992 Reviewed by Luiz Agostini. WebKit crashes in ~GraphicsContext3D() while freeing the variables which are not even allocated because of the init failure in GraphicsContext3D() for Qt. In addition, Added a safety check in makeContextCurrent() before accessing GraphicsContext3DPrivate object. No new tests because the change is about adding null check before accessing the variables. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): 2012-04-03 Rafael Weinstein Use V8 completion callback API to assert that V8RecursionScope is on the stack whenever invoking script https://bugs.webkit.org/show_bug.cgi?id=79131 Reviewed by Adam Barth. End-of-microtask work (cancelling outstanding IDB transactions, delivering DOM mutations) depend on V8RecursionScope being on the stack whenever a call is made into script. V8 provides a completion callback API that could be used to hook these "end-of-microtask" events, but it turns out that WebKit calls into script for various reasons besides running script from the page. For example, constructing wrapper objects from function templates counts as "running script", yet it's not appropriate to run this callback every time a JS wrapper is constructed. Instead, this patch makes use of the V8 completion callback mechanism only in debug mode, to assert that either a V8RecursionScope (when calling author script) or a V8RecursionScope::MicrotaskSuppression (when calling non-author script) is on the stack when V8 thinks it's finished executing script. This requires dropping MicrotaskSuppression objects in a bunch of places, most notably the Inspector. Note that in release mode, this class does nothing and thus should be optimized away. No new tests. Existing tests have appropriate coverage. * Target.pri: * WebCore.gypi: * bindings/v8/DateExtension.cpp: (WebCore::DateExtension::setAllowSleep): * bindings/v8/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::callFunctionEvenIfScriptDisabled): (WebCore): (WebCore::ScriptController::collectGarbage): * bindings/v8/ScriptController.h: (ScriptController): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::callDebuggerMethod): (WebCore): (WebCore::ScriptDebugServer::pauseOnExceptionsState): (WebCore::ScriptDebugServer::setPauseOnExceptionsState): (WebCore::ScriptDebugServer::stepIntoStatement): (WebCore::ScriptDebugServer::stepOverStatement): (WebCore::ScriptDebugServer::stepOutOfFunction): (WebCore::ScriptDebugServer::setScriptSource): (WebCore::ScriptDebugServer::currentCallFrame): (WebCore::ScriptDebugServer::handleV8DebugEvent): (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled): * bindings/v8/ScriptDebugServer.h: (ScriptDebugServer): * bindings/v8/ScriptFunctionCall.cpp: (WebCore::ScriptFunctionCall::call): * bindings/v8/V8Binding.cpp: (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData): * bindings/v8/V8Binding.h: (V8BindingPerIsolateData): (WebCore::V8BindingPerIsolateData::internalScriptRecursionLevel): (WebCore::V8BindingPerIsolateData::incrementInternalScriptRecursionLevel): (WebCore::V8BindingPerIsolateData::decrementInternalScriptRecursionLevel): * bindings/v8/V8DOMWindowShell.cpp: * bindings/v8/V8DOMWrapper.cpp: * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8NPObject.cpp: * bindings/v8/V8RecursionScope.h: (WebCore): (WebCore::V8RecursionScope::recursionLevel): (V8RecursionScope): (WebCore::V8RecursionScope::properlyUsed): (MicrotaskSuppression): (WebCore::V8RecursionScope::MicrotaskSuppression::MicrotaskSuppression): (WebCore::V8RecursionScope::MicrotaskSuppression::~MicrotaskSuppression): * bindings/v8/WorkerContextExecutionProxy.cpp: * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::WrapInShadowObject): * bindings/v8/custom/V8InjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): * bindings/v8/custom/V8ScriptProfileCustom.cpp: * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: 2012-04-03 Anna Cavender Makes sure m_showingByDefault is set to false when TextTrack.mode is set from JS. https://bugs.webkit.org/show_bug.cgi?id=79791 Reviewed by Eric Carlson. Test: media/track/track-mode.html * html/track/TextTrack.cpp: (WebCore::TextTrack::setMode): setMode should always setShowingByDefault to false. 2012-04-03 Jia Pu Rename SpellingCorrectionController to AlternativeTextController. https://bugs.webkit.org/show_bug.cgi?id=82942 Reviewed by Enrica Casucci. No new tests, since there's no change of funcationalities. This patch renames SpellingCorrectionController to AlternativeTextController, CorrectionPanelInfo to AlternativeTextInfo, CorrectionPanelInfo::CorretionPanelType to AlternativeTextType, and ReasonForDismissingCorrectionPanel to ReasonForDismissingAlternativeText. All these renaming reflects the fact that this class controls change of text caused by both spell checking and alternative dictation results. It also renames a couple of functions in the original SpellingCorrectionController class for the same reason. SpellingCorrectionPanel::replacementString has been replaced by AlternativeTextInfo::details which is an object that can be instantiated with different subclasses. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * editing/AlternativeTextController.cpp: Copied from Source/WebCore/editing/SpellingCorrectionController.cpp. (AutocorrectionAlternativeDetails): (WebCore::AutocorrectionAlternativeDetails::create): (WebCore::AutocorrectionAlternativeDetails::replacementString): (WebCore::AutocorrectionAlternativeDetails::AutocorrectionAlternativeDetails): (WebCore): (WebCore::AlternativeTextController::AlternativeTextController): (WebCore::AlternativeTextController::~AlternativeTextController): (WebCore::AlternativeTextController::startAlternativeTextUITimer): (WebCore::AlternativeTextController::stopAlternativeTextUITimer): (WebCore::AlternativeTextController::stopPendingCorrection): (WebCore::AlternativeTextController::applyPendingCorrection): (WebCore::AlternativeTextController::hasPendingCorrection): (WebCore::AlternativeTextController::isSpellingMarkerAllowed): (WebCore::AlternativeTextController::show): (WebCore::AlternativeTextController::handleCancelOperation): (WebCore::AlternativeTextController::dismiss): (WebCore::AlternativeTextController::dismissSoon): (WebCore::AlternativeTextController::applyAlternativeText): (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate): (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): (WebCore::AlternativeTextController::timerFired): (WebCore::AlternativeTextController::handleAlternativeTextUIResult): (WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled): (WebCore::AlternativeTextController::rootViewRectForRange): (WebCore::AlternativeTextController::respondToChangedSelection): (WebCore::AlternativeTextController::respondToAppliedEditing): (WebCore::AlternativeTextController::respondToUnappliedEditing): (WebCore::AlternativeTextController::client): (WebCore::AlternativeTextController::textChecker): (WebCore::AlternativeTextController::recordAutocorrectionResponseReversed): (WebCore::AlternativeTextController::markReversed): (WebCore::AlternativeTextController::markCorrection): (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection): (WebCore::AlternativeTextController::deletedAutocorrectionAtPosition): (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand): (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult): * editing/AlternativeTextController.h: Copied from Source/WebCore/editing/SpellingCorrectionController.h. (AlternativeTextDetails): (WebCore::AlternativeTextDetails::AlternativeTextDetails): (WebCore::AlternativeTextDetails::~AlternativeTextDetails): (WebCore): (AlternativeTextInfo): (AlternativeTextController): (WebCore::AlternativeTextController::shouldRemoveMarkersUponEditing): * editing/EditingAllInOne.cpp: * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): (WebCore::Editor::appliedEditing): (WebCore::Editor::unappliedEditing): (WebCore::Editor::Editor): (WebCore::Editor::insertTextWithoutSendingTextEvent): (WebCore::Editor::insertLineBreak): (WebCore::Editor::insertParagraphSeparator): (WebCore::Editor::isAutomaticSpellingCorrectionEnabled): (WebCore::Editor::markMisspellingsAfterTypingToWord): (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): (WebCore::Editor::markAndReplaceFor): (WebCore::Editor::changeBackToReplacedString): (WebCore::Editor::unappliedSpellCorrection): (WebCore::Editor::updateMarkersForWordsAffectedByEditing): (WebCore::Editor::deletedAutocorrectionAtPosition): (WebCore::Editor::startAlternativeTextUITimer): (WebCore::Editor::handleAlternativeTextUIResult): (WebCore::Editor::dismissCorrectionPanelAsIgnored): * editing/Editor.h: (WebCore): (Editor): * editing/SpellingCorrectionCommand.cpp: * editing/SpellingCorrectionController.cpp: Removed. * editing/SpellingCorrectionController.h: Removed. * editing/TypingCommand.cpp: (WebCore::TypingCommand::markMisspellingsAfterTyping): * loader/EmptyClients.h: (WebCore::EmptyEditorClient::showCorrectionPanel): (WebCore::EmptyEditorClient::dismissCorrectionPanel): (WebCore::EmptyEditorClient::dismissCorrectionPanelSoon): * page/EditorClient.h: 2012-04-03 Adam Barth Unreviewed. This patch adds an ugly, ugly hack to bandaid over the Windows component build. See comments in the code for details. * platform/chromium/support/WebMediaStreamSourcesRequest.cpp: (WebKit::WebMediaStreamSourcesRequest::dummy): (WebKit): 2012-04-03 Abhishek Arya Crash in SelectorChecker::checkOneSelector. https://bugs.webkit.org/show_bug.cgi?id=83040 Reviewed by Antti Koivisto. Test: fast/css/css-set-selector-text-crash.html Removing the early bail when we detect that our selector text hasn't changed, and we don't notify the styleSelectorChanged. In fact, when we adopt the new selector list, the old one will get destroyed and the styleSelectorChanged call needs to be made. * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): 2012-04-03 Julien Chaffraix presentationAttributeCacheMaximumSize is set too low https://bugs.webkit.org/show_bug.cgi?id=82816 Reviewed by Antti Koivisto. Performance change, no side effects anticipated. Prior to r106740, the presentation attribute style cache used to grow unbounded. As part of r110316, a different version of the cache was introduced with a maximum size of 128. This size gave a 75% hit rate. However this is bad as the previous cache had a 85% hit rate** and each miss propagate down to the matched properties cache as we use pointer comparisons. This change bumps the size to 4096. This size was chosen to bring us back to the previous hit rate while being a power of 2 (it is the HashMap maximum size). The steep increase is due to the combinational compexity of the new cache model: we need to match all our attributes' name, value and tag name to get a hit vs one attribute name, value and a category in the previous cache. To avoid blowing up the memory, we introduced a timer to clear the cache if the hit rate is too low. The measured hit rate is actually better now - in the 90% range on most page cyclers. This ups the matched properties hit rate by 1 percent point on presentation attributes. ** This is not a true apple-to-apple comparison as the cache model was changed. * dom/StyledElement.cpp: (PresentationAttributeCacheCleaner): (WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner): (WebCore::PresentationAttributeCacheCleaner::didHitPresentationAttributeCache): (WebCore::PresentationAttributeCacheCleaner::cleanCache): (WebCore): (WebCore::presentationAttributeCacheCleaner): (WebCore::StyledElement::updateAttributeStyle): Added the logic to clean the presentation attribute cache if we drop below 100 hits per minutes. 2012-04-03 Tony Chang Implement new flex property and deprecate flex function https://bugs.webkit.org/show_bug.cgi?id=82128 Reviewed by Ojan Vafai. No new tests. Tests were updated to use the new syntax and they should all pass. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::preferredFlexLengthForChild): Grab the preferred size and if it's auto, fall back to width or height. (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): (WebCore::RenderFlexibleBox::positiveFlexForChild): Use the value from the flex property. (WebCore::RenderFlexibleBox::negativeFlexForChild): Use the value from the flex property. (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes): * rendering/RenderFlexibleBox.h: 2012-03-15 Anders Carlsson Search result page scrolls up before the correct page opens from google search https://bugs.webkit.org/show_bug.cgi?id=81280 Reviewed by Sam Weinig. Make the requested scroll position part of the ScrollingTreeState so any changes being made are in sync with other important changes such as the scroll layer or contents size. * page/scrolling/ScrollingCoordinator.cpp: (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange): Use coordinatesScrollingForFrameView instead of checking if the frame is the main frame. (WebCore::ScrollingCoordinator::requestScrollPositionUpdate): Call ScrollingTreeState::setRequestedScrollPosition. (WebCore::ScrollingCoordinator::setScrollLayer): Reset the requested scroll position. * page/scrolling/ScrollingTreeState.cpp: (WebCore::ScrollingTreeState::setRequestedScrollPosition): Keep track of the scroll position. * page/scrolling/mac/ScrollingTreeNodeMac.mm: (WebCore::ScrollingTreeNodeMac::update): Update the scroll position if it's changed. 2012-04-03 W. James MacLean [chromium] Switch touchpad fling curve physics to absolute (not scaled) curve. https://bugs.webkit.org/show_bug.cgi?id=83061 Reviewed by James Robinson. Revised existing unit tests. Use an absolute curve for touchpad fling. Here we identify the location on the curve corresponding to the initial fling velocity, and "jump in" at that point. Avoids issues around time/magnitude scaling present in previous implementation, and gives better feel to fling animation. * platform/TouchpadFlingPlatformGestureCurve.cpp: (WebCore): (WebCore::TouchpadFlingPlatformGestureCurve::create): (WebCore::position): (WebCore::velocity): (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve): (WebCore::TouchpadFlingPlatformGestureCurve::apply): * platform/TouchpadFlingPlatformGestureCurve.h: (TouchpadFlingPlatformGestureCurve): 2012-04-02 Zhenyao Mo Implement WebGLShaderPrecisionFormat https://bugs.webkit.org/show_bug.cgi?id=75925 Reviewed by Kenneth Russell. Test: fast/canvas/webgl/shader-precision-format.html * CMakeLists.txt: Add new source files webglshaderprecisionformat.h/idl * DerivedSources.make: Ditto. * DerivedSources.pri: Ditto. * GNUmakefile.list.am: Ditto. * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * html/canvas/WebGLRenderingContext.cpp: Add getShaderPrecisionFormat. (WebCore): (WebCore::WebGLRenderingContext::getShaderPrecisionFormat): * html/canvas/WebGLRenderingContext.h: Ditto. (WebCore): (WebGLRenderingContext): * html/canvas/WebGLRenderingContext.idl: Ditto. * html/canvas/WebGLShaderPrecisionFormat.h: Added. (WebCore): (WebGLShaderPrecisionFormat): (WebCore::WebGLShaderPrecisionFormat::create): (WebCore::WebGLShaderPrecisionFormat::rangeMin): (WebCore::WebGLShaderPrecisionFormat::rangeMax): (WebCore::WebGLShaderPrecisionFormat::precision): (WebCore::WebGLShaderPrecisionFormat::WebGLShaderPrecisionFormat): * html/canvas/WebGLShaderPrecisionFormat.idl: Added. * page/DOMWindow.idl: Expose new type WebGLShaderPrecisionFormat for instanceof. * platform/graphics/GraphicsContext3D.h: Add getShaderPrecisionFormat(). * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Ditto. (WebCore::GraphicsContext3D::getShaderPrecisionFormat): (WebCore): * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: Ditto. (WebCore::GraphicsContext3D::getShaderPrecisionFormat): (WebCore): * platform/graphics/qt/GraphicsContext3DQt.cpp: Ditto. (WebCore::GraphicsContext3D::getShaderPrecisionFormat): (WebCore): 2012-04-03 Zalan Bujtas Frame flattening: Do not restart layout from parent frame, when the parent is clean. https://bugs.webkit.org/show_bug.cgi?id=81114 Reviewed by Antti Koivisto. When frame flattening is on, child frames try to mark the ancestors dirty to be able to restart layout from the main frame. Child frames mark the anchestors in FrameView::scheduleRelayout(). Marking fails when scheduling is disabled, for example when the iframe's has blocking resource and the has not been injected into the document. When marking ancestor fails, child frame layout needs to continue normally. It is expected to have layouts, when scheduling is enabled. Test: http/tests/misc/iframe-flattening-3level-nesting-with-blocking-resource.html * page/FrameView.cpp: (WebCore::FrameView::layout): (WebCore::FrameView::isInChildFrameWithFrameFlattening): (WebCore): (WebCore::FrameView::doLayoutWithFrameFlattening): * page/FrameView.h: (FrameView): 2012-04-03 Simon Fraser Avoid virtual method calls in the GraphicsLayer destructor https://bugs.webkit.org/show_bug.cgi?id=83067 Reviewed by James Robinson. Code cleanup to avoid calling virtual methods in the GraphicsLayer destructor. Factor teardown code into a willBeDestroyed() method that is called from the most dervied class. willBeDestroyed() calls have to be chained. Fix the various ports' GraphicsLayer implementations. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::~GraphicsLayer): (WebCore): (WebCore::GraphicsLayer::willBeDestroyed): * platform/graphics/GraphicsLayer.h: (GraphicsLayer): * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp: (WebCore::GraphicsLayerBlackBerry::~GraphicsLayerBlackBerry): (WebCore): (WebCore::GraphicsLayerBlackBerry::willBeDestroyed): * platform/graphics/blackberry/GraphicsLayerBlackBerry.h: (GraphicsLayerBlackBerry): * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::~GraphicsLayerCA): (WebCore): (WebCore::GraphicsLayerCA::willBeDestroyed): * platform/graphics/ca/GraphicsLayerCA.h: (GraphicsLayerCA): * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium): (WebCore): (WebCore::GraphicsLayerChromium::willBeDestroyed): * platform/graphics/chromium/GraphicsLayerChromium.h: (GraphicsLayerChromium): * platform/graphics/clutter/GraphicsLayerClutter.cpp: (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter): * platform/graphics/efl/GraphicsLayerEfl.cpp: (WebCore::GraphicsLayerEfl::~GraphicsLayerEfl): * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQt::~GraphicsLayerQt): (WebCore): (WebCore::GraphicsLayerQt::willBeDestroyed): * platform/graphics/qt/GraphicsLayerQt.h: (GraphicsLayerQt): 2012-04-03 Daniel Cheng Having a drop handler prevents navigation on drop even if event is not cancelled https://bugs.webkit.org/show_bug.cgi?id=79172 Reviewed by Ryosuke Niwa. Only early return if the drop handler prevents the default action. http://trac.webkit.org/changeset/105396 introduced this issue when fixing some other aspects of DnD handling. Test: fast/events/drop-handler-should-not-stop-navigate.html * page/DragController.cpp: (WebCore::DragController::performDrag): (WebCore::DragController::concludeEditDrag): Remove the assert. By definition, we want to allow default actions to run now if they weren't explicitly canceled. 2012-04-03 Erik Arvidsson [v8] Fix memory leak in V8LazyEventListener https://bugs.webkit.org/show_bug.cgi?id=83057 Reviewed by Ojan Vafai. This also brings the V8 and JSC implementation closer. The timing when we first lookup the form element is now same in JSC and V8 (but different from Mozilla). This also clears the strings once the code has been parsed and the function created. Tests: fast/dom/inline-event-attributes-moved.html fast/dom/inline-event-attributes-release.html * bindings/v8/V8LazyEventListener.cpp: (WebCore::V8LazyEventListener::V8LazyEventListener): (WebCore::V8LazyEventListener::prepareListenerObject): * bindings/v8/V8LazyEventListener.h: (WebCore::V8LazyEventListener::create): (V8LazyEventListener): 2012-04-03 Michael Saboff Frequent crashes in JSC::parse in a worker thread when running regression tests https://bugs.webkit.org/show_bug.cgi?id=82660 Reviewed by Geoffrey Garen. Initialize m_script to empty string. Therefore if there isn't any script payload, the worker thread will see an empty string, not a null string. Re-enabling fast/workers/empty-worker-nocrash.html and fast/workers/shared-worker-constructor.html tests as part of this patch. * workers/WorkerScriptLoader.cpp: (WebCore::WorkerScriptLoader::WorkerScriptLoader): 2012-04-03 James Robinson [chromium] Enable sparkline FPS counter in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=82959 Reviewed by Adrienne Walker. This enables rendering the FPS counter sparkline when in threaded compositing mode. We don't currently have a way to draw text from the thread (since we can't interact with WebCore::Font objects from a non-main thread), but having a sparkline is still useful for judging framerate stability. There are no tests for the HUD since it's a developer-facing feature and not user-facing. * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): (WebCore): (WebCore::CCHeadsUpDisplay::~CCHeadsUpDisplay): (WebCore::CCHeadsUpDisplay::initializeFonts): (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawFPSCounter): (WebCore::CCHeadsUpDisplay::drawFPSCounterText): (WebCore::CCHeadsUpDisplay::drawPlatformLayerTree): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): 2012-04-02 Robert Hogan CSS 2.1 failure: at-import-009.htm fails https://bugs.webkit.org/show_bug.cgi?id=82921 Reviewed by Antti Koivisto. This fixes at-import-009.htm only, the other tests already passed. Tests: css2.1/20110323/at-import-001.htm css2.1/20110323/at-import-002.htm css2.1/20110323/at-import-003.htm css2.1/20110323/at-import-004.htm css2.1/20110323/at-import-005.htm css2.1/20110323/at-import-006.htm css2.1/20110323/at-import-007.htm css2.1/20110323/at-import-009.htm css2.1/20110323/at-import-010.htm css2.1/20110323/at-import-011.htm * css/CSSGrammar.y: ignore empty '@media;' and '@charset;' declarations 2012-04-03 Shawn Singh [chromium] remove dead function declarations in RenderSurfacechromium https://bugs.webkit.org/show_bug.cgi?id=82086 Reviewed by James Robinson. No tests needed, no change in behavior. * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): 2012-04-03 Jia Pu Rename GraphicsContext::drawLineForTextChecking() to GraphicsContext::drawLineForDocumentMarker() https://bugs.webkit.org/show_bug.cgi?id=82946 Reviewed by Enrica Casucci. On OS X, we draw similar underline on dictated text that has alternative text. We rename this function, so that we can reuse it for dictation underline. No new tests, since there's no change of functionality. * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/mac/GraphicsContextMac.mm: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::drawLineForDocumentMarker): * rendering/InlineTextBox.cpp: (WebCore::lineStyleForMarkerType): (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): 2012-04-03 Jer Noble ESC key in full screen does not result in webkitFullScreenChange event. https://bugs.webkit.org/show_bug.cgi?id=82755 Reviewed by Eric Carlson. * WebCore.exp.in: Export the WebCore::Document::webkitCancelFullScreen() symbol. 2012-04-03 Ryosuke Niwa REGRESSION(r80439): Crash in StylePropertySet::borderSpacingValue https://bugs.webkit.org/show_bug.cgi?id=83000 Reviewed by Andreas Kling. Fixed the crash by exiting early in StylePropertySet::borderSpacingValue when the vertical value is set. Test: fast/css/border-spacing-without-vertical-value.html * css/StylePropertySet.cpp: (WebCore::StylePropertySet::borderSpacingValue): 2012-04-03 Alexis Menard Unreviewed ASSERT fix on Chromium bots (in debug). It appears that http://trac.webkit.org/changeset/113031 caused ASSERT in CSSParser::parseFillProperty. I added the ASSERT to fix the compilation about values not handled in the switch. I supposed the callers were only property ids handled in the switch case. It wasn't the case, so I'm restoring the old behavior while keeping the code to compile (it still need a deeper investigation but let fix the bots quickly). * css/CSSParser.cpp: (WebCore::CSSParser::parseFillProperty): 2012-04-03 Alexis Menard [Part 3] We should use CSSPropertyID rather than integers when manipulating CSS property ids. https://bugs.webkit.org/show_bug.cgi?id=83032 Reviewed by Kentaro Hara. CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids as integers. While it's not incorrect it is nicer to use the enum as a parameter of functions manipulating property ids, as we ensure that the value passed will be an existing value. This patch clean up some remaining part of code. No new tests : There should be no behavior change in this patch. * bindings/js/JSCSSStyleDeclarationCustom.cpp: (CSSPropertyInfo): (WebCore::cssPropertyIDForJSCSSPropertyName): * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (CSSPropertyInfo): (WebCore::cssPropertyInfo): * css/CSSComputedStyleDeclaration.cpp: (WebCore::getPositionOffsetValue): (WebCore::counterToCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValidPrimitive): Remove the parameter's name from the h file as it doesn't follow the style and also because the name was simply wrong we don't expect a propId here but an indentifier. Make it clear in the cpp file too. * css/CSSParser.h: (CSSParser): * page/animation/AnimationBase.cpp: (WebCore::addPropertyWrapper): 2012-04-03 Andrey Kosyakov Web Inspector: remove unused references to TimelineCalculator https://bugs.webkit.org/show_bug.cgi?id=83025 Reviewed by Yury Semikhatsky. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._refreshRecords): (WebInspector.TimelinePanel.prototype._showPopover): (WebInspector.TimelineRecordListRow.prototype.update): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent): 2012-04-03 Mark Pilgrim Call incrementStatsCounter directly https://bugs.webkit.org/show_bug.cgi?id=83023 Reviewed by Kentaro Hara. * bindings/v8/V8Proxy.h: * platform/chromium/PlatformSupport.h: (PlatformSupport): 2012-04-03 Sami Kyostila [chromium] Canvas2DLayerChromium::updateCompositorResources should flush after copying https://bugs.webkit.org/show_bug.cgi?id=83013 Reviewed by Stephen White. We need to flush the GPU command queue after copying the canvas back buffer into the front buffer. Otherwise the copy might be delayed to a point where new contents have already been drawn into the back buffer, leading to flickering. Added test to Canvas2DLayerChromiumTest. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): 2012-04-03 Alexis Menard [Part 2] We should use CSSPropertyID rather than integers when manipulating CSS property ids. https://bugs.webkit.org/show_bug.cgi?id=82977 Reviewed by Andreas Kling. CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids as integers. While it's not incorrect it is nicer to use the enum as a parameter of functions manipulating property ids, as we ensure that the value passed will be an existing value. Almost everything has been changed with the exception of the Animation related classes which can be done in a following patch. No new tests : There should be no behavior change in this patch. * WebCore.exp.in: * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::cssText): (WebCore::CSSComputedStyleDeclaration::valueForShadow): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): (WebCore::logUnimplementedPropertyID): (WebCore::CSSComputedStyleDeclaration::getPropertyValue): (WebCore::CSSComputedStyleDeclaration::item): * css/CSSComputedStyleDeclaration.h: (CSSComputedStyleDeclaration): * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::isColorPropertyID): (WebCore::parseColorValue): (WebCore::isSimpleLengthPropertyID): (WebCore::parseSimpleLengthValue): (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::parseKeywordValue): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::addProperty): (WebCore::CSSParser::parseFillShorthand): (WebCore::CSSParser::parseShorthand): (WebCore::CSSParser::parse4Values): (WebCore::CSSParser::parsePage): (WebCore::CSSParser::parseSize): (WebCore::CSSParser::parseQuotes): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseFillSize): (WebCore::CSSParser::parseFillProperty): (WebCore::CSSParser::parseAnimationProperty): (WebCore::CSSParser::parseGridTrackList): (WebCore::CSSParser::parseDashboardRegions): (WebCore::CSSParser::parseClipShape): (WebCore::CSSParser::parseShadow): (WebCore::CSSParser::parseReflect): (WebCore::BorderImageParseContext::commitBorderImageProperty): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderRadius): (WebCore::CSSParser::parseCounter): (WebCore::CSSParser::parseFlowThread): (WebCore::CSSParser::parseRegionThread): (WebCore::CSSParser::parseTransformOrigin): (WebCore::CSSParser::parsePerspectiveOrigin): * css/CSSParser.h: (CSSParser): (WebCore::ShorthandScope::ShorthandScope): * css/CSSProperty.cpp: (WebCore::resolveToPhysicalProperty): (WebCore::CSSProperty::resolveDirectionAwareProperty): (WebCore::CSSProperty::isInheritedProperty): * css/CSSProperty.h: (WebCore::CSSProperty::CSSProperty): (CSSProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * css/CSSStyleSelector.h: (CSSStyleSelector): * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::setProperty): (WebCore::PropertySetCSSStyleDeclaration::removeProperty): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): * css/SVGCSSParser.cpp: (WebCore::CSSParser::parseSVGValue): * css/SVGCSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applySVGProperty): * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyCSSValue): (WebCore::StylePropertySet::removeShorthandProperty): (WebCore::StylePropertySet::removeProperty): (WebCore::StylePropertySet::setProperty): (WebCore::StylePropertySet::asText): (WebCore::StylePropertySet::findPropertyWithId): (WebCore::StylePropertySet::removeEquivalentProperties): * css/StylePropertySet.h: (StylePropertySet): * css/StylePropertyShorthand.cpp: (WebCore::shorthandForProperty): * css/StylePropertyShorthand.h: (WebCore): * dom/StyledElement.cpp: (WebCore::StyledElement::setInlineStyleProperty): (WebCore::StyledElement::removeInlineStyleProperty): (WebCore::StyledElement::addPropertyToAttributeStyle): * dom/StyledElement.h: (StyledElement): (WebCore::StyledElement::addPropertyToAttributeStyle): * editing/EditingStyle.cpp: (HTMLElementEquivalent): (WebCore::EditingStyle::EditingStyle): (WebCore::EditingStyle::setProperty): * editing/EditingStyle.h: (WebCore::EditingStyle::create): (EditingStyle): * editing/Editor.cpp: (WebCore::Editor::selectionStartHasStyle): (WebCore::Editor::selectionHasStyle): * editing/Editor.h: (Editor): * editing/EditorCommand.cpp: (WebCore::executeApplyStyle): (WebCore::executeToggleStyleInList): (WebCore::executeToggleStyle): (WebCore::executeApplyParagraphStyle): (WebCore::stateStyle): * editing/markup.cpp: (WebCore): (WebCore::propertyMissingOrEqualToNone): * html/HTMLElement.cpp: (WebCore::HTMLElement::addHTMLLengthToStyle): (WebCore::HTMLElement::addHTMLColorToStyle): * html/HTMLElement.h: (HTMLElement): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::styleWithProperties): * page/animation/AnimationBase.cpp: (WebCore::addShorthandProperties): * svg/SVGFontFaceElement.cpp: (WebCore::cssPropertyIdForSVGAttributeName): (WebCore::SVGFontFaceElement::parseAttribute): * svg/SVGStyledElement.cpp: (WebCore::mapAttributeToCSSProperty): (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName): (WebCore::SVGStyledElement::collectStyleForAttribute): (WebCore::SVGStyledElement::svgAttributeChanged): (WebCore::SVGStyledElement::getPresentationAttribute): * svg/SVGStyledElement.h: (WebCore): (SVGStyledElement): 2012-04-03 Levi Weintraub Revert RenderTheme paint and layout functions to ints https://bugs.webkit.org/show_bug.cgi?id=82196 Reviewed by Julien Chaffraix. When dealing with object that are rendered outside of WebCore, we do all necessary pixel snapping before passing coordinates to the external code. RenderTheme encompasses a set of objects whose rendering is influenced by the platform. This change reverts the interface between this platform code and WebCore to be integers. Some platforms, such as Mac, use sub-pixel units for layout and rendering, but it's still not desirable to pass sub-pixel values to these API's, because ultimately we'll render these objects at whole-pixel values to avoid anti-aliasing. Marking touched overridden virtual functions as OVERRIDE. There are many more to update. No new tests. No change in behavior. * platform/graphics/FractionalLayoutRect.h: (WebCore::FractionalLayoutRect::pixelSnappedLocation): Convenience function. (WebCore::FractionalLayoutRect::pixelSnappedSize): Ditto. (FractionalLayoutRect): * platform/graphics/IntRect.h: (WebCore::IntRect::pixelSnappedLocation): Temporary mirrors to the functions of the same name on FractionalLayoutRect. (WebCore::IntRect::pixelSnappedSize): Ditto. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Adding a local pixel snapped paint rect to avoid repeated pixel snapping. * rendering/RenderBox.h: (WebCore::RenderBox::absoluteContentBox): Reverting to integers since this represents on-screen coordinates (WebCore::RenderBox::pixelSnappedSize): Convenience method. * rendering/RenderMediaControls.cpp: (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): This static function is only called from RenderTheme platform code. Changing it to operate on pixel snapped values since we don't want to pipe LayoutUnits through that code. * rendering/RenderMeter.cpp: (WebCore::RenderMeter::computeLogicalWidth): Changing to feed pixel snapped values into the platform code to properly determine the resulting meter size. (WebCore::RenderMeter::computeLogicalHeight): Ditto. * rendering/RenderTheme.cpp: (WebCore::RenderTheme::paint): (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton): (WebCore::RenderTheme::adjustRepaintRect): (WebCore::RenderTheme::meterSizeForBounds): * rendering/RenderTheme.h: (RenderTheme): (WebCore::RenderTheme::paintCapsLockIndicator): * rendering/RenderThemeChromiumMac.h: (RenderThemeChromiumMac): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::convertToPaintingRect): (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration): (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton): * rendering/RenderThemeChromiumSkia.h: * rendering/RenderThemeMac.h: (RenderThemeMac): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustRepaintRect): (WebCore::RenderThemeMac::inflateRect): (WebCore::RenderThemeMac::convertToPaintingRect): (WebCore::RenderThemeMac::setControlSize): (WebCore::RenderThemeMac::paintCapsLockIndicator): (WebCore::RenderThemeMac::paintMenuList): (WebCore::RenderThemeMac::meterSizeForBounds): (WebCore::RenderThemeMac::setPopupButtonCellState): (WebCore::RenderThemeMac::paintSearchFieldCancelButton): (WebCore::RenderThemeMac::volumeSliderOffsetFromMuteButton): * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::volumeSliderOffsetFromMuteButton): * rendering/RenderThemeWin.h: (RenderThemeWin): 2012-03-29 Joseph Pecoraro and Jocelyn Turcotte Add a Generic WebSocket Server. https://bugs.webkit.org/show_bug.cgi?id=73093 Reviewed by Simon Hausmann. Allow SocketStreamHandle for the Qt port to take an existing QTcpSocket in its constructor. * platform/network/qt/SocketStreamHandle.h: (WebCore::SocketStreamHandle::create): (SocketStreamHandle): * platform/network/qt/SocketStreamHandlePrivate.h: (SocketStreamHandlePrivate): * platform/network/qt/SocketStreamHandleQt.cpp: (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate): (WebCore): (WebCore::SocketStreamHandlePrivate::initConnections): (WebCore::SocketStreamHandlePrivate::close): (WebCore::SocketStreamHandle::SocketStreamHandle): 2012-04-01 Jocelyn Turcotte Expose reusable WebSocket code for WebSocketServer. https://bugs.webkit.org/show_bug.cgi?id=73852 Reviewed by Kent Tamura. Keep the majority the web socket handshake HTTP request and response logic inside WebSocketHandshake and expose it through WebSocketFrame to make it available for the web socket server implementation. This also re-add the masking code that was removed in r111829 since it is needed for the server implementation. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/websockets/WebSocketChannel.cpp: (WebCore): (WebCore::WebSocketChannel::processFrame): now using WebSocketChannel::parseFrame. Extracted the !frame.masked check. (WebCore::WebSocketChannel::sendFrame): * Modules/websockets/WebSocketChannel.h: (WebSocketChannel): * Modules/websockets/WebSocketFrame.cpp: Added. (WebCore): (WebCore::WebSocketFrame::needsExtendedLengthField): (WebCore::WebSocketFrame::parseFrame): moved from WebSocketChannel::parseFrame. (WebCore::appendMaskedFramePayload): (WebCore::WebSocketFrame::makeFrameData): moved from makeFrameData in WebSocketChannel.cpp. (WebCore::WebSocketFrame::WebSocketFrame): moved from the header. * Modules/websockets/WebSocketFrame.h: (WebSocketFrame): * Modules/websockets/WebSocketHandshake.cpp: (WebCore::WebSocketHandshake::getExpectedWebSocketAccept): expose this object-static function. * Modules/websockets/WebSocketHandshake.h: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: 2012-03-29 Joseph Pecoraro and Jocelyn Turcotte Add Generic HTTP Request Class. Generalized HTTP Parsing. https://bugs.webkit.org/show_bug.cgi?id=73092 Reviewed by Simon Hausmann. A WebSocket server will need to read HTTP Requests before upgrading to WebSocket framing. This patch creates a cross-platform HTTPRequest class. Since some of this was already done in WebSocket code: - the header parsing code was extracted and put into HTTPParsers.cpp - WebSocketHandshakeRequest subclasses HTTPRequest - WebSocket code was refactored for these changes Refactoring is covered by existing http/tests/websocket tests. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::didOpenSocketStream): Extract the HTTP Header parsing out of WebSocketHandshake and put it into HTTP Parsers. Now make use of the generic parsing. * Modules/websockets/WebSocketHandshake.cpp: (WebCore): (WebCore::trimInputSample): (WebCore::WebSocketHandshake::clientHandshakeRequest): switch to RefCounted HandshakeRequest. (WebCore::WebSocketHandshake::readStatusLine): (WebCore::WebSocketHandshake::readHTTPHeaders): use generic HTTPParsers parsing. * Modules/websockets/WebSocketHandshake.h: switch to RefCounted HandshakeRequest. WebSocketHandshakeRequest is a specialization of an HTTPRequest. Much of its original code was abstracted into HTTPRequest, and this is now a subclass with WebSocket key information. * Modules/websockets/WebSocketHandshakeRequest.cpp: (WebCore::WebSocketHandshakeRequest::WebSocketHandshakeRequest): initialize now calls super. * Modules/websockets/WebSocketHandshakeRequest.h: (WebCore::WebSocketHandshakeRequest::create): switch to being ref counted like HTTPRequest. (WebSocketHandshakeRequest): * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Add generic HTTP Request parsing functions to HTTPParsers.cpp. Use out parameters to get values after parsing. * platform/network/HTTPParsers.cpp: (WebCore): (WebCore::trimInputSample): taken from WebSocket parsing. (WebCore::parseHTTPRequestLine): new code, parse a request line. (WebCore::parseHTTPHeaders): taken from previous WebSocket parsing. Algorithm unchanged. (WebCore::parseHTTPRequestBody): new code, just copy the date into the provided buffer. * platform/network/HTTPParsers.h: (WebCore): This adds a general HTTPRequest class. Accessors for the request method, url, httpVersion, headers, and data. You can create an HTTPRequest using the constructor, or parse one from a data buffer, such as one read from a socket. * platform/network/HTTPRequest.cpp: Added. (WebCore): (WebCore::HTTPRequest::parseHTTPRequestFromBuffer): create an HTTPRequest by parsing data in a buffer. (WebCore::HTTPRequest::parseRequestLine): helper to initialize members while parsing. (WebCore::HTTPRequest::parseHeaders): helper to initialize members while parsing. (WebCore::HTTPRequest::parseRequestBody): helper to initialize members while parsing. (WebCore::HTTPRequest::HTTPRequest): (WebCore::HTTPRequest::~HTTPRequest): * platform/network/HTTPRequest.h: Added. (WebCore): (HTTPRequest): (WebCore::HTTPRequest::create): create an empty request, or specify details. (WebCore::HTTPRequest::requestMethod): (WebCore::HTTPRequest::setRequestMethod): (WebCore::HTTPRequest::url): (WebCore::HTTPRequest::setURL): (WebCore::HTTPRequest::body): (WebCore::HTTPRequest::headerFields): (WebCore::HTTPRequest::addHeaderField): 2012-04-03 Jocelyn Turcotte [Qt] Add a missing inspector front-end image to resources. Reviewed by Simon Hausmann. * inspector/front-end/WebKit.qrc: 2012-04-03 Dominik Röttsches Soup HTTP backend does not send Content-Length in certain cases https://bugs.webkit.org/show_bug.cgi?id=82036 Reviewed by Gustavo Noronha Silva. Telling soup explicitly when to send content-length header in POST & PUT cases in order to align with e.g. Chromium and FF. No new tests, already covered by *methods*.html in http/tests/xmlhttprequest/. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::startHTTPRequest): Special handling for POST & PUT. 2012-04-03 Eric Seidel Simplify CSSStyleSelector constructor through the use of a helper function https://bugs.webkit.org/show_bug.cgi?id=82940 Reviewed by Andreas Kling. No behavior change, thus no tests. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore): (WebCore::CSSStyleSelector::addAuthorRulesAndCollectUserRulesFromSheets): * css/CSSStyleSelector.h: (CSSStyleSelector): 2012-04-03 Yury Semikhatsky Web Inspector: Database::Database::id field in the protocol should have type integer not string https://bugs.webkit.org/show_bug.cgi?id=83003 Reviewed by Pavel Feldman. Changed DOM storage and database identifier type from int to String. This is aligned with other domains and gives us more flexibility. * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::databaseId): (WebCore::JSInjectedScriptHost::storageId): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::databaseIdCallback): (WebCore::V8InjectedScriptHost::storageIdCallback): * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::databaseIdImpl): (WebCore::InjectedScriptHost::storageIdImpl): * inspector/InjectedScriptHost.h: (InjectedScriptHost): * inspector/InjectedScriptHost.idl: * inspector/Inspector.json: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries): (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): (WebCore::InspectorDOMStorageAgent::storageId): (WebCore::InspectorDOMStorageAgent::getDOMStorageResourceForId): * inspector/InspectorDOMStorageAgent.h: (InspectorDOMStorageAgent): * inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource): (WebCore::InspectorDOMStorageResource::bind): * inspector/InspectorDOMStorageResource.h: (WebCore::InspectorDOMStorageResource::id): (InspectorDOMStorageResource): * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::getDatabaseTableNames): (WebCore::InspectorDatabaseAgent::executeSQL): (WebCore::InspectorDatabaseAgent::databaseId): (WebCore::InspectorDatabaseAgent::databaseForId): * inspector/InspectorDatabaseAgent.h: (InspectorDatabaseAgent): * inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::InspectorDatabaseResource): (WebCore::InspectorDatabaseResource::bind): * inspector/InspectorDatabaseResource.h: (WebCore::InspectorDatabaseResource::id): (InspectorDatabaseResource): 2012-04-03 Nikolas Zimmermann Enable animVal support for SVGAnimatedEnumeration https://bugs.webkit.org/show_bug.cgi?id=82459 Rubber-stamped by Zoltan Herczeg. Make highestEnumValue() return an unsigned to avoid casting in SVGAnimatedEnumerationPropertyTearOff. Fixes the last chromium build failure on the debug carnary bots. * svg/SVGComponentTransferFunctionElement.h: * svg/SVGFEBlendElement.h: * svg/SVGFEColorMatrixElement.h: * svg/SVGFECompositeElement.h: * svg/SVGFEConvolveMatrixElement.h: * svg/SVGFEDisplacementMapElement.h: * svg/SVGFEMorphologyElement.h: * svg/SVGFETurbulenceElement.h: * svg/SVGGradientElement.h: * svg/SVGMarkerElement.h: * svg/SVGTextContentElement.h: * svg/SVGTextPathElement.h: * svg/SVGUnitTypes.h: * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal): 2012-04-01 Nikolas Zimmermann Animate animatedPoints instead of points for SVGPoly*Elements https://bugs.webkit.org/show_bug.cgi?id=82844 Reviewed by Dirk Schulze. When the points attribute of a SVGPoly*Element is animated, we should animate the 'animatedPoints' SVG DOM property, not the 'points' property, which corresponds to the "baseVal". Fix that, now only the 'd' attribute for SVGPathElement is incorrect, everything else is moved to the new animVal concept! * svg/SVGAnimatedPointList.cpp: (WebCore::SVGAnimatedPointListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedPointListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedPointListAnimator::animValWillChange): (WebCore::SVGAnimatedPointListAnimator::animValDidChange): * svg/SVGAnimatedPointList.h: (SVGAnimatedPointListAnimator): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): (WebCore::SVGAnimatedType::supportsAnimVal): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::parseAttribute): (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper): (WebCore::SVGPolyElement::points): (WebCore::SVGPolyElement::animatedPoints): 2012-04-03 Nikolas Zimmermann Not reviewed. Next chromium build fix, this time for real :-) * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal): Cast highestEnumValue to unsigned. 2012-04-03 Nikolas Zimmermann Not reviewed. Attempt to fix chromium build. * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Unsigned is always >= 0 - only check if its 0 here. (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal): 2012-04-03 Alexander Pavlov Unreviewed, rolling out r112954 and r112969. http://trac.webkit.org/changeset/112954 http://trac.webkit.org/changeset/112969 https://bugs.webkit.org/show_bug.cgi?id=79172 Hits "ASSERTION FAILED: !m_isHandlingDrag" in DnD-related tests on Debug bots * page/DragController.cpp: (WebCore::DragController::performDrag): 2012-04-03 Nikolas Zimmermann Enable animVal support for SVGAnimatedEnumeration https://bugs.webkit.org/show_bug.cgi?id=82459 Reviewed by Dirk Schulze. Enable animVal support for the last missing SVG DOM primitive: SVGAnimatedEnumeration. It's a bit more involved than the others as we have to differentiate between the various enumerations to use the correct SVGPropertyTraits::fromString() code-path. One SVGAnimatedEnumeration property in the SVG DOM is special: SVGAnimatedEnumeration orientType from SVGMarkerElement. SVGMarkerElement exposes both the orientType and SVGAnimatedAngle orientAngle SVG DOM properties and both get mapped to the same SVGNames::orientAttr ("orient" XML attribute). That means that any animation of the orientAttr has to update both orientType & orientAngle. This is a not a new requirement, we already support attributes like 'stdDeviation' from SVGFEGaussianBlurElement, which get mapped to multiple SVG DOM objects: SVGAnimatedInteger stdDeviationX/Y. The difference is that or animations use the same type in the pair (eg. both int, or both float). The 'orient' attribute needs to be mapped to pair types. Generalize the templates in SVGAnimatedTypeAnimator to support that. Example: at 0s: someMarkerElement.orientType.animVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE someMarkerElement.orientAngle.animVal.value = 45 someMarkerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE someMarkerElement.orientAngle.baseVal.value = 45 at 1s: someMarkerElement.orientType.animVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE someMarkerElement.orientAngle.animVal.value = 90 someMarkerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE someMarkerElement.orientAngle.baseVal.value = 45 at 2s: someMarkerElement.orientType.animVal = SVGMarkerElement.SVG_MARKER_ORIENT_AUTO someMarkerElement.orientAngle.animVal.value = 0 someMarkerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE someMarkerElement.orientAngle.baseVal.value = 45 > 3s: someMarkerElement.orientType.animVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE someMarkerElement.orientAngle.animVal.value = 45 someMarkerElement.orientType.baseVal = SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE someMarkerElement.orientAngle.baseVal.value = 45 We need to map the 'orient' attribute to a pair type, in order to track both orientAngle & orientType at the same type. Fortunately SVGAnimatedAngle is only used in the SVG DOM for SVGMarkerElements orientAngle property. We can directly switch SVGAnimatedAngleAnimator to the new pair type instead of having to introduce a special SVGAnimatedAngleAndEnumerationAnimator. Added tests for all SVGAnimatedEnumeration properties in the SVG DOM, including an extensive set of tests for the synchronization of the orientType / orientAngle properties, when they get animated. Tests: svg/animations/animate-marker-orient-from-angle-to-angle.html svg/animations/animate-marker-orient-from-angle-to-auto.html svg/animations/animate-marker-orient-to-angle.html svg/animations/svgenum-animation-1.html svg/animations/svgenum-animation-10.html svg/animations/svgenum-animation-11.html svg/animations/svgenum-animation-12.html svg/animations/svgenum-animation-13.html svg/animations/svgenum-animation-2.html svg/animations/svgenum-animation-3.html svg/animations/svgenum-animation-4.html svg/animations/svgenum-animation-5.html svg/animations/svgenum-animation-6.html svg/animations/svgenum-animation-7.html svg/animations/svgenum-animation-8.html svg/animations/svgenum-animation-9.html * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * svg/SVGAllInOne.cpp: * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::determineAnimatedPropertyType): (WebCore::SVGAnimateElement::calculateAnimatedValue): (WebCore::propertyTypesAreConsistent): (WebCore::SVGAnimateElement::applyResultsToTarget): * svg/SVGAnimatedAngle.cpp: (WebCore::SVGAnimatedAngleAnimator::constructFromString): (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation): (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedAngleAnimator::animValWillChange): (WebCore::SVGAnimatedAngleAnimator::animValDidChange): (WebCore::SVGAnimatedAngleAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue): * svg/SVGAnimatedAngle.h: (WebCore): * svg/SVGAnimatedBoolean.cpp: (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation): (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedEnumeration.cpp: Added. (WebCore): (WebCore::enumerationValueForTargetAttribute): (WebCore::SVGAnimatedEnumerationAnimator::SVGAnimatedEnumerationAnimator): (WebCore::SVGAnimatedEnumerationAnimator::constructFromString): (WebCore::SVGAnimatedEnumerationAnimator::startAnimValAnimation): (WebCore::SVGAnimatedEnumerationAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedEnumerationAnimator::animValWillChange): (WebCore::SVGAnimatedEnumerationAnimator::animValDidChange): (WebCore::SVGAnimatedEnumerationAnimator::calculateFromAndToValues): (WebCore::SVGAnimatedEnumerationAnimator::calculateFromAndByValues): (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue): (WebCore::SVGAnimatedEnumerationAnimator::calculateDistance): * svg/SVGAnimatedEnumeration.h: (SVGAnimatedEnumerationAnimator): (WebCore::SVGAnimatedEnumerationAnimator::~SVGAnimatedEnumerationAnimator): (WebCore): * svg/SVGAnimatedInteger.cpp: (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation): (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedIntegerOptionalInteger.cpp: (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange): (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange): * svg/SVGAnimatedLength.cpp: (WebCore::SVGAnimatedLengthAnimator::startAnimValAnimation): (WebCore::SVGAnimatedLengthAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedLengthList.cpp: (WebCore::SVGAnimatedLengthListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedLengthListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedNumber.cpp: (WebCore::SVGAnimatedNumberAnimator::startAnimValAnimation): (WebCore::SVGAnimatedNumberAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedNumberList.cpp: (WebCore::SVGAnimatedNumberListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedNumberListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedNumberOptionalNumber.cpp: (WebCore::SVGAnimatedNumberOptionalNumberAnimator::startAnimValAnimation): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValWillChange): (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValDidChange): * svg/SVGAnimatedPreserveAspectRatio.cpp: (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedRect.cpp: (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation): (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedString.cpp: (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation): (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedTransformList.cpp: (WebCore::SVGAnimatedTransformListAnimator::startAnimValAnimation): (WebCore::SVGAnimatedTransformListAnimator::stopAnimValAnimation): (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal): * svg/SVGAnimatedType.cpp: (WebCore::SVGAnimatedType::~SVGAnimatedType): (WebCore::SVGAnimatedType::createAngleAndEnumeration): (WebCore::SVGAnimatedType::createEnumeration): (WebCore): (WebCore::SVGAnimatedType::angleAndEnumeration): (WebCore::SVGAnimatedType::enumeration): (WebCore::SVGAnimatedType::valueAsString): (WebCore::SVGAnimatedType::setValueAsString): (WebCore::SVGAnimatedType::supportsAnimVal): * svg/SVGAnimatedType.h: (SVGAnimatedType): * svg/SVGAnimatedTypeAnimator.h: (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName): (SVGAnimatedTypeAnimator): (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue): (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue): (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForType): (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForType): (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForType): (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues): (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForTypes): (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForTypes): (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForTypes): (WebCore::SVGAnimatedTypeAnimator::castAnimatedPropertyToActualType): (WebCore::SVGAnimatedTypeAnimator::executeAction): * svg/SVGAnimatorFactory.h: (WebCore::SVGAnimatorFactory::create): * svg/SVGMarkerElement.cpp: (WebCore): * svg/properties/SVGAnimatedListPropertyTearOff.h: (SVGAnimatedListPropertyTearOff): * svg/properties/SVGAnimatedPropertyTearOff.h: (SVGAnimatedPropertyTearOff): * svg/properties/SVGAnimatedStaticPropertyTearOff.h: (SVGAnimatedStaticPropertyTearOff): 2012-04-03 Sheriff Bot Unreviewed, rolling out r112987 and r112993. http://trac.webkit.org/changeset/112987 http://trac.webkit.org/changeset/112993 https://bugs.webkit.org/show_bug.cgi?id=83010 hits ASSERTs in Debug builds (Requested by philn-tp on #webkit). * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::initSecurityContext): * dom/Document.h: (Document): * html/HTMLAttributeNames.in: * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseAttribute): (WebCore::HTMLFrameElementBase::location): * html/HTMLIFrameElement.idl: * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::defaultForInitial): * loader/FrameLoader.cpp: (WebCore::FrameLoader::urlSelected): (WebCore::FrameLoader::submitForm): (WebCore::FrameLoader::outgoingReferrer): (WebCore::FrameLoader::loadFrameRequest): (WebCore::FrameLoader::load): (WebCore::FrameLoader::loadWithNavigationAction): (WebCore::FrameLoader::reloadWithOverrideEncoding): (WebCore::FrameLoader::reload): (WebCore::FrameLoader::loadResourceSynchronously): * loader/FrameLoader.h: (FrameLoader): 2012-04-03 Bill Budge REGRESSION (r112217): H&R Block tax site won't load https://bugs.webkit.org/show_bug.cgi?id=82964 Modifies the redirect checking code to first check if the security origin can request the redirect URL before invoking the CORS check. Reviewed by Adam Barth. http/tests/xmlhttprequest/access-control-and-redirects-async.html * loader/DocumentThreadableLoader.cpp: * loader/DocumentThreadableLoader.h: 2012-04-03 Sheriff Bot Unreviewed, rolling out r112994. http://trac.webkit.org/changeset/112994 https://bugs.webkit.org/show_bug.cgi?id=83008 This patch has to wait until v8 roll. (Requested by loislo on #webkit). * bindings/js/ScriptHeapSnapshot.h: * bindings/v8/ScriptHeapSnapshot.cpp: (WebCore): * bindings/v8/ScriptHeapSnapshot.h: (WebCore): (ScriptHeapSnapshot): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::createSnapshotHeader): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotConstructorsDataGrid): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.populateChildren): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged.firstSnapshotLoaded): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged.secondSnapshotLoaded): (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged): (WebInspector.DetailedHeapshotView.prototype._changeFilter): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype.get maxNodeId): (WebInspector.HeapSnapshot.prototype.updateStaticData): * inspector/front-end/HeapSnapshotProxy.js: (WebInspector.HeapSnapshotProxy.prototype.get maxNodeId): 2012-03-28 Ilya Tikhonovsky Web Inspector: use maxJSObjectId that is provided by back-end. https://bugs.webkit.org/show_bug.cgi?id=82451 Summary view can filter objects in snapshot. It uses maxJSObjectId for this. There was no such field in the profile header at the moment but I've landed a patch in downstream. Reviewed by Yury Semikhatsky. * bindings/v8/ScriptHeapSnapshot.cpp: (WebCore::ScriptHeapSnapshot::maxSnapshotJSObjectId): (WebCore): * bindings/v8/ScriptHeapSnapshot.h: (WebCore): (ScriptHeapSnapshot): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::createSnapshotHeader): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._filterSelectIndexChanged): (WebInspector.DetailedHeapshotView.prototype._changeFilter): * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype.updateStaticData): * inspector/front-end/HeapSnapshotProxy.js: 2012-04-02 Pavel Feldman Web Inspector: "Pause on start" doesn't change checked state in workers panel https://bugs.webkit.org/show_bug.cgi?id=82908 Reviewed by Yury Semikhatsky. This change partially reverts logic that was introduced with r111551: preventDefault was called beside each stopPropagation. As a result, default checkbox handler was not working. Event.prototype.consume now receives preventDefault parameter that controls whether default action should be prevented. * inspector/front-end/AdvancedSearchController.js: (WebInspector.SearchView.prototype._onKeyDown): * inspector/front-end/CSSSelectorProfileView.js: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._enterKeyPressed): (WebInspector.ConsoleGroup.prototype._titleClicked): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._keyDown): * inspector/front-end/DatabaseQueryView.js: (WebInspector.DatabaseQueryView.prototype._enterKeyPressed): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid): (WebInspector.DetailedHeapshotView.prototype._retainersHeaderDragging): * inspector/front-end/Dialog.js: (WebInspector.Dialog.prototype._onKeyDown): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype._statusBarDragging): * inspector/front-end/Object.js: (WebInspector.Event.prototype.consume): * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype._promptKeyDown): * inspector/front-end/ProfileView.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype._onKeyDown): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu.prototype.show): (.WebInspector.SoftContextMenu.prototype._menuItemMouseDown): (.WebInspector.SoftContextMenu.prototype._menuKeyDown): (.WebInspector.SoftContextMenu.prototype._discardMenu): * inspector/front-end/Spectrum.js: (WebInspector.Spectrum.draggable.consume): (WebInspector.Spectrum.prototype._onKeyDown): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.muteEventListener): (WebInspector.StylesSidebarPane): (WebInspector.StylePropertiesSection.prototype._handleSelectorClick): (WebInspector.StylePropertyTreeElement.prototype.updateTitle.): (WebInspector.StylePropertyTreeElement.prototype): * inspector/front-end/TextPrompt.js: (WebInspector.TextPrompt.prototype.onKeyDown): (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler): (WebInspector.TextPrompt.SuggestBox.prototype._onItemMouseDown): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._handleKeyDown): * inspector/front-end/UIUtils.js: (WebInspector.startEditing): * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): * inspector/front-end/treeoutline.js: (TreeOutline.prototype._treeKeyPress): (TreeOutline.prototype._treeKeyDown): (TreeOutline.prototype._searchInputKeyDown): (TreeElement.prototype.selectOnMouseDown): * inspector/front-end/utilities.js: (Event.prototype.consume): 2012-04-02 Chris Fleizach AX: search field on Google.com does not have the AXSearchField subrole https://bugs.webkit.org/show_bug.cgi?id=82819 Reviewed by Darin Adler. Detect search fields when possible for accessibility. Test: platform/mac/accessibility/search-subrole.html * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isSearchField): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isSearchField): (WebCore): * accessibility/AccessibilityRenderObject.h: (AccessibilityRenderObject): * accessibility/mac/WebAccessibilityObjectWrapper.mm: (-[WebAccessibilityObjectWrapper subrole]): 2012-04-02 Kent Tamura Introduce another file-to-array script https://bugs.webkit.org/show_bug.cgi?id=83001 Reviewed by Kentaro Hara. make-file-arrays.py is a script to convert a binary file to a C++ char array. The differences from css/make-css-file-arrays.pl and inspector/xxd.pl are: - No whitespace stripping for CSS files - We can make conditional arrays. e.g. An array enclosed with #if ENABLE(...) - #endif. This script will be used to implement a calendar picker for . * make-file-arrays.py: Added. 2012-04-02 Adam Barth Implement