2013-02-04 Nayan Kumar K [WEBGL] Rename WEBKIT_WEBGL_compressed_texture_s3tc to WEBGL_compressed_texture_s3tc https://bugs.webkit.org/show_bug.cgi?id=108866 Reviewed by NOBODY (OOPS!). WEBGL_compressed_texture_s3tc is one of the community approved WebGL extension. Hence remove the vendor prefix from WEBKIT_WEBGL_compressed_texture_s3tc. Specification: http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/ No tests currently present to test WEBKIT_WEBGL_compressed_texture_s3tc. * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLCompressedTextureS3TC.cpp: (WebCore::WebGLCompressedTextureS3TC::getName): * html/canvas/WebGLExtension.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::getExtension): 2013-02-01 Nayan Kumar K [WEBGL] Rename WEBKIT_WEBGL_lose_context to WEBGL_lose_context. https://bugs.webkit.org/show_bug.cgi?id=108694 Reviewed by NOBODY (OOPS!). WEBGL_lose_context is one of the community approved WebGL extension. Hence remove the vendor prefix from WEBKIT_WEBGL_lose_context extension. Spefication: http://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/ Tests already exists, modified them to verify the change in extension name. * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLExtension.h: * html/canvas/WebGLLoseContext.cpp: (WebCore::WebGLLoseContext::getName): * html/canvas/WebGLRenderingContext.cpp: (WebCore): (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): 2012-10-05 Ryosuke Niwa Deleting across multiple paragraphs can change the style of surrounding text https://bugs.webkit.org/show_bug.cgi?id=97266 Reviewed by Levi Weintraub. Preserve editing styles from CSS rules in wrappingStyleForSerialization as well as inline styles even when we're not annotating. We don't want to preserve all styles because it's against the user expectation to keep borders, etc... when merging paragraphs. We also don't want to copy styles from a mail blockquote because that's not a style the user has applied. See the comment in EditingStyle::wrappingStyleForSerialization. Test: editing/deleting/merge-paragraph-with-style-from-rule.html * editing/EditingStyle.cpp: (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement): (WebCore::EditingStyle::wrappingStyleForSerialization): 2012-09-24 Tony Chang flex-grow should be 1 when omitted from flex shorthand https://bugs.webkit.org/show_bug.cgi?id=97480 Reviewed by Ojan Vafai. We were using 0, based on an outdated version of the spec. Tests: css3/flexbox/flex-property-parsing.html css3/flexbox/flex-algorithm.html: New test case. * css/CSSParser.cpp: (WebCore::CSSParser::parseFlex): 2013-02-13 Morten Stenshorne WebKit ignores column-rules wider than column-gap https://bugs.webkit.org/show_bug.cgi?id=15553 Paint column rules even if they are wider than the gap. Rules wider than the gap should just overlap with column contents. Reviewed by Eric Seidel. Test: fast/multicol/rule-thicker-than-gap.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::paintColumnRules): 2013-03-18 Gyuyoung Kim [EFL] Cancel mark on search field is not displayed https://bugs.webkit.org/show_bug.cgi?id=94880 Reviewed by Kenneth Rohde Christiansen. adjustSearchFieldCancelButtonStyle() doesn't set style width and height for search cancel button. So, the button isn't showing up in search input field. Besides the button size should be scaled based on the font size as chromium, qt, and blackberry ports. Tests: fast/forms/search-cancel-button-style-sharing.html fast/forms/search-rtl.html * platform/efl/RenderThemeEfl.cpp: (WebCore): (WebCore::RenderThemeEfl::adjustSearchFieldCancelButtonStyle): 2012-08-30 Kangil Han Fix compile warning when enable tiled backing store https://bugs.webkit.org/show_bug.cgi?id=95422 Reviewed by Kentaro Hara. Fixed compile warning messages when enabled tiled backing store. In case of TiledBackingStore, it was first thought about static_cast. However, if minus value is assigned to the comparison, it would be critical. So, it was modified as using int value in tiled coordinate calculation. * page/Frame.cpp: (WebCore::Frame::tiledBackingStorePaintEnd): comparison between signed and unsigned integer expressions [-Wsign-compare] * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::invalidate): comparison between signed and unsigned integer expressions [-Wsign-compare] (WebCore::TiledBackingStore::paint): comparison between signed and unsigned integer expressions [-Wsign-compare] (WebCore::TiledBackingStore::coverageRatio): comparison between signed and unsigned integer expressions [-Wsign-compare] (WebCore::TiledBackingStore::createTiles): comparison between signed and unsigned integer expressions [-Wsign-compare] * platform/graphics/cairo/GLContext.cpp: (WebCore::GLContext::createOffscreenContext): no return statement in function returning non-void [-Wreturn-type] 2012-09-28 Alberto Garcia TextureMapperGL: fix -Wsign-compare compilation warning. https://bugs.webkit.org/show_bug.cgi?id=97928 Reviewed by Martin Robinson. Use size_t rather than int to iterate over FilterOperations. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::BitmapTextureGL::applyFilters): 2013-03-11 Kent Tamura Inappropriate validation message for required number/date input elements https://bugs.webkit.org/show_bug.cgi?id=111982 Reviewed by Kentaro Hara. For validation message, badInput messages should take precedence over valueMissing messages because users already filled out the field with a bad value. Tests: Update fast/forms/validationMessage.html * html/InputType.cpp: (WebCore::InputType::validationMessage): Check badInput first. 2013-03-11 Kent Tamura Refactoring: Move the content of HTMLInputElement::subtreeHasChanged to TextFieldInputType https://bugs.webkit.org/show_bug.cgi?id=103195 Reviewed by Kentaro Hara. HTMLInputElement::subtreeHasChanged is called only if the input is a text field. The code should be moved to TextFieldInputType. No new tests. This should not change any behavior. * html/HTMLInputElement.cpp: - Remove unnecessary NumberInputType.h inclusion. - Remove convertFromVisibleValue. It was used only by subtreeHasChanged. (WebCore::HTMLInputElement::subtreeHasChanged): Move the code to TextFieldInputType::subtreeHasChanged except calculateAndAdjustDirectionality, which is a protected member of HTMLElement. * html/HTMLInputElement.h: (HTMLInputElement): Remove convertFromVisibleValue. * html/InputType.cpp: Move convertFromVisibleValue to TextFieldInputType. (WebCore::InputType::subtreeHasChanged): Add ASSERT_NOT_REACHED. * html/InputType.h: (InputType): Remove convertFromVisibleValue. * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::convertFromVisibleValue): Moved from InputType. (WebCore::TextFieldInputType::subtreeHasChanged): Moved from HTMLInputElement. A latter part is moved to didSetValueByUserEdit to be hooked by SearchInputType. (WebCore::TextFieldInputType::didSetValueByUserEdit): Moved from HTMLInputElement::subtreeHasChanged, and clean up the code. * html/TextFieldInputType.h: (TextFieldInputType): - Move convertFromVisibleValue from InputType. - Add didSetValueByUserEdit and subtreeHasChanged. * html/SearchInputType.cpp: (WebCore::SearchInputType::didSetValueByUserEdit): Renamed from subtreeHasChanged, and calls TextFieldInputType::didSetValueByUserEdit. * html/SearchInputType.h: (SearchInputType): Rename subtreeHasChanged to didSetValueByUserEdit. 2012-11-22 Kentaro Hara [V8] Move WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer https://bugs.webkit.org/show_bug.cgi?id=103061 Reviewed by Adam Barth. This is an incremental step to remove WorkerExecutionContextProxy. This patch moves WorkerExecutionContextProxy::initializeIfNeeded() to V8Initializer. This patch also renames methods so that the names become consistent between the main thread and workers. No tests. No change in behavior. * bindings/v8/V8Initializer.cpp: (WebCore::reportFatalErrorInMainThread): (WebCore::messageHandlerInMainThread): (WebCore::failedAccessCheckCallbackInMainThread): (WebCore::V8Initializer::initializeMainThreadIfNeeded): (WebCore::reportFatalErrorInWorker): (WebCore): (WebCore::messageHandlerInWorker): (WebCore::V8Initializer::initializeWorkerIfNeeded): * bindings/v8/V8Initializer.h: (V8Initializer): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::WorkerContextExecutionProxy): * bindings/v8/WorkerContextExecutionProxy.h: (WorkerContextExecutionProxy): 2012-11-25 Christophe Dumez [EFL] Refactor RenderThemeEfl::ThemePartCacheEntry::reuse() https://bugs.webkit.org/show_bug.cgi?id=103189 Reviewed by Kenneth Rohde Christiansen. Check if the entry size and type changed in RenderThemeEfl::ThemePartCacheEntry::reuse() to avoid useless processing if one of them did not change. Remove useless call to cairo_surface_finish() since we are using a smart pointer for the surface. Resize the edge object *after* loading its content from the theme file as it seems more logical this way. No new tests, no behavior change for layout tests. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::ThemePartCacheEntry::reuse): * platform/efl/RenderThemeEfl.h: (ThemePartCacheEntry): 2012-11-25 Ryosuke Niwa Rename DynamicNodeList to LiveNodeList https://bugs.webkit.org/show_bug.cgi?id=103197 Reviewed by Ojan Vafai. Rename DynamicNodeList to LiveNodeList to match the terminology used in DOM4 working draft: http://www.w3.org/TR/2012/WD-dom-20120405/#concept-collection-live "A collection (either NodeList or HTMLCollection) can be either live or static". Also rename DynamicNodeListCacheBase to LiveNodeListBase, and merge DynamicSubtreeNodeList into LiveNodeList (old DynamicNodeList) now that the only difference between those two classes is the former calling registerNodeListCache and unregisterNodeListCache on Document. This patch completes the series of simplification of NodeList/HTMLCollection classes. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::getNamedItems): * bindings/js/JSNodeListCustom.cpp: (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots): * bindings/v8/custom/V8NodeListCustom.cpp: (WebCore::V8NodeList::opaqueRootForGC): * dom/ChildNodeList.cpp: (WebCore::ChildNodeList::ChildNodeList): (WebCore::ChildNodeList::nodeMatches): * dom/ChildNodeList.h: * dom/ClassNodeList.cpp: (WebCore::ClassNodeList::ClassNodeList): * dom/ClassNodeList.h: * dom/DOMAllInOne.cpp: * dom/Document.cpp: (WebCore::Document::registerNodeListCache): (WebCore::Document::unregisterNodeListCache): (WebCore): * dom/Document.h: (WebCore): (Document): * dom/DynamicNodeList.cpp: Removed. * dom/DynamicNodeList.h: Removed. * dom/LiveNodeList.cpp: Copied from Source/WebCore/dom/DynamicNodeList.cpp. (WebCore::LiveNodeListBase::rootNode): (WebCore::LiveNodeListBase::invalidateCache): (WebCore::LiveNodeListBase::invalidateIdNameCacheMaps): (WebCore::LiveNodeListBase::reportMemoryUsage): (WebCore::LiveNodeList::namedItem): * dom/LiveNodeList.h: Copied from Source/WebCore/dom/DynamicNodeList.h. (WebCore::LiveNodeListBase::LiveNodeListBase): (WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange): (WebCore::LiveNodeList::LiveNodeList): (WebCore::LiveNodeList::~LiveNodeList): (LiveNodeList): * dom/MicroDataItemList.cpp: (WebCore::MicroDataItemList::MicroDataItemList): * dom/MicroDataItemList.h: * dom/NameNodeList.cpp: (WebCore::NameNodeList::NameNodeList): * dom/NameNodeList.h: * dom/Node.cpp: (WebCore::shouldInvalidateNodeListCachesForAttr): (WebCore::Document::invalidateNodeListCaches): * dom/Node.h: (WebCore): * dom/NodeList.h: (WebCore::NodeList::isLiveNodeList): * dom/NodeRareData.h: (NodeListsNodeData): (WebCore::NodeListsNodeData::removeCacheWithAtomicName): (WebCore::NodeListsNodeData::removeCacheWithName): (WebCore::NodeListsNodeData::removeCacheWithQualifiedName): (WebCore::NodeListsNodeData::adoptTreeScope): * dom/PropertyNodeList.cpp: (WebCore::PropertyNodeList::PropertyNodeList): * dom/PropertyNodeList.h: * dom/TagNodeList.cpp: (WebCore::TagNodeList::TagNodeList): * dom/TagNodeList.h: * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): (WebCore::LiveNodeListBase::iterateForNextNode): (WebCore::LiveNodeListBase::itemBeforeOrAfter): (WebCore::LiveNodeListBase::itemBefore): (WebCore::LiveNodeListBase::itemAfter): (WebCore::LiveNodeListBase::isLastItemCloserThanLastOrCachedItem): (WebCore::LiveNodeListBase::isFirstItemCloserThanCachedItem): (WebCore::LiveNodeListBase::setItemCache): (WebCore::LiveNodeListBase::length): (WebCore::LiveNodeListBase::item): (WebCore::LiveNodeListBase::itemBeforeOrAfterCachedItem): * html/HTMLCollection.h: * html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): * html/LabelsNodeList.h: * html/RadioNodeList.cpp: (WebCore::RadioNodeList::RadioNodeList): * html/RadioNodeList.h: 2012-10-08 Robert Hogan Changing position:relative to position:static results in mis-positioned div https://bugs.webkit.org/show_bug.cgi?id=26397 Reviewed by Ojan Vafai. When a block changes position from relative to static it is no longer the containing block for any positioned objects it may have. If any of those positioned objects actually have a position specified they are going to need a layout as their new containing block will likely have a different location they need to offset from. Positioned objects without a specified position always get a layout anyway in layoutPositionedObjects() so no need to worry about them in this situation. Test: fast/block/abspos-child-container-changes-from-relative-to-static-expected.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleWillChange): (WebCore::RenderBlock::layoutPositionedObjects): (WebCore::RenderBlock::removePositionedObjects): * rendering/RenderBlock.h: (RenderBlock): 2012-11-25 Kent Tamura Correct input[type=number] value sanitization for user-input https://bugs.webkit.org/show_bug.cgi?id=103018 Reviewed by Kentaro Hara. If a number field has non-number string, HTMLInputElement::value is not updated and returns the past valid value. It doesn't match to the value sanitization algorithm defined by the HTML standard [1], and Opera's behavior. We should sanitize non-number strings to "". [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#number-state-(type=number) > The value sanitization algorithm is as follows: If the value of the > element is not a valid floating-point number, then set it to the empty > string instead. No new tests. Update existing tests; fast/forms/number/number-commit-valid-only.html and fast/forms/number/number-unacceptable-style.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): Remove isAcceptableValue check. * html/HTMLInputElement.h: (HTMLInputElement): isAcceptableValue is no longer needed. * html/InputType.cpp: Remove isAcceptableValue. * html/InputType.h: Ditto. * html/NumberInputType.cpp: Ditto. (WebCore::NumberInputType::hasUnacceptableValue): Fold the isAcceptableValue content into this. * html/NumberInputType.h: (NumberInputType): Remove isAcceptableValue. 2012-12-11 Viatcheslav Ostapenko Remove conversion to/from float and float division from ImageFrame::setRGBA https://bugs.webkit.org/show_bug.cgi?id=103693 Reviewed by Brent Fulgham. Replace floating point operations used for alpha premultiply with fixed point arithmetic which is basically integer operations. Allows to shave extra couple percent from decoding images with transparency. Covered by existing tests. * platform/image-decoders/ImageDecoder.h: (ImageFrame): (WebCore::ImageFrame::fixPointUnsignedMultiply): (WebCore::ImageFrame::setRGBA): 2012-11-30 Jer Noble Unreviewed Windows build fix. Add a default: entry to an case statement to fix a build error when compiled in VS2005. * html/MediaController.cpp: (MediaController::playbackState): 2012-11-28 Byungwoo Lee [EFL] Use mutex locker in wakeUp() to ensure thread-safety. https://bugs.webkit.org/show_bug.cgi?id=101132 Reviewed by Gyuyoung Kim. Add mutex locker for the ecore pipe to ensure thread-safety of RunLoop::wakeUp(). RunLoop::wakeUp() can be called by multiple thread. It uses ecore_pipe_write() function but the function is not thread-safe. * platform/RunLoop.h: (RunLoop): * platform/efl/RunLoopEfl.cpp: (WebCore::RunLoop::wakeUp): 2012-11-09 Huang Dongsung Coordinated Graphics: Remove a backing store of GraphicsLayer when the layer is far from the viewport. https://bugs.webkit.org/show_bug.cgi?id=101656 Reviewed by Kenneth Rohde Christiansen. TiledBackingStore computes cover and keep rects to create, keep or remove tiles smartly, but currently TiledBackingStore expects a contents rect is big enough to cover the visibleRect. However, when CoordinatedGraphicsLayer uses TBS, it is usually wrong expectation. We must compute cover and keep rects using the visibleRect, instead of the rect intersecting the visibleRect with m_rect, because TBS can be used as a backing store of GraphicsLayer and the visible rect usually does not intersect with m_rect. In the below case, the intersecting rect is an empty. +---------------+ | | | m_rect | | +-------|-----------------------+ | | HERE | cover or keep | +---------------+ rect | | +---------+ | | | visible | | | | rect | | | +---------+ | | | | | +-------------------------------+ We must create or keep the tiles in the HERE region. Currently in the case, we do not create or keep tiles on the HERE region. Moreover, in the case, we early return, which means we don't remove any tiles. It causes to waste heap and video memory. This patch changes TiledBackingStore to manage tiles smartly for Coordinated Graphics. Changing cache policy is not testable in layout tests. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::visibleRect): (WebCore::TiledBackingStore::visibleAreaIsCovered): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::adjustForContentsRect): (WebCore::TiledBackingStore::removeAllNonVisibleTiles): * platform/graphics/TiledBackingStore.h: (TiledBackingStore): 2012-10-10 Christophe Dumez SQLResultSet.rowsAffected not cleared https://bugs.webkit.org/show_bug.cgi?id=46070 Reviewed by Kenneth Rohde Christiansen. SQLResultSet.rowsAffected is supposed to return the number of rows that were changed by the statement. For "SELECT" statements, it should return 0. However, our implementation currently relies on sqlite3_changes() to compute this value. sqlite3_changes() returns the number of direct row changes in the most recent INSERT, UPDATE, or DELETE statement within the same trigger context. Unfortunately, the most recent INSERT, UPDATE, or DELETE statement may not be the last statement. As a consequence, if you INSERT 1 row, then do a SELECT, SQLResultSet.rowsAffected will be 1 for both the INSERT and the SELECT statements. The proposed solution is to use sqlite3_total_changes() instead of sqlite3_changes(). sqlite3_total_changes() returns the number of row changes caused by INSERT, UPDATE or DELETE statements since the database connection was opened. We now store the value returned by sqlite3_total_changes() before each statement in order to return the count difference in SQLiteDatabase::lastChanges(). Test: storage/websql/execute-sql-rowsAffected.html * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::SQLiteDatabase): (WebCore::SQLiteDatabase::updateLastChangesCount): (WebCore): (WebCore::SQLiteDatabase::lastChanges): * platform/sql/SQLiteDatabase.h: (SQLiteDatabase): * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::step): 2012-11-20 Keishi Hattori Week picker width is too small https://bugs.webkit.org/show_bug.cgi?id=102766 Reviewed by Kent Tamura. The width of week picker was too small because we were forgetting about the week number column when calculating the desired width. No new tests. Covered by week-picker-appearance*.html. * Resources/pagepopups/calendarPicker.css: (.week-mode .week-column): Needs to be table-cell. * Resources/pagepopups/calendarPicker.js: (CalendarPicker.prototype.fixWindowSize): 2012-11-20 Xabier Rodriguez Calvar [GTK] no volume slider in HTML5 media element controls https://bugs.webkit.org/show_bug.cgi?id=97192 Reviewed by Philippe Normand. r115829 was causing this regression so it was partially reverted. The revert causes some small regressions, in the tests but it is better to have the volume slider shown. * css/mediaControlsGtk.css: (audio::-webkit-media-controls-panel) (video::-webkit-media-controls-panel): Partially reverted r115829. 2012-11-19 Antti Koivisto Collect user style sheets in DocumentStyleSheetCollection https://bugs.webkit.org/show_bug.cgi?id=102683 Reviewed by Andreas Kling. Move the user stylesheet collection logic from StyleResolver to DocumentStyleSheetCollection. * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::collectRulesFromUserStyleSheets): (WebCore::collectCSSOMWrappers): * css/StyleResolver.h: (StyleResolver): * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::pageUserStyleSheet): (WebCore::DocumentStyleSheetCollection::clearPageUserStyleSheet): (WebCore::DocumentStyleSheetCollection::updatePageUserStyleSheet): (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange): (WebCore::collectActiveStyleSheetsFromSeamlessParents): (WebCore::DocumentStyleSheetCollection::updateStyleResolver): Factor the StyleResolver updating code to function. (WebCore): (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Collect the user style sheets. Some renaming and other minor refactoring. (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): * dom/DocumentStyleSheetCollection.h: (WebCore::DocumentStyleSheetCollection::activeUserStyleSheets): Add activeUserStyleSheets vector that contains all user stylesheets from different sources, similar to activeAuthorStyleSheets. (DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets): 2012-11-20 Elliott Sprehn Remove unneeded optimization in Element::isInTopLayer https://bugs.webkit.org/show_bug.cgi?id=102772 Reviewed by Andreas Kling. There's no reason to worry about calling elementRareData() multiple times in this non performance sensitive code path as it's only used in HTMLDialogElement's showModal and close methods. No new tests, just simplification. * dom/Element.cpp: (WebCore::Element::setIsInTopLayer): 2012-11-20 Elliott Sprehn Simplify Element::isSpellCheckingEnabled https://bugs.webkit.org/show_bug.cgi?id=102779 Reviewed by Andreas Kling. isSpellCheckingEnabled contains logic that duplicates parentOrHostElement and can be simplified by just calling that. No new tests, just simplification. * dom/Element.cpp: (WebCore::Element::isSpellCheckingEnabled): 2012-11-20 Kihong Kwon Apply DeviceController as parent class of DeviceMotionController. https://bugs.webkit.org/show_bug.cgi?id=102578 Reviewed by Hajime Morita. DeviceController needs to be applied as parent class of DeviceMotionController because DeviceController which is extracted as parent class of DeviceMotionController and DeviceOrientationController is already added. Therefore duplicated implementation can be removed. Covered by existing tests. * dom/DeviceMotionClient.h: * dom/DeviceMotionController.cpp: (WebCore::DeviceMotionController::DeviceMotionController): (WebCore::DeviceMotionController::didChangeDeviceMotion): (WebCore::DeviceMotionController::deviceMotionClient): (WebCore::DeviceMotionController::hasLastData): (WebCore::DeviceMotionController::getLastEvent): (WebCore::DeviceMotionController::from): (WebCore): * dom/DeviceMotionController.h: (WebCore): (WebCore::DeviceMotionController::~DeviceMotionController): (DeviceMotionController): * dom/Document.cpp: Remove all implementations which are related DeviceOrientationEvnet and DeviceMotionEvent. Because DeviceController checks suspend and stop status of active dom object before dispatchEvent. (WebCore::Document::suspendActiveDOMObjects): (WebCore::Document::resumeActiveDOMObjects): * loader/EmptyClients.h: * page/DOMWindow.cpp: (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::removeEventListener): (WebCore::DOMWindow::removeAllEventListeners): 2012-11-20 Kentaro Hara [V8] Remove V8ParameterBase https://bugs.webkit.org/show_bug.cgi?id=102774 Reviewed by Adam Barth. V8ParameterBase is a redundant indirection. We can flatten methods of V8ParameterBase to V8Parameter. No tests. No change in behavior. * bindings/v8/V8StringResource.h: (WebCore::V8Parameter::V8Parameter): (V8Parameter): (WebCore::V8Parameter::toString): (WebCore::::prepare): 2012-11-20 Kunihiko Sakamoto Use localized date-time format in datetime input https://bugs.webkit.org/show_bug.cgi?id=102769 Reviewed by Kent Tamura. Move the implementation of Locale::dateTimeFormatWithSeconds and Locale::dateTimeFormatWithoutSeconds to its subclasses and use platform-specific methods to get date-time pattern. Because Windows does not provide an API to get date-time pattern. We use fixed "{date} {time}" pattern for Windows. Test: fast/forms/datetime/datetime-appearance-l10n.html * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::initializeDateTimeFormat): Retrieve datetime formats too. (WebCore::LocaleICU::dateTimeFormatWithSeconds): Added. (WebCore): (WebCore::LocaleICU::dateTimeFormatWithoutSeconds): Added. * platform/text/LocaleICU.h: (LocaleICU): Add m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds. * platform/text/LocaleNone.cpp: (LocaleNone): (WebCore::LocaleNone::dateTimeFormatWithSeconds): Added. Always returns "dd/MM/yyyyy HH:mm:ss". (WebCore): (WebCore::LocaleNone::dateTimeFormatWithoutSeconds): Added. Always returns "dd/MM/yyyyy HH:mm". * platform/text/PlatformLocale.cpp: (WebCore): Remove dateTimeFormatWithSeconds() and dateTimeFormatWithoutSeconds() as these are now pure virtual. * platform/text/PlatformLocale.h: (Locale): Make dateTimeFormatWithSeconds() and dateTimeFormatWithoutSeconds() pure virtual. * platform/text/mac/LocaleMac.h: (LocaleMac): Add m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::dateTimeFormatterWithSeconds): Added. (WebCore): (WebCore::LocaleMac::dateTimeFormatterWithoutSeconds): Added. (WebCore::LocaleMac::dateTimeFormatWithSeconds): Added. (WebCore::LocaleMac::dateTimeFormatWithoutSeconds): Added. * platform/text/win/LocaleWin.cpp: (WebCore::LocaleWin::dateTimeFormatWithSeconds): Copied from original Locale::dateTimeFormatWithSeconds(). (WebCore): (WebCore::LocaleWin::dateTimeFormatWithoutSeconds): Copied from original Locale::dateTimeFormatWithoutSeconds(). * platform/text/win/LocaleWin.h: (LocaleWin): Add m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds. 2012-11-20 Sheriff Bot Unreviewed, rolling out r135257. http://trac.webkit.org/changeset/135257 https://bugs.webkit.org/show_bug.cgi?id=102777 Broke Chromium Debug compilation (Requested by yurys on #webkit). * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::getNode): 2012-11-20 Vsevolod Vlasov Web Inspector: Revert r133149: breaks revision reverting https://bugs.webkit.org/show_bug.cgi?id=102672 Reviewed by Yury Semikhatsky. * inspector/front-end/JavaScriptSourceFrame.js: (WebInspector.JavaScriptSourceFrame): (WebInspector.JavaScriptSourceFrame.prototype._onFormattedChanged): (WebInspector.JavaScriptSourceFrame.prototype._onWorkingCopyCommitted): (WebInspector.JavaScriptSourceFrame.prototype._innerSetContent): 2012-11-19 Csaba Osztrogonác [Qt][Win] Unreviewed speculative buildfix after r135217. * platform/win/WindowsExtras.h: 2012-11-19 Yury Semikhatsky Unreviewed. Fix Chromium Win compilation after r135255. https://bugs.webkit.org/show_bug.cgi?id=97803 * WebCore.gypi: removed reference to platform/wince/DragDataWince.cpp which was deleted in the aforementioned change. 2012-11-19 Kentaro Hara [V8] Merge getCachedWrapper(Node*) into DOMDataStore https://bugs.webkit.org/show_bug.cgi?id=102158 Reviewed by Adam Barth. A follow-up patch for r135230. This patch adds a correct ASSERTION. No tests. No change in behavior. * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::getNode): 2012-11-19 Kentaro Hara [JSC] Replace $implClassName with $interfaceName in CodeGeneratorJS.pm https://bugs.webkit.org/show_bug.cgi?id=102757 Reviewed by Adam Barth. In CodeGeneratorJS.pm $implClassName and $interfaceName are equivalent. We're using them interchangeably. We should replace $implClassName with $interfaceName. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (AddClassForwardIfNeeded): (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeader): (GenerateOverloadedFunction): (GenerateImplementation): (GenerateParametersCheck): (GenerateImplementationFunctionCall): (NativeToJSValue): 2012-11-19 Patrick Gansterer Port DragDataWin.cpp to WinCE https://bugs.webkit.org/show_bug.cgi?id=97803 Reviewed by Brent Fulgham. Add two simple #if OS(WINCE) to DragDataWin.cpp, so it can be used by the WinCE port too. * PlatformWinCE.cmake: * platform/win/DragDataWin.cpp: (WebCore::DragData::containsFiles): (WebCore::DragData::numberOfFiles): (WebCore::DragData::asFilenames): * platform/wince/DragDataWinCE.cpp: Removed. 2012-11-19 Pan Deng [Web Inspector] This patch makes script line number search-able in Timeline panel. https://bugs.webkit.org/show_bug.cgi?id=101910. Reviewed by Pavel Feldman. Script line number is visible in Timeline panel, however, not search-able. This patch makes it search-able. No new tests. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelineRecordListRow.prototype.update): (WebInspector.TimelineRecordListRow.testContentMatching): * inspector/front-end/TimelinePresentationModel.js: (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview): (WebInspector.TimelinePresentationModel.Record.prototype._refreshDetails): (WebInspector.TimelinePresentationModel.Record.prototype.detailsNode): (WebInspector.TimelinePresentationModel.Record.prototype._createSpanWithText): (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails): 2012-11-19 Elliott Sprehn Remove unneeded null check in NodeRendererFactory::createRendererIfNeeded https://bugs.webkit.org/show_bug.cgi?id=102765 Reviewed by Ojan Vafai. If parentRenderer() was null then we return early from createRendererIfNeeded() because shouldCreateRenderer() will return false so there's no reason to check for it again. Additionally if either parentRenderer() or style() is null then implementations of rendererIsNeeded() will crash, so add asserts to make this assumption more clear. No new tests, just simplification. * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererIfNeeded): 2012-11-19 Shinya Kawanaka [Refactoring] Remove WebCore::isInsertionPoint(Node*) https://bugs.webkit.org/show_bug.cgi?id=102756 Reviewed by Hajime Morita. Now that WebCore::isInsertionPoint(Node* node) does nothing special. We can remove this. No new tests, simple refactoring. * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): * dom/ContainerNode.cpp: (WebCore::childAttachedAllowedWhenAttachingChildren): * html/shadow/ContentDistributor.cpp: (WebCore::ContentDistributor::invalidate): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::isActive): * html/shadow/InsertionPoint.h: (WebCore::toInsertionPoint): (WebCore::isActiveInsertionPoint): (WebCore::isLowerEncapsulationBoundary): (WebCore::parentNodeForDistribution): * testing/Internals.cpp: (WebCore::Internals::isValidContentSelect): 2012-11-19 Shinya Kawanaka [Refactoring] Remove shadowPseudoId() and use setPseudo() in ElementShadow. https://bugs.webkit.org/show_bug.cgi?id=101703 Reviewed by Hajime Morita. We're migrating shadowPseudoId() to pseudo(). We remove shadowPseudoId() from HTMLKeygenElement and use setPseudo()/pseudo() instead. No new tests, simple refactoring. * html/shadow/ProgressShadowElement.cpp: (WebCore::ProgressInnerElement::ProgressInnerElement): * html/shadow/ProgressShadowElement.h: (ProgressInnerElement): (WebCore::ProgressBarElement::ProgressBarElement): (ProgressBarElement): (WebCore::ProgressValueElement::ProgressValueElement): 2012-11-19 Yury Semikhatsky Unreviewed. Fix Chromium Debug compilation after r135230. https://bugs.webkit.org/show_bug.cgi?id=102158 Removed ASSERT that used instance field in a static method. * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::getWrapperFromObject): 2012-11-19 Chris Guan [Blackberry] When a frame is being detached, cancel all its network jobs. https://bugs.webkit.org/show_bug.cgi?id=102758 Reviewed by George Staikos. I use FrameDestructionObserver to refactor Networkjob code. NetworkJob is inheriting from FrameDestructionObserver to be aware of frame's destroyed. When a frame is being detached, the willDetachPage() can be called in which we can cancel the job. This patch reverted the fix for RIM PR134207 as well. Manually test is on "http://www.reuters.com/article/2012/01/27/us-greece-idUSTRE80P0DE20120127" which triggers a ping loader. No behavior changed, no new layout tests. * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::NetworkJob): (WebCore::NetworkJob::initialize): (WebCore::NetworkJob::handleNotifyHeaderReceived): (WebCore::NetworkJob::startNewJobWithRequest): (WebCore::NetworkJob::frameDestroyed): (WebCore): (WebCore::NetworkJob::willDetachPage): * platform/network/blackberry/NetworkJob.h: (NetworkJob): * platform/network/blackberry/NetworkManager.cpp: (WebCore::NetworkManager::startJob): * platform/network/blackberry/NetworkManager.h: (NetworkManager): * platform/network/blackberry/ResourceHandleBlackBerry.cpp: (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::loadResourceSynchronously): 2012-11-19 Matt Falkenhagen Implement the new stacking layer needed by the Fullscreen API and the new element https://bugs.webkit.org/show_bug.cgi?id=84796 Reviewed by Julien Chaffraix. This adds the top layer element stack to Document. The Fullscreen specification mandates that we track the ordering of the DOM nodes in the top layer, not the renderers. That makes it hard to implement on the rendering side only. Elements in the top layer get a layer. Layers in the top layer are added to the root layer's child list after normal layers and in the order of the top layer stack. This way, the top layer appears above all other stacking contexts and in the desired order. In addition, top layer renderers are added as children of RenderView in top layer order. This is to satisfy requirements such as the containing block of an element in the top layer is the initial containing block. It also allows RenderLayer to know the proper stacking order of the layers without going directly from the top layer elements to their layers. So far, only modal dialog elements can be added to the top layer. The plan is to make the Fullscreen API also use the top layer. Tests: fast/dom/HTMLDialogElement/top-layer-containing-block.html fast/dom/HTMLDialogElement/top-layer-display-none.html fast/dom/HTMLDialogElement/top-layer-nesting.html fast/dom/HTMLDialogElement/top-layer-stacking-dynamic.html fast/dom/HTMLDialogElement/top-layer-stacking.html * WebCore.exp.in: * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): Elements in the top layer have a stacking context. * dom/Document.cpp: (WebCore): (WebCore::Document::addToTopLayer): (WebCore::Document::removeFromTopLayer): * dom/Document.h: (Document): (WebCore::Document::topLayerElements): Add the top layer element stack to Document. * dom/Element.cpp: (WebCore::Element::removedFrom): (WebCore): (WebCore::Element::isInTopLayer): (WebCore::Element::setIsInTopLayer): * dom/Element.h: * dom/ElementRareData.h: (ElementRareData): * dom/Node.cpp: (WebCore::Node::detach): Add an exception to the assert since top layer elements and their descendants are moved from their regular position in the render tree. * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): (NodeRareData): (WebCore::NodeRareData::isInTopLayer): (WebCore::NodeRareData::setIsInTopLayer): * dom/NodeRenderingContext.cpp: (WebCore): (WebCore::adjustInsertionPointForTopLayerElement): (WebCore::NodeRendererFactory::createRendererIfNeeded): Add renderers for top layer elements as children of RenderView, and in top layer stacking order. * html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::showModal): * rendering/RenderLayer.cpp: (WebCore): (WebCore::RenderLayer::isInTopLayer): (WebCore::RenderLayer::isInTopLayerSubtree): (WebCore::RenderLayer::rebuildZOrderLists): Add the top layer stack after normal layer collection. (WebCore::RenderLayer::collectLayers): Avoid adding layers for top layer elements during normal layer collection. * rendering/RenderLayer.h: (RenderLayer): 2012-11-19 Kentaro Hara In CodeGeneratorObj.pm we should rename $dataNode to $interface. https://bugs.webkit.org/show_bug.cgi?id=102749 Reviewed by Adam Barth. $dataNode is misnamed. It should be renamed to $interface. No tests. No change in behavior. * bindings/scripts/CodeGeneratorObjC.pm: (GenerateInterface): (GetParentImplClassName): (GetParentAndProtocols): (GenerateHeader): (GenerateImplementation): 2012-11-19 Kentaro Hara In CodeGeneratorV8.pm, we should rename $dataNode to $interface https://bugs.webkit.org/show_bug.cgi?id=102747 Reviewed by Adam Barth. $dataNode is misnamed. It should be $interface. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateInterface): (NeedsCustomOpaqueRootForGC): (GetGenerateIsReachable): (GetCustomIsReachable): (GenerateOpaqueRootForGC): (GenerateHeader): (GetInternalFields): (GenerateHeaderCustomInternalFieldIndices): (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateHeaderCustomCall): (IsConstructable): (GenerateConstructorGetter): (GenerateNormalAttrGetter): (GenerateReplaceableAttrSetter): (GenerateNormalAttrSetter): (GenerateOverloadedFunctionCallback): (GenerateFunctionCallback): (GenerateArgumentsCountCheck): (GenerateOverloadedConstructorCallback): (GenerateSingleConstructorCallback): (GenerateConstructorCallback): (GenerateEventConstructorCallback): (GenerateTypedArrayConstructorCallback): (GenerateNamedConstructorCallback): (GenerateBatchedAttributeData): (IsStandardFunction): (GenerateNonStandardFunction): (GenerateImplementationIndexer): (GenerateImplementationNamedPropertyGetter): (GenerateImplementationCustomCall): (GenerateImplementationMasqueradesAsUndefined): (GenerateImplementation): (GenerateHeaderContentHeader): (GenerateImplementationContentHeader): (GenerateCallbackHeader): (GenerateCallbackImplementation): (BaseInterfaceName): (GenerateToV8Converters): (GetNativeTypeForConversions): (GetTypeNameOfExternalTypedArray): (WriteData): 2012-11-19 Keishi Hattori Move in animation should be disabled until the calendar picker is loaded. https://bugs.webkit.org/show_bug.cgi?id=102661 Reviewed by Kent Tamura. On weeks where the first day is in the previous month (e.x. 2013-W01) the move in animation happens when you open the calendar picker. This patch disables the move in animation until the calendar picker is fully loaded. No new tests. * Resources/pagepopups/calendarPicker.js: (CalendarPicker): (CalendarPicker.prototype._handleWindowResize): (DaysTable.prototype._startMoveInAnimation): 2012-11-19 Elliott Sprehn Clean up loop in NodeRenderingContext::nextRenderer and previousRenderer https://bugs.webkit.org/show_bug.cgi?id=102743 Reviewed by Hajime Morita. Clean up while (true) loops in NodeRenderingContext reducing the amount of code and the need for ASSERT_NOT_REACHED. No new tests, just simplifcation. * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::nextRenderer): (WebCore::NodeRenderingContext::previousRenderer): 2012-11-19 Shinya Kawanaka [Shadow] attribute pseudo should return empty string instead of null when nothing is specified. https://bugs.webkit.org/show_bug.cgi?id=102753 Reviewed by Hajime Morita. The ShadowDOM spec is changed so that attribute 'pseudo' returns empty string instead of null when no value is set. Test: fast/dom/shadow/pseudo-attribute.html * dom/Element.idl: 2012-11-19 Kentaro Hara In CodeGeneratorGObject.pm we should rename $dataNode to $interface https://bugs.webkit.org/show_bug.cgi?id=102751 Reviewed by Adam Barth. $dataNode is misnamed. It should be $interface. No tests. No change in behavior. * bindings/scripts/CodeGeneratorGObject.pm: (GetParentClassName): (GetParentGObjType): (GenerateProperties): (GenerateFunctions): (GenerateCFile): (GenerateEventTargetIface): (Generate): (WriteData): (GenerateInterface): 2012-11-19 Kentaro Hara In CodeGenerator.pm we should rename $dataNode to $interface https://bugs.webkit.org/show_bug.cgi?id=102754 Reviewed by Adam Barth. $dataNode is misnamed. It should be $interface. No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (ForAllParents): (AddMethodsConstantsAndAttributesFromParentInterfaces): (FindSuperMethod): (IsConstructorTemplate): (LinkOverloadedFunctions): (GenerateCompileTimeCheckForEnumsIfNeeded): (GetVisibleInterfaceName): (IsSubType): 2012-11-19 Kentaro Hara In CodeGeneratorCPP.pm we should rename $dataNode to $interface https://bugs.webkit.org/show_bug.cgi?id=102752 Reviewed by Adam Barth. $dataNode is misnamed. It should be $interface. No tests. No change in behavior. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateInterface): (GetParentImplClassName): (GetParent): (GenerateHeader): (GenerateImplementation): 2012-11-19 Kentaro Hara In CodeGeneratorJS.pm we should rename $dataNode to $interface https://bugs.webkit.org/show_bug.cgi?id=102748 Reviewed by Adam Barth. $dataNode is misnamed. It should be $interface. No tests. No change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (GenerateInterface): (GetParentClassName): (GetGenerateIsReachable): (GetCustomIsReachable): (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): (GenerateHeaderContentHeader): (GenerateImplementationContentHeader): (ShouldGenerateToJSDeclaration): (ShouldGenerateToJSImplementation): (GenerateHeader): (GenerateAttributesHashTable): (GenerateOverloadedFunction): (GenerateImplementation): (GenerateArgumentsCountCheck): (GenerateParametersCheck): (GenerateCallbackHeader): (GenerateCallbackImplementation): (WriteData): (GenerateConstructorDeclaration): (GenerateConstructorDefinition): (IsConstructable): 2012-11-19 Adam Barth [V8] Merge getCachedWrapper(Node*) into DOMDataStore https://bugs.webkit.org/show_bug.cgi?id=102158 Reviewed by Eric Seidel. This patch is an incremental step towards fully merging the Node code path with the general code path. After this patch, at least Nodes flow through the same class. * Modules/indexeddb/IDBTransactionCoordinator.h: * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateToV8Converters): * bindings/v8/DOMDataStore.h: (WebCore::DOMDataStore::getNode): (DOMDataStore): (WebCore::DOMDataStore::getWrapperFromObject): * bindings/v8/DOMWrapperWorld.cpp: (WebCore::DOMWrapperWorld::DOMWrapperWorld): (WebCore): * bindings/v8/DOMWrapperWorld.h: (WebCore): (DOMWrapperWorld): * bindings/v8/V8DOMWrapper.h: (V8DOMWrapper): 2012-11-19 Kentaro Hara In the IDL parser, we should rename $dataNode to $interface https://bugs.webkit.org/show_bug.cgi?id=102746 Reviewed by Adam Barth. $dataNode is misnamed. It should be $interface. No tests. No change in behavior. * bindings/scripts/IDLParser.pm: (parseInterface): (parseException): (parseAttributeOrOperationRest): (parseOperationOrIterator): (parseSpecialOperation): (parseInterfaceOld): (parseExceptionOld): (parseAttributeOrOperationOrIteratorOld): (parseAttributeOrOperationRestOld): (applyMemberList): (applyExtendedAttributeList): * bindings/scripts/generate-bindings.pl: * bindings/scripts/preprocess-idls.pl: (checkIDLAttributes): 2012-11-19 Adam Klein MutationObserver wrapper should not be collected while still observing https://bugs.webkit.org/show_bug.cgi?id=102328 Reviewed by Adam Barth. Use the new opaqueRootForGC helper in V8GCController to put each MutationObserver wrapper in the same object group as the nodes it's observing. Only includes V8 impl for now, JSC impl coming soon. Tests: fast/mutation/observer-wrapper-dropoff-transient.html fast/mutation/observer-wrapper-dropoff.html * bindings/v8/V8GCController.cpp: Add custom code for MutationObserver with a FIXME to move this out once we update the opaque roots API. * dom/MutationObserver.cpp: (WebCore::MutationObserver::getObservedNodes): Plumbing to expose the observed nodes to the GC controller. (WebCore): * dom/MutationObserver.h: * dom/MutationObserverRegistration.cpp: (WebCore::MutationObserverRegistration::addRegistrationNodesToSet): More plumbing. (WebCore): * dom/MutationObserverRegistration.h: (MutationObserverRegistration): 2012-11-19 Tony Chang Move more non-settings out of InternalSettings https://bugs.webkit.org/show_bug.cgi?id=102711 Reviewed by Adam Barth. Remove userPreferredLanguages, setUserPreferredLanguages and allowRoundingHacks from internal.settings since they are already exposed by window.internals (in fact, no one calls the internal.settings version). Move setUsesOverlayScrollbars from internals.settings to internals because it is a global (static) setting and not tied to the lifetime of the Settings object. No new tests, there should be no behavior change since this is a refactor. * testing/InternalSettings.cpp: (WebCore::InternalSettings::reset): Remove custom reset code. (WebCore::InternalSettings::setUsesOverlayScrollbars): Add exception code handling to make it more consistent with other settings setters. * testing/InternalSettings.h: * testing/InternalSettings.idl: Remove unnecessary methods. * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): Reset userPreferredLanguages, allowRoundingHacks and overlay scrollbars. (WebCore::Internals::userPreferredLanguages): Don't go through InternalSettings. (WebCore::Internals::setUserPreferredLanguages): Don't go through InternalSettings. (WebCore::Internals::setUsesOverlayScrollbars): Moved from InternalsSettings. (WebCore::Internals::allowRoundingHacks): Don't go through InternalSettings. 2012-11-19 David Grogan IndexedDB: Complex series of opens/deleteDatabase fails an ASSERT https://bugs.webkit.org/show_bug.cgi?id=101810 Reviewed by Tony Chang. Tests - storage/indexeddb/deletedatabase-delayed-by-versionchange.html * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::processPendingCalls): The condition tested by this assert is a valid state. 2012-11-19 Peter Wang Web Inspector: [JSC] worker debugger shouldn't stop for "willExecuteProgram" instruction https://bugs.webkit.org/show_bug.cgi?id=102637 Reviewed by Timothy Hatcher. Override the interface "willExecuteProgram" to let WorkerScriptDebugServer to avoid to stop for it. No new DRT test case. Sorry, so far it seems impossible to write a case to controle the popupped worker inspector window. * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::createCallFrame): (WebCore::ScriptDebugServer::callEvent): (WebCore::ScriptDebugServer::willExecuteProgram): * bindings/js/ScriptDebugServer.h: (ScriptDebugServer): * bindings/js/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::willExecuteProgram): (WebCore): * bindings/js/WorkerScriptDebugServer.h: (WorkerScriptDebugServer): 2012-11-19 Pratik Solanki For single element arrays use the pointer into the CFDataRef instead of copying data https://bugs.webkit.org/show_bug.cgi?id=102306 Reviewed by Brent Fulgham. Address review comments for slightly nicer code. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::data): * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::singleDataArrayBuffer): 2012-11-19 Chris Rogers Remove empirical bass-boost for HRTF spatialization https://bugs.webkit.org/show_bug.cgi?id=102745 Reviewed by Kenneth Russell. Some empirically-based post-processing is being removed so that we'll now process with the exact HRTF impulse response measurements. Listening tests have determined that this post-processing is not necessary. * platform/audio/HRTFElevation.cpp: (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation): * platform/audio/HRTFKernel.cpp: (WebCore::HRTFKernel::HRTFKernel): * platform/audio/HRTFKernel.h: (WebCore::HRTFKernel::create): (HRTFKernel): 2012-11-19 Adam Barth DISALLOW_COPY_AND_ASSIGN is not a WebKit macro https://bugs.webkit.org/show_bug.cgi?id=102755 Reviewed by Sam Weinig. WTF_MAKE_NONCOPYABLE is the idiom we use in WebKit. I don't understand how this compiles. * Modules/indexeddb/IDBBackingStore.h: (RecordIdentifier): 2012-11-19 Chris Rogers Implement .detune attribute for BiquadFilterNode https://bugs.webkit.org/show_bug.cgi?id=102737 Reviewed by Kenneth Russell. Similar to OscillatorNode, BiquadFilterNode must have a .detune attribute Tests changed: webaudio/biquad-lowpass.html * Modules/webaudio/BiquadDSPKernel.cpp: (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary): * Modules/webaudio/BiquadFilterNode.h: (WebCore::BiquadFilterNode::detune): * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/BiquadProcessor.cpp: (WebCore::BiquadProcessor::BiquadProcessor): (WebCore::BiquadProcessor::checkForDirtyCoefficients): * Modules/webaudio/BiquadProcessor.h: (WebCore::BiquadProcessor::parameter4): (BiquadProcessor): 2012-11-19 Patrick Gansterer [WIN] Add WebCore::getRegistryValue() https://bugs.webkit.org/show_bug.cgi?id=97828 Reviewed by Brent Fulgham. The new function adds an abstraction to SHGetValue(), which isn't available on WinCE. Changing the existing files allows us to share more code between WinCE and WinNT in a next step. * platform/win/MIMETypeRegistryWin.cpp: (WebCore::mimeTypeForExtension): (WebCore): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): * platform/win/WindowsExtras.h: (WebCore::getRegistryValue): (WebCore): * plugins/win/PluginDatabaseWin.cpp: (WebCore::addPluginPathsFromRegistry): (WebCore::addWindowsMediaPlayerPluginDirectory): (WebCore::addQuickTimePluginDirectory): (WebCore::addAdobeAcrobatPluginDirectory): (WebCore::addJavaPluginDirectory): 2012-11-19 Alpha Lam Not reviewed. Build fix for Chromium. Added SkTypes.h includes for Windows. * platform/graphics/chromium/ImageDecodingStore.h: * platform/graphics/chromium/ImageFrameGenerator.h: * platform/graphics/chromium/LazyDecodingPixelRef.h: 2012-11-19 Adam Barth [V8] Simplify V8DOMWindowShell::getEntered https://bugs.webkit.org/show_bug.cgi?id=102156 Reviewed by Eric Seidel. This patch is an incremental step towards merging V8DOMWrapper::getCachedWrapper(Node*) with the general case for looking up DOM wrappers. In order to merge with the general case, we need to get down to calling v8::Context::GetCurrent once, which means we need to factor the call to v8::Context::GetEntered out of V8DOMWindowShell. As a side-benefit to this change, we can remove some redundant checks for isolatedWorldsExist and v8::Context::InContext from callers of V8DOMWindowShell::getEntered, including in getCachedWrapper. * bindings/v8/DOMDataStore.cpp: (WebCore::DOMDataStore::current): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy): (WebCore::ScriptController::currentWorldContext): * bindings/v8/V8DOMWindowShell.h: (WebCore::V8DOMWindowShell::isolated): (WebCore::V8DOMWindowShell::perContextData): (WebCore::V8DOMWindowShell::world): (V8DOMWindowShell): * bindings/v8/V8DOMWrapper.h: (WebCore::V8DOMWrapper::getCachedWrapper): * bindings/v8/WorldContextHandle.cpp: (WebCore::WorldContextHandle::WorldContextHandle): * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::dispatchWrapCustom): * bindings/v8/custom/V8HTMLDocumentCustom.cpp: (WebCore::V8HTMLDocument::dispatchWrapCustom): * bindings/v8/custom/V8SVGDocumentCustom.cpp: (WebCore::V8SVGDocument::dispatchWrapCustom): * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: (WebCore::V8XMLHttpRequest::constructorCallback): 2012-11-19 Kentaro Hara Rename idlDocument::classes to idlDocument::interfaces in the IDL parser https://bugs.webkit.org/show_bug.cgi?id=102671 Reviewed by Adam Barth. Most part of code generators use 'interface'. The spec uses 'interface'. Thus, the IDL parser should use 'interface' instead of 'class'. No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (ProcessDocument): (AddMethodsConstantsAndAttributesFromParentInterfaces): (ParseInterface): * bindings/scripts/CodeGeneratorCPP.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GenerateFunctionCallback): * bindings/scripts/IDLParser.pm: (Parse): (parseModule): * bindings/scripts/generate-bindings.pl: 2012-11-19 Eric Carlson HTMLMediaElement::configureTextTracks should configure all text tracks https://bugs.webkit.org/show_bug.cgi?id=102561 Reviewed by Philippe Normand. No new tests, track-mode-not-changed-by-new-track.html was updated to test the changes. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::textTrackModeChanged): HTMLTrackElement -> TextTrack. (WebCore::HTMLMediaElement::willRemoveTrack): Ditto. (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto. (WebCore::HTMLMediaElement::configureTextTracks): Ditto. (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Ditto. * html/HTMLMediaElement.h: * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::HTMLTrackElement): Move hasBeenConfigured down to TextTrack. (WebCore::HTMLTrackElement::parseAttribute): isDefault is stored on TextTrack. (WebCore::HTMLTrackElement::ensureTrack): LoadableTextTrack constructor doesn't take "default" argument. * html/HTMLTrackElement.h: * html/track/LoadableTextTrack.cpp: (WebCore::LoadableTextTrack::LoadableTextTrack): Initialize m_isDefault to false. * html/track/LoadableTextTrack.h: (WebCore::TextTrack::isDefault): Override base class implementation, because a track element can be flagged as default. (WebCore::TextTrack::setIsDefault): Ditto. * html/track/TextTrack.cpp: (WebCore::TextTrack::TextTrack): Initialize m_hasBeenConfigured. * html/track/TextTrack.h: (WebCore::TextTrack::hasBeenConfigured): New, moved from HTMLTrackElement so other code doesn't need know what type of track it is calling. (WebCore::TextTrack::setHasBeenConfigured): Ditto. (WebCore::TextTrack::isDefault): Base, do nothing, implementation because only LoadableTextTrack can be "default". (WebCore::TextTrack::setIsDefault): Ditto. 2012-11-19 Huang Dongsung Coordinated Graphics: refactor syncCanvas to handle the lifecycle clearly. https://bugs.webkit.org/show_bug.cgi?id=102664 Reviewed by Noam Rosenthal. As refactoring Coordinated Graphics in WebKit2, code related to TextureMapper is changed. No new tests. Refactoring only. * platform/graphics/qt/GraphicsContext3DQt.cpp: (GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::platformLayerSize): We need to know the size of a texture mapper platform layer. (WebCore): * platform/graphics/texmap/TextureMapperBackingStore.cpp: Because CoordinatedGraphicsLayer handles the canvas GraphicsSurface lifecycle, TextureMapperSurfaceBackingStore does not need to know GraphicsSurfaceToken. (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface): (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded): (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper): * platform/graphics/texmap/TextureMapperBackingStore.h: (TextureMapperSurfaceBackingStore): * platform/graphics/texmap/TextureMapperPlatformLayer.h: (WebCore::TextureMapperPlatformLayer::platformLayerSize): 2012-11-19 Alpha Lam [chromium] Lazy image decoding without cache https://bugs.webkit.org/show_bug.cgi?id=102021 Reviewed by Stephen White. Goal of this change is to make image decoding in ImageFrameGenerator completely lazy without caching. Image decoding logic is then removed from ImageDecodingStore. These methods are removed. - ImageDecodingStore::lockPixels - ImageDecodingStore::unlockPixels Instead image decoding and scaling is done in ImageFrameGenerator::decodeAndScale(). Unit tests are updated: DeferredImageDecoderTest::drawIntoSkPicture DeferredImageDecoderTest::drawScaledIntoSkPicture Also covered by layout tests: platform/chromium/virtual/deferred * platform/graphics/chromium/DeferredImageDecoder.cpp: (WebCore::DeferredImageDecoder::createLazyDecodingBitmap): * platform/graphics/chromium/ImageDecodingStore.h: (ImageDecodingStore): * platform/graphics/chromium/ImageFrameGenerator.cpp: (WebCore::ImageFrameGenerator::ImageFrameGenerator): (WebCore::ImageFrameGenerator::~ImageFrameGenerator): (WebCore::ImageFrameGenerator::setData): (WebCore::ImageFrameGenerator::decodeAndScale): * platform/graphics/chromium/ImageFrameGenerator.h: (WebCore::ImageFrameGenerator::create): (ImageFrameGenerator): * platform/graphics/chromium/LazyDecodingPixelRef.cpp: (WebCore::LazyDecodingPixelRef::onLockPixels): (WebCore::LazyDecodingPixelRef::onUnlockPixels): * platform/graphics/chromium/LazyDecodingPixelRef.h: (LazyDecodingPixelRef): 2012-11-19 Abhishek Arya Crash in ApplyStyleCommand::cleanupUnstyledAppleStyleSpans. https://bugs.webkit.org/show_bug.cgi?id=100150 Reviewed by Ryosuke Niwa. RefPtr startDummySpanAncestor and endDummySpanAncestor since they can go away inside fixRangeAndApplyInlineStyle call. Test: editing/style/apply-style-crash.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): 2012-11-19 Sheriff Bot Unreviewed, rolling out r135172. http://trac.webkit.org/changeset/135172 https://bugs.webkit.org/show_bug.cgi?id=102710 Broke some WebKit2 api tests :( (Requested by japhet on #webkit). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::~DocumentLoader): (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::clearMainResourceLoader): (WebCore::DocumentLoader::isLoadingInAPISense): (WebCore::DocumentLoader::documentURL): (WebCore::DocumentLoader::isLoadingMainResource): (WebCore::DocumentLoader::startLoadingMainResource): * loader/DocumentLoader.h: (DocumentLoader): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::init): * loader/FrameLoaderStateMachine.cpp: (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine): * loader/FrameLoaderStateMachine.h: * loader/MainResourceLoader.cpp: (WebCore::shouldLoadAsEmptyDocument): (WebCore): (WebCore::MainResourceLoader::continueAfterContentPolicy): (WebCore::MainResourceLoader::didReceiveResponse): (WebCore::MainResourceLoader::didFinishLoading): (WebCore::MainResourceLoader::handleEmptyLoad): (WebCore::MainResourceLoader::loadNow): (WebCore::MainResourceLoader::load): * loader/MainResourceLoader.h: (MainResourceLoader): 2012-11-19 Tony Chang Remove 'is' prefix from WebSettings::isWebSecurityEnabled and WebSettings::isSpatialNavigationEnabled https://bugs.webkit.org/show_bug.cgi?id=102548 Reviewed by Adam Barth. This allows us to use Settings.in to generate the code for this. I didn't rename any of the WebKit API methods with similar names because that would probably break consumers. It turns out that the getter is only called from Source/WebKit/efl (most of the time, WebPreferences just sets values on Settings). No new tests, just a refactor. * WebCore.exp.in: Remove symbols that are now inlined. * WebCore.order: Remove symbols that are now inlined. * dom/Document.cpp: (WebCore::Document::initSecurityContext): Rename. * page/Settings.cpp: (WebCore::Settings::Settings): Remove code since it will be generated. * page/Settings.h: (Settings): Remove code since it will be generated. * page/Settings.in: Add entries to be generated. * page/SpatialNavigation.cpp: (WebCore::isSpatialNavigationEnabled): Fix caller. 2012-11-19 Yael Aharon [EFL][TexMap] Complie error when considering warnings as errors https://bugs.webkit.org/show_bug.cgi?id=102705 Reviewed by Kenneth Rohde Christiansen. Change GaussianKernelHalfWidth to unsigned. No new tests. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore): 2012-11-19 Sheriff Bot Unreviewed, rolling out r134830. http://trac.webkit.org/changeset/134830 https://bugs.webkit.org/show_bug.cgi?id=102701 ActiveDOMObject is not applicable to MutationObservers due to being tied to a Document (Requested by aklein on #webkit). * bindings/js/JSMutationObserverCustom.cpp: (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): * bindings/v8/custom/V8MutationObserverCustom.cpp: (WebCore::V8MutationObserver::constructorCallback): * dom/MutationObserver.cpp: (WebCore::MutationObserver::create): (WebCore::MutationObserver::MutationObserver): (WebCore::MutationObserver::observationStarted): (WebCore::MutationObserver::observationEnded): * dom/MutationObserver.h: (WebCore): * dom/MutationObserver.idl: 2012-11-19 Brady Eidson NetworkProcess Authentication. https://bugs.webkit.org/show_bug.cgi?id=102592 Reviewed by Alexey Proskuryakov. Change an ASSERT that assumes there should be a resource handle which is not true with the NetworkProcess. Also export some more stuff. No new tests (Platform support, no effect in tested configs). * WebCore.exp.in: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Only ASSERT that the handle has a challenge if there is a handle. 2012-11-19 Alec Flett IndexedDB: simplify RecordIdentifier https://bugs.webkit.org/show_bug.cgi?id=102018 Reviewed by Tony Chang. Make IDBBackingStore's RecordIdentifier be a simple class, existing only as an inline or stack-based instance. This makes much of the copy semantics more explicit, and removes refcounting from an object that only ever had a refcount of 1 or 2. No new tests, just a refactor. * Modules/indexeddb/IDBBackingStore.cpp: (WebCore::IDBBackingStore::putRecord): (WebCore::IDBBackingStore::deleteRecord): (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber): (WebCore::IDBBackingStore::keyExistsInObjectStore): (WebCore::IDBBackingStore::putIndexDataForRecord): (WebCore::IDBBackingStore::deleteIndexDataForRecord): (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow): (ObjectStoreCursorImpl): (WebCore::ObjectStoreCursorImpl::loadCurrentRow): (WebCore::IndexKeyCursorImpl::recordIdentifier): (WebCore::IndexCursorImpl::recordIdentifier): * Modules/indexeddb/IDBBackingStore.h: (WebCore::IDBBackingStore::RecordIdentifier::RecordIdentifier): (WebCore::IDBBackingStore::RecordIdentifier::isValid): (WebCore::IDBBackingStore::RecordIdentifier::reset): (RecordIdentifier): (IDBBackingStore): (WebCore::IDBBackingStore::Cursor::recordIdentifier): (WebCore::IDBBackingStore::Cursor::Cursor): (Cursor): * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: (WebCore): (WebCore::IDBObjectStoreBackendImpl::setIndexKeys): (WebCore::IDBObjectStoreBackendImpl::putInternal): (WebCore::IDBObjectStoreBackendImpl::deleteInternal): 2012-11-19 Alexander Shalamov Improve ContentTypeParser, so that it could be used to validate mime type according to RFC https://bugs.webkit.org/show_bug.cgi?id=100927 Reviewed by Alexey Proskuryakov. This patch adds ParsedContentType class that represents contents of parsed content type string. isValidContentType function could be used to check if format of the content type string is acorrding to RFC 2616 section 4.2. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * platform/network/MIMEHeader.cpp: (WebCore::MIMEHeader::parseHeader): * platform/network/ParsedContentType.cpp: Renamed from Source/WebCore/platform/network/ContentTypeParser.cpp. (WebCore): (EmptyParsedContentType): (WebCore::EmptyParsedContentType::setContentType): (WebCore::EmptyParsedContentType::setContentTypeParameter): (WebCore::skipSpaces): (WebCore::isTokenCharacter): (WebCore::parseToken): (WebCore::parseQuotedString): (WebCore::substringForRange): (WebCore::parseContentType): (WebCore::isValidContentType): (WebCore::ParsedContentType::ParsedContentType): (WebCore::ParsedContentType::charset): (WebCore::ParsedContentType::parameterValueForName): (WebCore::ParsedContentType::parameterCount): (WebCore::ParsedContentType::setContentType): (WebCore::ParsedContentType::setContentTypeParameter): * platform/network/ParsedContentType.h: Renamed from Source/WebCore/platform/network/ContentTypeParser.h. (WebCore): (ParsedContentType): (WebCore::ParsedContentType::mimeType): 2012-11-19 Erik Arvidsson Update DOMException name: InvalidNodeTypeError https://bugs.webkit.org/show_bug.cgi?id=102519 Reviewed by Kentaro Hara. Patch 24 of 25 to update DOMException name to match the spec and Firefox. No code uses DOMException InvalidNodeTypeError. We do use INVALID_NODE_TYPE_ERR for RangeException. See bug 102515. * dom/DOMCoreException.cpp: 2012-11-19 Shinya Kawanaka Changing id, className, or attribute should invalidate distribution https://bugs.webkit.org/show_bug.cgi?id=100738 Reviewed by Dimitri Glazkov. When id, className, or attribute is changed, we might have to invalidate distribution. However, we don't want to do useless invalidation. So we consult with the RuleFeatureSet of ElementShadow to invalidate distribution only if necessary. For the code that className is changed, we can share a lot of code between invalidating distribution and invalidating style. So we made checkNeedsStyleInvalidationForClassChange a template method, and share it. Since attributeChanged() is a hot method, we don't want to make it slow. So we made one function to determine whether we have to invalidate distribution, and make it called only if necessary. Also, we've optimized shadowOfParentForDistribution() by making isInsertionPoint() de-virtualed. We consuded NodeFlags (IsInsertionPointFlag) for this purpose. We've measured how this patch makes changing attribute slow. I've measured each code 3 times. DOM/ModifyAttribute.html is a micro benchmark which changes attribute a lot of times. The result of this benchmark will be the most affected by this patch. However, it's only 2% performance regression. DOM/ModifyAttribute.html Before this patch: median stdev min max [ms] 1st 494.0 3.36 490.0 502.0 2nd 503.5 3.44 497.0 512.0 3rd 494.0 3.48 488.0 499.0 After this patch: median stdev min max [ms] 1st 504.0 2.00 501.0 509.0 2nd 505.5 3.08 500.0 513.0 3rd 507.0 2.32 502.0 510.0 Tests: fast/dom/shadow/distribution-attribute-modified.html fast/dom/shadow/distribution-className-modified.html fast/dom/shadow/distribution-id-modified.html fast/dom/shadow/reprojection-attribute-modified.html fast/dom/shadow/reprojection-className-modified.html fast/dom/shadow/reprojection-id-modified.html * dom/Element.cpp: (WebCore::Element::attributeChanged): (WebCore::HasSelectorForClassStyleFunctor::HasSelectorForClassStyleFunctor): (HasSelectorForClassStyleFunctor): (WebCore::HasSelectorForClassStyleFunctor::operator()): Returns true if StyleResolver::hasSelectorForClass returns true. (WebCore): (WebCore::HasSelectorForClassDistributionFunctor::HasSelectorForClassDistributionFunctor): (HasSelectorForClassDistributionFunctor): (WebCore::HasSelectorForClassDistributionFunctor::operator()): Returns true if ElementShadow::hasSelectForClass returns true. (WebCore::checkFunctorForClassChange): (WebCore::checkNeedsStyleInvalidationForClassChange): (WebCore::checkNeedsDistributionInvalidationForClassChange): Extracted the implementation to checkFunctorForClassChange. (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged): * dom/Element.h: (Element): * dom/Node.h: (WebCore::Node::isInsertionPoint): * html/HTMLElement.h: (HTMLElement): * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::InsertionPoint): * html/shadow/InsertionPoint.h: (InsertionPoint): (WebCore::isInsertionPoint): (WebCore::shadowOfParentForDistribution): (WebCore::resolveReprojection): 2012-11-19 Nate Chapin Move empty loading to DocumentLoader, simplify FrameLoader::init() https://bugs.webkit.org/show_bug.cgi?id=101512 Reviewed by Adam Barth. No new tests, though several outputs changed because we no longer send resource load callbacks for empty loads. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::~DocumentLoader): (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::clearMainResourceLoader): (WebCore::DocumentLoader::isLoadingInAPISense): (WebCore::DocumentLoader::isLoadingMainResource): (WebCore::DocumentLoader::maybeLoadEmpty): (WebCore): (WebCore::DocumentLoader::startLoadingMainResource): Handle empty main resource loads directly here. * loader/DocumentLoader.h: (DocumentLoader): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): Initialize some variables whose values were previously being reset in init(). Given that the FrameLoader is in an inconsistent state before init() is called anyway, there doesn't seem to be a disadvantage to just initializing them to their post-init() values. (WebCore::FrameLoader::init): Just call startLoadingMainResource(), instead of doing a bunch of direct calls to functions FrameLoader shouldn't know about. * loader/FrameLoaderStateMachine.cpp: (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine): * loader/FrameLoaderStateMachine.h: * loader/MainResourceLoader.cpp: Throughout, remove the concept of an empty load. (WebCore::MainResourceLoader::loadNow): This only returned true when an empty load got deferred, which won't happen now. Return void and always treat as returning false. * loader/MainResourceLoader.h: (MainResourceLoader): 2012-11-19 Erik Arvidsson Update DOMException name: TimeoutError https://bugs.webkit.org/show_bug.cgi?id=102513 Reviewed by Kentaro Hara. Patch 23 of 25 to update DOMException name to match the spec and Firefox. No code uses DOMException TimeoutError. We do use TIMEOUT_ERR for XMLHttpRequestException. See bug 102506. * dom/DOMCoreException.cpp: 2012-11-19 Erik Arvidsson Update DOMException name: DataCloneError https://bugs.webkit.org/show_bug.cgi?id=102521 Reviewed by Kentaro Hara. Patch 25 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-19 Tom Hudson Improve performance of RenderBoxModelObject::paintTranslucentBorderSides() https://bugs.webkit.org/show_bug.cgi?id=98660 Reviewed by Simon Fraser. Accumulate edges[i].shouldRender() in a flag field and pass that to paintBorderSides() and paintTranslucentBorderSides() so that we don't do unnecessary work. If we can avoid setting up and tearing down an unnecessary transparent layer we save 30ms on some mobile platforms. * rendering/RenderBoxModelObject.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintBorder): (WebCore::RenderBoxModelObject::paintTranslucentBorderSides): 2012-11-19 Hans Muller [CSS Exclusions] remove null exclusion shape check from ExclusionShape::createExclusionShape https://bugs.webkit.org/show_bug.cgi?id=100765 Reviewed by Dirk Schulze. ExclusionShape::createExclusionShape now ASSERTs that its basicShape argument isn't null, since the caller is expected to ensure as much. No new tests were needed since this is a near-trivial cleanup. * rendering/ExclusionShape.cpp: (WebCore::ExclusionShape::createExclusionShape): This method no longer defends against a null basicShape argument by returning null. 2012-11-19 Sami Kyostila Use device scale factor instead of physical screen DPI for screen DPI https://bugs.webkit.org/show_bug.cgi?id=101769 Reviewed by Adam Barth. Media queries call WebCore::Screen::{horizontal,vertical}DPI() to determine the dots per CSS inch[1] value for the "screen" media type. On Chromium these functions currently return the physical screen DPI, which is wrong. To fix this, we remove both of these functions entirely and make media queries use the device scale factor multiplied by 96 on all ports. [1] http://www.w3.org/TR/css3-mediaqueries/#resolution0 * page/Screen.cpp: (WebCore::Screen::horizontalDPI): (WebCore::Screen::verticalDPI): * platform/PlatformScreen.h: (WebCore): * platform/blackberry/PlatformScreenBlackBerry.cpp: * platform/chromium/PlatformScreenChromium.cpp: * platform/efl/PlatformScreenEfl.cpp: * platform/gtk/PlatformScreenGtk.cpp: * platform/mac/PlatformScreenMac.mm: * platform/qt/PlatformScreenQt.cpp: * platform/win/PlatformScreenWin.cpp: * platform/wx/ScreenWx.cpp: 2012-11-19 Julien Chaffraix Computed grid items' positions shouldn't be using Length https://bugs.webkit.org/show_bug.cgi?id=102537 Reviewed by Tony Chang. This change refactors how we store the grid items' position to use a new type GridPosition. Length was a temporary type as it supported 'auto' | but it was starting to get more and more confusing as we were implementing the layout routines. No change in behavior. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Added the new file to the build systems. * rendering/style/RenderStyle.h: Updated after the type change. Also made some getters return a const reference instead of forcing a copy. * rendering/style/StyleGridItemData.h: (StyleGridItemData): Ditto, also removed a comment about adding a new type. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForGridPosition): * css/StyleResolver.cpp: (WebCore::createGridPosition): (WebCore::StyleResolver::applyProperty): * rendering/RenderGrid.cpp: (WebCore::RenderGrid::resolveGridPosition): Updated these sites after switching to GridPosition. * rendering/RenderGrid.h: Changed resolveGridPosition signature: it now takes a GridPosition. * rendering/style/GridPosition.h: Added. (WebCore::GridPosition::GridPosition): Default constructor, creates an 'auto' position. (WebCore::GridPosition::isPositive): (WebCore::GridPosition::type): (WebCore::GridPosition::isAuto): (WebCore::GridPosition::setIntegerPosition): (WebCore::GridPosition::integerPosition): Helper functions. (WebCore::GridPosition::operator==): Required comparison operator for StyleGridItemData. 2012-11-19 Thiago Marcos P. Santos Apply the resolved viewport rules https://bugs.webkit.org/show_bug.cgi?id=95964 Reviewed by Kenneth Rohde Christiansen. This patch implements the CSS Device Adaptation specification. The WebKit implementation relies on the already implemented Viewport Meta infrastructure to notify the browser of viewport changes. The implementation was tests with success on the Qt and EFL ports, but basically every port supporting Viewport Meta should be fine. The usage of @-webkit-viewport inside media queries (more tests coming to map all the corner cases) is currently limited when the media query depends on the viewport dimensions itself. Defining the width and height based on screen size will fail on ports reporting the screen size as the size of the browser window instead of the device screen. Tests: css3/device-adapt/opera/cascading-001.xhtml css3/device-adapt/opera/cascading-002.xhtml css3/device-adapt/opera/cascading-003.xhtml css3/device-adapt/opera/cascading-004.xhtml css3/device-adapt/opera/constrain-001.xhtml css3/device-adapt/opera/constrain-002.xhtml css3/device-adapt/opera/constrain-003.xhtml css3/device-adapt/opera/constrain-004.xhtml css3/device-adapt/opera/constrain-005.xhtml css3/device-adapt/opera/constrain-006.xhtml css3/device-adapt/opera/constrain-007.xhtml css3/device-adapt/opera/constrain-008.xhtml css3/device-adapt/opera/constrain-009.xhtml css3/device-adapt/opera/constrain-010.xhtml css3/device-adapt/opera/constrain-011.xhtml css3/device-adapt/opera/constrain-012.xhtml css3/device-adapt/opera/constrain-013.xhtml css3/device-adapt/opera/constrain-014.xhtml css3/device-adapt/opera/constrain-015.xhtml css3/device-adapt/opera/constrain-016.xhtml css3/device-adapt/opera/constrain-017.xhtml css3/device-adapt/opera/constrain-020.xhtml css3/device-adapt/opera/syntax-001.xhtml css3/device-adapt/opera/syntax-002.xhtml css3/device-adapt/opera/syntax-003.xhtml * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSAllInOne.cpp: * css/RuleSet.cpp: (WebCore::RuleSet::addRulesFromSheet): * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::appendAuthorStyleSheets): (WebCore::StyleResolver::~StyleResolver): * css/StyleResolver.h: (StyleResolver): (WebCore::StyleResolver::viewportStyleResolver): * css/ViewportStyleResolver.cpp: Added. (WebCore): (WebCore::ViewportStyleResolver::ViewportStyleResolver): (WebCore::ViewportStyleResolver::addViewportRule): (WebCore::ViewportStyleResolver::clearDocument): (WebCore::ViewportStyleResolver::resolve): (WebCore::ViewportStyleResolver::getViewportArgumentValue): * css/ViewportStyleResolver.h: Added. (WebCore): (ViewportStyleResolver): (WebCore::ViewportStyleResolver::create): * dom/Document.h: (WebCore::Document::setViewportArguments): * dom/ViewportArguments.cpp: (WebCore::compareIgnoringAuto): (WebCore): (WebCore::ViewportArguments::resolve): * dom/ViewportArguments.h: (ViewportAttributes): (WebCore::ViewportArguments::ViewportArguments): (ViewportArguments): (WebCore::ViewportArguments::operator==): 2012-11-19 Erik Arvidsson Update DOMException name: SecurityError https://bugs.webkit.org/show_bug.cgi?id=102437 Reviewed by Kentaro Hara. Patch 18 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-19 Erik Arvidsson Update DOMException name: URLMismatchError https://bugs.webkit.org/show_bug.cgi?id=102511 Reviewed by Kentaro Hara. Patch 21 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: (WebCore): 2012-11-19 Kihong Kwon Add PROXIMITY_EVENTS feature https://bugs.webkit.org/show_bug.cgi?id=102658 Reviewed by Kentaro Hara. Add PROXIMITY_EVENTS feature to xcode project for WebCorei and GNU make. No new tests. Just add a new feature. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.features.am: 2012-11-19 Alexei Filippov Web Inspector: Dim a component's subitems' color in NMI snapshot https://bugs.webkit.org/show_bug.cgi?id=102224 Reviewed by Yury Semikhatsky. * inspector/front-end/NativeMemorySnapshotView.js: (WebInspector.NativeSnapshotNode.prototype._createSizeCell): * inspector/front-end/nativeMemoryProfiler.css: (.native-snapshot-view .data-grid .dimmed div.size-bar): 2012-11-19 Erik Arvidsson Update DOMException name: NetworkError https://bugs.webkit.org/show_bug.cgi?id=102503 Reviewed by Kentaro Hara. Patch 19 of 25 to update DOMException name to match the spec and Firefox. No code uses DOMException NetworkError. We do use NETWORK_ERR for XMLHttpRequestException. See bug 102506. * dom/DOMCoreException.cpp: 2012-11-19 Ilya Tikhonovsky webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionObserver::scriptExecutionContext(). https://bugs.webkit.org/show_bug.cgi?id=102649 Reviewed by Adam Barth. AudioContext uses m_document only as a pointer to ScriptExecutionContext. It could be safely replaced with ContextDestructionObserver::m_scriptExecutionContext. The lifetime of m_scriptExecutionContext is slightly different but it could be adjusted by m_isStopScheduled flag. No new tests as there is no new functionality. * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::looping): (WebCore::AudioBufferSourceNode::setLooping): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::stop): (WebCore::AudioContext::scriptExecutionContext): (WebCore::AudioContext::fireCompletionEvent): (WebCore::AudioContext::reportMemoryUsage): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::fireProcessEvent): (WebCore::ScriptProcessorNode::scriptExecutionContext): 2012-11-19 Ilya Tikhonovsky webaudio: leak: AudioContext objects are leaking. They retain 36mb of shared data. https://bugs.webkit.org/show_bug.cgi?id=102356 Reviewed by Adam Barth. A clean-up code was moved from uninitialize to clear method. AudioContext marks itself as hasPendingActivity in method constructCommon and unmarks itself in method clear. m_isStopScheduled filters out second ActiveDOMObject::stop call. markForDeletion appends AudioNode pointer to m_nodesToDelete array if there is no active audio thread. adoptRef was added in createOfflineContext method. A guard was added into deleteMarkedNodes. Test: inspector-protocol/nmi-webaudio-leak-test.html * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createOfflineContext): (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::constructCommon): (WebCore::AudioContext::~AudioContext): (WebCore::AudioContext::clear): (WebCore::AudioContext::uninitialize): (WebCore::AudioContext::stopDispatch): (WebCore::AudioContext::stop): (WebCore::AudioContext::markForDeletion): (WebCore::AudioContext::scheduleNodeDeletion): (WebCore::AudioContext::deleteMarkedNodes): * Modules/webaudio/AudioContext.h: (AudioContext): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * platform/PlatformMemoryInstrumentation.cpp: (WebCore::PlatformMemoryInstrumentation::reportMemoryUsage): (WebCore): * platform/PlatformMemoryInstrumentation.h: (PlatformMemoryInstrumentation): (WebCore): 2012-11-19 Erik Arvidsson Update DOMException name: QuotaExceededError https://bugs.webkit.org/show_bug.cgi?id=102512 Reviewed by Kentaro Hara. Patch 22 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-19 Erik Arvidsson Update DOMException name: AbortError https://bugs.webkit.org/show_bug.cgi?id=102508 Reviewed by Kentaro Hara. Patch 20 of 25 to update DOMException name to match the spec and Firefox. No code uses DOMException AbortError. We do use ABORT_ERR for XMLHttpRequestException. See bug 102506. * dom/DOMCoreException.cpp: 2012-11-19 Kentaro Hara Unreviewed, rolling out r135111. http://trac.webkit.org/changeset/135111 https://bugs.webkit.org/show_bug.cgi?id=102356 The patch caused crashes in several layout tests * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createOfflineContext): (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::constructCommon): (WebCore::AudioContext::~AudioContext): (WebCore::AudioContext::uninitialize): (WebCore::AudioContext::uninitializeDispatch): (WebCore::AudioContext::stop): (WebCore::AudioContext::markForDeletion): (WebCore::AudioContext::scheduleNodeDeletion): (WebCore::AudioContext::deleteMarkedNodes): * Modules/webaudio/AudioContext.h: (AudioContext): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * platform/PlatformMemoryInstrumentation.cpp: (WebCore): * platform/PlatformMemoryInstrumentation.h: 2012-11-19 Kentaro Hara Unreviewed, rolling out r135116. http://trac.webkit.org/changeset/135116 https://bugs.webkit.org/show_bug.cgi?id=102649 Revert this patch to revert r135111, which caused crashes in several layout tests * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::looping): (WebCore::AudioBufferSourceNode::setLooping): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::stop): (WebCore::AudioContext::document): (WebCore): (WebCore::AudioContext::hasDocument): (WebCore::AudioContext::scriptExecutionContext): (WebCore::AudioContext::fireCompletionEvent): (WebCore::AudioContext::reportMemoryUsage): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::fireProcessEvent): (WebCore::ScriptProcessorNode::scriptExecutionContext): 2012-11-19 Eugene Klyuchnikov Web Inspector: Refine JsDoc in DebuggerScriptMapping.js https://bugs.webkit.org/show_bug.cgi?id=102673 Reviewed by Vsevolod Vlasov. DebuggerScriptMapping calls public method "addScript" not defined in SourceMapping interface. To make things clear I've added ScriptSourceMapping interface that extends SourceMapping interface by adding "addScript" method. * inspector/front-end/SourceMapping.js: Added "ScriptSourceMapping". * inspector/front-end/CompilerScriptMapping.js: Updated "@implements" to ScriptSourceMapping. * inspector/front-end/ResourceScriptMapping.js: Ditto. * inspector/front-end/ScriptSnippetModel.js: Ditto. * inspector/front-end/DebuggerScriptMapping.js: Updated signatures. Removed useless code. 2012-11-19 Tim Horton Unreviewed, untested build fix. * bindings/scripts/IDLParser.pm: (parseModule): 2012-11-19 Dongwoo Joshua Im [CSS3] Move CSSPropertyWebkitTextAlignLast into isValidKeywordPropertyAndValue function https://bugs.webkit.org/show_bug.cgi?id=102303 Reviewed by Alexis Menard. Move the part which check whether CSSPropertyWebkitTextAlignLast has available value into the isValidKeywordPropertyAndValue function, like the same kind of properties. This will help speed wise in JS. No new functionality, no new tests. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): (WebCore::isKeywordPropertyID): (WebCore::CSSParser::parseValue): 2012-11-19 Keishi Hattori REGRESSION (r133565): Calendar picker isn't animating when changing month by pressing 't' https://bugs.webkit.org/show_bug.cgi?id=102660 Reviewed by Kent Tamura. The calendar picker used to animate when you press 't'. No new tests. * Resources/pagepopups/calendarPicker.js: (DaysTable.prototype.selectRange): 2012-11-19 Kent Tamura input.value="" should clear date/time input elements with partial values https://bugs.webkit.org/show_bug.cgi?id=102645 Reviewed by Kentaro Hara. Tests: fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty.html fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty.html fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty.html fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty.html fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty.html * html/BaseMultipleFieldsDateAndTimeInputType.cpp: (WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue): If the new value is an empty string and sub-fields has values, we should update the UI value to the empty state. * html/DateTimeFieldsState.h: (WebCore::DateTimeFieldsState::hasAnyValue): Added. It returns true if one or more sub-fields are not empty. 2012-11-19 Andrey Adaikin Web Inspector: [Canvas] if many canvases are being instrumented show the screenshot of the first one https://bugs.webkit.org/show_bug.cgi?id=102522 Reviewed by Yury Semikhatsky. When many canvases are being instrumented we'll want to show replay screenshots for each canvas. Meanwhile, show the screenshot of the first one (instead of the last one), as it's likely to be the "main" canvas. Drive-by: add more typification for the JS compiler. Drive-by: create a new canvas for WebGL replay every time (similar to 2D replay) to avoid problems with resetting the context state. * inspector/InjectedScriptCanvasModuleSource.js: (.): 2012-11-19 Kentaro Hara Remove IDLStructure.pm https://bugs.webkit.org/show_bug.cgi?id=102642 Reviewed by Adam Barth. Previously IDLStructure.pm was full of regular expressions to parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm just contains several data structures for the IDL parser. We can move them to IDLParser.pm and thus remove IDLStructure.pm. No tests. No change in generated code. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/MigrateScripts: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/IDLParser.pm: (Parse): (parseInterface): (parseException): (parseConst): (parseAttributeRest): (parseOperationRest): (parseOptionalOrRequiredArgument): (parseExceptionField): (parseInterfaceOld): (parseExceptionOld): (parseAttributeRestOld): (applyExtendedAttributeList): * bindings/scripts/IDLStructure.pm: Removed. 2012-11-19 Alexei Filippov Web Inspector: refine time and bytes output formatting https://bugs.webkit.org/show_bug.cgi?id=102265 Reviewed by Yury Semikhatsky. Add a space between number and unit, otherwise it's hard to read things like 88B. Reduce a number of decimal digits in KB and MB formats. 1023.45KB seems to be too detailed. * English.lproj/localizedStrings.js: * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable.prototype._createGridNode): * inspector/front-end/UIUtils.js: (Number.secondsToString): (Number.bytesToString): 2012-11-19 Eugene Klyuchnikov Web Inspector: Timeline: DomContentLoaded event labeled incorrectly https://bugs.webkit.org/show_bug.cgi?id=102383 Reviewed by Yury Semikhatsky. Fixed string presentation of event. * inspector/front-end/TimelinePresentationModel.js: Fixed string. 2012-11-19 Kentaro Hara Remove IDLStructure.pm https://bugs.webkit.org/show_bug.cgi?id=102642 Reviewed by Adam Barth. Previously IDLStructure.pm was full of regular expressions to parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm just contains several data structures for the IDL parser. We can move them to IDLParser.pm and thus remove IDLStructure.pm. No tests. No change in generated code. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/MigrateScripts: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/IDLParser.pm: (Parse): (parseInterface): (parseException): (parseConst): (parseAttributeRest): (parseOperationRest): (parseOptionalOrRequiredArgument): (parseExceptionField): (parseInterfaceOld): (parseExceptionOld): (parseAttributeRestOld): (applyExtendedAttributeList): * bindings/scripts/IDLStructure.pm: Removed. 2012-11-19 Alexei Filippov Web Inspector: refine time and bytes output formatting https://bugs.webkit.org/show_bug.cgi?id=102265 Reviewed by Yury Semikhatsky. Add a space between number and unit, otherwise it's hard to read things like 88B. Reduce a number of decimal digits in KB and MB formats. 1023.45KB seems to be too detailed. * English.lproj/localizedStrings.js: * inspector/front-end/CookiesTable.js: (WebInspector.CookiesTable.prototype._createGridNode): * inspector/front-end/UIUtils.js: (Number.secondsToString): (Number.bytesToString): 2012-11-19 Eugene Klyuchnikov Web Inspector: Timeline: DomContentLoaded event labeled incorrectly https://bugs.webkit.org/show_bug.cgi?id=102383 Reviewed by Yury Semikhatsky. Fixed string presentation of event. * inspector/front-end/TimelinePresentationModel.js: Fixed string. 2012-11-19 Kentaro Hara Unreviewed, rolling out r135114. http://trac.webkit.org/changeset/135114 https://bugs.webkit.org/show_bug.cgi?id=102642 it broke Qt build * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/MigrateScripts: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/IDLParser.pm: (Parse): (parseInterface): (parseException): (parseConst): (parseAttributeRest): (parseOperationRest): (parseOptionalOrRequiredArgument): (parseExceptionField): (parseInterfaceOld): (parseExceptionOld): (parseAttributeRestOld): (applyExtendedAttributeList): * bindings/scripts/IDLStructure.pm: Added. 2012-11-19 Vsevolod Vlasov Unreviewed inspector closure compilation fix. * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/externs.js: 2012-11-18 Ilya Tikhonovsky webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionObserver::scriptExecutionContext(). https://bugs.webkit.org/show_bug.cgi?id=102649 Reviewed by Adam Barth. AudioContext uses m_document only as a pointer to ScriptExecutionContext. It could be safely replaced with ContextDestructionObserver::m_scriptExecutionContext. The lifetime of m_scriptExecutionContext is slightly different but it could be adjusted by m_isStopScheduled flag. No new tests as there is no new functionality. * Modules/webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::looping): (WebCore::AudioBufferSourceNode::setLooping): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::stop): (WebCore::AudioContext::fireCompletionEvent): (WebCore::AudioContext::reportMemoryUsage): * Modules/webaudio/AudioContext.h: (WebCore::AudioContext::scriptExecutionContext): (AudioContext): * Modules/webaudio/ScriptProcessorNode.cpp: (WebCore::ScriptProcessorNode::fireProcessEvent): (WebCore::ScriptProcessorNode::scriptExecutionContext): 2012-11-18 Kentaro Hara [V8] Remove unused variables from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=102648 Reviewed by Adam Barth. No tests. No change in generated code. * bindings/scripts/CodeGeneratorV8.pm: (GenerateInterface): (GenerateHeader): (GetInternalFields): (GenerateNormalAttrGetter): (GenerateSingleBatchedAttribute): (GenerateImplementationCustomCall): (GenerateFunctionCallString): (CreateCustomSignature): (GetContextEnableFunction): 2012-11-18 Kentaro Hara Remove IDLStructure.pm https://bugs.webkit.org/show_bug.cgi?id=102642 Reviewed by Adam Barth. Previously IDLStructure.pm was full of regular expressions to parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm just contains several data structures for the IDL parser. We can move them to IDLParser.pm and thus remove IDLStructure.pm. No tests. No change in generated code. * CMakeLists.txt: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/MigrateScripts: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/scripts/IDLParser.pm: (Parse): (parseInterface): (parseException): (parseConst): (parseAttributeRest): (parseOperationRest): (parseOptionalOrRequiredArgument): (parseExceptionField): (parseInterfaceOld): (parseExceptionOld): (parseAttributeRestOld): (applyExtendedAttributeList): * bindings/scripts/IDLStructure.pm: Removed. 2012-11-18 Kentaro Hara [V8] Make more use of $v8Interface in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=102639 Reviewed by Adam Barth. We can replace hard-coded "V8${interfaceName}" with $v8Interface. No tests. No change in generated code. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateFunctionCallback): (GenerateNamedConstructorCallback): (GenerateImplementationIndexer): (GenerateImplementationNamedPropertyGetter): (GenerateImplementation): 2012-11-16 Ilya Tikhonovsky webaudio: leak: AudioContext objects are leaking. They retain 36mb of shared data. https://bugs.webkit.org/show_bug.cgi?id=102356 Reviewed by Adam Barth. A clean-up code was moved from uninitialize to clear method. AudioContext marks itself as hasPendingActivity in method constructCommon and unmarks itself in method clear. m_isStopScheduled filters out second ActiveDOMObject::stop call. markForDeletion appends AudioNode pointer to m_nodesToDelete array if there is no active audio thread. adoptRef was added in createOfflineContext method. Test: inspector-protocol/nmi-webaudio-leak-test.html * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createOfflineContext): (WebCore::AudioContext::AudioContext): (WebCore::AudioContext::constructCommon): (WebCore::AudioContext::~AudioContext): (WebCore::AudioContext::clear): (WebCore::AudioContext::uninitialize): (WebCore::AudioContext::stopDispatch): (WebCore::AudioContext::stop): (WebCore::AudioContext::markForDeletion): (WebCore::AudioContext::scheduleNodeDeletion): (WebCore::AudioContext::deleteMarkedNodes): * Modules/webaudio/AudioContext.h: (AudioContext): * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): * platform/PlatformMemoryInstrumentation.cpp: (WebCore::PlatformMemoryInstrumentation::reportMemoryUsage): (WebCore): * platform/PlatformMemoryInstrumentation.h: (PlatformMemoryInstrumentation): (WebCore): 2012-11-18 Kunihiko Sakamoto min/max/step support for calendar picker on datetime/datetime-local https://bugs.webkit.org/show_bug.cgi?id=102628 Reviewed by Kent Tamura. Gray out dates with no allowed values on calendar picker for datetime/datetime-local when values are limited by min/max/step attributes. Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-with-step.html * Resources/pagepopups/calendarPicker.js: (CalendarPicker.prototype._stepMismatch): Returns true iff there are any allowed values in the given day. 2012-11-18 Laszlo Gombos Remove non-existent directories from the make system https://bugs.webkit.org/show_bug.cgi?id=102632 Reviewed by Adam Barth. Remove (non-existent) symbian references from the exclude list in gyp project files. No new tests as there is no new functionality. * WebCore.gyp/WebCore.gyp: 2012-11-18 Patrick Gansterer [WIN] Add a IMLangFontLinkType typedef https://bugs.webkit.org/show_bug.cgi?id=102584 Reviewed by Brent Fulgham. Add a central typedef for IMLangFontLink(2) to get rid of a bunch of ifdefs. * platform/graphics/FontCache.h: (WebCore): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::getFontLinkInterface): (WebCore::getCJKCodePageMasks): (WebCore::createMLangFont): (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::containsCharacters): * platform/graphics/wince/FontCacheWinCE.cpp: (WebCore): (WebCore::FontCache::getFontLinkInterface): (WebCore::getCJKCodePageMasks): (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/wince/FontPlatformData.cpp: (WebCore::FontFamilyCodePageInfo::codePages): (WebCore::FixedSizeFontData::create): * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp: (WebCore::GlyphPage::fill): 2012-11-18 Mike West Web Inspector: Remove unused ConsoleMessage constructor. https://bugs.webkit.org/show_bug.cgi?id=102590 Reviewed by Brent Fulgham. We currently have a ConsoleMessage constructor that's unused. Let's kill it. * inspector/ConsoleMessage.cpp: * inspector/ConsoleMessage.h: (ConsoleMessage): Removing an unused constructor variant. 2012-11-18 Andreas Kling StyledElement: Make handling the "style" attribute a litte faster. Reviewed by Ojan Vafai. We know that "style" is never a presentation attribute, so avoid the virtual call to isPresentationAttribute() by hoisting the parseAttribute() logic up into attributeChanged(). Did the same thing with Element::parseAttribute() for consistency. Knocks ~0.6% of samples off of the DOM/CreateNodes performance test. * dom/Element.cpp: (WebCore::Element::attributeChanged): * dom/Element.h: (WebCore::Element::parseAttribute): * dom/StyledElement.cpp: (WebCore::StyledElement::attributeChanged): * dom/StyledElement.h: (StyledElement): 2012-11-18 Laszlo Gombos [CMake] Consolidate common input files https://bugs.webkit.org/show_bug.cgi?id=101632 Reviewed by Rob Buis. Consolidate and sort the list of files, move common source files into CMakeLists.txt from the port specific files. No new tests as there is no new functionality. * CMakeLists.txt: * PlatformBlackBerry.cmake: * PlatformEfl.cmake: * PlatformWinCE.cmake: 2012-11-18 Andreas Kling Tighten small SharedBuffers by reserving the exact amount of space needed. Reviewed by Anders Carlsson. When adding the first chunk to a small (<4096 bytes) SharedBuffer, reserve the exact amount of space needed instead of leaving it to Vector::append(). 1.86MB progression on Membuster3. * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::append): 2012-11-18 Ryosuke Niwa Make namedItem return a node list only in HTMLFormControlsCollection and HTMLOptionsCollection https://bugs.webkit.org/show_bug.cgi?id=101311 Reviewed by Darin Adler. Introduce two new interfaces HTMLFormControlsCollection and HTMLOptionsCollection to be used by form.elements and select.options. These two interfaces have the named getter and namedItem that returns a live NodeList when there are multiple matches. Introducing these two interfaces allow us to make "regular" HTMLCollection's named getter and namedItem return exactly one node or null as specified in HTML5: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#collections-0 Unfortunately, HTMLOptionsCollection still has a bug that its named getter and namedItem returns a static NodeList instead of a live NodeList (DynamicNodeList) at the moment. Also got rid of Document::objects since it's not exposed in IDL or called anywhere. Test: fast/dom/html-collections-namedItem.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * UseJSC.cmake: * UseV8.cmake: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: * bindings/js/JSHTMLAllCollectionCustom.cpp: (WebCore::getNamedItems): * bindings/js/JSHTMLCollectionCustom.cpp: (WebCore::JSHTMLCollection::nameGetter): Now returns exactly one node or null. (WebCore::toJS): * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Added. (WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches. (WebCore::JSHTMLFormControlsCollection::canGetItemsForName): (WebCore::JSHTMLFormControlsCollection::nameGetter): (WebCore::JSHTMLFormControlsCollection::namedItem): * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::getNamedItems): Returns a static NodeList when there are multiple matches. This is a bug. It should be a live NodeList instead. (WebCore::JSHTMLOptionsCollection::canGetItemsForName): (WebCore::JSHTMLOptionsCollection::nameGetter): (WebCore::JSHTMLOptionsCollection::namedItem): * bindings/js/CodeGeneratorJS.pm: Include JSNode.js for all HTML*Collection interfaces for simplicity. * bindings/js/CodeGeneratorV8.pm: HTMLOptionsCollection now inherits from HTMLCollection. See http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmloptionscollection * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Pass in isolate when we can. (WebCore::getNamedItems): Added a comment about how we should be returning a HTMLCollection when there are multiple matches. (WebCore::getItem): (WebCore::V8HTMLAllCollection::namedPropertyGetter): (WebCore::V8HTMLAllCollection::namedItemCallback): * bindings/v8/custom/V8HTMLCollectionCustom.cpp: Now returns exactly one node or null. (WebCore::V8HTMLCollection::namedPropertyGetter): (WebCore::toV8): * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Added. (WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches. (WebCore::V8HTMLFormControlsCollection::namedPropertyGetter): (WebCore::V8HTMLFormControlsCollection::namedItemCallback): * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: (WebCore::getNamedItems): Returns a static NodeList when there are multiple matches. This is a bug. It should be a live NodeList instead. (WebCore::V8HTMLOptionsCollection::namedPropertyGetter): (WebCore::V8HTMLOptionsCollection::namedItemCallback): * dom/Document.cpp: Removed Document::objects since it was not used anywhere. * dom/Document.h: (Document): * dom/Element.cpp: (WebCore::ElementRareData::ensureCachedHTMLCollection): form.elements should instantiate a HTMLFormControlsCollection instead of a HTMLCollection. * html/CollectionType.h: * html/HTMLCollection.idl: Removed [Custom] since namedItem is a regular function call now. * html/HTMLFieldSetElement.cpp: * html/HTMLFieldSetElement.h: * html/HTMLFormCollection.cpp: Removed. * html/HTMLFormCollection.h: Removed. * html/HTMLFormControlsCollection.cpp: Copied from Source/WebCore/html/HTMLFormCollection.cpp. (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection): (WebCore::HTMLFormControlsCollection::create): (WebCore::HTMLFormControlsCollection::~HTMLFormControlsCollection): (WebCore::HTMLFormControlsCollection::formControlElements): (WebCore::HTMLFormControlsCollection::formImageElements): (WebCore::HTMLFormControlsCollection::virtualItemAfter): (WebCore::HTMLFormControlsCollection::namedItem): (WebCore::HTMLFormControlsCollection::updateNameCache): * html/HTMLFormControlsCollection.h: Copied from Source/WebCore/html/HTMLFormCollection.h. (HTMLFormControlsCollection): * html/HTMLFormControlsCollection.idl: Added. * html/HTMLFormElement.cpp: * html/HTMLFormElement.h: * html/HTMLOptionsCollection.idl: 2012-11-18 Kentaro Hara [V8] Rename $className to $v8InterfaceName https://bugs.webkit.org/show_bug.cgi?id=102487 Reviewed by Adam Barth. In CodeGeneratorV8.pm, $className is always "V8$interfaceName". We should rename $className to $v8InterfaceName. Also we can remove GetCallbackClassName(). No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GetHeaderClassInclude): (GenerateDomainSafeFunctionGetter): (GenerateDomainSafeFunctionSetter): (GenerateParametersCheck): (GenerateImplementation): (GenerateHeaderContentHeader): (GenerateImplementationContentHeader): (GenerateCallbackHeader): (GenerateCallbackImplementation): (GenerateToV8Converters): (GetPassRefPtrType): 2012-11-18 Kentaro Hara [V8] Remove GetTypeFromSignature() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=102499 Reviewed by Adam Barth. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateParametersCheckExpression): (GenerateParametersCheck): (GenerateFunctionCallString): (GetNativeTypeFromSignature): (TranslateParameter): (TypeCanFailConversion): (JSValueToNative): (NativeToJSValue): 2012-11-18 Kentaro Hara Remove GenerateModule() from all code generators https://bugs.webkit.org/show_bug.cgi?id=102490 Reviewed by Adam Barth. WebKit IDL files no longer support modules. The Web IDL spec no longer supports modules. We can remove it from code generators. No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (ProcessDocument): * bindings/scripts/CodeGeneratorCPP.pm: * bindings/scripts/CodeGeneratorGObject.pm: * bindings/scripts/CodeGeneratorJS.pm: * bindings/scripts/CodeGeneratorObjC.pm: * bindings/scripts/CodeGeneratorV8.pm: 2012-11-18 Kentaro Hara [V8] Get rid of unused functions and inline redundant functions in CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=102497 Reviewed by Adam Barth. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateDomainSafeFunctionGetter): (GenerateNormalAttrGetter): (GenerateFunctionCallString): 2012-11-18 Sheriff Bot Unreviewed, rolling out r135074. http://trac.webkit.org/changeset/135074 https://bugs.webkit.org/show_bug.cgi?id=102619 Made most layout tests crash. (Requested by rakuco on #webkit). * PlatformEfl.cmake: * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::setContextLostCallback): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::createSurface): (WebCore::GraphicsContext3DPrivate::setCurrentGLContext): (WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D): (WebCore::GraphicsContext3DPrivate::makeContextCurrent): (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces): (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface): (WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken): * platform/graphics/efl/GraphicsContext3DPrivate.h: (GraphicsContext3DPrivate): * platform/graphics/opengl/GLDefs.h: Removed. * platform/graphics/opengl/GLPlatformContext.cpp: Removed. * platform/graphics/opengl/GLPlatformContext.h: Removed. * platform/graphics/opengl/GLPlatformSurface.cpp: Removed. * platform/graphics/opengl/GLPlatformSurface.h: Removed. * platform/graphics/surfaces/glx/GLXContext.cpp: Removed. * platform/graphics/surfaces/glx/GLXContext.h: Removed. * platform/graphics/surfaces/glx/GLXSurface.cpp: Removed. * platform/graphics/surfaces/glx/GLXSurface.h: Removed. 2012-11-18 Antti Koivisto REGRESSION(r129644): User StyleSheet not applying https://bugs.webkit.org/show_bug.cgi?id=102110 Reviewed by Andreas Kling. Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that such things don't exists but on Chromium addUserStyleSheet() confusingly uses them. The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets(). It also generally cleans up the code around injected and user stylesheets. Tests: userscripts/user-script-and-stylesheet.html userscripts/user-stylesheet-invalidate.html * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::collectRulesFromUserStyleSheets): (WebCore::collectCSSOMWrappers): * css/StyleResolver.h: (StyleResolver): * dom/Document.cpp: (WebCore::Document::setCompatibilityMode): * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets): (WebCore): (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets): (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache): (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache): (WebCore::DocumentStyleSheetCollection::addUserSheet): (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): * dom/DocumentStyleSheetCollection.h: (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets): (DocumentStyleSheetCollection): * page/PageGroup.cpp: (WebCore::PageGroup::addUserStyleSheetToWorld): (WebCore::PageGroup::removeUserStyleSheetFromWorld): (WebCore::PageGroup::removeUserStyleSheetsFromWorld): (WebCore::PageGroup::removeAllUserContent): (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames): * page/PageGroup.h: (PageGroup): 2012-11-18 Adam Barth Unreviewed. Update run-bindings-tests baselines after http://trac.webkit.org/changeset/135063 * bindings/scripts/test/JS/JSTestActiveDOMObject.h: (JSTestActiveDOMObjectOwner): * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: (JSTestCustomNamedGetterOwner): * bindings/scripts/test/JS/JSTestEventConstructor.h: (JSTestEventConstructorOwner): * bindings/scripts/test/JS/JSTestEventTarget.h: (JSTestEventTargetOwner): * bindings/scripts/test/JS/JSTestException.h: (JSTestExceptionOwner): * bindings/scripts/test/JS/JSTestInterface.h: (JSTestInterfaceOwner): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (JSTestMediaQueryListListenerOwner): * bindings/scripts/test/JS/JSTestNamedConstructor.h: (JSTestNamedConstructorOwner): * bindings/scripts/test/JS/JSTestObj.h: (JSTestObjOwner): * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: (JSTestOverloadedConstructorsOwner): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (JSTestSerializedScriptValueInterfaceOwner): 2012-11-18 Simon Fraser Make convertToLayerCoords iterative, rather than recursive https://bugs.webkit.org/show_bug.cgi?id=102618 Reviewed by Antti Koivisto. RenderLayer::convertToLayerCoords() is a hot function on profiles. Change it to be iterative, rather than recursive, so that the bulk of the function can be inlined. Was tested with assertions against the old code during development. * rendering/RenderLayer.cpp: (WebCore::accumulateOffsetTowardsAncestor): (WebCore::RenderLayer::convertToLayerCoords): 2012-11-18 Andreas Kling Inline the StyledElement constructor. Reviewed by Antti Koivisto. StyledElement sits between Element and HTMLElement in the inheritance chain, and both of those are inline. Knocks ~0.4% of samples off of the DOM/CreateNodes performance test. * dom/StyledElement.cpp: * dom/StyledElement.h: (WebCore::StyledElement::StyledElement): 2012-11-18 Andreas Kling HTMLMediaElement: Skip unnecessary attribute lookup in parsing of "src" attribute. Reviewed by Anders Carlsson. When parsing the "src" attribute, we don't need to look it up with fastHasAttribute() to know if it's present. If it's not present, 'value' argument will be null. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): 2012-11-18 Kondapally Kalyan [EFL] Refactor GraphicsContext3DEFL. https://bugs.webkit.org/show_bug.cgi?id=101291. Reviewed by Kenneth Rohde Christiansen. GraphicsContext3DEfl creates GraphicsContext3DPrivate, which acts as its platform Layer. GraphicsContext3DPrivate needs to handle the following cases: 1) To provide an off-screen buffer for accelerated composition. 2) Render to a current context. 3) To render directly to host window. (currently not supported.) Before this patch Evas was used to provide us an off-screen context and buffer. GLX was used in the other supported case. Evas acts as a glue layer to provide us with appropriate GL bindings (OpenGL functions), GL context and drawable (surface/offscreenbuffer). However, primitive rendering is handled by TextureMapper and OpenGLShims is used to load the needed GL functions. It would be for our advantage to be able to take in to use any optimisations/extensions provided by underlying drivers, specific to a platform (e.g. GLX_MESA_copy_sub_buffer etc.). This patch introduces an abstraction layer to make it easy to add support for any GL backend (GLX, EGL etc.) and do any platform specific optimizations as needed without complicating GraphicsContext3DPrivate class. Two new classes are added with this implementation, GLPlatformContext and GLPlatformSurface. GraphicsContext3DPrivate would create and own a GLPlatformContext and GLPlatformSurface. GLPlatformContext encapsulates an OpenGL context hiding any platform specific management. It uses GL extension ARB_robustness (when available) to detect driver resets. It defines a simple interface for things that need to be handled by the context. Support for multi-threaded usage and shared context-group would be added later. GLPlatformSurface encapsulates an OpenGL drawable hiding any platform specific management. It defines a simple interface for things that need to be handled by the surface. It creates an off-screen rendering area. Any GLPlatformContext (compatible with the surface) can be used to render into this off-screen area. This patch also adds GLX implementation. To keep the patch to minimum EGL support would be added in another changeset. * PlatformEfl.cmake: * platform/graphics/efl/GraphicsContext3DEfl.cpp: (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::setContextLostCallback): * platform/graphics/efl/GraphicsContext3DPrivate.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (GraphicsContext3DPrivate::releaseResources): (GraphicsContext3DPrivate::setContextLostCallback): (GraphicsContext3DPrivate::platformGraphicsContext3D): (GraphicsContext3DPrivate::makeContextCurrent): (GraphicsContext3DPrivate::createGraphicsSurfaces): (GraphicsContext3DPrivate::copyToGraphicsSurface): (GraphicsContext3DPrivate::graphicsSurfaceToken): * platform/graphics/efl/GraphicsContext3DPrivate.h: (GraphicsContext3DPrivate): * platform/graphics/opengl/GLDefs.h: Added. (WebCore): * platform/graphics/opengl/GLPlatformContext.cpp: Added. (WebCore): (WebCore::GLPlatformContext::createContext): (WebCore::GLPlatformContext::createOffScreenContext): (WebCore::GLPlatformContext::createCurrentContextWrapper): (WebCore::GLPlatformContext::GLPlatformContext): (WebCore::GLPlatformContext::~GLPlatformContext): (WebCore::GLPlatformContext::makeCurrent): (WebCore::GLPlatformContext::isValid): (WebCore::GLPlatformContext::releaseCurrent): (WebCore::GLPlatformContext::handle): (WebCore::GLPlatformContext::isCurrentContext): (WebCore::GLPlatformContext::initialize): (WebCore::GLPlatformContext::getCurrent): (WebCore::GLPlatformContext::platformMakeCurrent): (WebCore::GLPlatformContext::platformReleaseCurrent): (WebCore::GLPlatformContext::destroy): * platform/graphics/opengl/GLPlatformContext.h: Added. (WebCore): (GLPlatformContext): * platform/graphics/opengl/GLPlatformSurface.cpp: Added. (WebCore): (WebCore::GLPlatformSurface::createOffscreenSurface): (WebCore::GLPlatformSurface::createTransportSurface): (WebCore::GLPlatformSurface::GLPlatformSurface): (WebCore::GLPlatformSurface::~GLPlatformSurface): (WebCore::GLPlatformSurface::handle): (WebCore::GLPlatformSurface::geometry): (WebCore::GLPlatformSurface::sharedDisplay): (WebCore::GLPlatformSurface::configuration): (WebCore::GLPlatformSurface::swapBuffers): (WebCore::GLPlatformSurface::copyTexture): (WebCore::GLPlatformSurface::updateContents): (WebCore::GLPlatformSurface::setGeometry): (WebCore::GLPlatformSurface::destroy): * platform/graphics/opengl/GLPlatformSurface.h: Added. (WebCore): (GLPlatformSurface): GLXOffScreenContext creates an off-screen context. This is used when renderstyle is RenderOffscreen. It uses GL extension GLX_ARB_create_context (when available) to create a context else falls back to use glXCreateNewContext. * platform/graphics/surfaces/glx/GLXContext.cpp: Added. (WebCore): (WebCore::initializeARBExtensions): (WebCore::GLXOffScreenContext::GLXOffScreenContext): (WebCore::GLXOffScreenContext::initialize): (WebCore::GLXOffScreenContext::~GLXOffScreenContext): (WebCore::GLXOffScreenContext::isCurrentContext): (WebCore::GLXOffScreenContext::platformMakeCurrent): (WebCore::GLXOffScreenContext::platformReleaseCurrent): (WebCore::GLXOffScreenContext::freeResources): (WebCore::GLXOffScreenContext::destroy): GLXCurrentContextWrapper acts as a wrapper for current context. This is used when renderstyle is RenderToCurrentGLContext. * platform/graphics/surfaces/glx/GLXContext.h: Added. (WebCore): (GLXCurrentContextWrapper): (WebCore::GLXCurrentContextWrapper::GLXCurrentContextWrapper): (WebCore::GLXCurrentContextWrapper::~GLXCurrentContextWrapper): (GLXOffScreenContext): * platform/graphics/surfaces/glx/GLXSurface.cpp: Added. (WebCore): (WebCore::GLXSurface::GLXSurface): (WebCore::GLXSurface::~GLXSurface): (WebCore::GLXSurface::visualInfo): (WebCore::GLXSurface::xWindow): (WebCore::GLXSurface::pBufferConfiguration): (WebCore::GLXSurface::transportSurfaceConfiguration): (WebCore::GLXSurface::isXRenderExtensionSupported): GLXTransportSurface creates Window and uses it as an off-screen surface. Any GLContext that was created with respect to configuration can be used to render into this. This is used when contents of the buffer are to be provided to UI Process for display. (WebCore::GLXTransportSurface::GLXTransportSurface): (WebCore::GLXTransportSurface::~GLXTransportSurface): (WebCore::GLXTransportSurface::configuration): (WebCore::GLXTransportSurface::swapBuffers): (WebCore::GLXTransportSurface::setGeometry): (WebCore::GLXTransportSurface::initialize): (WebCore::GLXTransportSurface::destroy): (WebCore::GLXTransportSurface::freeResources): GLXPBuffer, Creates a GL surface (PBuffer) used for offscreen rendering. Any GLContext that was created with respect to configuration can be used to render into this. (WebCore::GLXPBuffer::GLXPBuffer): (WebCore::GLXPBuffer::~GLXPBuffer): (WebCore::GLXPBuffer::initialize): (WebCore::GLXPBuffer::configuration): (WebCore::GLXPBuffer::destroy): (WebCore::GLXPBuffer::freeResources): * platform/graphics/surfaces/glx/GLXSurface.h: Added. (WebCore): Creates X resources which are shared between surface and context. (SharedX11Resources): (WebCore::SharedX11Resources::create): (WebCore::SharedX11Resources::deref): (WebCore::SharedX11Resources::getXWindow): (WebCore::SharedX11Resources::display): (WebCore::SharedX11Resources::visualInfo): (WebCore::SharedX11Resources::createConfig): (WebCore::SharedX11Resources::pBufferContextConfig): (WebCore::SharedX11Resources::surfaceContextConfig): (WebCore::SharedX11Resources::isXRenderExtensionSupported): (WebCore::SharedX11Resources::SharedX11Resources): (WebCore::SharedX11Resources::~SharedX11Resources): (GLXSurface): (GLXTransportSurface): (GLXPBuffer): 2012-11-18 Andreas Kling Element::parseAttribute() should take name & value as separate arguments. Reviewed by Antti Koivisto. Update the signature of parseAttribute() to take a QualifiedName/AtomicString combo instead of an Attribute. This lets us pass avoid refcount churn in Element::attributeChanged() since creating a temporary Attribute is no longer necessary. This was surprisingly hot (~1%) on the DOM/CreateNodes performance test. * bindings/js/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/js/ScriptEventListener.h: (WebCore): * bindings/v8/ScriptEventListener.cpp: (WebCore::createAttributeEventListener): * bindings/v8/ScriptEventListener.h: (WebCore): * dom/Element.cpp: (WebCore::Element::attributeChanged): (WebCore::Element::parseAttribute): * dom/Element.h: (Element): * dom/StyledElement.cpp: (WebCore::StyledElement::parseAttribute): * dom/StyledElement.h: (StyledElement): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseAttribute): * html/HTMLAnchorElement.h: (HTMLAnchorElement): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::parseAttribute): * html/HTMLAppletElement.h: (HTMLAppletElement): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::parseAttribute): * html/HTMLAreaElement.h: (HTMLAreaElement): * html/HTMLBaseElement.cpp: (WebCore::HTMLBaseElement::parseAttribute): * html/HTMLBaseElement.h: (HTMLBaseElement): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::parseAttribute): * html/HTMLBodyElement.h: (HTMLBodyElement): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::parseAttribute): * html/HTMLButtonElement.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::parseAttribute): * html/HTMLCanvasElement.h: (HTMLCanvasElement): * html/HTMLDetailsElement.cpp: (WebCore::HTMLDetailsElement::parseAttribute): * html/HTMLDetailsElement.h: (HTMLDetailsElement): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseAttribute): (WebCore::HTMLElement::dirAttributeChanged): * html/HTMLElement.h: (HTMLElement): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::parseAttribute): * html/HTMLEmbedElement.h: (HTMLEmbedElement): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::parseAttribute): * html/HTMLFormControlElement.h: (HTMLFormControlElement): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::parseAttribute): * html/HTMLFormElement.h: (HTMLFormElement): * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::parseAttribute): * html/HTMLFrameElement.h: (HTMLFrameElement): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::parseAttribute): * html/HTMLFrameElementBase.h: (HTMLFrameElementBase): * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::parseAttribute): * html/HTMLFrameSetElement.h: (HTMLFrameSetElement): * html/HTMLIFrameElement.cpp: (WebCore::HTMLIFrameElement::parseAttribute): * html/HTMLIFrameElement.h: (HTMLIFrameElement): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseAttribute): * html/HTMLImageElement.h: (HTMLImageElement): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseAttribute): (WebCore::HTMLInputElement::parseMaxLengthAttribute): * html/HTMLInputElement.h: (HTMLInputElement): * html/HTMLKeygenElement.cpp: (WebCore::HTMLKeygenElement::parseAttribute): * html/HTMLKeygenElement.h: (HTMLKeygenElement): * html/HTMLLIElement.cpp: (WebCore::HTMLLIElement::parseAttribute): * html/HTMLLIElement.h: (HTMLLIElement): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseAttribute): * html/HTMLLinkElement.h: (HTMLLinkElement): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::parseAttribute): * html/HTMLMapElement.h: (HTMLMapElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::parseAttribute): * html/HTMLMediaElement.h: * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::parseAttribute): * html/HTMLMetaElement.h: (HTMLMetaElement): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::parseAttribute): * html/HTMLMeterElement.h: (HTMLMeterElement): * html/HTMLOListElement.cpp: (WebCore::HTMLOListElement::parseAttribute): * html/HTMLOListElement.h: (HTMLOListElement): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseAttribute): * html/HTMLObjectElement.h: (HTMLObjectElement): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::parseAttribute): * html/HTMLOptGroupElement.h: * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): * html/HTMLOptionElement.h: (HTMLOptionElement): * html/HTMLOutputElement.cpp: (WebCore::HTMLOutputElement::parseAttribute): * html/HTMLOutputElement.h: (HTMLOutputElement): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::parseAttribute): * html/HTMLProgressElement.h: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseAttribute): * html/HTMLScriptElement.h: (HTMLScriptElement): * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseAttribute): (WebCore::HTMLSelectElement::parseMultipleAttribute): * html/HTMLSelectElement.h: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::parseAttribute): * html/HTMLStyleElement.h: (HTMLStyleElement): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::parseAttribute): * html/HTMLTableCellElement.h: (HTMLTableCellElement): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::parseAttribute): * html/HTMLTableColElement.h: (HTMLTableColElement): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::parseAttribute): * html/HTMLTableElement.h: (HTMLTableElement): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::parseAttribute): * html/HTMLTextAreaElement.h: (HTMLTextAreaElement): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::parseAttribute): * html/HTMLTextFormControlElement.h: (HTMLTextFormControlElement): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::parseAttribute): * html/HTMLTrackElement.h: (HTMLTrackElement): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::parseAttribute): * html/HTMLVideoElement.h: (HTMLVideoElement): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseAttribute): * html/shadow/HTMLContentElement.h: (HTMLContentElement): * mathml/MathMLElement.cpp: (WebCore::MathMLElement::parseAttribute): * mathml/MathMLElement.h: (MathMLElement): * svg/SVGAElement.cpp: (WebCore::SVGAElement::parseAttribute): * svg/SVGAElement.h: (SVGAElement): * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::parseAttribute): * svg/SVGAnimateMotionElement.h: (SVGAnimateMotionElement): * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::parseAttribute): * svg/SVGAnimateTransformElement.h: (SVGAnimateTransformElement): * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseAttribute): * svg/SVGAnimationElement.h: (SVGAnimationElement): * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::parseAttribute): * svg/SVGCircleElement.h: (SVGCircleElement): * svg/SVGClipPathElement.cpp: (WebCore::SVGClipPathElement::parseAttribute): * svg/SVGClipPathElement.h: (SVGClipPathElement): * svg/SVGComponentTransferFunctionElement.cpp: (WebCore::SVGComponentTransferFunctionElement::parseAttribute): * svg/SVGComponentTransferFunctionElement.h: (SVGComponentTransferFunctionElement): * svg/SVGCursorElement.cpp: (WebCore::SVGCursorElement::parseAttribute): * svg/SVGCursorElement.h: (SVGCursorElement): * svg/SVGElement.cpp: (WebCore::SVGElement::reportAttributeParsingError): (WebCore::SVGElement::parseAttribute): * svg/SVGElement.h: (SVGElement): * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::parseAttribute): * svg/SVGEllipseElement.h: (SVGEllipseElement): * svg/SVGExternalResourcesRequired.cpp: (WebCore::SVGExternalResourcesRequired::parseAttribute): * svg/SVGExternalResourcesRequired.h: (SVGExternalResourcesRequired): * svg/SVGFEBlendElement.cpp: (WebCore::SVGFEBlendElement::parseAttribute): * svg/SVGFEBlendElement.h: (SVGFEBlendElement): * svg/SVGFEColorMatrixElement.cpp: (WebCore::SVGFEColorMatrixElement::parseAttribute): * svg/SVGFEColorMatrixElement.h: (SVGFEColorMatrixElement): * svg/SVGFEComponentTransferElement.cpp: (WebCore::SVGFEComponentTransferElement::parseAttribute): * svg/SVGFEComponentTransferElement.h: (SVGFEComponentTransferElement): * svg/SVGFECompositeElement.cpp: (WebCore::SVGFECompositeElement::parseAttribute): * svg/SVGFECompositeElement.h: (SVGFECompositeElement): * svg/SVGFEConvolveMatrixElement.cpp: (WebCore::SVGFEConvolveMatrixElement::parseAttribute): * svg/SVGFEConvolveMatrixElement.h: (SVGFEConvolveMatrixElement): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::parseAttribute): * svg/SVGFEDiffuseLightingElement.h: (SVGFEDiffuseLightingElement): * svg/SVGFEDisplacementMapElement.cpp: (WebCore::SVGFEDisplacementMapElement::parseAttribute): * svg/SVGFEDisplacementMapElement.h: (SVGFEDisplacementMapElement): * svg/SVGFEDropShadowElement.cpp: (WebCore::SVGFEDropShadowElement::parseAttribute): * svg/SVGFEDropShadowElement.h: (SVGFEDropShadowElement): * svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::parseAttribute): * svg/SVGFEGaussianBlurElement.h: (SVGFEGaussianBlurElement): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::parseAttribute): * svg/SVGFEImageElement.h: (SVGFEImageElement): * svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::parseAttribute): * svg/SVGFELightElement.h: (SVGFELightElement): * svg/SVGFEMergeNodeElement.cpp: (WebCore::SVGFEMergeNodeElement::parseAttribute): * svg/SVGFEMergeNodeElement.h: (SVGFEMergeNodeElement): * svg/SVGFEMorphologyElement.cpp: (WebCore::SVGFEMorphologyElement::parseAttribute): * svg/SVGFEMorphologyElement.h: (SVGFEMorphologyElement): * svg/SVGFEOffsetElement.cpp: (WebCore::SVGFEOffsetElement::parseAttribute): * svg/SVGFEOffsetElement.h: (SVGFEOffsetElement): * svg/SVGFESpecularLightingElement.cpp: (WebCore::SVGFESpecularLightingElement::parseAttribute): * svg/SVGFESpecularLightingElement.h: (SVGFESpecularLightingElement): * svg/SVGFETileElement.cpp: (WebCore::SVGFETileElement::parseAttribute): * svg/SVGFETileElement.h: (SVGFETileElement): * svg/SVGFETurbulenceElement.cpp: (WebCore::SVGFETurbulenceElement::parseAttribute): * svg/SVGFETurbulenceElement.h: (SVGFETurbulenceElement): * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::parseAttribute): * svg/SVGFilterElement.h: (SVGFilterElement): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): * svg/SVGFilterPrimitiveStandardAttributes.h: (SVGFilterPrimitiveStandardAttributes): * svg/SVGFitToViewBox.h: (WebCore::SVGFitToViewBox::parseAttribute): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::parseAttribute): * svg/SVGFontFaceElement.h: (SVGFontFaceElement): * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::parseAttribute): * svg/SVGFontFaceUriElement.h: (SVGFontFaceUriElement): * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::parseAttribute): * svg/SVGForeignObjectElement.h: (SVGForeignObjectElement): * svg/SVGGElement.cpp: (WebCore::SVGGElement::parseAttribute): * svg/SVGGElement.h: (SVGGElement): * svg/SVGGlyphElement.cpp: (WebCore::SVGGlyphElement::parseAttribute): * svg/SVGGlyphElement.h: (SVGGlyphElement): * svg/SVGGlyphRefElement.cpp: (WebCore::SVGGlyphRefElement::parseAttribute): * svg/SVGGlyphRefElement.h: * svg/SVGGradientElement.cpp: (WebCore::SVGGradientElement::parseAttribute): * svg/SVGGradientElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::parseAttribute): * svg/SVGImageElement.h: (SVGImageElement): * svg/SVGLangSpace.cpp: (WebCore::SVGLangSpace::parseAttribute): * svg/SVGLangSpace.h: (SVGLangSpace): * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::parseAttribute): * svg/SVGLineElement.h: (SVGLineElement): * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::parseAttribute): * svg/SVGLinearGradientElement.h: (SVGLinearGradientElement): * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::parseAttribute): * svg/SVGMPathElement.h: (SVGMPathElement): * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::parseAttribute): * svg/SVGMarkerElement.h: (SVGMarkerElement): * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::parseAttribute): * svg/SVGMaskElement.h: (SVGMaskElement): * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::parseAttribute): * svg/SVGPathElement.h: (SVGPathElement): * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::parseAttribute): * svg/SVGPatternElement.h: (SVGPatternElement): * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::parseAttribute): * svg/SVGPolyElement.h: (SVGPolyElement): * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::parseAttribute): * svg/SVGRadialGradientElement.h: (SVGRadialGradientElement): * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::parseAttribute): * svg/SVGRectElement.h: (SVGRectElement): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::parseAttribute): * svg/SVGSVGElement.h: (SVGSVGElement): * svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::parseAttribute): * svg/SVGScriptElement.h: (SVGScriptElement): * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::parseAttribute): * svg/SVGStopElement.h: (SVGStopElement): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::parseAttribute): * svg/SVGStyleElement.h: (SVGStyleElement): * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::parseAttribute): * svg/SVGStyledElement.h: (SVGStyledElement): * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::parseAttribute): * svg/SVGStyledTransformableElement.h: (SVGStyledTransformableElement): * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::parseAttribute): * svg/SVGSymbolElement.h: (SVGSymbolElement): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::parseAttribute): * svg/SVGTRefElement.h: (SVGTRefElement): * svg/SVGTests.cpp: (WebCore::SVGTests::parseAttribute): * svg/SVGTests.h: (SVGTests): * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::parseAttribute): * svg/SVGTextContentElement.h: (SVGTextContentElement): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::parseAttribute): * svg/SVGTextElement.h: (SVGTextElement): * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::parseAttribute): * svg/SVGTextPathElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::parseAttribute): * svg/SVGTextPositioningElement.h: (SVGTextPositioningElement): * svg/SVGURIReference.cpp: (WebCore::SVGURIReference::parseAttribute): * svg/SVGURIReference.h: (SVGURIReference): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::parseAttribute): * svg/SVGUseElement.h: (SVGUseElement): * svg/SVGViewElement.cpp: (WebCore::SVGViewElement::parseAttribute): * svg/SVGViewElement.h: (SVGViewElement): * svg/SVGZoomAndPan.h: (WebCore::SVGZoomAndPan::parseAttribute): * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::parseAttribute): * svg/animation/SVGSMILElement.h: (SVGSMILElement): 2012-11-18 Andreas Kling StyleResolver: No need to compare "cellpadding" attributes when evaluating style sharing candidates. Reviewed by Antti Koivisto. Differences in the cellpadding attribute is caught by comparing additionalPresentationAttributeStyle() later on in canShareStyleWithElement() and we shouldn't waste time on comparing them. * css/StyleResolver.cpp: (WebCore::haveIdenticalStyleAffectingAttributes): 2012-11-17 Jon Lee Simulated mouse events should return an accurate offset https://bugs.webkit.org/show_bug.cgi?id=102606 Reviewed by Brady Eidson. A check to see if the event is simulated prior to calculating the offset has existed for a long time (since at least r14916). Back then the check was needed because the offset was incrementally adjusted when the target was assigned (through MouseRelatedEvent::receivedTarget()). Since r82225, we started calculating the offset only when needed, and calculating the offset from scratch rather than incrementally adjusting it. Since we recalculate from scratch, the isSimulated check is irrelevant, and we should remove it. Tests are not possible because all uses of simulated mouse events provide no underlying event, so the offset is never recalculated. * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::computeRelativePosition): Remove the m_isSimulated check. 2012-11-17 Simon Fraser Don't say there are dirty overlay scrollbars when they are clipped out https://bugs.webkit.org/show_bug.cgi?id=102609 Reviewed by Brady Eidson. Painting overlay scrollbars involves a second painting pass over the entire RenderLayer subtree for a compositing layer, which can be very expensive. Avoid this when possible by detecting when overflow controls are not in the damage rect. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::rectForHorizontalScrollbar): Compute a local rect for the horizontal scrollbar. (WebCore::RenderLayer::rectForVerticalScrollbar): Compute a local rect for the vertical scrollbar. (WebCore::RenderLayer::positionOverflowControls): Use rectForHorizontalScrollbar() and rectForVerticalScrollbar(). (WebCore::RenderLayer::overflowControlsIntersectRect): Return true if any of the present overflow controls intersect the given local rect. (WebCore::RenderLayer::paintOverflowControls): Bail if the damage rect doesn't intersect any of the overflow controls. * rendering/RenderLayer.h: (RenderLayer): 2012-11-17 Adam Barth REGRESSION (r133633): ASSERTION FAILED: m_wrapper || !m_jsFunction https://bugs.webkit.org/show_bug.cgi?id=101428 Reviewed by Geoffrey Garen. JSNodeOwner has some smarts that wrappers of subclasses of Node need to call during garbage collection. This patch teaches subclasses of Node to have their JSMumbleOwner objects inherit from JSNodeOwner. The immediate benefit of this patch is that we correctly avoid collecting wrappers for HTMLAudioElements when they are reachable from the DOM. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): 2012-11-17 Elliott Sprehn Expose JSObject::removeDirect and PrivateName to WebCore https://bugs.webkit.org/show_bug.cgi?id=102546 Reviewed by Geoffrey Garen. Add forwarding header for PrivateName, so JSDependentRetained works. No new tests, just adding headers. * ForwardingHeaders/runtime/PrivateName.h: Added. 2012-11-17 Simon Fraser Reduce the crazy number of parameters to RenderLayer clip-rect functions https://bugs.webkit.org/show_bug.cgi?id=102604 Reviewed by Dan Bernstein. Many of the RenderLayer member functions related to clip rect computation took a long list of similar parameters. Gather these into a struct, ClipRectsContext, that we pass to these functions No functional changes. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::updateClipRects): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::parentClipRects): (WebCore::RenderLayer::backgroundClipRect): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::childrenClipRect): (WebCore::RenderLayer::selfClipRect): (WebCore::RenderLayer::localClipRect): * rendering/RenderLayer.h: (WebCore::RenderLayer::ClipRectsContext::ClipRectsContext): (ClipRectsContext): (RenderLayer): (WebCore::RenderLayer::clipRects): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::clippedByAncestor): * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): 2012-11-17 Simon Fraser Simplify bounds computation for the RenderView's layer https://bugs.webkit.org/show_bug.cgi?id=102597 Reviewed by Anders Carlsson. Computing the bounds of the main layer (that of the RenderView) used to do a full RenderLayer walk, taking the union of the bounds of all the sublayers, which is very expensive on large pages. For the RenderView we can avoid that entirely and just use the RenderView's document rect. Since page scaling happens as a transform on this layer, we want the unscaled document rect. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateLayerBounds): 2012-11-17 Eric Seidel Add ScriptWrappable to more WebCore classes which are commonly JS-wrapped https://bugs.webkit.org/show_bug.cgi?id=102601 Reviewed by Adam Barth. From my investigations all of these classes exist only to be exposed to the web (via JavaScript) and are not used internally by WebCore. I beleive all of them always have wrappers. These were found using this code: https://bugs.webkit.org/show_bug.cgi?id=102539#c2 Geolocation -- navigator.geolocation WebKitCSSMatrix -- represent matrixes in JS through various APIs DOMStringMap, NamedNodeMap, NodeIterator, TreeWalker -- exclusively for the DOM API Blob, FileList - used by the File, Clipboard and XHR, also exclusively as API ValidityState -- formControl.validity CanvasRenderingContext -- canvas.getContext() DOMApplicationCache -- window.appcache Screen -- window.screen DOMMimeTypeArray -- navigator.mimetypes DOMPlugin -- navigator.plugins[0] DOMPluginArray -- navigator.plugins * Modules/geolocation/Geolocation.h: * css/WebKitCSSMatrix.h: * dom/DOMStringMap.h: * dom/NamedNodeMap.h: * dom/NodeIterator.h: * dom/TreeWalker.h: * fileapi/Blob.h: * fileapi/FileList.h: (had to un-indent to make check-webkit-style happy) (FileList): (WebCore::FileList::create): (WebCore::FileList::length): (WebCore::FileList::isEmpty): (WebCore::FileList::clear): (WebCore::FileList::append): * html/ValidityState.h: * html/canvas/CanvasRenderingContext.h: * loader/appcache/DOMApplicationCache.h: * page/Screen.h: * platform/graphics/wince/MediaPlayerProxy.cpp: (WebCore::WebMediaPlayerProxy::initEngine): This code was wrong, fixed to use internal APIs. * plugins/DOMMimeTypeArray.h: * plugins/DOMPlugin.h: * plugins/DOMPluginArray.h: 2012-11-17 Alexandru Chiculita [Texmap][CSS Shaders] Reuse the precompiled shader for custom filters in TextureMapperGL https://bugs.webkit.org/show_bug.cgi?id=101801 Reviewed by Noam Rosenthal. Added a HashMap in TextureMapperGL to store the precompiled versions of the shaders. Also added a new API on TextureMapper that receives a notification when the shader is no longer needed. No new tests, the code is tested by existing tests. * platform/graphics/filters/CustomFilterOperation.h: (WebCore::CustomFilterOperation::setProgram): (CustomFilterOperation): Made the constructor protected, so that we can overwrite the class in WK2. * platform/graphics/filters/CustomFilterValidatedProgram.cpp: (WebCore::CustomFilterValidatedProgram::validatedProgramInfo): (WebCore): * platform/graphics/filters/CustomFilterValidatedProgram.h: (CustomFilterValidatedProgram): * platform/graphics/texmap/TextureMapper.h: (WebCore): (TextureMapper): (WebCore::TextureMapper::removeCachedCustomFilterProgram): Function to be called by the platform code, when the shader is no longer needed. This implementation is empty and overridden in TextureMapperGL. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::removeCachedCustomFilterProgram): Removes the compiled shader from the cache. This is called from WK2 when the compiled shader is no longer needed. (WebCore): (WebCore::TextureMapperGL::drawUsingCustomFilter): The first time it uses a new shader it will cache the compiled version until removeCachedCustomFilterProgram is called. * platform/graphics/texmap/TextureMapperGL.h: (WebCore): (TextureMapperGL): 2012-11-17 Brady Eidson Add an integer identifier field to AuthenticationChallengeBase. https://bugs.webkit.org/show_bug.cgi?id=102593 Reviewed by Darin Adler. This is to support linking two different challenges that might not compare as equal but that represent the same logical authentication challenge. One example is in an IPC environment where the platform challenge can only exist in one process. No new tests (Platform support, no effect in tested configs). * WebCore.exp.in: * platform/network/AuthenticationChallengeBase.cpp: (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase): * platform/network/AuthenticationChallengeBase.h: (WebCore::AuthenticationChallengeBase::identifier): * platform/network/cf/AuthenticationChallenge.h: * platform/network/mac/AuthenticationMac.mm: (WebCore::generateUniqueIdentifier): (WebCore::AuthenticationChallenge::AuthenticationChallenge): Generate a new unique identifier whenever constructing a challenge from an NSURLAuthenticationChallenge. * platform/network/cf/AuthenticationCF.cpp: (WebCore::generateUniqueIdentifier): (WebCore::AuthenticationChallenge::AuthenticationChallenge): Generate a new unique identifier whenever constructing a challenge from a CFURLAuthChallengeRef. Implement the new constructor form for ports relevant to WebKit2: * platform/network/qt/AuthenticationChallenge.h: (WebCore::AuthenticationChallenge::AuthenticationChallenge): * platform/network/soup/AuthenticationChallenge.h: (WebCore::AuthenticationChallenge::AuthenticationChallenge): * platform/network/win/AuthenticationChallenge.h: (WebCore::AuthenticationChallenge::AuthenticationChallenge): 2012-11-17 Simon Fraser Dump the tile cache extent in layout tests https://bugs.webkit.org/show_bug.cgi?id=102600 Reviewed by Anders Carlsson. When dumping tiled layer stats in layout tests, also dump the extent of the tile grid. This will allow us to detect issues related to zooming, which is not possible with the existing tile coverage rect, which is dumped in layer (not tile) coordinates. * platform/graphics/TiledBacking.h: Added tileGridExtent(). * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump the tile grid extent. * platform/graphics/ca/mac/TileCache.h: tileCoverageRect() should be OVERRIDE. * platform/graphics/ca/mac/TileCache.mm: (WebCore::TileCache::getTileIndexRangeForRect): (WebCore::TileCache::tileGridExtent): Return a rect with the size of the grid as top,left width,height. 2012-11-17 Andreas Kling Avoid full style recalc when 'style' attribute changes. Reviewed by Anders Carlsson. Use setNeedsStyleRecalc(InlineStyleChange) when the 'style' attribute changes to reduce the amount of work done in recalcStyle(). * dom/StyledElement.cpp: (WebCore::StyledElement::styleAttributeChanged): 2012-11-17 Li Yin Remove coneGain and distanceGain attributes from PannerNode.idl https://bugs.webkit.org/show_bug.cgi?id=102343 Reviewed by Chris Rogers. Removing .coneGain and .distanceGain as publicly accessible values, since normally they only need to be calculated internally. No changes to tests, since these attributes were not tested and are being removed. * Modules/webaudio/PannerNode.idl: 2012-11-17 Balazs Kelemen [Coordinated Graphics] Resumed animations leave an obsolate GraphicsLayerAnimation behind https://bugs.webkit.org/show_bug.cgi?id=102530 Reviewed by Noam Rosenthal. GraphicsLayer::addAnimation is called no only when a new animation is created but also when resuming a paused animation. If this is a resumed animation we should remove the obsolate GraphicsLayerAnimation object. Tested by animations tests. * platform/graphics/GraphicsLayerAnimation.cpp: (WebCore::GraphicsLayerAnimations::add): 2012-11-17 Martin Robinson [Soup] CredentialStorage should only be used for HTTP-family requests https://bugs.webkit.org/show_bug.cgi?id=102582 Reviewed by Gustavo Noronha Silva. Do not use CredentialStorage when handling non-HTTP family requests. CredentialStorage only expects to handle requests in the HTTP family. No new tests. This is covered by existing tests. * platform/network/ResourceHandle.h: (ResourceHandle): Add a shouldUseCredentialStorage helper to ResourceHandle. This helper returns false when firstRequest() is a non-HTTP family request. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::applyAuthenticationToRequest): Use the new helper. (WebCore::createSoupRequestAndMessageForHandle): Ditto. (WebCore::ResourceHandle::start): Ditto. (WebCore::ResourceHandle::shouldUseCredentialStorage): Ditto. (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Ditto. (WebCore::ResourceHandle::receivedCredential): Ditto. 2012-11-16 Patrick Gansterer Build fix for !USE(ACCELERATED_COMPOSITING) after r135029. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintOverflowControls): 2012-11-16 Benjamin Poulain Improve the performance of rect transform https://bugs.webkit.org/show_bug.cgi?id=101828 Reviewed by Simon Fraser. Mapping a rect and a quad by a transform is a common operation because we use it to recompute the repaint rect, overflow rect, etc. The way it was done, is by transforming through mapRect()->mapQuad()->4 times mapPoint(). Each of those functions tests isIdentityOrTranslation() which has to read the whole matrix and perform many comparison. Because of that, the simple mapping of a rect was loading and checking the matrix 5 times too many. This patch just cut the intermediary calls. On ARM, putting the operation together also has the advantage of loading the matrix only once in registers and reusing it for every point. * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::mapPoint): (WebCore::TransformationMatrix::mapRect): * platform/graphics/transforms/TransformationMatrix.h: (WebCore): (WebCore::TransformationMatrix::mapPointImpl): New convenience function to perform the point project without doing isIdentityOrTranslation(). 2012-11-16 Simon Fraser Avoid calling the virtual isBlockFlow() in RenderBox::computeRectForRepaint() https://bugs.webkit.org/show_bug.cgi?id=102581 Reviewed by Dan Bernstein. isBlockFlow() is a virtual function call, and shows up in profiles of Facebook pages as called from RenderBox::computeRectForRepaint(). It's faster to do the hasColumns() bit-check first. Also replace a call to layer() with the hasLayer() bit-check. * rendering/RenderBox.cpp: (WebCore::RenderBox::computeRectForRepaint): 2012-11-16 Sheriff Bot Unreviewed, rolling out r134817. http://trac.webkit.org/changeset/134817 https://bugs.webkit.org/show_bug.cgi?id=102576 Broke iframes and causing tons of crashes on ClusterFuzz (Requested by inferno-sec on #webkit). * dom/ContainerNode.cpp: (WebCore::willRemoveChildren): * dom/ContainerNodeAlgorithms.cpp: (WebCore::ChildFrameDisconnector::collectDescendant): * dom/ContainerNodeAlgorithms.h: (WebCore::ChildFrameDisconnector::ChildFrameDisconnector): (WebCore::ChildFrameDisconnector::~ChildFrameDisconnector): (ChildFrameDisconnector): (WebCore::ChildFrameDisconnector::collectDescendant): (WebCore::ChildFrameDisconnector::disconnect): * dom/Node.cpp: * dom/Node.h: (Node): * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): (NodeRareData): * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::setContentFrame): (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): 2012-11-16 Simon Fraser Fix overlay scrollbar painting in compositing layers https://bugs.webkit.org/show_bug.cgi?id=102442 Reviewed by Beth Dakin. There were two issues with overlay scrollbar painting in compositing layers. First, we'd only ever call setContainsDirtyOverlayScrollbars() on the RenderView's layer, even when encountering an overlay scrollbar in some descendant compositing layer. This meant that we'd never run the paintOverlayScrollbars() code for those child compositing layers, so sometimes scrollbars were missing there. Even after fixing that, we would fail to render scrollbars that were not in the composited RenderLayer itself. This happened because we called into RenderLayer::paintOverlayScrollbars(), which called paintLayer() with flags that only said to paint the overlay scrollbars but not any descendants, so this paint path would not walk child RenderLayers. Also remove the containsScrollableAreaWithOverlayScrollbars() flag on ScrollView which is no longer used. * platform/ScrollView.cpp: (WebCore::ScrollView::ScrollView): Remove containsScrollableAreaWithOverlayScrollbars(). (WebCore::ScrollView::paint): Remove setting of m_containsScrollableAreaWithOverlayScrollbars. * platform/ScrollView.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintOverflowControls): Call setContainsDirtyOverlayScrollbars() on the compositing ancestor or the root. Remove call to setContainsScrollableAreaWithOverlayScrollbars(). (WebCore::RenderLayer::paintOverlayScrollbars): When painting overlay scrollbars, no need to say we have transparency, and no need to use temporary clip rects. (WebCore::RenderLayer::paintLayer): The PaintLayerPaintingOverlayScrollbars check here was only needed because the compositing entrypoint to painting overlay scrollbars went via paintLayer(), which isn't normally used as a composited painting entry point. Now that we no longer call that, we don't need this special check. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::paintIntoLayer): Jump into overlay scrollbar painting via paintLayerContents(), not paintOverlayScrollbars(), since the latter does not traverse sublayers. 2012-11-16 Joshua Bell IndexedDB: Assert hit when getting non-existent object store in version change transaction https://bugs.webkit.org/show_bug.cgi?id=102547 Reviewed by Tony Chang. Code did not account for the not-found case in "versionchange" transactions, where all object stores are implicitly in scope. Test: storage/indexeddb/object-lookups-in-versionchange.html * Modules/indexeddb/IDBTransaction.cpp: (WebCore::IDBTransaction::objectStore): 2012-11-12 Simon Fraser Eliminate ancestor tree walk computing outlineBoundsForRepaint() when updating layer positions https://bugs.webkit.org/show_bug.cgi?id=101874 Reviewed by Dave Hyatt. RenderLayer::updateLayerPositions() and updateLayerPositionsAfterScroll() spend a lot of time in computeRepaintRects(), which does two ancestor tree walks, once for clippedOverflowRectForRepaint(), and one for outlineBoundsForRepaint(). Eliminate the ancestor tree walk in outlineBoundsForRepaint() by maintaining a RenderGeometryMap as we traverse the layer tree, and then using it to map the outline bounds to the repaint container. Replace the hokey cached offsetFromRoot now that the RenderGeometryMap can do a better job. The clipped overflow rect cannot be mapped simply, so cannot yet make use of the geometry map. Modify the RenderGeometryMap to support mapping to some repaintContainer ancestor. Add a RenderObject walk that is necessary to detect flipped writing mode blocks. Pass the RenderGeometryMap as an optional parameter to outlineBoundsForRepaint. * page/FrameView.cpp: (WebCore::FrameView::layout): Make a RenderGeometryMap and pass it down to updateLayerPositions(). For partial layouts, we have to push layers between the root and the enclosing layer of the layout subtree. The geometry map used for repainting does not use SnapOffsetForTransforms, so initialize it explicitly with just the UseTransforms flag. (WebCore::FrameView::repaintFixedElementsAfterScrolling): Make a RenderGeometryMap to pass along to updateLayerPositionsAfterScroll(). * rendering/RenderBox.cpp: (WebCore::RenderBox::outlineBoundsForRepaint): Replace the optional cachedOffsetToRepaintContainer parameter with an optional RenderGeometryMap, and it use to map the compute rect to repaintContainer coordinates. * rendering/RenderBox.h: * rendering/RenderGeometryMap.cpp: (WebCore::RenderGeometryMap::RenderGeometryMap): This now has to store the mapping flags to use, so that its behavior can match that of mapLocalToContainer(). The pertinent flag is the confusingly named SnapOffsetForTransforms. (WebCore::RenderGeometryMap::absolutePoint): Call the new mapToContainer() with a null container. (WebCore::RenderGeometryMap::absoluteRect): Ditto. (WebCore::RenderGeometryMap::mapToContainer): Map to the supplied container, asserting that we found it. Add point- and rect-based mapping methods akin to the old absoluteRect/absolutePoint. (WebCore::canMapViaLayer): We need to test for isRenderFlowThread() here too. (WebCore::RenderGeometryMap::pushMappingsToAncestor): When mapping via layers, ensure that the RenderView is pushed as the first step. * rendering/RenderGeometryMap.h: (RenderGeometryMap): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterLayout): New wrapper for updateLayerPositions() that makes the geometry map. (WebCore::RenderLayer::updateLayerPositionsAfterScroll): New wrapper for updateLayerPositionsAfterScroll that makes the geometry map. (WebCore::RenderLayer::updateLayerPositions): Now takes an optional RenderGeometryMap. Remove the old offsetFromRoot code. Push and pop layers to/from the geometry map. Use the geometry map to get the offsetFromRoot as needed by overflow controls. Pass it to computeRepaintRects(). (WebCore::RenderLayer::computeRepaintRects): Pass the geometry map to outlineBoundsForRepaint(). (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Push and pop to/from the geometry map, and pass it to computeRepaintRects(). (WebCore::RenderLayer::removeOnlyThisLayer): Remove the offsetFromRootBeforeMove computation; this could use a geometry map in future if it is shown to be a bottleneck. * rendering/RenderLayer.h: (WebCore::RenderLayer::canUseConvertToLayerCoords): It was thought that the isComposited() was there because the older cached offsetFromRoot logic was sensitive to compositing, but convertToLayerCoords() is not affected by compositing so this check is not needed, and actually harmful. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::OverlapMap::OverlapMap): The geometry map used for overlap testing should not use SnapOffsetForTransforms, so initialize it explicitly with just the UseTransforms flag. * rendering/RenderObject.h: (WebCore::RenderObject::outlineBoundsForRepaint): * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::outlineBoundsForRepaint): * rendering/svg/RenderSVGModelObject.h: (RenderSVGModelObject): 2012-11-16 Alec Flett Add tests for explicit serialization values https://bugs.webkit.org/show_bug.cgi?id=96818 Reviewed by Adam Barth. Expose direct access to the serialization/deserialization mechanisms of SerializedScriptValue to DumpRenderTree. * testing/Internals.cpp: (WebCore::Internals::serializeObject): (WebCore): (WebCore::Internals::deserializeBuffer): * testing/Internals.h: (WebCore): * testing/Internals.idl: 2012-11-16 Andreas Kling Exploit shared attribute data to avoid parsing identical "style" attributes. Reviewed by Antti Koivisto. Track the "inline style dirty" state on ElementAttributeData instead of in a Node flag. This allows us to avoid duplicate work for ElementAttributeData that are shared between multiple elements, since the state is no longer per-Element. * css/StyleResolver.cpp: (WebCore::isCacheableInMatchedPropertiesCache): Disable the matched properties cache for styles with non-standard writing-mode. This is necessary because some CSS properties have different meaning depending on context - properties handled by CSSProperty::resolveDirectionAwareProperty(). Now that multiple elements may have identical inlineStyle() pointers, this is necessary to avoid mapping StylePropertySets with direction-aware properties to RenderStyles with differing writing-modes in the matched properties cache. * dom/Node.h: * dom/ElementAttributeData.cpp: (WebCore::ElementAttributeData::ElementAttributeData): * dom/ElementAttributeData.h: (WebCore::ElementAttributeData::ElementAttributeData): (ElementAttributeData): * dom/Element.h: (WebCore::Element::updateInvalidAttributes): * dom/Element.cpp: (WebCore::Element::getAttribute): (WebCore::Element::removeAttribute): * dom/StyledElement.h: (WebCore::StyledElement::invalidateStyleAttribute): * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): Move "style attribute dirty" flag to ElementAttributeData. (WebCore::Element::cloneAttributesFromElement): Remove ugly optimization to avoid reparsing inline style when cloning elements. This now happens automagically since cloning nodes just refs the original attribute data. * dom/StyledElement.cpp: (WebCore::StyledElement::updateStyleAttribute): (WebCore::StyledElement::setInlineStyleFromString): (WebCore::StyledElement::styleAttributeChanged): (WebCore::StyledElement::inlineStyleChanged): Avoid reparsing the inline style if the element's attribute data is immutable and already has a parsed inlineStyle(). Split the set-inline-style-from-string code out of styleAttributeChanged() to make the code more understandable. 2012-11-16 Simon Fraser Don't update layer positions on scrolling if we're in the middle of layout https://bugs.webkit.org/show_bug.cgi?id=102556 Reviewed by Dan Bernstein. RenderLayer::scrollTo() can be called in the middle of layout. When that happens we should not waste time updating layer positions, compositing layers, or widget positions, because we'll do those at the end of layout anyway. This prevents us from having inconsistent RenderLayer state, which hinders future optimizations in this area. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollTo): 2012-11-16 Tony Chang Remove ENABLE_CSS_HIERARCHIES since it's no longer in use https://bugs.webkit.org/show_bug.cgi?id=102554 Reviewed by Andreas Kling. As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 , we're going to revist this feature once additional vendor support is achieved. No new tests, just removing an unused define. * Configurations/FeatureDefines.xcconfig: * GNUmakefile.features.am: 2012-11-16 Mark Pilgrim [Chromium] Remove cookie-related functions from PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=99340 Reviewed by Adam Barth. Move cookie-related functions out of PlatformSupport and implement new PlatformCookieJar interface via NetworkContext. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * loader/CookieJar.cpp: * loader/chromium/CookieJarChromium.cpp: Removed. * platform/chromium/PlatformSupport.h: (WebCore): (PlatformSupport): * platform/network/NetworkingContext.h: (WebKit): (NetworkingContext): * platform/network/chromium/CookieJarChromium.cpp: Copied from Source/WebCore/loader/chromium/CookieJarChromium.cpp. (WebCore::setCookiesFromDOM): (WebCore::cookiesForDOM): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): 2012-11-16 Pablo Flouret [JSC] Don't sanitize window.onerror information on crossorigin-enabled scripts https://bugs.webkit.org/show_bug.cgi?id=70574 Reviewed by Geoffrey Garen. For scripts that use CORS (via the crossorigin attribute in this case), don't sanitize the information passed to the window's onerror handler (i.e. message, url, and line number). Useful for scripts hosted on CDNs. Tests: http/tests/security/script-crossorigin-onerror-information.html http/tests/security/script-no-crossorigin-onerror-should-be-sanitized.html * WebCore.exp.in: * WebCore.order: * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSDOMBinding.h: (WebCore): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): * bindings/js/ScriptSourceCode.h: (WebCore::ScriptSourceCode::ScriptSourceCode): (WebCore::ScriptSourceCode::cachedScript): (ScriptSourceCode): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): Keep a reference to the cached script in the ScriptSourceCode, so that it can be passed around and be available when reporting the exception. * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::sanitizeScriptError): (WebCore::ScriptExecutionContext::reportException): (WebCore::ScriptExecutionContext::dispatchErrorEvent): * dom/ScriptExecutionContext.h: (WebCore): (ScriptExecutionContext): Check if the script passes the access control checks, and if so, don't sanitize the error information. * html/parser/HTMLPreloadScanner.cpp: (WebCore::PreloadTask::processAttributes): (WebCore::PreloadTask::preload): (PreloadTask): (WebCore::PreloadTask::crossOriginModeAllowsCookies): When preloading script elements, check for the crossorigin attribute and adjust the request's allowCookies value accordingly. Otherwise when the script is loaded from the cache later on, the cross origin mode (anonymous/use-credentials) will be effectively ignored. 2012-11-16 Jon Lee Change visual look of placeholder https://bugs.webkit.org/show_bug.cgi?id=102149 Reviewed by Darin Adler. Move the button to the lower-right corner. Move the theming into RenderSnapshottedPlugin for now. Eventually we will want to migrate to using the shadow DOM instead, and the metrics of the button are needed for click passthrough. * Resources/startButton.png: Added. * Resources/startButton@2x.png: Added. * Resources/startButtonPressed.png: Added. * Resources/startButtonPressed@2x.png: Added. * WebCore.xcodeproj/project.pbxproj: Add button images. Maintain variables to track whether the mouse is over the button, and the rect for the button. If the user clicks in the rect, we render a pressed button. * rendering/RenderSnapshottedPlugIn.cpp: (WebCore): Add named constant for bottom and right padding of the button. (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): (WebCore::RenderSnapshottedPlugIn::paintReplaced): (WebCore::startButtonImage): Returns button image. (WebCore::startButtonPressedImage): Returns pressed button image. (WebCore::RenderSnapshottedPlugIn::paintButton): Draw the button image in the lower right hand corner, but only if we are active or hovered. (WebCore::RenderSnapshottedPlugIn::repaintButton): Stubbed to call repaint(). (WebCore::RenderSnapshottedPlugIn::handleEvent): Repaint the button if we are hovering over the plugin rect. With a mouse down event, calculate whether the mouse position is within the button rect. (WebCore::RenderSnapshottedPlugIn::layout): Cache the rect representing the button contents. * rendering/RenderSnapshottedPlugIn.h: Remove theming function for now. * rendering/RenderTheme.h: (RenderTheme): * rendering/RenderThemeMacShared.h: * rendering/RenderThemeMacShared.mm: 2012-11-16 Eric Seidel Deploy ScriptWrappable to more always-wrapped objects https://bugs.webkit.org/show_bug.cgi?id=102539 Reviewed by Adam Barth. Add the ScriptWrappable baseclass to: CSSStyleDeclaration (anttik tells me these should only be used from JS, even though some old Editing code used to use them) ClientRect (element.getBoundingClientRects) Event (Not all events end up wrapped, but any which live past dispatch do) NodeList (this covers Static and Dynamic node list types, like document.all) HTMLCollection (separate from NodeList, for things like table.rows) Storage (for window.storage, always wrapped) XMLHttpRequest (always wrapped, created from JS) This should be a small memory savings as the inline pointer is only 4-8 bytes instead of the hashmap entry which would be 8-16. This may also show up on benchmarks which repeatedly access these objects (like window.storage). These were found by adding a couple lines of logging-code to WebCore::createWrapper when we were in the main world, but took the HashMap (instead of inline) storage path. I used sort and uniq -c to find the most-frequently wrapped objects (while surfing a few common sites) and came up with this list. There are still a few more complicated objects (like CSSStyleDeclaration) which may benifit from inline-wrapper-access and will be covered in a later patch. * css/CSSStyleDeclaration.h: * dom/ClientRect.h: * dom/Event.h: * dom/NodeList.h: * html/HTMLCollection.h: * storage/Storage.h: * xml/XMLHttpRequest.h: 2012-11-16 Jon Lee Simulated events instances do not all have the same underlying event https://bugs.webkit.org/show_bug.cgi?id=102468 Reviewed by Alexey Proskuryakov. The PassRefPtr with the underlying event is included as an argument for the mouse down, up, and click events. But the PassRefPtr loses its underlying pointer after the first simulated mouse down event because it gets assigned to that event's private m_underlyingEvent variable. We therefore send NULL to the other events. The fix is for this and related functions to pass the raw pointer. A layout test is not possible to put together because the call sites that use simulated events with an underlying event do not send mouse events, and those that send mouse events have a NULL underlying event. * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::dispatchSimulatedClick): Require passing in the raw pointer. * dom/EventDispatcher.h: * dom/Node.cpp: (WebCore::Node::dispatchSimulatedClick): Ditto. * dom/Node.h: 2012-11-16 Patrick Gansterer Build fix for WinCE after r134936. * platform/network/win/CookieJarWin.cpp: (WebCore::cookieRequestHeaderFieldValue): 2012-11-16 Dimitri Glazkov Unreviewed, rolling out r134986. http://trac.webkit.org/changeset/134986 https://bugs.webkit.org/show_bug.cgi?id=102110 Triggered ASSERT in fast/frames/seamless/seamless-inherited- origin.html. * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::addAuthorRulesAndCollectUserRulesFromSheets): (WebCore::collectCSSOMWrappers): * css/StyleResolver.h: (StyleResolver): * dom/Document.cpp: (WebCore::Document::setCompatibilityMode): * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets): (WebCore): (WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets): (WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets): (WebCore::DocumentStyleSheetCollection::addUserSheet): (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): * dom/DocumentStyleSheetCollection.h: (DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::documentUserSheets): * page/PageGroup.cpp: (WebCore::PageGroup::addUserStyleSheetToWorld): (WebCore::PageGroup::removeUserStyleSheetFromWorld): (WebCore::PageGroup::removeUserStyleSheetsFromWorld): (WebCore::PageGroup::removeAllUserContent): (WebCore::PageGroup::resetUserStyleCacheInAllFrames): * page/PageGroup.h: (PageGroup): 2012-11-16 Michael Pruett IndexedDB: Propagate DOMRequestState to IndexedDB binding utility functions https://bugs.webkit.org/show_bug.cgi?id=102430 Reviewed by Adam Barth. DOMRequestState is currently propagated to some but not all of the IndexedDB binding utility functions. In order to implement these functions for JSC, this state must be propagated to all of the utility functions. Tests: storage/indexeddb/* * Modules/indexeddb/IDBCursor.cpp: (WebCore::IDBCursor::update): (WebCore::IDBCursor::setValueReady): * Modules/indexeddb/IDBObjectStore.cpp: (WebCore::generateIndexKeysForValue): (WebCore::IDBObjectStore::put): (WebCore): * Modules/indexeddb/IDBRequest.cpp: (WebCore::IDBRequest::onSuccess): (WebCore::IDBRequest::dispatchEvent): * Modules/indexeddb/IDBRequest.h: (WebCore::IDBRequest::requestState): (IDBRequest): * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromScriptValueAndKeyPath): (WebCore::serializeIDBValue): (WebCore::injectIDBKeyIntoScriptValue): * bindings/v8/IDBBindingUtilities.h: (WebCore): 2012-11-16 Byungwoo Lee Rebaselined run-bindings-tests. https://bugs.webkit.org/show_bug.cgi?id=102523 Reviewed by Dimitri Glazkov. Expected results need to be updated after r134931 * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter): (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter): (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackCallback): 2012-11-16 Pratik Solanki For single element arrays use the pointer into the CFDataRef instead of copying data https://bugs.webkit.org/show_bug.cgi?id=102306 Reviewed by Alexey Proskuryakov. We generally copy the data received from CFNetwork into our own buffers. But if the CFArrayRef has exactly one CFDataRef inside it, then we can just hold on to the CFDataRef and access its memory directly and avoid making a copy. This also moves the creation of PurgeableBuffer from CachedResource to SharedBuffer. SharedBuffer::createPurgeableBuffer() will avoid creating PurgeableBuffer when the SharedBuffer is backed by a NSData/CFDataRef and when we want to optimize and directly use the memory in the data array. No new tests because no change in functionality. * loader/ResourceBuffer.cpp: (WebCore::ResourceBuffer::createPurgeableBuffer): Added. * loader/ResourceBuffer.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::makePurgeable): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::createPurgeableBuffer): Added. (WebCore::SharedBuffer::data): * platform/SharedBuffer.h: * platform/cf/SharedBufferCF.cpp: (WebCore::SharedBuffer::platformData): Use reinterpret_cast instead of C-style cast. (WebCore::SharedBuffer::maybeTransferPlatformData): Use reinterpret_cast instead of C-style cast. (WebCore::SharedBuffer::singleDataArrayBuffer): Added. 2012-11-16 Antti Koivisto REGRESSION(r129644): User StyleSheet not applying https://bugs.webkit.org/show_bug.cgi?id=102110 Reviewed by Andreas Kling. Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that such things don't exists but on Chromium addUserStyleSheet() confusingly uses them. The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets(). It also generally cleans up the code around injected and user stylesheets. Tests: userscripts/user-script-and-stylesheet.html userscripts/user-stylesheet-invalidate.html * css/StyleResolver.cpp: (WebCore::StyleResolver::StyleResolver): (WebCore::StyleResolver::collectRulesFromUserStyleSheets): (WebCore::collectCSSOMWrappers): * css/StyleResolver.h: (StyleResolver): * dom/Document.cpp: (WebCore::Document::setCompatibilityMode): * dom/DocumentStyleSheetCollection.cpp: (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection): (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets): (WebCore): (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets): (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache): (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache): (WebCore::DocumentStyleSheetCollection::addUserSheet): (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): * dom/DocumentStyleSheetCollection.h: (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets): (DocumentStyleSheetCollection): * page/PageGroup.cpp: (WebCore::PageGroup::addUserStyleSheetToWorld): (WebCore::PageGroup::removeUserStyleSheetFromWorld): (WebCore::PageGroup::removeUserStyleSheetsFromWorld): (WebCore::PageGroup::removeAllUserContent): (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames): * page/PageGroup.h: (PageGroup): 2012-11-16 Andreas Kling StyleResolver: Only input elements need equal "readonly" attribute for style sharing. Reviewed by Antti Koivisto. Move the comparison of the "readonly" attribute into canShareStyleWithControl() since it's only relevant for sharing style between elements. Also skip attribute comparisons for form control elements that share the same ElementAttributeData. * css/StyleResolver.cpp: (WebCore::StyleResolver::canShareStyleWithControl): (WebCore::haveIdenticalStyleAffectingAttributes): 2012-11-16 Sheriff Bot Unreviewed, rolling out r134867. http://trac.webkit.org/changeset/134867 https://bugs.webkit.org/show_bug.cgi?id=102544 Broke security fuzzier test (heap-buffer-overflow) (Requested by bfulgham on #webkit). * platform/audio/Biquad.cpp: (WebCore::Biquad::process): 2012-11-16 Tommy Widenflycht MediaStream API: Update RTCPeerConnection states to match the latest editors draft https://bugs.webkit.org/show_bug.cgi?id=102382 Reviewed by Adam Barth. Updating readyState & iceState, and adding iceGatheringState. Also safeguarding the event timer callback. Patch covered by existing tests. * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): (WebCore::RTCPeerConnection::createOffer): (WebCore::RTCPeerConnection::createAnswer): (WebCore::RTCPeerConnection::setLocalDescription): (WebCore::RTCPeerConnection::localDescription): (WebCore::RTCPeerConnection::setRemoteDescription): (WebCore::RTCPeerConnection::remoteDescription): (WebCore::RTCPeerConnection::updateIce): (WebCore::RTCPeerConnection::addIceCandidate): (WebCore::RTCPeerConnection::readyState): (WebCore::RTCPeerConnection::iceGatheringState): (WebCore): (WebCore::RTCPeerConnection::iceState): (WebCore::RTCPeerConnection::addStream): (WebCore::RTCPeerConnection::close): (WebCore::RTCPeerConnection::didChangeIceGatheringState): (WebCore::RTCPeerConnection::stop): (WebCore::RTCPeerConnection::changeReadyState): (WebCore::RTCPeerConnection::scheduledEventTimerFired): * Modules/mediastream/RTCPeerConnection.h: (RTCPeerConnection): * Modules/mediastream/RTCPeerConnection.idl: * dom/EventNames.h: (WebCore): * platform/mediastream/RTCPeerConnectionHandlerClient.h: (RTCPeerConnectionHandlerClient): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEGatheringState): (WebCore): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (RTCPeerConnectionHandlerChromium): 2012-11-16 Dimitri Glazkov Unreviewed, rolling out r134973. http://trac.webkit.org/changeset/134973 https://bugs.webkit.org/show_bug.cgi?id=99340 Broke compile on at least Mac and Linux. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * loader/CookieJar.cpp: * loader/chromium/CookieJarChromium.cpp: Renamed from Source/WebKit/chromium/src/FrameNetworkingContextImpl.cpp. (WebCore): (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): * platform/chromium/PlatformSupport.h: (WebCore): (PlatformSupport): * platform/network/NetworkingContext.h: * platform/network/chromium/CookieJarChromium.cpp: Removed. 2012-11-16 Martin Robinson [GTK] [WebKit2] Move GtkAuthenticationDialog to the UIProcess https://bugs.webkit.org/show_bug.cgi?id=101843 Reviewed by Gustavo Noronha Silva. Make GtkAuthenticationDialog more general, so that it can be subclassed in WebKit2. We cannot use the WebCore authentication-related classes directly there. No new tests. This patch does not change behavior. * platform/gtk/GtkAuthenticationDialog.cpp: (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Remove an unused include and reorder some field initializers. (WebCore::GtkAuthenticationDialog::authenticate): Now handle both the okay and cancel case here. This makes it simpler to subclass. (WebCore::GtkAuthenticationDialog::authenticationDialogResponseCallback): Handle fetching the username and password here, so that it can be shared with subclasses. * platform/gtk/GtkAuthenticationDialog.h: Make some methods virtual and protected so they can be subclasses. 2012-11-16 Mark Pilgrim [Chromium] Remove cookie-related functions from PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=99340 Reviewed by Adam Barth. Move cookie-related functions out of PlatformSupport and implement new PlatformCookieJar interface via NetworkContext. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * loader/CookieJar.cpp: * loader/chromium/CookieJarChromium.cpp: Removed. * platform/chromium/PlatformSupport.h: (WebCore): (PlatformSupport): * platform/network/NetworkingContext.h: (WebKit): (NetworkingContext): * platform/network/chromium/CookieJarChromium.cpp: Copied from Source/WebCore/loader/chromium/CookieJarChromium.cpp. (WebCore::setCookiesFromDOM): (WebCore::cookiesForDOM): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): 2012-11-16 Byungwoo Lee Fix assertion bug of build fix r134961 https://bugs.webkit.org/show_bug.cgi?id=102533 Reviewed by Martin Robinson. Assertion condition should be '!d->m_currentWebChallenge.isNull()' * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): 2012-11-16 Tommy Widenflycht [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel https://bugs.webkit.org/show_bug.cgi?id=102386 Reviewed by Adam Barth. Existing tests expanded to cover patch. * platform/mediastream/RTCDataChannelDescriptor.cpp: (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor): (WebCore::RTCDataChannelDescriptor::readyStateChanged): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel): (WebCore): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (WebKit): (RTCPeerConnectionHandlerChromium): 2012-11-16 Scott Violet [chromium] Copy linux theme related files to default https://bugs.webkit.org/show_bug.cgi?id=102403 Reviewed by Tony Chang Transitional patch that copies linux WebThemeEngine to default directory. No new tests, refactoring only. * WebCore.gyp/WebCore.gyp: Update compile rules when use_default_render_theme is set. * WebCore.gypi: Adds new files. * platform/chromium/PlatformSupport.h: * platform/chromium/PlatformThemeChromiumDefault.cpp: Copied from Source/WebCore/platform/chromium/PlatformThemeChromiumLinux.cpp. * platform/chromium/PlatformThemeChromiumDefault.h: Copied from Source/WebCore/platform/chromium/PlatformThemeChromiumLinux.h. * platform/chromium/ScrollbarThemeChromiumDefault.cpp: Copied from Source/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp. * platform/chromium/ScrollbarThemeChromiumDefault.h: Copied from Source/WebCore/platform/chromium/ScrollbarThemeChromiumLinux.h. * rendering/RenderThemeChromiumDefault.cpp: Copied from Source/WebCore/rendering/RenderThemeChromiumLinux.cpp. * rendering/RenderThemeChromiumDefault.h: Copied from Source/WebCore/rendering/RenderThemeChromiumLinux.h. 2012-11-16 Alec Flett IndexedDB: add missing 'explicit' and fix backing store release https://bugs.webkit.org/show_bug.cgi?id=102450 Reviewed by Tony Chang. A inconsequential regression was introduced in http://trac.webkit.org/changeset/134129 which resulted in objects sticking around a bit longer than expected. This makes sure the LevelDBTransaction is released at the moment of commit/rollback rather than when IDBTransactionBackendImpl is destroyed. No new tests, this is just internal state that will affect some future refactoring. * Modules/indexeddb/IDBBackingStore.h: (Cursor): (Transaction): (WebCore::IDBBackingStore::Transaction::reset): * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::abort): (WebCore::IDBTransactionBackendImpl::commit): 2012-11-16 Dimitri Glazkov [Chromium] One last tweak to WebCore.gypi to make Win build not sad. * WebCore.gypi: Removed one last mention of accessibility/gtk file. 2012-11-16 Robert Flack Handle gesture events on scrollbars. https://bugs.webkit.org/show_bug.cgi?id=101516 Reviewed by Antonio Gomes. Adds a gesture event handler to scrollbars and sends gestures beginning over a scrollbar to this handler to allow touch scrolling scrollbars. Test: fast/events/touch/gesture/gesture-scrollbar.html * page/EventHandler.cpp: (WebCore::EventHandler::clear): (WebCore::EventHandler::handleGestureEvent): (WebCore::EventHandler::isScrollbarHandlingGestures): (WebCore): * page/EventHandler.h: (EventHandler): * platform/Scrollbar.cpp: (WebCore::Scrollbar::Scrollbar): (WebCore): (WebCore::Scrollbar::gestureEvent): (WebCore::Scrollbar::mouseMoved): (WebCore::Scrollbar::mouseUp): (WebCore::Scrollbar::mouseDown): * platform/Scrollbar.h: (WebCore): (Scrollbar): * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::hitTest): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::hitTest): * platform/ScrollbarThemeComposite.h: (ScrollbarThemeComposite): * platform/qt/ScrollbarThemeQStyle.cpp: (WebCore::ScrollbarThemeQStyle::hitTest): * platform/qt/ScrollbarThemeQStyle.h: (ScrollbarThemeQStyle): 2012-11-16 Xianzhu Wang [Chromium-Android] Stack overflow in MediaControlsChromiumAndroid.cpp https://bugs.webkit.org/show_bug.cgi?id=102444 Reviewed by Adam Barth. No new tests. Have been covered by many existing layout tests. * html/shadow/MediaControlsChromiumAndroid.cpp: (WebCore::MediaControls::create): Calls createControls instead of itself. 2012-11-16 Andreas Kling StyleResolver: Optimize sharing candidate evaluation for elements with shared attribute data. Reviewed by Antti Koivisto. When evaluating two elements as potential style sharing candidate, we have a whole bunch of code comparing the various attributes that would prevent sharing. If the two elements both share the same ElementAttributeData, we can skip all those checks since they are guaranteed to have equal attributes. Cuts the time spent in canShareStyleWithElement() by 25% on the HTML5 spec at . * css/StyleResolver.cpp: (WebCore::haveIdenticalStyleAffectingAttributes): (WebCore::StyleResolver::canShareStyleWithElement): 2012-11-16 Byungwoo Lee [EFL][GTK] Build fix after r134955 https://bugs.webkit.org/show_bug.cgi?id=102527 Reviewed by Martin Robinson. Fix the EFL,GTK debug bulid fails after r134955. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): 2012-11-15 Alexey Proskuryakov Private Browsing is a per-page setting that sets a global value https://bugs.webkit.org/show_bug.cgi?id=67870 Reviewed by Sam Weinig. Make ResourceHandle{Mac,CFNet} use context to access storage session. * WebCore.exp.in: We track less session state in WebCore now, so we need fewer exports. * loader/FrameNetworkingContext.h: Added an OVERRIDE. * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): WebCore no longer keeps track of a globally enabled private CFNetwork storage session. * platform/CookiesStrategy.h: Added defaultCookieStorage(). Some cookie jar methods don't have a NetworkingContext pointer, and have to use whatever a client expects them to do. Perhaps we should move those methods away from WebCore eventually. * platform/network/NetworkingContext.h: Added storageSession(). * platform/network/ResourceHandle.h: Removed sttaic methods for dealing with global sessions. * platform/network/ResourceHandleInternal.h: Added m_storageSession. We need to remember it post-creation to do things in willSendRequest. Alternatively, we could keep a reference to NetworkingContext itself. * platform/network/cf/CookieJarCFNet.cpp: (WebCore::setCookiesFromDOM): currentCFHTTPCookieStorage now needs a context, there is no globally current one any more. Also, we don't really expect cookie stirage to be 0 when not using NSURLConnection. (WebCore::cookiesForDOM): Ditto. (WebCore::cookieRequestHeaderFieldValue): Ditto. (WebCore::cookiesEnabled): Ditto. (WebCore::getRawCookies): Ditto. (WebCore::deleteCookie): Ditto. (WebCore::getHostnamesWithCookies): Ditto. (WebCore::deleteCookiesForHostname): Ditto. (WebCore::deleteAllCookies): Ditto. * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::currentCFHTTPCookieStorage): Use a context. (WebCore::defaultCFHTTPCookieStorage): Except for Windows-only override session, this is implemented in a strategy. (WebCore::overridenCookieStorage): Exposed the override for WebKit use on Windows. * platform/network/cf/CookieStorageCFNet.h: Ditto. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willSendRequest): Use storage session from the context, not global one. (WebCore::makeFinalRequest): Merged this into the only remaining caller. This function didn't really make any sense on its own. (WebCore::shouldRelaxThirdPartyCookiePolicy): Factored out of createCFURLConnection to match Mac. (WebCore::ResourceHandle::createCFURLConnection): While merging makeFinalRequest() in, removed some seemingly nonsensical code that was getting and immediately re-applying cookie storage accept policy. (WebCore::ResourceHandle::start): Store context->storageSession() for use in willSendRequest. (WebCore::ResourceHandle::willSendRequest): Apply the stored session, not global one. (WebCore::ResourceHandle::storageSession): An accessor for static methods that cannot access "d". (WebCore::ResourceHandle::loadResourceSynchronously): Store context->storageSession() for use in willSendRequest. (WebCore::ResourceHandle::willLoadFromCache): Don't call makeFinalRequest here. It didn't match Mac, and nothing in makeFinalRequest should have affected the result. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::doUpdatePlatformRequest): This function used to apply current storage session to every request for no apparent reason. * platform/network/mac/CookieJarMac.mm: (WebCore::cookiesForDOM): Changed to pass context to currentCFHTTPCookieStorage. (WebCore::cookieRequestHeaderFieldValue): Ditto. (WebCore::setCookiesFromDOM): Ditto. (WebCore::cookiesEnabled): Ditto. (WebCore::getRawCookies): Ditto. (WebCore::deleteCookie): Ditto. (WebCore::getHostnamesWithCookies): Ditto. (WebCore::deleteCookiesForHostname): Ditto. (WebCore::deleteAllCookies): Ditto. * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy): There was no need to special case null currentCFHTTPCookieStorage, WKSI handles that internally. Added a context argument, so that the function can access current session. (WebCore::ResourceHandle::createNSURLConnection): Updated for other code changes. (WebCore::ResourceHandle::start): Store context->storageSession() for use in willSendRequest. (WebCore::ResourceHandle::willLoadFromCache): Style fix. (WebCore::ResourceHandle::loadResourceSynchronously): Store context->storageSession() for use in willSendRequest. (WebCore::ResourceHandle::willSendRequest): Use stored session, not global one. 2012-11-16 Dimitri Glazkov [Chromium] Land a proper fix for r134939. * WebCore.gyp/WebCore.gyp: Added exclusion for "atk". * WebCore.gypi: Put the accessibility/atk directory back into WebCore.gypi. 2012-11-16 Dimitri Glazkov [Chromium] Just yank the whole accessibility/atk dir out of WebCore.gypi. 2012-11-16 Dimitri Glazkov [Chromium] Updated WebCore.gypi after r134939. * WebCore.gypi: Renamed acessibility/gtk to accessibility/atk. 2012-11-16 Martin Robinson [GTK] Move CredentialBackingStore usage from GtkAuthenticationDialog to ResourceHandleSoup https://bugs.webkit.org/show_bug.cgi?id=101840 Reviewed by Gustavo Noronha Silva. Make ResourceHandleSoup aware of per-session CredentialStorage and persistent CredentialStorage. Persistent credential storage interaction is moved from GtkAuthenticationDialog, so that it can be used whether or not GtkAuthenticationDialog is used or not. We try to properly handle redirects in the manner that the CFNet backend does. No new tests. There are tests for this behavior, but they cannot be activated until we finish plumbing this through to the API layer. Once that patch lands, the tests will be turned on. * platform/gtk/GtkAuthenticationDialog.cpp: No longer store credentials into the persistent storage manually, instead rely on ResourceHandleSoup. Also, we no longer get proposed credentials from the persistent storage here as well. They are pre-loaded by the ResourceHanndle. * platform/gtk/GtkAuthenticationDialog.h: Remove callbacks and members associated with saving credentials to the persistent credential store. * platform/network/ResourceHandle.h: (ResourceHandle): Add a method which is used to continue asynchronously after looking for proposed credentials in the persistent credential store. * platform/network/ResourceHandleInternal.h: Add a member which tracks persistent credentials to be added once we know an authentication succeeded. * platform/network/gtk/CredentialBackingStore.cpp: (CredentialForChallengeAsyncReadyCallbackData): Added this data structure used for asynchronous access of stored credentials. (WebCore::credentialForChallengeAsyncReadyCallback): Ditto for this callback. (WebCore::CredentialBackingStore::credentialForChallenge): Make this method asynchronous. * platform/network/gtk/CredentialBackingStore.h: (CredentialBackingStore): Update method signatures for for making credentialForChallenge asynchronous. * platform/network/soup/AuthenticationChallenge.h: (WebCore::AuthenticationChallenge::setProposedCredential): Added a setter so that ResourceHandleSoup can set proposed credentials from the persistent credential store. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::gotHeadersCallback): For GTK+ save any pending credential in the persistent credential storage if the authentication succeeded. (WebCore::applyAuthenticationToRequest): Added this method which generically embeds stored credentials in the request URI. This is the method that Soup uses to override any soup-stored session credential. (WebCore::restartedCallback): Strip credentials for requests that span a security origin. Handle authenticating requests from the session store. (WebCore::createSoupRequestAndMessageForHandle): Make the local request reference mutable. (WebCore::ResourceHandle::start): Remove some code which is now part of applyAuthenticationToRequest. Call applyAuthenticationToRequest and clear the user and password members like the CFNet backend does. (WebCore::getCredentialFromPersistentStoreCallback): Added this callback for getting persistently stored credentials. (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): Split out didReceiveAuthenticationChallenge into this asynchronous bit. (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): For GTK+ continue handling this situation after first looking in the persistent credential store. (WebCore::ResourceHandle::receivedCredential): Store session credentials in the session storage, which is at the moment a redundant version of the Soup session storage and also prepare any persistent credentials for storage later (see gotHeadersCallback). 2012-11-16 Erik Arvidsson Update DOMException name: TypeMismatchError https://bugs.webkit.org/show_bug.cgi?id=102418 Reviewed by Kentaro Hara. Patch 17 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: (WebCore): * dom/ExceptionCode.h: 2012-11-16 Balazs Kelemen Coordinated Graphics: support the "freeze animations" API https://bugs.webkit.org/show_bug.cgi?id=100703 Reviewed by Noam Rosenthal. Typo fix after previous patch. No new tests, it's just a typo that only takes effect in the browser. * platform/graphics/GraphicsLayerAnimation.cpp: (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation): Initialize members. 2012-11-16 Dan Carney add 7 bit strings capabilities to the v8 binding layer https://bugs.webkit.org/show_bug.cgi?id=91850 Reviewed by Adam Barth. This change enables the v8 binding layer to make use of webkit's 8 bit string capabilities. Using 8 bit strings leads to certain benchmark performance improvemnts as can be seen in https://bug-91850-attachments.webkit.org/attachment.cgi?id=163334. No new tests. Test coverage already extensive. * bindings/v8/V8PerIsolateData.cpp: (WebCore::V8PerIsolateData::visitExternalStrings): * bindings/v8/V8StringResource.cpp: (StringTraits): (WebCore::false): (WebCore): (WebCore::true): (WebCore::v8StringToWebCoreString): * bindings/v8/V8ValueCache.cpp: (WebCore::makeExternalString): (WebCore::WebCoreStringResourceBase::toWebCoreStringResourceBase): (WebCore): (WebCore::WebCoreStringResourceBase::visitStrings): * bindings/v8/V8ValueCache.h: (WebCoreStringResourceBase): (WebCore::WebCoreStringResourceBase::WebCoreStringResourceBase): (WebCore::WebCoreStringResourceBase::~WebCoreStringResourceBase): (WebCore::WebCoreStringResourceBase::atomicString): (WebCore::WebCoreStringResourceBase::memoryConsumption): (WebCoreStringResource16): (WebCore::WebCoreStringResource16::WebCoreStringResource16): (WebCore): (WebCoreStringResource8): (WebCore::WebCoreStringResource8::WebCoreStringResource8): 2012-11-16 Erik Arvidsson Update DOMException name: InvalidAccessError https://bugs.webkit.org/show_bug.cgi?id=102400 Reviewed by Kentaro Hara. Patch 15 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-16 Alexandru Chiculita [Texmap][CSS Shaders] Make the CustomFilterValidatedProgram maintain the platform compiled program https://bugs.webkit.org/show_bug.cgi?id=102414 Reviewed by Noam Rosenthal. Added WebCore classes needed for the WebKit2 implementation of Texture Mapper to keep a reference to the platform compiled custom filter. It is just used to maintain the life-time of the objects. WebKit2 injects a client in TextureMapperPlatformCompiledProgram and receives a callback when the custom filter program is not used to render any layer on the page. Note that CustomFilterValidatedProgram are reused across multiple elements of the same page. Also, the instances are reused across frames, so animations should reuse the same pre-validated program. In this case, the mechanism is extended and reused in the platform compositor. No new tests, existing tests for CSS Custom Filters already cover this path. * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * Target.pri: * WebCore.pri: * platform/graphics/filters/CustomFilterValidatedProgram.cpp: (WebCore): * platform/graphics/filters/CustomFilterValidatedProgram.h: (WebCore): (CustomFilterValidatedProgram): * platform/graphics/filters/texmap/CustomFilterValidatedProgramTextureMapper.cpp: Added. (WebCore): (WebCore::CustomFilterValidatedProgram::platformCompiledProgram): Platform implementation for creating and deleting the reference. (WebCore::CustomFilterValidatedProgram::platformInit): (WebCore::CustomFilterValidatedProgram::platformDestroy): * platform/graphics/filters/texmap/TextureMapperPlatformCompiledProgram.h: Added. (WebCore): (TextureMapperPlatformCompiledProgramClient): (WebCore::TextureMapperPlatformCompiledProgramClient::ref): (WebCore::TextureMapperPlatformCompiledProgramClient::deref): (TextureMapperPlatformCompiledProgram): Stores a link to a TextureMapperPlatformCompiledProgramClient. It's main purpose is to call unref on the client when the shader is not needed anymore. WebKit2 can use that to delete the corresponding shader from the compositor side. (WebCore::TextureMapperPlatformCompiledProgram::create): (WebCore::TextureMapperPlatformCompiledProgram::setClient): Used by WebKit2 to inject the platform client. (WebCore::TextureMapperPlatformCompiledProgram::client): (WebCore::TextureMapperPlatformCompiledProgram::TextureMapperPlatformCompiledProgram): 2012-11-16 Andreas Kling Short-circuit Element::hasEquivalentAttributes() if elements share attribute data. Reviewed by Antti Koivisto. Add a fast path to hasEquivalentAttributes() that checks if both elements are using the same ElementAttributeData. * dom/Element.cpp: (WebCore::Element::hasEquivalentAttributes): 2012-11-16 Zeno Albisser [Qt] Adding a null pointer check for currentContext to GraphicsContext3DQt. https://bugs.webkit.org/show_bug.cgi?id=102360 QOpenGLContext::currentContext() will return null, in case there is no current context. Therefore currentContext must be null-checked before it can be reused. Making a context current on a null-surface on the other hand is perfectly possible. Reviewed by Kenneth Rohde Christiansen. * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext): 2012-11-16 Eugene Klyuchnikov Web Inspector: Workaround to show shortcuts for panels that hasn't been loaded. https://bugs.webkit.org/show_bug.cgi?id=102488 Reviewed by Vsevolod Vlasov. Panels are lazily loaded / instantiated. Panel constructors register keyboard shortcuts. When user open shortcuts screen all panel should be loaded. Otherwise some shortcuts will be missing. * inspector/front-end/ShortcutsScreen.js: Added callback invokation. * inspector/front-end/inspector.js: Provided callback that loads all panels. 2012-11-16 Kentaro Hara [V8] Remove IsSubType() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=102348 Reviewed by Adam Barth. CodeGenerator.pm has IsStrictSubType(). CodeGeneratorV8.pm should use it. No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (IsSubType): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GetInternalFields): (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateFunctionCallback): (GenerateImplementationIndexer): (GenerateToV8Converters): 2012-11-16 Mario Sanchez Prada [EFL] Share WebKit-Gtk's Accessibility implementation with others WebKit ports. https://bugs.webkit.org/show_bug.cgi?id=99578 Reviewed by Martin Robinson. Renamed WebCore/accessibility/gtk to WebCore/accessibility/atk. * GNUmakefile.am: * GNUmakefile.list.am: * accessibility/atk/AXObjectCacheAtk.cpp: Renamed from Source/WebCore/accessibility/gtk/AXObjectCacheAtk.cpp. * accessibility/atk/AccessibilityObjectAtk.cpp: Renamed from Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp. * accessibility/atk/WebKitAccessibleHyperlink.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleHyperlink.cpp. * accessibility/atk/WebKitAccessibleHyperlink.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleHyperlink.h. * accessibility/atk/WebKitAccessibleInterfaceAction.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceAction.cpp. * accessibility/atk/WebKitAccessibleInterfaceAction.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceAction.h. * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceComponent.cpp. * accessibility/atk/WebKitAccessibleInterfaceComponent.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceComponent.h. * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceDocument.cpp. * accessibility/atk/WebKitAccessibleInterfaceDocument.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceDocument.h. * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceEditableText.cpp. * accessibility/atk/WebKitAccessibleInterfaceEditableText.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceEditableText.h. * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHyperlinkImpl.cpp. * accessibility/atk/WebKitAccessibleInterfaceHyperlinkImpl.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHyperlinkImpl.h. * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHypertext.cpp. * accessibility/atk/WebKitAccessibleInterfaceHypertext.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceHypertext.h. * accessibility/atk/WebKitAccessibleInterfaceImage.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceImage.cpp. * accessibility/atk/WebKitAccessibleInterfaceImage.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceImage.h. * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceSelection.cpp. * accessibility/atk/WebKitAccessibleInterfaceSelection.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceSelection.h. * accessibility/atk/WebKitAccessibleInterfaceTable.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceTable.cpp. * accessibility/atk/WebKitAccessibleInterfaceTable.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceTable.h. * accessibility/atk/WebKitAccessibleInterfaceText.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.cpp. * accessibility/atk/WebKitAccessibleInterfaceText.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceText.h. * accessibility/atk/WebKitAccessibleInterfaceValue.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceValue.cpp. * accessibility/atk/WebKitAccessibleInterfaceValue.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleInterfaceValue.h. * accessibility/atk/WebKitAccessibleUtil.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.cpp. * accessibility/atk/WebKitAccessibleUtil.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.h. * accessibility/atk/WebKitAccessibleWrapperAtk.cpp: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp. * accessibility/atk/WebKitAccessibleWrapperAtk.h: Renamed from Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.h. 2012-11-16 Shinya Kawanaka Changing pseudoClass (:indeterminate) should cause distribution https://bugs.webkit.org/show_bug.cgi?id=101903 Reviewed by Dimitri Glazkov. and have 'indeterminate' state. When their state is changed, we have to invalidate distribution if necessary. To check it, we collect a feature that :invalidate is used in select attributes. For , we also have to see 'type' is changed. According to the spec, :indeterminate should match only progress element or . So changing 'type' might also change :indeterminate state. Tests: fast/dom/shadow/pseudoclass-update-indeterminate-input.html fast/dom/shadow/pseudoclass-update-indeterminate-progress.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): (WebCore::HTMLInputElement::setIndeterminate): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::didElementStateChange): 2012-11-16 Alexis Menard Factorize the creation of primitive values with a pair into a function. https://bugs.webkit.org/show_bug.cgi?id=102485 Reviewed by Antti Koivisto. The pattern is already existing in various call sites inside CSSParser and more will be added in the future (see bug 102104). No new tests : It's a refactoring only, the tests should cover it. * css/CSSParser.cpp: (WebCore): (WebCore::createPrimitiveValuePair): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFillSize): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderRadius): (WebCore::CSSParser::parseCounter): 2012-11-16 Mark Pilgrim Expand PlatformCookieJar interface to allow for other ports https://bugs.webkit.org/show_bug.cgi?id=102456 Reviewed by Adam Barth. Add firstParty and cookieURL arguments to several functions to prepare for integrating Chromium port into new PlatformCookieJar interface. * loader/CookieJar.cpp: (WebCore::cookiesEnabled): (WebCore::cookieRequestHeaderFieldValue): (WebCore::getRawCookies): * platform/network/PlatformCookieJar.h: (WebCore): * platform/network/cf/CookieJarCFNet.cpp: (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): * platform/network/curl/CookieJarCurl.cpp: (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): * platform/network/mac/CookieJarMac.mm: (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): * platform/network/qt/CookieJarQt.cpp: (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): * platform/network/soup/CookieJarSoup.cpp: (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): * platform/network/win/CookieJarWin.cpp: (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): 2012-11-16 Julien Chaffraix RenderGrid should have a function to resolve grid position https://bugs.webkit.org/show_bug.cgi?id=102441 Reviewed by Ojan Vafai. The code was doing this conversion implicitly inside RenderGrid::findChildLogicalPosition. Also note that we also provided a fallback by returning LayoutPoint() (ie the (0, 0) position on the grid) if we couldn't handle the value. The explicit conversion is needed in order to support render areas and add a proper grid model to RenderGrid. No expected change in behavior. * rendering/RenderGrid.h: * rendering/RenderGrid.cpp: (WebCore::RenderGrid::resolveGridPosition): Added this new function to handle the conversion. We re-use Length but should never see a lot of the values so I added some ASSERTs to enforce and catch that. (WebCore::RenderGrid::findChildLogicalPosition): Simplified the function now that it just use resolveGridPosition. 2012-11-16 Ulan Degenbaev [V8] Increment the amount of externally allocated memory for the receiving V8 isolate when transferring ArrayBuffer https://bugs.webkit.org/show_bug.cgi?id=94463 Reviewed by Kentaro Hara. Call AdjustAmountOfExternalAllocatedMemory when V8ArrayBuffer is deserialized and transferred. Test: ManualTests/typed-array-memory.html * bindings/v8/SerializedScriptValue.cpp: 2012-11-16 Sheriff Bot Unreviewed, rolling out r134694. http://trac.webkit.org/changeset/134694 https://bugs.webkit.org/show_bug.cgi?id=102481 it made API test crash on EFL port (Requested by gyuyoung on #webkit). * platform/efl/RenderThemeEfl.cpp: (WebCore::fillColorsFromEdjeClass): (WebCore::RenderThemeEfl::setColorFromThemeClass): (WebCore::RenderThemeEfl::loadTheme): (WebCore::RenderThemeEfl::RenderThemeEfl): * platform/efl/RenderThemeEfl.h: (RenderThemeEfl): 2012-11-16 Mike West Web Inspector: Move call stack generation out of bindings. https://bugs.webkit.org/show_bug.cgi?id=101331 Reviewed by Yury Semikhatsky. Currently, we generate stack traces for console messages at each call site. Bug 100650 has the end goal of moving all stack trace generation inside of the Inspector in order to ensure that we never send a console message without a stack trace if it's possible to generate one. This also ensures that we never generate unused call stacks. This patch is the first step in that direction, moving stack trace generation out of the Console bindings, and into either Console or InspectorConsoleAgent. No visible change in behavior should result; this refactoring should continue to pass all existing inspector tests. * bindings/js/JSConsoleCustom.cpp: (WebCore::JSConsole::profile): (WebCore::JSConsole::profileEnd): Adjust custom JSC Console bindings to drop call stack generation. * bindings/scripts/CodeGeneratorJS.pm: (GenerateCallWith): * bindings/scripts/CodeGeneratorV8.pm: (GenerateCallWith): Drop call stack generation from JSC and V8 bindings. * bindings/scripts/CodeGeneratorGObject.pm: Skip timeEnd explicitly in these bindings; it used to include ScriptArguments, which autoskipped it. Now it doesn't, so it needs to be called out on its own. * bindings/v8/ScriptCallStackFactory.cpp: (WebCore::createScriptCallStackForConsole): (WebCore::createScriptCallStack): (WebCore): * bindings/v8/ScriptCallStackFactory.h: (WebCore): Add 'createScriptCallStack(ScriptState*, size_t)' to V8's ScriptCallStackFactory in order to match JCS' implementation. It simply delegates to 'createScriptCallStackForConsole', which now also accepts a 'maxStackSize' parameter. * bindings/v8/custom/V8ConsoleCustom.cpp: (WebCore::V8Console::traceCallback): (WebCore::V8Console::assertCallback): (WebCore::V8Console::profileCallback): (WebCore::V8Console::profileEndCallback): Adjust custom V8 bindings to drop call stack generation. * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::addMessageToConsole): With the eventual goal of getting rid of the call stack parameter entirely, this patch drops it from one version of 'addMessageToConsole' (replacing it with ScriptState*), and creates a new version that only accepts a call stack. We should be able to migrate most (all?) external call sites over to the arguments version in future patches. (WebCore): (WebCore::InspectorConsoleAgent::count): Count takes 'ScriptState*' instead of a call stack, and generates the stack as needed. * inspector/InspectorConsoleAgent.h: (InspectorConsoleAgent): * inspector/InspectorConsoleInstrumentation.h: (WebCore::InspectorInstrumentation::addMessageToConsole): (WebCore): (WebCore::InspectorInstrumentation::consoleCount): * inspector/InspectorInstrumentation.cpp: (WebCore): (WebCore::InspectorInstrumentation::addMessageToConsoleImpl): (WebCore::InspectorInstrumentation::consoleCountImpl): * inspector/InspectorInstrumentation.h: (InspectorInstrumentation): Changes the InspectorInstrumentation pipeline to match the InspectorConsoleAgent changes. * page/Console.cpp: (WebCore::Console::addMessage): We now (always) generate one frame of a stack trace in order to populate line numbers and caller URLs. If we need to print the whole trace here, we generate a full stack. (WebCore::Console::debug): (WebCore::Console::error): (WebCore::Console::info): (WebCore::Console::log): (WebCore::Console::warn): (WebCore::Console::dir): (WebCore::Console::dirxml): (WebCore::Console::clear): (WebCore::Console::trace): (WebCore::Console::assertCondition): (WebCore::Console::count): (WebCore::Console::markTimeline): (WebCore::Console::timeEnd): (WebCore::Console::timeStamp): (WebCore::Console::group): (WebCore::Console::groupCollapsed): (WebCore::Console::profile): (WebCore::Console::profileEnd): s/ScriptCallStack/ScriptState*/g. Also, printing the stack trace has been moved out of 'trace' and into 'addMessage'. * page/Console.h: (Console): * page/Console.idl: Drop the call stack, add the script state. * workers/WorkerContext.cpp: (WebCore::WorkerContext::addMessageToWorkerConsole): Use the new, explicitly call stacked addMessageToConsole. We'll kill this in a future patch. 2012-11-16 Marja Hölttä Add initiator to CachedResourceRequest. https://bugs.webkit.org/show_bug.cgi?id=101935 Reviewed by Adam Barth. Motivation: Chromium needs to know which elements request a resource (such as an image or a script) (bug 92761). In addition, for exposing resource timing information (bug 84883) we need to store the initiator, and this is the first step towards it. No new tests: No visible change in behavior. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSCursorImageValue.cpp: (WebCore::CSSCursorImageValue::cachedImage): * css/CSSFontFaceSrcValue.cpp: (WebCore::CSSFontFaceSrcValue::cachedFont): * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::cachedImageSet): * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage): * css/CSSImageValue.h: (WebCore): (CSSImageValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::loadPendingImage): * css/StyleRuleImport.cpp: (WebCore::StyleRuleImport::requestStyleSheet): * css/WebKitCSSSVGDocumentValue.cpp: (WebCore::WebKitCSSSVGDocumentValue::load): * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::cachedShader): * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/CSSPreloadScanner.h: (CSSPreloadScanner): * html/parser/HTMLPreloadScanner.cpp: (WebCore::PreloadTask::preload): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestImage): (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::determineRevalidationPolicy): (WebCore): (WebCore::CachedResourceLoader::preload): * loader/cache/CachedResourceLoader.h: (WebCore): (CachedResourceLoader): * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::CachedResourceRequest): (WebCore): (WebCore::CachedResourceRequest::~CachedResourceRequest): (WebCore::CachedResourceRequest::setInitiator): (WebCore::CachedResourceRequest::initiatorName): (WebCore::CachedResourceRequest::initiatorDocument): (WebCore::CachedResourceRequest::initiatorElement): * loader/cache/CachedResourceRequest.h: (WebCore): (WebCore::CachedResourceRequest::setOptions): (WebCore::CachedResourceRequest::defer): (WebCore::CachedResourceRequest::setDefer): (CachedResourceRequest): * loader/cache/CachedResourceRequestInitiators.cpp: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp. (WebCore): (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators): * loader/cache/CachedResourceRequestInitiators.h: Copied from Source/WebCore/loader/cache/CachedResourceRequest.cpp. (WebCore): (CachedResourceRequestInitiators): (WebCore::cachedResourceRequestInitiators): * loader/icon/IconLoader.cpp: (WebCore::IconLoader::startLoading): * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData): * platform/ThreadGlobalData.h: (WebCore): (WebCore::ThreadGlobalData::cachedResourceRequestInitiators): (ThreadGlobalData): * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::requestImageResource): * svg/SVGFontFaceUriElement.cpp: (WebCore::SVGFontFaceUriElement::loadFont): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): 2012-11-16 Yury Semikhatsky Web Inspector: don't show an Error when evaluating a watch expression results in an exception https://bugs.webkit.org/show_bug.cgi?id=102470 Reviewed by Vsevolod Vlasov. Dim watch expression and show "" as its value in cases when it evaluates into an exception. * English.lproj/localizedStrings.js: * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionTreeElement.prototype.update): * inspector/front-end/inspector.css: 2012-11-16 Vsevolod Vlasov Web Inspector: Rollout 134404 134548 134552 Temporarily rolling out to ease merging. https://bugs.webkit.org/show_bug.cgi?id=102476 Unreviewed rolling out. * English.lproj/localizedStrings.js: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/AdvancedSearchController.js: * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.registerShortcuts): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._registerShortcuts): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._registerShortcuts): * inspector/front-end/ElementsPanelDescriptor.js: * inspector/front-end/GoToLineDialog.js: (WebInspector.GoToLineDialog.install): * inspector/front-end/KeyboardShortcut.js: (WebInspector.KeyboardShortcut._keyName): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.registerShortcut): (WebInspector.Panel.prototype.unregisterShortcut): (WebInspector.PanelDescriptor.prototype.panel): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): (WebInspector.ScriptsPanel.prototype._createDebugToolbar): (WebInspector.ScriptsPanel.prototype._createButtonAndRegisterShortcuts): * inspector/front-end/ScriptsPanelDescriptor.js: * inspector/front-end/ShortcutsScreen.js: (WebInspector.ShortcutsScreen): (WebInspector.ShortcutsSection): (WebInspector.ShortcutsSection.prototype._renderKey): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype.registerShortcuts): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._registerShortcuts): * inspector/front-end/TimelinePanelDescriptor.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._panelDescriptors): (WebInspector._registerShortcuts): 2012-11-16 Eugene Klyuchnikov Web Inspector: Memory Timeline Crash https://bugs.webkit.org/show_bug.cgi?id=102390 Reviewed by Vsevolod Vlasov. Crash seems to be caused by IPC overflow. Messages "ParsedScriptSource" are routed to ResourceScriptMapping.prototype.addScript that process them in time linear to number of already registered non-anonymous non-inline scripts. Fixed this with replacing repreated filtering with "on-line" bucketing. * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping): Removed duplicating initialization code. (WebInspector.ResourceScriptMapping.prototype.addScript): Added script bucketing by sourceURL/isInline parameters. (WebInspector.ResourceScriptMapping.prototype._scriptsForSourceURL): Avoid filterfig. (WebInspector.ResourceScriptMapping.prototype._createUISourceCode): Added outgoing muatable array safeguard. (WebInspector.ResourceScriptMapping.prototype._reset): Added type information and added two new maps. 2012-11-16 Helder Correia [CoordGfx] Follow coding style on explicit constructors https://bugs.webkit.org/show_bug.cgi?id=102451 Reviewed by Noam Rosenthal. Use the explicit keyword on single argument constructors. No new tests needed. * platform/graphics/texmap/GraphicsLayerTextureMapper.h: (GraphicsLayerTextureMapper): * platform/graphics/texmap/TextureMapper.h: (TextureMapper): * platform/graphics/texmap/TextureMapperBackingStore.h: (WebCore::TextureMapperTile::TextureMapperTile): * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGLData::SharedGLData::SharedGLData): (WebCore::TextureMapperGLData::TextureMapperGLData): * platform/graphics/texmap/TextureMapperGL.h: (BitmapTextureGL): * platform/graphics/texmap/TextureMapperShaderManager.h: (TextureMapperShaderManager): 2012-11-16 Kihong Kwon Add DeviceController base-class to remove duplication of DeviceXXXControler https://bugs.webkit.org/show_bug.cgi?id=96894 Reviewed by Hajime Morita. Add DeviceController which is extracted from DeviceOrientationController to remove duplication. And soon-to-be-added DeviceMotionController and ProximityController. Covered by existing tests. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DeviceOrientationClient.h: * dom/DeviceOrientationController.cpp: Remove member functions to move to DeviceController. - addListener(), removeListener(), removeAllListeners(), isActive() (WebCore::DeviceOrientationController::DeviceOrientationController): (WebCore::DeviceOrientationController::didChangeDeviceOrientation): (WebCore::DeviceOrientationController::client): (WebCore::DeviceOrientationController::hasLastData): (WebCore::DeviceOrientationController::getLastEvent): (WebCore::DeviceOrientationController::from): (WebCore): * dom/DeviceOrientationController.h: (WebCore): (WebCore::DeviceOrientationController::~DeviceOrientationController): (DeviceOrientationController): * dom/Document.cpp: Remove suspendEventsForAllListeners() and resumeEventsForAllListeners() function calls. These calls can be made by checking activeDOMObjectsAreSuspended() and activeDOMObjectsAreStopped() before dispatchEvent. (WebCore::Document::suspendActiveDOMObjects): (WebCore::Document::resumeActiveDOMObjects): * loader/EmptyClients.h: (EmptyDeviceClient): (WebCore::EmptyDeviceClient::startUpdating): (WebCore::EmptyDeviceClient::stopUpdating): (WebCore): * page/DOMWindow.cpp: (WebCore::DOMWindow::addEventListener): (WebCore::DOMWindow::removeEventListener): (WebCore::DOMWindow::removeAllEventListeners): * page/DeviceClient.h: Added. (WebCore): (DeviceClient): (WebCore::DeviceClient::~DeviceClient): * page/DeviceController.cpp: Added. DeviceController has extracted functions from DeviceOrientationController and DeviceMotionController. - addDeviceEventListener(), removeDeviceEventlistener(), removeAllDeviceEventListeners(), dispatchDeviceEvent() All kind of device event controller which has DeviceClient can be inherited from DeviceController. (WebCore): (WebCore::DeviceController::DeviceController): (WebCore::DeviceController::addDeviceEventListener): (WebCore::DeviceController::removeDeviceEventListener): (WebCore::DeviceController::removeAllDeviceEventListeners): (WebCore::DeviceController::dispatchDeviceEvent): (WebCore::DeviceController::fireDeviceEvent): * page/DeviceController.h: Added. (WebCore): (DeviceController): (WebCore::DeviceController::~DeviceController): (WebCore::DeviceController::isActive): (WebCore::DeviceController::client): (WebCore::DeviceController::hasLastData): (WebCore::DeviceController::getLastEvent): 2012-11-16 Alexander Pavlov Web Inspector: [Overrides] Device metrics get reset on navigation, yet remain in the Overrides view https://bugs.webkit.org/show_bug.cgi?id=102467 Reviewed by Pavel Feldman. Restore the device metrics overrides from the inspector cookie in InspectorPageAgent::restore(). Drive-by: move the script execution and FPS counter display state restoration from enable() into restore(), so that they will get restored only upon page navigation, not upon any agent enablement. * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::restore): Restore device metrics overrides, script execution and FPS counter display state. (WebCore::InspectorPageAgent::enable): Don't restore script execution and FPS counter display state on any enablement. 2012-11-16 Sheriff Bot Unreviewed, rolling out r134908. http://trac.webkit.org/changeset/134908 https://bugs.webkit.org/show_bug.cgi?id=102473 Broke the Apple Windows Debug build. (Requested by dydx on #webkit). * WebCore.exp.in: * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): * dom/ViewportArguments.h: (WebCore): 2012-11-16 Peter Rybin Web Inspector: show internal properties in inspector frontend https://bugs.webkit.org/show_bug.cgi?id=100021 Reviewed by Yury Semikhatsky. New field 'internalProperties' is parsed and passed via all callbacks to Object Properties section. Test: inspector/debugger/properties-special.html * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertiesSection.prototype.update.callback): (WebInspector.ObjectPropertiesSection.prototype.update): (.callback): (WebInspector.ObjectPropertyTreeElement.populate): (.processProperties): (WebInspector.ArrayGroupingTreeElement._populateAsFragment): (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.set else): 2012-11-06 Alexander Pavlov Web Inspector: metrics, geolocation, orientation overrides do not belong to the settings panel https://bugs.webkit.org/show_bug.cgi?id=93691 Reviewed by Vsevolod Vlasov. - The Overrides tab contents have been moved from the Settings dialog into a brand new Overrides drawer view, both receiving a new, more light-weight design. - The Cog button now brings up a popup menu with the "Overrides" and "Settings" items. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/ContextMenu.js: (WebInspector.ContextMenu.prototype.showSoftMenu): Display the ContextMenu as a soft menu. * inspector/front-end/OverridesView.js: Copied from Source/WebCore/inspector/front-end/SettingsScreen.js. (WebInspector.OverridesView.appendBlockTo): (WebInspector.OverridesView): (WebInspector.OverridesView.showInDrawer): (WebInspector.OverridesView.prototype.get listener): (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.get const): (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.textDoubleClicked): (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.textChanged): (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement.set checkboxClicked): (WebInspector.OverridesView.prototype._createUserAgentSelectRowElement): (WebInspector.OverridesView.prototype._createInput): (WebInspector.OverridesView.prototype._onMetricsCheckboxClicked): (WebInspector.OverridesView.prototype._applyDeviceMetricsUserInput): (WebInspector.OverridesView.prototype.): (WebInspector.OverridesView.prototype.set if): (WebInspector.OverridesView.prototype._createDeviceMetricsElement.swapDimensionsClicked): (WebInspector.OverridesView.prototype._createDeviceMetricsElement): (WebInspector.OverridesView.prototype._onGeolocationOverrideCheckboxClicked): (WebInspector.OverridesView.prototype._applyGeolocationUserInput): (WebInspector.OverridesView.prototype._setGeolocationPosition): (WebInspector.OverridesView.prototype._createGeolocationOverrideElement): (WebInspector.OverridesView.prototype._onDeviceOrientationOverrideCheckboxClicked): (WebInspector.OverridesView.prototype._applyDeviceOrientationUserInput): (WebInspector.OverridesView.prototype._setDeviceOrientation): (WebInspector.OverridesView.prototype._createDeviceOrientationOverrideElement): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel): Fix the "DOM Breakpoints" pane move upon the panel creation. * inspector/front-end/SettingsScreen.js: (WebInspector.SettingsTab): (WebInspector.SettingsTab.prototype._appendSection): (WebInspector.GenericSettingsTab): (WebInspector.ExperimentsSettingsTab): (WebInspector.SettingsController): Implement the popup menu upon the button click. (WebInspector.SettingsController.prototype.showOverrides): (WebInspector.SettingsController.prototype.showSettings): (WebInspector.SettingsController.prototype.appendApplicableItems): (WebInspector.SettingsController.prototype._buttonPressed): (WebInspector.SettingsController.prototype._onHideSettingsScreen): (WebInspector.SettingsController.prototype.showSettingsScreen): * inspector/front-end/ShortcutsScreen.js: Add "Shortcuts" header. (WebInspector.ShortcutsScreen.prototype.createShortcutsTabView): * inspector/front-end/SoftContextMenu.js: Enable in all cases, implement the alignToCurrentTarget mode in show(). (WebInspector.SoftContextMenu.prototype.show): * inspector/front-end/TabbedPane.js: Implement vertical tab layout (skipping the tab width computations). (WebInspector.TabbedPane.prototype.set verticalTabLayout): (WebInspector.TabbedPane.prototype._updateWidths): (WebInspector.TabbedPaneTab.prototype.setWidth): (WebInspector.TabbedPaneTab.prototype._createTabElement): * inspector/front-end/WebKit.qrc: * inspector/front-end/helpScreen.css: Update styles for the new Settings and Overrides look-and-feel. * inspector/front-end/inspector.css: Drive-by fix small artifacts in the soft menu and drawer view statusbar item label. (.soft-context-menu-item): (.drawer-header): * inspector/front-end/inspector.html: 2012-11-16 Sheriff Bot Unreviewed, rolling out r134865. http://trac.webkit.org/changeset/134865 https://bugs.webkit.org/show_bug.cgi?id=102466 Broke the Apple Windows Debug build. (Requested by dydx on #webkit). * WebCore.exp.in: * bindings/js/SerializedScriptValue.h: * testing/Internals.cpp: * testing/Internals.h: (WebCore): * testing/Internals.idl: 2012-11-16 Takashi Sakamoto ASSERT_NOT_REACHED() when building a CSSOM wrapper for StyleRuleHost https://bugs.webkit.org/show_bug.cgi?id=102116 Reviewed by Alexander Pavlov. Provide a CSSUnknownRule instance as a CSSOM wrapper for StyleRuleHost rules. Since there is no CSSOM wrapper for @host @-rules and ASSERT_NOT_REACHED is used when a CSSOM wrapper is requested, this crash occurs. Tests: fast/css/at-host-cssom-crash.html inspector/styles/styles-include-host-rules-crash.html * css/StyleRule.cpp: (WebCore::StyleRuleBase::createCSSOMWrapper): Return a CSSUnknownRule instance for StyleRuleHost rules instead of calling ASSERT_NOT_REACHED(). 2012-11-16 Mikhail Pozdnyakov Avoid copying of ViewportArguments in computeViewportAttributes function https://bugs.webkit.org/show_bug.cgi?id=102354 Reviewed by Kenneth Rohde Christiansen. Since r134749 we do not need copying of ViewportArguments parameter in computeViewportAttributes() as it is not modified any more. Tested by existing tests fast/viewport. * WebCore.exp.in: Updated exported symbols for MAC. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): * dom/ViewportArguments.h: (WebCore): 2012-11-15 Yury Semikhatsky Memory instrumentation: add code for reporting stack traces of unknown instrumented objects https://bugs.webkit.org/show_bug.cgi?id=102384 Reviewed by Pavel Feldman. * inspector/InspectorMemoryAgent.cpp: (WebCore::MemoryInstrumentationClientImpl::checkCountedObject): return false if the check fails. * inspector/MemoryInstrumentationImpl.h: (MemoryInstrumentationClientImpl): 2012-11-15 Jer Noble Crash at WebCore::PluginData::pluginFileForMimeType const + 38 https://bugs.webkit.org/show_bug.cgi?id=102454 Reviewed by Dan Bernstein. NULL-check the return value of Page::pluginData(). * loader/SubframeLoader.cpp: (WebCore::logPluginRequest): 2012-11-15 Kenichi Ishibashi [Chromium] Unreviewed build fix attempt on win Include OpenTypeVerticalData.h * platform/graphics/chromium/FontPlatformDataChromiumWin.h: (WebCore): 2012-11-15 Kentaro Hara Unreviewed, rolling out r134881. http://trac.webkit.org/changeset/134881 https://bugs.webkit.org/show_bug.cgi?id=102348 http/tests/appcache tests on JSC platforms are broken * bindings/scripts/CodeGenerator.pm: (IsStrictSubtype): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GetInternalFields): (IsSubType): (IsNodeSubType): (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateFunctionCallback): (GenerateImplementationIndexer): (GenerateToV8Converters): 2012-11-15 Viatcheslav Ostapenko [TexMap][Cairo][Qt] Refactor BitmapTextureGL::updateContents(). https://bugs.webkit.org/show_bug.cgi?id=102420 Reviewed by Gyuyoung Kim. Moved out texture upload without swizzle to the separate method and changed drawRepaintCounter to use no-swizzle method. This also fixes blue background of repaint counters in Qt Minibrowser. Added condition for sub-image buffer creation to not create it if full image is uploaded. This should give noticeable improvement for platforms that do not support sub-image upload to texture. Covered by existing tests. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawRepaintCounter): (WebCore::BitmapTextureGL::updateContentsNoSwizzle): (WebCore): (WebCore::BitmapTextureGL::updateContents): * platform/graphics/texmap/TextureMapperGL.h: (BitmapTextureGL): 2012-11-15 Kent Tamura A Spin button should release mouse event capturing when a modal dialog opens https://bugs.webkit.org/show_bug.cgi?id=98007 Reviewed by Hajime Morita. Description of bug: If the mouse left button is pressed on a spin button in input[type=number] and a 'change' event handler opens a modal dialog such as alert(), a repeating timer doesn't stop and mouse event capturing isn't released even though the mouse pointer isn't on the spin button. A user will see repeating alert dialogs for a document like by clicking the up button. How to solve: We should notify modal dialog or popup open to a spin button. This patch introduce PopupOpeningObserver. Chrome notifies it when any dialogs / popups is opening. SpinButtonElement implements PopupOpeningObserver and registers/unregisters itself to/from Chrome. No new tests. This is a behavior change, but it's very hard to make an automated test for timer-related behavior. * page/PopupOpeningObserver.h: Added. * GNUmakefile.list.am: Add PopupOpeningObserver.h * Target.pri: Ditto. * WebCore.gypi: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * page/Chrome.cpp: (WebCore::Chrome::runJavaScriptAlert): Calls notifyPopupOpeningObservers. (WebCore::Chrome::runJavaScriptConfirm): Ditto. (WebCore::Chrome::runJavaScriptPrompt): Ditto. (WebCore::Chrome::createColorChooser): Ditto. (WebCore::Chrome::openDateTimeChooser): Added. Calls notifyPopupOpeningObservers before calling ChromeClient::openDateTimeChooser. (WebCore::Chrome::runOpenPanel): Calls notifyPopupOpeningObservers. (WebCore::Chrome::createPopupMenu): Ditto. (WebCore::Chrome::createSearchPopupMenu): Ditto. (WebCore::Chrome::registerPopupOpeningObserver): Added. (WebCore::Chrome::unregisterPopupOpeningObserver): Added. (WebCore::Chrome::notifyPopupOpeningObservers): Added. * page/Chrome.h: Added new members and required class/struct declarations. * html/BaseChooserOnlyDateAndTimeInputType.cpp: (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent): Use Chrome::openDateTimeChooser instead of ChromeClient::openDateTimeChooser. * html/shadow/PickerIndicatorElement.cpp: (WebCore::PickerIndicatorElement::openPopup): Ditto. * html/shadow/SpinButtonElement.h: (SpinButtonElement): Declare willOpenPopup. * html/shadow/SpinButtonElement.cpp: (WebCore::SpinButtonElement::defaultEventHandler): Change the order of timer start and changing the value so that we can cancel the timer correctly. Calls Chrome::registerPopupOpeningObserver on starting mouse capturing. (WebCore::SpinButtonElement::willOpenPopup): Release mouse event capturing before opening a modal dialog. (WebCore::SpinButtonElement::releaseCapture): Calls Chrome::unregisterPopupOpeningObserver. 2012-11-15 Shinya Kawanaka Chaging pseudoClass (:enabled) should cause distribution https://bugs.webkit.org/show_bug.cgi?id=101900 Reviewed by Dimitri Glazkov. When element's 'enabled' state is changed, we have to invalidate distribution. According to the spec, :enabled matches anchor/area/link element having href attribute, and several form control elements which is not disabled. However, currently :enalbed does not match anchor/area/link yet. See https://bugs.webkit.org/show_bug.cgi?id=102349 Tests: fast/dom/shadow/pseudoclass-update-enabled-anchor.html fast/dom/shadow/pseudoclass-update-enabled-area.html fast/dom/shadow/pseudoclass-update-enabled-button.html fast/dom/shadow/pseudoclass-update-enabled-fieldset.html fast/dom/shadow/pseudoclass-update-enabled-input.html fast/dom/shadow/pseudoclass-update-enabled-optgroup.html fast/dom/shadow/pseudoclass-update-enabled-option.html fast/dom/shadow/pseudoclass-update-enabled-select.html fast/dom/shadow/pseudoclass-update-enabled-textarea.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseAttribute): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::disabledAttributeChanged): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::parseAttribute): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): 2012-11-15 Erik Arvidsson Update DOMException name: ValidationError https://bugs.webkit.org/show_bug.cgi?id=102416 Reviewed by Kentaro Hara. Patch 16 of 25 to update DOMException name to match the spec and Firefox. VALIDATION_ERR is historical and not used in any spec or our code. * dom/DOMCoreException.cpp: * dom/ExceptionCode.h: 2012-11-15 Kentaro Hara [V8] Remove IsSubType() from CodeGeneratorV8.pm https://bugs.webkit.org/show_bug.cgi?id=102348 Reviewed by Adam Barth. CodeGenerator.pm has IsStrictSubType(). CodeGeneratorV8.pm should use it. No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (IsSubType): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): (GetInternalFields): (GenerateNormalAttrGetter): (GenerateNormalAttrSetter): (GenerateFunctionCallback): (GenerateImplementationIndexer): (GenerateToV8Converters): 2012-11-15 Erik Arvidsson Update DOMException name: NamespaceError https://bugs.webkit.org/show_bug.cgi?id=102395 Reviewed by Kentaro Hara. Patch 14 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-15 Tien-Ren Chen Add Settings to disable custom scrollbars on main frame https://bugs.webkit.org/show_bug.cgi?id=102323 Reviewed by Adam Barth. Custom scrollbars on main frame don't really work well on touch devices. Add a setting to inhibit their creation. No new tests. No change in default layout behavior. * page/FrameView.cpp: (WebCore::FrameView::createScrollbar): * page/Settings.in: 2012-11-15 Rick Byers custom CSS cursors ignore hotspot values embedded in CUR files https://bugs.webkit.org/show_bug.cgi?id=100059 Reviewed by Kenneth Russell. Add reading the hotspot values to the ICOImageDecoder (for CUR files only), and plumb it through so that the existing calls to ImageSource::getHotSpot actually return the hot spot value when there is one. Tests: fast/events/mouse-cursor.html, fast/events/mouse-cursor-multiframecur.html * platform/graphics/ImageSource.cpp: (WebCore::ImageSource::getHotSpot): * platform/graphics/chromium/DeferredImageDecoder.cpp: (WebCore::DeferredImageDecoder::hotSpot): (WebCore::DeferredImageDecoder::hotSpotAtIndex): * platform/graphics/chromium/DeferredImageDecoder.h: (DeferredImageDecoder): * platform/image-decoders/ImageDecoder.h: (WebCore::ImageDecoder::hotSpot): (WebCore::ImageDecoder::hotSpotAtIndex): (ImageDecoder): * platform/image-decoders/ico/ICOImageDecoder.cpp: (WebCore::ICOImageDecoder::hotSpot): (WebCore::ICOImageDecoder::hotSpotAtIndex): (WebCore::ICOImageDecoder::processDirectory): (WebCore::ICOImageDecoder::readDirectoryEntry): * platform/image-decoders/ico/ICOImageDecoder.h: (ICOImageDecoder): (IconDirectoryEntry): 2012-11-15 Kenichi Ishibashi Make OpenTypeVerticalData be ref-counted https://bugs.webkit.org/show_bug.cgi?id=101971 Reviewed by Tony Chang. FontCache::purgeInactiveFontData() uses mark & sweep algorithm to remove unused OpenTypeVerticalData objects. It marks only OpenTypeVerticalData which can be reached via SimpleFontData in gFontDataCache. However, OpenTypeVerticalData can be referred by SimpleFontData which resides in CSSFontFaceSource::m_fontDataTable so the algorithm can delete active OpenTypeVerticalData. To avoid deleting active OpenTypeVerticalData, make it be ref-counted. No new tests. No changes in behavior. Checked manually that the use-after-free was fixed. * platform/graphics/FontCache.cpp: (WebCore): Use RefPtr instead of OwnPtr for FontVerticalDataCache. (WebCore::FontCache::getVerticalData): Return PassRefPtr. (WebCore::FontCache::purgeInactiveFontData): Follow the change of OwnPtr -> RefPtr. * platform/graphics/FontCache.h: * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/SimpleFontData.h: Use RefPtr instead of raw const pointer for OpenTypeVerticalData. (WebCore::SimpleFontData::verticalData): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::FontPlatformData::verticalData): Return PassRefPtr. * platform/graphics/chromium/FontPlatformDataChromiumWin.h: (FontPlatformData): * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: (WebCore::FontPlatformData::verticalData): Ditto. * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: (WebCore): (FontPlatformData): * platform/graphics/opentype/OpenTypeVerticalData.h: (WebCore::OpenTypeVerticalData::create): Added. (OpenTypeVerticalData): 2012-11-15 Xingnan Wang Optimize the multiply-add in Biquad.cpp::process https://bugs.webkit.org/show_bug.cgi?id=75528 Reviewed by Brent Fulgham. Pipeline the multiply-add with SSE2 intrinsics. Get ~45% performance improvement for the function. * platform/audio/Biquad.cpp: (WebCore::Biquad::process): 2012-11-15 Alec Flett Add tests for explicit serialization values https://bugs.webkit.org/show_bug.cgi?id=96818 Reviewed by Adam Barth. Expose direct access to the serialization/deserialization mechanisms of SerializedScriptValue to DumpRenderTree. * testing/Internals.cpp: (WebCore::Internals::serializeObject): (WebCore): (WebCore::Internals::deserializeBuffer): * testing/Internals.h: (WebCore): * testing/Internals.idl: 2012-11-15 Gustavo Noronha Silva [GTK] Split WebCore/platform into a separate library https://bugs.webkit.org/show_bug.cgi?id=94435 Reviewed by Martin Robinson. More people have been reporting problems when linking WebCore because the command line limit is being exceeded. Splitting WebCore a bit more is in order. * GNUmakefile.am: add new libWebCorePlatform convenience library. * GNUmakefile.list.am: move list of platform/* files to its own variable. 2012-11-15 Luke Macpherson Remove unused macro HANDLE_INHERIT_AND_INITIAL_WITH_VALUE in StyleResolver.cpp https://bugs.webkit.org/show_bug.cgi?id=102036 Reviewed by Darin Adler. Remove HANDLE_INHERIT_AND_INITIAL_WITH_VALUE macro, as it is not used anywhere. No tests added because code is unused, and compile is enough to verify that conculsively. * css/StyleResolver.cpp: 2012-11-15 Erik Arvidsson Update DOMException name: SyntaxError https://bugs.webkit.org/show_bug.cgi?id=102279 Reviewed by Kentaro Hara. Patch 12 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-15 Takashi Sakamoto [Win] key event's location does not work on Windows platform. https://bugs.webkit.org/show_bug.cgi?id=89742 Reviewed by Brent Fulgham. As WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, and WM_SYSKEYUP doesn't directly provide a virtual keycode which distinguish between left-hand and right-hand keys. To obtain a virtual keycode, we have to look at lparam, i.e. scancode and extended key bit. So if the given virtual keycode is control, shift, or menu, use MapVirtualKey with scancode and extended key bit and recreate a virtual keycode which distinguishes between left-hand and right-hand. No new tests, because left-hand keys, right-hand keys layout tests have been already added. * platform/win/KeyEventWin.cpp: (WebCore::windowsKeycodeWithLocation): Use wparam and lparam to recreate a virtual keycode which distinguishes between left-hand and right-hand if the given wparam (=virtual keycode) is control, shift, or menu. (WebCore): (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): Use the newly added function to obtain windows virtual keycode. 2012-11-15 Joe Mason [BlackBerry] Don't assert when notifyAuthReceived is called with a different auth type https://bugs.webkit.org/show_bug.cgi?id=102436 Reviewed by Rob Buis. The server type could change if we contact a site taking HTTP auth, through an HTTP proxy taking auth of its own. First we get a 407 from the proxy, and then when get past the proxy, we get a 401 from the end site - so notifyAuthReceived gets called again with auth type Proxy instead of HTTP. The correct thing to do when that happens is skip the "update the auth type in the credentials" step, since these are actually new credentials and not just credentials being reused for a different auth type on the same server. PR 241637 * platform/network/blackberry/NetworkJob.cpp: (WebCore::NetworkJob::notifyAuthReceived): 2012-11-15 Stephen Chenney mpath elements do not clear resource lists before destruction https://bugs.webkit.org/show_bug.cgi?id=101505 Reviewed by Abhishek Arya. The destructor for SVGMPathElement should clear its resources before deletion, so as not to leave hanging pointers in resource lists. Test: svg/animations/mpath-remove-from-dependents-on-delete-crash.html * svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::~SVGMPathElement): Add destructor that calls clearResourceReferences. (WebCore): * svg/SVGMPathElement.h: (SVGMPathElement): Add destructor. 2012-11-15 Kentaro Hara Remove CodeGenerator::StripModule https://bugs.webkit.org/show_bug.cgi?id=102338 Reviewed by Adam Barth. Now WebKit IDL files have no modules. (The Web IDL spec has no modules.) We can remove CodeGenerator::StripModule. This might break some internal builds if the internal builds are still using modules. Ping haraken@ you observe it. No tests. No change in behavior. * bindings/scripts/CodeGenerator.pm: (ForAllParents): (AttributeNameForGetterAndSetter): (IsStrictSubtype): * bindings/scripts/CodeGeneratorCPP.pm: (GetClassName): (GetImplClassName): (GetParentImplClassName): (GetParent): (ConversionNeeded): (GetCPPTypeGetter): (AddForwardDeclarationsForType): (AddIncludesForType): (GenerateImplementation): * bindings/scripts/CodeGeneratorGObject.pm: (GetParentClassName): (GetParentGObjType): (GetClassName): * bindings/scripts/CodeGeneratorJS.pm: (GetParentClassName): (AddIncludesForTypeInImpl): (AddIncludesForTypeInHeader): (GenerateParametersCheckExpression): (GenerateImplementation): (GenerateParametersCheck): (GetNativeTypeFromSignature): (JSValueToNative): (NativeToJSValue): * bindings/scripts/CodeGeneratorObjC.pm: (GetClassName): (GetImplClassName): (GetParentImplClassName): (GetParentAndProtocols): (GetPropertyAttributes): (ConversionNeeded): (GetObjCTypeGetter): (AddForwardDeclarationsForType): (AddIncludesForType): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (AddIncludesForType): (GenerateHeader): (IsSubType): (GenerateSingleBatchedAttribute): (GenerateImplementation): (BaseInterfaceName): (GetTypeFromSignature): (IsWrapperType): 2012-11-15 Luke Macpherson Make assumptions about m_parentStyle consistent within StyleResolver::applyProperty() https://bugs.webkit.org/show_bug.cgi?id=101696 Reviewed by Tony Chang. Most of the code in StyleResolver::applyProperty assumes that isInherit implies that m_parentStyle is available. This patch ASSERTs that this assumption is correct, and removes the few existing checks to maintain consistency. No new tests / covered by all existing CSS tests. * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): 2012-11-15 Kentaro Hara [V8] Remove redundant $interfaceName from function parameters https://bugs.webkit.org/show_bug.cgi?id=102334 Reviewed by Adam Barth. 'sub func { my $dataNode = shift; my $interfaceName = shift; }' is redundant. We can get $interfaceName by $dataNode->name. No tests. No change in behavior. * bindings/scripts/CodeGeneratorV8.pm: (GenerateOpaqueRootForGC): (GenerateHeader): (GenerateConstructorGetter): (GenerateNormalAttrGetter): (GenerateReplaceableAttrSetter): (GenerateNormalAttrSetter): (GenerateOverloadedFunctionCallback): (GenerateFunctionCallback): (GenerateOverloadedConstructorCallback): (GenerateSingleConstructorCallback): (GenerateConstructorCallback): (GenerateEventConstructorCallback): (GenerateTypedArrayConstructorCallback): (GenerateNamedConstructorCallback): (GenerateBatchedAttributeData): (GenerateImplementation): (GenerateToV8Converters): (GetNativeTypeForConversions): 2012-11-15 Simon Fraser Ensure that scrollbar layers show debug borders https://bugs.webkit.org/show_bug.cgi?id=102429 Reviewed by Anders Carlsson. After r133517, scrollbar layers no longer showed debug borders, which was very confusing. Fix this by explicitly calling setShowDebugBorder() on the scrollbar-related layers owned by RenderLayerCompositor and RenderLayerBacking. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateDebugIndicators): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): 2012-11-15 Andreas Kling ASSERTION FAILED: fastAttributeLookupAllowed(name) for 7 layout tests Reviewed by Anders Carlsson. Use Element::getAttributeItem() to find out if the element has a given attribute instead of fastHasAttribute() since that causes assertions for the "style" attribute. * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): 2012-11-15 Erik Arvidsson Update DOMException name: DOMStringSizeError https://bugs.webkit.org/show_bug.cgi?id=102089 Reviewed by Ojan Vafai. Patch 2 of 25 to update DOMException name to match the spec and Firefox. DOMSTRING_SIZE_ERR is historical and not used in any spec or in our code. * dom/DOMCoreException.cpp: * dom/ExceptionCode.h: 2012-11-15 Joshua Bell IndexedDB: Indexing tests are flaky-crashing https://bugs.webkit.org/show_bug.cgi?id=102283 Reviewed by Tony Chang. Processing the final task can cause IDBTransactionBackendImpl references to be released by all holders. Prior to looping over the tasks (or, in an even earlier implementation, swapping queues) control would fall off the end of the function. The loop termination check introduced in http://wkrev.com/134529 requires that |this| be kept alive until the method completes. Test: storage/indexeddb/transaction-crash-in-tasks.html * Modules/indexeddb/IDBTransactionBackendImpl.cpp: (WebCore::IDBTransactionBackendImpl::abort): Rename self => protect. (WebCore::IDBTransactionBackendImpl::commit): Rename self => protect. (WebCore::IDBTransactionBackendImpl::taskTimerFired): New self-ref. 2012-11-15 Elliott Sprehn MutationObserver wrapper should not be collected while still observing https://bugs.webkit.org/show_bug.cgi?id=102328 Reviewed by Adam Barth. Make MutationObserver an ActiveDOMObject so that the wrapper is not collected while it is still observing the DOM. This is needed because the wrapper is passed into the callback and expandos on the wrapper should be preserved. Test: fast/mutation/observer-wrapper-dropoff.html * bindings/js/JSMutationObserverCustom.cpp: (WebCore::JSMutationObserverConstructor::constructJSMutationObserver): * bindings/v8/custom/V8MutationObserverCustom.cpp: (WebCore::V8MutationObserver::constructorCallback): * dom/MutationObserver.cpp: (WebCore::MutationObserver::create): (WebCore::MutationObserver::MutationObserver): (WebCore::MutationObserver::observationStarted): (WebCore::MutationObserver::observationEnded): * dom/MutationObserver.h: (WebCore): * dom/MutationObserver.idl: 2012-11-15 Tony Chang Generate Settings from a .in file https://bugs.webkit.org/show_bug.cgi?id=100393 Reviewed by Adam Barth. Generate most settings from an .in file to reduce human mistakes and to make it easier to add/remove new settings. I only moved settings that are easy to move at this point. There are many more that have some minor naming inconsistencies that we can also move to Settings.in, but I'll do that in a follow up patch. This doesn't generate SettingInternals.* yet-- we can do that in a follow up patch. No new tests, this is a refactor. * CMakeLists.txt: * DerivedSources.make: Run make_settings.pl. * DerivedSources.pri: Run make_settings.pl. * GNUmakefile.am: Run make_settings.pl. * GNUmakefile.list.am: * WebCore.exp.in: Remove functions that are now inline in the header. * WebCore.gyp/WebCore.gyp: Run action_makenames.py, which will run make_settings.pl. * WebCore.gyp/scripts/action_makenames.py: (main): Allow make_settings.pl. * WebCore.order: Remove functions that are now inline in the header. * html/ValidationMessage.cpp: (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Fix a typo in "magnification". * page/Settings.cpp: (WebCore::Settings::Settings): Replace generated settings with SETTINGS_INITIALIZER_LIST. * page/Settings.h: (Settings): Replace generated settings with SETTINGS_GETTERS_AND_SETTERS and SETTINGS_MEMBER_VARIABLES. * page/Settings.in: Added. * page/make_settings.pl: Added. (defaultItemFactory): (generateCode): (generateHeader): Use a similar model as make_names.pl. (printConditionalMacros): (printGettersAndSetters): (printMemberVariables): (printGetterAndSetter): (printInitializerList): (printInitializer): 2012-11-15 Alpha Lam [chromium] Refactoring to move logic of creating lazy decoded SkBitmap into DeferredImageDecoder https://bugs.webkit.org/show_bug.cgi?id=102019 Reviewed by Stephen White. Goal of this change is to keep ImageDecodingStore clean and only do image caching. Logic of creating lazily decoded SkBitmaps is moved into DeferredImageDecoder. In particular these two methods are moved: - ImageDecodingStore::createLazyDecodedSkBitmap - ImageDecodingStore::resizeLazyDecodedSkBitmap No new tests. There is no new code (really). It is just moved from ImageDecodingStore to DeferredImageDecoder. No change in behavior. Code is tested with: Unit tests: webkit_unit_tests Layout test: platform/chromium/virtual/deferred * platform/graphics/chromium/DeferredImageDecoder.cpp: (WebCore::DeferredImageDecoder::isLazyDecoded): (WebCore): (WebCore::DeferredImageDecoder::resizeLazyDecodedSkBitmap): (WebCore::DeferredImageDecoder::frameBufferAtIndex): (WebCore::DeferredImageDecoder::setData): (WebCore::DeferredImageDecoder::createLazyDecodedSkBitmap): * platform/graphics/chromium/DeferredImageDecoder.h: (WebCore): (DeferredImageDecoder): * platform/graphics/chromium/ImageDecodingStore.cpp: * platform/graphics/chromium/ImageDecodingStore.h: (ImageDecodingStore): * platform/graphics/chromium/ImageFrameGenerator.cpp: (WebCore::ImageFrameGenerator::ImageFrameGenerator): * platform/graphics/chromium/ImageFrameGenerator.h: (WebCore::ImageFrameGenerator::create): (ImageFrameGenerator): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::resizedBitmap): 2012-11-15 Roger Fong Unreviewed. Build fix for Windows after r134767. Update vsprops and vcproj files to reflect changes to file locations in r134767. * WebCore.vcproj/WebCore.vcproj: * WebCore.vcproj/WebCoreCommon.vsprops: 2012-11-15 Elliott Sprehn Track subframe count to avoid traversing the tree when there's no subframes https://bugs.webkit.org/show_bug.cgi?id=101821 Reviewed by Ojan Vafai. Bug 101619 showed a 9-14% improvement from not walking the children during removeChild looking for frames when there's known to be no frames. The fix in that bug only avoids this walk when the whole document has no frames, this patch extends it to skip traversing subtrees that have no iframes by hooking the frame assignment to walk up the tree and keep track of the count of frames in the subtree on contentFrame assignment and then decrement it on disconnect. No new tests, this is just a perf refactor. * dom/ContainerNode.cpp: (WebCore::willRemoveChildren): * dom/ContainerNodeAlgorithms.cpp: (WebCore::ChildFrameDisconnector::collectFrameOwners): * dom/ContainerNodeAlgorithms.h: (WebCore::ChildFrameDisconnector::ChildFrameDisconnector): (ChildFrameDisconnector): (WebCore::ChildFrameDisconnector::collectFrameOwners): Renamed from collectDescendant() to better reflect what it really does. (WebCore::ChildFrameDisconnector::disconnectCollectedFrameOwners): Renamed from disconnect() to better reflect what it really does. (WebCore::ChildFrameDisconnector::disconnect): New method that does the collection of frame owners on either the root or only it's descendants. * dom/Node.cpp: (WebCore::Node::connectedSubframeCount): (WebCore::Node::incrementConnectedSubframeCount): (WebCore::Node::decrementConnectedSubframeCount): * dom/Node.h: * dom/NodeRareData.h: (WebCore::NodeRareData::NodeRareData): (WebCore::NodeRareData::connectedSubframeCount): (WebCore::NodeRareData::incrementConnectedSubframeCount): (WebCore::NodeRareData::decrementConnectedSubframeCount): * html/HTMLFrameOwnerElement.cpp: (WebCore::HTMLFrameOwnerElement::setContentFrame): (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): 2012-11-15 Alpha Lam [chromium] WebGL texImage2D fails with deferred image decoding https://bugs.webkit.org/show_bug.cgi?id=102310 Reviewed by Kenneth Russell. Skia's implementation of GraphicsContext3D::getImageData() uses ImageSource to decode an image. When deferred image decoding is enabled this class generates an ImageFrame marked as incomplete, which WebGL rejects. This results in failing of texImage2D. This change uses ImageDecoder directly instead of ImageSource. This skips the code path of deferred image decoding. This behavior is correct because GraphicsContext3D wants to decode the image differently with alpha not premultiplied and color profile applied optionally. Added a test to prove this change fixed the bug. Test: fast/images/webgl-teximage2d.html * platform/graphics/skia/GraphicsContext3DSkia.cpp: (WebCore::GraphicsContext3D::getImageData): 2012-11-15 Jer Noble Further unreviewed build fix. Add explicit static_casts to avoid implicit precision warnings. * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): 2012-11-15 Jer Noble Unreviewed build fix. Avoid implicit precision and unused parameter warnings. * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::responseReceived): (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): 2012-11-15 Adam Barth [V8] We shouldn't call deprecated V8 APIs https://bugs.webkit.org/show_bug.cgi?id=102407 Reviewed by Eric Seidel. This patch was written by Sven Panne on the V8 team. He would prefer that we not call deprecated V8 APIs. This patch updates these call sites to more modern idioms. * bindings/scripts/CodeGeneratorV8.pm: (GenerateConstructorGetter): (GenerateImplementation): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjV8Internal::TestObjConstructorGetter): * bindings/v8/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::setContextDebugId): (WebCore::ScriptController::contextDebugId): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::objectByHeapObjectId): - This code doesn't seem to do anything anymore. * bindings/v8/V8DOMConfiguration.h: (WebCore::V8DOMConfiguration::configureAttribute): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::setInjectedScriptContextDebugId): * bindings/v8/V8DOMWrapper.cpp: (WebCore::V8DOMWrapper::maybeDOMWrapper): (WebCore::V8DOMWrapper::isWrapperOfType): * bindings/v8/V8EventListenerList.h: (WebCore::V8EventListenerList::doFindWrapper): (WebCore::V8EventListenerList::findOrCreateWrapper): * bindings/v8/WorkerContextExecutionProxy.cpp: (WebCore::WorkerContextExecutionProxy::initializeIfNeeded): * bindings/v8/WrapperTypeInfo.h: (WebCore::WrapperTypeInfo::unwrap): 2012-11-15 Sheriff Bot Unreviewed, rolling out r134800 and r134805. http://trac.webkit.org/changeset/134800 http://trac.webkit.org/changeset/134805 https://bugs.webkit.org/show_bug.cgi?id=102417 This patch broke chromium port (Requested by jianli on #webkit). * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): (WebCore::RTCPeerConnection::createOffer): (WebCore::RTCPeerConnection::createAnswer): (WebCore::RTCPeerConnection::setLocalDescription): (WebCore::RTCPeerConnection::localDescription): (WebCore::RTCPeerConnection::setRemoteDescription): (WebCore::RTCPeerConnection::remoteDescription): (WebCore::RTCPeerConnection::updateIce): (WebCore::RTCPeerConnection::addIceCandidate): (WebCore::RTCPeerConnection::readyState): (WebCore::RTCPeerConnection::iceState): (WebCore::RTCPeerConnection::addStream): (WebCore::RTCPeerConnection::close): (WebCore::RTCPeerConnection::stop): (WebCore::RTCPeerConnection::changeReadyState): (WebCore::RTCPeerConnection::scheduledEventTimerFired): * Modules/mediastream/RTCPeerConnection.h: (RTCPeerConnection): * Modules/mediastream/RTCPeerConnection.idl: * dom/EventNames.h: (WebCore): * platform/mediastream/RTCDataChannelDescriptor.cpp: (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor): (WebCore::RTCDataChannelDescriptor::readyStateChanged): * platform/mediastream/RTCPeerConnectionHandlerClient.h: (RTCPeerConnectionHandlerClient): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (RTCPeerConnectionHandlerChromium): 2012-11-15 Elliott Sprehn Remove Node::aboutToUnload and be more explicit about what it was for https://bugs.webkit.org/show_bug.cgi?id=102357 Reviewed by Ryosuke Niwa. Node::aboutToUnload was confusingly named because it was only called on the focused node, and it really only existed to support notifying the embedder that inputs should stop being editable on unload. Instead add a new method to HTMLInputElement that ends editing and call that explicitly in the FrameLoader so it's clear what this is about. No new tests, this is just a refactoring. * dom/Node.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::endEditing): New method that handles finishing editing. * html/HTMLInputElement.h: (HTMLInputElement): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleBlurEvent): Use the new method to reduce code duplication. * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Be explicit about what this check was for. 2012-11-15 Tommy Widenflycht [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel https://bugs.webkit.org/show_bug.cgi?id=102386 Reviewed by Adam Barth. Existing tests expanded to cover patch. * platform/mediastream/RTCDataChannelDescriptor.cpp: (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor): (WebCore::RTCDataChannelDescriptor::readyStateChanged): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel): (WebCore): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (WebKit): (RTCPeerConnectionHandlerChromium): 2012-11-15 Rick Byers No tests for changing mouse cursors https://bugs.webkit.org/show_bug.cgi?id=100550 Reviewed by Brent Fulgham. Add infrastructure to keep track of the last set mouse cursor, and then to query it from DumpRenderTree. Also adds ASSERTs to help ensure we can reliably detect when an uninitialized Cursor object is used (such as the one that can be returned from OptionalCursor in the NoCursorChange scenario). Test: fast/events/mouse-cursor.html * WebCore.exp.in: Add Cursor copy ctor export * page/EventHandler.cpp: (WebCore::OptionalCursor::cursor): (WebCore::EventHandler::handleMouseMoveEvent): Keep track of last set mouse cursor * page/EventHandler.h: (WebCore::EventHandler::currentMouseCursor): New getter for last set mouse cursor * platform/Cursor.h: (WebCore::Cursor::Cursor): Mark uninitialized cursor types as invalid. (WebCore::Cursor::type): Assert cursor type is valid. * testing/Internals.cpp: (WebCore::cursorTypeToString): Helper to convert cursor type to enum (WebCore): (WebCore::Internals::getCurrentCursorInfo): New function to return a string describing the last set mouse cursor * testing/Internals.h: Declare getCurrentCursorInfo * testing/Internals.idl: Declare getCurrentCursorInfo 2012-11-13 Jer Noble Support loading of blob URLs in AVFoundation. https://bugs.webkit.org/show_bug.cgi?id=102182 Reviewed by Eric Carlson. Add support for BLOB (and other non-natively supported schemed) URLs through the AVAssetResourceLoader API. Test: media/video-src-blob.html * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Only go down the encrypted media path if the key scheme is skp://. (WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Added. Cancel resource loading if the media engine requests it. (WebCore::MediaPlayerPrivateAVFoundationObjC::addKey): Use the new, non-deprecated API. Use the dispatch_main_queue() as the AVAssetResourceLoadDelegate queue now that is fixed. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Add a new helper class to manage loading the CachedRawResource and feed the incoming data to the AVAssetResourceLoader. * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: Added. * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: Added. (WebCore::WebCoreAVFResourceLoader::create): Simple factory. (WebCore::WebCoreAVFResourceLoader::WebCoreAVFResourceLoader): Simple constructor. (WebCore::WebCoreAVFResourceLoader::~WebCoreAVFResourceLoader): Simple destructor. (WebCore::WebCoreAVFResourceLoader::startLoading): Tell the cachedResourceLoader to schedule loading. (WebCore::WebCoreAVFResourceLoader::stopLoading): Remove this as a client of the resource. (WebCore::WebCoreAVFResourceLoader::responseReceived): Fill in the contentInformation field of the AVAssetResourceLoadingRequest. (WebCore::WebCoreAVFResourceLoader::dataReceived): Call fulfillRequestWithResource. (WebCore::WebCoreAVFResourceLoader::notifyFinished): Tell the AVAssetResourceLoadingRequest that loading has completed. (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Fill in (if possible) the dataRequest field of the AVAssetResourceLoadingRequest. Add a MediaPlayerClient method allowing MediaPlayerPrivate subclasses to access the HTMLMediaElement's document's cachedResourceLoader. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaPlayerCachedResourceLoader): * html/HTMLMediaElement.h: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::cachedResourceLoader): * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerCachedResourceLoader): Add a convenience method to convert from MIME type -> UTI. * platform/network/mac/UTIUtilities.h: * platform/network/mac/UTIUtilities.mm: (WebCore::UTIFromMIMEType): Add new files to project. * WebCore.xcodeproj/project.pbxproj: 2012-11-15 Kenneth Rohde Christiansen Remove initiallyFitToViewport attribute https://bugs.webkit.org/show_bug.cgi?id=102392 Reviewed by Noam Rosenthal. Remove the initiallyFitToViewport which shouldn't have been added in the first place. We now reset userScalable to auto (-1) in case it was not explicitly set by the web author. Same behavior, covered by existing tests. * dom/ViewportArguments.cpp: (WebCore::ViewportArguments::resolve): * dom/ViewportArguments.h: (ViewportAttributes): 2012-11-15 Tommy Widenflycht MediaStream API: Update RTCPeerConnection states to match the latest editors draft https://bugs.webkit.org/show_bug.cgi?id=102382 Reviewed by Adam Barth. Updating readyState & iceState, and adding iceGatheringState. Also safeguarding the event timer callback. Patch covered by existing tests. * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): (WebCore::RTCPeerConnection::createOffer): (WebCore::RTCPeerConnection::createAnswer): (WebCore::RTCPeerConnection::setLocalDescription): (WebCore::RTCPeerConnection::localDescription): (WebCore::RTCPeerConnection::setRemoteDescription): (WebCore::RTCPeerConnection::remoteDescription): (WebCore::RTCPeerConnection::updateIce): (WebCore::RTCPeerConnection::addIceCandidate): (WebCore::RTCPeerConnection::readyState): (WebCore::RTCPeerConnection::iceGatheringState): (WebCore): (WebCore::RTCPeerConnection::iceState): (WebCore::RTCPeerConnection::addStream): (WebCore::RTCPeerConnection::close): (WebCore::RTCPeerConnection::didChangeIceGatheringState): (WebCore::RTCPeerConnection::stop): (WebCore::RTCPeerConnection::changeReadyState): (WebCore::RTCPeerConnection::scheduledEventTimerFired): * Modules/mediastream/RTCPeerConnection.h: (RTCPeerConnection): * Modules/mediastream/RTCPeerConnection.idl: * dom/EventNames.h: (WebCore): * platform/mediastream/RTCPeerConnectionHandlerClient.h: (RTCPeerConnectionHandlerClient): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEGatheringState): (WebCore): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (RTCPeerConnectionHandlerChromium): 2012-11-15 Sheriff Bot Unreviewed, rolling out r134649 and r134665. http://trac.webkit.org/changeset/134649 http://trac.webkit.org/changeset/134665 https://bugs.webkit.org/show_bug.cgi?id=102413 Broke a ton of downstream chromium tests (Requested by japhet on #webkit). * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): (WebCore::DocumentLoader::~DocumentLoader): (WebCore::DocumentLoader::finishedLoading): (WebCore::DocumentLoader::clearMainResourceLoader): (WebCore::DocumentLoader::isLoadingInAPISense): (WebCore::DocumentLoader::documentURL): (WebCore::DocumentLoader::isLoadingMainResource): (WebCore::DocumentLoader::startLoadingMainResource): * loader/DocumentLoader.h: (DocumentLoader): * loader/FrameLoader.cpp: (WebCore::FrameLoader::FrameLoader): (WebCore::FrameLoader::init): * loader/FrameLoaderStateMachine.cpp: (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine): * loader/FrameLoaderStateMachine.h: * loader/MainResourceLoader.cpp: (WebCore::shouldLoadAsEmptyDocument): (WebCore): (WebCore::MainResourceLoader::continueAfterContentPolicy): (WebCore::MainResourceLoader::didReceiveResponse): (WebCore::MainResourceLoader::didFinishLoading): (WebCore::MainResourceLoader::handleEmptyLoad): (WebCore::MainResourceLoader::loadNow): (WebCore::MainResourceLoader::load): * loader/MainResourceLoader.h: (MainResourceLoader): 2012-11-15 Kentaro Hara Correct syntax of old-style IDL files https://bugs.webkit.org/show_bug.cgi?id=102335 Reviewed by Adam Barth. Recently tasak@ corrected an IDL syntax of almost all IDL files. We should correct the rest of them. No tests. No change in behavior. * html/canvas/OESElementIndexUint.idl: * page/PerformanceMark.idl: * page/PerformanceMeasure.idl: 2012-11-15 Elliott Sprehn Remove isHTMLInputElement since it's unused and toInputElement exists https://bugs.webkit.org/show_bug.cgi?id=102358 Reviewed by Ojan Vafai. Remove isHTMLInputElement as no one uses it. Everyone just uses Node::toInputElement and checks for a 0 return value instead. toInputElement is also more reliable as there's no requirement that subclasses of HTMLInputElement have the tag name of inputTag so using this method in a check could potentially miss future subclasses with different tag names, though none exist right now. No new tests, this just deletes dead code. * html/HTMLInputElement.h: 2012-11-15 Erik Arvidsson Update DOMException name: NotSupportedError https://bugs.webkit.org/show_bug.cgi?id=102139 Reviewed by Ojan Vafai. Patch 9 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-15 Elliott Sprehn Remove isHTMLInputElement since it's unused and toInputElement exists https://bugs.webkit.org/show_bug.cgi?id=102358 Reviewed by Ojan Vafai. Remove isHTMLInputElement as no one uses it. Everyone just uses Node::toInputElement and checks for a 0 return value instead. toInputElement is also more reliable as there's no requirement that subclasses of HTMLInputElement have the tag name of inputTag so using this method in a check could potentially miss future subclasses with different tag names, though none exist right now. No new tests, this just deletes dead code. * html/HTMLInputElement.h: 2012-11-15 Erik Arvidsson Update DOMException name: NoModificationAllowedError https://bugs.webkit.org/show_bug.cgi?id=102134 Reviewed by Ojan Vafai. Patch 7 of 25 to update DOMException name to match the spec and Firefox. Updated existing tests. * dom/DOMCoreException.cpp: 2012-11-15 Miguel Garcia Remove unnecesary dependencies INPUT_TYPE_COLOR https://bugs.webkit.org/show_bug.cgi?id=102379 Reviewed by Darin Adler. Platforms should be able to enable INPUT_TYPE_COLOR without enabling CALENDAR_PICKER and DATALIST_ELEMENT. Before this patch however there would be compile errors in such configuration. No new tests since this is not adding any extra functionality. * WebCore.gyp/WebCore.gyp: * html/ColorInputType.cpp: (WebCore::ColorInputType::shouldShowSuggestions): * make-file-arrays.py: (main): 2012-11-15 Eric Carlson Update computed line position algorithm https://bugs.webkit.org/show_bug.cgi?id=93779 Reviewed by Philippe Normand. Compute the position of a text track relative to rendered tracks. This is needed to position cues correctly when there is more than one text track. Test: media/track/track-cue-container-rendering-position.html * html/track/TextTrack.cpp: (WebCore::TextTrack::invalidateTrackIndex): Invalidate both cached track indices. (WebCore::TextTrack::trackIndexRelativeToRenderedTracks): Return the index of the track relative to other rendered tracks. * html/track/TextTrack.h: * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::calculateComputedLinePosition): Use trackIndexRelativeToRenderedTracks() instead of trackIndex() so cues are positioned correctly. * html/track/TextTrackList.cpp: (TextTrackList::getTrackIndex): Change return type from unsigned to int. (TextTrackList::getTrackIndexRelativeToRenderedTracks): New. * html/track/TextTrackList.h: 2012-11-15 Dominik Röttsches [EFL] Bump Harfbuzz to allow fixing bug 101009 on EFL https://bugs.webkit.org/show_bug.cgi?id=101323 Reviewed by Martin Robinson. Removing ifdef since we bumped Harfbuzz dependency. This is the real fix replacing the previous workaround of having a Chromium specific ifdef here, since Chromium uses a newer HarfBuzz version already. No new tests, covered by css3/flexbox/inline-flex-crash.html which will not crash anymore even with the ifdef removed. * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): 2012-11-15 Andreas Kling REGRESSION(r134408): Heap-use-after-free in WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement(). Reviewed by Anders Carlsson. Test: fast/dom/cloneNode-below-body-attribute-merging.html * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): Use Element::fastHasAttribute() to determine if a given attribute is already present on the element we're merging attributes into. * dom/ElementAttributeData.h: (ElementAttributeData): Remove a now-unnecessary friend declaration. 2012-11-15 Elliott Sprehn Prevent creation of detached frames in ShadowRoot https://bugs.webkit.org/show_bug.cgi?id=102333 Reviewed by Dimitri Glazkov. Similar to Bug 94717 you can create a loaded iframe in a detached subtree using ShadowRoot. To fix this we just need to make SubframeLoadingDisabler traverse through shadow boundaries. Test: fast/frames/detached-shadow-frame.html * html/HTMLFrameOwnerElement.h: (WebCore::SubframeLoadingDisabler::canLoadFrame): 2012-11-15 Shinya Kawanaka Changing pseudoClass (:visited) should cause distribution. https://bugs.webkit.org/show_bug.cgi?id=101700 Reviewed by Dimitri Glazkov. When href attribute of an anchor or area element is changed, we have to invalidate distribution. Since we would like to check a few pseudoClasses at once, we make the argument of SelectRuleFeatureSet::hasSelectorFor int. Tests: fast/dom/shadow/pseudoclass-update-visited-anchor.html fast/dom/shadow/pseudoclass-update-visited-area.html * dom/ElementShadow.cpp: (WebCore::invalidateParentDistributionIfNecessary): * dom/ElementShadow.h: (WebCore): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseAttribute): * html/shadow/SelectRuleFeatureSet.h: (WebCore::SelectRuleFeatureSet::hasSelectorFor): 2012-11-15 Balazs Kelemen Coordinated Graphics: support the "freeze animations" API https://bugs.webkit.org/show_bug.cgi?id=100703 Reviewed by Noam Rosenthal. Make animations resumable in Coordinated Graphics. Pausing was already implemented. Tested with animations and transitions tests. No tests to be unskipped because these tests has been working without this API as well (although this is the preferred way). * platform/graphics/GraphicsLayerAnimation.cpp: (WebCore::GraphicsLayerAnimation::apply): (WebCore::GraphicsLayerAnimation::computeTotalRunningTime): Do not consider the time while we was suspended as part of the total running time. (WebCore): (WebCore::GraphicsLayerAnimation::resume): (WebCore::GraphicsLayerAnimations::suspend): (WebCore::GraphicsLayerAnimations::resume): * platform/graphics/GraphicsLayerAnimation.h: (GraphicsLayerAnimation): (GraphicsLayerAnimations): 2012-11-15 Gabor Rapcsanyi Relocate the ARM NEON SVG filter optimizations https://bugs.webkit.org/show_bug.cgi?id=102214 Reviewed by Zoltan Herczeg. Relocate the ARM filter optimizations into platform/graphics/cpu/arm to keep them together with the others. From now all graphics optimization for ARM NEON should go here. * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * Target.pri: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/cpu/arm/filters/FEBlendNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FEBlendNEON.h. (WebCore): (FEBlendUtilitiesNEON): (WebCore::FEBlendUtilitiesNEON::div255): (WebCore::FEBlendUtilitiesNEON::normal): (WebCore::FEBlendUtilitiesNEON::multiply): (WebCore::FEBlendUtilitiesNEON::screen): (WebCore::FEBlendUtilitiesNEON::darken): (WebCore::FEBlendUtilitiesNEON::lighten): (WebCore::FEBlend::platformApplyNEON): * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FECompositeArithmeticNEON.h. (WebCore): (WebCore::FEComposite::computeArithmeticPixelsNeon): (WebCore::FEComposite::platformArithmeticNeon): * platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FEGaussianBlurNEON.h. (WebCore): (WebCore::boxBlurNEON): * platform/graphics/cpu/arm/filters/FELightingNEON.cpp: Renamed from Source/WebCore/platform/graphics/filters/arm/FELightingNEON.cpp. (WebCore): (WebCore::feLightingConstantsForNeon): (WebCore::FELighting::platformApplyNeonWorker): (WebCore::FELighting::getPowerCoefficients): * platform/graphics/cpu/arm/filters/FELightingNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FELightingNEON.h. (WebCore): (FELightingFloatArgumentsForNeon): (FELightingPaintingDataForNeon): (WebCore::FELighting::platformApplyNeon): * platform/graphics/cpu/arm/filters/NEONHelpers.h: Renamed from Source/WebCore/platform/graphics/filters/arm/NEONHelpers.h. (WebCore): (WebCore::loadRGBA8AsFloat): (WebCore::storeFloatAsRGBA8): 2012-11-15 Mike West We should trigger a console warning when we encounter invalid sandbox flags. https://bugs.webkit.org/show_bug.cgi?id=101956 Reviewed by Adam Barth. A developer who writes ' The source document uses the same font as the embedding document. Tests: fast/frames/seamless/seamless-custom-font-pruning-crash.html fast/frames/seamless/seamless-nested-crash.html * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): Remove code to register the font with the document. * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::getFontData): Remove code to register the font with the document. * dom/Document.cpp: (WebCore::Document::~Document): Remove code that records and purges custom fonts. (WebCore): (WebCore::Document::reportMemoryUsage): Remove reference to non-existent objects. * dom/Document.h: (WebCore): (Document): Remove method declarations for custom font handling. * platform/graphics/FontFallbackList.h: (FontFallbackList): Moved some code around and made non-copyable. (WebCore::FontFallbackList::setGlyphPageZero): Moved. (WebCore::FontFallbackList::setGlyphPages): Moved. * platform/graphics/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::pruneFontData): Removed unnecessary null check. * platform/graphics/SegmentedFontData.cpp: (WebCore::SegmentedFontData::~SegmentedFontData): Added code to prune the Glyph pages when this is deleted. * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::~SimpleFontData): Added code to prune the Glyph pages when this is deleted. 2012-10-03 Adam Barth Crash when calling document.open during unload https://bugs.webkit.org/show_bug.cgi?id=98287 Reviewed by Nate Chapin. Calling document.open results in us nulling out m_documentLoader. This code doesn't properly handle that case and crashes. Test: fast/parser/document-open-in-unload.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::commitProvisionalLoad): 2012-10-03 Benjamin Poulain Element::computeInheritedLanguage: evaluate the while() condition after fetching the string https://bugs.webkit.org/show_bug.cgi?id=98220 Reviewed by Andreas Kling. * dom/Element.cpp: (WebCore::Element::computeInheritedLanguage): The condition is never false on the first execution. Move the condition to the end of the loop for fun and profit. 2012-10-03 Hans Wennborg Speech JavaScript API: Add SpeechRecognition.interimResults attribute https://bugs.webkit.org/show_bug.cgi?id=98279 Reviewed by Adam Barth. Add the interimResults attribute and pass it to the embedder. It was added to the spec draft in http://dvcs.w3.org/hg/speech-api/rev/d25fea0d029c Tested in fast/speech/scripted/basics.html * Modules/speech/SpeechRecognition.cpp: (WebCore::SpeechRecognition::start): (WebCore::SpeechRecognition::SpeechRecognition): * Modules/speech/SpeechRecognition.h: (WebCore::SpeechRecognition::interimResults): (WebCore::SpeechRecognition::setInterimResults): * Modules/speech/SpeechRecognition.idl: * Modules/speech/SpeechRecognitionClient.h: (SpeechRecognitionClient): * Modules/speech/SpeechRecognitionController.h: (WebCore::SpeechRecognitionController::start): 2012-10-03 Hans Wennborg Speech JavaScript API: Remove resultdeleted event https://bugs.webkit.org/show_bug.cgi?id=98272 Reviewed by Adam Barth. Remove the resultdeleted event. This was never used, and was removed from the spec draft in http://dvcs.w3.org/hg/speech-api/rev/f9d53ab8b449 The fast/speech/scripted/basics.html test is updated to reflect this. * Modules/speech/SpeechRecognition.cpp: * Modules/speech/SpeechRecognition.h: (SpeechRecognition): * Modules/speech/SpeechRecognition.idl: * Modules/speech/SpeechRecognitionEvent.cpp: * Modules/speech/SpeechRecognitionEvent.h: (SpeechRecognitionEvent): * dom/EventNames.h: (WebCore): 2012-09-16 Mark Hahnenberg Delayed structure sweep can leak structures without bound https://bugs.webkit.org/show_bug.cgi?id=96546 Reviewed by Geoffrey Garen. This patch gets rid of the separate Structure allocator in the MarkedSpace and adds two new destructor-only allocators. We now have separate allocators for our three types of objects: those objects with no destructors, those objects with destructors and with immortal structures, and those objects with destructors that don't have immortal structures. All of the objects of the third type (destructors without immortal structures) now inherit from a new class named JSDestructibleObject (which in turn is a subclass of JSNonFinalObject), which stores the ClassInfo for these classes at a fixed offset for safe retrieval during sweeping/destruction. No new tests. * ForwardingHeaders/runtime/JSDestructableObject.h: Added. * bindings/js/JSDOMWrapper.h: Inherits from JSDestructibleObject. (JSDOMWrapper): (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: Add finalizers to anything that inherits from JSGlobalObject, e.g. JSDOMWindow and JSWorkerContexts. For those classes we also need to define needsDestruction as true. (GenerateHeader): * bridge/objc/objc_runtime.h: Inherit from JSDestructibleObject. (ObjcFallbackObjectImp): * bridge/objc/objc_runtime.mm: (Bindings): (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/runtime_array.cpp: Use a finalizer so that JSArray isn't forced to inherit from JSDestructibleObject. (JSC): (JSC::RuntimeArray::destroy): * bridge/runtime_array.h: (JSC::RuntimeArray::create): (JSC): * bridge/runtime_object.cpp: Inherit from JSDestructibleObject. (Bindings): (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (RuntimeObject): 2012-10-02 Anders Carlsson Change most GraphicsLayer::create calls to use the version that takes a GraphicsLayerFactory https://bugs.webkit.org/show_bug.cgi?id=98217 Reviewed by Andreas Kling. * WebCore.exp.in: * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::createGraphicsLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): (WebCore::RenderLayerCompositor::ensureRootLayer): 2012-10-03 Joshua Bell IndexedDB: Optimize encodeString/decodeString https://bugs.webkit.org/show_bug.cgi?id=97794 Reviewed by Tony Chang. Optimize string encoding/decoding, which showed up as a CPU hot spot during profiling. The backing store uses big-endian ordering of 16-bit code unit strings, so a memcopy isn't sufficient, but the code used StringBuilder::append() character-by-character and custom byte-swapping which was slow. Ran a test w/ DumpRenderTree (to avoid multiprocess overhead) taking a 10k character string and putting it 20k times and getting it 20k times. On my test box, mean time before the patch was 8.2s, mean time after the patch was 4.6s. Tested by Chromium's webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.*String*' * Modules/indexeddb/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::encodeString): (WebCore::IDBLevelDBCoding::decodeString): 2012-10-03 Keishi Hattori Implement DataList UI for input type time on chromium https://bugs.webkit.org/show_bug.cgi?id=98240 Reviewed by Kent Tamura. This adds datalist UI for input type time. We add the picker indicator to BaseMultipleFieldsDateAndTimeInputType. We enclose the dateTimeEdit element and picker indicator inside a new div element so we can position the picker indicator in the same place as input type=date. Tests: platform/chromium/fast/forms/time/time-suggestion-picker-appearance-rtl.html platform/chromium/fast/forms/time/time-suggestion-picker-appearance-with-scroll-bar.html platform/chromium/fast/forms/time/time-suggestion-picker-appearance.html platform/chromium/fast/forms/time/time-suggestion-picker-key-operations.html platform/chromium/fast/forms/time/time-suggestion-picker-mouse-operations.html * css/html.css: (input::-webkit-date-and-time-container): * html/BaseMultipleFieldsDateAndTimeInputType.cpp: (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType): (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree): Creates a picker indicator. (WebCore::BaseMultipleFieldsDateAndTimeInputType::handleKeydownEvent): Open the picker on Alt+Down. (WebCore): (WebCore::BaseMultipleFieldsDateAndTimeInputType::listAttributeTargetChanged): Updates picker visibility. (WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility): In the future, DateInputType can override this so the picker indicator is always visible. (WebCore::BaseMultipleFieldsDateAndTimeInputType::hidePickerIndicator): (WebCore::BaseMultipleFieldsDateAndTimeInputType::showPickerIndicator): * html/BaseMultipleFieldsDateAndTimeInputType.h: (WebCore): (BaseMultipleFieldsDateAndTimeInputType): * html/shadow/DateTimeFieldElement.cpp: (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler): Ignore Alt+down because it should trigger the picker to open. * rendering/RenderThemeChromiumCommon.cpp: (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add time to the list. 2012-10-03 Andreas Kling Give CSSValueList backing vector an inline capacity. Reviewed by Anders Carlsson. Set an inline capacity of 4 on the CSSValue vector backing CSSValueList. This avoids an extra heap allocation in the common case, and reduces total memory use across the board, since the majority of CSSValueLists have at least 1 item, and the Vector will bump from 0 to 16 capacity on the first append. 394kB progression on Membuster3. * css/CSSValueList.h: (CSSValueList): 2012-10-03 Ilya Tikhonovsky Web Inspector: NMI: instrument NativeImageSkia. https://bugs.webkit.org/show_bug.cgi?id=96277 Reviewed by Yury Semikhatsky. * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::reportMemoryUsage): (WebCore::reportMemoryUsage): 2012-10-03 Pavel Feldman Web Inspector: remember the last dock option so that user could toggle between dock to bottom and right https://bugs.webkit.org/show_bug.cgi?id=98255 Reviewed by Vsevolod Vlasov. - Introduced DockController.js that covers the dock mechanics - Removed dock orientation from the settings - Storing the last dock option to present it as default - Simplified the multi-option status bar button * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/DockController.js: Added. (WebInspector.DockController): (WebInspector.DockController.prototype.get element): (WebInspector.DockController.prototype.setDocked.set if): (WebInspector.DockController.prototype.setDocked): (WebInspector.DockController.prototype.setDockingUnavailable): (WebInspector.DockController.prototype._updateUI.get states): (WebInspector.DockController.prototype._updateUI): (WebInspector.DockController.prototype._decorateButtonForTargetState): (WebInspector.DockController.prototype._createDockOptions): (WebInspector.DockController.prototype._toggleDockState): (WebInspector.DockController.prototype.isCompactMode): (WebInspector.DockController.prototype.setCompactMode): * inspector/front-end/InspectorFrontendAPI.js: (InspectorFrontendAPI.setAttachedWindow): * inspector/front-end/InspectorFrontendHostStub.js: (.WebInspector.InspectorFrontendHostStub.prototype.requestAttachWindow): (.WebInspector.InspectorFrontendHostStub.prototype.requestDetachWindow): * inspector/front-end/Settings.js: * inspector/front-end/SettingsScreen.js: (WebInspector.GenericSettingsTab): * inspector/front-end/StatusBarButton.js: (WebInspector.StatusBarButton): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar): (WebInspector.Toolbar.prototype.setCompactMode): (WebInspector.Toolbar.prototype._toolbarDragStart): (WebInspector.Toolbar.prototype._toolbarDrag): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (WebInspector.toggleSearchingForNode): * inspector/front-end/inspector.css: (body.undocked.platform-mac-snowleopard #toolbar): (body.undocked.platform-mac-snowleopard #toolbar-dropdown): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (windowLoaded): (WebInspector.setDockingUnavailable): * inspector/front-end/inspectorCommon.css: (body.dock-to-right:not(.undocked)): (body.dock-to-right.inactive:not(.undocked)): 2012-10-03 Vsevolod Vlasov Web Inspector: UISourceCode commitWorkingCopy should not fail when original script had syntax error. https://bugs.webkit.org/show_bug.cgi?id=97272 Reviewed by Pavel Feldman. This patch is based on patch by John J. Barton. * inspector/front-end/JavaScriptSource.js: (WebInspector.JavaScriptSource.prototype.workingCopyCommitted): added rawLocation null check. 2012-10-03 Alexander Pavlov Web Inspector: After "Edit as HTML", any click outside box should stop editing https://bugs.webkit.org/show_bug.cgi?id=98258 Reviewed by Vsevolod Vlasov. Make the DOM tree OL span the entire height of its container in the Elements panel to catch mouse events. * inspector/front-end/elementsPanel.css: (#elements-content > ol): 2012-10-03 Dongwoo Joshua Im [EFL] Skeleton code of File system API. https://bugs.webkit.org/show_bug.cgi?id=91187 Reviewed by Gyuyoung Kim. Add skeleton code of File System API on EFL port. Implementation patches will be created later. No new tests because this is just skeleton code. * CMakeLists.txt: Add new files which created by other patches in Modules/filesystem/ directory. * PlatformEfl.cmake: Add AsyncFileSystemEfl.cpp. * platform/AsyncFileSystem.cpp: (WebCore): * platform/efl/AsyncFileSystemEfl.cpp: Added. * platform/efl/AsyncFileSystemEfl.h: Added. 2012-10-03 Andreas Kling Shrink ElementRareData by moving bool flags to NodeRareData. Reviewed by Antti Koivisto. Move all bool flags from ElementRareData to the bitfield in its base class NodeRareData. This shrinks ElementRareData by 8 bytes (on 64-bit) and saves a whopping 58kB on Membuster3. Also removed some double raredata hash lookups. * dom/Element.cpp: (WebCore::Element::detach): (WebCore::Element::recalcStyle): (WebCore::Element::ensureShadow): (WebCore::Element::setStyleAffectedByEmpty): (WebCore::Element::styleAffectedByEmpty): (WebCore::Element::setIsInCanvasSubtree): (WebCore::Element::isInCanvasSubtree): (WebCore::Element::containsFullScreenElement): (WebCore::Element::setContainsFullScreenElement): * dom/ElementRareData.h: (ElementRareData): (WebCore::ElementRareData::ElementRareData): * dom/NodeRareData.h: (WebCore::NodeRareData::styleAffectedByEmpty): (WebCore::NodeRareData::setStyleAffectedByEmpty): (WebCore::NodeRareData::isInCanvasSubtree): (WebCore::NodeRareData::setIsInCanvasSubtree): (NodeRareData): (WebCore::NodeRareData::containsFullScreenElement): (WebCore::NodeRareData::setContainsFullScreenElement): 2012-10-03 Jussi Kukkonen getComputedStyle perspective-origin is based on the wrong bounding box https://bugs.webkit.org/show_bug.cgi?id=98027 Reviewed by Simon Fraser. perspective-origin for ComputedStyleDeclaration is currently calculated using the wrong bounding box (sizingBox() which ends up as the contentbox). Start using borderbox for ComputedStyleDeclaration perspective-origin, similar to what transform-origin already does. Test: fast/css/getComputedStyle/getComputedStyle-origin-percentage.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 2012-10-03 Patrick Gansterer Build fix for WinCE after r130160. * platform/graphics/FontFastPath.cpp: (WebCore::Font::glyphDataAndPageForCharacter): 2012-10-03 Tommy Widenflycht MediaStream API: RTCPeerConnection should send down its handler via the FrameLoaderClient directly after creation. https://bugs.webkit.org/show_bug.cgi?id=98149 Reviewed by Adam Barth. The chromium implementation needs to know which Frame created a PeerConnection so that the right housekeeping can take place correctly. Not testable in DRT, but have verified the change manually and with our pyautotests. * Modules/mediastream/RTCPeerConnection.cpp: (WebCore::RTCPeerConnection::RTCPeerConnection): * loader/FrameLoaderClient.h: (WebCore): (FrameLoaderClient): (WebCore::FrameLoaderClient::dispatchWillStartUsingPeerConnectionHandler): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp: (WebCore::RTCPeerConnectionHandlerChromium::toWebRTCPeerConnectionHandler): (WebCore): (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium): (WebCore::RTCPeerConnectionHandlerChromium::initialize): * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h: (RTCPeerConnectionHandlerChromium): 2012-10-03 Eugene Klyuchnikov Web Inspector: Profiles: taking heap snapshot causes error message in console. https://bugs.webkit.org/show_bug.cgi?id=97890 Reviewed by Yury Semikhatsky. Actual problem is that proxy loader is closed twice. "_snapshotReceived" should never try to close receiver, because it is a callback fired by close. Also minor glitches fixed: - taking snapshot shows "Loading..." status first, and then "Saving xxx%"; - after all chunks are sent "Parsing" status is set and then is replaced with "Saving 100%"; - removed dead code in proxy; - proxy was ignoring callback parameter; - "Loading %d\%" is not localized. * English.lproj/localizedStrings.js: Added missing "Loading %d%" string. * inspector/front-end/HeapSnapshotProxy.js: Removed dead code. (WebInspector.HeapSnapshotLoaderProxy): (WebInspector.HeapSnapshotLoaderProxy.prototype.write): Make this method interface-conformant. * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapProfileHeader): Fixed update-status and finish-transfer logic. 2012-10-03 Jochen Eisinger Make sure that user gestures can't be consumed twice https://bugs.webkit.org/show_bug.cgi?id=97483 Reviewed by Adam Barth. Instead of a simple counter, use a ref counted token to track how many user gestures happened and where consumed. When creating a timer that is supposed to forward the user gesture, take a reference to this token and reinstantiate the UserGestureIndicator with that token when the timer is triggered. Tests: platform/chromium/fast/events/popup-forwarded-gesture-blocked.html platform/chromium/fast/events/popup-forwarded-gesture.html * dom/UserGestureIndicator.cpp: (WebCore): (WebCore::UserGestureIndicator::UserGestureIndicator): (WebCore::UserGestureIndicator::~UserGestureIndicator): (WebCore::UserGestureIndicator::processingUserGesture): (WebCore::UserGestureIndicator::consumeUserGesture): (WebCore::UserGestureIndicator::currentToken): * dom/UserGestureIndicator.h: (Token): (WebCore::UserGestureIndicator::Token::~Token): (UserGestureIndicator): * page/DOMTimer.cpp: (WebCore::DOMTimer::DOMTimer): (WebCore::DOMTimer::fired): * page/DOMTimer.h: (DOMTimer): 2012-10-03 Dominic Mazzoni AX: Heap-use-after-free when deleting a ContainerNode with an AX object https://bugs.webkit.org/show_bug.cgi?id=98073 Reviewed by Hajime Morita. Calls axObjectCache()->remove(this) in ~ContainerNode so that the AX tree doesn't try to access the container node while walking up the parent chain from one of the container node's children. Test: accessibility/container-node-delete-causes-crash.html * dom/ContainerNode.cpp: (WebCore::ContainerNode::~ContainerNode): * dom/Node.cpp: (WebCore::Node::~Node): * dom/Node.h: (WebCore::Node::document): (WebCore::Node::documentInternal): 2012-10-03 Vsevolod Vlasov Web Inspector: SourceURL should be taken from debugger agent when possible. https://bugs.webkit.org/show_bug.cgi?id=98239 Reviewed by Yury Semikhatsky. Removed a check that sourceURL coming from js engine is the same as the one parsed by debugger agent. Alwys use the one from debugger agent now. * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::didParseSource): 2012-10-03 Ilya Tikhonovsky Unreviewed. Touch FrameView.cpp file for fixing mac bot compilation. * page/FrameView.cpp: (WebCore): 2012-10-02 Ilya Tikhonovsky Web Inspector: "Load profile..." context menu item has to be shown only for left column with the list of profiles. https://bugs.webkit.org/show_bug.cgi?id=98163 Reviewed by Yury Semikhatsky. The text was changed to "Load Heap Snapshot..." Also I changed "Save profile..." to "Save Heap Snapshot..." because other profiles don't support Save/Load operations yet. The Load context menu item will appear only when the user clicked in sidebar the tree empty space or a profile. * English.lproj/localizedStrings.js: * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent): (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent): 2012-10-03 Harald Alvestrand Add data passing to the GetStats interface of RTCPeerConnection https://bugs.webkit.org/show_bug.cgi?id=98003 Reviewed by Adam Barth. Added an RTCStatsResponseBase interface to platform, and let the RTCStatsRequestImpl class produce an implementation of it that's returned to WebCore. Tested by extension of the RTCPeerConnection-stats.html test. * Modules/mediastream/RTCStatsElement.cpp: (WebCore::RTCStatsElement::addStatistic): (WebCore): * Modules/mediastream/RTCStatsElement.h: (RTCStatsElement): * Modules/mediastream/RTCStatsReport.cpp: (WebCore): (WebCore::RTCStatsReport::addElement): (WebCore::RTCStatsReport::addStatistic): * Modules/mediastream/RTCStatsReport.h: (RTCStatsReport): * Modules/mediastream/RTCStatsRequestImpl.cpp: (WebCore::RTCStatsRequestImpl::createResponse): (WebCore): (WebCore::RTCStatsRequestImpl::requestSucceeded): * Modules/mediastream/RTCStatsRequestImpl.h: (RTCStatsRequestImpl): * Modules/mediastream/RTCStatsResponse.cpp: (WebCore::RTCStatsResponse::create): (WebCore::RTCStatsResponse::addReport): (WebCore): (WebCore::RTCStatsResponse::addElement): (WebCore::RTCStatsResponse::addStatistic): * Modules/mediastream/RTCStatsResponse.h: (RTCStatsResponse): * WebCore.gypi: * platform/chromium/support/WebRTCStatsRequest.cpp: (WebKit::WebRTCStatsRequest::response): (WebKit): (WebKit::WebRTCStatsRequest::requestSucceeded): * platform/chromium/support/WebRTCStatsResponse.cpp: Added. (WebKit): (WebKit::WebRTCStatsResponse::WebRTCStatsResponse): (WebKit::WebRTCStatsResponse::assign): (WebKit::WebRTCStatsResponse::reset): (WebKit::WebRTCStatsResponse::operator WTF::PassRefPtr): (WebKit::WebRTCStatsResponse::addReport): (WebKit::WebRTCStatsResponse::addElement): (WebKit::WebRTCStatsResponse::addStatistic): * platform/mediastream/RTCStatsRequest.h: (WebCore): (RTCStatsRequest): * platform/mediastream/RTCStatsResponseBase.h: Added. (WebCore): (RTCStatsResponseBase): (WebCore::RTCStatsResponseBase::~RTCStatsResponseBase): 2012-10-02 Carlos Garcia Campos [GTK] Add API to get the web view that initiated a custom URI request to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=97895 Reviewed by Martin Robinson. * platform/network/NetworkingContext.h: (NetworkingContext): Add initiatingPageID(). * platform/network/ResourceHandle.h: (ResourceHandle): Add static method getSoupRequestInitiaingPageID(). * platform/network/ResourceHandleInternal.h: (ResourceHandleInternal): Add initiatingPageID(). * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandleInternal::initiatingPageID): Get the initiating page ID of the resource handle networking context. (WebCore::setSoupRequestInitiaingPageID): Helper function to attach a page ID to a SoupRequest. (WebCore::startHTTPRequest): Call setSoupRequestInitiaingPageID() to attch the initiating page ID to the SoupRequest. (WebCore::startNonHTTPRequest): Ditto. (WebCore::ResourceHandle::getSoupRequestInitiaingPageID): Static method to get the page ID attached to a SoupRequest. 2012-10-03 Kent Tamura Introduce DateComponents::minimumYear and maximumYear https://bugs.webkit.org/show_bug.cgi?id=98230 Reviewed by Kentaro Hara. Share same difinitions in DateComponents.cpp and DateTimeFieldElements.cpp. No new tests. This doesn't change any bahevior. * platform/DateComponents.h: (WebCore::DateComponents::minimumYear): Moved from DateComponents.cpp. (WebCore::DateComponents::maximumYear): ditto. * platform/DateComponents.cpp: (WebCore): Move out static minimumYear and maximumYear. (WebCore::DateComponents::parseYear): Use DateCompnents::minimumYear and/or maximumYear. (WebCore::withinHTMLDateLimits): ditto. (WebCore::DateComponents::parseWeek): ditto. (WebCore::DateComponents::setMonthsSinceEpoch): ditto. (WebCore::DateComponents::setMillisecondsSinceEpochForWeek): ditto. * html/shadow/DateTimeFieldElements.cpp: (WebCore): Remove minimumYear and maximumYear. (WebCore::DateTimeYearFieldElement::DateTimeYearFieldElement): Use DateComponents::minimumYear and maximumYear. 2012-10-02 Arko Saha Microdata: itemprop names must not override builtin properties. https://bugs.webkit.org/show_bug.cgi?id=98025 Reviewed by Kentaro Hara. We should look in the prototype for functions before assuming it as an item's name. Return false if the prototype of the object has a property (function) with propertyName. Named properties Spec: http://dev.w3.org/2006/webapi/WebIDL/#idl-named-properties Named property visibility algorithm: http://dev.w3.org/2006/webapi/WebIDL/#indexed-and-named-properties ... 7. If the result of calling the [[HasProperty]] internal method on prototype with property name P is true, then return false. ... Also [OverrideBuiltins] is not declared for any of the properties, hence no overriding is allowed in this case. Test: fast/dom/MicroData/itemprop-names-override-builtin-properties.html * bindings/scripts/CodeGeneratorJS.pm: (GenerateGetOwnPropertySlotBody): (GenerateGetOwnPropertyDescriptorBody): 2012-10-02 Keishi Hattori REGRESSION (r129738): Suggestion picker label is placed in the wrong location https://bugs.webkit.org/show_bug.cgi?id=98094 Reviewed by Kent Tamura. We needed to reverse padding-left/right when rtl. No new tests. Covered by date-suggestion-picker-appearance.html. * Resources/pagepopups/suggestionPicker.css: (.suggestion-list-entry .label): (.rtl .suggestion-list-entry .label): 2012-10-02 Yury Semikhatsky Provide memory instrumentation for HashCountedSet https://bugs.webkit.org/show_bug.cgi?id=98138 Reviewed by Pavel Feldman. Replaced addHashCountedSet calls with addMember that now automatically detects HashCountedSet and calls appropriate routine. * css/CSSImageGeneratorValue.cpp: (WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage): * loader/cache/CachedResource.cpp: 2012-10-02 Nandor Huszka Buildfix after r130235. Reviewed by Csaba Osztrogonác. systemAllowsMultisamplingOnATICards was deleted from GraphicsContext3D, but function body remained in GraphicsContext3DOpenGLES. Delete method body. * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp: 2012-10-02 Kent Tamura Fix assertion failures on Chromium Debug bots for datetime/datetime-local input types. * html/shadow/DateTimeFieldElements.cpp: If a placeholder stirng is empty, use a sequence of "-". (WebCore::DateTimeDayFieldElement::create): (WebCore::DateTimeMonthFieldElement::create): (WebCore::DateTimeYearFieldElement::create): 2012-10-02 MORITA Hajime https://bugs.webkit.org/show_bug.cgi?id=98134 [Refactoring] StyleResolver::matchScopedAuthorRules() could be simpler. Reviewed by Dimitri Glazkov. matchScopedAuthorRules() did have some optimization which only makes sense for heavily nested shadow tree. However, we don't see such type of usage of Shadow DOM and this looks premature optimization. This change unified its triple for loop into one, which makes the code much simpler. No new tests. Covered by existing tests. * css/StyleResolver.cpp: (WebCore::StyleResolver::matchScopedAuthorRules): 2012-10-02 Kent Tamura Introduce Localizer::dateTimeFormatWithSecond and dateTimeFormatWithoutSecond https://bugs.webkit.org/show_bug.cgi?id=98229 Reviewed by Kentaro Hara. Unify identical code in DateTimeInputType and DateTimeLocalInputType as Localizer member functions. They still have some common code. We'll address it later. No new tests. This doesn't change any behavior. * platform/text/Localizer.h: (Localizer): Add dateTimeFormatWithSecond and dateTimeFormatWithoutSecond. * platform/text/Localizer.cpp: (WebCore::Localizer::dateTimeFormatWithSecond): Implemented. Just concatenating dateFormat, a space, and timeFormat. (WebCore::Localizer::dateTimeFormatWithoutSecond): Implemented. Just concatenating dateFormat, a space, and shortTimeFormat. * html/DateTimeInputType.cpp: (WebCore::DateTimeInputType::setupLayoutParameters): Use dateTimeFormatWithSecond and dateTimeFormatWithoutSecond. * html/DateTimeLocalInputType.cpp: (WebCore::DateTimeLocalInputType::setupLayoutParameters): ditto. 2012-10-03 Kent Tamura Refactoring: DateTimeEditBuilder had better hold LayoutParameters https://bugs.webkit.org/show_bug.cgi?id=98228 Reviewed by Kentaro Hara. Stop copying multiple members of LayoutParameters in DateTimeEditBuilder constructor. This change improves code size and runtime cost. No new tests. This doesn't change user-visible behavior. * html/shadow/DateTimeEditElement.cpp: (DateTimeEditBuilder): Add a comment about lifetime of objects. (WebCore::DateTimeEditBuilder::stepRange): Added. A helper to access m_parameters.stepRange. (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Remove m_stepRange, m_localizer, m_placeholderFor* members. Add m_parameters. (WebCore::DateTimeEditBuilder::needMillisecondField): Use stepRange() instead of m_stepRange. (WebCore::DateTimeEditBuilder::visitField): Use m_parameters.placeholderFor*. (WebCore::DateTimeEditBuilder::shouldMillisecondFieldReadOnly): Use stepRange() instead of m_stepRange. (WebCore::DateTimeEditBuilder::shouldMinuteFieldReadOnly): ditto. (WebCore::DateTimeEditBuilder::shouldSecondFieldReadOnly): ditto. 2012-10-02 Kent Tamura Implement LocaleICU::dateFormat https://bugs.webkit.org/show_bug.cgi?id=98118 Reviewed by Hajime Morita. http://trac.webkit.org/changeset/130127 introduced Localizer::dateFormat, and this is its implementation for LocaleICU classs. The code is going to be used when ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled. No new tests. The function is not used yet. * platform/text/LocaleICU.cpp: (WebCore::LocaleICU::dateFormat): Implemented. Note that m_shortDateFormat is a UDateFormat object, which knows various format information. * platform/text/LocaleICU.h: (LocaleICU): Add m_dateFormat to cache the format string. 2012-10-02 Kent Tamura [Mac][Chromium-Mac] Implement LocaleMac::dateFormat https://bugs.webkit.org/show_bug.cgi?id=98116 Reviewed by Hajime Morita. http://trac.webkit.org/changeset/130127 introduced Localizer::dateFormat, and this is its implementation for LocaleICU classs. The code is going to be used when ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled. No new tests. The function is not used yet. * platform/text/mac/LocaleMac.h: (LocaleMac): Declare m_dateFormat. * platform/text/mac/LocaleMac.mm: (WebCore::LocaleMac::dateFormat): Implemented. 2012-10-02 Kent Tamura [Chromium-Win] Implement LocaleWin::dateFormat https://bugs.webkit.org/show_bug.cgi?id=98117 Reviewed by Kentaro Hara. http://trac.webkit.org/changeset/130127 introduced Localizer::dateFormat, and this is its implementation for LocaleICU classs. The code is going to be used when ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled. Tests: Added a new test to WebKit/chromium/tests/LocaleWinTest.cpp. * platform/text/LocaleWin.cpp: (WebCore::parseDateFormat): Fix a continuous apostrophes parsing bug; "abc''''def" produced "abc'''def" (WebCore::appendAsLDMLLiteral): A helper function to make a literal string for LDML. (WebCore::convertWindowsDateFormatToLDML): Creates an LDML format from a parsed date format tokens. (WebCore::LocaleWin::dateFormat): Implemented. This uses convertWindowsDateFormatToLDML. (WebCore::LocaleWin::dateFormat): Added for testing. The source windows format is specified as a function argument. * platform/text/LocaleWin.h: (LocaleWin): Declare m_dateFormat and dateFormat(). 2012-10-02 Ian Vollick [chromium] Fix spelling of isNVIDIA override in Extensions3DChromium https://bugs.webkit.org/show_bug.cgi?id=98219 Reviewed by Dean Jackson. The override in Extensions3dChromium should have been spelled isNVIDIA, not isNVidia. No new tests. No change in functionality. * platform/graphics/chromium/Extensions3DChromium.h: (WebCore::Extensions3DChromium::isNVIDIA): 2012-10-02 Anders Carlsson Try to fix the Snow Leopard build. * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: 2012-10-02 Joshua Bell Add htons/htonl definitions and implementations https://bugs.webkit.org/show_bug.cgi?id=98054 Reviewed by Darin Adler. Update users of htons and friends to use new wtf/ByteOrder.h header. No new tests - just refactoring. * platform/graphics/WOFFFileFormat.cpp: * platform/graphics/chromium/VDMXParser.cpp: == Rolled over to ChangeLog-2012-10-02 ==