2013-03-22 Alexey Proskuryakov Split ResourceHandleMac into multiple files https://bugs.webkit.org/show_bug.cgi?id=113100 Reviewed by Geoff Garen. It's grown too big to navigate, and I'm going to make WebCoreResourceHandleAsDelegate substantially more complicated yet. 1. Mechanically moved WebCoreResourceHandleAsDelegate into separate files. 2. Refactored WebCoreSynchronousLoaderClient to be cross-platform, and moved it into separate files. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * platform/network/SynchronousLoaderClient.cpp: Added. * platform/network/SynchronousLoaderClient.h: Added. * platform/network/cf/ResourceHandleCFNet.cpp: * platform/network/mac/SynchronousLoaderClient.mm: Added. * platform/network/mac/WebCoreResourceHandleAsDelegate.h: Added. * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Added. 2013-03-21 Geoffrey Garen Added a setting for whether JavaScript markup is enabled https://bugs.webkit.org/show_bug.cgi?id=112999 Reviewed by Maciej Stachowiak. This setting is useful for clients that want protection from script injection attacks. * page/Settings.h: (Settings): Clarified which clients should call canExecuteScripts(). * page/Settings.in: Added the new setting. 2013-03-22 Roger Fong Unreviewed build fix. * bindings/scripts/preprocessor.pm: (applyPreprocessor): 2013-03-22 Roger Fong Unreviewed. Force kill gcc-3.exe during bindings generation tests to avoid process hangs. This problem is occuring on the WinEWS bots where there are somehow multiple gcc-3 processes existing at the same time. This is a speculative fix. There should only be 1 gcc-3.exe process running at a time ever. * bindings/scripts/preprocessor.pm: (applyPreprocessor): 2013-03-22 Eric Carlson Cleanup text track selection logic https://bugs.webkit.org/show_bug.cgi?id=113062 Reviewed by Jer Noble. No new tests, covered by existing tests. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Remove. (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't look at track attributes directly, use captionPreferences->textTrackSelectionScore to calculate track rank. (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_processingPreferenceChange here instead of in captionPreferencesChanged. (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't suppress calls to setClosedCaptionsVisible, existing code already makes sure we don't do unnecessary work. * html/HTMLMediaElement.h: * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Drive by cleanup, don't process inactive cues. * html/shadow/MediaControlsApple.cpp: (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): Call resetTrackListMenu instead of updateDisplay so we only mark the menu as needing a recalculation and do the work when it is displayed. * page/CaptionUserPreferences.cpp: (WebCore::CaptionUserPreferences::shouldShowCaptions): When in testing mode, return true if the caption or subtitle preference has been set. (WebCore::CaptionUserPreferences::setShouldShowCaptions): In testing mode, clear the caption and subtitle preference when passed false. (WebCore::CaptionUserPreferences::textTrackSelectionScore): Calculate the track score based on track type preference and preferred language. (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Score a track according to the language presence and position in the preferred languages list. * page/CaptionUserPreferences.h: * page/CaptionUserPreferencesMac.h: * page/CaptionUserPreferencesMac.mm: (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate track language score according to user preferences. * platform/Language.cpp: (WebCore::indexOfBestMatchingLanguageInList): Repurposed the static bestMatchingLanguage function to return the location of a language in a Vector. (WebCore::preferredLanguageFromList): Removed. * platform/Language.h: 2013-03-22 ChangSeok Oh Build fix for TransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=113087 Reviewed by Martin Robinson. This is a trivial build fix for clutter ac backend. Clutter AC backend doesn't use TextureMapper so there is nowhere including TransformationMatrix.h. For the reason, we include it explicitly. No new tests because of no functionality change. * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: * platform/graphics/clutter/GraphicsContext3DPrivate.h: (WebCore): 2013-03-22 Steve Block Coordinates.idl lacks Conditional=GEOLOCATION https://bugs.webkit.org/show_bug.cgi?id=112949 Reviewed by Steve Block. No new tests, build optimization only. * page/Coordinates.idl: Added GEOLOCATION conditional guard. 2013-03-22 Daniel Cheng Data store should be readable in dragstart/copy/cut events https://bugs.webkit.org/show_bug.cgi?id=23695 Reviewed by Tony Chang. There were several events where data could be written but not read back due to the fact that different Clipboard method implementations checked permissions inconsistently. This patch adds helper methods to check if an operation is permitted on a Clipboard and refactors all direct comparisons against Clipboard::m_policy to use the new helpers instead. This fixes several bugs where Clipboard::types and Clipboard::getData are not usable inside the aforementioned events. Tests: editing/pasteboard/can-read-in-copy-and-cut-events.html editing/pasteboard/can-read-in-dragstart-event.html * dom/Clipboard.cpp: (WebCore::Clipboard::canReadTypes): Formerly restricted to ClipboardReadable and ClipboardTypesReadable; now allows ClipboardWritable as well. (WebCore::Clipboard::canReadData): Formerly restricted to ClipboardReadable; now allows ClipboardWritable as well. (WebCore::Clipboard::canWriteData): (WebCore::Clipboard::canSetDragImage): (WebCore::Clipboard::hasFileOfType): (WebCore::Clipboard::hasStringOfType): (WebCore::Clipboard::setDropEffect): (WebCore::Clipboard::setEffectAllowed): * dom/Clipboard.h: (Clipboard): * platform/blackberry/ClipboardBlackBerry.cpp: (WebCore::ClipboardBlackBerry::clearData): (WebCore::ClipboardBlackBerry::clearAllData): (WebCore::ClipboardBlackBerry::getData): (WebCore::ClipboardBlackBerry::setData): (WebCore::ClipboardBlackBerry::types): * platform/chromium/ClipboardChromium.cpp: (WebCore::DataTransferItemPolicyWrapper::kind): (WebCore::DataTransferItemPolicyWrapper::type): (WebCore::DataTransferItemPolicyWrapper::getAsString): (WebCore::DataTransferItemPolicyWrapper::getAsFile): (WebCore::ClipboardChromium::clearData): (WebCore::ClipboardChromium::clearAllData): (WebCore::ClipboardChromium::getData): (WebCore::ClipboardChromium::setData): (WebCore::ClipboardChromium::types): (WebCore::ClipboardChromium::files): (WebCore::ClipboardChromium::setDragImage): * platform/gtk/ClipboardGtk.cpp: (WebCore::ClipboardGtk::clearData): (WebCore::ClipboardGtk::clearAllData): (WebCore::ClipboardGtk::getData): (WebCore::ClipboardGtk::setData): (WebCore::ClipboardGtk::types): (WebCore::ClipboardGtk::files): (WebCore::ClipboardGtk::setDragImage): * platform/mac/ClipboardMac.mm: (WebCore::ClipboardMac::clearData): (WebCore::ClipboardMac::clearAllData): (WebCore::ClipboardMac::getData): (WebCore::ClipboardMac::setData): (WebCore::ClipboardMac::types): (WebCore::ClipboardMac::files): (WebCore::ClipboardMac::setDragImage): * platform/qt/ClipboardQt.cpp: (WebCore::ClipboardQt::clearData): (WebCore::ClipboardQt::clearAllData): (WebCore::ClipboardQt::getData): (WebCore::ClipboardQt::setData): (WebCore::ClipboardQt::types): (WebCore::ClipboardQt::files): (WebCore::ClipboardQt::setDragImage): (WebCore::ClipboardQt::items): * platform/qt/DataTransferItemListQt.cpp: (WebCore::DataTransferItemListQt::length): (WebCore::DataTransferItemListQt::item): (WebCore::DataTransferItemListQt::deleteItem): (WebCore::DataTransferItemListQt::clear): (WebCore::DataTransferItemListQt::add): * platform/qt/DataTransferItemQt.cpp: (WebCore::DataTransferItemQt::getAsString): * platform/win/ClipboardWin.cpp: (WebCore::ClipboardWin::clearData): (WebCore::ClipboardWin::clearAllData): (WebCore::ClipboardWin::getData): (WebCore::ClipboardWin::setData): (WebCore::ClipboardWin::types): (WebCore::ClipboardWin::files): (WebCore::ClipboardWin::setDragImage): 2013-03-22 Andrei Bucur [CSS Regions] Remove pushLayoutState(RenderFlowThread*) from RenderView https://bugs.webkit.org/show_bug.cgi?id=113084 Reviewed by Dirk Schulze. Remove void pushLayoutState(RenderFlowThread*, bool regionsChanged) from RenderView.h because it's not used. Tests: Code cleanup. No tests needed. * rendering/RenderView.h: (RenderView): 2013-03-22 Kondapally Kalyan [EFL] Fix build issues to enable CSS Filter and Shaders support. https://bugs.webkit.org/show_bug.cgi?id=111274 Reviewed by Noam Rosenthal. This is in preperation to enable CSS Filter and Shaders support. This patch fixes related build issues to enable the support. * platform/graphics/surfaces/efl/GLTransportSurface.cpp: * platform/graphics/texmap/TextureMapper.cpp: * platform/graphics/texmap/TextureMapper.h: (WebCore): * platform/graphics/texmap/TextureMapperGL.cpp: * platform/graphics/texmap/TextureMapperGL.h: (WebCore): * platform/graphics/texmap/TextureMapperShaderProgram.h: 2013-03-22 Matt Falkenhagen Implement isEnabledFormControl() for SliderThumbElement and SpinButtonElement in terms of disabled() https://bugs.webkit.org/show_bug.cgi?id=112993 Reviewed by Kent Tamura. This is an intermediate step for refactoring Node::disabled and Element::isEnabledFormControl. All classes that override isEnabledFormControl just return !disabled(), except for SliderThumbElement and SpinButtonElement. This patch changes those two classes to do so, which shows that the two functions are redundant and easy to refactor into a single function in a subsequent patch. No new tests, there should be no behavior change. * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::disabled): (WebCore): (WebCore::SliderThumbElement::isEnabledFormControl): * html/shadow/SliderThumbElement.h: (SliderThumbElement): * html/shadow/SpinButtonElement.h: The check of shadowHost() is necessary because it can be detached by JavaScript that runs during event handling (see r76566) 2013-03-22 Allan Sandfeld Jensen [Qt] New fast/text/word-space-with-kerning-3.html fails on Qt. https://bugs.webkit.org/show_bug.cgi?id=112668 Reviewed by Jocelyn Turcotte. Qt adds word-spacing to leading spaces, but WebCore only expects us to add for trailing spaces. We only corrected for this in width calculation but do need to also do it for drawing. Instead of subtracting the extra word-spacing we now configure the FormatRange not to apply to leading spaces. This means this behavior will be applied everywhere reliably. * platform/graphics/Font.h: (Font): * platform/graphics/qt/FontQt.cpp: (WebCore::Font::drawComplexText): (WebCore::Font::floatWidthForComplexText): (WebCore::Font::offsetForPositionForComplexText): (WebCore::Font::selectionRectForComplexText): (WebCore::Font::initFormatForTextLayout): 2013-03-22 Joshua Bell REGRESSION (r146540?): Crashes in storage/indexeddb/factory-basics-workers.html, storage/indexeddb/transaction-error.html https://bugs.webkit.org/show_bug.cgi?id=113019 Reviewed by Tony Chang. Also manifesting flakily under Chromium's content_shell. It's an ASSERT being hit in the IDBTransaction destructor. The cause was r146540 which allows a stopped context to reclaim script wrappers. This allows the IDBTransaction to be deref'd at times where it previously would have just leaked. Modulate the destructor assertions to account for this case. No new tests; failures already manifest as flaky crashes in some ports. * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::~IDBTransaction): If context is stopped, expected state transitions/cleanup may not have occurred before destructor runs. 2013-03-22 David Grogan IndexedDB: Histogram available disk space on attempt to open database https://bugs.webkit.org/show_bug.cgi?id=112862 Reviewed by Tony Chang. ChromeOS suspects they might be hitting disk corruption when the disks are nearly full. This patch logs the available space to either the "success" or the "fail" histogram as appropriate so that the distributions can be compared. No new tests - I don't know of a good way to test histograms. Local printf testing didn't turn up any bugs. * platform/leveldb/LevelDBDatabase.cpp: (WebCore::HistogramFreeSpace): (WebCore): (WebCore::LevelDBDatabase::open): 2013-03-22 Nate Chapin REGRESSION (r146239): Reproducible crash in WebCore::DocumentLoader::responseReceived. https://bugs.webkit.org/show_bug.cgi?id=112811 Reviewed by Brady Eidson. Test: http/tests/cache/x-frame-options-304.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::responseReceived): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::switchClientsToRevalidatedResource): * loader/cache/CachedRawResource.h: 2013-03-22 Jer Noble REGRESSION: -webkit-box-reflect does not show on video elements https://bugs.webkit.org/show_bug.cgi?id=112397 Reviewed by Eric Carlson. Work around the ASSERTs generated when setting an AVPlayerLayer's player property during a CA flush by setting the player property during the next runloop, outside of a CA flush. * platform/graphics/ca/mac/PlatformCALayerMac.mm: (PlatformCALayer::clone): 2013-03-22 peavo@outlook.com [Curl] Performance fix, avoid loading cookie file on every request. https://bugs.webkit.org/show_bug.cgi?id=113023 Reviewed by Brent Fulgham. We currently load the cookie file on every request, and when setting cookies from JavaScript, by using the option CURLOPT_COOKIEFILE. This is very inefficient as the cookie file can get quite large, and file I/O is slow. It is sufficient to load the cookie file on startup, as we use a shared cookie database between the requests. * platform/network/curl/CookieJarCurl.cpp: (WebCore::setCookiesFromDOM): Avoid loading cookie file when setting cookies from JavaScript. * platform/network/curl/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::initializeHandle): Avoid loading cookie file on every request. (WebCore::ResourceHandleManager::initCookieSession): Load the cookie file to shared database on startup. 2013-03-22 Tiancheng Jiang [BlackBerry] Update Input field Background Color https://bugs.webkit.org/show_bug.cgi?id=113063 Reviewed by George Staikos. RIM PR 307463. Internally reviewed by Ed Baker. * platform/blackberry/RenderThemeBlackBerry.cpp: (WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField): 2013-03-22 Ilya Tikhonovsky Web Inspector: FlameChart. Draw function names over flame chart bar if they fit into the bar. https://bugs.webkit.org/show_bug.cgi?id=113052 Reviewed by Vsevolod Vlasov. The draw function will draw the bar title if the text is less than bar width. Unfortunately almost all the projects which need to be profiled use long function names with dots. So if the function name has dots and doesn't fit into the space then prepareTitle will try to drop the prefix before dot. If the title has no dots then the function will strip the tail of the title. * inspector/front-end/FlameChart.js: (WebInspector.FlameChart): (WebInspector.FlameChart.prototype.draw): (WebInspector.FlameChart.prototype._prepareTitle): 2013-03-22 Vladislav Kaznacheev Web Inspector: Add "hidden" attribute to the recently added APIs in Inspector.json https://bugs.webkit.org/show_bug.cgi?id=113061 Added "hidden": true to the APIs introduced since version 1.0. Reviewed by Pavel Feldman. * inspector/Inspector.json: 2013-03-22 Vsevolod Vlasov Web Inspector: Correctly implement scrollToLine, revealLine and setSelection on CodeMirror editor. https://bugs.webkit.org/show_bug.cgi?id=113028 Reviewed by Pavel Feldman. Added focus event handler to CodeMirror editor view elememnt to support inspector's focus model. Added selection and scroll listeners to correctly save editor scroll and selection in history. Implemented revealLine, scrollToLine and setSelection. Note: CodeMirror's coordsChar method does not work correctly in "local" mode, implemented as binary search as a temporary workaround. * inspector/front-end/CodeMirrorTextEditor.js: (WebInspector.CodeMirrorTextEditor): (WebInspector.CodeMirrorTextEditor.prototype.defaultFocusedElement): (WebInspector.CodeMirrorTextEditor.prototype._handleElementFocus): (WebInspector.CodeMirrorTextEditor.prototype.revealLine): (WebInspector.CodeMirrorTextEditor.prototype._coordsChar): (WebInspector.CodeMirrorTextEditor.prototype._topScrolledLine): (WebInspector.CodeMirrorTextEditor.prototype._bottomScrolledLine): (WebInspector.CodeMirrorTextEditor.prototype._scroll): (WebInspector.CodeMirrorTextEditor.prototype._selectionChange): (WebInspector.CodeMirrorTextEditor.prototype.scrollToLine): (WebInspector.CodeMirrorTextEditor.prototype.setSelection): (WebInspector.CodeMirrorTextEditor.prototype.copyRange): * inspector/front-end/TextEditor.js: (WebInspector.TextEditor.prototype.copyRange): 2013-03-22 Vsevolod Vlasov Web Inspector: [Regression] Editor scroll is not restored after inspector reload. https://bugs.webkit.org/show_bug.cgi?id=113027 Reviewed by Pavel Feldman. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.wasShown): (WebInspector.SourceFrame.prototype._isEditorShowing): (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded): (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded): (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded): (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded): 2013-03-22 Allan Sandfeld Jensen [Qt] Fix build with OPENCL 1.2 https://bugs.webkit.org/show_bug.cgi?id=113056 Reviewed by Kenneth Rohde Christiansen. Switch qmake checks to the modern style which means we can enable OpenCL with WEBKIT_CONFIG+=opencl. Upgrade OpenCL 1.1 clCreateImage2D to OpenCL 1.2 clCreateImage calls. * Target.pri: * WebCore.pri: * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::createOpenCLImageResult): * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp: (WebCore::FilterContextOpenCL::createOpenCLImage): 2013-03-22 ChangSeok Oh [GTK][AC] Opacity animation doesn't work with clutter backend https://bugs.webkit.org/show_bug.cgi?id=110347 Reviewed by Gustavo Noronha Silva. The static casting in ternary operator doesn't change actual inputted argument type. So I replaced it with if-else statement. Covered by existing animation tests. * platform/graphics/clutter/PlatformClutterAnimation.cpp: (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty): (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty): 2013-03-22 ChangSeok Oh [GTK][AC] Add removing animations procedure with clutter ac backend https://bugs.webkit.org/show_bug.cgi?id=110607 Reviewed by Gustavo Noronha Silva. This changes is based on mac port implementation. The only different thing is that updateAnimations is called explicitly in destructor of GraphicsLayerClutter to remove uncommitted animations. Because even though we call notifyFlushRequired to remove existing animations in removeAnimation(), removeClutterAnimationFromLayer has been never reached since the root layer is destroyed before. It means that we haven't lost a change to remove actual animations from clutterActor. Covered by existing animation tests. * platform/graphics/clutter/GraphicsLayerClutter.cpp: (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter): (WebCore::GraphicsLayerClutter::removeAnimation): (WebCore): (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer): * platform/graphics/clutter/GraphicsLayerClutter.h: (WebCore::GraphicsLayerClutter::animationIsRunning): (GraphicsLayerClutter): 2013-03-22 Kondapally Kalyan [EFL][WebGL] Optimize AlphaOp for HTMLVideoElement input. https://bugs.webkit.org/show_bug.cgi?id=113049 Reviewed by Kenneth Rohde Christiansen. Covered by existing tests. Changeset 137397 implemented optimisation to avoid any unnecessary Unmultiply or Premultiply operation in unpack/pack provided the Image source is from HTMLVideoElement. This patch enables the same for EFL port. * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::ImageExtractor::extractImage): 2013-03-22 Tommy Widenflycht Clean up the speech recognintion API https://bugs.webkit.org/show_bug.cgi?id=112916 Reviewed by Adam Barth. This patch cleans away deprecated parts, fixes so that stop() can be called more than once and adds the missing emma attribute on SpeechRecognitionEvent (which is always null). Patch covered by existing tests. * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::stopFunction): (WebCore::SpeechRecognition::abort): (WebCore::SpeechRecognition::didEnd): (WebCore::SpeechRecognition::SpeechRecognition): * Modules/speech/SpeechRecognition.h: (SpeechRecognition): * Modules/speech/SpeechRecognitionEvent.cpp: (WebCore::SpeechRecognitionEvent::createResult): (WebCore::SpeechRecognitionEvent::createNoMatch): (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent): * Modules/speech/SpeechRecognitionEvent.h: (WebCore): (SpeechRecognitionEventInit): (SpeechRecognitionEvent): (WebCore::SpeechRecognitionEvent::emma): * Modules/speech/SpeechRecognitionEvent.idl: 2013-03-22 Emil A Eklund Floor cell widths in AutoTableLayout::recalcColumn https://bugs.webkit.org/show_bug.cgi?id=112922 Reviewed by Levi Weintraub. Table cells widths are floored to ensure even distribution of available space across columns. The code path that computes the width of the _table_ failed to take this into account and thus can over report the total width of the table. Test: fast/sub-pixel/table-with-subpixel-cell-size.html * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::recalcColumn): Floor width to match column sizing logic. 2013-03-22 David Kilzer BUILD FIX (r146208): Export shouldPrintExceptions methods for iOS Fixes the following build failure: Undefined symbols for architecture i386: "__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb", referenced from: +[WebCoreStatistics setShouldPrintExceptions:] in WebCoreStatistics.o "__ZN7WebCore11PageConsole21shouldPrintExceptionsEv", referenced from: +[WebCoreStatistics shouldPrintExceptions] in WebCoreStatistics.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) * WebCore.exp.in: Move symbols so they're exported for iOS as well. 2013-03-22 Yury Semikhatsky Unreviewed. Fix Chromium Win compilation after r146583. * bindings/v8/CustomElementHelpers.cpp: (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded): 2013-03-22 Ilya Tikhonovsky Web Inspector: Flame Chart. Chart has to be zoomed around the mouse pointer. https://bugs.webkit.org/show_bug.cgi?id=113031 Reviewed by Yury Semikhatsky. Overview grid is able to zoom around the mouse pointer. So the simplest way is to translate x coordinate of the mouse pointer hovered over the chart to x coordinate in term of overview window and pass it to the zoom function. Minor unrelated fix: draw small border at bottom of the overview grid. * inspector/front-end/FlameChart.js: (WebInspector.FlameChart.prototype._onMouseWheel): * inspector/front-end/OverviewGrid.js: (WebInspector.OverviewGrid.prototype.zoom): * inspector/front-end/flameChart.css: (#flame-chart-overview-container): 2013-03-22 No'am Rosenthal [Texmap] TextureMapperImageBuffer should not use rendering code for filters. https://bugs.webkit.org/show_bug.cgi?id=113040 Reviewed by Kenneth Rohde Christiansen. Disable TextureMapperImageBuffer filters, until they can be done the right way. This should only disrupt accelerated filters in fallback mode, which is a very rare use case. No new testable functionality. * platform/graphics/texmap/TextureMapperImageBuffer.cpp: (WebCore::BitmapTextureImageBuffer::applyFilters): 2013-03-22 Sergey Ryazanov Web Inspector: Report more CSS errors https://bugs.webkit.org/show_bug.cgi?id=113022 Reviewed by Pavel Feldman. Reporting next few CSS syntax errors in declaration_list. * css/CSSGrammar.y.in: 2013-03-18 Yury Semikhatsky Web Inspector: use individual samples to construct CPU profile flame chart https://bugs.webkit.org/show_bug.cgi?id=112569 Reviewed by Pavel Feldman. Added an optional array of samples to the CPU profile returned over the protocol. Each sample is id of the profile node corresponding to the top frame of the sample's stack trace. The array of samples if present is used to draw the flame chart on the CPU profile panel, otherwise flame chart is drawn based on the aggregated profile data. * bindings/js/ScriptProfile.cpp: (WebCore::ScriptProfile::buildInspectorObjectForSamples): * bindings/js/ScriptProfile.h: (ScriptProfile): * bindings/v8/ScriptProfile.cpp: (WebCore::buildInspectorObjectFor): (WebCore): (WebCore::ScriptProfile::buildInspectorObjectForSamples): * bindings/v8/ScriptProfile.h: (ScriptProfile): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::start): * inspector/Inspector.json: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::getCPUProfile): * inspector/front-end/CPUProfileView.js: (WebInspector.CPUProfileView.prototype._getCPUProfileCallback): (WebInspector.CPUProfileView.prototype._buildIdToNodeMap): * inspector/front-end/FlameChart.js: (WebInspector.FlameChart.prototype._calculateTimelineData): 2013-03-22 Steve Block Use generated bindings for the Coordinates type used by Geolocation https://bugs.webkit.org/show_bug.cgi?id=112975 Reviewed by Kentaro Hara. No new tests, refactoring only. * CMakeLists.txt: * GNUmakefile.list.am: * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp. (WebCore): (WebCore::Coordinates::altitude): (WebCore::Coordinates::altitudeAccuracy): (WebCore::Coordinates::heading): (WebCore::Coordinates::speed): * Modules/geolocation/Coordinates.h: (Coordinates): * Modules/geolocation/Coordinates.idl: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed. 2013-03-22 Kunihiko Sakamoto INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default https://bugs.webkit.org/show_bug.cgi?id=113005 Reviewed by Kent Tamura. Use fallback format when datetime format from locale is not complete. Tests: fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html * html/BaseMultipleFieldsDateAndTimeInputType.cpp: (DateTimeFormatValidator): A helper class that parses datetime format and tests existence of fields. (WebCore::DateTimeFormatValidator::DateTimeFormatValidator): (WebCore::DateTimeFormatValidator::visitField): (WebCore::DateTimeFormatValidator::validateFormat): Parses datetime format and validates by calling BaseMultipleFieldsDateAndTimeInputType::isValidFormat. (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Checks if dateTimeFormat is valid, and uses fallback format if not. * html/BaseMultipleFieldsDateAndTimeInputType.h: (BaseMultipleFieldsDateAndTimeInputType): Declare isValidFormat. * html/DateInputType.cpp: (WebCore::DateInputType::isValidFormat): Added. * html/DateInputType.h: (DateInputType): * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::isValidFormat): Added. * html/DateTimeInputType.h: (DateTimeInputType): * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::isValidFormat): Added. * html/DateTimeLocalInputType.h: (DateTimeLocalInputType): * html/MonthInputType.cpp: (WebCore::MonthInputType::isValidFormat): Added. * html/MonthInputType.h: (MonthInputType): * html/TimeInputType.cpp: (WebCore::TimeInputType::isValidFormat): Added. * html/TimeInputType.h: (TimeInputType): * html/WeekInputType.cpp: (WebCore::WeekInputType::isValidFormat): Added. * html/WeekInputType.h: (WeekInputType): 2013-03-22 Hajime Morrita Custom Elements: "readyCallback" lifecycle callback should be called. https://bugs.webkit.org/show_bug.cgi?id=112538 Reviewed by Elliott Sprehn. This change allows each custom element definition to hook up its instantiation, namely "readyCallback" lifecycle callback. The change has two parts: - 1. Tracking which Element objects to be created. - 2. Invoking appropriate JavaScript functions, which are readyCallback(), before the Element object is visible from page script. For 1, CustomElementRegistry maintains list of "callback invocaions". Each list item ("invocation") tracks the element which has a lifecycle callback to be invoked. Each invocation is registered when - Any custom element C++ object is instantiated. See changes on CustomElementConstructor.cpp. This also happens when @is attribute is set by the parser or node cloning routine, which can turn a non-custom element into a type-extended custom element. See changes on Element.cpp. For 2, CustomElementRegistry basically follows what MutationObserver is doing, and introduces a method called deliverLifecycleCallbacks(). This function flushes all pending callback invocations. You can think it as a dual of MutationObserver::deliverAllMutations(). The delivery function is called places where MutationObserver's deliverAllMutations() is called. In addition, it is also called just before returning from a set of DOM APIs. For example, it is called just before createElement() returns, so that possibly created custom element becomes ready through its readyCallback(). Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In principle, APIs which can create new custom element instnaces are marked. See CustomElementRegistry::CallbackDeliveryScope and changes on CodeGeneratorV8.pm. We need this extra work because the readyCallback() needs to give an illusion so that JavaScript programmers feel like the readyCallback() callback being called just after it is created, instead of called on arbitrary late timing like MutationObserver notifications. Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html fast/dom/custom/lifecycle-ready-createElement-reentrancy.html fast/dom/custom/lifecycle-ready-creation-api.html fast/dom/custom/lifecycle-ready-innerHTML.html fast/dom/custom/lifecycle-ready-parser-only.html fast/dom/custom/lifecycle-ready-parser-script.html fast/dom/custom/lifecycle-ready-paste.html * bindings/scripts/CodeGeneratorV8.pm: - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute. (GenerateCustomElementInvocationScopeIfNeeded): (GenerateNormalAttrSetter): (GenerateFunction): * bindings/scripts/IDLAttributes.txt: * bindings/v8/CustomElementHelpers.cpp: (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded): (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded): * bindings/v8/CustomElementHelpers.h: (CustomElementHelpers): * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks() (WebCore::V8RecursionScope::didLeaveScriptContext): * dom/CustomElementConstructor.cpp: (WebCore::CustomElementConstructor::createElement): (WebCore::CustomElementConstructor::createElementInternal): * dom/CustomElementConstructor.h: (WebCore::CustomElementConstructor::isExtended): (CustomElementConstructor): * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution. (WebCore::CustomElementInvocation::CustomElementInvocation): (WebCore::CustomElementInvocation::~CustomElementInvocation): (WebCore::activeCustomElementRegistries): (WebCore::CustomElementRegistry::~CustomElementRegistry): (WebCore::CustomElementRegistry::didGiveTypeExtension): (WebCore::CustomElementRegistry::didCreateElement): (WebCore::CustomElementRegistry::activate): (WebCore::CustomElementRegistry::deactivate): (WebCore::CustomElementRegistry::deliverLifecycleCallbacks): (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks): * dom/CustomElementRegistry.h: (CustomElementInvocation): (WebCore::CustomElementInvocation::element): (CallbackDeliveryScope): (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope): (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope): (CustomElementRegistry): (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded): * dom/Document.cpp: (WebCore::Document::createElement): (WebCore::Document::didCreateCustomElement): * dom/Document.h: (Document): * dom/Document.idl: * dom/Element.cpp: (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute (WebCore::Element::parserSetAttributes): (WebCore::Element::cloneAttributesFromElement): * dom/Element.h: * dom/Node.idl: * dom/ShadowRoot.idl: * html/HTMLElement.idl: * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks() (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): (WebCore::HTMLScriptRunner::runScript): 2013-03-22 Tommy Widenflycht MediaStream API: Finalize the RTCPeerConnection states https://bugs.webkit.org/show_bug.cgi?id=112792 Reviewed by Adam Barth. This patch finalized the RTCPeerConnection state and events. These changes have not yet pushed out to the editors draft; but they are uncontroversial and agreed upon. readyState will be deleted; please use the replacement signalingState which is already available. onstatechange -> onsignalingstatechange onicechange -> oniceconnectionstatechange ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose. RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new" Patch covered by modified tests. * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): (WebCore::RTCPeerConnection::iceConnectionState): (WebCore::RTCPeerConnection::changeSignalingState): (WebCore::RTCPeerConnection::changeIceGatheringState): (WebCore::RTCPeerConnection::changeIceConnectionState): * Modules/mediastream/RTCPeerConnection.h: (RTCPeerConnection): * Modules/mediastream/RTCPeerConnection.idl: * dom/EventNames.h: (WebCore): * platform/mediastream/RTCPeerConnectionHandlerClient.h: 2013-03-22 Mike West Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data. https://bugs.webkit.org/show_bug.cgi?id=112965 Reviewed by Alexey Proskuryakov. In https://bugs.webkit.org/show_bug.cgi?id=112783#c6, Adam noted that it would be possible to use 'KURL(ParsedURLString, [url])' rather than 'KURL(KURL(), [url])', since we knew that the URL in question is a value and absolute URL. This patch fixes the obvious instances of this pattern; there are several more 'KURL(KURL(), String)' calls in WebCore but these were the only places I was reasonably sure that bad data couldn't creep in. * dom/Document.cpp: (WebCore::Document::updateBaseURL): 'documentURI' is pulled from 'url()->string()'. It's safe. * page/ContentSecurityPolicy.cpp: (WebCore::gatherSecurityPolicyViolationEventData): (WebCore::ContentSecurityPolicy::reportViolation): 'CallFrame::sourceURL()' is a known valid/absolute URL. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::createFromDatabaseIdentifier): (WebCore::SecurityOrigin::create): The strings constructed here are certainly valid. 2013-03-22 Ilya Tikhonovsky Web Inspector: Flame Chart. move overview window when user scrolls the chart. https://bugs.webkit.org/show_bug.cgi?id=113014 Reviewed by Yury Semikhatsky. I found that I could use scaling mechanics in OverviewGrid for scaling the chart. But the dragging part was not so simple due to the different approaches in OverviewGrid and FlameChart. OverviewGrid used _windowLeft and _windowRight when FlameChart used _xOffset and _xScaleFactor and width. It was not practical and I rewrote the FlameChart mechanics and now it also uses _windowLeft _windowRight. * inspector/front-end/FlameChart.js: (WebInspector.FlameChart): (WebInspector.FlameChart.Calculator.prototype._updateBoundaries): (WebInspector.FlameChart.Calculator.prototype.computePosition): (WebInspector.FlameChart.prototype._onWindowChanged): (WebInspector.FlameChart.prototype._startCanvasDragging): (WebInspector.FlameChart.prototype._canvasDragging): (WebInspector.FlameChart.prototype._onMouseMove): (WebInspector.FlameChart.prototype._onMouseWheel): (WebInspector.FlameChart.prototype._coordinatesToNodeIndex): (WebInspector.FlameChart.prototype._drawOverviewCanvas): (WebInspector.FlameChart.prototype.draw): (WebInspector.FlameChart.prototype._updateBoundaries): (WebInspector.FlameChart.prototype.update): * inspector/front-end/OverviewGrid.js: (WebInspector.OverviewGrid.prototype.setWindowPosition): (WebInspector.OverviewGrid.prototype.setWindow): (WebInspector.OverviewGrid.prototype.addEventListener): (WebInspector.OverviewGrid.prototype.zoom): (WebInspector.OverviewGrid.Window.prototype._zoom): * inspector/front-end/inspectorCommon.css: (.overview-grid-window-rulers): 2013-03-22 Steve Block Move GeolocationClient.h to Modules/geolocation/ https://bugs.webkit.org/show_bug.cgi?id=112997 Reviewed by Kentaro Hara. No new tests, no functional change. * GNUmakefile.list.am: * Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h. (WebCore): (GeolocationClient): (WebCore::GeolocationClient::~GeolocationClient): * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: 2013-03-22 Sheriff Bot Unreviewed, rolling out r146534 and r146565. http://trac.webkit.org/changeset/146534 http://trac.webkit.org/changeset/146565 https://bugs.webkit.org/show_bug.cgi?id=113017 "r146534 caused perf regression on Chromium Linux x64" (Requested by yurys on #webkit). * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrSetter): (GenerateOverloadedFunction): (GenerateFunctionCallback): (GenerateFunction): (GenerateParametersCheck): (GenerateSingleConstructorCallback): (GenerateNonStandardFunction): (GenerateImplementation): (GenerateFunctionCallString): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestTypedefs.cpp: (WebCore): * bindings/v8/CustomElementHelpers.cpp: * bindings/v8/CustomElementHelpers.h: (WebCore): (CustomElementHelpers): * bindings/v8/V8DOMConfiguration.cpp: (WebCore::V8DOMConfiguration::batchConfigureCallbacks): (WebCore::V8DOMConfiguration::configureTemplate): * bindings/v8/V8DOMConfiguration.h: (BatchedMethod): (V8DOMConfiguration): * bindings/v8/V8RecursionScope.cpp: (WebCore::V8RecursionScope::didLeaveScriptContext): * dom/CustomElementConstructor.cpp: (WebCore::CustomElementConstructor::createElement): * dom/CustomElementConstructor.h: (CustomElementConstructor): * dom/CustomElementRegistry.cpp: (WebCore::CustomElementRegistry::~CustomElementRegistry): * dom/CustomElementRegistry.h: (WebCore): (CustomElementRegistry): * dom/Document.cpp: (WebCore::Document::createElement): (WebCore::Document::registerElement): * dom/Document.h: * dom/Document.idl: * dom/Element.cpp: (WebCore::Element::parserSetAttributes): (WebCore::Element::cloneAttributesFromElement): * dom/Element.h: * dom/Element.idl: * dom/Node.idl: * dom/ShadowRoot.idl: * html/HTMLElement.idl: * html/parser/HTMLScriptRunner.cpp: (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): (WebCore::HTMLScriptRunner::runScript): 2013-03-22 Sudarsana Nagineni [GStreamer] Memory leak in AudioFileReader::createBus() https://bugs.webkit.org/show_bug.cgi?id=112925 Reviewed by Martin Robinson. Adopt the reference returned by g_timeout_source_new() to fix a memory leak. No new tests. No change in behavior. * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: (WebCore::AudioFileReader::createBus): 2013-03-22 Steve Block Move page/Coordinates.[h|idl] to Modules/geolocation/ https://bugs.webkit.org/show_bug.cgi?id=112945 Reviewed by Kentaro Hara. No new tests, no functional change. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h. (WebCore): (Coordinates): (WebCore::Coordinates::create): (WebCore::Coordinates::isolatedCopy): (WebCore::Coordinates::latitude): (WebCore::Coordinates::longitude): (WebCore::Coordinates::altitude): (WebCore::Coordinates::accuracy): (WebCore::Coordinates::altitudeAccuracy): (WebCore::Coordinates::heading): (WebCore::Coordinates::speed): (WebCore::Coordinates::canProvideAltitude): (WebCore::Coordinates::canProvideAltitudeAccuracy): (WebCore::Coordinates::canProvideHeading): (WebCore::Coordinates::canProvideSpeed): (WebCore::Coordinates::Coordinates): * Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl. * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: 2013-03-21 Hajime Morrita Custom Elements: "readyCallback" lifecycle callback should be called. https://bugs.webkit.org/show_bug.cgi?id=112538 Reviewed by Elliott Sprehn. This change allows each custom element definition to hook up its instantiation, namely "readyCallback" lifecycle callback. The change has two parts: - 1. Tracking which Element objects to be created. - 2. Invoking appropriate JavaScript functions, which are readyCallback(), before the Element object is visible from page script. For 1, CustomElementRegistry maintains list of "callback invocaions". Each list item ("invocation") tracks the element which has a lifecycle callback to be invoked. Each invocation is registered when - Any custom element C++ object is instantiated. See changes on CustomElementConstructor.cpp. This also happens when @is attribute is set by the parser or node cloning routine, which can turn a non-custom element into a type-extended custom element. See changes on Element.cpp. For 2, CustomElementRegistry basically follows what MutationObserver is doing, and introduces a method called deliverLifecycleCallbacks(). This function flushes all pending callback invocations. You can think it as a dual of MutationObserver::deliverAllMutations(). The delivery function is called places where MutationObserver's deliverAllMutations() is called. In addition, it is also called just before returning from a set of DOM APIs. For example, it is called just before createElement() returns, so that possibly created custom element becomes ready through its readyCallback(). Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In principle, APIs which can create new custom element instnaces are marked. See CustomElementRegistry::CallbackDeliveryScope and changes on CodeGeneratorV8.pm. We need this extra work because the readyCallback() needs to give an illusion so that JavaScript programmers feel like the readyCallback() callback being called just after it is created, instead of called on arbitrary late timing like MutationObserver notifications. Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html fast/dom/custom/lifecycle-ready-createElement-reentrancy.html fast/dom/custom/lifecycle-ready-creation-api.html fast/dom/custom/lifecycle-ready-innerHTML.html fast/dom/custom/lifecycle-ready-parser-only.html fast/dom/custom/lifecycle-ready-parser-script.html fast/dom/custom/lifecycle-ready-paste.html * bindings/scripts/CodeGeneratorV8.pm: - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute. (GenerateCustomElementInvocationScopeIfNeeded): (GenerateNormalAttrSetter): (GenerateFunction): * bindings/scripts/IDLAttributes.txt: * bindings/v8/CustomElementHelpers.cpp: (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded): (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded): * bindings/v8/CustomElementHelpers.h: (CustomElementHelpers): * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks() (WebCore::V8RecursionScope::didLeaveScriptContext): * dom/CustomElementConstructor.cpp: (WebCore::CustomElementConstructor::createElement): (WebCore::CustomElementConstructor::createElementInternal): * dom/CustomElementConstructor.h: (WebCore::CustomElementConstructor::isExtended): (CustomElementConstructor): * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution. (WebCore::CustomElementInvocation::CustomElementInvocation): (WebCore::CustomElementInvocation::~CustomElementInvocation): (WebCore::activeCustomElementRegistries): (WebCore::CustomElementRegistry::~CustomElementRegistry): (WebCore::CustomElementRegistry::didGiveTypeExtension): (WebCore::CustomElementRegistry::didCreateElement): (WebCore::CustomElementRegistry::activate): (WebCore::CustomElementRegistry::deactivate): (WebCore::CustomElementRegistry::deliverLifecycleCallbacks): (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks): * dom/CustomElementRegistry.h: (CustomElementInvocation): (WebCore::CustomElementInvocation::element): (CallbackDeliveryScope): (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope): (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope): (CustomElementRegistry): (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded): * dom/Document.cpp: (WebCore::Document::createElement): (WebCore::Document::didCreateCustomElement): * dom/Document.h: (Document): * dom/Document.idl: * dom/Element.cpp: (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute (WebCore::Element::parserSetAttributes): (WebCore::Element::cloneAttributesFromElement): * dom/Element.h: * dom/Node.idl: * dom/ShadowRoot.idl: * html/HTMLElement.idl: * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks() (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): (WebCore::HTMLScriptRunner::runScript): 2013-03-21 Jer Noble Crash in WebCore::MediaPlayer::cachedResourceLoader + 4 https://bugs.webkit.org/show_bug.cgi?id=112977 Reviewed by Geoffrey Garen. Speculative fix for a NULL-dereference crash. MediaPlayerPrivateAVFoundationObjC is the sole owner of a WebCoreAVFLoaderDelegate instance. It releases this instance in its destructor, but it is possible that, on another thread, the AVAssetResourceLoader has already begun using the delegate and in so doing has retained it. By the time the delegate method is fired on the main thread, the MediaPlayerPrivateAVFoundationObjC owner of the delegate has already been deleted, and the delegate's m_callback pointer is now pointing at freed memory. In addition to calling -[AVAssetResourceLoader setDelegate:queue:] to avoid any not-yet-started delegate callbacks, MediaPlayerPrivateAVFoundationObjC should clear the WebCoreAVFLoaderDelegate m_callback ivar, to avoid calling into freed memory for already queued delegate callbacks. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the m_loaderDelegate's callback pointer. (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): Check the value of m_callback before continuing. (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Ditto. (-[WebCoreAVFLoaderDelegate setCallback:]): Added simple setter. 2013-03-21 Takashi Sakamoto XMLDocumentParser doesn't parse