blob: e164445e00bdf6118fe80ee5e26d2995d1c101ee [file] [log] [blame]
2013-08-16 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!)
Reviewed by Geoff Garen.
Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
It now also returns a reference, as it can never be null.
Removed 8.8 million lines of null-checking as a result.
2013-08-16 Ryosuke Niwa <rniwa@webkit.org>
<https://webkit.org/b/119536> Refactor highestEditableRoot to avoid a redundant call to rendererIsEditable
Reviewed by Benjamin Poulain.
Refactor highestEditableRoot to avoid an extra tree walk. We now walk up the ancestor chain up to
the first root editable element exactly once.
* dom/Node.cpp:
(WebCore::Node::rendererIsEditable): Change the order of conditions to make the evaluation faster
when we don't have to check RenderStyle's value.
* editing/htmlediting.cpp:
(WebCore::highestEditableRoot):
2013-08-16 Benjamin Poulain <benjamin@webkit.org>
Remove a useless #include of SelectorChecker.h
Rubber-stamped by Ryosuke Niwa.
* dom/DocumentStyleSheetCollection.cpp:
2013-08-16 Brent Fulgham <bfulgham@apple.com>
[Windows] Update RenderMediaControls for new API
https://bugs.webkit.org/show_bug.cgi?id=119910
Reviewed by Eric Carlson.
* rendering/RenderMediaControls.cpp: Update calls to WebKitSystemInterface for
the changed API.
2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
<https://webkit.org/b/119912> Fix WebKit build error when SVG is disabled(broken since r154174)
Reviewed by Simon Fraser.
No new tests required, just a build fix.
Since r154174 CSS keywords alpha and luminance used by -webkit-mask-source-type. Move those
keywords from SVGCSSValueKeywords.in to CSSValueKeywords.in.
* css/CSSValueKeywords.in:
* css/SVGCSSValueKeywords.in:
2013-08-16 Arunprasad Rajkumar <arurajku@cisco.com>
<https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore
Reviewed by Alexey Proskuryakov.
WTF::currentTime() is prone to DST changes and NTP adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.
* Modules/filesystem/FileWriter.cpp:
(WebCore::FileWriter::didWrite):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::elapsedTime):
(WebCore::Document::resetLastHandledUserGestureTimestamp):
* dom/Element.cpp:
(WebCore::Element::setActive):
* fileapi/FileReader.cpp:
(WebCore::FileReader::didReceiveData):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::startProgressEventTimer):
(WebCore::HTMLMediaElement::progressEventTimerFired):
(WebCore::HTMLMediaElement::refreshCachedTime):
(WebCore::HTMLMediaElement::invalidateCachedTime):
(WebCore::HTMLMediaElement::currentTime):
(WebCore::HTMLMediaElement::startPlaybackProgressTimer):
(WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
* html/HTMLMediaElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::documentHadRecentUserGesture):
* html/MediaController.cpp:
(MediaController::scheduleTimeupdateEvent):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpPendingSpeculations):
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
* inspector/InspectorCSSAgent.cpp:
(WebCore::SelectorProfile::SelectorProfile):
(WebCore::SelectorProfile::totalMatchingTimeMs):
(WebCore::SelectorProfile::startSelector):
(WebCore::SelectorProfile::commitSelector):
(WebCore::SelectorProfile::commitSelectorTime):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::willProcessTask):
(WebCore::InspectorProfilerAgent::didProcessTask):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::timestamp):
* inspector/TimelineTraceEventProcessor.cpp:
(WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
* page/FrameView.cpp:
(WebCore::FrameView::adjustedDeferredRepaintDelay):
(WebCore::FrameView::paintContents):
* platform/ClockGeneric.cpp:
(ClockGeneric::now):
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::scroll):
(WebCore::ScrollAnimatorNone::animationTimerFired):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::flushContextIfNecessary):
(WebCore::ImageBuffer::flushContext):
(WebCore::ImageBuffer::copyNativeImage):
2013-08-16 peavo@outlook.com <peavo@outlook.com>
<https://webkit.org/b/119891> [WinCairo] Compile error.
Reviewed by Brent Fulgham.
* rendering/FlowThreadController.cpp: Need USE(ACCELERATED_COMPOSITING) guard.
* rendering/FlowThreadController.h: Need USE(ACCELERATED_COMPOSITING) guard.
2013-08-16 Zan Dobersek <zdobersek@igalia.com>
<https://webkit.org/b/119887> [Soup] The testing NetworkStorageSession should have a proper SoupSession
Reviewed by Martin Robinson.
After r154144, a testing NetworkStorageSession is enforced when running the layout tests
through WebKitTestRunner. Ports using the Soup networking backend don't assign any SoupSession
objects to such NetworkStorageSession objects as it's usually the case. This is causing problems
as the ResourceHandleInternal uses the SoupSession that's provided by the NetworkingContext's
NetworkStorageSession, which ends up being null if the testing-specific NetworkStorageSession is used.
As a result, all the layout tests are crashing under WKTR.
* platform/network/NetworkStorageSession.h: Make the SoupSession member a GRefPtr.
(WebCore::NetworkStorageSession::soupSession): Return the GRefPtr's pointer.
* platform/network/ResourceHandle.h: Declare the new createTestingSession method.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookieJarForSession): Instead of returning the default SoupCookieJar when there's no SoupSession
provided by the NetworkStorageSession, assert that there now always is one, and return the session's cookie
jar. For testing NetworkStorageSession objects, their SoupSession objects will always use the default cookie jar.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession): Adopt the given SoupSession reference pointer.
(WebCore::NetworkStorageSession::switchToNewTestingSession): Use a newly-created, testing-specific SoupSession.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::createTestingSession): Define the new createTestingSession method. It creates a new
SoupSession through createSoupSession, but uses the default SoupCookieJar, as provided by WebCore::soupCookieJar.
2013-08-16 Pratik Solanki <psolanki@apple.com>
<https://webkit.org/b/119852> Frame::scriptController() should return a reference
Reviewed by Andreas Kling.
m_script is never NULL so we can just return a reference. Also remove some pointless null
checks as a result of doing this.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::toJS):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::toJS):
(WebCore::toJSDOMWindowShell):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
* bindings/js/ScriptEventListener.cpp:
(WebCore::createAttributeEventListener):
(WebCore::eventListenerHandlerScriptState):
* bindings/js/ScriptState.cpp:
(WebCore::mainWorldScriptState):
(WebCore::scriptStateFromNode):
(WebCore::scriptStateFromPage):
* bindings/objc/DOM.mm:
(-[DOMNode JSC::Bindings::]):
* bindings/objc/DOMInternal.mm:
(-[WebScriptObject _initializeScriptDOMNodeImp]):
* dom/Document.cpp:
(WebCore::Document::disableEval):
(WebCore::Document::ensurePlugInsInjectedScript):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::executeScript):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createRenderer):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::controls):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::getInstance):
(WebCore::HTMLPlugInElement::getNPObject):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::didClearWindowObjectInWorld):
* inspector/InspectorClient.cpp:
(WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
(WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::evaluateInOverlay):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getScriptExecutionStatus):
(WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::urlSelected):
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::cancelAndClear):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
(WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestFrame):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
* page/EventSource.cpp:
(WebCore::EventSource::create):
* page/Frame.cpp:
(WebCore::Frame::willDetachPage):
* page/Frame.h:
(WebCore::Frame::script):
* page/Navigator.cpp:
(WebCore::shouldHideFourDot):
* page/Page.cpp:
(WebCore::Page::setDebugger):
* platform/graphics/wince/MediaPlayerProxy.cpp:
(WebCore::WebMediaPlayerProxy::pluginInstance):
(WebCore::WebMediaPlayerProxy::invokeMethod):
* plugins/PluginView.cpp:
(WebCore::PluginView::~PluginView):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::load):
(WebCore::PluginView::bindingInstance):
(WebCore::PluginView::getValue):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::platformGetValue):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open):
* xml/XMLTreeViewer.cpp:
(WebCore::XMLTreeViewer::transformDocumentToTreeView):
2013-08-16 Andreas Kling <akling@apple.com>
Attempt to fix the Qt/MountainLion build after r154142.
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):
2013-08-16 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Kerning in fast font path breaks letter-spacing
https://bugs.webkit.org/show_bug.cgi?id=119838
Reviewed by Jocelyn Turcotte.
Mark fonts with both kerning and letter-spacing as unsupported by the simple font-path.
Test: fast/text/letter-spacing-kerned.html
* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::supportsTypesettingFeatures):
2013-08-16 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119893> FrameView::frame() should return a reference.
Reviewed by Antti Koivisto.
FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
Leave it alone instead, and update the assertion that depended on this behavior.
This enables us to make FrameView::frame() return a Frame&, exposing a ton of
unnecessary null checks.
* history/CachedFrame.cpp:
(WebCore::CachedFrame::destroy):
Remove call to FrameView::clearFrame() that was the only way to get a null
FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
the FrameView would get destroyed anyway.
(WebCore::CachedFrame::clear):
Update an assertion to support the case where the Document's Frame pointer has
been cleared out and CachedFrame is still clinging to the FrameView.
* history/CachedPage.h:
Made CachedPage::destroy() private as it was only called by ~CachedPage().
* /:
Frame* FrameView::frame() => Frame& FrameView::frame()
2013-08-16 Brady Eidson <beidson@apple.com>
(NetworkProcess) Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
https://bugs.webkit.org/show_bug.cgi?id=119493
Reviewed by Alexey Proskuryakov.
No new tests (Covered by plenty of existing tests).
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/network/SynchronousLoaderClient.h: Make platformBadResponseError public
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::platformLoadResourceSynchronously): Add comments/FIXMEs spelling out how wrong this code is.
2013-08-16 peavo@outlook.com <peavo@outlook.com>
<https://webkit.org/b/119889> [WinCairo] Compile error.
Reviewed by Brent Fulgham.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath): Use correct function name.
2013-08-16 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r154165.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Copy html/shadow header files
to WebKit include location.
2013-08-15 Brent Fulgham <bfulgham@apple.com>
[Windows] Prevent dangling CACFLayer when switching to/from Tiled backing.
https://bugs.webkit.org/show_bug.cgi?id=119818
Reviewed by Darin Adler.
Covered by existing: compositing/tiling/empty-to-tiled.html
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::~PlatformCALayer): Remove deleted layer from its
parent layer
2013-08-16 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119866> Frame::eventHandler() should return a reference.
Reviewed by Anders Carlsson.
Frame::m_eventHandler is never null.
2013-08-16 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153749.
http://trac.webkit.org/changeset/153749
https://bugs.webkit.org/show_bug.cgi?id=119892
The bison generation of the glslang* files has now been fixed. (Requested by zdobersek on #webkit).
* GNUmakefile.am:
2013-08-16 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
[GTK] fixing localizedString method name
https://bugs.webkit.org/show_bug.cgi?id=119884
The method name defined in LocalizedStringsGtk.cpp doesn't not match
the one used in LocalizedStrings.h
Reviewed by Gustavo Noronha Silva.
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackOffMenuItemText):
2013-08-16 Andrei Parvu <parvu@adobe.com>
[CSS Masking] Add -webkit-mask-source-type property, with auto, alpha and luminance values
https://bugs.webkit.org/show_bug.cgi?id=119614
Added the -webkit-mask-source-type property, which can have a value of auto, alpha or
luminance. The default value is auto. This patch contains only the parsing of the property,
not the actual implementation of the types of masks. The parsing of mask-source-type in the
-webkit-mask property will be handled in a separate patch.
Reviewed by Dirk Schulze.
Test: fast/masking/parsing-mask-source-type.html
* css/CSSComputedStyleDeclaration.cpp: Added case for CSSPropertyWebkitMaskType.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp: Parsed the values for CSSPropertyWebkitMaskType.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillProperty):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in: Added -webkit-mask-type property.
* css/CSSToStyleMap.cpp: map the provided mask type to the FillLayer class.
(WebCore::CSSToStyleMap::mapFillMaskType):
* css/CSSToStyleMap.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/FillLayer.cpp: Added the m_maskType property to the FillLayer class.
(WebCore::FillLayer::FillLayer):
(WebCore::FillLayer::operator=):
(WebCore::FillLayer::operator==):
* rendering/style/FillLayer.h: Added methods for working with m_maskType.
(WebCore::FillLayer::maskType):
(WebCore::FillLayer::isMaskTypeSet):
(WebCore::FillLayer::setMaskType):
(WebCore::FillLayer::clearMaskType):
(WebCore::FillLayer::initialMaskType):
* rendering/style/RenderStyleConstants.h: Added the EMaskSourceType enum.
2013-08-16 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
<https://webkit.org/b/119885> [CMake] Always build our generated versions of ANGLE's glslang.cpp and glslang_tab.cpp
Reviewed by Gyuyoung Kim.
Now that r154109 has landed, all Bison versions (at least from 2.3 up
to the latest 3.0) should be able to generate versions of glslang* that
build correctly.
Since the idea is to remove the prebuilt files from future imports of
ANGLE, always building our own versions is a good idea, and allows us
to get rid of some very ugly CMake checks.
* CMakeLists.txt: Always build glslang.cpp and glslang_tab.cpp from
DERIVED_SOURCES_WEBCORE_DIR.
2013-08-16 Julien Brianceau <jbrianceau@nds.com>
<https://webkit.org/b/119880> [Qt] Build fix (broken since r154142).
Reviewed by Gyuyoung Kim.
Since r154142, Frame::loader() is a reference (and not a pointer anymore).
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseStartElement):
2013-08-16 Przemyslaw Szymanski <p.szymanski3@samsung.com>
[WebGL] Vertex attribute binding validation method
https://bugs.webkit.org/show_bug.cgi?id=119515
This patch refactors WebGLRenderingContext code by moving the vertex
attribute binding validation to a separate method. It is now
possible to use that validation in other parts of the code. The
code is more clear now.
Reviewed by Christophe Dumez.
No new tests. Covered by existing tests. No behaviour changed.
LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/gl-drawelements.html
LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-elements-out-of-bounds.html
LayoutTests/webgl/resources/webgl_test_files/conformance/rendering/draw-arrays-out-of-bounds.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes):
* html/canvas/WebGLVertexArrayObjectOES.h:
(WebCore::WebGLVertexArrayObjectOES::VertexAttribState::isBound):
(WebCore::WebGLVertexArrayObjectOES::VertexAttribState::validateBinding):
2013-08-15 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared
Reviewed by Andreas Kling.
Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that
want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
traversing through.
This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
now always null in the root node.
ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::pushParentShadowRoot):
(WebCore::StyleResolver::popParentShadowRoot):
* dom/Attr.cpp:
(WebCore::Attr::createTextChild):
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::insertBeforeCommon):
(WebCore::ContainerNode::removeBetween):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
* dom/ContainerNodeAlgorithms.h:
(WebCore::appendChildToContainer):
(WebCore::Private::addChildNodesToDeletionQueue):
* dom/Document.h:
(WebCore::Node::Node):
* dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot):
* dom/ElementRareData.h:
(WebCore::ElementRareData::releasePseudoElement):
* dom/EventPathWalker.cpp:
(WebCore::EventPathWalker::moveToParent):
* dom/EventRetargeter.cpp:
(WebCore::determineDispatchBehavior):
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
* dom/Node.cpp:
(WebCore::Node::shadowHost):
(WebCore::Node::deprecatedShadowAncestorNode):
(WebCore::Node::parentOrShadowHostElement):
* dom/Node.h:
(WebCore::Node::hasTreeSharedParent):
Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
(WebCore::Node::setParentNode):
(WebCore::Node::parentNode):
(WebCore::Node::parentNodeGuaranteedHostFree):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::PseudoElement):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::setInnerHTML):
(WebCore::ShadowRoot::setApplyAuthorStyles):
(WebCore::ShadowRoot::setResetStyleInheritance):
* dom/ShadowRoot.h:
Rename host() -> hostElement() for clarity.
(WebCore::Node::parentOrShadowHostNode):
* dom/Text.cpp:
(WebCore::isSVGShadowText):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedElement):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ensureDistribution):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
(WebCore::InsertionPoint::parseAttribute):
* page/DragController.cpp:
(WebCore::asFileInput):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::instanceAssociatedWithShadowTreeElement):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::owner):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasLineIfEmpty):
* rendering/RenderLayer.cpp:
(WebCore::rendererForScrollbar):
* svg/SVGElementInstance.h:
(WebCore::SVGElementInstance::setParentNode):
Renamed so it works with appendChildToContainer template.
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
2013-08-13 Darin Adler <darin@apple.com>
[iOS] Get iOS port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116412
Reviewed by Daniel Bates.
* dom/Clipboard.h: Turn off legacy style clipboard for iOS.
Next patch will be able to remove legacy style entirely!
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Attach the frame to the
pasteboard directly explicitly. This is a layering violation, but
is needed until we change how iOS pasteboard communicates with the
host to use platform strategies instead of the editor client.
* editing/ios/EditorIOS.mm: Removed Editor::newGeneralClipboard and
the include of ClipboardIOS.h.
* platform/Pasteboard.h: Added the setFrame function (iOS-only) and
frame and change count data members.
* platform/ios/ClipboardIOS.h: Emptied out. Later we can remove this.
* platform/ios/ClipboardIOS.mm: Ditto.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::Pasteboard): Initialize m_frame to zero.
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::writePasteboard): Added. Empty function, like
writeClipboard. Eventually need to remove or implement this.
(WebCore::Pasteboard::setFrame): Added. Sets frame and change count.
(WebCore::Pasteboard::hasData): Moved here from ClipboardIOS.
(WebCore::utiTypeFromCocoaType): Ditto.
(WebCore::cocoaTypeFromHTMLClipboardType): Ditto.
(WebCore::Pasteboard::clear): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.
* WebCore.exp.in: Move Clipboard destructor from Mac-only section to
common section shared by Mac and iOS.
2013-08-15 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Unreviewed build fix after r154142 and r154144.
* platform/efl/ErrorsEfl.cpp: Follow the changes of r154142.
(WebCore::printError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
2013-08-15 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Add support for shape-outside image values
https://bugs.webkit.org/show_bug.cgi?id=119809
Added minimal support for shape-outside image values. A new method that computes
the excluded intervals for a horizontal line segment was added to the RasterIntervals
class. The stub RasterShape getExcludedIntervals() method has been replaced by
one that uses the new method.
Image shapes are represented by a RasterIntervals object, which just encapsulates a
Region object. The new getExcludedIntervals() method computes the excluded intervals
for a horizontal line segment between y1 and y2. To find the excluded intervals we
vertically expand each of the image shape Region's rectangles that fall within the line
segment, so that they begin at y1 and have height = y2 - y1. The union of the expanded
rectangles produces a new Region whose horizontal projection defines the excluded intervals.
Reviewed by Alexandru Chiculita.
Tests: fast/shapes/shape-outside-floats/shape-outside-floats-image-001.html
fast/shapes/shape-outside-floats/shape-outside-floats-image-002.html
* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::getExcludedIntervals): See above.
(WebCore::RasterShape::getExcludedIntervals): Stub method has been replaced by one that uses RasterShapeIntervals::getExcludedIntervals().
* rendering/shapes/RasterShape.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor): Enable Image valued shapes.
2013-08-15 Simon Fraser <simon.fraser@apple.com>
<https://webkit.org/b/119871> Flash of garbage pixels when playing a show on Hulu
Reviewed by Tim Horton.
When starting a show on Hulu, there's a layer that gets marked as
opaque because it has a child RenderLayer whose background fills the
compositing layer. That child RenderLayer was recently position:fixed
but outside the viewport, so its viewportConstrainedNotCompositedReason
was set to a non-zero value.
However, we failed to clear the viewportConstrainedNotCompositedReason
when the layer became non-fixed. This caused painting the opaque
layer to bail in RenderLayer::paintLayer(), leaving garbage.
Test: compositing/contents-opaque/fixed-to-nonfixed.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayer): Add an assertion to catch this error in future.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking): Make sure we clear the
ViewportConstrainedNotCompositedReason if the layer is no longer fixed.
2013-08-15 Brent Fulgham <bfulgham@apple.com>
[Windows] Consolidate WebKit Bundle Handling
https://bugs.webkit.org/show_bug.cgi?id=119869
Reviewed by Tim Horton.
* WebCore.vcxproj/WebCore.vcxproj: Add new WebCoreBundleWin files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath): Use correct bundle handling logic.
* platform/win/LocalizedStringsWin.cpp: Move bundle implementation to
new WebCoreBundleWin.cpp file.
* platform/win/WebCoreBundleWin.cpp: Added.
(WebCore::createWebKitBundle):
(WebCore::webKitBundle):
* platform/win/WebCoreBundleWin.h: Added.
2013-08-15 Anders Carlsson <andersca@apple.com>
<https://webkit.org/b/119859> Frame::loader() should return a reference
Reviewed by Andreas Kling.
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::willOpenSocketStream):
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::canExecuteScripts):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScript):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::updateTitle):
(WebCore::Document::open):
(WebCore::Document::explicitClose):
(WebCore::Document::implicitClose):
(WebCore::Document::userAgent):
(WebCore::Document::canNavigate):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::referrer):
(WebCore::Document::documentDidResumeFromPageCache):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::finishedParsing):
(WebCore::Document::addIconURL):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::loader):
(WebCore::Document::decrementActiveParserCount):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::open):
(WebCore::CachedFrame::destroy):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
(WebCore::PageCache::canCache):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::prepareForSubmission):
(WebCore::HTMLFormElement::submit):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::openURL):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::insertedInto):
(WebCore::HTMLFrameSetElement::removedFrom):
* html/HTMLHtmlElement.cpp:
(WebCore::HTMLHtmlElement::insertedByParser):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createRenderer):
(WebCore::HTMLMediaElement::attach):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::getPluginProxyParams):
(WebCore::HTMLMediaElement::createMediaPlayerProxy):
(WebCore::HTMLMediaElement::updateWidget):
(WebCore::HTMLMediaElement::mediaPlayerReferrer):
(WebCore::HTMLMediaElement::mediaPlayerUserAgent):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::isImageType):
(WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::setDisplayMode):
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
(WebCore::ImageDocumentParser::finish):
(WebCore::ImageDocument::createDocumentStructure):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocumentParser::appendBytes):
(WebCore::PluginDocument::detach):
(WebCore::PluginDocument::cancelManualPluginLoad):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
(WebCore::WebGLRenderingContext::loseContextImpl):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
(WebCore::HTMLConstructionSite::insertHTMLBodyElement):
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::generateViolationReport):
(WebCore::XSSAuditorDelegate::didBlockScript):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::mainResourceContent):
(WebCore::InspectorPageAgent::reload):
(WebCore::InspectorPageAgent::navigate):
(WebCore::allResourcesURLsForFrame):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::assertDocumentLoader):
(WebCore::InspectorPageAgent::buildObjectForFrame):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFailLoading):
* loader/CookieJar.cpp:
(WebCore::networkingContext):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::frameLoader):
(WebCore::DocumentLoader::document):
(WebCore::DocumentLoader::stopLoading):
(WebCore::DocumentLoader::removeSubresourceLoader):
(WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
(WebCore::DocumentLoader::iconLoadDecisionAvailable):
(WebCore::DocumentLoader::continueIconLoadWithDecision):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):
(WebCore::DocumentWriter::createDocument):
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::~FrameLoader):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::setOpener):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::loadResourceSynchronously):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::isAssociatedToRequestedHistoryItem):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::shouldStopLoadingForHistoryItem):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForBackForwardNavigation):
(WebCore::HistoryController::updateForReload):
(WebCore::HistoryController::updateForStandardLoad):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::updateForSameDocumentNavigation):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):
(WebCore::HistoryController::updateCurrentItem):
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* loader/ImageLoader.cpp:
(WebCore::pageIsBeingDismissed):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::client):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::fire):
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledURLNavigation::didStopTimer):
(WebCore::ScheduledRedirect::shouldStartTimer):
(WebCore::ScheduledRedirect::fire):
(WebCore::ScheduledRefresh::fire):
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
(WebCore::ScheduledFormSubmission::didStopTimer):
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleLocationChange):
(WebCore::NavigationScheduler::scheduleFormSubmission):
(WebCore::NavigationScheduler::scheduleRefresh):
(WebCore::NavigationScheduler::schedule):
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):
(WebCore::PingLoader::PingLoader):
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
(WebCore::PolicyChecker::cancelCheck):
(WebCore::PolicyChecker::stopCheck):
(WebCore::PolicyChecker::cannotShowMIMEType):
(WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
(WebCore::PolicyChecker::continueAfterNavigationPolicy):
(WebCore::PolicyChecker::continueAfterNewWindowPolicy):
(WebCore::PolicyChecker::handleUnimplementablePolicy):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
(WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
(WebCore::ResourceLoadNotifier::willSendRequest):
(WebCore::ResourceLoadNotifier::didFailToLoad):
(WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
(WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::frameLoader):
(WebCore::ResourceLoader::willSendRequest):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::pluginIsLoadable):
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::loadOrRedirectSubframe):
(WebCore::SubframeLoader::loadSubframe):
(WebCore::SubframeLoader::allowPlugins):
(WebCore::SubframeLoader::shouldUsePlugin):
(WebCore::SubframeLoader::loadPlugin):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
(WebCore::ApplicationCacheGroup::update):
(WebCore::ApplicationCacheGroup::createResourceHandle):
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::addEntry):
(WebCore::CallCacheListenerTask::performTask):
(WebCore::ApplicationCacheGroup::postListenerTask):
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::applicationCacheHost):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::addAdditionalRequestHeaders):
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::clientDefersImage):
(WebCore::CachedResourceLoader::cachePolicy):
(WebCore::CachedResourceLoader::loadDone):
* loader/icon/IconController.cpp:
(WebCore::IconController::commitToDatabase):
(WebCore::IconController::startLoader):
(WebCore::IconController::continueLoadWithDecision):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::postMessageTimerFired):
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::print):
(WebCore::DOMWindow::stop):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::opener):
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrameForPageCache):
(WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
(WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
(WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
(WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
* page/DragController.cpp:
(WebCore::DragController::performDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::keyEvent):
* page/Frame.cpp:
(WebCore::Frame::~Frame):
(WebCore::Frame::setView):
(WebCore::Frame::injectUserScripts):
(WebCore::Frame::willDetachPage):
* page/Frame.h:
(WebCore::Frame::loader):
* page/FrameView.cpp:
(WebCore::FrameView::mediaType):
(WebCore::FrameView::setFixedVisibleContentRect):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::scrollTo):
(WebCore::FrameView::shouldSuspendScrollAnimations):
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
(WebCore::FrameView::wheelEvent):
(WebCore::FrameView::firePaintRelatedMilestones):
* page/History.cpp:
(WebCore::History::stateInternal):
(WebCore::History::stateObjectAdded):
* page/Location.cpp:
(WebCore::Location::setLocation):
* page/Navigator.cpp:
(WebCore::Navigator::userAgent):
* page/Page.cpp:
(WebCore::Page::goToItem):
(WebCore::Page::refreshPlugins):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::addRelevantRepaintedObject):
* page/Performance.cpp:
(WebCore::Performance::now):
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::type):
(WebCore::PerformanceNavigation::redirectCount):
* page/PerformanceResourceTiming.cpp:
(WebCore::monotonicTimeToDocumentMilliseconds):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* platform/ios/PasteboardIOS.mm:
(WebCore::documentFragmentWithImageResource):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _loadFromDOMRange]):
* platform/mac/PasteboardMac.mm:
(WebCore::documentFragmentWithImageResource):
(WebCore::documentFragmentWithRTF):
(WebCore::fragmentFromWebArchive):
* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::enabledPlugin):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::~SVGImage):
(WebCore::SVGImage::dataChanged):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::getReferencedFilePaths):
(WebCore::Internals::forceReload):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
(WebCore::XMLDocumentParser::startElementNs):
2013-08-15 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
Reviewed by David Kilzer.
Use the same UUIDs for EditorIOS.mm and the group ios as in the iOS tree
so as to make it straightforward to merge changes to the WebCore Xcode
project file on WebKit.org with changes to the same file in the iOS tree.
* WebCore.xcodeproj/project.pbxproj:
2013-08-15 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r15417.
* DerivedSources.cpp: Remove classes that now live in JSC.
* WebCore.vcxproj/WebCore.vcxproj: Remove classes no longer included in WebCore.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* bindings/js/WebCoreTypedArrayController.cpp: Add explicit namespace to avoid conflict
with Windows 'Unknown' type.
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
2013-08-15 Daniel Bates <dabates@apple.com>
<https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
Reviewed by David Kilzer.
* WebCore.xcodeproj/project.pbxproj:
* editing/ios/EditorIOS.mm: Added.
(WebCore::Editor::newGeneralClipboard):
(WebCore::Editor::showFontPanel):
(WebCore::Editor::showStylesPanel):
(WebCore::Editor::showColorPanel):
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
(WebCore::Editor::insertParagraphSeparatorInQuotedContent):
(WebCore::styleForSelectionStart):
(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):
(WebCore::Editor::removeUnchangeableStyles):
2013-08-15 Dirk Schulze <krit@webkit.org>
Implement CSS Image filter() function
https://bugs.webkit.org/show_bug.cgi?id=119845
Reviewed by Dean Jackson.
The Filter Effects specification defines a new CSS Image function called
filter(). This function takes another CSS Image as well as a filter function
list as input and can be used by various CSS properties.
Example:
background-image: -webkit-filter(url(image.png), brightness(0.5))
This patch implements the current definition of filter() based on other
image generation classes like CSSCrossfadeValue.
A new class called CSSFilterImageValue was added together with an
image observer.
The function is implemented prefixed and behind the compiler flag CSS_FILTERS.
Tests: fast/filter-image/filter-image.html
fast/filter-image/parse-filter-image.html
* CMakeLists.txt: Added new files to build systems.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSAllInOne.cpp:
* css/CSSCrossfadeValue.cpp: Share code together with CSSFilterImageValue
in CSSImageGeneratorValue.cpp.
(WebCore::CSSCrossfadeValue::isPending):
(WebCore::CSSCrossfadeValue::loadSubimages):
* css/CSSFilterImageValue.cpp: Added.
(WebCore::CSSFilterImageValue::~CSSFilterImageValue):
(WebCore::CSSFilterImageValue::customCssText):
(WebCore::CSSFilterImageValue::fixedSize):
(WebCore::CSSFilterImageValue::isPending):
(WebCore::CSSFilterImageValue::knownToBeOpaque):
(WebCore::CSSFilterImageValue::loadSubimages):
(WebCore::CSSFilterImageValue::image):
(WebCore::CSSFilterImageValue::filterImageChanged):
(WebCore::CSSFilterImageValue::createFilterOperations):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::imageChanged):
(WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources):
(WebCore::CSSFilterImageValue::equals):
* css/CSSFilterImageValue.h: Added.
(WebCore::CSSFilterImageValue::create):
(WebCore::CSSFilterImageValue::isFixedSize):
(WebCore::CSSFilterImageValue::CSSFilterImageValue):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::FilterSubimageObserverProxy):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::~FilterSubimageObserverProxy):
(WebCore::CSSFilterImageValue::FilterSubimageObserverProxy::setReady):
* css/CSSImageGeneratorValue.cpp: Shared code between CSSCrossfadeValue and
CSSFilterImageValue.
(WebCore::CSSImageGeneratorValue::image):
(WebCore::CSSImageGeneratorValue::isFixedSize):
(WebCore::CSSImageGeneratorValue::fixedSize):
(WebCore::CSSImageGeneratorValue::isPending):
(WebCore::CSSImageGeneratorValue::knownToBeOpaque):
(WebCore::CSSImageGeneratorValue::loadSubimages):
(WebCore::CSSImageGeneratorValue::subimageIsPending):
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
* css/CSSImageGeneratorValue.h:
* css/CSSParser.cpp: Added parsing information for new image function.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::isGeneratedImageValue):
(WebCore::CSSParser::parseGeneratedImage):
(WebCore::CSSParser::parseFilterImage):
(WebCore::CSSParser::parseFilter):
* css/CSSParser.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::hasFailedOrCanceledSubresources):
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isFilterImageValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::generatedOrPendingFromValue):
(WebCore::StyleResolver::createFilterOperations):
* css/StyleResolver.h: StyleResolver needs to be passed to
CSSFilterImageValue in order to resolve blur() and
drop-shadow() function. Both needs to be resolved together
with all other properties and can't be done earlier or later.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build): Pass an argument whether the
intermediate filter results should be clipped or not. The filter
property for instance doesn't clip but scales the intermediate
image sizes.
* rendering/FilterEffectRenderer.h:
2013-08-15 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix bindings tests after http://trac.webkit.org/changeset/154127
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithArrayParam):
* bindings/scripts/test/JS/JSTestCallback.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjTypedArrayAttr):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionFunc):
* bindings/scripts/test/ObjC/DOMFloat64Array.mm:
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
* bindings/scripts/test/TestTypedArray.idl: Removed.
2013-08-15 Ryosuke Niwa <rniwa@webkit.org>
Qt minimum build fix after r154116.
* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):
2013-08-14 Filip Pizlo <fpizlo@apple.com>
Typed arrays should be rewritten
https://bugs.webkit.org/show_bug.cgi?id=119064
Reviewed by Oliver Hunt.
Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
client of them. There is only one layering violation: WebCore installs a
WebCoreTypedArrayController on VM, which makes the
ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
alive but if ArrayBuffer is kept alive from native code then the
JSArrayByffer may die. WebCoreTypedArrayController will keep the
JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
changed to make most references to wrappers refer to JSObject* rather than
JSDOMWrapper*.
Array buffer views are now transient; the JS array buffer view wrappers
don't own them or keep them alive. This required a bunch of changes to make
bindings code use RefPtr<ArrayBufferView> to hold onto their views.
Also there is a bunch of new code to make JSC-provided array buffers and
views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
Finally, the DataView API is now completely different: the JSDataView
provides the same user-visible JS API but using its own internal magic; the
C++ code that uses DataView now uses a rather different API that is not
aware of usual DOM semantics, since it's in JSC and not WebCore. It's
equally useful for all of WebCore's purposes, but some code had to change
to adapt the new conventions.
Some tests have been changed or rebased due to changes in behavior, that
bring us into conformance with where the standards are going and allow us to
match Firefox behavior.
Automake work and some additional GTK changes courtesy of
Zan Dobersek <zdobersek@igalia.com>.
Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.
* CMakeLists.txt:
* DerivedSources.make:
* ForwardingHeaders/runtime/DataView.h: Added.
* ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
* ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
* ForwardingHeaders/runtime/JSDataView.h: Added.
* ForwardingHeaders/runtime/JSTypedArrays.h: Added.
* ForwardingHeaders/runtime/TypedArrayController.h: Added.
* ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
* ForwardingHeaders/runtime/TypedArrays.h: Added.
* GNUmakefile.list.am:
* Modules/webaudio/RealtimeAnalyser.h:
* Target.pri:
* UseJSC.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/DOMWrapperWorld.h:
* bindings/js/JSArrayBufferCustom.cpp: Removed.
* bindings/js/JSArrayBufferViewHelper.h: Removed.
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSBlobCustom.cpp:
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS):
* bindings/js/JSCryptoCustom.cpp:
(WebCore::JSCrypto::getRandomValues):
* bindings/js/JSDOMBinding.h:
(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):
(WebCore::wrap):
(WebCore::toJS):
(WebCore::toArrayBufferView):
(WebCore::toInt8Array):
(WebCore::toInt16Array):
(WebCore::toInt32Array):
(WebCore::toUint8Array):
(WebCore::toUint8ClampedArray):
(WebCore::toUint16Array):
(WebCore::toUint32Array):
(WebCore::toFloat32Array):
(WebCore::toFloat64Array):
(WebCore::toDataView):
* bindings/js/JSDataViewCustom.cpp: Removed.
* bindings/js/JSDictionary.cpp:
* bindings/js/JSDictionary.h:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
(WebCore::toJS):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::toJS):
* bindings/js/JSHTMLTemplateElementCustom.cpp:
(WebCore::JSHTMLTemplateElement::content):
* bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
* bindings/js/JSInjectedScriptHostCustom.cpp:
* bindings/js/JSMessageEventCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSSVGPathSegCustom.cpp:
(WebCore::toJS):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/WebCoreJSClientData.h:
(WebCore::initNormalWorldClientData):
* bindings/js/WebCoreTypedArrayController.cpp: Added.
(WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::toJS):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/js/WebCoreTypedArrayController.h: Added.
(WebCore::WebCoreTypedArrayController::wrapperOwner):
* bindings/scripts/CodeGenerator.pm:
(ForAllParents):
(ParseInterface):
(SkipIncludeHeader):
(IsTypedArrayType):
(IsWrapperType):
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(GetNativeType):
(JSValueToNative):
(NativeToJSValue):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append):
* fileapi/WebKitBlobBuilder.h:
* html/canvas/ArrayBuffer.idl: Removed.
* html/canvas/ArrayBufferView.idl: Removed.
* html/canvas/DataView.cpp: Removed.
* html/canvas/DataView.h: Removed.
* html/canvas/DataView.idl: Removed.
* html/canvas/Float32Array.idl: Removed.
* html/canvas/Float64Array.idl: Removed.
* html/canvas/Int16Array.idl: Removed.
* html/canvas/Int32Array.idl: Removed.
* html/canvas/Int8Array.idl: Removed.
* html/canvas/Uint16Array.idl: Removed.
* html/canvas/Uint32Array.idl: Removed.
* html/canvas/Uint8Array.idl: Removed.
* html/canvas/Uint8ClampedArray.idl: Removed.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::readPixels):
(WebCore::WebGLRenderingContext::validateTexFuncData):
* page/Crypto.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
(WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
* platform/graphics/filters/FECustomFilter.h:
* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FilterEffect.cpp:
* testing/MockCDM.cpp:
2013-08-15 Chris Fleizach <cfleizach@apple.com>
<https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
Reviewed by Darin Adler.
Incorporate review feedback from Darin.
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::canSetFocusAttribute):
(WebCore::AccessibilityScrollView::isFocused):
* accessibility/AccessibilityScrollView.h:
2013-08-15 Andreas Kling <akling@apple.com>
<https://webkit.org/b/119826> Page::focusController() should return a reference.
Reviewed by Anders Carlsson.
Page::focusController() is never null so make it return a reference.
Some unnecessary checks were removed as a result.
2013-08-15 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
https://bugs.webkit.org/show_bug.cgi?id=116979
Reviewed by Alexey Proskuryakov.
Make constructors private since only ::create should use them.
* html/shadow/MeterShadowElement.h:
* html/shadow/ProgressShadowElement.h:
2013-08-15 Tim Horton <timothy_horton@apple.com>
FrameView should have an isMainFrameView()
https://bugs.webkit.org/show_bug.cgi?id=119435
Reviewed by Simon Fraser.
No new tests, just refactoring.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::isMainFrameView):
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::createScrollbar):
(WebCore::FrameView::applyOverflowToViewport):
(WebCore::FrameView::setHeaderHeight):
(WebCore::FrameView::setFooterHeight):
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
(WebCore::FrameView::pagination):
(WebCore::FrameView::visibleContentScaleFactor):
(WebCore::FrameView::setVisibleScrollerThumbRect):
(WebCore::FrameView::scrollbarStyleChanged):
(WebCore::FrameView::paintScrollCorner):
(WebCore::FrameView::paintScrollbar):
(WebCore::FrameView::paintOverhangAreas):
* page/FrameView.h:
Add isMainFrameView and adopt it wherever we were previously checking if
the FrameView's frame was the same as its page's main frame.
2013-08-15 Andy Estes <aestes@apple.com>
<https://webkit.org/b/119853> REGRESSION (r139343): WebKit crashes when canceling a load inside webView:resource:didFinishLoadingFromDataSource:
Reviewed by Brady Eidson.
A client implementing webView:resource:didFinishLoadingFromDataSource:
might decide to call stopLoading: for the identifier that just finished
loading. If this happens we re-enter the loader and attempt to cancel a
load that has already finished and been removed from the set of active
loaders. Prevent this by clearing DocumentLoader's
m_identifierForLoadWithoutResourceLoader before calling
dispatchDidFinishLoading().
New API test: WebKit1.StopLoadingFromDidFinishLoading.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading): Set
m_identifierForLoadWithoutResourceLoader to 0 before calling
dispatchDidFinishLoading().
2013-08-15 Eric Carlson <eric.carlson@apple.com>
[Mac] Remove "legacy" media UI
https://bugs.webkit.org/show_bug.cgi?id=119752
Reviewed by Jer Noble.
* WebCore.exp.in: Remove _wkMediaControllerThemeAvailable.
* platform/mac/WebCoreSystemInterface.h: Update for API change.
* platform/mac/WebCoreSystemInterface.mm: Ditto.
* rendering/RenderThemeMac.h: Don't override hasOwnDisabledStateHandlingFor.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustMediaSliderThumbSize): Remove code to deal with legacy theme.
(WebCore::getUnzoomedRectAndAdjustCurrentContext): Ditto.
(WebCore::RenderThemeMac::paintMediaFullscreenButton): wkDrawMediaUIPart doesn't need to know
the current theme.
(WebCore::RenderThemeMac::paintMediaMuteButton): Ditto.
(WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto.
(WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto.
(WebCore::RenderThemeMac::paintMediaRewindButton): Ditto.
(WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton): Ditto.
(WebCore::RenderThemeMac::paintMediaControlsBackground): Ditto.
(WebCore::RenderThemeMac::paintMediaCurrentTime): Ditto.
(WebCore::RenderThemeMac::paintMediaTimeRemaining): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderContainer): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaVolumeSliderThumb): Ditto.
(WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack): Ditto.
(WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb): Ditto.
(WebCore::RenderThemeMac::extraMediaControlsStyleSheet): We only have one theme.
(WebCore::RenderThemeMac::extraFullScreenStyleSheet): Ditto.
(WebCore::RenderThemeMac::usesMediaControlStatusDisplay): Ditto.
2013-08-15 Antti Koivisto <antti@apple.com>
<https://webkit.org/b/119834> Remove ElementShadow
Reviewed by Anders Carlsson.
It is 1:1 with ShadowRoot and has virtually no functionality. What little there is can be moved to ShadowRoot or Element.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::locateCousinList):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
(WebCore::StyleScopeResolver::matchHostRules):
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::nodeCanBeDistributed):
(WebCore::ComposedShadowTreeWalker::traverseChild):
* dom/ContainerNode.cpp:
(WebCore::childAttachedAllowedWhenAttachingChildren):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
(WebCore::assertConnectedSubrameCountIsConsistent):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildFrameDisconnector::collectFrameOwners):
* dom/DOMAllInOne.cpp:
* dom/Document.cpp:
* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::shadowRoot):
(WebCore::Element::didAffectSelector):
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot):
Move addShadowRoot and removeShadowRoot here from ElementShadow.
(WebCore::Element::createShadowRoot):
(WebCore::Element::authorShadowRoot):
(WebCore::Element::userAgentShadowRoot):
(WebCore::Element::ensureUserAgentShadowRoot):
(WebCore::Element::childrenChanged):
(WebCore::Element::removeAllEventListeners):
* dom/Element.h:
(WebCore::isShadowHost):
* dom/ElementRareData.h:
(WebCore::ElementRareData::clearShadowRoot):
(WebCore::ElementRareData::shadowRoot):
(WebCore::ElementRareData::setShadowRoot):
(WebCore::ElementRareData::~ElementRareData):
* dom/ElementShadow.cpp: Removed.
* dom/ElementShadow.h: Removed.
* dom/EventDispatcher.cpp:
* dom/EventPathWalker.cpp:
(WebCore::EventPathWalker::moveToParent):
* dom/Node.cpp:
(WebCore::Node::needsShadowTreeWalkerSlow):
* dom/NodeRenderingContext.cpp:
* dom/NodeRenderingContext.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::attach):
(WebCore::ShadowRoot::detach):
Move attached() tests from ElementShadow.
(WebCore::ShadowRoot::childrenChanged):
(WebCore::ShadowRoot::removeAllEventListeners):
Move here from ElementShadow.
* dom/ShadowRoot.h:
(WebCore::Node::shadowRoot):
* dom/TreeScopeAdopter.cpp:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::createShadowSubtree):
* html/FileInputType.cpp:
(WebCore::FileInputType::createShadowSubtree):
(WebCore::FileInputType::disabledAttributeChanged):
(WebCore::FileInputType::multipleAttributeChanged):
* html/HTMLFormControlElement.cpp:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::canStartSelection):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* html/HTMLKeygenElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLTextAreaElement.cpp:
* html/InputType.cpp:
* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::createShadowSubtree):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::createShadowSubtree):
* html/ValidationMessage.cpp:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::ensureDistribution):
* html/shadow/ContentDistributor.h:
(WebCore::ContentDistributor::isValid):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::childrenChanged):
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
(WebCore::resolveReprojection):
* html/shadow/InsertionPoint.h:
(WebCore::shadowRootOfParentForDistribution):
* html/shadow/SliderThumbElement.cpp:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::unbind):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::uploadButton):
* rendering/RenderTheme.cpp:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::updateReferencedText):
(WebCore::SVGTRefElement::detachTarget):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearResourceReferences):
(WebCore::SVGUseElement::buildShadowAndInstanceTree):
(WebCore::SVGUseElement::buildShadowTree):
* testing/Internals.cpp:
(WebCore::Internals::ensureShadowRoot):
(WebCore::Internals::shadowRoot):
2013-08-15 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=118532
Reviewed by Jocelyn Turcotte.
We don't need to allocate FontPlatformData on the heap
since getCachedFontData makes a deep copy anyway.
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
2013-08-15 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: !m_adoptionIsRequired in void WebCore::TreeShared<NodeType>::ref()
https://bugs.webkit.org/show_bug.cgi?id=116979
Reviewed by Antti Koivisto.
Make sure adoptRef is called before calling setPseudo, for all progress shadow elements.
* html/shadow/ProgressShadowElement.cpp:
(WebCore::ProgressInnerElement::ProgressInnerElement):
(WebCore::ProgressBarElement::ProgressBarElement):
(WebCore::ProgressValueElement::ProgressValueElement):
* html/shadow/ProgressShadowElement.h:
(WebCore::ProgressInnerElement::create):
(WebCore::ProgressBarElement::create):
(WebCore::ProgressValueElement::create):
2013-08-14 Ryuan Choi <ryuan.choi@samsung.com>
<https://webkit.org/b/119786> [EFL] decoration of search type is different from other platforms
Reviewed by Gyuyoung Kim.
Other platforms except EFL port draw a magnifying icon for
-webkit-search-results-button and -webkit-search-results-decoration in search field,
but Efl port draws it for -webkit-search-decoration.
This patch makes Efl port draw icon in first two cases like other ports.
Tests: fast/css/input-search-padding.html
fast/css/text-input-with-webkit-border-radius.html
fast/css/text-overflow-input.html
fast/forms/box-shadow-override.html
fast/forms/control-restrict-line-height.html
fast/forms/input-appearance-height.html
fast/forms/placeholder-position.html
fast/forms/placeholder-pseudo-style.html
fast/forms/search-cancel-button-style-sharing.html
fast/forms/search-display-none-cancel-button.html
fast/forms/search-rtl.html
fast/forms/search-vertical-alignment.html
fast/forms/searchfield-heights.html
fast/repaint/search-field-cancel.html
* platform/efl/DefaultTheme/widget/search/cancel/search_cancel.edc:
Moved results_button alias to search_decoration.edc
* platform/efl/DefaultTheme/widget/search/decoration/search_decoration.edc:
* platform/efl/RenderThemeEfl.cpp:
Updated size of ResultsButtonStyle and ResultsDecorationStyle to show icon.
In addition, removed adjustSearchFieldResultsButtonStyle and paintSearchFieldDecoration.
(WebCore::toEdjeGroup): Removed decoration group.
(WebCore::RenderThemeEfl::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeEfl::adjustSearchFieldResultsDecorationStyle):
* platform/efl/RenderThemeEfl.h:
2013-08-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CSS] Introduce new structure to pass image orientation values.
https://bugs.webkit.org/show_bug.cgi?id=119418
Reviewed by Beth Dakin.
Add a ImageOrientationDescription struct in order to reduce count of argument for
image orientation.
No new tests, no behavior change.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
* page/DragController.cpp:
(WebCore::DragController::doImageDrag):
* page/Frame.cpp:
(WebCore::Frame::nodeImage):
(WebCore::Frame::dragImageForSelection):
* platform/DragImage.h:
* platform/blackberry/DragImageBlackBerry.cpp:
(WebCore::createDragImageFromImage):
* platform/efl/DragImageEfl.cpp:
(WebCore::createDragImageFromImage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::updateSize):
* platform/graphics/BitmapImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImage):
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.cpp:
(WebCore::Image::draw):
* platform/graphics/Image.h:
* platform/graphics/ImageOrientation.h:
(WebCore::ImageOrientationDescription::ImageOrientationDescription):
(WebCore::ImageOrientationDescription::respectImageOrientation):
(WebCore::ImageOrientationDescription::imageOrientation):
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::size):
(WebCore::ImageSource::frameSizeAtIndex):
* platform/graphics/ImageSource.h:
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::size):
(WebCore::ImageSource::frameBytesAtIndex):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/wince/ImageBufferWinCE.cpp:
(WebCore::ImageBuffer::draw):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::Clipboard::createDragImage):
* platform/gtk/DragImageGtk.cpp:
(WebCore::createDragImageFromImage):
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* platform/qt/ClipboardQt.cpp:
(WebCore::Clipboard::createDragImage):
* platform/qt/DragImageQt.cpp:
(WebCore::createDragImageFromImage):
* platform/win/ClipboardWin.cpp:
(WebCore::Clipboard::createDragImage):
* platform/win/DragImageCGWin.cpp:
(WebCore::createDragImageFromImage):
* platform/win/DragImageCairoWin.cpp:
(WebCore::createDragImageFromImage):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::paintSnapshotImage):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot):
2013-08-14 Sam Weinig <sam@webkit.org>
Update binding test results. Follow up fix for <https://webkit.org/b/119664>
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::JSTestCallback):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2013-08-14 Joseph Pecoraro <pecoraro@apple.com>
<https://webkit.org/b/119810> [Mac] No AutoreleasePool leaks when dragging image out of WebView
Reviewed by Dan Bernstein.
This code was just running a block of code asynchronously using a
pthread. Convert this to use a dispatch block, which does provide
an autorelease pool so there are no leaks and ends up much simpler.
* platform/mac/FileSystemMac.mm:
(WebCore::setMetadataURL):
2013-08-14 Tim Horton <timothy_horton@apple.com>
Un-inline dataLog dumpers for IntSize and IntPoint
https://bugs.webkit.org/show_bug.cgi?id=119697
Reviewed by Sam Weinig.
Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/IntPoint.cpp: Added.
(WebCore::IntPoint::dump):
* platform/graphics/IntPoint.h:
* platform/graphics/IntSize.cpp: Added.
(WebCore::IntSize::dump):
* platform/graphics/IntSize.h:
2013-08-14 Chris Fleizach <cfleizach@apple.com>
<https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
Reviewed by Tim Horton.
VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls.
We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.
There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.
* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::canSetFocusAttribute):
(WebCore::AccessibilityScrollView::isFocused):
(WebCore::AccessibilityScrollView::setFocused):
* accessibility/AccessibilityScrollView.h:
2013-08-14 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Minimal support for using an image to define a shape
https://bugs.webkit.org/show_bug.cgi?id=116643
Reviewed by Alexandru Chiculita.
This is a first small step towards supporting CSS shapes defined by an
image URL and a alpha channel threshold. To keep the patch as small as
possible, there are many limitations and remaining work items. For
example images are currently restricted to same-origin, although CORS
should be supported. See https://bugs.webkit.org/show_bug.cgi?id=116348
for the current list.
Test: fast/exclusions/shape-inside/shape-inside-image-001.html
Test: fast/exclusions/shape-inside/shape-inside-image-002.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::imageChanged): When the image has finished loading, request a layout.
* rendering/RenderBlock.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Add notify clients for shape images.
(WebCore::RenderObject::updateShapeImage):
(WebCore::removeShapeImageClient):
(WebCore::RenderObject::arenaDelete): Remove notify clients for shape images.
* rendering/RenderObject.h:
* rendering/shapes/RasterShape.cpp: Added. A Shape defined by thresholding an image's alpha channel.
(WebCore::RasterShapeIntervals::bounds):
(WebCore::RasterShapeIntervals::addInterval): Add a single run to the shape.
(WebCore::alignedRect):
(WebCore::RasterShapeIntervals::getIntervals): Return the shape's runs that fall within a horizonal box.
(WebCore::RasterShape::marginIntervals): Internal representation of the shape with shape-margin factored in. Currently only a stub.
(WebCore::RasterShape::paddingIntervals): Internal representation of the shape with shape-padding factored in. Currently only a stub.
(WebCore::RasterShape::getExcludedIntervals):
(WebCore::RasterShape::getIncludedIntervals):
(WebCore::RasterShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals): Internal run length encoded representation of a RasterShape.
(WebCore::RasterShapeIntervals::isEmpty):
(WebCore::RasterShape::RasterShape):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): Support for creating a Shape based on a RasterShapeIntervals object.
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape): Added support for the Image ShapeValue type.
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::isEnabledFor): Added support for the Image ShapeValue type.
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::isImageValid): True if the shape's image is ready to be be processed.
2013-08-14 Alexandru Chiculita <achicu@adobe.com>
[CSS Regions] RenderRegions should have a RenderLayer+Backing when they contain a Composited RenderLayer
https://bugs.webkit.org/show_bug.cgi?id=117365
Reviewed by David Hyatt.
After the RenderFlowThread has a new layout we need to check if any of the children layers
had been moved to a new render region. We are only checking for the first level of layers,
as they are the only ones supported right now. Also, added code to make Regions require a layer
based on the layers that fit in their clipping area.
Tests: fast/regions/layers/dynamic-layer-added-with-no-layout.html
fast/regions/layers/dynamic-layer-removed-with-no-layout.html
fast/regions/layers/float-region-promoted-to-layer.html
fast/regions/layers/regions-promoted-to-layers-horizontal-bt.html
fast/regions/layers/regions-promoted-to-layers-vertical-lr.html
fast/regions/layers/regions-promoted-to-layers-vertical-rl.html
fast/regions/layers/regions-promoted-to-layers.html
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::updateRenderFlowThreadLayersIfNeeded): Iterate on all the flow threads and updateLayerToRegionMappings if needed.
* rendering/FlowThreadController.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateLocalFloatingObjectsForPaintingContainer): Checks if the FloatingObject
needs to be painted by the current block or not.
(WebCore::RenderBlock::updateFloatingObjectsPaintingContainer): Helper function to lookup what is the right
container that would need to paint a FloatingObject.
(WebCore::RenderBlock::updateAllDescendantsFloatingObjectsPaintingContainer):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outermostBlockContainingFloatingObject): Looks up the ancestor RenderBlock that contains all
the FloatingObjects of a float.
(WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists): Extracted the code for outermostBlockContainingFloatingObject
into its own method.
(WebCore::RenderBox::updatePaintingContainerForFloatingObject): Helper method to update the "m_shouldPaint" flag
of all the FloatingObjects created for a floating RenderObject. Normally, that flag is maintained during layout,
but we need to patch it for the floating RenderRegions after the layout is already finished.
(WebCore::RenderBox::updateLayerIfNeeded): Overwrite of the RenderLayerModelObject::updateLayerIfNeeded that is also
calling updatePaintingContainerForFloatingObject if a new layer was created or destroyed.
* rendering/RenderBox.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout): Added code to call updateLayerToRegionMappings when needed.
(WebCore::RenderFlowThread::regionForCompositedLayer): Looks up the first RenderRegion to display a specific layer.
It only cares about the top most point of the element and ignores transforms.
(WebCore::RenderFlowThread::updateRegionForRenderLayer): Helper method to update the mapped region of a layer.
(WebCore::RenderFlowThread::updateLayerToRegionMappings): Iterates all the first level layers of the flow thread
and updates the region. Will return true if there was any change.
* rendering/RenderFlowThread.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::dirtyZOrderLists): When new layers are added or removed we need to update the layer map in the flow thread.
(WebCore::RenderLayer::dirtyNormalFlowList):
(WebCore::RenderLayer::shouldBeNormalFlowOnly): CSS Regions might become layers because they contain RenderLayers,
but they should not become stacking contexts for that reason. This will prevent the RenderRegions from rendering
in front of other layers.
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers): Call updateRenderFlowThreadLayersIfNeeded when there's a layer hierarchy update.
(WebCore::RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded): Update the render flow thread layer maps when they are dirty.
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayer.h:
(WebCore::RenderLayer::isDirtyRenderFlowThread): Used to check if the RenderLayers had changed their order,
so that we can update the list of layers associated with a region. In a following patch we will need to
rebuild the composited layers.
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::updateLayerIfNeeded): Adds or removes a layer when the "requiresLayer" changes
after the styleDidChange already happened. This is needed for Regions as we only know if they still require a layer,
only after the content of the flow thread is computed.
* rendering/RenderLayerModelObject.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::setRequiresLayerForCompositing):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::requiresLayer):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeRenderRegionList): Updated the output to print the fact that the layer has a layer.
2013-08-14 Bem Jones-Bey <bjonesbe@adobe.com>
Finish making FloatingObject a real class with private members
https://bugs.webkit.org/show_bug.cgi?id=119807
This is a port from Blink of
http://src.chromium.org/viewvc/blink?view=revision&revision=155964
Original patch by Eric Seidel.
From his comments on the Blink change:
Previously FloatingObject was in a half-done state where it had
accessors for many members, but also many members were public.
This CL makes all members private and adds the necessary remaining
accessors.
Reviewed by David Hyatt.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::deleteLineBoxTree):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::paintFloats):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::removeFloatingObject):
(WebCore::RenderBlock::removeFloatingObjectsBelow):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::clearFloats):
(WebCore::RenderBlock::addOverhangingFloats):
(WebCore::RenderBlock::addIntrudingFloats):
(WebCore::RenderBlock::hitTestFloats):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObject::paginationStrut):
(WebCore::RenderBlock::FloatingObject::setPaginationStrut):
(WebCore::RenderBlock::FloatingObject::setRenderer):
(WebCore::RenderBlock::FloatingObject::originatingLine):
(WebCore::RenderBlock::FloatingObject::setOriginatingLine):
(WebCore::RenderBlock::FloatingObjectHashFunctions::hash):
(WebCore::RenderBlock::FloatingObjectHashFunctions::equal):
(WebCore::RenderBlock::FloatingObjectHashTranslator::equal):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::appendFloatingObjectToLastLine):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::determineStartPosition):
(WebCore::RenderBlock::positionNewFloatOnLine):
2013-08-14 Rob Buis <rwlbuis@webkit.org>
Assertion failure in RenderObject::drawLineForBoxSide
https://bugs.webkit.org/show_bug.cgi?id=108187
Reviewed by David Hyatt.
Don't draw the outline if the rectangle to draw is empty.
Test: fast/css/outline-negative.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::paintOutlineForLine):
2013-08-13 Chris Fleizach <cfleizach@apple.com>
AX: Headings not longer have an AXTitle if they have a link as the only child
https://bugs.webkit.org/show_bug.cgi?id=119699
Reviewed by Anders Carlsson.
Normally, focusable content is not incuded when looking at the visible text of an element.
One case where we need an exception is with headings, where there is usually link content inside the heading
that we want to be used as the visible text.
Test: accessibility/heading-title-includes-links.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::shouldUseAccessiblityObjectInnerText):
(WebCore::AccessibilityNodeObject::title):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
(WebCore::AccessibilityObject::textUnderElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):
* accessibility/AccessibilityRenderObject.h:
2013-08-14 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move id attribute to parent Element interface
https://bugs.webkit.org/show_bug.cgi?id=119706
Reviewed by Ryosuke Niwa.
Move id attribute from SVGElement / HTMLElement to their Element parent
interface to match the latest DOM specification and avoid duplication:
http://dom.spec.whatwg.org/#dom-element-id
There is no web-exposed behavior change because we haven't moved
properties from instances to their prototype, as per the Web IDL
specification (http://dev.w3.org/2006/webapi/WebIDL/#es-attributes).
Firefox already exposes the id property of Element's prototype.
This patch also drops the comment about returning the empty string when
no id is present (introduced in http://trac.webkit.org/changeset/4417).
This comment is redundant since the id property is already marked to
"reflect" the id attribute. Returning the empty string when the
attribute is not present is the normal behavior when reflecting:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#reflect
No new test, no web-exposed behavior change.
* dom/Element.idl:
* html/HTMLElement.idl:
* svg/SVGElement.idl:
2013-08-14 Arpita Bahuguna <a.bah@samsung.com>
createAttribute/setAttributeNode does not properly normalize case
https://bugs.webkit.org/show_bug.cgi?id=90341
Reviewed by Darin Adler.
setAttributeNode() verifies for existing attributes in a case sensitive
manner. Thus, it would add another attribute if specified in a case
different from the existing one. Instead, like setAttribute(), it too
should modify the existing attribute's value.
Tests: fast/dom/Element/setAttributeNode-case-insensitivity-xhtml.xhtml
fast/dom/Element/setAttributeNode-case-insensitivity.html
* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
Passing the second param (shouldIgnoreAttributeCase) to
findAttributeIndexByNameForAttributeNode() method. We are now letting
findAttributeIndexByNameForAttributeNode() handle the case-sensitive/insensitive
checking.
(WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
* dom/Element.h:
Added shouldIgnoreAttributeCase boolean param to the method. It passes
this on to QualifiedName::matchesIgnoringCaseForLocalName() method.
* dom/QualifiedName.h:
(WebCore::QualifiedName::matchesIgnoringCaseForLocalName):
New method added for doing a case-insensitive comparison based on the
shouldIgnoreCase param passed to this method.
2013-08-14 Gabor Abraham <abrhm@inf.u-szeged.hu>
[CMake] Fix building with bison-3.0.
https://bugs.webkit.org/show_bug.cgi?id=119788
Reviewed by Zoltan Herczeg.
No new tests, just build fix.
* CMakeLists.txt:
2013-08-14 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: resultAnimationElement->m_animatedType in WebCore::SVGAnimateElement::calculateAnimatedValue
https://bugs.webkit.org/show_bug.cgi?id=119748
Reviewed by Dirk Schulze.
Avoid animation when attributeType="CSS" is used on an animateTransform.
Tests: svg/animations/animateTransform-translate-attributetype-auto.html
svg/animations/animateTransform-translate-invalid-attributetype.html
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::hasValidAttributeType):
2013-08-14 Antti Koivisto <antti@apple.com>
Try to fix Qt build.
Not reviewed.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::parseProcessingInstruction):
(WebCore::XMLDocumentParser::parseCdata):
(WebCore::XMLDocumentParser::parseComment):
2013-08-13 Antti Koivisto <antti@apple.com>
Remove Node::attach() and ContainerNode::attach()
https://bugs.webkit.org/show_bug.cgi?id=119698
Reviewed by Andreas Kling.
Currently attach() is a virtual function on Node. However only Elements have style and so a corresponding
independent render object. Attaching should be made Element level concept.
This patch merges Node::attach() and ContainerNode::attach() to Element::attach(). Other related functions
(detach(), reattach(), etc) move similarly.
Next step here is to make attach non-virtual in common case and move it out from the DOM tree.
* dom/ContainerNode.cpp:
(WebCore::attachChild):
(WebCore::detachChild):
Temporary helpers. Further refactoring should get rid of these.
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::removeBetween):
(WebCore::updateTreeAfterInsertion):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::attach):
(WebCore::Document::detach):
Copy the relevant parts of the code from base class attach/detach here. It is not much.
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::~Element):
Node destructor no longer detaches.
(WebCore::Element::attachChildren):
(WebCore::Element::attach):
Combine Node::attach(), ContainerNode::attach() and Element::attach().
(WebCore::Element::detachChildren):
(WebCore::Element::detach):
Combine Node::detach(), ContainerNode::detach() and Element::detach().
(WebCore::Element::reattach):
(WebCore::Element::reattachIfAttached):
(WebCore::Element::lazyReattach):
(WebCore::Element::lazyAttach):
This stuff moves from ContainerNode/Node.
* dom/Element.h:
(WebCore::Element::AttachContext::AttachContext):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::removeShadowRoot):
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::detach):
* dom/ElementShadow.h:
* dom/Node.cpp:
(WebCore::Node::~Node):
Assert that we are not attached at this point.
(WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
* dom/Node.h:
(WebCore::Node::setAttached):
(WebCore::Node::setStyleChange):
Make available.
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
* dom/NodeRenderingContext.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::attach):
(WebCore::ShadowRoot::detach):
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::~Text):
Node destructor no longer detaches. Add destructor.
(WebCore::Text::createTextRenderersForSiblingsAfterAttachIfNeeded):
Factor the code that updates sibling text renderers after attach into a function.
(WebCore::Text::attachText):
(WebCore::Text::detachText):
Text::attachText/detachText replace virtual Node::attach/detach. They do the part of the work text nodes actually ended up doing.
(WebCore::Text::updateTextRenderer):
* dom/Text.h:
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::addText):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::detach):
* html/PluginDocument.h:
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeTask):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::invalidateDistribution):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::attach):
* loader/PlaceholderDocument.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveLocal):
(WebCore::Style::updateTextStyle):
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::exitText):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::processingInstruction):
(WebCore::XMLDocumentParser::cdataBlock):
(WebCore::XMLDocumentParser::comment):
No need to attach non-rendered nodes.
2013-08-14 Allan Sandfeld Jensen <allan.jensen@digia.com>
ASSERT(m_frame->view() == this) fails
https://bugs.webkit.org/show_bug.cgi?id=119015
Reviewed by Simon Fraser.
Introduced the method fixedLayoutSizeChanged and made it chack if the view
is attached to the frame before issuing contentsResized.
* page/FrameView.cpp:
(WebCore::FrameView::fixedLayoutSizeChanged):
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::setFixedLayoutSize):
(WebCore::ScrollView::setUseFixedLayout):
(WebCore::ScrollView::fixedLayoutSizeChanged):
* platform/ScrollView.h:
2013-08-13 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Align our grid-line handling with the updated specification
https://bugs.webkit.org/show_bug.cgi?id=113546
Reviewed by Andreas Kling.
From Blink r148091 by <jchaffraix@chromium.org>
This change makes us match the updated specification by making
grid line numbers to always resolve against the
grid-{column|row}-start edge (the previous code would resolve
grid-{column|row}-end grid lines against the grid-{column|row}-end
edge).
To keep feature parity, negative numbers resolve against the
grid-{column|row}-end edge of the 'explicit grid'.
Test: fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html
* rendering/RenderGrid.cpp:
(WebCore::estimatedGridSizeForPosition):
(WebCore::RenderGrid::explicitGridColumnCount): New utility function.
(WebCore::RenderGrid::explicitGridRowCount): Ditto.
(WebCore::RenderGrid::maximumIndexInDirection): Use explicitGridXXXCount().
(WebCore::RenderGrid::resolveGridPositionsFromStyle): Check that row-end > row-start.
(WebCore::RenderGrid::resolveGridPositionFromStyle): Clamp negative values to the first line.
* rendering/RenderGrid.h:
* rendering/style/GridPosition.h:
2013-08-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toSVGTextPathElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=119783
Reviewed by Ryosuke Niwa.
As a step to clean-up static_cast<SVGXXX>, static_cast<SVGTextPathElement*> can
be changed with toSVGTextPathElement().
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::layoutPath):
(WebCore::RenderSVGTextPath::startOffset):
(WebCore::RenderSVGTextPath::exactAlignment):
(WebCore::RenderSVGTextPath::stretchMethod):
* svg/SVGTextPathElement.h:
(WebCore::toSVGTextPathElement):
2013-08-14 Jinwoo Jeong <jw00.jeong@samsung.com>
FEComponentTransfer could be faster.
https://bugs.webkit.org/show_bug.cgi?id=119671
Reviewed by Christophe Dumez.
Use direct writing to target data instead of calling Uint8ClampedArray::set() function.
This change reduces at least 80% time in the loop of that function.
The Uint8ClampedArray::set() function has index checking code, value checking code and value casting code.
But the index is managed by for loop condition, the value is generated by transferFunction.
And the value is already defined as unsigned char.
Thus all works in Uint8ClampedArray::set() function is redundant.
Removing the call to Uint8ClampedArray::set() function does not reduce stability but improves performance.
* platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::FEComponentTransfer::platformApplySoftware):
2013-08-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
The length of scheme is at least five characters even when the scheme has 'web+' prefix
https://bugs.webkit.org/show_bug.cgi?id=119779
Reviewed by Ryosuke Niwa.
The content-scheme handler specification requires that it is SecurityError if the length of
scheme isn't five characters at least, including 'web+' prefix. Thus, we need to check the length
of scheme on the 'web+' scheme.
Spec: http://www.whatwg.org/specs/web-apps/current-work/#custom-handlers
No new tests, just modify existing tests.
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::verifyProtocolHandlerScheme):
2013-08-13 Filip Pizlo <fpizlo@apple.com>
Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
https://bugs.webkit.org/show_bug.cgi?id=119770
Reviewed by Mark Hahnenberg.
No new tests because no new behavior.
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromValue):
* bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildren):
* bindings/js/JSAudioTrackCustom.cpp:
(WebCore::JSAudioTrack::visitChildren):
* bindings/js/JSAudioTrackListCustom.cpp:
(WebCore::JSAudioTrackList::visitChildren):
* bindings/js/JSBlobCustom.cpp:
(WebCore::JSBlobConstructor::constructJSBlob):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildren):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildren):
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::toHTMLCanvasStyle):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildren):
* bindings/js/JSDOMBinding.cpp:
(WebCore::valueToDate):
* bindings/js/JSDOMBinding.h:
(WebCore::DOMConstructorObject::createStructure):
(WebCore::getDOMStructure):
(WebCore::toRefPtrNativeArray):
(WebCore::getStaticValueSlotEntryWithoutCaching):
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::toHTMLFormElement):
(WebCore::JSDOMFormData::append):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::finishCreation):
(WebCore::JSDOMGlobalObject::scriptExecutionContext):
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::JSDOMGlobalObject::info):
(WebCore::JSDOMGlobalObject::createStructure):
(WebCore::getDOMConstructor):
* bindings/js/JSDOMStringListCustom.cpp:
(WebCore::toDOMStringList):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::toJSDOMWindow):
* bindings/js/JSDOMWindowBase.h:
(WebCore::JSDOMWindowBase::createStructure):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildren):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
(WebCore::toDOMWindow):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::finishCreation):
* bindings/js/JSDOMWindowShell.h:
(WebCore::JSDOMWindowShell::createStructure):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::toEventTarget):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertySlotDelegate):
(WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::finishCreation):
* bindings/js/JSImageConstructor.h:
(WebCore::JSImageConstructor::createStructure):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::isHTMLAllCollection):
(WebCore::JSInjectedScriptHost::type):
(WebCore::JSInjectedScriptHost::functionDetails):
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertySlotDelegate):
(WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
(WebCore::JSLocation::putDelegate):
* bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildren):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildren):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::pushEventHandlerScope):
(WebCore::JSNode::visitChildren):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildren):
(WebCore::toNodeFilter):
* bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildren):
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
(WebCore::pluginElementCustomGetOwnPropertyDescriptor):
* bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildren):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildren):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildren):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::JSTextTrackCue::visitChildren):
* bindings/js/JSTextTrackCustom.cpp:
(WebCore::JSTextTrack::visitChildren):
* bindings/js/JSTextTrackListCustom.cpp:
(WebCore::JSTextTrackList::visitChildren):
* bindings/js/JSTrackCustom.cpp:
(WebCore::toTrack):
* bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildren):
* bindings/js/JSVideoTrackCustom.cpp:
(WebCore::JSVideoTrack::visitChildren):
* bindings/js/JSVideoTrackListCustom.cpp:
(WebCore::JSVideoTrackList::visitChildren):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildren):
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::finishCreation):
(WebCore::toJSDedicatedWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope):
* bindings/js/JSWorkerGlobalScopeBase.h:
(WebCore::JSWorkerGlobalScopeBase::createStructure):
* bindings/js/JSWorkerGlobalScopeCustom.cpp:
(WebCore::JSWorkerGlobalScope::visitChildren):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildren):
(WebCore::JSXMLHttpRequest::send):
* bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildren):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::dispatchDidPause):
* bindings/js/ScriptState.cpp:
(WebCore::domWindowFromScriptState):
(WebCore::scriptExecutionContextFromScriptState):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::isArray):
(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::serialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readArrayBufferView):
* bindings/objc/DOM.mm:
(+[DOMNode _nodeFromJSWrapper:]):
* bindings/objc/DOMUtility.mm:
(JSC::createDOMWrapper):
* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:JSC::originRootObject:rootObject:]):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GenerateHeader):
(GenerateParametersCheckExpression):
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64ArrayConstructor::finishCreation):
(WebCore::JSFloat64Array::finishCreation):
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertyDescriptor):
(WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
(WebCore::JSFloat64Array::put):
(WebCore::JSFloat64Array::putByIndex):
(WebCore::JSFloat64Array::getOwnPropertyNames):
(WebCore::jsFloat64ArrayPrototypeFunctionFoo):
(WebCore::jsFloat64ArrayPrototypeFunctionSet):
(WebCore::JSFloat64Array::getByIndex):
(WebCore::toFloat64Array):
* bindings/scripts/test/JS/JSFloat64Array.h:
(WebCore::JSFloat64Array::createStructure):
(WebCore::JSFloat64ArrayPrototype::createStructure):
(WebCore::JSFloat64ArrayConstructor::createStructure):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
(WebCore::JSTestActiveDOMObject::finishCreation):
(WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
(WebCore::JSTestActiveDOMObject::getOwnPropertyDescriptor):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
(WebCore::toTestActiveDOMObject):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::createStructure):
(WebCore::JSTestActiveDOMObjectPrototype::createStructure):
(WebCore::JSTestActiveDOMObjectConstructor::createStructure):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
(WebCore::JSTestCustomNamedGetter::finishCreation):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
(WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
(WebCore::toTestCustomNamedGetter):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::createStructure):
(WebCore::JSTestCustomNamedGetterPrototype::createStructure):
(WebCore::JSTestCustomNamedGetterConstructor::createStructure):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::finishCreation):
(WebCore::JSTestEventConstructor::finishCreation):
(WebCore::JSTestEventConstructor::getOwnPropertySlot):
(WebCore::JSTestEventConstructor::getOwnPropertyDescriptor):
(WebCore::toTestEventConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::createStructure):
(WebCore::JSTestEventConstructorPrototype::createStructure):
(WebCore::JSTestEventConstructorConstructor::createStructure):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::finishCreation):
(WebCore::JSTestEventTarget::finishCreation):
(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
(WebCore::JSTestEventTarget::getOwnPropertyNames):
(WebCore::jsTestEventTargetPrototypeFunctionItem):
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
(WebCore::JSTestEventTarget::visitChildren):
(WebCore::JSTestEventTarget::indexGetter):
(WebCore::toTestEventTarget):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::createStructure):
(WebCore::JSTestEventTargetPrototype::createStructure):
(WebCore::JSTestEventTargetConstructor::createStructure):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::finishCreation):
(WebCore::JSTestException::finishCreation):
(WebCore::JSTestException::getOwnPropertySlot):
(WebCore::JSTestException::getOwnPropertyDescriptor):
(WebCore::toTestException):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::createStructure):
(WebCore::JSTestExceptionPrototype::createStructure):
(WebCore::JSTestExceptionConstructor::createStructure):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::finishCreation):
(WebCore::JSTestInterface::finishCreation):
(WebCore::JSTestInterface::getOwnPropertySlot):
(WebCore::JSTestInterface::getOwnPropertyDescriptor):
(WebCore::JSTestInterface::put):
(WebCore::JSTestInterface::putByIndex):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
(WebCore::toTestInterface):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::createStructure):
(WebCore::JSTestInterfacePrototype::createStructure):
(WebCore::JSTestInterfaceConstructor::createStructure):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
(WebCore::JSTestMediaQueryListListener::finishCreation):
(WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
(WebCore::JSTestMediaQueryListListener::getOwnPropertyDescriptor):
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
(WebCore::toTestMediaQueryListListener):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::createStructure):
(WebCore::JSTestMediaQueryListListenerPrototype::createStructure):
(WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::finishCreation):
(WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
(WebCore::JSTestNamedConstructor::finishCreation):
(WebCore::JSTestNamedConstructor::getOwnPropertySlot):
(WebCore::JSTestNamedConstructor::getOwnPropertyDescriptor):
(WebCore::toTestNamedConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::createStructure):
(WebCore::JSTestNamedConstructorPrototype::createStructure):
(WebCore::JSTestNamedConstructorConstructor::createStructure):
(WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::finishCreation):
(WebCore::JSTestNode::finishCreation):
(WebCore::JSTestNode::getOwnPropertySlot):
(WebCore::JSTestNode::getOwnPropertyDescriptor):
(WebCore::JSTestNode::visitChildren):
* bindings/scripts/test/JS/JSTestNode.h:
(WebCore::JSTestNode::createStructure):
(WebCore::JSTestNodePrototype::createStructure):
(WebCore::JSTestNodeConstructor::createStructure):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::finishCreation):
(WebCore::JSTestObj::finishCreation):
(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertyDescriptor):
(WebCore::JSTestObj::put):
(WebCore::jsTestObjPrototypeFunctionVoidMethod):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethod):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethod):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethod):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethod):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
(WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionSerializedValue):
(WebCore::jsTestObjPrototypeFunctionOptionsObject):
(WebCore::jsTestObjPrototypeFunctionMethodWithException):
(WebCore::jsTestObjPrototypeFunctionCustomMethod):
(WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
(WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
(WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
(WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
(WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
(WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
(WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
(WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
(WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionOrange):
(WebCore::jsTestObjPrototypeFunctionStrictFunction):
(WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::JSTestObj::visitChildren):
(WebCore::toTestObj):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::createStructure):
(WebCore::JSTestObjPrototype::createStructure):
(WebCore::JSTestObjConstructor::createStructure):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
(WebCore::JSTestOverloadedConstructors::finishCreation):
(WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
(WebCore::JSTestOverloadedConstructors::getOwnPropertyDescriptor):
(WebCore::toTestOverloadedConstructors):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::createStructure):
(WebCore::JSTestOverloadedConstructorsPrototype::createStructure):
(WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
(WebCore::JSTestSerializedScriptValueInterface::finishCreation):
(WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
(WebCore::JSTestSerializedScriptValueInterface::getOwnPropertyDescriptor):
(WebCore::JSTestSerializedScriptValueInterface::put):
(WebCore::JSTestSerializedScriptValueInterface::visitChildren):
(WebCore::toTestSerializedScriptValueInterface):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::createStructure):
(WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::finishCreation):
(WebCore::JSTestTypedefs::finishCreation):
(WebCore::JSTestTypedefs::getOwnPropertySlot):
(WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
(WebCore::JSTestTypedefs::put):
(WebCore::jsTestTypedefsPrototypeFunctionFunc):
(WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
(WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
(WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
(WebCore::toTestTypedefs):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::createStructure):
(WebCore::JSTestTypedefsPrototype::createStructure):
(WebCore::JSTestTypedefsConstructor::createStructure):
* bridge/c/CRuntimeObject.cpp:
(JSC::Bindings::CRuntimeObject::finishCreation):
* bridge/c/CRuntimeObject.h:
(JSC::Bindings::CRuntimeObject::createStructure):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CRuntimeMethod::createStructure):
(JSC::Bindings::CRuntimeMethod::finishCreation):
(JSC::Bindings::CInstance::invokeMethod):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
* bridge/objc/ObjCRuntimeObject.h:
(JSC::Bindings::ObjCRuntimeObject::createStructure):
* bridge/objc/objc_instance.mm:
(ObjCRuntimeMethod::finishCreation):
(ObjcInstance::invokeMethod):
* bridge/objc/objc_runtime.h:
(JSC::Bindings::ObjcFallbackObjectImp::createStructure):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::finishCreation):
(JSC::Bindings::callObjCFallbackObject):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtRuntimeObject::createStructure):
(JSC::Bindings::QtInstance::getInstance):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::isJSUint8Array):
(JSC::Bindings::isJSArray):
(JSC::Bindings::isJSDate):
(JSC::Bindings::isQtObject):
(JSC::Bindings::unwrapBoxedPrimitive):
(JSC::Bindings::convertQVariantToValue):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::finishCreation):
* bridge/runtime_array.h:
(JSC::RuntimeArray::createStructure):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::finishCreation):
(JSC::callRuntimeMethod):
* bridge/runtime_method.h:
(JSC::RuntimeMethod::createStructure):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::finishCreation):
(JSC::Bindings::callRuntimeObject):
(JSC::Bindings::callRuntimeConstructor):
* bridge/runtime_object.h:
(JSC::Bindings::RuntimeObject::createStructure):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r150187): Safari fails to render allrecipe.com comment popups
https://bugs.webkit.org/show_bug.cgi?id=119780
Reviewed by Benjamin Poulain.
The bug was caused by SelectorDataList::executeFastPathForIdSelector not verifying that
elements found by getAllElementsById are descendents of rootNode when there are multiple
elements of the same id. This resulted in querySelector and querySelectorAll of an element
returning nodes outside of the element.
Fixed the bug by checking this condition when we have multiple elements of the same id.
Test: fast/selectors/querySelector-id-with-multiple-elements-with-same-id.html
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeFastPathForIdSelector):
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Fix orphan needsLayout state in RenderTextControlSingleLine
https://bugs.webkit.org/show_bug.cgi?id=119726
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/c0aec52ef348b2be0c882f8646fe3cf537831f59
We should mark the renderer for containerElement, which wraps innerTextElement and innerBlockElement
in cases of input[type=search] and input[type=number], dirty.
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::setNeedsLayoutOnAncestors):
(WebCore::RenderTextControlSingleLine::layout):
2013-08-13 Sam Weinig <sam@webkit.org>
[Re-land] Cleanup MediaQueryListListener
https://bugs.webkit.org/show_bug.cgi?id=119664
Reviewed by Andreas Kling.
Make MediaQueryListListener a proper WebIDL callback.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Update project files.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
Add support for CallbackNeedsOperatorEqual, which adds an operator==.
* css/MediaAllInOne.cpp:
Remove MediaQueryListListener.cpp.
* css/MediaQueryListListener.cpp:
Removed.
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::~MediaQueryListListener):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
Convert to a proper WebIDL callback.
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
Remove all traces of the ScriptState.
2013-08-13 Dean Jackson <dino@apple.com>
<https://webkit.org/b/119776> Don't use ScriptProfiler to find canvases for instrumentation
Reviewed by Joseph Pecoraro.
InspectorCanvasAgent::findFramesWithUninstrumentedCanvases uses a ScriptProfiler to walk the tree
looking for canvas elements. This is currently not implemented in JSC, but we can do this directly
with DOM methods. We're only looking for Canvas elements that have a context, so there isn't a need
for this abstract walking object.
* html/HTMLCanvasElement.h: Add new helpers to cast to <canvas>.
(WebCore::isHTMLCanvasElement):
(WebCore::toHTMLCanvasElement):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases): Simply walk
the frame tree and use getElementsByTagName to find canvas elements.
* bindings/js/bindings/js/ScriptProfiler.h: Removed unused method.
2013-08-13 Brent Fulgham <bfulgham@apple.com>
[Windows] Windows is incorrectly using a LayerTypeTiledBackingLayer
https://bugs.webkit.org/show_bug.cgi?id=119772
Reviewed by Simon Fraser.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Ensure that we use
the correct (supported) tiled layer type for Windows.
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::PlatformCALayer): Add an assertion to notify us if
we introduce this mistake again in the future.
2013-08-13 Anders Carlsson <andersca@apple.com>
<https://webkit.org/b/119771> Use NeverDestroyed for smart pointer slot static locals
Reviewed by Andreas Kling.
This is preparation for making it a hard error to use DEFINE_STATIC_LOCAL with smart pointer types.
* dom/UserTypingGestureIndicator.cpp:
(WebCore::focusedNode):
* page/mac/EventHandlerMac.mm:
(WebCore::currentNSEventSlot):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::defaultNetworkStorageSession):
(WebCore::cookieStorageOverride):
2013-08-13 Anders Carlsson <andersca@apple.com>
Stop using DEFINE_STATIC_LOCAL with RefPtr
https://bugs.webkit.org/show_bug.cgi?id=119769
Reviewed by Andreas Kling.
No need to waste heap memory allocating RefPtr, just store the raw pointers directly.
* dom/ContextFeatures.cpp:
(WebCore::ContextFeatures::defaultSwitch):
* dom/DocumentMarker.cpp:
(WebCore::DocumentMarkerTextMatch::instanceFor):
* editing/EditingStyle.cpp:
(WebCore::StyleChange::extractTextStyles):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::captionMenuOffItem):
(WebCore::TextTrack::captionMenuAutomaticItem):
* loader/icon/IconDatabase.cpp:
(WebCore::loadDefaultIconRecord):
* platform/graphics/Image.cpp:
(WebCore::Image::nullImage):
* platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrack::captionMenuOffItem):
(WebCore::PlatformTextTrack::captionMenuAutomaticItem):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::initialShapeInside):
* testing/MockCDM.cpp:
(WebCore::initDataPrefix):
(WebCore::keyPrefix):
(WebCore::keyRequest):
2013-08-13 Anders Carlsson <andersca@apple.com>
Stop using DEFINE_STATIC_LOCAL with RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=119765
Reviewed by Jessie Berlin.
No need to waste heap memory allocating RetainPtrs, just store the raw pointers directly.
* platform/graphics/mac/ColorMac.mm:
(WebCore::nsColor):
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::makePatternColor):
(WebCore::GraphicsContext::drawLineForDocumentMarker):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::webFallbackFontFamily):
2013-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153925.
http://trac.webkit.org/changeset/153925
https://bugs.webkit.org/show_bug.cgi?id=119768
broke fast/media/media-query-list-07.html (Requested by kling
on #webkit).
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::JSTestCallback):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
* css/MediaAllInOne.cpp:
* css/MediaQueryListListener.cpp: Copied from Source/WebCore/css/MediaQueryListListener.idl.
(WebCore::MediaQueryListListener::queryChanged):
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::create):
(WebCore::MediaQueryListListener::operator==):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
2013-08-13 Simon Fraser <simon.fraser@apple.com>
Every scroll causes additional layer tree work because of flatteningLayer->removeFromParent();
https://bugs.webkit.org/show_bug.cgi?id=119551
Reviewed by Dean Jackson.
Only re-parent the flattening layer if we had to update our
layer configuration (reparenting is necessary then to get
the correct sibling ordering), or if it was parented in some
other layer.
This avoid unnecessary flushing of state to CA.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
2013-08-13 Robert Hogan <robert@webkit.org>
Section's collapsed borders painted in wrong place in rtl tables
https://bugs.webkit.org/show_bug.cgi?id=119691
Reviewed by Darin Adler.
Table row-groups can be RTL too, so look to the section rather than the
table when deciding the direction of a row. The section will inherit the
table's direction if it doesn't override it.
Test: fast/table/paint-collapsed-borders-rtl-section.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
(WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
NodeList.item() does not behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119722
Reviewed by Darin Adler.
Make NodeList.item() indexed getter behave according to specification:
http://dom.spec.whatwg.org/#nodelist
Namely, we no longer throw if the index is negative (meaning the
[IsIndex] extended attribute is dropped) and the argument is now
mandatory.
This behavior is consistent with both IE10 and Firefox and since
recently Blink.
Test: fast/dom/nodelist-item-parameter.html
* dom/NodeList.idl:
2013-08-13 Anders Carlsson <andersca@apple.com>
Fix build.
* WebCore.exp.in:
2013-08-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSION(SUBPIXEL_LAYOUT) Composited layers can cause one pixel shifts
https://bugs.webkit.org/show_bug.cgi?id=115304
Reviewed by David Hyatt.
Accelerated layers can cause blocks at subpixel offsets to shift because
accumulated subpixel offsets are lost between each layers.
To solve this layer bounds are now calculated in LayoutUnits, and their
subpixel offset saved so it can be used to ensure correct pixel-snapping
during painting.
Test: fast/sub-pixel/sub-pixel-composited-layers.html
* WebCore.exp.in:
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* platform/graphics/LayoutPoint.h:
(WebCore::LayoutPoint::fraction):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::calculateLayerBounds):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateAfterWidgetResize):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::resetContentsRect):
(WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
(WebCore::RenderLayerBacking::contentsBox):
(WebCore::RenderLayerBacking::backgroundBox):
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):
(WebCore::RenderLayerBacking::compositedBounds):
(WebCore::RenderLayerBacking::setCompositedBounds):
* rendering/RenderLayerBacking.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
* rendering/RenderLayerCompositor.h:
* rendering/RenderTreeAsText.cpp:
(WebCore::operator<<):
* rendering/RenderTreeAsText.h:
2013-08-13 peavo@outlook.com <peavo@outlook.com>
[Curl] Possible infinite loop while downloading.
https://bugs.webkit.org/show_bug.cgi?id=119744
Reviewed by Darin Adler.
If adding/removing curl handles fails, the download thread
can end up in an endless loop trying to update the curl handle list.
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownloadManager::updateHandleList): Avoid infinite loop by ignoring return value.
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
HTMLSelectElement.item() does not behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119738
Reviewed by Darin Adler.
Make HTMLSelectElement.item() behave according to specification:
http://www.w3.org/TR/html51/forms.html#dom-select-item
http://dom.spec.whatwg.org/#dom-htmlcollection-item
Namely, we no longer throw if the offset argument is negative. Also,
the argument is now mandatory.
IE10, Firefox and Blink do not throw when HTMLSelectElement.item() is
called with a negative value (as per the specification).
The argument is mandatory in Firefox and Blink, but optional in IE10
(it returns null when called without argument). This looks like a bug
in IE because other item() getters' argument is usually mandatory in IE
(e.g. NodeList.item()).
Test: fast/dom/HTMLSelectElement/select-element-item-argument.html
* html/HTMLSelectElement.idl:
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
On request error, always fire events on the XMLHttpRequestUpload before the XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=119714
Reviewed by Alexey Proskuryakov.
On request error, fire events on the XMLHttpRequestUpload object before the XMLHttpRequest
object as per the latest specification:
http://xhr.spec.whatwg.org/#request-error
This specification change was made in Sept 2010:
http://dev.w3.org/cvsweb/2006/webapi/XMLHttpRequest-2/Overview.src.html.diff?r1=1.138;r2=1.139;f=h
It addresses the following comment:
http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0777.html
IE10 and since recently Blink behave according to specification but WebKit was firing the
events on the XMLHttpRequest object BEFORE the XMLHttpRequestUpload object in case of
'network error' or 'abort error'. WebKit was however behaving according to specification
in case of 'timeout error', which was inconsistent.
Test: http/tests/xmlhttprequest/upload-request-error-event-order.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::networkError):
(WebCore::XMLHttpRequest::abortError):
2013-08-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Simplify RadioNodeList's anonymous indexed getter
https://bugs.webkit.org/show_bug.cgi?id=119725
Reviewed by Darin Adler.
Simplify RadioNodeList's anonymous indexed getter by dropping [IsIndex]
IDL extended attribute from its parameter and making it mandatory.
This change has strictly no impact on the generated bindings code
but it simplifies the IDL.
No new test, no behavior change.
* html/RadioNodeList.idl:
2013-08-13 Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
[GTK] close the volume slider when the media control panel is hidden
https://bugs.webkit.org/show_bug.cgi?id=119062
Reviewed by Gustavo Noronha Silva.
It's not obvious how to close the volume slider on webkitGtk.
The volume slider should close if the control panel is hidden.
* html/shadow/MediaControlsGtk.cpp:
(WebCore::MediaControlsGtk::makeTransparent):
* html/shadow/MediaControlsGtk.h:
2013-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152563.
http://trac.webkit.org/changeset/152563
https://bugs.webkit.org/show_bug.cgi?id=119740
causes random crashes (Requested by carewolf on #webkit).
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
2013-08-13 Andrei Bucur <abucur@adobe.com>
Unreviewed.
Fix the build after http://trac.webkit.org/changeset/153990.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateShapesBeforeBlockLayout): Add the default return value if CSS Shapes are disabled.
2013-08-13 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Compute correct region ranges for boxes
https://bugs.webkit.org/show_bug.cgi?id=116296
Reviewed by David Hyatt.
The patch extends the region ranges implementation with the following behavior:
- the range of a box is always included in the range of its containing block (even for floats); this will simplify how overflow
is propagated to the regions and it should later change on a case by case basis.
- if the range of a box is not correctly estimated before the layout it will be marked for relayout; this is necessary to correctly
position boxes that overflow naturally, like floats.
- all the boxes have a range now, not only the blocks.
- regionAtBlockOffset can clamp to a box.
- an unsplittable box has a region range of a single region, the one where the box top falls into.
When the layout of a child box starts it tries to give an estimate based on the maximal height of the box. After the layout,
if the estimation was wrong, the box is relaid out. For example, if a block with a float is laid out in a region but the float
overflows in the next region a relayout is needed for the float so it can be positioned relative to the containing block
region (this step can be optimized by making a layout pass only for the children that don't have the region range enclosed in the
containing block range).
Tests: fast/regions/bottom-overflow-out-of-first-region-absolute.html
fast/regions/float-pushed-width-change-2.html
fast/regions/scrollable-paragraph-unsplittable.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateShapesBeforeBlockLayout): Doesn't do anything for regions now.
(WebCore::RenderBlock::updateShapesAfterBlockLayout): Doesn't do anything for regions now.
(WebCore::RenderBlock::relayoutToAvoidWidows): The layout to avoid widows. Widows use the line index to determine the break point,
not the RootLineBox pointer as before. This is necessary to prevent stale pointers in further layouts.
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): Relayout for widows during layoutBlock(). Don't wait to exit the block layout.
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::hasNextPage):
(WebCore::RenderBlock::applyBeforeBreak):
(WebCore::RenderBlock::applyAfterBreak):
(WebCore::RenderBlock::setPageBreak):
(WebCore::RenderBlock::updateMinimumPageHeight):
(WebCore::RenderBlock::regionAtBlockOffset): This function can now clamp at a box.
(WebCore::RenderBlock::computeRegionRangeForBoxChild): Calculate the box region range using the box height.
(WebCore::RenderBlock::estimateRegionRangeForBoxChild): Estimate the box region range using a huge height for the box.
(WebCore::RenderBlock::updateRegionRangeForBoxChild): Determine the final region range of a box.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalWidthForChild):
(WebCore::RenderBlock::logicalHeightForChild):
(WebCore::RenderBlock::logicalTopForChild):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clampToStartAndEndRegions):
(WebCore::RenderBox::borderBoxRectInRegion):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::regionAtBlockOffset):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
(WebCore::RenderFlowThread::pageLogicalTopForOffset):
(WebCore::RenderFlowThread::pageLogicalWidthForOffset):
(WebCore::RenderFlowThread::pageLogicalHeightForOffset):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
(WebCore::RenderFlowThread::mapFromFlowToRegion):
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::applyBreakAfterContent):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFlowThread.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
* rendering/RenderMultiColumnFlowThread.h:
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
One more speculative Windows build fix after r153978.
* page/win/DragControllerWin.cpp:
2013-08-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Update scheme list according to latest specification
https://bugs.webkit.org/show_bug.cgi?id=119510
Reviewed by Christophe Dumez.
New schemes are added to it additionally. Those are bitcoin, im, ircs and wtai.
As additional work, scheme order is listed to be sync with spec.
Spec: http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
Test: fast/dom/register-protocol-handler.html
fast/dom/unregister-protocol-handler.html
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
Yet another Windows build fix attempt after r153978.
* page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteDragImage):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
Another Windows build fix attempt after r153978.
* page/win/DragControllerWin.cpp:
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Windows build fix attempt after r153978.
* page/win/DragControllerWin.cpp:
2013-08-12 Zan Dobersek <zdobersek@igalia.com>
ASSERTION FAILED: type() == Percent in WebCore::Length::percent
https://bugs.webkit.org/show_bug.cgi?id=116715
Reviewed by Darin Adler.
Allow the Calculated type in the Length::percent method that returns the Length's
float value. This reflects the changes in r110148 that adjusted the Length::isPercent
method to return true for Length objects of either Percent or Calculated type.
Test: fast/css/calculated-length-as-percent-crash.html
* platform/Length.h:
(WebCore::Length::percent): Assert that Length::isPercent is true when Length::percent
is called, ensuring the Length's type is either Percent or Calculated.
2013-06-16 Darin Adler <darin@apple.com>
Move Clipboard::declareAndWriteDragImage to DragController
https://bugs.webkit.org/show_bug.cgi?id=117683
Reviewed by Brent Fulgham.
* dom/Clipboard.h: Removed declareAndWriteDragImage.
* page/DragController.cpp:
(WebCore::selectImageBeforeDragging): Half of the old prepareClipboardForImageDrag
is now refactored into this function.
(WebCore::DragController::startDrag): Where we called prepareClipboardForImageDrag,
instead call selectImageBeforeDragging and declareAndWriteDragImage. This is needed
because declareAndWriteDragImage needs to be a member function, for Mac at least.
* page/DragController.h: Added declareAndWriteDragImage.
* page/efl/DragControllerEfl.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added empty placeholder.
It would be better to delete this file rather than having these placeholders.
I don't think EFL actually has drag support, and it makes work to have to keep
source files up to date that are really unused.
* page/gtk/DragControllerGtk.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
* page/mac/DragControllerMac.mm:
(WebCore::DragController::declareAndWriteDragImage): Added. Calls to DragClient, which
does the work.
* page/qt/DragControllerQt.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
* page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteDragImage): Added. Uses Pasteboard functions to
do the work.
* platform/Clipboard.h: Changed the pasteboard function to return a non-const reference.
For now, it's not clear what const will mean for pasteboards, and it's currently not
possible to write to a const pasteboard, which we need to do in the new
DragController::declareAndWriteDragImage functions.
* platform/Pasteboard.h: Added a new writeMarkup function, implemented only for Windows
at this time.
* platform/efl/ClipboardEfl.cpp: Deleted declareAndWriteDragImage.
* platform/gtk/ClipboardGtk.cpp: Ditto.
* platform/ios/ClipboardIOS.h: Ditto.
* platform/ios/ClipboardIOS.mm: Ditto.
* platform/mac/ClipboardMac.mm: Ditto.
* platform/qt/ClipboardQt.cpp: Ditto.
* platform/win/ClipboardWin.cpp: Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writePlainTextToDataObject): Took out a pointless line of code.
(WebCore::Pasteboard::writeMarkup): Added. Currently implemented only for Windows.
This factors out a significant piece of DragController::declareAndWriteDragImage,
and will probably be handy for other platforms later.
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Fix NULL de-refernce in HTMLAnchorElement::sendPings when settings doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=119716
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/d5783da353ab783e9994b8fbecd91880be5192a1
No new tests since the test in the Blink change doesn't reproduce crash on WebKit.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::sendPings):
2013-08-12 Seokju Kwon <seokju@webkit.org>
Use the correct preprocessor in shouldRepaintFixedBackgroundsOnScroll()
https://bugs.webkit.org/show_bug.cgi?id=119710
Reviewed by Darin Adler.
No behavior change, no new tests needed.
* rendering/RenderObject.cpp: Remove unused parameter warning.
(WebCore::shouldRepaintFixedBackgroundsOnScroll):
2013-08-12 Alexey Proskuryakov <ap@apple.com>
http/tests/security/sandboxed-iframe-invalid.html is flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=85522
Reviewed by Andy Estes.
Drive-by FIXMEs and trivial fixes for WebCore issues I noticed while working
on this bug. No behavior change expected.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::findFrameForNavigation):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledFormSubmission::fire):
2013-08-13 Ryosuke Niwa <rniwa@webkit.org>
Fix variable name |end| -> |size| in EventTarget::fireEventListeners
https://bugs.webkit.org/show_bug.cgi?id=119715
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/f58b017539c48059bb2b88d18ee0ee3d14decb01
and also fix variable names in FiringEventIterator.
* dom/EventTarget.cpp:
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::fireEventListeners):
(WebCore::EventTarget::removeAllEventListeners):
* dom/EventTarget.h:
(WebCore::FiringEventIterator::FiringEventIterator):
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Encapsulate access to documentNamedItemMap and windowNamedItemMap
https://bugs.webkit.org/show_bug.cgi?id=119701
Reviewed by Darin Adler.
Encapsulate m_documentNamedItem and m_windowNamedItem by adding various methods on HTMLDocument.
This will help us doing more refactorings in the future.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName):
(WebCore::JSHTMLDocument::nameGetter):
* dom/Element.cpp:
(WebCore::Element::updateNameForDocument):
(WebCore::Element::updateIdForDocument):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::addDocumentNamedItem): Added.
(WebCore::HTMLDocument::removeDocumentNamedItem): Added.
(WebCore::HTMLDocument::addWindowNamedItem): Added.
(WebCore::HTMLDocument::removeWindowNamedItem): Added.
* html/HTMLDocument.h:
(WebCore::HTMLDocument::documentNamedItem): Added.
(WebCore::HTMLDocument::hasDocumentNamedItem): Added.
(WebCore::HTMLDocument::documentNamedItemContainsMultipleElements): Added.
(WebCore::HTMLDocument::windowNamedItem): Added.
(WebCore::HTMLDocument::hasWindowNamedItem): Added.
(WebCore::HTMLDocument::windowNamedItemContainsMultipleElements): Added.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
2013-08-12 Patrick Gansterer <paroga@webkit.org>
[CMake] Use the correct list of files when compiling ANGLESupport on Windows
https://bugs.webkit.org/show_bug.cgi?id=119439
Reviewed by Gyuyoung Kim.
* CMakeLists.txt: Use ossource_win.cpp instead of ossource_posix.cpp on Windows platforms.
2013-08-12 Arnaud Renevier <a.renevier@samsung.com>
[cairo] memory corruption with putImageData and accelerated canvas.
https://bugs.webkit.org/show_bug.cgi?id=118621
Reviewed by Martin Robinson.
When we have an accelerated imageBuffer, and we putByteArray with a
non zero destPoint, we create temporary surface of sourceSize. Then,
we write to image data with an offset. This results in an out of bound
write.
In order to avoid that, we use a 0 offset when writing data.
In addition, we also create image with the minimal needed size in
getImageData, and also use a 0 offset. This decrease data transfer
between cpu and gpu
Instead of the map/unmap mechanism, perform an explicit surface copy
when needed. This change also removes an unneeded glReadPixels at the
start of putByteArray
Add two parameters to copyRectFromOneSurfaceToAnother: destination
offset, and cairo drawing operator.
No new tests. Accelerated canvas is not enabled for testing yet.
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyRectFromOneSurfaceToAnother):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::copySurfaceToImageAndAdjustRect):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
2013-08-12 Ryosuke Niwa <rniwa@webkit.org>
Use const AtomicStringImpl* in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=119700
Reviewed by Benjamin Poulain.
Use const AtomicStringImpl* in DocumentOrderedMap. It caught at least one bug that HTMLNameCollection'
subclasses' nodeMatches were taking const AtomicString& instead of AtomicStringImpl*. This was forcing
DocumentOrderedMap::getElementByWindowNamedItem and DocumentOrderedMap::getElementByDocumentNamedItem
to create temporary AtomicStrings.
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesId):
(WebCore::keyMatchesName):
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLabelForAttribute):
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle):
(WebCore::DocumentOrderedMap::contains):
(WebCore::DocumentOrderedMap::containsMultiple):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatches):
(WebCore::DocumentNameCollection::nodeMatches):
* html/HTMLNameCollection.h:
(WebCore::WindowNameCollection::nodeMatches):
(WebCore::DocumentNameCollection::nodeMatches):
2013-08-12 Beth Dakin <bdakin@apple.com>
The LayoutMilestones didLayout callback should only fire for the main frame
https://bugs.webkit.org/show_bug.cgi?id=119457
Reviewed by Sam Weinig.
This patch makes it so that FrameLoader::didLayout(LayoutMilestones) is only ever
called for the main frame. Technically this will change existing API for
didFirstVisuallyNonEmptyLayoutInFrame and didFirstLayoutInFrame. Clients used to
be able to register for those callbacks for any frame they wanted, however, now
they will only ever get the callback when it applies to the main frame. We think
that this is acceptable since we don’t know of any clients that ever used those
APIs for a non-main frame. This change also makes nothing but sense for the
didLayout(LayoutMilestones) callback, since that is a Page-level concept, so it
should only fire for the main frame.
Only call didLayout for the main frame.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
Assert that this is the main frame.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::didLayout):
Only call didLayout for the main frame.
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-08-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
Define DOM_KEY_LOCATION_* constants on KeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=119341
Reviewed by Ryosuke Niwa.
Add support for the DOM_KEY_LOCATION_* constants on KeyboardEvent as per
the specification:
http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent
Those constants are already supported by IE10, Firefox 22 and since
recently Blink.
Note that the following constants are not supported / exposed yet:
DOM_KEY_LOCATION_MOBILE and DOM_KEY_LOCATION_JOYSTICK.
Test: fast/events/keyboardevent-location-constants.html
* dom/KeyboardEvent.cpp:
(WebCore::keyLocationCode):
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/KeyboardEvent.h:
* dom/KeyboardEvent.idl:
2013-08-12 Tim Horton <timothy_horton@apple.com>
dataLog dumpers for WebCore's basic geometry types
https://bugs.webkit.org/show_bug.cgi?id=119636
Reviewed by Filip Pizlo.
* platform/graphics/FloatPoint.cpp:
(WebCore::FloatPoint::dump):
* platform/graphics/FloatPoint.h:
* platform/graphics/FloatRect.cpp:
(WebCore::FloatRect::dump):
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.cpp:
(WebCore::FloatSize::dump):
* platform/graphics/FloatSize.h:
* platform/graphics/IntPoint.h:
(WebCore::IntPoint::dump):
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::dump):
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
(WebCore::IntSize::dump):
2013-08-12 Dean Jackson <dino@apple.com>
Shadows don't support viewport units
https://bugs.webkit.org/show_bug.cgi?id=119649
Reviewed by Darin Adler.
We don't yet support viewport units in shadows, so
fail parsing if we see one. The bug to fix this
completely is: https://webkit.org/b/119650
Test: fast/css/shadow-viewport-units.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseShadow): Fail if we get one of
vh, vw, vmin, vmax.
2013-08-12 peavo@outlook.com <peavo@outlook.com>
[Curl] Cookie is not set when url string is unicode.
https://bugs.webkit.org/show_bug.cgi?id=119545
Reviewed by Brent Fulgham.
When the method setCookiesFromDOM is called with an unicode url parameter, the cookie is not correctly set.
We need to convert the cookie string to 8 bit, before passing it to the Curl api function.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::setCookiesFromDOM): Convert cookie string to 8 bit, if needed.
2013-08-12 Eric Carlson <eric.carlson@apple.com>
Revert r153912 because it broke some track tests.
Rubber-stamped by Antti Koivisto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack):
2013-08-12 Antti Koivisto <antti@apple.com>
Add ElementTraversal::next/previousSibling
https://bugs.webkit.org/show_bug.cgi?id=119681
Reviewed by Andreas Kling.
Add nextSibling/previousSibling/lastWithin to ElementTraversal namespace.
- Use them to replace internal use of Element::next/previousElementSibling DOM API for traversal.
- Replace some Node::nextSibling() usage with ElementTraversal::nextSibling() for tighter code.
- Replace ElementTraversal::nextSkippingChildren where it is used to traverse over immediate children only.
* css/SelectorChecker.cpp:
(WebCore::isFirstChildElement):
(WebCore::isLastChildElement):
(WebCore::isFirstOfType):
(WebCore::isLastOfType):
(WebCore::countElementsBefore):
(WebCore::countElementsOfTypeBefore):
(WebCore::countElementsAfter):
(WebCore::countElementsOfTypeAfter):
* dom/Element.cpp:
(WebCore::Element::lastElementChild):
(WebCore::Element::previousElementSibling):
(WebCore::Element::nextElementSibling):
* dom/Element.h:
* dom/ElementTraversal.h:
(WebCore::ElementTraversal::lastElementWithinTemplate):
(WebCore::ElementTraversal::lastWithin):
(WebCore::ElementTraversal::traverseNextSiblingElementTemplate):
(WebCore::ElementTraversal::nextSibling):
(WebCore::ElementTraversal::traversePreviousSiblingElementTemplate):
(WebCore::ElementTraversal::previousSibling):
* editing/ApplyStyleCommand.cpp:
(WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::tryIndentingAsListItem):
* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::mergeWithNeighboringLists):
* editing/markup.cpp:
(WebCore::createContextualFragment):
* html/HTMLCollection.cpp:
(WebCore::firstMatchingChildElement):
(WebCore::nextMatchingSiblingElement):
(WebCore::HTMLCollection::traverseNextElement):
(WebCore::HTMLCollection::traverseForwardToOffset):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::childrenChanged):
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::containsJavaApplet):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
2013-08-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Add Support for canvas blend modes
https://bugs.webkit.org/show_bug.cgi?id=100072
Reviewed by Jocelyn Turcotte.
Implement basic support for the blend-modes supported by QPainter.
Covered by existing tests.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::toQtCompositionMode):
(WebCore::GraphicsContext::setPlatformCompositeOperation):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::ImageBuffer::draw):
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::draw):
* platform/graphics/qt/StillImageQt.cpp:
(WebCore::StillImage::draw):
2013-08-12 Gabor Abraham <abrhm@inf.u-szeged.hu>
Buildfix for !ENABLE(SVG). Fix warning by adding guard after r153901:
void WebCore::addString(WebCore::FeatureSet&, const char*)'
defined but not used [-Werror=unused-function]
Reviewed by Csaba Osztrogonác.
* dom/DOMImplementation.cpp:
2013-08-12 Antti Koivisto <antti@apple.com>
Move ElementTraversal to ElementTraversal.h
https://bugs.webkit.org/show_bug.cgi?id=119678
Rubber-stamped by Andreas Kling.
Move ElementTraversal namespace from NodeTraversal.h to a correctly named file.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityRenderObject.cpp:
* css/StyleInvalidationAnalysis.cpp:
* dom/Document.cpp:
* dom/DocumentOrderedMap.cpp:
* dom/Element.cpp:
* dom/ElementTraversal.h: Added.
(WebCore::ElementTraversal::firstElementWithinTemplate):
(WebCore::ElementTraversal::firstWithin):
(WebCore::ElementTraversal::traverseNextElementTemplate):
(WebCore::ElementTraversal::next):
(WebCore::ElementTraversal::traverseNextElementSkippingChildrenTemplate):
(WebCore::ElementTraversal::nextSkippingChildren):
(WebCore::ElementTraversal::previousIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudo):
(WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
(WebCore::ElementTraversal::pseudoAwarePreviousSibling):
* dom/Node.cpp:
* dom/NodeTraversal.h:
* dom/SelectorQuery.cpp:
* dom/TreeScope.cpp:
* dom/VisitedLinkState.cpp:
* editing/FrameSelection.cpp:
* editing/markup.cpp:
* html/HTMLCollection.cpp:
* html/HTMLFieldSetElement.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLLabelElement.cpp:
* html/HTMLLegendElement.cpp:
* html/HTMLMapElement.cpp:
* html/HTMLObjectElement.cpp:
* html/HTMLSelectElement.cpp:
* html/shadow/ContentDistributor.cpp:
* page/FocusController.cpp:
* rendering/RenderCounter.cpp:
* rendering/RenderListItem.cpp:
* svg/SVGSVGElement.cpp:
* svg/SVGStyledElement.cpp:
* svg/SVGUseElement.cpp:
* svg/animation/SMILTimeContainer.cpp:
* svg/graphics/SVGImage.cpp:
2013-08-12 Antti Koivisto <antti@apple.com>
Move some Document recalcStyle code to StyleResolveTree
https://bugs.webkit.org/show_bug.cgi?id=119676
Reviewed by Andreas Kling.
Move the code that resolves the document and child styles to Style::resolveTree(Document*).
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:
2013-08-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
Resource leak related to gstreamer and videos
https://bugs.webkit.org/show_bug.cgi?id=109350
Reviewed by Eric Carlson.
Since active DOM object are only stopped once and can not be restarted, we can
unreference the media player there, instead of waiting for garbage collection.
If the r152778 is rolled back, this also breaks a circular reference between
GStreamer and WebKit which prevented garbage collecting from triggering.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::stop):
2013-08-12 Gabor Rapcsanyi <rgabor@webkit.org>
[Qt] Unreviewed buildfix for webaudio.
* Target.pri: Add missing files
2013-08-12 Andreas Kling <akling@apple.com>
Some build juice for the Windows bots after r153926 + r153927.
* html/shadow/MediaControlElements.cpp:
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::supportsFullscreen):
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
2013-08-11 Sam Weinig <sam@webkit.org>
Move RenderMathMLSpace.h/cpp to the right group in the Xcode project.
Reviewed by Dean Jackson.
* WebCore.xcodeproj/project.pbxproj:
2013-08-11 Andreas Kling <akling@apple.com>
Make Page::settings() return a reference.
<http://webkit.org/b/119662>
Reviewed by Anders Carlsson.
...and remove some pointless null checks that were exposed by doing this.
2013-08-11 Andreas Kling <akling@apple.com>
Make some things that return never-null pointers return references instead.
<http://webkit.org/b/119660>
Reviewed by Antti Koivisto.
These functions never return null anyway, so remove any ambiguity by letting
them return references instead of pointers.
- Node::ensureRareData()
- Element::ensureUniqueElementData()
- Element::ensureShadow()
- Element::ensureUserAgentShadowRoot()
- StyledElement::ensureMutableInlineStyle()
- NodeRareData::ensureNodeLists()
- NodeRareData::ensureMutationObserverData()
- EventTarget::ensureEventTargetData()
- Document::ensureStyleResolver()
- Document::selectorQueryCache()
- Document::mediaQueryMatcher()
- FlowThreadController::ensureRenderFlowThreadWithName()
- HTMLTrackElement::ensureTrack()
- SVGElement::ensureSVGRareData()
- AnimationControllerPrivate::ensureCompositeAnimation()
2013-08-11 Sam Weinig <sam@webkit.org>
Cleanup MediaQueryListListener
https://bugs.webkit.org/show_bug.cgi?id=119664
Reviewed by Andreas Kling.
Make MediaQueryListListener a proper WebIDL callback.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Update project files.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
Add support for CallbackNeedsOperatorEqual, which adds an operator==.
* css/MediaAllInOne.cpp:
Remove MediaQueryListListener.cpp.
* css/MediaQueryListListener.cpp:
Removed.
* css/MediaQueryListListener.h:
(WebCore::MediaQueryListListener::~MediaQueryListListener):
(WebCore::MediaQueryListListener::MediaQueryListListener):
* css/MediaQueryListListener.idl:
Convert to a proper WebIDL callback.
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::Listener::evaluate):
(WebCore::MediaQueryMatcher::styleResolverChanged):
* css/MediaQueryMatcher.h:
Remove all traces of the ScriptState.
2013-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Remove unexistent header file.
2013-08-09 Gustavo Noronha Silva <gns@gnome.org>
[GObject] Wrap KeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=119651
Reviewed by Christophe Dumez.
This exposes KeyboardEvent to our GObject API. It is required for handling
keyboard events, such as keydown, keypress, and so on.
* bindings/gobject/GNUmakefile.am:
* bindings/gobject/WebKitDOMPrivate.cpp:
(WebKit::wrap): make sure we create a WebKitDOMKeyboardEvent for a DOM event that
is a KeyboardEvent.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetBaseClass): make WebKitDOMEvent be WebKitDOMKeyboardEvent's parent, like we do
for WebKitDOMMouseEvent.
* dom/KeyboardEvent.idl: generate a single initialization method.
2013-08-09 Jer Noble <jer.noble@apple.com>
Crash in com.apple.WebKit.WebContent at com.apple.MediaToolbox.
https://bugs.webkit.org/show_bug.cgi?id=119645
Reviewed by Eric Carlson.
Work around crash caused by <rdar://problem/14688471> by releasing
m_request as soon as keys have been added to it.
* Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
(WebCore::CDMSessionAVFoundation::update):
2013-08-09 Anders Carlsson <andersca@apple.com>
Artifacts seen sometimes with layer backed WebKit1 plug-in
https://bugs.webkit.org/show_bug.cgi?id=119647
<rdar://problem/14002715>
Reviewed by Beth Dakin.
Don't try to paint layer backed views - they will be painted by Core Animation.
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-08-09 Rob Buis <rwlbuis@webkit.org>
ASSERTION FAILED: stroke->opacity != other->stroke->opacity in WebCore::SVGRenderStyle::diff
https://bugs.webkit.org/show_bug.cgi?id=119623
Reviewed by Dirk Schulze.
Include all the stroke attributes in the style diff comparison, the visited links ones were missing.
Test: svg/animations/animate-stroke-crasher.html
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
2013-08-09 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r142755): window.open creates an invisible window when width and height are 0
https://bugs.webkit.org/show_bug.cgi?id=119633
Reviewed by Darin Adler.
Test: fast/dom/Window/open-zero-size-as-default.html
Relying on each WebKit to refuse setting size to zero was fragile - because this
required each one to have the check, and because by the time the client was called,
the initially zero size was not necessarily zero.
* loader/FrameLoader.cpp: (WebCore::createWindow): When sizes are zero, keep the
size the window was created with, because that's the default one by definition.
* page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): It's too late to
check for zero size now, it's been mangled to adjust for the difference between
window and viewport size.
2013-08-09 Eric Carlson <eric.carlson@apple.com>
[Mac] some track language tags are not recognized
https://bugs.webkit.org/show_bug.cgi?id=119643
Reviewed by Dean Jackson.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Always call languageOfPrimaryAudioTrack(),
a track may have changed so we may have a new language.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Call [AVAssetTrack languageCode]
if [AVAssetTrack extendedLanguageTag] returns NULL in case the media file has an old
QuickTime language code.
2013-08-09 Dean Jackson <dino@apple.com>
Captions menu needs to reset text-align
https://bugs.webkit.org/show_bug.cgi?id=119637
Reviewed by Eric Carlson.
Reset the text-align property on the menu so that it
doesn't get the inherited value. The full fix for all
controls is http://webkit.org/b/116100.
* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-container):
2013-08-09 Beth Dakin <bdakin@apple.com>
AX: Not able to use arrow keys to read text in a WK2 app
https://bugs.webkit.org/show_bug.cgi?id=119605
-and corresponding-
<rdar://problem/14281275>
Reviewed by Darin Adler.
This code from defaultKeyboardEventHandler() is the magic that makes this AX
functionality work. This patch moves that into a separate function so that we can
call it from WK2.
* WebCore.exp.in:
* page/EventHandler.cpp:
(WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
(WebCore::EventHandler::defaultKeyboardEventHandler):
* page/EventHandler.h:
2013-08-09 Antti Koivisto <antti@apple.com>
Move static StyleResolver functions to Style namespace
https://bugs.webkit.org/show_bug.cgi?id=119629
Reviewed by Sam Weinig and Andreas Kling.
- Move static font size computation functions to StyleFontSizeFunctions.h/.cpp
- Move StyleResolver::styleForDocument to Style::resolveForDocument
* WebCore.xcodeproj/project.pbxproj:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyInitialValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyInitialValue):
(WebCore::ApplyPropertyFontSize::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::checkForOrientationChange):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::checkForGenericFamilyChange):
(WebCore::StyleResolver::initializeFontStyle):
(WebCore::StyleResolver::setFontSize):
* css/StyleResolver.h:
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
* editing/EditingStyle.cpp:
(WebCore::legacyFontSizeFromCSSValue):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getFontAndGlyphOrientation):
Moved from StyleResolver.cpp so it can be used by Style::resolveForDocument().
This depends on RenderStyle only so it is a natural member function.
* rendering/style/RenderStyle.h:
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* style/StyleFontSizeFunctions.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
(WebCore::Style::computedFontSizeFromSpecifiedSize):
(WebCore::Style::computedFontSizeFromSpecifiedSizeForSVGInlineText):
(WebCore::Style::fontSizeForKeyword):
(WebCore::Style::legacyFontSizeForPixelSize):
* style/StyleFontSizeFunctions.h: Added.
* style/StyleResolveForDocument.cpp: Added.
(WebCore::Style::resolveForDocument):
* style/StyleResolveForDocument.h: Added.
2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for KeyboardEvent.location attribute
https://bugs.webkit.org/show_bug.cgi?id=119326
Reviewed by Benjamin Poulain.
Add support for KeyboardEvent.location attribute as per the latest specification:
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-KeyboardEvent
IE10, Firefox 22 and recently Blink all support KeyboardEvent.location already.
The deprecated 'keyLocation' attribute was not removed to maintain backward
compatibility.
No new tests, covered by existing tests.
* bindings/objc/PublicDOMInterfaces.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEventInit::KeyboardEventInit):
(WebCore::KeyboardEvent::KeyboardEvent):
(WebCore::KeyboardEvent::initKeyboardEvent):
* dom/KeyboardEvent.h:
(WebCore::KeyboardEvent::location):
* dom/KeyboardEvent.idl:
2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Make atob() throw an InvalidCharacterError on excess padding characters
https://bugs.webkit.org/show_bug.cgi?id=118898
Reviewed by Darin Adler.
According to the latest specification, window.atob() should throw an
InvalidCharacterError on excess padding characters:
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#dom-windowbase64-atob
This behavior is consistent with both Firefox, IE10 and recently Blink.
No new tests, already covered by:
fast/dom/Window/atob-btoa.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::atob):
2013-08-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Make DOMImplementation::hasFeature() behave according to specification
https://bugs.webkit.org/show_bug.cgi?id=119329
Reviewed by Ryosuke Niwa.
Make DOMImplementation::hasFeature() behave according to the latest specification:
http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
Specifically, the function should now return true unconditionally for any non-SVG feature.
This behavior is consistent with Firefox and since recently Blink.
hasFeature() originally would report whether the user agent claimed to support a
given DOM feature, but experience proved it was not nearly as reliable or granular
as simply checking whether the desired interfaces, attributes, or methods existed.
As such, it should no longer be used, but continues to exist (and simply returns
true) so that old pages don't stop working.
No new tests, covered by existing tests.
* dom/DOMImplementation.cpp:
(WebCore::isSupportedSVG10Feature):
(WebCore::isSupportedSVG11Feature):
(WebCore::DOMImplementation::hasFeature):
2013-08-09 Alejandro G. Castro <alex@igalia.com>
[GTK] [EFL] Enable tiled shadow blur for the inset shadows.
https://bugs.webkit.org/show_bug.cgi?id=119078
Reviewed by Martin Robinson.
Already covered in the tests.
* platform/graphics/GraphicsContext.cpp:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::fillCurrentCairoPath): Added to allow fill the path
without the shadow.
(WebCore::shadowAndFillCurrentCairoPath):
(WebCore::GraphicsContext::fillRectWithRoundedHole): Added cairo
implementation.
2013-08-09 Jakob Petsovits <jpetsovits@blackberry.com>
[BlackBerry] Don't release the canvas Drawable, flush it directly instead.
https://bugs.webkit.org/show_bug.cgi?id=119589
https://jira.bbqnx.net/browse/BRWSR-12531
JIRA 444857
Reviewed by George Staikos.
The previous code here used releaseBufferDrawable() to
flush painted ImageBuffer contents, but then proceeded
to use that released Drawable for further painting
without ever locking a new one.
In an implementation that actually releases the Drawable
rather than keeping it around and just flushing it,
this will wreak havoc as bad as black screens or crashes.
As a solution that doesn't require the ImageBuffer object
to swap out its m_canvas member for a new Drawable, we can
access the PlatformGraphicsContext::flush() method directly
to achieve the same effect as was previously intended by
calling releaseBufferDrawable(). All it needs is letting
the canvas layer know about the Drawable so it can call
that flush() method by itself.
No new tests, verified by not crashing with an aforementioned
implementation of releaseBufferDrawable().
* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
(WebCore::CanvasLayerCompositingThreadClient::CanvasLayerCompositingThreadClient):
(WebCore::CanvasLayerCompositingThreadClient::commitPendingTextureUploads):
(WebCore::CanvasLayerWebKitThread::CanvasLayerWebKitThread):
* platform/graphics/blackberry/CanvasLayerWebKitThread.h:
(WebCore::CanvasLayerWebKitThread::create):
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::~ImageBuffer):
2013-08-08 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt][WK2] Composited and transformed links asserts in tap highlight
https://bugs.webkit.org/show_bug.cgi?id=94345
Reviewed by Jocelyn Turcotte.
Use a mapping that does not assert when hitting transforms. We still skip
transforms that produces non-rectangular areas.
* page/GestureTapHighlighter.cpp:
2013-08-09 Gabor Abraham <abrhm@inf.u-szeged.hu>
Buildfix. Fix warning after r153887:
control reaches end of non-void function [-Werror=return-type]
Reviewed by Csaba Osztrogonác.
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
2013-08-09 Bruno de Oliveira Abinader <bruno.d@partner.samsung.com>
Text decorations should be listed as non-inheritable
https://bugs.webkit.org/show_bug.cgi?id=119608
Reviewed by Andreas Kling.
Both "text-decoration" specs (CSS 2.1, CSS 3) and "text-decoration-line"
spec (CSS 3) states these properties are not inherited (w/ exceptions,
which are currently handled by -in-effect property), however those were
listed as inherited for no reason - thus preserving behavior as shown by
layout test results.
Backported from Blink: https://codereview.chromium.org/20751008
Updated getComputedStyle tests for both 'text-decoration' and
'text-decoration-line' properties to check that both are not implicitly
inherited.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
2013-08-09 Andreas Kling <akling@apple.com>
I wish we had a Windows EWS. :(
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList): No range-based for today.
2013-08-09 Rob Buis <rwlbuis@webkit.org>
ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
https://bugs.webkit.org/show_bug.cgi?id=113224
Reviewed by Darin Adler.
Do not perform from-by animations for non-additive attributes.
Test: svg/animations/non-additive-type-from-by-animation.html
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateFromAndByValues):
(WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition):
(WebCore::SVGAnimateElement::isAdditive):
* svg/SVGAnimateElement.h:
2013-08-09 Rob Buis <rwlbuis@webkit.org>
ASSERT(m_type == toSVGTransform.type())
https://bugs.webkit.org/show_bug.cgi?id=113217
Reviewed by Darin Adler.
For to animations clear the transform list while animating and reset to it after the animation is done.
This matches Firefox and Opera 12 behavior.
Tests: svg/animations/animateTransform-to-scale-expected.svg
svg/animations/animateTransform-to-scale.svg
* svg/SVGAnimatedTransformList.cpp:
(WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
2013-08-09 Arunprasad Rajkumar <arurajku@cisco.com>
[Qt] QtWebKit should allow sending domain specific keycode to HTML applications
https://bugs.webkit.org/show_bug.cgi?id=118445
Reviewed by Allan Sandfeld Jensen.
No new test required, it is covered by QtWebKit API test.
This fix allows sending QKeyEvent::nativeVirtualKey as the DOM KeyboardEvent keyCode value instead
of Windows virtual key code. It can be enabled/disabled using "_q_useNativeVirtualKeyAsDOMKey"
dynamic property present in QWebPage.
* platform/PlatformKeyboardEvent.h:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
(WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2013-08-09 Renata Hodovan <reni@webkit.org>
Missing NULL check in ApplyStyleCommand::applyInlineStyleToNodeRange()
https://bugs.webkit.org/show_bug.cgi?id=119570
Reviewed by Ryosuke Niwa.
The m_mutableStyleSet of EditingStyle can be NULL in ApplyStyleCommand::applyInlineStyleToNodeRange but
this scenario was not checked earlier.
Test: editing/execCommand/null-style-crash.html
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
* css/StylePropertySet.h:
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::addViewportRule):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2013-08-09 Andreas Kling <akling@apple.com>
ElementRuleCollector: Use range-based for syntax in rule collection loop.
<http://webkit.org/b/119617>
<rdar://problem/14695311>
Reviewed by Antti Koivisto.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
2013-08-09 Andreas Kling <akling@apple.com>
StyleRule*::properties() should return const references.
<http://webkit.org/b/119596>
Reviewed by Antti Koivisto.
Make StyleRule::properties() & friends return const-references instead of
pointers. This exposed some pointless null checking, since rules should
always have properties.
All rule objects that contain properties now require a StylePropertySet at
the time of construction instead having you call setProperties() later.
The only rules that could ever have null properties were the default-inserted
animation keyframe rules for 0% and 100% that we'd conjure up if the author
didn't provide them. Now they just have an empty property set instead.
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::cssText):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::cssText):
* css/CSSParser.cpp:
(WebCore::CSSParser::createFilterRule):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::createFontFaceRule):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::cssText):
* css/ElementRuleCollector.cpp:
(WebCore::leftToRightDeclaration):
(WebCore::rightToLeftDeclaration):
(WebCore::ElementRuleCollector::addElementStyleProperties):
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
* css/PageRuleCollector.cpp:
(WebCore::PageRuleCollector::matchPageRulesForList):
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
* css/StylePropertySet.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchResult::addMatchedProperties):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::keyframeStylesForAnimation):
* css/StyleResolver.h:
* css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRulePage::StyleRulePage):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleViewport::StyleRuleViewport):
(WebCore::StyleRuleViewport::mutableProperties):
(WebCore::StyleRuleFilter::StyleRuleFilter):
* css/StyleRule.h:
(WebCore::StyleRule::create):
(WebCore::StyleRule::properties):
(WebCore::StyleRuleFontFace::create):
(WebCore::StyleRuleFontFace::properties):
(WebCore::StyleRulePage::create):
(WebCore::StyleRulePage::properties):
(WebCore::StyleRuleViewport::create):
(WebCore::StyleRuleViewport::properties):
(WebCore::StyleRuleFilter::create):
(WebCore::StyleRuleFilter::properties):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::addSubresourceStyleURLs):
(WebCore::childRulesHaveFailedOrCanceledSubresources):
* css/WebKitCSSFilterRule.cpp:
(WebCore::WebKitCSSFilterRule::cssText):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
(WebCore::StyleKeyframe::mutableProperties):
* css/WebKitCSSKeyframeRule.h:
(WebCore::StyleKeyframe::create):
(WebCore::StyleKeyframe::properties):
* css/WebKitCSSViewportRule.cpp:
(WebCore::WebKitCSSViewportRule::cssText):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::revalidateStyle):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForRule):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::SVGFontFaceElement):
(WebCore::SVGFontFaceElement::fontFamily):
(WebCore::SVGFontFaceElement::rebuildFontFace):
2013-08-09 Julien Brianceau <jbrianceau@nds.com>
[Qt] Fix build (broken by changeset r153826).
https://bugs.webkit.org/show_bug.cgi?id=119616
Reviewed by Andreas Kling.
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
2013-08-08 Tim Horton <timothy_horton@apple.com>
navigator.plugins has plugins in it when plugins are disabled
https://bugs.webkit.org/show_bug.cgi?id=119607
<rdar://problem/14678030>
Reviewed by Anders Carlsson.
Test: plugins/navigator-plugins-disabled.html
* page/Settings.cpp:
(WebCore::Settings::setPluginsEnabled):
Refresh the plugin database when plugins are enabled or disabled.
This is necessary to ensure that navigator.plugins will have the
correct set of plugins after dynamically changing whether plugins
are enabled, which makes the test for this patch possible (but it
makes sense in the browser as well).
2013-08-08 Timothy Hatcher <timothy@apple.com>
Allow SVG images to be drawn into canvas without tainting.
https://bugs.webkit.org/show_bug.cgi?id=119492
Reviewed by Darin Adler.
Tests: svg/as-image/svg-canvas-not-tainted.html
svg/as-image/svg-canvas-link-not-colored.html
svg/as-image/svg-canvas-xhtml-tainted.html
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseAttribute): Call shouldProhibitLinks.
(WebCore::shouldProhibitLinks): Added.
* html/HTMLAnchorElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Call shouldProhibitLinks.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::isEmbeddedThroughSVGImage): Use isInSVGImage.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::svgAttributeChanged): Call shouldProhibitLinks.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin): Added.
(WebCore::isInSVGImage): Added.
* svg/graphics/SVGImage.h:
2013-08-08 Simon Fraser <simon.fraser@apple.com>
Fix ASSERT(m_contentsSolidColor.isValid()) assertion on iOS at nytimes.com
https://bugs.webkit.org/show_bug.cgi?id=119603
Reviewed by Dean Jackson.
On iOS it's possible for a GraphicsLayer to transition between having
a solid background color, and containing media. This happens on nytimes.com
when playing video.
In this case, GraphicsLayerCA::updateContentsColorLayer() would assert
because m_contentsLayer had been already set up to contain media, but
it would be trying to update the color.
Fix by bailing from all the updateContents* functions if there is no
contents layer, or that layer exists for a different purpose.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsMediaLayer):
(WebCore::GraphicsLayerCA::updateContentsCanvasLayer):
(WebCore::GraphicsLayerCA::updateContentsColorLayer):
2013-08-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153847.
http://trac.webkit.org/changeset/153847
https://bugs.webkit.org/show_bug.cgi?id=119609
caused new SVG animation test failures (Requested by smfr on
#webkit).
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateFromAndByValues):
2013-08-08 Simon Fraser <simon.fraser@apple.com>
Kill updateStyleForAllDocuments()
https://bugs.webkit.org/show_bug.cgi?id=118093
Reviewed by Geoff Garen.
We should never have to eagerly update style, especially for all documents
that the process knows about. The WebKit model is to update style when
required for layout etc, not to update it eagerly.
This is historical code whose origins are lost in the mists of KHTML.
r42384 makes it possible to do away with this eager updating, and
r55568 removed some calls. Discussion in bug 32580 suggests that
form control code still need this, but tests still pass without it.
* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* dom/Document.cpp:
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::unscheduleStyleRecalc):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::setActive):
2013-08-08 Jer Noble <jer.noble@apple.com>
[EME] MediaKey APIs should be prefixed.
https://bugs.webkit.org/show_bug.cgi?id=119606
Reviewed by Anders Carlsson.
No new tests; updated exsisting tests with new names.
Prefix all new classes with "WebKit" and new methods on existing unprefixed
classes with "webkit"
* Modules/encryptedmedia/MediaKeyMessageEvent.idl: MediaKeyMessageEvent -> WebKitMediaKeyMessageEvent
* Modules/encryptedmedia/MediaKeySession.idl: MediaKeySession -> WebKitMediaKeySession
* Modules/encryptedmedia/MediaKeys.idl: MediaKeys -> WebKitMediaKeys
* html/HTMLMediaElement.idl: keys -> webkitKeys, setMediaKeys -> webkitSetMediaKeys
* html/MediaKeyError.idl: MediaKeyError -> WebKitMediaKeyError
2013-08-08 Jer Noble <jer.noble@apple.com>
[EME] setMediaKeys function as defined in the EME specification does not work
https://bugs.webkit.org/show_bug.cgi?id=119597
Reviewed by Anders Carlsson.
No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html
Rename the mediaKeys attribute 'keys' and make readonly, and add an explicit
setMediaKeys() method in HTMLMediaElement's IDL.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::keys):
* html/HTMLMediaElement.idl:
2013-08-06 Sam Weinig <sam@webkit.org>
Hashing SecurityOrigin's can lead to trouble if you mutate them :(
https://bugs.webkit.org/show_bug.cgi?id=119533
<rdar://problem/12978338>
Reviewed by Andreas Kling.
We are getting into trouble in the following circumstance:
- You have a HashMap<RefPtr<SecurityOrigin>, Value> map.
- You add security origin A (http, www.webkit.org, 80) to the map.
- You mutate security origin A by domain relaxation, so that it has the domain webkit.org.
- You add security origin B (http, www.webkit.org, 80) to the map.
- You mutate security origin B by domain relaxation, so that it has the domain webkit.org.
You now have two identical keys in the map.
- Add few more items to the map causing a rehash.
- When you try to add A and B back into the map, you will have a collision, because they now equal each other.
We should probably stop using SecurityOrigins as keys in HashMaps (and move to using a non-mutable SecurityOriginTuple,
or something), but for now, we can just only use the scheme / host / port part for equality, which is what all the users
really want.
* page/SecurityOriginHash.h:
(WebCore::SecurityOriginHash::equal):
Switch to using isSameSchemeHostPort() for SecurityOriginHash::equal().
2013-08-08 Rob Buis <rwlbuis@webkit.org>
ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
https://bugs.webkit.org/show_bug.cgi?id=113224
Reviewed by Dirk Schulze.
Do not perform from-by animations for non-additive attributes.
Test: svg/animations/non-additive-type-from-by-animation.html
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::calculateFromAndByValues):
2013-08-08 Brent Fulgham <bfulgham@apple.com>
[Windows] Improper Caption Button Displayed to Users
https://bugs.webkit.org/show_bug.cgi?id=119593
Reviewed by Eric Carlson.
Remove the custom drawing code for the Windows port, and
have it render using the CSS/SVG markup like we do on OS X.
* rendering/RenderThemeWin.cpp: Remove drawing code.
* rendering/RenderThemeWin.h: Remove declaration.
2013-08-08 Alex Christensen <achristensen@apple.com>
Work towards WebGL on AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=119562
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj:
Build GLContext.cpp and GraphicsContext3DPrivate.cpp on AppleWin port.
* WebCore.vcxproj/WebCore.vcxproj.filters:
Moved GLContext and GraphicsContext3DPrivate from Cairo filter to graphics.
* platform/graphics/GraphicsContext3D.h:
Added m_webGLLayer for AppleWin port.
* platform/graphics/GraphicsContext3DPrivate.cpp:
Protected inclusion of PlatformContextCairo.h in USE(CAIRO) macro for non-cairo ports.
* platform/graphics/win/GraphicsContext3DWin.cpp:
Removed stub GraphicsContext3DPrivate implementation in favor of GraphicsContext3DPrivate.cpp.
(WebCore::GraphicsContext3D::GraphicsContext3D):
Added GraphicsContext3DPrivate and PlatformCALayer initialization.
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
Added implementation based on Cairo ports' to be refactored soon.
(WebCore::GraphicsContext3D::platformLayer):
Return PlatformCALayer's PlatformLayer instead of 0.
2013-08-08 Jer Noble <jer.noble@apple.com>
[EME] Implement MediaKeys.isTypeSupported()
https://bugs.webkit.org/show_bug.cgi?id=119586
Reviewed by Eric Carlson.
Test: media/encrypted-media/encrypted-media-is-type-supported.html
The EME spec has removed the extra keySystem parameter from
HTMLMediaElement.canPlayType() in favor of a new isTypeSupported()
method on MediaKeys.
To implement this method, the CDMFactory needs to know whether the
registered CDM supports the specified mime type. CDMs must register
this new factory method, which requires changes to CDMPrivateAVFoundation
and MockCDM.
Add the new MediaKeys.isTypeSupported() method:
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::isTypeSupported):
* Modules/encryptedmedia/MediaKeys.h:
* Modules/encryptedmedia/MediaKeys.idl:
Add the new factory CDMSupportsKeySystemAndMimeType method:
* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDMFactory::CDMFactory): Now takes a third parameter.
(WebCore::installedCDMFactories): When adding the AVFoundation CDM, pass its new method.
(WebCore::CDM::registerCDMFactory): Now takes a third parameter.
(WebCore::CDM::keySystemSupportsMimeType): Added.
* Modules/encryptedmedia/CDM.h:
* WebCore.exp.in:
Register this new method with the factory for all concrete CDMs:
* Modules/encryptedmedia/CDMPrivateAVFoundation.h:
* Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
(WebCore::CDMPrivateAVFoundation::supportsKeySystem):
(WebCore::CDMPrivateAVFoundation::supportsKeySystemAndMimeType):
* testing/Internals.cpp:
(WebCore::Internals::initializeMockCDM):
* testing/MockCDM.cpp:
(WebCore::MockCDM::supportsKeySystem):
(WebCore::MockCDM::supportsKeySystemAndMimeType):
* testing/MockCDM.h:
2013-08-08 Rob Buis <rwlbuis@webkit.org>
Crash in WTF::RefPtr<WebCore::SpaceSplitStringData>::operator UnspecifiedBoolType
https://bugs.webkit.org/show_bug.cgi?id=118839
Reviewed by Darin Adler.
Take into account that elementData() can be null in classAttributeChanged.
Test: svg/animations/classAttributeSettingCrash.html
* dom/Element.cpp:
(WebCore::Element::classAttributeChanged):
2013-08-08 Robert Hogan <robert@webkit.org>
REGRESSION(r147019): Page has extra space
https://bugs.webkit.org/show_bug.cgi?id=119424
Reviewed by David Hyatt.
Clear the overflow rect before recomputing it in table sections.
No new tests: the reduction uses jquery and I was unable to simulate the reduction without it.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::computeOverflowFromCells):
2013-08-08 Andreas Kling <akling@apple.com>
Inserting multiple rules into an empty style sheet should avoid style recalc if possible.
<http://webkit.org/b/119568>
Reviewed by Antti Koivisto.
As a follow-up to <http://webkit.org/b/119475>, where I added a hack for inserting
a single rule into an empty style sheet, this broadens the optimization to support
any number of rules.
This optimizes the scenario where a style sheet is added to the DOM and then populated
rule-by-rule via CSSOM insertRule()/addRule() calls. Previously we'd do a full style
recalc for this case, but now we'll treat it the same as a full sheet added at once.
* css/CSSStyleSheet.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::willMutateRules):
Made willMutateRules() return whether the style sheet contents were cloned by the
copy-on-write mechanism.
* dom/Document.h:
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::insertRule):
Replaced the InsertionIntoEmptySheet mutation type by a general RuleInsertion.
The mutation callback checks if we're inserting into a rule that's not (yet) part
of the document's active sheet set. In that case, we defer doing the style sheet
until all the insertions are done (or something forces us to style+layout.)
Note that this optimization only happens if the style sheet had a single client.
Shared style sheets that just got cloned before mutation may have pointers into
them from the Document's StyleResolver, so we're forced to do an immediate sheet
update in that case.
(WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
Moved these out-of-line.
(WebCore::CSSStyleSheet::didMutateRuleFromCSSStyleDeclaration):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::StyleRuleCSSStyleDeclaration::didMutate):
Made a separate mutation callback for CSSStyleDeclaration since its needs are
so simple compared to the mutation callback from CSSStyleSheet. Seems better
than adding yet another mode to the enum.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::optimizedStyleSheetUpdateTimerFired):
(WebCore::Document::scheduleOptimizedStyleSheetUpdate):
Added mechanism to defer doing a RecalcStyleIfNeeded.
(WebCore::Document::updateStyleIfNeeded):
Synchronize the optimized style sheet update if there's one scheduled.
This ensures that stuff like layout-dependent property access won't operate
on stale style.
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::pendingUpdateType):
(WebCore::DocumentStyleSheetCollection::setPendingUpdateType):
(WebCore::DocumentStyleSheetCollection::flushPendingUpdates):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
Have DSSC track the kind of style sheet update it needs to do (instead of just
a boolean "needs update.") This is used by Document::recalcStyle() to make sure
the right kind of update happens if there's one scheduled.
(WebCore::DocumentStyleSheetCollection::activeStyleSheetsContains):
Added helper to check if a CSSStyleSheet is part of the active set.
2013-08-08 Allan Sandfeld Jensen <allan.jensen@digia.com>
[WK1] NPStream::headers not initialized
https://bugs.webkit.org/show_bug.cgi?id=119574
Reviewed by Alexey Proskuryakov.
Initialize the header field. According to user feedback that should solve some
cases of random crashes when loading plugins on Mac and Windows.
* plugins/PluginStream.cpp:
(WebCore::PluginStream::PluginStream):
2013-08-08 Andreas Kling <akling@apple.com>
Element: Modernize attribute storage accessor functions.
<http://webkit.org/b/119578>
Reviewed by Antti Koivisto.
Rename these functions to more WebKit-style names.
- const Attribute* attributeItem(index) => const Attribute& attributeAt(index)
- const Attribute* getAttributeItem(name) => const Attribute* findAttributeByName(name)
- unsigned getAttributeItemIndex(name) => unsigned findAttributeIndexByName(name)
Note that attributeAt() now returns a reference instead of a pointer. That's right.
* css/SelectorChecker.cpp:
(WebCore::attributeValueMatches):
(WebCore::anyAttributeMatches):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::checkExactAttribute):
* dom/Attr.cpp:
(WebCore::Attr::elementAttribute):
* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::getNames):
(WebCore::DatasetDOMStringMap::item):
(WebCore::DatasetDOMStringMap::contains):
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::getAttribute):
(WebCore::Element::setAttribute):
(WebCore::Element::setSynchronizedLazyAttribute):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::removeAttributeInternal):
(WebCore::Element::getAttributeNode):
(WebCore::Element::getAttributeNodeNS):
(WebCore::Element::hasAttribute):
(WebCore::Element::hasAttributeNS):
(WebCore::Element::computeInheritedLanguage):
(WebCore::Element::normalizeAttributes):
(WebCore::Element::getURLAttribute):
(WebCore::Element::getNonEmptyURLAttribute):
(WebCore::Element::detachAllAttrNodesFromElement):
(WebCore::Element::cloneAttributesFromElement):
(WebCore::ElementData::isEquivalent):
(WebCore::ElementData::findAttributeIndexByNameSlowCase):
(WebCore::ElementData::findAttributeIndexByNameForAttributeNode):
(WebCore::UniqueElementData::findAttributeByName):
(WebCore::UniqueElementData::attributeAt):
* dom/Element.h:
(WebCore::Element::findAttributeIndexByName):
(WebCore::Element::fastHasAttribute):
(WebCore::Element::fastGetAttribute):
(WebCore::Element::attributeAt):
(WebCore::Element::findAttributeByName):
(WebCore::ElementData::findAttributeByName):
(WebCore::ElementData::findAttributeIndexByName):
(WebCore::ElementData::attributeAt):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
(WebCore::NamedNodeMap::item):
* dom/Node.cpp:
(WebCore::Node::dumpStatistics):
(WebCore::Node::isDefaultNamespace):
(WebCore::Node::lookupNamespaceURI):
(WebCore::Node::lookupNamespacePrefix):
(WebCore::Node::compareDocumentPosition):
* dom/StyledElement.cpp:
(WebCore::StyledElement::makePresentationAttributeCacheKey):
(WebCore::StyledElement::rebuildPresentationAttributeStyle):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendElement):
* editing/markup.cpp:
(WebCore::completeURLs):
(WebCore::StyledMarkupAccumulator::appendElement):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parametersForPlugin):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::innerPatchNode):
(WebCore::DOMPatchSupport::createDigest):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::setAttributesAsText):
(WebCore::InspectorDOMAgent::performSearch):
(WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
* page/PageSerializer.cpp:
(WebCore::isCharsetSpecifyingNode):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::getPresentationAttribute):
* xml/XPathFunctions.cpp:
(WebCore::XPath::FunLang::evaluate):
* xml/XPathNodeSet.cpp:
(WebCore::XPath::NodeSet::traversalSort):
* xml/XPathStep.cpp:
(WebCore::XPath::Step::nodesInAxis):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
2013-08-08 Mark Lam <mark.lam@apple.com>
Restoring use of StackIterator instead of Interpreter::getStacktrace().
https://bugs.webkit.org/show_bug.cgi?id=119575.
Reviewed by Oliver Hunt.
No new tests.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-08-08 Zalan Bujtas <zalan@apple.com>
REGRESSION (r121551) Incorrect handling of invalid media query list.
https://bugs.webkit.org/show_bug.cgi?id=119164
Reviewed by Antti Koivisto.
Differentiate between syntactically invalid media queries and media queries with empty expressions.
Introduce a dedicated function for valid, but empty expression queries, so that passing NULL MediaQuerySet
object to CSSParser::createMediaRule() can indicate invalid media query.
Test: fast/media/invalid-media-query-list.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::createMediaRule):
(WebCore::CSSParser::createEmptyMediaRule):
* css/CSSParser.h:
2013-08-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGMPathElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=119566
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGMPathElement*> can
be changed with toSVGMPathElement().
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::updateAnimationPath):
* svg/SVGMPathElement.h:
(WebCore::toSVGMPathElement):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::invalidateMPathDependencies):
2013-08-08 Antti Koivisto <antti@apple.com>
Move more style recalc code to StyleResolveTree.cpp
https://bugs.webkit.org/show_bug.cgi?id=119553
Reviewed by Andreas Kling.
* css/StyleResolver.cpp:
* css/StyleResolver.h:
Remove now unused StyleResolver::styleForText.
* dom/ElementShadow.cpp:
* dom/ElementShadow.h:
Remove ElementShadow::recalcStyle.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::setResetStyleInheritance):
Use Style::resolveTree instead of ElementShadow::recalcStyle.
* dom/ShadowRoot.h:
Remove ShadowRoot::recalcStyle.
* dom/Text.cpp:
* dom/Text.h:
Remove Text::recalcTextStyle.
* style/StyleResolveTree.cpp:
(WebCore::Style::updateTextStyle):
Moved from Text::recalcTextStyle. Speed up by just setting the parent style on common case.
(WebCore::Style::resolveShadowTree):
Moved from ShadowRoot::recalcStyle.
Simplified to cover only cases that can occur with the current shadow DOM support.
(WebCore::Style::resolveTree):
2013-08-08 Andreas Kling <akling@apple.com>
REGRESSION(r139282): Old caret sometimes gets "stuck" (not repainted) in contenteditable elements.
<http://webkit.org/b/119520>
<rdar://problem/14658929>
Reviewed by Simon Fraser.
When computing a new caret rect, don't forget to repaint the old rect if the caret jumped
from one node to another.
We were being a little too clever, assuming that oldRect==newRect meant that no repaint was
necessary, but moving from (0,0) in one node to (0,0) in another would cause a ghost caret
in the old node.
Test: fast/repaint/caret-jump-between-nodes.html
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):
Fall through all the way down to caret repaints if the selection's new anchor node is not
the same as m_previousCaretNode.
2013-08-07 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Propagate overflow from the flow thread to the first and last region
https://bugs.webkit.org/show_bug.cgi?id=118526
Reviewed by David Hyatt.
The patch implements layout overflow propagation for the first and last regions. The approach
taken is triggering a simple layout on the regions after the named flows are laid out
that extracts the layout overflow from the flow thread and adds it to the regions.
The process is based on adding two new layout phases: the overflow phase and the final phase.
The overflow phase is set after the flow threads are laid out and it marks the regions as
needing to extract the overflow from the flow thread. In case there are blocks with auto overflow
it's possible the overflow to create scrollbars that shrink the regions. In this case the flow
thread is relaid out and set in the final phase, forcing the regions to recollect the layout
overflow. In theory this would be an N-step layout because scrollbars can force content to change
regions and create overflow for other blocks (and thus creating more scrollbars). For now, we are
limiting this to the first pass by inserting this new final layout phase.
A short description of the processing model for a document:
- layout the document (all the flow threads should be in the constrained layout phase after this step)
- reverse iterate through the flow threads and mark the regions for simplified layout (we need to
reverse iterate so the overflow can correctly propagate with nested regions)
- if the layout changes the size of a region, invalidate the flow thread and when laying it out mark
it as needing a new pass
- make a secondary pass through the flow threads that changed after scrollbars have been added and
recompute the overflow for their regions; mark the flow threads in the final phase (flow threads can't
be invalidated in the final phase)
- after the overflow was propagated update all the flow threads in the normal layout phase
There are some issues with the patch:
- the simplified layout doesn't compute correct overflow values for inline blocks
- the layout overflow from the flow thread doesn't take the region size into account
The first issue is not related to regions and will be fixed in a future patch. The second issue
will be fixed when box overflow will be region bound.
Tests: fast/regions/overflow-scrollable-1.html
fast/regions/overflow-scrollable-2.html
fast/regions/overflow-scrollable-3.html
fast/regions/overflow-scrollable-fit-complex.html
fast/regions/overflow-scrollable-fit.html
fast/regions/overflow-scrollable-nested.html
* rendering/FlowThreadController.cpp: Flow threads layout driver functions.
(WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
(WebCore::FlowThreadController::updateFlowThreadsIntoConstrainedPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoOverflowPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
(WebCore::FlowThreadController::updateFlowThreadsIntoFinalPhase):
* rendering/FlowThreadController.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedNormalFlowLayout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::invalidateRegions):
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::firstRegion): This getter should work even though the region chain is invalid.
(WebCore::RenderFlowThread::lastRegion): This getter should work even though the region chain is invalid.
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): If the flow thread has no overflow do nothing.
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::pageLogicalHeight):
(WebCore::RenderRegion::maxPageLogicalHeight):
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
(WebCore::RenderRegion::flowThreadPortionOverflowRect):
(WebCore::RenderRegion::overflowRectForFlowThreadPortion): Used to get the flow thread visual or layout overflow.
(WebCore::RenderRegion::layoutBlock):
(WebCore::RenderRegion::computeOverflowFromFlowThread):
(WebCore::RenderRegion::updateLogicalHeight):
* rendering/RenderRegion.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::layoutContentToComputeOverflowInRegions):
(WebCore::RenderView::layout):
* rendering/RenderView.h:
2013-08-07 Simon Fraser <simon.fraser@apple.com>
Avoid spurious "all repaint" layouts when scrolling WebViews on Retina displays
https://bugs.webkit.org/show_bug.cgi?id=119564
Reviewed by Beth Dakin.
When scrolling WebViews on Macs with Retina displays, AppKit uses
device pixels for the scroll offset, so [scrollView() documentVisibleRect]
can return a CGRect with non-integral origin. This rect is used by layout,
via layoutSize(), to decide whether the view size changed, which prompts
a full repaint. However, FrameView gets a value which has been rounded
by enclosingIntRect(), which increases the height or width by 1px if the
y or x offset is on a half-pixel, causing spurious full repaints.
Fix by plumbing through platformVisibleContentSize(), which just
gets the size of the -documentVisibleRect.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Don't get layoutHeight and layoutWidth
separately, since that is two calls down into platformVisibleContentSize.
* platform/ScrollView.cpp:
(WebCore::ScrollView::unscaledVisibleContentSize):
(WebCore::ScrollView::platformVisibleContentSize):
* platform/ScrollView.h:
* platform/mac/ScrollViewMac.mm:
(WebCore::ScrollView::platformVisibleContentSize):
2013-08-07 Simon Fraser <simon.fraser@apple.com>
Be more aggressive about sending fake mouse events less frequently
https://bugs.webkit.org/show_bug.cgi?id=119563
<rdar://problem/14669029>
Reviewed by Tim Horton.
r109151 added code that throttles back the fake mouse events that we
send during scrolling, but in such a way that a page could take up to
100ms to handle a single mousemove, and we'd still send fake mousemove
events every 100ms. This could cause serious scrolling stutter.
Fix by changing when we drop back to sending events every 250ms, rather than every
100ms: if the slowest mousemove takes 10ms or more (less than one frame), drop back
to a 250ms fake move interval.
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchFakeMouseMoveEventSoon):
2013-08-07 Adenilson Cavalcanti <cavalcantii@gmail.com>
[rendering] Implement PaintInfo interfaces
https://bugs.webkit.org/show_bug.cgi?id=119388
Reviewed by Benjamin Poulain.
In discussion in IRC, it was decided to remove this comment since implementing such change
would have a vast impact on rendering classes.
* rendering/PaintInfo.h:
2013-08-07 Dean Jackson <dino@apple.com>
Don't remove contents layer from its parent unless necessary
https://bugs.webkit.org/show_bug.cgi?id=119560
Reviewed by Simon Fraser.
RenderLayerBacking::updateInternalHierarchy() is called in some
instances where there doesn't need to be a complete reparenting of the
the m_graphicsLayer. For example, on OS X when the user changes the
scrollbar styles to/from always visible. We don't need to always
remove the graphics layer from its parent - any reparenting does that
automatically.
Unfortunately we can't trigger this situation in an automated test.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateInternalHierarchy): Don't call removeFromParent().
2013-08-07 Tim Horton <timothy_horton@apple.com>
Fall out of simple image layer optimization if the image has EXIF rotation
https://bugs.webkit.org/show_bug.cgi?id=119535
<rdar://problem/14071174>
Reviewed by Simon Fraser.
Test: fast/images/exif-orientation-composited.html
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameOrientationAtIndex):
Ensure that the frame is cached if we're requesting the orientation,
so we can acquire orientation information at any given time.
* platform/mac/DragImageMac.mm:
(WebCore::createDragImageFromImage):
* platform/graphics/BitmapImage.h:
Rename currentFrameOrientation to frameOrientationForCurrentFrame to match
the similarly-behaving nativeImageForCurrentFrame.
* platform/graphics/Image.h:
(WebCore::Image::orientationForCurrentFrame): Added. Virtual, overriden by BitmapImage.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
If the given image has a non-default image orientation, don't use direct compositing.
2013-08-07 Antti Koivisto <antti@apple.com>
fast/frames/seamless/seamless-custom-font-pruning-crash.html asserts
https://bugs.webkit.org/show_bug.cgi?id=119557
Rubber-stamped by Eric Carlson.
Pass Style::Detach style change to seamless document as Style::Force. Style::resolveTree does not expect to be called with Detach.
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::didRecalcStyle):
2013-08-07 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Disable HTTP request "Accept-Encoding:" header field on gstreamer source element to avoid receiving the wrong size when retrieving data
https://bugs.webkit.org/show_bug.cgi?id=115354
Reviewed by Philippe Normand.
The default value for the HTTP "Accept-Encoding:" header field in the request allows
compressed data to be received on requests.
While this works fine for most cases, it can break the webkit source that needs to rely on the
the proper data size when receiving the response (even though the received data is already
uncompressed the size reported in ResourceResponse::expectedContentLength() is the same
represented by the HTTP header field "Content-Length" which is the size of the compressed data).
This patch disables the HTTP "Accept-Encoding:" header field when using the request
as we don't want the received response to be encoded in any way, as we need to rely on the proper
size of the returned data on ResourceHandle::didReceiveResponse().
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcStart):
* platform/network/soup/ResourceRequest.h:
(ResourceRequestBase):
(WebCore::ResourceRequest::acceptEncoding):
(WebCore::ResourceRequest::setAcceptEncoding):
(WebCore::ResourceRequest::ResourceRequestBase):
* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::updateSoupMessage):
(WebCore::ResourceRequest::toSoupMessage):
2013-08-07 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] REGRESSION(r) Two pixel result fail after r153522
https://bugs.webkit.org/show_bug.cgi?id=119392
Reviewed by Jocelyn Turcotte.
Consider scaling transform on the painter to determine final destination size.
Covered by existing tests.
* platform/graphics/qt/ImageQt.cpp:
(WebCore::prescaleImageIfRequired):
(WebCore::BitmapImage::draw):
2013-08-07 Antti Koivisto <antti@apple.com>
2.5% regression on page cycler moz
https://bugs.webkit.org/show_bug.cgi?id=102822
Reviewed by Andreas Kling.
DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache() triggers a style recalc for quirks mode
documents in the beginning of document parsing via Document::setCompatibilityMode. This often coalesces
with style recalc triggered by stylesheet loading. However on very simple documents it can generate genuinely
unnecessary work.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
Check that we actually have cached injected stylesheets before triggering style recalc.
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
(WebCore::PageGroup::removeAllUserContent):
Fix a misspelling.
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
Always invalidate style when user sheets change since we don't do that in
DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache anymore.
* page/PageGroup.h:
2013-08-07 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Do no check seek offset against internal size on gstreamer source element
https://bugs.webkit.org/show_bug.cgi?id=116533
Reviewed by Philippe Normand.
The internal size on gstreamer source element may be wrong in case the received size in
didReceiveResponse is not accurate. Lets just try to seek and let it fail if necessary.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSeekDataCb):
2013-08-07 Antti Koivisto <antti@apple.com>
Create WebCore/style and move StyleResolveTree there
https://bugs.webkit.org/show_bug.cgi?id=119543
Reviewed by Andreas Kling.
WebCore/css is bloated. We should move the internal style representation and the style resolver
related code to a directory of their own. CSS language related code including parser and
CSSOM stays under css.
Things named StyleFoo should generally move under WebCore/style. They should also be moved to
the Style namespace at the same time.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* WebCore.pri:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolveTree.cpp: Removed.
* css/StyleResolveTree.h: Removed.
* style: Added.
* style/StyleResolveTree.cpp: Copied from Source/WebCore/css/StyleResolveTree.cpp.
* style/StyleResolveTree.h: Copied from Source/WebCore/css/StyleResolveTree.h.
2013-08-07 Antti Koivisto <antti@apple.com>
Move style recalculation out from Element
https://bugs.webkit.org/show_bug.cgi?id=119497
Reviewed by Andreas Kling.
Element currently does too much. Element::recalcStyle() and the related functions can be turned into
standalone functions that operate on DOM tree. This will also give more freedom for future refactoring,
for example making style recalculation non-recursive.
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolveTree.cpp: Added.
(WebCore::Style::determineChange):
- moved and renamed from Node::diff
- factored to use early return style
- simplifield the null input logic
(WebCore::Style::pseudoStyleCacheIsInvalid):
- moved from Element::pseudoStyleCacheIsInvalid
- narrowed to take RenderObject rather than operate on Element
(WebCore::Style::resolveLocal):
- split from Element::recalcStyle
- factored to use early return style
(WebCore::Style::resolveTree):
- moved and renamed from Element::recalcStyle
* css/StyleResolveTree.h: Added.
- introcuduce Style namespace for style related classes and functions
- move and rename Node::StyleChange -> Style::Change
* css/StyleResolver.h:
(WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
(WebCore::StyleResolverParentPusher::push):
(WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
Moved this stack helper to StyleResolver.h for now since it is needed by both
StyleRecalculation and Element.
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::attach):
(WebCore::Document::styleResolverChanged):
(WebCore::Document::webkitWillEnterFullScreenForElement):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::shouldIgnoreAttributeCase):
(WebCore::Element::updatePseudoElement):
(WebCore::Element::resetComputedStyle):
(WebCore::Element::willRecalcStyle):
(WebCore::Element::didRecalcStyle):
* dom/Element.h:
- remove Element::recalcStyle
- make a few private functions needed by StyleRecalculation public
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::recalcStyle):
* dom/ElementShadow.h:
* dom/Node.cpp:
* dom/Node.h:
- remove Node::StyleChange
- remove Node::diff
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::didRecalcStyle):
* dom/PseudoElement.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::recalcStyle):
(WebCore::ShadowRoot::setResetStyleInheritance):
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::recalcTextStyle):
* dom/Text.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didRecalcStyle):
* html/HTMLFormControlElement.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::willRecalcStyle):
* html/HTMLFrameSetElement.h:
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::didRecalcStyle):
* html/HTMLIFrameElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didRecalcStyle):
* html/HTMLMediaElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::didRecalcStyle):
* html/HTMLOptionElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::willRecalcStyle):
(WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache):
(WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache):
* html/HTMLPlugInImageElement.h:
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::reportDataReceived):
* page/Frame.cpp:
(WebCore::Frame::setPageAndTextZoomFactors):
* page/Page.cpp:
(WebCore::Page::setPageScaleFactor):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle):
* svg/SVGElement.cpp:
(WebCore::SVGElement::willRecalcStyle):
* svg/SVGElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::willRecalcStyle):
* svg/SVGUseElement.h:
2013-08-07 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Wrong auto-height region computation for nested named flows
https://bugs.webkit.org/show_bug.cgi?id=119517
Reviewed by David Hyatt.
Test: fast/regions/abspos-autoheight-nested-region.html
In the case of an (inner) auto-height region that is absolutely positioned in a named flow that is displayed in an (outer) auto-height region,
when we are doing the layout for the named flow we need to add a "forced region break" also for the case of simplified layout, otherwise
the outer auto-height region will not get the chance to compute its auto-height, ending up with a huge value that was used to initialize
the auto-height computed value before the start of the layout algorithm.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::simplifiedLayout):
2013-08-06 Stephanie Lewis <slewis@apple.com>
Update Order Files for Safari
<rdar://problem/14517392>
Unreviewed.
No change in functionality.
* WebCore.order:
2013-08-04 Sam Weinig <sam@webkit.org>
Remove support for HTML5 Microdata
https://bugs.webkit.org/show_bug.cgi?id=119480
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::nameGetter):
* bindings/js/JSHTMLElementCustom.cpp:
* bindings/js/JSMicroDataItemValueCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* dom/Document.cpp:
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::ensureCachedHTMLCollection):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeListBase::rootNode):
(WebCore::LiveNodeListBase::invalidateCache):
(WebCore::LiveNodeList::namedItem):
* dom/LiveNodeList.h:
(WebCore::LiveNodeListBase::shouldInvalidateTypeOnAttributeChange):
* dom/MicroDataItemList.cpp: Removed.
* dom/MicroDataItemList.h: Removed.
* dom/Node.cpp:
* dom/Node.h:
* dom/NodeRareData.cpp:
* dom/NodeRareData.h:
* dom/PropertyNodeList.cpp: Removed.
* dom/PropertyNodeList.h: Removed.
* dom/PropertyNodeList.idl: Removed.
* html/CollectionType.h:
* html/HTMLAnchorElement.cpp:
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.cpp:
* html/HTMLAreaElement.h:
* html/HTMLCollection.cpp:
(WebCore::shouldOnlyIncludeDirectChildren):
(WebCore::rootTypeFromCollectionType):
(WebCore::invalidationTypeExcludingIdAndNameAttributes):
(WebCore::isMatchingElement):
(WebCore::LiveNodeListBase::item):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseAttribute):
(WebCore::HTMLElement::isURLAttribute):
* html/HTMLElement.h:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.cpp:
* html/HTMLEmbedElement.h:
* html/HTMLIFrameElement.cpp:
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.cpp:
* html/HTMLImageElement.h:
* html/HTMLLinkElement.cpp:
* html/HTMLLinkElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
* html/HTMLMetaElement.cpp:
* html/HTMLMetaElement.h:
* html/HTMLObjectElement.cpp:
* html/HTMLObjectElement.h:
* html/HTMLPropertiesCollection.cpp: Removed.
* html/HTMLPropertiesCollection.h: Removed.
* html/HTMLPropertiesCollection.idl: Removed.
* html/HTMLSourceElement.cpp:
* html/HTMLSourceElement.h:
* html/HTMLTrackElement.cpp:
* html/HTMLTrackElement.h:
* html/MicroDataAttributeTokenList.cpp: Removed.
* html/MicroDataAttributeTokenList.h: Removed.
* html/MicroDataItemValue.cpp: Removed.
* html/MicroDataItemValue.h: Removed.
* html/MicroDataItemValue.idl: Removed.
2013-08-06 Tim Horton <timothy_horton@apple.com>
Remove PlatformCALayer::contentsTransform and ::setContentsTransform
https://bugs.webkit.org/show_bug.cgi?id=119529
Reviewed by Sam Weinig.
No new tests, removing dead code.
These methods are not used and are currently unimplemented.
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
2013-08-06 Alex Christensen <achristensen@apple.com>
Moved GraphicsContext3DPrivate out of cairo directory to be used by the AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=119525
Reviewed by Dean Jackson.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Changed location of GraphicsContext3DPrivate.cpp and GraphicsContext3DPrivate.h.
* platform/graphics/GraphicsContext3DPrivate.cpp: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.cpp.
* platform/graphics/GraphicsContext3DPrivate.h: Copied from WebCore/platform/graphics/cairo/GraphicsContext3DPrivate.h.
* platform/graphics/cairo/GraphicsContext3DPrivate.cpp: Removed.
* platform/graphics/cairo/GraphicsContext3DPrivate.h: Removed.
2013-08-06 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r153754 and r153757.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc): Don't force std::remainder, since we are using our own
custom implementation on Windows.
2013-08-06 Brent Fulgham <bfulgham@apple.com>
Improper Calculation of In-band Cue Colors
https://bugs.webkit.org/show_bug.cgi?id=119523
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::makeRGBA32FromARGBCFArray): Remove redundant multiplication by
255. The internal conversion logic already converts to bytes.
2013-08-06 Rob Buis <rwlbuis@webkit.org>
Speculative build fix after r153754.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
2013-07-23 David Farler <dfarler@apple.com>
Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
https://bugs.webkit.org/show_bug.cgi?id=117762
Reviewed by Mark Rowe.
No new tests necessary.
* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* Configurations/WebCore.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/WebCoreTestShim.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/WebCoreTestSupport.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* WebCore.xcodeproj/project.pbxproj:
Don't use ASAN for build tools.
2013-08-05 Rob Buis <rwlbuis@webkit.org>
SVG stroke-dasharray is not animatable
https://bugs.webkit.org/show_bug.cgi?id=118574
Reviewed by Dirk Schulze.
Make stroke-dasharray a property that can be animated using CSS transitions.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::CSSPropertyAnimation::ensurePropertyMap):
* rendering/style/RenderStyle.h:
2013-08-06 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Allow defining named grid lines on the grid element
https://bugs.webkit.org/show_bug.cgi?id=118255
Reviewed by Andreas Kling.
From Blink r149798 by <jchaffraix@chromium.org>
This change adds parsing, style resolution and getComputedStyle
support for named grid lines at the grid element level
(i.e. extends our <track-list> support). Per the specification, we
allow multiple grid lines with the same name.
To fully support resolving the grid lines to a position on our
grid, we need to add the parsing at the grid item's level (which
means extending our <grid-line> support). This will be done in a
follow-up change.
Test: fast/css-grid-layout/named-grid-line-get-set.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::addValuesForNamedGridLinesAtIndex):
(WebCore::valueForGridTrackList):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackList):
* css/StyleResolver.cpp:
(WebCore::createGridTrackList):
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator==):
2013-08-06 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Fix minimal build.
Unreviewed build fix.
Fix build witt XSLT disabled
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
2013-08-06 Zan Dobersek <zdobersek@igalia.com>
webkit-gtk fails to build with bison-3.0
https://bugs.webkit.org/show_bug.cgi?id=119373
Reviewed by Gustavo Noronha Silva.
* GNUmakefile.am: Remove rules for generating ANGLE's glslang source files with Bison.
2013-06-26 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Add support for parsing <grid-line> that includes a 'span'
https://bugs.webkit.org/show_bug.cgi?id=118051
Reviewed by Andreas Kling.
From Blink r148766 by <jchaffraix@chromium.org>
This adds the parsing, style resolution and getComputedStyle bits
to our code. The rendering code was not made aware of the new type
of GridPosition yet.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridPosition):
* css/CSSParser.h:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustGridItemPosition):
(WebCore::createGridPosition):
* css/StyleResolver.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/style/GridPosition.h:
(WebCore::GridPosition::isInteger):
(WebCore::GridPosition::isSpan):
(WebCore::GridPosition::setSpanPosition):
(WebCore::GridPosition::spanPosition):
2013-06-25 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Rename grid placement properties
https://bugs.webkit.org/show_bug.cgi?id=117878
Reviewed by Andreas Kling.
Renamed the grid placement properties to match the latest version
of the spec. The new names are -webkit-grid-column-{start|end} and
-webkit-grid-row-{start|end}.
No new tests needed as we're just renaming some properties,
functionality already covered by existing tests in
fast/css-grid-layout.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StylePropertyShorthand.cpp:
(WebCore::webkitGridColumnShorthand):
(WebCore::webkitGridRowShorthand):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::maximumIndexInDirection):
(WebCore::RenderGrid::resolveGridPositionsFromStyle):
(WebCore::RenderGrid::resolveGridPositionFromStyle):
* rendering/RenderGrid.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridItemData.cpp:
(WebCore::StyleGridItemData::StyleGridItemData):
* rendering/style/StyleGridItemData.h:
(WebCore::StyleGridItemData::operator==):
2013-08-05 Przemyslaw Szymanski <p.szymanski3@samsung.com>
[WebGL] validateRenderingState method name change
https://bugs.webkit.org/show_bug.cgi?id=119485
According to validateRenderingState method functionality its name should be
changed. This method validates only vertex attributes.
Reviewed by Dean Jackson.
No new tests. Covered by existing tests. No changes in functionality.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateVertexAttributes):
(WebCore::WebGLRenderingContext::drawArrays):
(WebCore::WebGLRenderingContext::drawElements):
* html/canvas/WebGLRenderingContext.h:
2013-07-27 Mark Rowe <mrowe@apple.com>
Logging should be configurable using human-readable channel names rather than crazy bitmasks
<http://webkit.org/b/119031>
Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
"all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
for history and loading being enabled.
For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
the old user defaults to remain set for those people that need to switch between version of WebKit before and
after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
consistency with the other platforms and to enable more code sharing.
While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
adding a new logging channel. Now only the header in the relevant project needs to be updated.
Reviewed by Sam Weinig.
* GNUmakefile.list.am: Remove the now-unused InitializeLogging.h
* Target.pri: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* platform/InitializeLogging.h: Removed. Ditto.
* platform/Logging.cpp: Use WEBCORE_LOG_CHANNELS to define all of the channels.
(WebCore::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
to find a log channel rather than repeating the names of the log channels a further two times each.
(WebCore::initializeLoggingChannelsIfNecessary): Pass the channels and the log level string to the new
WTF function that handles the initialization.
* platform/Logging.h: Declare a WEBCORE_LOG_CHANNELS macro that can be used to apply a preprocessor macro
across the set of all logging channels. Use this macro to declare the logging channels.
* platform/blackberry/LoggingBlackBerry.cpp:
(WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
* platform/efl/LoggingEfl.cpp:
(WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
NotYetImplemented to it so that that channel will be enabled by default.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Accommodate the rename to logChannelByName.
* platform/gtk/LoggingGtk.cpp:
(WebCore::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable, and then prepend
NotYetImplemented to it so that that channel will be enabled by default.
* platform/mac/LoggingMac.mm:
(WebCore::logLevelString): Pull the value out of the WebCoreLogging user default key.
* platform/qt/LoggingQt.cpp:
(WebCore::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable, and then prepend
NotYetImplemented to it so that the channel will be enabled by default.
* platform/win/LoggingWin.cpp:
(WebCore::logLevelString): Pull the value out of the WebCoreLogging environment variable.
2013-08-05 Ryosuke Niwa <rniwa@webkit.org>
Editor::updateMarkersForWordsAffectedByEditing(bool) shouldn't compute start and end of words when there are nor markers
https://bugs.webkit.org/show_bug.cgi?id=119501
Reviewed by Enrica Casucci.
Exit early in updateMarkersForWordsAffectedByEditing before calling startOfWord and endOfWord if there are no document markers.
* dom/DocumentMarkerController.h:
(WebCore::DocumentMarkerController::hasMarkers): Added.
* editing/Editor.cpp:
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
2013-08-05 Dean Jackson <dino@apple.com>
Update HTMLPreloadScanner to handle img srcset
https://bugs.webkit.org/show_bug.cgi?id=119360
Reviewed by Sam Weinig.
This patch is a merge of similar patches from Yoav Weiss <yoav@yoav.ws>
and Dean Jackson.
Test: fast/preloader/image-srcset.html
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Move srcset parsing into
HTMLParserIdioms, and call it when we hit src or srcset.
* html/HTMLImageElement.h: Remove code that was moved to HTMLParserIdioms.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer): Pass device scale into preloader.
(WebCore::HTMLDocumentParser::insert):
* html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Takes device scale as a parameter.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes): Resolve between src and srcSet if necessary.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Add support for srcset attribute.
(WebCore::TokenPreloadScanner::StartTagScanner::setUrlToLoad): New flag to indicate if we should
replace any existing value.
(WebCore::TokenPreloadScanner::TokenPreloadScanner): Takes device scale.
(WebCore::TokenPreloadScanner::scanCommon): Pass device scale.
(WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
* html/parser/HTMLPreloadScanner.h: New attribute to constructor for device scale. New member
variable on TokenPreloadScanner that holds the srcset value.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::ImageWithScale::operator==): Used for sorting.
(WebCore::compareByScaleFactor): Used for sorting.
(WebCore::bestFitSourceForImageAttributes): New method that takes the code from HTMLImageElement
for parsing src and srcset attributes, and finding the best match.
* html/parser/HTMLParserIdioms.h:
2013-08-05 Oliver Hunt <oliver@apple.com>
Move TypedArray implementation into JSC
https://bugs.webkit.org/show_bug.cgi?id=119489
Reviewed by Filip Pizlo.
Update WebCore for new location of TypedArray implementation.
* ForwardingHeaders/runtime/ArrayBuffer.h: Added.
* ForwardingHeaders/runtime/ArrayBufferView.h: Added.
* ForwardingHeaders/runtime/Float32Array.h: Added.
* ForwardingHeaders/runtime/Float64Array.h: Added.
* ForwardingHeaders/runtime/Int16Array.h: Added.
* ForwardingHeaders/runtime/Int32Array.h: Added.
* ForwardingHeaders/runtime/Int8Array.h: Added.
* ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Added.
* ForwardingHeaders/runtime/TypedArrayBase.h: Added.
* ForwardingHeaders/runtime/Uint16Array.h: Added.
* ForwardingHeaders/runtime/Uint32Array.h: Added.
* ForwardingHeaders/runtime/Uint8Array.h: Added.
* ForwardingHeaders/runtime/Uint8ClampedArray.h: Added.
* Modules/webaudio/AnalyserNode.h:
(WebCore::AnalyserNode::getFloatFrequencyData):
(WebCore::AnalyserNode::getByteFrequencyData):
(WebCore::AnalyserNode::getByteTimeDomainData):
* Modules/webaudio/AsyncAudioDecoder.cpp:
* Modules/webaudio/AsyncAudioDecoder.h:
(WebCore::AsyncAudioDecoder::DecodingTask::audioData):
* Modules/webaudio/AudioBuffer.h:
* Modules/webaudio/AudioContext.cpp:
* Modules/webaudio/AudioParam.h:
* Modules/webaudio/AudioParamTimeline.h:
* Modules/webaudio/PeriodicWave.h:
* Modules/webaudio/RealtimeAnalyser.cpp:
* Modules/webaudio/RealtimeAnalyser.h:
* Modules/webaudio/ScriptProcessorNode.cpp:
* Modules/webaudio/WaveShaperProcessor.h:
* Modules/websockets/ThreadableWebSocketChannel.h:
* Modules/websockets/WebSocket.cpp:
* Modules/websockets/WebSocket.h:
* Modules/websockets/WebSocketChannel.cpp:
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
* WebCore.exp.in:
* bindings/js/JSArrayBufferCustom.cpp:
* bindings/js/JSArrayBufferViewHelper.h:
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSCryptoCustom.cpp:
* bindings/js/JSDictionary.h:
* bindings/js/JSFileReaderCustom.cpp:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
* bindings/js/SerializedScriptValue.h:
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(GenerateHeader):
(NativeToJSValue):
* dom/MessageEvent.h:
* fileapi/FileReader.cpp:
* fileapi/FileReader.h:
* fileapi/FileReaderLoader.cpp:
* fileapi/FileReaderLoader.h:
* fileapi/FileReaderSync.cpp:
* fileapi/FileReaderSync.h:
* fileapi/WebKitBlobBuilder.cpp:
* fileapi/WebKitBlobBuilder.h:
* html/HTMLMediaElement.cpp:
* html/ImageData.h:
* html/canvas/ArrayBuffer.idl:
* html/canvas/ArrayBufferView.idl:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/DataView.h:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/canvas/WebGLBuffer.h:
(WebCore::WebGLBuffer::elementArrayBuffer):
* html/canvas/WebGLGetInfo.cpp:
* html/canvas/WebGLGetInfo.h:
* html/canvas/WebGLRenderingContext.cpp:
* html/canvas/WebGLRenderingContext.h:
* inspector/InspectorMemoryAgent.cpp:
* page/Crypto.cpp:
* page/Crypto.h:
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/ImageBuffer.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/cg/ImageBufferDataCG.h:
* platform/graphics/filters/FEBlend.cpp:
* platform/graphics/filters/FEColorMatrix.cpp:
* platform/graphics/filters/FEComponentTransfer.cpp:
* platform/graphics/filters/FEComposite.cpp:
* platform/graphics/filters/FEConvolveMatrix.cpp:
* platform/graphics/filters/FECustomFilter.cpp:
* platform/graphics/filters/FEDisplacementMap.cpp:
* platform/graphics/filters/FEDropShadow.cpp:
* platform/graphics/filters/FEGaussianBlur.cpp:
* platform/graphics/filters/FELighting.h:
* platform/graphics/filters/FEMorphology.cpp:
* platform/graphics/filters/FETurbulence.cpp:
* platform/graphics/filters/FilterEffect.cpp:
* platform/graphics/filters/FilterEffect.h:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* testing/Internals.h:
* xml/XMLHttpRequest.cpp:
* xml/XMLHttpRequest.h:
(WebCore::XMLHttpRequest::optionalResponseArrayBuffer):
2013-08-05 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/14637103> REGRESSION (r153060?): Microphone appears in the way
of text when dictating an e-mail
https://bugs.webkit.org/show_bug.cgi?id=119496
Reviewed by Ryosuke Niwa.
Test: platform/mac/editing/input/firstrectforcharacterrange-caret-in-br.html
* rendering/RenderObject.cpp: (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
FloatRect::unite() doesn't preserve empty rects, which we need here.
We alrady handle the case of collapsed range in Editor::firstRectForRange(), and
this is similar, but we can't currently cover both with one simple fix.
2013-08-05 Morten Stenshorne <mstensho@opera.com>
Region based columns not painted correctly in non-default writing-modes
https://bugs.webkit.org/show_bug.cgi?id=118506
Reviewed by David Hyatt.
The column translation offset was calculated incorrectly.
The dirty rect intersection check was also wrong.
Added some documentation, to make it clear what's going on.
Tests: fast/multicol/newmulticol/hide-box-horizontal-bt.html
fast/multicol/newmulticol/hide-box-vertical-lr.html
fast/multicol/newmulticol/hide-box-vertical-rl.html
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::collectLayerFragments):
2013-08-05 Morten Stenshorne <mstensho@opera.com>
Region based columns not clipped properly
https://bugs.webkit.org/show_bug.cgi?id=118499
Reviewed by David Hyatt.
Need to call RenderRegion::overflowRectForFlowThreadPortion() first,
and THEN clip in the column gaps. overflowRectForFlowThreadPortion()
expands the logical left and right to the flow thread's overflow
rectangle, effectively defeating inline direction clipping completely.
Tests: fast/multicol/newmulticol/clipping-overflow-hidden.html
fast/multicol/newmulticol/clipping-top-overflow.html
fast/multicol/newmulticol/clipping.html
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
2013-08-05 Vivek Galatage <vivek.vg@samsung.com>
XMLTreeViewer should be created only in the XML viewer mode
https://bugs.webkit.org/show_bug.cgi?id=119483
Reviewed by Alexey Proskuryakov.
XMLTreeViewer is created even for the XSL transform which is avoided by the patch.
The XMLTreeViewer::hasNoStyleInformation() is moved to XMLDocumentParserLibxml2.cpp
as static inline method as XMLTreeViewer should not have the responsibility for it.
Also removes an unnecessary conditional check while deciding for XML viewer mode.
Blink patch review links:
https://codereview.chromium.org/19552003/
https://codereview.chromium.org/22150003/
No new tests as the patch is about code refactoring.
* xml/XMLTreeViewer.cpp:
* xml/XMLTreeViewer.h:
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
(WebCore::XMLDocumentParser::doEnd):
2013-08-03 Jer Noble <jer.noble@apple.com>
Loading a video with a custom URL scheme will result in stalling playback
https://bugs.webkit.org/show_bug.cgi?id=119469
Reviewed by Eric Carlson.
Break the assumption that only one AVAssetResourceRequest will be outstanding simultaneously
by storing a HashMap of AVAssetResourceRequests and their resulting WebCoreAVFResourceLoader.
When loading is stopped (due to completion or error), notify the MediaPlayerPrivateAVFoundation
parent so that the map can be emptied.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Store the request
in m_resourceLoaderMap.
(WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Pull the request from
m_resourceLoaderMap.
(WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Remove the requset from
m_resourceLoaderMap.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::create): Return a PassRefPtr, rather than a PassOwnPtr.
(WebCore::WebCoreAVFResourceLoader::stopLoading): Call didStopLoadingRequest.
2013-08-05 Abhijeet Kandalkar <abhijeet.k@samsung.com>
Spatial Navigation should avoid unwanted calculation while deciding focus candidate.
https://bugs.webkit.org/show_bug.cgi?id=117265
Reviewed by Antonio Gomes.
Spatial Navigation should consider only those nodes as candidate which are exactly in the focus-direction.
e.g. If we are moving down then the nodes that are above CURRENT focused node should be considered as invalid.
Added isValidCandidate() which checks whether node is exactly in the focus-direction.
Test: fast/spatial-navigation/snav-search-optimization.html
* page/FocusController.cpp:
(WebCore::FocusController::findFocusCandidateInContainer):
(WebCore::FocusController::advanceFocusDirectionally):
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
(WebCore::Page::setLastSpatialNavigationCandidateCount):
(WebCore::Page::lastSpatialNavigationCandidateCount):
* page/SpatialNavigation.cpp:
(WebCore::isValidCandidate):
* page/SpatialNavigation.h:
* testing/Internals.cpp:
(WebCore::Internals::lastSpatialNavigationCandidateCount):
* testing/Internals.h:
* testing/Internals.idl:
2013-08-05 Mihai Tica <mitica@adobe.com>
[CSS Background Blending] Specifying background-image and background-color
with opaque image doesn't trigger blending. The fix consists of adding a
check whether blend mode is set in hasOpaqueImage.
https://bugs.webkit.org/show_bug.cgi?id=119434
Reviewed by Dirk Schulze.
Test: css3/compositing/background-blend-mode-separate-layer-declaration.html
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::hasOpaqueImage):
2013-08-04 Zalan Bujtas <zalan@apple.com>
Background doesn't fully repaint when body has margins.
https://bugs.webkit.org/show_bug.cgi?id=119033
Reviewed by Simon Fraser.
Ensure that background-color changes do not leave unpainted areas when
body has margins.
Both <body> and <html> background-color get propagated up to the viewport.
If <body> has background-color attribute set, while <html> doesn't, the color is
applied not only on the <body> but on both the <html> and the viewport. However,
it's not enough to mark the RenderView dirty because with tiles backing on,
there could be areas outside of the viewport that need repaint. By marking
the RenderView's graphics layer dirty instead, we ensure that all the related
tiles get marked dirty too and the new background color covers all areas.
Manual test added. When forcing top-level composition on (even with embedded iframe to
make sure we don't do paintsIntoWindow rendering), the test case execution changes so much,
that the repaint rects don't reflect the functionality difference anymore.
* page/FrameView.cpp:
(WebCore::FrameView::reset):
(WebCore::FrameView::layout):
* page/FrameView.h:
(WebCore::FrameView::needsFullRepaint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleWillChange):
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::removeChildNode):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintRootContents):
(WebCore::RenderView::repaintViewAndCompositedLayers):
* rendering/RenderView.h:
2013-08-04 Andreas Kling <akling@apple.com>
Document needn't expose its active element.
<http://webkit.org/b/119466>
Reviewed by Antonio Gomes.
The Document::m_activeElement pointer is only used inside updateHoverActiveState(),
so we can remove the activeElement()/setActiveElement() accessors.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
2013-08-04 Andreas Kling <akling@apple.com>
Inserting a rule into an empty style sheet shouldn't trigger style recalc unless necessary.
<http://webkit.org/b/119475>
<rdar://problem/14643481>
Reviewed by Antti Koivisto.
This is kind of a cheesy optimization, but it turns out that the use case is quite common.
The pattern goes like this:
(1) Create <style> element.
(2) Add it to the document's <head>.
(3) .addRule() one rule through the CSSOM API.
Prior to this patch, (3) would always cause a full (deferred) style recalc.
Now that we exclude empty style sheets from the document's (effective) active set,
we can piggyback on the style invalidation analysis when transitioning from an empty
sheet to a single-rule sheet.
In other words, add a special code path for the first rule insertion into an empty,
in-document style sheet to minimize the amount of invalidation that happens.
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::insertRule):
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
(WebCore::CSSStyleSheet::RuleMutationScope::~RuleMutationScope):
2013-08-04 Claudio Saavedra <csaavedra@igalia.com>
[GTK] Fix a C++11 warning.
Rubber-stamped by Martin Robinson.
* platform/gtk/FileSystemGtk.cpp:
(WebCore::sharedResourcesPath): Fix a C++11 warning.
2013-08-04 Diego Pino Garcia <dpino@igalia.com>
[GTK] Remove legacy hack in CodeGeneratorGObject.pm
https://bugs.webkit.org/show_bug.cgi?id=117545
Reviewed by Carlos Garcia Campos.
There's a checking that sets gtype to uint in case it's ushort. gtype
is a value obtained from GetGValueTypeName(), which never returns
ushort.
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty): remove unnecessary glitch
2013-08-04 Andreas Kling <akling@apple.com>
[Mac] Disable screen font substitution at WebCore-level in OS X 10.9+
<http://webkit.org/b/119474>
<rdar://problem/14643349>
Reviewed by Dan Bernstein.
Disable screen font substitution by default in Settings so internal WebCore clients
such as SVG-as-image will get the right default setting.
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
(WebCore::Settings::setScreenFontSubstitutionEnabled):
* page/Settings.h:
(WebCore::Settings::screenFontSubstitutionEnabled):
* page/Settings.in:
* page/mac/SettingsMac.mm:
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
2013-08-03 Tim Horton <timothy_horton@apple.com>
Refine the unavailable plug-in indicator
https://bugs.webkit.org/show_bug.cgi?id=119400
<rdar://problem/14616012>
Reviewed by Oliver Hunt.
Add a border, flip the text and background colors, and make the indicator
much higher contrast, to be more visible on a variety of sites.
Also, refine the arrow to be less blocky and inlaid inside a circle.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::replacementTextRoundedRectPressedColor):
(WebCore::replacementTextRoundedRectColor):
(WebCore::replacementTextColor):
(WebCore::unavailablePluginBorderColor):
(WebCore::drawReplacementArrow):
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
* rendering/RenderEmbeddedObject.h:
2013-08-03 Yoav Weiss <yoav@yoav.ws>
PreloadScanner preloads external CSS with non-matching media attribute
https://bugs.webkit.org/show_bug.cgi?id=106198
Reviewed by Dean Jackson.
Test: http/tests/loading/preload-css-test.html
* html/parser/HTMLPreloadScanner.cpp:
Remove m_linkMediaAttributeIsScreen
Remove MediaQueryEvaluator calls
Add m_mediaAttribute that gets the value of the "media" attribute
Pass m_mediaAttribute to PreloadRequest
(WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
(WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
(WebCore::TokenPreloadScanner::StartTagScanner::shouldPreload):
* html/parser/HTMLResourcePreloader.cpp:
Add MediaQueryEvaluator calls to see if "media" matches
Perform preload only to resource with a matching media (if media exists)
(WebCore::PreloadRequest::isSafeToSendToAnotherThread):
(WebCore::mediaAttributeMatches):
(WebCore::HTMLResourcePreloader::preload):
* html/parser/HTMLResourcePreloader.h:
Add a constructor with a mediaAttribute value
Add m_mediaAttribute & its getter.
(WebCore::PreloadRequest::create):
(WebCore::PreloadRequest::media):
(WebCore::PreloadRequest::PreloadRequest):
2013-08-03 Andreas Kling <akling@apple.com>
RenderBoxModelObject::firstLetterRemainingText should be a RenderTextFragment*.
<http://webkit.org/b/119181>
Reviewed by Sam Weinig.
De-generalize this code a bit since we know that the firstLetterRemainingText() is always
going to be a RenderTextFragment.
* rendering/RenderBoxModelObject.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::firstLetterRemainingText):
(WebCore::RenderBoxModelObject::setFirstLetterRemainingText):
Make these two deal in RenderTextFragment*.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetterStyle):
Tighten up some pointer types so we don't have to cast as much.
2013-08-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGMaskElement(), and use it
https://bugs.webkit.org/show_bug.cgi?id=119443
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGMaskElement*> can
be changed with toSVGMaskElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155432
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
(WebCore::RenderSVGResourceMasker::resourceBoundingBox):
* rendering/svg/RenderSVGResourceMasker.h:
* svg/SVGMaskElement.h:
(WebCore::toSVGMaskElement):
2013-08-02 Benjamin Poulain <bpoulain@apple.com>
REGRESSION (r153005): Crash in SpaceSplitString::spaceSplitStringContainsValue on Facebook
https://bugs.webkit.org/show_bug.cgi?id=119384
Reviewed by Alexey Proskuryakov.
When removing the "rel" attribute from HTMLAnchorElement, we parse the attribute for no value.
Following r153005, we no longer checked for null String, which caused a crash in that case.
Creating a SpaceSplitString from a null string causes the SpaceSplitString to be null. In that case
SpaceSplitString::contains() would always return false.
This patch modify SpaceSplitString::spaceSplitStringContainsValue() to follow the exact same
behavior.
Test: fast/dom/HTMLAnchorElement/remove-rel-attribute.html
* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
2013-08-02 Dean Jackson <dino@apple.com>
Force elements with perspective or preserve-3d to disallow direct composited backgrounds
https://bugs.webkit.org/show_bug.cgi?id=119462
<rdar://problem/14607548>
Reviewed by Simon Fraser.
Bug 119461 (http://wkb.ug/119461) describes how a directly composited
background color can intersect with its children. It's not clear exactly
what the best way to fix that is, but for the moment we should disallow
any element that has perspective or a preserve-3d transform style from
getting a directly composited background.
Test: compositing/background-color/no-composited-background-color-when-perspective.html
* rendering/RenderLayerBacking.cpp:
(WebCore::hasPerspectiveOrPreserves3D): New static helper.
(WebCore::supportsDirectBoxDecorationsComposition): Return false if the above function is true.
2013-08-02 Oliver Hunt <oliver@apple.com>
Update binding test results
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::getOwnPropertyDescriptor):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertyDescriptor):
2013-08-02 Gavin Barraclough <barraclough@apple.com>
Remove no-arguments constructor to PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119460
Reviewed by Geoff Garen.
This constructor was unsafe if getValue is subsequently called,
and the property is a getter. Simplest to just remove it.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertyDescriptor):
(WebCore::DialogHandler::returnValue):
* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
* bindings/js/JSPluginElementFunctions.cpp:
(WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::deleteProperty):
(WebCore::JSStorage::putDelegate):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertyDescriptorBody):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertyDescriptor):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::getOwnPropertyDescriptor):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
2013-08-02 Andreas Kling <akling@apple.com>
Removing a <link> element with an empty stylesheet shouldn't trigger style recalc.
<http://webkit.org/b/119442>
<rdar://problem/14631785>
Reviewed by Antti Koivisto.
Let Document decide whether or not to do a style recalc after a <link> element is removed.
This avoids unnecessary work when removing a <link> that refers to an empty style sheet.
Some Facebook pages have a <link rel="stylesheet" href="data:text/css;base64,"> that gets
removed during the initial page load, causing style recalc.
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::removedFrom):
Use DeferRecalcStyleIfNeeded. Since the style sheet is being removed, it will either
cause a recalc (because it's no longer in the set of active sheets) or do nothing.
2013-08-02 Patrick Gansterer <paroga@webkit.org>
Remove WebCore folder from include statements
https://bugs.webkit.org/show_bug.cgi?id=119438
Reviewed by Darin Adler.
This aligns the style of the changed files with the other WebCore code.
* platform/network/curl/CurlDownload.cpp:
* platform/network/curl/CurlDownload.h:
2013-08-02 Ryosuke Niwa <rniwa@webkit.org>
FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
https://bugs.webkit.org/show_bug.cgi?id=119309
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2013-08-02 Christophe Dumez <ch.dumez@sisa.samsung.com>
compareDocumentPosition() should report PRECEDING or FOLLOWING information even if nodes are disconnected
https://bugs.webkit.org/show_bug.cgi?id=119316
Reviewed by Ryosuke Niwa.
As per the latest specification, compareDocumentPosition() should report PRECEDING or FOLLOWING
information even if nodes are disconnected:
- http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
This behavior is consistent with both IE10, Firefox 22 and since recently Blink.
No new tests, covered by existing tests.
* dom/Node.cpp:
(WebCore::compareDetachedElementsPosition):
(WebCore::Node::compareDocumentPosition):
2013-08-02 Simon Fraser <simon.fraser@apple.com>
Revert r153632, since it caused fast/forms/change-form-element-document-crash.html
to assert.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2013-08-02 Mario Sanchez Prada <mario.prada@samsung.com>
Implement atk_text_get_text_*_offset for WORD
https://bugs.webkit.org/show_bug.cgi?id=114871
Reviewed by Martin Robinson.
Re-implement this functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(textForObject): Made the parameter a const, to avoid warnings.
(getSelectionOffsetsForObject): Add special cases for END boundaries.
(emptyTextSelectionAtOffset): Convenience function to be used in
early returns from functions returning both text and offsets.
(webkitAccessibleTextGetChar): Use emptyTextSelectionAtOffset(),
and remove checks that are now done outside of this function, in
webkitAccessibleTextGetTextForOffset().
(nextWordStartPosition): Helper function to reliably find the
start of the next word as and user would do it by navigating with
Ctrl and the arrows (considering spaces and punctuation).
(previousWordEndPosition): Similar to nextWordStartPosition, but
written to help find the end of the previous one.
(wordAtPositionForAtkBoundary): Helper function to find the word
at a given position considering values of AtkTextBoundary.
(numberOfReplacedElementsBeforeOffset): Helper function to help
figure out how many embedded objects we have exposed for an
AtkText object, used to adjust offsets coming from outside.
(webkitAccessibleTextGetWordForBoundary): New function,
implementing atk_text_get_text_*_offset for WORD.
(webkitAccessibleTextGetTextForOffset): Replace usage of Gail for
WORD boundaries with webkitAccessibleTextGetWordForBoundary().
Also, moved the initialization of the start and end offsets to the
bottom, into the gail/pango section, since those values will be
from now on initialized in getSelectionOffsetsForObject().
(webkitAccessibleTextGetSelection): Removed the initialization of
the start and end offsets, since those values will be from now on
initialized in getSelectionOffsetsForObject().
2013-08-02 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Buildfix for !ENABLE(SVG) platforms after r153581.
https://bugs.webkit.org/show_bug.cgi?id=119444
Reviewed by Andreas Kling.
Adding missing guards.
* css/StylePropertyShorthand.cpp:
(WebCore::matchingShorthandsForLonghand):
* css/StylePropertyShorthand.h:
2013-08-02 Brady Eidson <beidson@apple.com>
REGRESSION (r130783): Scrolling is broken going back to a cached page from a page that still has outstanding subresources.
<rdar://problem/14601124> and https://bugs.webkit.org/show_bug.cgi?id=119416
Reviewed by Darin Adler.
Test: http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::stopLoading): Always explicitly cancel the Document parser when stopLoading is called.
2013-08-02 Antoine Quint <graouts@apple.com>
<input type="search"> doesn't correctly handle the "size" attribute
https://bugs.webkit.org/show_bug.cgi?id=119174
We weren't taking into account the decorations for search fields (results and close buttons)
when computing the preferred logical width for these fields based on the "size" attribute
and as a result we would not guarantee that we could show the number of characters set by
the "size" attribute.
To make the process of reporting extra width due to decorations cleaner, we add a new decorationWidth()
method for InputType subclasses to override and called through HTMLInputElement::decorationWidth()
and have NumberInputType and SearchInputType return custom decoration widths.
Reviewed by Darin Adler.
Test: fast/forms/search/search-size-with-decorations.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::decorationWidth):
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::decorationWidth):
* html/InputType.h:
Expose a new method to get the width for the input's decoration through the InputType.
* html/NumberInputType.cpp:
(WebCore::NumberInputType::decorationWidth):
* html/NumberInputType.h:
Override InputType::decorationWidth() to return the decoration width for a number input
using the same code previously used in RenderTextControlSingleLine::preferredContentLogicalWidth().
* html/SearchInputType.cpp:
(WebCore::SearchInputType::sizeShouldIncludeDecoration):
Override InputType::sizeShouldIncludeDecoration() to return true since search fields
have custom decoration adding to the size of the field.
(WebCore::SearchInputType::decorationWidth):
Return the combined size of the results and cancel buttons, as available.
* html/SearchInputType.h:
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
Remove the code specific to NumberInputType (which was moved to InputType::decorationWidth())
and replace it with a call to HTMLInputElement::decorationWidth() since this method will now
return the extra decoration width for an input element should it have any.
2013-08-02 Patrick Gansterer <paroga@webkit.org>
[WIN] Fix build without precompiled header.
* accessibility/win/AccessibilityObjectWrapperWin.h: Added missing include.
* rendering/RenderThemeWin.cpp: Ditto.
2013-08-02 Byungwoo Lee <bw80.lee@samsung.com>
Remove redundant call of argsList->current() from loops in CSSParser.
https://bugs.webkit.org/show_bug.cgi?id=119432
Reviewed by Christophe Dumez.
while loops in CSSParser call argList->current() function at the start
of each iteration, but this is redundant because argsList->next() at
the end of the iteration calls the argList->current() and returns the
result.
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155402
* css/CSSParser.cpp:
(WebCore::CSSParser::parseMixFunction):
(WebCore::CSSParser::parseCustomFilterFunctionWithInlineSyntax):
2013-08-01 Andreas Kling <akling@apple.com>
Removing an empty style sheet shouldn't trigger style recalc.
<http://webkit.org/b/119428>
<rdar://problem/14629045>
Reviewed by Antti Koivisto.
Teach DocumentStyleSheetCollection to filter out empty style sheets when deciding whether
or not to trigger a style recalc. We can then be clever when an empty style sheet is removed
from the document, and avoid causing extra work.
Some pages use this pattern:
(1) Create a <style> element.
(2) Add it to the document's <head> element.
(3) Insert some CSS as a text child of the <style> element.
Since the <style> element is already inside the document at (3), we had to treat this as an
old style sheet being removed, even though it was just an empty sheet of nothing.
With this patch, Document gains enough smarts to know that removing/adding an empty sheet
won't affect layout/rendering in any meaningful way, thus a style recalc can be avoided.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::styleResolverChanged):
Add a DeferRecalcStyleIfNeeded mode to styleResolverChanged().
* css/CSSStyleSheet.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::clearOwnerNode):
Use DeferRecalcStyleIfNeeded when saying bye from a CSSStyleSheet and let Document decide
if removing the sheet should trigger style recalc instead of always assuming it should.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::filterEnabledNonemptyCSSStyleSheets):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
Exclude empty sheets from the activeAuthorStyleSheets() collection. They are still
visible through CSSOM's document.styleSheets.
2013-08-02 Zalan Bujtas <zalan@apple.com>
Frame flattening: Change the logic on whether resize event needs to be dispatched.
https://bugs.webkit.org/show_bug.cgi?id=119394
Reviewed by Simon Fraser.
http://trac.webkit.org/changeset/149287 changed the logic so that resize events are
sent out from FrameView::setFrameRect() too. Checking whether frame flattening is
enabled is sufficient enough to ensure that no extra resize events are dispatched.
Test: fast/frames/flattening/iframe-flattening-resize-event-count.html
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::frameFlatteningEnabled):
(WebCore::FrameView::supportsFrameFlattening):
(WebCore::FrameView::avoidScrollbarCreation):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::layout):
(WebCore::FrameView::isInChildFrameWithFrameFlattening):
* page/FrameView.h:
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
2013-08-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r153608.
http://trac.webkit.org/changeset/153608
https://bugs.webkit.org/show_bug.cgi?id=119425
Snorkled fast/multicol/overflow-content-expected.html
(Requested by kling on #webkit).
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties):
2013-08-01 Ruth Fong <ruth_fong@apple.com>
[Forms: color] <input type='color'> popover color well implementation
<rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER.
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
FormAssociatedElement shouldn't create out-of-tree FormAttributeTargetObserver
https://bugs.webkit.org/show_bug.cgi?id=119309
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/6fbdcbf311de539107bc28711b3f7a527176e97b.
I'm not merging the test since the attached test case only works when the shadow DOM API is enabled.
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::formAttributeChanged):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
2013-08-01 Rob Buis <rwlbuis@webkit.org>
selectors should match attribute name with case sensitivity based on element & document type
https://bugs.webkit.org/show_bug.cgi?id=71152
Reviewed by Darin Adler.
Support case-sensitive attribute name selecting for non HTML. In order to do this we have to
store the attribute name in the selector as-is when css parsing, and get the lowercase localName
on demand for case-insensitive matching. The only time we want case-insensitive matching is when
we try to match a HTML element in a HTML document.
Tests: fast/dom/SelectorAPI/attrname-case-insensitive.html
fast/dom/SelectorAPI/attrname-case-sensitive.xhtml
svg/css/case-sensitive-attrname-selectors.html
* css/CSSGrammar.y.in: do not lowercase attribute selector name.
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::setAttribute):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::setAttribute):
* css/CSSSelector.h: allow access to lowered version of attribute localName if needed.
(WebCore::CSSSelector::attributeCanonicalLocalName):
* css/SelectorChecker.cpp:
(WebCore::anyAttributeMatches): do only case-insensitive matching for HTML.
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::checkExactAttribute): do only case-insensitive matching for HTML.
* css/SelectorCheckerFastPath.cpp:
(WebCore::HTMLNames::checkExactAttributeValue):
* css/SelectorCheckerFastPath.h:
(WebCore::SelectorCheckerFastPath::matchesRightmostAttributeSelector):
* dom/Attribute.h:
(WebCore::Attribute::matches): use more convenient parameters.
2013-08-01 Brent Fulgham <bfulgham@apple.com>
[Windows] WebKit1 Fullscreen Video Play is Broken
https://bugs.webkit.org/show_bug.cgi?id=119415
Reviewed by Jer Noble.
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add
call for ACFPlayerLayerSetFrame
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformSetVisible):
Tear down video player when leaving Fullscreen mode and not using
the newer Fullscreen feature.
(WebCore::AVFWrapper::disconnectAndDeleteAVFWrapper):
Disconnect from notifications for AVCFPlayerItemPresentationSizeChangedNotification,
AVCFPlayerItemDuratoinChangedNotification, and disconnect any
LegibleOutput items added to the player item.
(WebCore::AVFWrapper::createPlayerItem): Add notifications for
AVCFPlayerItemPresentationSizeChanged.
(WebCore::LayerClient::platformCALayerLayoutSublayersOfLayer): Notify
the AVCFPLayerLayer when the display size has changed.
* platform/graphics/ca/win/CACFLayerTreeHost.h:
(WebCore::CACFLayerTreeHost::manualCreateRenderer): Added.
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.h:
(WebCore::WKCACFViewLayerTreeHost::manualCreateRenderer): Added.
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Minor
cleanups.
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
Make sure a Direct3D renderer is created when building the full screen
window for Video playback.
2013-08-01 Dean Jackson <dino@apple.com>
srcset algorithm breaks base64 src attributes
https://bugs.webkit.org/show_bug.cgi?id=119413
Reviewed by Darin Adler.
Base64 encoded src attributes typically have a COMMA
character which was breaking in the candidate matching
algorithm. Make sure to handle that case, and to unescape
any incoming URLs.
Slight cleanup of the srcset matching algorithm. The
candidates are now gathered from a single update
method. I've renamed the methods in the process.
This means we now reparse the srcset attribute if
only the src changes, but I think the code is
cleaner this way.
Tests: fast/hidpi/image-srcset-data-src.html
fast/hidpi/image-srcset-data-srcset.html
fast/hidpi/image-srcset-nomodifier.html
fast/hidpi/image-srcset-viewport-modifiers.html
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement): No need to initialise m_bestFitImageURL.
(WebCore::HTMLImageElement::imageSourceURL): Use isEmpty() rather than checking for nullAtom.
(WebCore::HTMLImageElement::determineBestImageForScaleFactor): New renamed method that selects the best
candidate for the image source.
(WebCore::HTMLImageElement::collectImageCandidatesFromSrcSet): Gather the srcset images. Changes include
simplifying the whitespace and skipping candidates that we don't yet support.
(WebCore::HTMLImageElement::collectImageCandidateFromSrc): Add the src attribute to the list of candidates.
(WebCore::HTMLImageElement::parseAttribute): Now both attributes call determineBestImageForScaleFactor.
* html/HTMLImageElement.h: No need for m_srcImageIndex any more.
2013-08-01 Romain Perier <romain.perier@gmail.com>
Implement img element's srcset attribute
https://bugs.webkit.org/show_bug.cgi?id=110252
Reviewed by Dean Jackson.
Tests: fast/hidpi/image-srcset-simple.html
fast/hidpi/image-srcset-src-selection.html
fast/hidpi/image-srcset-simple.html
fast/hidpi/image-srcset-src-selection.html
fast/hidpi/image-srcset-only-src-attribute.html
fast/hidpi/image-srcset-same-alternative-for-both-attributes.html
fast/hidpi/image-srcset-invalid-inputs.html
fast/hidpi/image-srcset-invalid-inputs-except-one.html
fast/hidpi/image-srcset-invalid-inputs-correct-src.html
fast/hidpi/image-srcset-change-dynamically-from-js.html
fast/hidpi/image-srcset-remove-dynamically-from-js.html
* html/HTMLAttributeNames.in: Add srcset attribute.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::HTMLImageElement):
Adding initialization for new variables member.
(WebCore::HTMLImageElement::imageSourceURL):
Override this method to return the choosen image transparently to the ImageLoader.
(WebCore::HTMLImageElement::updateBestImageForScaleFactor):
New method to select the good image candidate dependending on the scale factor. This method is separated from
parsing because it will be useful for selecting a new image candidate on the fly if the device scale factor changes.
(WebCore::HTMLImageElement::updateImagesFromSrcSet):
New method for parsing the srcset attribute and build a list of images with the corresponding scale factor.
(WebCore::HTMLImageElement::parseAttribute):
Adding support for processing the image candidates, select the good one and call ImageLoader for rendering.
* html/HTMLImageElement.h:
- Adding new methods declarations.
- Adding new type definition.
- Adding new variable member to store the URL of the choosen image.
- Adding new variable member to store the index of the src image.
- Adding new Vector to store the list of images after parsing.
* html/HTMLImageElement.idl: Adding srcset attribute for the differents existing bidings.
2013-08-01 Filip Pizlo <fpizlo@apple.com>
DFG optimizations don't handle neutered arrays properly
https://bugs.webkit.org/show_bug.cgi?id=119409
Reviewed by Mark Hahnenberg and Oliver Hunt.
Test: fast/js/dfg-typed-array-neuter.
* bindings/js/SerializedScriptValue.cpp:
(WebCore::neuterView):
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
* bindings/js/SerializedScriptValue.h:
2013-08-01 Morten Stenshorne <mstensho@opera.com>
REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
https://bugs.webkit.org/show_bug.cgi?id=113058
Before sharing CSS properties with an element in the cache, we need to
check that the new element is suitable for this, just like we check
elements before inserting them into the cache.
Reviewed by Andreas Kling.
Test: fast/css/identical-logical-height-decl.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties):
2013-08-01 Mark Lam <mark.lam@apple.com>
Fixed expected test results for run-bindings-tests after r153532, r153537.
https://bugs.webkit.org/show_bug.cgi?id=119410.
Reviewed by Simon Fraser.
No new tests.
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64ArrayConstructor::getOwnPropertySlot):
(WebCore::JSFloat64ArrayPrototype::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSFloat64Array.h:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::getOwnPropertySlot):
(WebCore::JSTestActiveDOMObjectPrototype::getOwnPropertySlot):
(WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetterPrototype::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
(WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::getOwnPropertySlot):
(WebCore::JSTestEventConstructor::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::getOwnPropertySlot):
(WebCore::JSTestEventTargetPrototype::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::getOwnPropertySlot):
(WebCore::JSTestException::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::getOwnPropertySlot):
(WebCore::JSTestInterfacePrototype::getOwnPropertySlot):
(WebCore::JSTestInterface::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::getOwnPropertySlot):
(WebCore::JSTestMediaQueryListListenerPrototype::getOwnPropertySlot):
(WebCore::JSTestMediaQueryListListener::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::getOwnPropertySlot):
(WebCore::JSTestNamedConstructor::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::getOwnPropertySlot):
(WebCore::JSTestNode::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::getOwnPropertySlot):
(WebCore::JSTestObjPrototype::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::getOwnPropertySlot):
(WebCore::JSTestOverloadedConstructors::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::getOwnPropertySlot):
(WebCore::JSTestSerializedScriptValueInterface::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
(WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
(WebCore::JSTestTypedefs::getOwnPropertySlot):
* bindings/scripts/test/JS/JSTestTypedefs.h:
2013-08-01 Alex Christensen <achristensen@apple.com>
Copy eglplatform.h to be found by Windows WebGL build.
https://bugs.webkit.org/show_bug.cgi?id=119299
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCorePreBuild.cmd: Copy eglplatform.h.
2013-08-01 Jer Noble <jer.noble@apple.com>
Crash in WebCore:  WebCore::AudioSession::beganAudioInterruption + 62
https://bugs.webkit.org/show_bug.cgi?id=119406
Reviewed by Eric Carlson.
Unregister for AudioSession interruption events when being destroyed.
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::~AudioDestinationIOS):
2013-08-01 Andreas Kling <akling@apple.com>
Layout should force a StyleResolver rebuild if there isn't one at all.
<http://webkit.org/b/119378>
Reviewed by Antti Koivisto.
We can't tell if viewport-dependent media queries have been invalidated at layout,
unless we have a StyleResolver to ask about this.
In case there isn't one, take the same path as we would with an invalidated query
instead of relying on ensureStyleResolver() to build it.
* page/FrameView.cpp:
(WebCore::FrameView::layout):
2013-08-01 Jacky Jiang <zhajiang@blackberry.com>
[BlackBerry] Crash at absoluteClippedOverflowRect() in PluginView::calculateClipRect()
https://bugs.webkit.org/show_bug.cgi?id=119401
Reviewed by George Staikos.
JIRA 462881
The renderer of the PluginView's element has been detached due to transition
to a new load. We should return an empty contentRect if there even isn't
a renderer. This is a speculative fix based on the stack trace provided.
* plugins/blackberry/PluginViewBlackBerry.cpp:
(WebCore::PluginView::calculateClipRect):
2013-08-01 Tim Horton <timothy_horton@apple.com>
Unavailable plug-in indicator arrow should be inside the rounded rect, not in its own circle
https://bugs.webkit.org/show_bug.cgi?id=119400
<rdar://problem/14616012>
Reviewed by Anders Carlsson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
Shift the arrow in by 9px, and make the text's rounded rect include it,
instead of having the arrow in a separate circle.
2013-08-01 Patrick Gansterer <paroga@webkit.org>
Merge FrameWinCE into FrameWin
https://bugs.webkit.org/show_bug.cgi?id=117988
Reviewed by Brent Fulgham.
Reuse the code from FrameWin.cpp instead of duplicating it.
* PlatformWinCE.cmake:
* page/win/FrameGdiWin.cpp: Added.
(WebCore::imageFromRect):
* page/wince/FrameWinCE.cpp: Removed.
2013-08-01 Alex Christensen <achristensen@apple.com>
Made OESTextureHalfFloat work on Windows.
https://bugs.webkit.org/show_bug.cgi?id=119298
Reviewed by Christophe Dumez.
* DerivedSources.cpp: Added JSOESTextureHalfFloat.cpp inside of #if ENABLE(WEBGL).
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Added JSOESTextureHalfFloat.cpp and JSOESTextureHalfFloat.h.
* html/canvas/OESTextureHalfFloat.idl: Added newline to end of file.
* html/canvas/WebGLObject.cpp: Removed unused #includes.
2013-08-01 Patrick Gansterer <paroga@webkit.org>
Rearrange the code of FrameWin
https://bugs.webkit.org/show_bug.cgi?id=117984
Reviewed by Brent Fulgham.
Move code from the CG implementation into the general file so we can
share the code with Windows CE port in a next step. In a first step
it only shares more code between the CG and Cairo implementations.
Also use OwnPtr instead of plain pointers to make ownership more clear.
* page/win/FrameCGWin.cpp:
(WebCore::imageFromRect):
* page/win/FrameCairoWin.cpp:
(WebCore::imageFromRect):
* page/win/FrameWin.cpp:
(WebCore::imageFromSelection):
(WebCore::Frame::dragImageForSelection):
(WebCore::Frame::nodeImage):
* page/win/FrameWin.h:
2013-08-01 Andrei Parvu <parvu@adobe.com>
mask-repeat: round bug
Added the round functionality to -webkit-mask-repeat and background-repeat. The tile size of the
image is scaled so that the image can fit a whole number of times in the background.
https://bugs.webkit.org/show_bug.cgi?id=119080
Reviewed by Dirk Schulze.
Tests: css3/masking/mask-repeat-round-auto1.html
css3/masking/mask-repeat-round-auto2.html
css3/masking/mask-repeat-round-border.html
css3/masking/mask-repeat-round-content.html
css3/masking/mask-repeat-round-padding.html
css3/background/background-repeat-round-auto1.html
css3/background/background-repeat-round-auto2.html
css3/background/background-repeat-round-border.html
css3/background/background-repeat-round-content.html
css3/background/background-repeat-round-padding.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2013-08-01 Alexis Menard <alexis@webkit.org>
Reduce CSSProperty's StylePropertyMetadata memory footprint by half when used inside a ImmutableStylePropertySet.
https://bugs.webkit.org/show_bug.cgi?id=117715
Reviewed by Andreas Kling.
Today CSSProperty holds its metadata in the following way :
--------------------------------------------------------------------------------------------
| m_propertyID : 14 We use 14 bits because CSSPropertyIDs start at 1001. |
| m_shorthandID : 14 id of the shorthand this property was set, 0 if not part of a shorthand|
| m_important : 1 |
| m_implicit : 1 |
| m_inherited : 1 |
--------------------------------------------------------------------------------------------
The proposal to decrease the memory footprint on CSSProperty's metadata
only stand when stored inside ImmutableStylePropertySet which uses a custom
way to allocate and lay out the StylePropertyMetadata and the CSSValues in
memory because the idea behind is that the content will not change.
The MutableStylePropertySet uses a regular vector to retrieve, remove
and modify the CSSProperties. ImmutableStylePropertySet is used by default
when parsing up until someone start to access the CSSOM like
div.style which will convert the immutable to a mutable set. It is also good
to note that a CSSProperty is created for every single statement inside a block
in a stylesheet so we do have quite a bunch around. Another consideration is
that the only client to the m_shorthandID is the inspector which uses it
to group the longhands into a shorthand drop down list.
The new proposal is the following one :
- Reduce m_propertyID to 10 bits by not starting the CSSPropertyIDs from
1001 but rather 0 (or 3 as two are hardcoded CSSPropertyInvalid and CSSPropertyVariable).
- Use the fact that we statically know which longhand belong to which shorthand. So
we create a static mapping between longhands and shorthands.
Here is the new layout :
------------------------------------------------------------------------------
| m_propertyID : 10 (up to 1024 properties), we have less than 400 today |
| m_isSetFromShorthand : 1 and then use the mapping in StylePropertyShorthand |
| m_indexInShorthandsVector : 2 |
| m_important : 1 (unchanged) |
| m_implicit : 1 (unchanged) |
| m_inherited : 1 (unchanged) |
------------------------------------------------------------------------------
it was set from using the new code in StylePropertyShorthand.
- m_indexInShorthandsVector : 2 bits, unfortunately there are few longhands which belong to multiple
shorthands so we need to store which was this longhand was part at parsing time. Notice
that it does not store the CSSPropertyID of the matching shorthand but rather its position
in the vector of matching shorthands. CSSProperty::m_shorthandID() method make it transparent
for call sites and return the actual CSSPropertyID of the shorthand. So far 2 bits seems
enough as there is only few longhands with ambiguity and they belong to 3 shorthands.
Profiling the benchmark with Intel Vtune to find out the performance regression
showed that copying uint16_t, so StylePropertyMetadata, is not
a fast operation in term of assembly code and has a big penalty on Windows
MSVC over unsigned for example. The latter produces a much faster code
when using unsigned over uint16_t (45% difference in the benchmark).
The patch avoid the copies of StylePropertyMetadata when applicable (by using const ref).
The second part of the fix is avoiding the conversion from an int (enum) to
an uint16_t in a tight loop such as StylePropertySet::findPropertyIndex
(which is the hotspot of the benchmark).
On my Windows 7 64 bits Core i5 machine CSSPropertySetterGetter results are :
- avg : 2714 runs/s with the patch
- avg : 2696 runs/s without the patch
According to Andreas Kling this patch save up ~1.8Mb on membuster.
No new tests : refactor, old ones should cover.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::addPropertyWithPrefixingVariant):
(WebCore::CSSParser::addProperty):
* css/CSSProperty.cpp:
(WebCore::StylePropertyMetadata::shorthandID):
(WebCore::borderDirections):
* css/CSSProperty.h:
(WebCore::StylePropertyMetadata::StylePropertyMetadata): Use uint16_t type for bitfields so sizeof() returns 2 bytes.
(WebCore::CSSProperty::CSSProperty):
(WebCore::CSSProperty::isSetFromShorthand):
(WebCore::CSSProperty::shorthandID):
* css/StylePropertySet.cpp:
(WebCore::ImmutableStylePropertySet::ImmutableStylePropertySet):
(WebCore::getIndexInShorthandVectorForPrefixingVariant):
(WebCore::MutableStylePropertySet::appendPrefixingVariantProperty):
(WebCore::MutableStylePropertySet::setPrefixingVariantProperty):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::PropertyReference::shorthandID):
* css/StylePropertyShorthand.cpp:
(WebCore::backgroundShorthand):
(WebCore::backgroundPositionShorthand):
(WebCore::backgroundRepeatShorthand):
(WebCore::borderShorthand):
(WebCore::borderAbridgedShorthand):
(WebCore::borderBottomShorthand):
(WebCore::borderColorShorthand):
(WebCore::borderImageShorthand):
(WebCore::borderLeftShorthand):
(WebCore::borderRadiusShorthand):
(WebCore::webkitBorderRadiusShorthand):
(WebCore::borderRightShorthand):
(WebCore::borderSpacingShorthand):
(WebCore::borderStyleShorthand):
(WebCore::borderTopShorthand):
(WebCore::borderWidthShorthand):
(WebCore::listStyleShorthand):
(WebCore::fontShorthand):
(WebCore::marginShorthand):
(WebCore::markerShorthand):
(WebCore::outlineShorthand):
(WebCore::overflowShorthand):
(WebCore::paddingShorthand):
(WebCore::transitionShorthand):
(WebCore::webkitAnimationShorthand):
(WebCore::webkitAnimationShorthandForParsing):
(WebCore::webkitBorderAfterShorthand):
(WebCore::webkitBorderBeforeShorthand):
(WebCore::webkitBorderEndShorthand):
(WebCore::webkitBorderStartShorthand):
(WebCore::webkitColumnsShorthand):
(WebCore::webkitColumnRuleShorthand):
(WebCore::webkitFlexFlowShorthand):
(WebCore::webkitFlexShorthand):
(WebCore::webkitMarginCollapseShorthand):
(WebCore::webkitGridColumnShorthand):
(WebCore::webkitGridRowShorthand):
(WebCore::webkitMarqueeShorthand):
(WebCore::webkitMaskShorthand):
(WebCore::webkitMaskPositionShorthand):
(WebCore::webkitMaskRepeatShorthand):
(WebCore::webkitTextEmphasisShorthand):
(WebCore::webkitTextStrokeShorthand):
(WebCore::webkitTransitionShorthand):
(WebCore::webkitTransformOriginShorthand):
(WebCore::widthShorthand):
(WebCore::heightShorthand):
(WebCore::matchingShorthandsForLonghand):
(WebCore::indexOfShorthandForLonghand):
* css/StylePropertyShorthand.h:
(WebCore::StylePropertyShorthand::StylePropertyShorthand):
(WebCore::StylePropertyShorthand::id):
* css/makeprop.pl:
2013-07-31 Andreas Kling <akling@apple.com>
FINALize StyleSheet subclasses.
<http://webkit.org/b/119370>
Reviewed by Anders Carlsson.
CSSStyleSheet and XSLStyleSheet have no further subclasses so make them final.
* css/CSSStyleSheet.h:
* xml/XSLStyleSheet.h:
2013-07-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGFontFaceElement, and use it
https://bugs.webkit.org/show_bug.cgi?id=119330
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGFontFaceElement*> can
be changed with toSVGFontFaceElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155082
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* svg/SVGFontFaceElement.h:
(WebCore::toSVGFontFaceElement):
* svg/SVGFontFaceFormatElement.cpp:
(WebCore::SVGFontFaceFormatElement::childrenChanged):
* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged):
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::childrenChanged):
2013-07-31 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGSMILElement, and use it
https://bugs.webkit.org/show_bug.cgi?id=119260
Reviewed by Darin Adler.
As a step to change static_cast with toSVGXXX, static_cast<SVGSMILElement*> can
be changed with toSVGSMILElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=155048
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::connectConditions):
(WebCore::SVGSMILElement::disconnectConditions):
* svg/animation/SVGSMILElement.h:
(WebCore::toSVGSMILElement):
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
Reuse of XMLHttpRequests causes character corruption in response text
https://bugs.webkit.org/show_bug.cgi?id=119358
Reviewed by Anders Carlsson.
Merge https://chromium.googlesource.com/chromium/blink/+/6496e7bb9a0b46bc79032b86d5993b25f127a4cb
Test: http/tests/xmlhttprequest/reopen-encoding.html
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::clearResponseBuffers):
(WebCore::XMLHttpRequest::didFinishLoading):
2013-07-31 Alexey Proskuryakov <ap@apple.com>
Make ActiveDOMObject overrides private
https://bugs.webkit.org/show_bug.cgi?id=119352
Reviewed by Sam Weinig.
There is no need to call these through derived classes. And it's quite harmful for
anyone except for ScriptExecutionContext to call suspend/resume in particular -
ScriptExecutionContext won't know, and it will try to manage the state on its own.
* Modules/filesystem/DOMFileSystem.h:
* Modules/filesystem/FileWriter.h:
* Modules/geolocation/Geolocation.h:
* Modules/indexeddb/IDBDatabase.h:
* Modules/indexeddb/IDBRequest.h:
* Modules/indexeddb/IDBTransaction.h:
* Modules/mediasource/MediaSource.h:
* Modules/notifications/Notification.h:
* Modules/notifications/NotificationCenter.h:
* Modules/websockets/WebSocket.h:
* fileapi/FileReader.h:
* html/HTMLMediaElement.h:
* html/canvas/WebGLRenderingContext.h:
* page/DOMTimer.h:
* page/EventSource.h:
* page/SuspendableTimer.h:
* workers/AbstractWorker.h:
* xml/XMLHttpRequest.h:
2013-07-31 Tim Horton <timothy_horton@apple.com>
Remove didFinishLoad order quirk
https://bugs.webkit.org/show_bug.cgi?id=119354
<rdar://problem/11510686>
Reviewed by Alexey Proskuryakov.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
Remove the quirk.
* page/Settings.in:
Remove the setting controlling the quirk.
2013-07-31 Kwang Yul Seo <skyul@company100.net>
Replace CRASH() on overflow with Checked<>
https://bugs.webkit.org/show_bug.cgi?id=119327
Reviewed by Oliver Hunt.
Use a checked type that allows us to automate bound checks. We use a
non-recording Checked<> to keep the behavior.
No behavior change, no new tests needed.
* dom/Text.cpp:
(WebCore::Text::wholeText):
* platform/audio/AudioArray.h:
(WebCore::AudioArray::allocate):
2013-07-31 Kwang Yul Seo <skyul@company100.net>
Use emptyString instead of String("")
https://bugs.webkit.org/show_bug.cgi?id=119335
Reviewed by Darin Adler.
Use emptyString() instead of String("") because it is better style and
faster. This is a followup to r116908, removing all occurrences of
String("") from WebKit.
No behavior change, no new tests needed.
* platform/graphics/blackberry/LayerAnimation.h:
(WebCore::LayerAnimation::name):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::textFromEvent):
(WebCore::unmodifiedTextFromEvent):
(WebCore::keyIdentifierForKeyEvent):
2013-07-31 Ruth Fong <ruth_fong@apple.com>
<input type=color> Mac UI behaviour
<rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
Reviewed by Brady Eidson.
This patch turns on INPUT_TYPE_COLOR and implements it using the native
Mac color panel.
No new tests added.
Currently, there are no automated ways to test the types of changes made in this patch. (i.e. checking
which color is being displayed in the color panel, checking which color element is currently
associated to the color panel, checking the state of color elements after directing away and
being directed back to its page, etc.)
* Configurations/FeatureDefines.xcconfig: Enabled INPUT_TYPE_COLOR.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* html/ColorInputType.cpp:
(WebCore::ColorInputType::handleDOMActivateEvent): Reattaches the color picker if
a color picker has already been shown for an element
(WebCore::ColorInputType::shouldResetOnDocumentActivation): Always returns true, needed to
detach the color picker when caching a page.
* html/ColorInputType.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::documentDidResumeFromPageCache): For <input type='color'>,
don't reset the element.
(WebCore::HTMLInputElement::documentWillSuspendForPageCache): For <input type='color'>, call detach().
* html/HTMLInputElement.h:
* platform/ColorChooser.h:
(WebCore::ColorChooser::reattachColorChooser): Added definition.
2013-07-30 Gavin Barraclough <barraclough@apple.com>
Some cleanup in JSValue::get
https://bugs.webkit.org/show_bug.cgi?id=119343
Reviewed by Geoff Garen.
* WebCore.exp.in:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):
* bridge/runtime_array.h:
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::getOwnPropertySlot):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::getOwnPropertySlot):
* bridge/runtime_object.h:
- getOwnPropertySlot, JSCell -> JSObject
2013-07-31 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r153406): DOM intervals are not properly restarted when resumed
https://bugs.webkit.org/show_bug.cgi?id=119345
Reviewed by Sam Weinig.
* page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::suspend): Call base class
version of repeatInterval(), not our version that will just return the current value
of m_savedRepeatInterval in this situation.
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
Avoid calling nextRenderer() in some cases
https://bugs.webkit.org/show_bug.cgi?id=119313
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/3207cfda52082f4fd6a04c7819c18a980de58beb.
* dom/Text.cpp:
(WebCore::Text::textRendererIsNeeded):
2013-07-31 Ryosuke Niwa <rniwa@webkit.org>
Convert most callers of setInlineStyleProperty passing strings to enums or doubles instead
https://bugs.webkit.org/show_bug.cgi?id=119304
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/8157dd9381716759f183fabbfed29c52962be746
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
(WebCore::DeleteButtonController::show):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::resizeImageToFit):
(WebCore::ImageDocument::restoreImageSize):
(WebCore::ImageDocument::windowSizeChanged):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setFontSize):
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
(WebCore::TextTrackCueGeneric::setFontSize):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::resize):
2013-07-31 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Use m_ prefix only for member variable
https://bugs.webkit.org/show_bug.cgi?id=119250
Reviewed by Noam Rosenthal.
WebKit coding style suggests to use m_ prefix only for data members.
This patch also removes unnecessary copy by passing const-reference
parameter values.
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
(WebCore::CoordinatedCustomFilterProgram::create):
2013-07-31 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Images are down-scaled badly
https://bugs.webkit.org/show_bug.cgi?id=119263
Reviewed by Jocelyn Turcotte.
QPainter only does bilinear filtering, which means it will downscaling beyond
0.5x will start skipping pixel and start to degrade the end result. Scaling in
QImage and QPixmap however uses a better but much more expensive sampling that
counts all pixels.
To get the high quality downscaling we must therefore prescale the images before
painting them. To avoid a performance impact on repeated paints the prescaled
image are saved in the QPixmapCache.
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::draw):
2013-07-31 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Remove guessesVector param from isUngrammatical
https://bugs.webkit.org/show_bug.cgi?id=119241
Reviewed by Ryosuke Niwa.
TextCheckingHelper::isUngrammatical(Vector<String>& guessesVector) doesn't return
guesses for ungrammatical phrases through its parameter.
Editor::isSelectionUngrammatical() uses it to check whether the selection
is ungrammatical.
r71009 showed that isUngrammatical(Vector<String>& guessesVector) had not supported
grammar guesses.
The grammar guesses can be retrieved by guessesForMisspelledOrUngrammaticalRange
when UNIFIED_TEXT_CHECKING is on.
No new tests, this is dead code due to no WebKit port implements grammar using
legacy text checker.
* WebCore.exp.in: Removed __ZN7WebCore6Editor32guessesForUngrammaticalSelectionEv.
* editing/Editor.cpp:
(WebCore::Editor::isSelectionUngrammatical):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
* editing/Editor.h: Removed guessesForUngrammaticalSelection. Dead code.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::isUngrammatical):
* editing/TextCheckingHelper.h:
2013-07-31 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Unnecessary const_cast<TextCheckingHelper*>(this)->findFirstBadGrammar
https://bugs.webkit.org/show_bug.cgi?id=119244
Reviewed by Ryosuke Niwa.
Added missing const modifier to findFirstBadGrammar (and findFirstGrammarDetail
respectively) to call it in 'isUngrammatical() const' without const casting.
No new tests, no behavior change.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
Added const.
(WebCore::TextCheckingHelper::isUngrammatical):
Now const_cast can be removed.
* editing/TextCheckingHelper.h:
2013-07-30 Grzegorz Czajkowski <g.czajkowski@samsung.com>
findFirstGrammarDetail doesn't need to be exposed.
https://bugs.webkit.org/show_bug.cgi?id=119249
Reviewed by Darin Adler.
Make TextCheckingHelper::findFirstGrammarDetail private.
Remove badGrammarPhraseLength param. It's not used any longer.
No new tests, no behavior change.
* editing/TextCheckingHelper.cpp:
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
* editing/TextCheckingHelper.h:
2013-07-30 Tim Horton <timothy_horton@apple.com>
DHTML drag can result in a null-deref under WebDragClient::startDrag
https://bugs.webkit.org/show_bug.cgi?id=119297
<rdar://problem/14213012>
Reviewed by Simon Fraser.
Test: fast/events/setDragImage-in-document-element-crash.html
* page/mac/FrameSnapshottingMac.mm:
(WebCore::snapshotDragImage):
We shouldn't waste time painting an empty image, nor should we return
an image with no size.
2013-07-30 Pravin D <pravind@samsung.com>
Dotted borders render w/ artifacts and sometimes as solid lines
https://bugs.webkit.org/show_bug.cgi?id=3964
Reviewed by Elliott Sprehn.
While drawing the dotted border, the common borders are drawn by the cells sharing them. The dotted borders
become(tend) solid when the starting and the end points of the border drawn by the two cells don't match. This
fixes the same.
Test: fast/table/border-collapsing/dotted-collapsed-border.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
(WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
Helper function to decide if border's start point requires any adjustment.
(WebCore::RenderTableCell::paintCollapsedBorders):
Added logic to handle dotted borders so that they do not become solid.
* rendering/RenderTableCell.h:
Helper function declarations.
2013-07-30 Vani Hegde <vani.hegde@samsung.com>
Gmail reply email - Bold and Italic style get stuck
https://bugs.webkit.org/show_bug.cgi?id=118185
Reviewed by Ryosuke Niwa.
When bold/italic style is applied to a content with mixed editability,
style is applied appropriately for the first time.
But after this, style toggling does not work any more. Same behavior
can be observed when the content on which style is applied contains
text node without renderer (Ex: text node corresponding to tab/space etc)
When bold/italic style is applied on a selection, we actually apply the
style only for text nodes that have renderers and also are contenteditable.
Similarly during style toggling, to check whether a style has been already
applied on a selection
Tests: editing/style/toggle-style-bold-italic-mixed-editability.html
editing/style/toggle-style-bold-italic.html
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::triStateOfStyle):
A particular selection on which style is applied may contain text nodes
without renderers(text nodes corresponding to tab/space) or text nodes
that are not contenteditable. We do not apply style to such text nodes.
Hence, even during style toggling we should not consider the styles
present in such nodes.
2013-07-30 Rob Buis <rwlbuis@webkit.org>
XMLSerializer should reset default namespace when necessary
https://bugs.webkit.org/show_bug.cgi?id=16739
XMLSerializer's handling of namespaces seems to be pretty broken
https://bugs.webkit.org/show_bug.cgi?id=106531
Reviewed by Ryosuke Niwa.
Write out empty default namespace declaration if the element is not in any namespace, as
described in http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-serialization-algorithm.
Tests: fast/dom/XMLSerializer-element-empty-namespace.html
fast/dom/XMLSerializer-element-empty-namespace2.html
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendNamespace):
(WebCore::MarkupAccumulator::appendOpenTag):
* editing/MarkupAccumulator.h:
2013-07-30 Chris Fleizach <cfleizach@apple.com>
Don't post accessibility notification on object in detached document.
https://bugs.webkit.org/show_bug.cgi?id=119286
Reviewed by Ryosuke Niwa.
Merge https://chromium.googlesource.com/chromium/blink/+/ef9fc9e70202dcf33e5cf2f0f0a2135945ffe17e%5E%21/#F0
Don't post accessibility notification on object in detached document.
This can happen if an accessibility notification is queued on a node,
then that node is reparented to a different document that's not attached
anywhere before the accessibility notification is fired.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::notificationPostTimerFired):
2013-07-30 Andy Estes <aestes@apple.com>
Content filter replacement data uses the encoding from the blocked page's response headers
https://bugs.webkit.org/show_bug.cgi?id=119237
Reviewed by Darin Adler.
When a document specifies an encoding in an HTTP response header, or
when the embedder specifies an override encoding, and the content filter
blocks the document, we interpret the content filter's replacement data
using this encoding. This might be the wrong.
Forget about encodings determined from these sources. The replacement
data will specify an encoding in a <meta charset>, so let that be used
instead.
No new tests. We don't currently have a mechanism for testing the
content filter from WebKit.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData): Pretend as if no encoding is
specified if the content filter blocked the load.
(WebCore::DocumentLoader::dataReceived): Stopped calling commitLoad()
before early-returning if the content filter needs more data. This isn't
necessary.
2013-07-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add 'colno' attribute to ErrorEvent interface
https://bugs.webkit.org/show_bug.cgi?id=119257
Reviewed by Darin Adler.
Add 'colno' attribute to ErrorEvent interface to match the latest specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#errorevent
The 'colno' attribute is already supported by IE10 and Blink.
No new tests, covered by existing tests.
* dom/ErrorEvent.cpp:
(WebCore::ErrorEventInit::ErrorEventInit):
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
* dom/ErrorEvent.idl:
2013-07-30 Andreas Kling <akling@apple.com>
Inactive style sheets should not trigger style recalc when loaded.
<http://webkit.org/b/119236>
<rdar://problem/14588132>
Reviewed by Antti Koivisto.
Style sheets that are either alternate sheets or are excluded by their media query should not trigger
a full style recalc when they finish loading, since the end result will not be observably different.
The sheets are still inspectable through document.styleSheets.
Changed enums from Blocking/NonBlocking to ActiveSheet/InactiveSheet to clarify what's going on.
* html/HTMLLinkElement.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::HTMLLinkElement):
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::startLoadingDynamicSheet):
(WebCore::HTMLLinkElement::addPendingSheet):
(WebCore::HTMLLinkElement::removePendingSheet):
2013-07-30 Tim Horton <timothy_horton@apple.com>
Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
https://bugs.webkit.org/show_bug.cgi?id=119275
Reviewed by Simon Fraser.
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::paintContentsForSnapshot):
* page/FrameView.h:
Fix typo.
2013-07-30 Alex Christensen <achristensen@apple.com>
Compile fix for WebGL on 32-bit Windows.
https://bugs.webkit.org/show_bug.cgi?id=119235
Reviewed by Darin Adler.
* platform/graphics/GLContext.cpp:
Created GLNativeWindowType typedef.
(WebCore::GLContext::createContextForWindow):
* platform/graphics/GLContext.h:
Replaced uint64_t with GLNativeWindowType.
2013-07-30 Patrick Gansterer <paroga@webkit.org>
[WIN] Remove dependency on CoreFoundation from DownloadBundle
https://bugs.webkit.org/show_bug.cgi?id=119247
Reviewed by Anders Carlsson.
* platform/network/cf/DownloadBundle.h:
* platform/network/curl/DownloadBundle.h:
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::magicNumber):
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
2013-07-30 Patrick Gansterer <paroga@webkit.org>
Move WindowsExtras.h from WebCore to WTF
https://bugs.webkit.org/show_bug.cgi?id=118125
Reviewed by Anders Carlsson.
Move it to WTF to be able to use the functions in WTF too.
* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/PlatformWheelEvent.h:
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h:
* platform/win/MIMETypeRegistryWin.cpp:
* platform/win/PasteboardWin.cpp:
* platform/win/PopupMenuWin.cpp:
* platform/win/RunLoopWin.cpp:
* platform/win/SharedTimerWin.cpp:
* platform/win/WindowMessageListener.h:
* plugins/win/PluginDatabaseWin.cpp:
2013-07-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Pass column as 4th argument to WorkerGlobalScope.onerror and Window.onerror handlers
https://bugs.webkit.org/show_bug.cgi?id=119251
Reviewed by Geoffrey Garen.
As per the latest specification, the WorkerGlobalScope.onerror and Window.onerror event
handlers should be given the column as fourth argument:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#onerroreventhandler
The column argument is already supported by IE10 and Blink.
No new tests, covered by existing tests.
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::ErrorEvent):
* dom/ErrorEvent.h:
(WebCore::ErrorEvent::create):
(WebCore::ErrorEvent::colno):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::sanitizeScriptError):
(WebCore::ScriptExecutionContext::reportException):
(WebCore::ScriptExecutionContext::dispatchErrorEvent):
* dom/ScriptExecutionContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):
2013-07-30 Patrick Gansterer <paroga@webkit.org>
Use OwnPtr in RenderThemeWin and ScrollbarThemeWin
https://bugs.webkit.org/show_bug.cgi?id=117978
Reviewed by Brent Fulgham.
Use OwnPtr to avoid manual deletion of objects.
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::paintTrackPiece):
* rendering/RenderThemeWin.cpp:
(WebCore::drawControl):
2013-07-30 Alex Christensen <achristensen@apple.com>
Added include directories to Visual Studio for WebGL.
https://bugs.webkit.org/show_bug.cgi?id=119161
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCoreCommon.props: Added more include directories.
2013-07-30 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151957 and r152531.
http://trac.webkit.org/changeset/151957
http://trac.webkit.org/changeset/152531
https://bugs.webkit.org/show_bug.cgi?id=119267
They revealed a bug on Mac I can't fix (Requested by Ossy on
#webkit).
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameIsCompleteAtIndex):
(WebCore::BitmapImage::frameDurationAtIndex):
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::frameIsCompleteAtIndex):
* platform/graphics/ImageSource.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameIsCompleteAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
* platform/image-decoders/ImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::gifComplete):
(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::initFrameBuffer):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::frameContext):
2013-07-30 Kwang Yul Seo <skyul@company100.net>
Remove using namespace std from SpatialNavigation
https://bugs.webkit.org/show_bug.cgi?id=119242
Reviewed by Antonio Gomes.
"using namespace" statements in headers are dangerous and should be
avoided. check-webkit-style has been changed to flag them as an error
since r152719. Use explicit std:: qualifiers instead.
No behavior change, no new tests needed.
* page/SpatialNavigation.cpp:
(WebCore::scrollInDirection):
* page/SpatialNavigation.h:
(WebCore::maxDistance):
2013-07-30 Simon Hausmann <simon.hausmann@digia.com>
[Qt][Win] Extend disabling of whole-program-optimizations to MSVC 2012
https://bugs.webkit.org/show_bug.cgi?id=119238
Reviewed by Jocelyn Turcotte.
As suggested in https://bugreports.qt-project.org/browse/QTBUG-20556,
the WebKit build with MSVC 2012 is affected by the same size
limitations.
* WebCore.pri:
2013-07-30 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESION(r151091) ASSERTION FAILED: m_readableData || m_writableData
https://bugs.webkit.org/show_bug.cgi?id=119142
Reviewed by Jocelyn Turcotte.
Remove invalid assert.
Covered by existing tests.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::readData):
2013-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header file to compilation.
2013-07-29 Kwang Yul Seo <skyul@company100.net>
[Gtk] Improve string use in PasteboardGtk
https://bugs.webkit.org/show_bug.cgi?id=119204
Reviewed by Martin Robinson.
Use emptyString() instead of "" and use ASCIILiteral where appropriate.
No behavior change, no new tests needed.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::documentFragment):
Use emptyString() instead of "".
(WebCore::Pasteboard::types):
Use ASCIILiteral where appropriate.
2013-07-29 Simon Fraser <simon.fraser@apple.com>
Page count can be incorrect if there is a pending style recalc
https://bugs.webkit.org/show_bug.cgi?id=119232
Reviewed by Beth Dakin.
If style is changed in a way that schedules a style recalc on the Document,
and then Page::pageCount() is called, we may give the wrong answer because
the existing code only checked FrameView::needsLayout(), not whether a style
recale was pending.
Fix by having Page::pageCount() call updateLayoutIgnorePendingStylesheets()
as we do for other properties that require layer, and are exposed to JS
or via API.
* page/Page.cpp:
(WebCore::Page::pageCount):
2013-07-29 Alex Christensen <achristensen@apple.com>
Moved GLContext.cpp and .h out of cairo directory to be used by non-cairo ports.
https://bugs.webkit.org/show_bug.cgi?id=119223
Reviewed by Kenneth Rohde Christiansen.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
Changed location of GLContext.cpp and GLContext.h.
* platform/graphics/GLContext.cpp: Copied from WebCore/platform/graphics/cairo/GLContext.cpp.
* platform/graphics/GLContext.h: Copied from WebCore/platform/graphics/cairo/GLContext.h.
* platform/graphics/cairo/GLContext.cpp: Removed.
* platform/graphics/cairo/GLContext.h: Removed.
2013-07-29 Jer Noble <jer.noble@apple.com>
TextTrackRepresentation captions often disappear then appear again.
https://bugs.webkit.org/show_bug.cgi?id=119228
Reviewed by Simon Fraser.
Calling updateTextTrackDisplay() will cause the entire DOM subtree containing the active cues
to be torn down and rebuilt. Only call into this method when text tracks have actually changed.
Add an enum parameter to configureTextTrackDisplay() which allows the caller to specify that
method should assume that the list of visible text tracks has changed, forcing a call to
updateTextTrackDisplay().
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Remove the unnecessary call to updateTextTrackDisplay().
(WebCore::HTMLMediaElement::textTrackModeChanged): Pass AssumeVisibleTextTracksChanged to configureTextTrackDisplay().
(WebCore::HTMLMediaElement::configureTextTrackDisplay): Check the passed flags and exit early only if
AssumeVisibleTextTracksChanged is not set.
* html/HTMLMediaElement.h:
2013-07-26 Ryosuke Niwa <rniwa@webkit.org>
Fix crash due to unexpected Node deletion during MutationObserver registration book-keeping
https://bugs.webkit.org/show_bug.cgi?id=119124
Reviewed by Sam Weinig.
Merge https://chromium.googlesource.com/chromium/blink/+/b6afb927695b3acf2c75c25f05e99682660993e2
No new tests since I could not reproduce the crash with the test attached in the Blink change.
The bug was caused by Node::unregisterMutationObserver removing the MutationObserverRegistration
that holds the last ref to the node. Avoid that by explicitly allocating a local RefPtr to the node
in MutationObserverRegistration::unregister. Also rename it to unregisterAndDelete to clarify
the semantics and make it a static member function to be even safer.
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::disconnect):
* dom/MutationObserverRegistration.cpp:
(WebCore::MutationObserverRegistration::unregisterAndDelete):
* dom/MutationObserverRegistration.h:
2013-07-29 Alex Christensen <achristensen@apple.com>
Moved GLTransportSurface.h and .cpp out of efl-specific directory.
https://bugs.webkit.org/show_bug.cgi?id=119163
Reviewed by Alexis Menard.
* PlatformEfl.cmake: Changed directory of GLTransportSurface.cpp.
* platform/graphics/surfaces/GLTransportSurface.cpp: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.cpp.
* platform/graphics/surfaces/GLTransportSurface.h: Copied from WebCore/platform/graphics/surfaces/efl/GLTransportSurface.h.
* platform/graphics/surfaces/efl/GLTransportSurface.cpp: Removed.
* platform/graphics/surfaces/efl/GLTransportSurface.h: Removed.
2013-07-29 Alex Christensen <achristensen@apple.com>
Speculative implementation of missing GraphicsContext3D methods on Windows.
https://bugs.webkit.org/show_bug.cgi?id=119167
Reviewed by Dean Jackson.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/graphics/win/GraphicsContext3DWin.cpp: Added.
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::setContextLostCallback):
(WebCore::GraphicsContext3D::setErrorMessageCallback):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::platformGraphicsContext3D):
(WebCore::GraphicsContext3D::platformTexture):
(WebCore::GraphicsContext3D::isGLES2Compliant):
(WebCore::GraphicsContext3D::platformLayer):
2013-07-29 Dean Jackson <dino@apple.com>
Max IOSurfaceDimension should be an inclusive upper bound
https://bugs.webkit.org/show_bug.cgi?id=119206
<rdar://problem/14555311>
Reviewed by Simon Fraser.
The maxIOSurfaceDimension value should be an inclusive upper bound.
Change the greater than or equal to into a greater than. This will
allow canvas elements of this dimension to be accelerated.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::ImageBuffer): Change >= to >
2013-07-29 Renata Hodovan <reni@webkit.org>
ASSERT_NOT_REACHED was touched in WebCore::SVGAnimatedType::valueAsString
https://bugs.webkit.org/show_bug.cgi?id=118744
Reviewed by Philip Rogers.
If we have an <animateTransform> tag that sets the attributeName and attributeType
properties however they are not consistent and we shouldn't try to apply it.
It is already checked and catched in SVGAnimateElement::resetAnimatedType() but
DontApplyAnimation case isn't handled properly. The patch forces an early return
in this case.
Test: svg/animations/attributeNameAndAttributeTypeMissmatch.svg
* svg/SVGAnimateElement.cpp:
(WebCore::SVGAnimateElement::resetAnimatedType):
2013-07-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSION(148300) GIFs not reanimated after resumeActiveDOMObjectAndAnimations
https://bugs.webkit.org/show_bug.cgi?id=119217
Reviewed by Tim Horton.
Commit 148300 introduced a new better was of restarting GIF animations after
they have been suspended. Unfortunately the method was not activated when a page
is resumed but only when it is returning from background.
This fixes GIF animations that are stopped during user interaction on Qt and other
platforms using suspendActiveDOMObjectAndAnimations.
* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations):
2013-07-29 Alex Christensen <achristensen@apple.com>
Made EGL useable by non-cairo ports.
https://bugs.webkit.org/show_bug.cgi?id=119177
Reviewed by Brent Fulgham.
* platform/graphics/cairo/GLContext.h:
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::GLContextEGL):
* platform/graphics/egl/GLContextEGL.h:
Protected Cairo-specific code with #if USE(CAIRO)
2013-07-29 Sergio Correia <sergio.correia@openbossa.org>
CoordinatedGraphics: Add API to get and set the active state of a WebView
https://bugs.webkit.org/show_bug.cgi?id=119067
Reviewed by Noam Rosenthal.
Added a method to return whether a scene is active or not.
No new tests, no behavior change.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(WebCore::CoordinatedGraphicsScene::isActive): Added method to return the
active state of the scene.
2013-07-29 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Issues with edge cases when getting offsets for a text range in AtkText
https://bugs.webkit.org/show_bug.cgi?id=118908
Reviewed by Martin Robinson.
Reimplement getSelectionOffsetsForObject() just in term of
Positions instead of using ranges, which makes it simpler and
works better. Also, make sure we use the right Node as reference
for the accessibility object by getting the proper one both for
text control objects (e.g. input, text area) and normal ones.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getNodeForAccessibilityObject): New helper function to ensure we
always get the relevant object from the DOM tree for a given
accessibility object, in the context of the implementation of
AtkText, so it works both with Text Controls and other elements.
(getSelectionOffsetsForObject): Rewritten this function in terms
of VisiblePositions and avoiding weird operations with ranges, so
we have more control to fine tune the results and give more
accurate ones. Besides, now it works better with edge cases.
2013-07-29 Zan Dobersek <zdobersek@igalia.com>
Clean up DragImage
https://bugs.webkit.org/show_bug.cgi?id=118981
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Add forward declaration for the Range class. This was not necessary until now as the forward
declaration was introduced in the DragImage header, from where it's being removed due to not being required in that class.
* page/Frame.h: Ditto.
* platform/DragImage.cpp: Remove the unnecessary DragController and FontRenderingMode header inclusions.
The latter is already included in the header.
* platform/DragImage.h: Remove the forward declaration for the Range class - it's not used by the DragImage class at all.
2013-07-29 Kwang Yul Seo <skyul@company100.net>
[EFL] Improve string use in ErrorsEfl
https://bugs.webkit.org/show_bug.cgi?id=119207
Reviewed by Christophe Dumez.
Use ASCIILiteral for constant strings becoming WTFStrings.
No behavior change.
* platform/efl/ErrorsEfl.cpp:
(WebCore::cancelledError):
(WebCore::blockedError):
(WebCore::cannotShowURLError):
(WebCore::interruptedForPolicyChangeError):
(WebCore::cannotShowMIMETypeError):
(WebCore::fileDoesNotExistError):
(WebCore::pluginWillHandleLoadError):
(WebCore::downloadCancelledByUserError):
(WebCore::printerNotFoundError):
(WebCore::invalidPageRangeToPrint):
2013-07-28 Andreas Kling <akling@apple.com>
Don't update the text track override CSS every time a media element is created.
<http://webkit.org/b/119199>
<rdar://problem/14572855>
Reviewed by Darin Adler.
We should only have to update the CSS if the accessibility caption preferences are changed.
This was forcing a full style recalc in every Document any time a media element is instantiated.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges):
2013-07-28 Andy Estes <aestes@apple.com>
Stop exporting Widget::frameRectsChanged()
https://bugs.webkit.org/show_bug.cgi?id=119196
Reviewed by Darin Adler.
The definition is inlined in a private header, so there's no need to
export a symbol to link against. On the Mac, since we compile with
-fvisibility-inlines-hidden, removing the symbol from the export file
silences an ld warning about exporting a hidden symbol.
* WebCore.exp.in: Removed __ZN7WebCore6Widget17frameRectsChangedEv.
2013-07-28 Sam Weinig <sam@webkit.org>
Clean up CSSPrimitiveValue::equals a bit
https://bugs.webkit.org/show_bug.cgi?id=119195
Reviewed by Andreas Kling.
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::equals):
This should not change behavior, but is quite a bit clearer.
2013-07-27 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Bump required version of EFL to 1.7
https://bugs.webkit.org/show_bug.cgi?id=119144
Reviewed by Christophe Dumez.
* platform/efl/FileSystemEfl.cpp: Removed workaround code which was fixed at Eina 1.7
(WebCore::listDirectory):
2013-07-27 Jacky Jiang <zhajiang@blackberry.com>
Replace all uses of GraphicsLayer::create function with the one that takes a GraphicsLayerFactory
https://bugs.webkit.org/show_bug.cgi?id=119186
Reviewed by Anders Carlsson.
Remove GraphicsLayer::create(GraphicsLayerClient*) function since it's
been deprecated by r130072.
* WebCore.exp.in:
* WebCore.order:
* platform/graphics/GraphicsLayer.h:
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2013-07-27 Alexey Proskuryakov <ap@apple.com>
HTMLParserScheduler gets into an inconsistent state when suspended for reasons
other than WillDeferLoading
https://bugs.webkit.org/show_bug.cgi?id=119172
Reviewed by Sam Weinig.
When loading is not deferred, even a suspended parser will be processing new data
from network, potentially starting its next chunk timer.
Limit suspending to when we can actually enforce it.
Here is what happens for each ReasonForSuspension:
- JavaScriptDebuggerPaused: continuing to parse is probably wrong, but in practice,
this is unlikely to happen while debugging, and wasn't properly prevented before
this patch anyway.
- WillDeferLoading: No change in behavior.
- DocumentWillBecomeInactive: This is about page cache, and documents are only allowed
to be cached when fully loaded.
- PageWillBeSuspended: This appears to be part of Frame::suspendActiveDOMObjectsAndAnimations()
implementation, I'm guessing that it is appropriate to continue loading.
* dom/Document.cpp:
(WebCore::Document::suspendScheduledTasks):
(WebCore::Document::resumeScheduledTasks):
Only suspend/resume parsing when loading is deferred. This is not expressed directly,
but it's important to do this to avoid executing JS behind alerts and other modal dialogs.
* html/parser/HTMLParserScheduler.h: Added m_suspended member variable for assertions.
* html/parser/HTMLParserScheduler.cpp:
(WebCore::HTMLParserScheduler::HTMLParserScheduler):
(WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
(WebCore::HTMLParserScheduler::scheduleForResume):
(WebCore::HTMLParserScheduler::suspend):
(WebCore::HTMLParserScheduler::resume):
Update m_suspended and assert as appropriate. No behavior changes for release mode.
* page/Frame.cpp: (WebCore::Frame::suspendActiveDOMObjectsAndAnimations):
Added a FIXME.
2013-07-27 Alexey Proskuryakov <ap@apple.com>
Make SuspendableTimer safer
https://bugs.webkit.org/show_bug.cgi?id=119127
Reviewed by Sam Weinig.
SuspendableTimer now enforces that it stays suspended until resumed (or until stopped
and started again). To ensure this, TimerBase is now a private base class, and parts of
its interface that clients use are reimplemented with suspend/resume in mind.
Derived classes are still allowed to override TimerBase virtual functions (notably
fired() and alignedFireTime()).
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueueTimer): Removed an extraneous WTF_MAKE_NONCOPYABLE,
TimerBase has it already.
(WebCore::DocumentEventQueueTimer::create): Use our normal create() pattern.
(WebCore::DocumentEventQueue::DocumentEventQueue): Made the constructor private, accordingly.
(WebCore::DocumentEventQueue::cancelEvent): Use SuspendableTimer::cancel(), which
is a new name to disambiguate TimerBase::stop() and ActiveDOMObject::stop().
(WebCore::DocumentEventQueue::close): Ditto.
* page/DOMTimer.cpp:
(WebCore::DOMTimer::fired): Now that SuspendableTimer knows whether it's currently
suspended, assert that it's not.
(WebCore::DOMTimer::didStop): Separated ActiveDOMObject::stop() implementation from
additional cleanup, allowing for better SuspendableTimer encapsulation.
* page/DOMTimer.h: Added FINAL and OVVERIDE specifiers as appropriate.
* page/SuspendableTimer.h: Added FINAL (and OVERRIDE) qualifiers to ActiveDOMObject
methods. A derived class that wants to override current behavior is most likely not
a timer, and thus shouldn't be a derived class.
(WebCore::SuspendableTimer::isActive): SuspendableTimer with a next fire time is
active even if suspended, we shouldn't overwrite its saved data thinking that it's
inactive.
(WebCore::SuspendableTimer::isSuspended): Exposed to clients (m_suspended is no
longer debug only).
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::SuspendableTimer): Updated for new variable names.
(WebCore::SuspendableTimer::stop): This is ActiveDOMObject::stop(), which is called
before final destruction. We don't track this state directly, but can approximate
with setting m_suspended, so even if someone tries to start the timer afterwards,
it won't fire.
(WebCore::SuspendableTimer::suspend): Updated for new names.
(WebCore::SuspendableTimer::resume): Ditto.
(WebCore::SuspendableTimer::didStop): No-op default implementation for client hook.
(WebCore::SuspendableTimer::cancel): Equivalent of TimerBase::stop(), which also
works when suspended.
(WebCore::SuspendableTimer::startRepeating): Replacement for TimerBase function with
the same name, which works correctly when suspended. We don't want to actually start
the timer in this case.
(WebCore::SuspendableTimer::startOneShot): Ditto.
(WebCore::SuspendableTimer::repeatInterval): Ditto.
(WebCore::SuspendableTimer::augmentFireInterval): Ditto.
(WebCore::SuspendableTimer::augmentRepeatInterval): Ditto.
2013-07-27 Sam Weinig <sam@webkit.org>
Add assertions for CSSPrimitiveValue's m_value.valueID accessor
https://bugs.webkit.org/show_bug.cgi?id=119180
Reviewed by Andreas Kling.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
(WebCore::CSSPrimitiveValue::operator ColumnSpan):
(WebCore::CSSPrimitiveValue::operator PrintColorAdjust):
(WebCore::CSSPrimitiveValue::operator EBorderStyle):
(WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
(WebCore::CSSPrimitiveValue::operator CompositeOperator):
(WebCore::CSSPrimitiveValue::operator ControlPart):
(WebCore::CSSPrimitiveValue::operator EBackfaceVisibility):
(WebCore::CSSPrimitiveValue::operator EFillAttachment):
(WebCore::CSSPrimitiveValue::operator EFillBox):
(WebCore::CSSPrimitiveValue::operator EFillRepeat):
(WebCore::CSSPrimitiveValue::operator EBoxPack):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
(WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
(WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
(WebCore::CSSPrimitiveValue::operator EBoxSizing):
(WebCore::CSSPrimitiveValue::operator EBoxDirection):
(WebCore::CSSPrimitiveValue::operator EBoxLines):
(WebCore::CSSPrimitiveValue::operator EBoxOrient):
(WebCore::CSSPrimitiveValue::operator ECaptionSide):
(WebCore::CSSPrimitiveValue::operator EClear):
(WebCore::CSSPrimitiveValue::operator ECursor):
(WebCore::CSSPrimitiveValue::operator CursorVisibility):
(WebCore::CSSPrimitiveValue::operator EDisplay):
(WebCore::CSSPrimitiveValue::operator EEmptyCell):
(WebCore::CSSPrimitiveValue::operator EAlignItems):
(WebCore::CSSPrimitiveValue::operator EJustifyContent):
(WebCore::CSSPrimitiveValue::operator EFlexDirection):
(WebCore::CSSPrimitiveValue::operator EAlignContent):
(WebCore::CSSPrimitiveValue::operator EFlexWrap):
(WebCore::CSSPrimitiveValue::operator EFloat):
(WebCore::CSSPrimitiveValue::operator LineBreak):
(WebCore::CSSPrimitiveValue::operator EListStylePosition):
(WebCore::CSSPrimitiveValue::operator EListStyleType):
(WebCore::CSSPrimitiveValue::operator EMarginCollapse):
(WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
(WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
(WebCore::CSSPrimitiveValue::operator ENBSPMode):
(WebCore::CSSPrimitiveValue::operator EOverflow):
(WebCore::CSSPrimitiveValue::operator EPageBreak):
(WebCore::CSSPrimitiveValue::operator EPosition):
(WebCore::CSSPrimitiveValue::operator EResize):
(WebCore::CSSPrimitiveValue::operator ETableLayout):
(WebCore::CSSPrimitiveValue::operator ETextAlign):
(WebCore::CSSPrimitiveValue::operator TextAlignLast):
(WebCore::CSSPrimitiveValue::operator TextJustify):
(WebCore::CSSPrimitiveValue::operator TextDecoration):
(WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
(WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
(WebCore::CSSPrimitiveValue::operator ETextSecurity):
(WebCore::CSSPrimitiveValue::operator ETextTransform):
(WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
(WebCore::CSSPrimitiveValue::operator EUserDrag):
(WebCore::CSSPrimitiveValue::operator EUserModify):
(WebCore::CSSPrimitiveValue::operator EUserSelect):
(WebCore::CSSPrimitiveValue::operator EVerticalAlign):
(WebCore::CSSPrimitiveValue::operator EVisibility):
(WebCore::CSSPrimitiveValue::operator EWhiteSpace):
(WebCore::CSSPrimitiveValue::operator EWordBreak):
(WebCore::CSSPrimitiveValue::operator EOverflowWrap):
(WebCore::CSSPrimitiveValue::operator TextDirection):
(WebCore::CSSPrimitiveValue::operator WritingMode):
(WebCore::CSSPrimitiveValue::operator TextCombine):
(WebCore::CSSPrimitiveValue::operator RubyPosition):
(WebCore::CSSPrimitiveValue::operator TextEmphasisPosition):
(WebCore::CSSPrimitiveValue::operator TextOverflow):
(WebCore::CSSPrimitiveValue::operator TextEmphasisFill):
(WebCore::CSSPrimitiveValue::operator TextEmphasisMark):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
(WebCore::CSSPrimitiveValue::operator EPointerEvents):
(WebCore::CSSPrimitiveValue::operator FontDescription::Kerning):
(WebCore::CSSPrimitiveValue::operator FontSmoothingMode):
(WebCore::CSSPrimitiveValue::operator FontWeight):
(WebCore::CSSPrimitiveValue::operator FontItalic):
(WebCore::CSSPrimitiveValue::operator FontSmallCaps):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
(WebCore::CSSPrimitiveValue::operator ColorSpace):
(WebCore::CSSPrimitiveValue::operator Hyphens):
(WebCore::CSSPrimitiveValue::operator LineSnap):
(WebCore::CSSPrimitiveValue::operator LineAlign):
(WebCore::CSSPrimitiveValue::operator Order):
(WebCore::CSSPrimitiveValue::operator ESpeak):
(WebCore::CSSPrimitiveValue::operator BlendMode):
(WebCore::CSSPrimitiveValue::operator LineCap):
(WebCore::CSSPrimitiveValue::operator LineJoin):
(WebCore::CSSPrimitiveValue::operator WindRule):
(WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
(WebCore::CSSPrimitiveValue::operator EBorderCollapse):
(WebCore::CSSPrimitiveValue::operator EBorderFit):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
(WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
(WebCore::CSSPrimitiveValue::operator ColumnAxis):
(WebCore::CSSPrimitiveValue::operator ColumnProgression):
(WebCore::CSSPrimitiveValue::operator WrapFlow):
(WebCore::CSSPrimitiveValue::operator WrapThrough):
(WebCore::CSSPrimitiveValue::operator GridAutoFlow):
(WebCore::CSSPrimitiveValue::operator EBufferedRendering):
(WebCore::CSSPrimitiveValue::operator EColorInterpolation):
(WebCore::CSSPrimitiveValue::operator EColorRendering):
(WebCore::CSSPrimitiveValue::operator EDominantBaseline):
(WebCore::CSSPrimitiveValue::operator EShapeRendering):
(WebCore::CSSPrimitiveValue::operator ETextAnchor):
(WebCore::CSSPrimitiveValue::operator SVGWritingMode):
(WebCore::CSSPrimitiveValue::operator EVectorEffect):
(WebCore::CSSPrimitiveValue::operator EMaskType):
Assert that the CSSPrimitiveValue is holding a CSSValueID before accessing it.
2013-07-26 Sam Weinig <sam@webkit.org>
Stop pretending to support <string> for text-align.
https://bugs.webkit.org/show_bug.cgi?id=119107
Reviewed by Andreas Kling.
Test: fast/css/text-align-string-crash.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Stop pretending to support <string> for text-align.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyTextAlign::applyValue):
ASSERT that only value IDs get passed.
2013-07-26 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGRectElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=119126
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGRectElement*> can
be changed with toSVGRectElement().
No new tests, no behavior change.
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::updateShapeFromElement):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromRectElement):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
* svg/SVGRectElement.h:
(WebCore::toSVGRectElement):
2013-07-26 Yongjun Zhang <yongjun_zhang@apple.com>
With frame flattening on, too many resize events fired if document is resized in onresize handler.
https://bugs.webkit.org/show_bug.cgi?id=119075
Reviewed by Simon Fraser.
With http://trac.webkit.org/changeset/149287, WebCore also sends resize event in FrameView::setFrameRect. When
flattening an iframe, setFrameRect could be called multiple times from RenderFrameBase::layoutWithFlattening and
we could get multiple resize events. This patch adds a flag in FrameView to disallow sending resize events if
we are inside layoutWithFlattening. The resize event will be sent in performPostLayoutTasks after the iframe
is done laying out.
Manually tested by verifying the rendering slowness in www.hi-pda.com is fixed when frame flattening is enabled.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setFrameRect):
* page/FrameView.h:
(WebCore::FrameView::setResizeEventAllowed):
(WebCore::FrameView::resizeEventAllowed):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
2013-07-26 Dean Jackson <dino@apple.com>
Allow new transitions to run even when controller is suspended
https://bugs.webkit.org/show_bug.cgi?id=119171
<rdar://problem/14511404>
Reviewed by Simon Fraser.
Expose a new property on AnimationController that allows newly created
animations to run even if the controller says it is suspended. See WebKit
ChangeLog for more details.
Test: transitions/created-while-suspended.html
* WebCore.exp.in: Export the new methods so WebView can use them.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialize new flag to false.
(WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): Check new flag is not true.
(WebCore::AnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended): Expose setter.
(WebCore::AnimationController::allowsNewAnimationsWhileSuspended): "Public" getter.
(WebCore::AnimationController::setAllowsNewAnimationsWhileSuspended): "Public" setter.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::allowsNewAnimationsWhileSuspended):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::CompositeAnimation): Only suspend if new flag is false. Everything else
relies on the m_suspended flag, so the real code change is this one line.
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::createMetadataKeyNames): Do not include Media Selection
synbols when building without Media Selection API.
2013-07-26 Oliver Hunt <oliver@apple.com>
REGRESSION(FTL?): Crashes in plugin tests
https://bugs.webkit.org/show_bug.cgi?id=119141
Reviewed by Michael Saboff.
Getting the correct semantics to appease the inspector is fairly
awful with the iterator system. For the time being lets just revert
to requesting a full stack trace as we did in the past.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix.
Correct build when targeting a release that does not have the AVCF
Legible Output infrastructure.
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Exclude
a soft-link target when the API doesn't exist.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Correct include options for non-Legible Output supporting environments.
(WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
Prevent build failure when building with legacy caption support.
2013-07-26 Andreas Kling <akling@apple.com>
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>
Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.
2013-07-26 Tim Horton <timothy_horton@apple.com>
Add a mode where autosizing fixes the FrameView height to at least the WKView height
https://bugs.webkit.org/show_bug.cgi?id=119104
<rdar://problem/14549021>
Reviewed by Anders Carlsson.
* WebCore.exp.in: Export FrameView::setAutoSizeFixedMinimumHeight.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Initialize m_autoSizeFixedMinimumHeight to 0.
(WebCore::FrameView::autoSizeIfEnabled):
Increase the FrameView height to m_autoSizeFixedMinimumHeight if necessary,
and do another layout. Store the computed intrinsic content size.
(WebCore::FrameView::setAutoSizeFixedMinimumHeight): Added.
* page/FrameView.h:
(WebCore::FrameView::autoSizingIntrinsicContentSize): Added.
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Remove workarounds now that rdar://problem/14390466 is fixed.
https://bugs.webkit.org/show_bug.cgi?id=119150
Reviewed by Anders Carlsson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createPlayer): Remove workaround to add legible output
after player is created.
(WebCore::AVFWrapper::createPlayerItem): Remove workaround to delay adding
legible output until player is created.
(WebCore::AVFWrapper::platformLayer): Get rid of unused temporary.
2013-07-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening.
* WebCore.vcxproj/WebCore.vcxproj: Add missing header file to ease code viewing.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2013-07-26 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] LayerTiler fails to render layer after waking up
https://bugs.webkit.org/show_bug.cgi?id=119146
Reviewed by George Staikos.
When the application is backgrounded, all tiles are freed up to
release memory back to the system. We also mark the contents as dirty
in LayerTiler::deleteTextures() so tiles will be repopulated when
waking up again.
The problem was caused by an optimization to avoid re-rendering tiles
repeatedly until the UI thread catches up with the fact that we have
indeed rendered those tiles (which will happen when the UI thread next
composites a frame).
When contents are dirty, we're not supposed to perform this
optimization (i.e. we're not supposed to skip rendering) because the
appearance of the layer has changed, so we do need to render those
tiles. Unfortunately, the code that was supposed to forget the list of
tiles rendered was in a conditional, "if (frontVisibility)", which
happened to be false sometimes when the app woke up again. So we ended
up perpetually skipping those render jobs, and the UI thread kept
yelling at us to render them.
Fixed by unconditionally dropping the list of tiles rendered when
contents are dirty.
This can't be detected without pixel tests, which BB DRT currently
doesn't support.
JIRA 452460
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerVisibility::clearTilesRendered):
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
2013-07-25 Ryosuke Niwa <rniwa@webkit.org>
Remove unused HTMLTextFormControlElement::textRendererAfterUpdateLayout
https://bugs.webkit.org/show_bug.cgi?id=119121
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/3255ce725711707fe1fd18be91a6d06789517220.
* html/HTMLTextFormControlElement.cpp:
* html/HTMLTextFormControlElement.h:
2013-07-25 Ryosuke Niwa <rniwa@webkit.org>
Fix document leak when selection is created inside the document
https://bugs.webkit.org/show_bug.cgi?id=119122
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/b908cb4c8da93316d787de31c93f2a43de332a10
The bug was caused by FrameSelection::m_previousCaretNode holding onto a Node, leaking its document.
Fixed the bug by explicitly clearing it in FrameSelection::prepareForDestruction.
Test: editing/selection/leak-document-with-selection-inside.html
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::prepareForDestruction):
2013-07-25 Andreas Kling <akling@apple.com>
ChromeClient::focusedNodeChanged() should be focusedElementChanged().
<http://webkit.org/b/119110>
Reviewed by Anders Carlsson.
Because only Elements can be focused.
* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::focusedElementChanged):
* page/Chrome.cpp:
(WebCore::Chrome::focusedElementChanged):
* page/Chrome.h:
* page/ChromeClient.h:
2013-07-25 Kwang Yul Seo <skyul@company100.net>
[WK2][Soup] Add private browsing support
https://bugs.webkit.org/show_bug.cgi?id=118657
Reviewed by Gustavo Noronha Silva.
Support private browsing by adding a method to create a private
browsing soup session. This private browsing session uses a
non-persistent cookie jar and does not use the disk cache feature.
No new tests. Covered by existing private browsing tests.
* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::isPrivateBrowsingSession):
Add USE(SOUP) guard to isPrivateBrowsingSession() and m_isPrivate.
* platform/network/ResourceHandle.h:
Add a factory method to create a private browsing session for soup.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::createPrivateBrowsingCookieJar):
* platform/network/soup/CookieJarSoup.h:
Add a method to create a non-persistent cookie jar for private browsing.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
Initialize m_isPrivate to false.
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
Implement the method by invoking ResourceHandle::createPrivateBrowsingSession.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupSession):
Extract common soup session creation code so that both defaultSession
and createPrivateBrowsingSession can use this function to create a soup
session.
(WebCore::ResourceHandle::defaultSession):
Change to use createSoupSession.
(WebCore::ResourceHandle::createPrivateBrowsingSession):
Create a session which uses a non-persistent cookie jar.
2013-07-25 Tim Horton <timothy_horton@apple.com>
Null check m_frame in maximum and minimumScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=119109
<rdar://problem/14545393>
Reviewed by Darin Adler.
* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
Null-check m_frame (and move the early-return after the clamp-to-0
as the revert in r152911 should have).
2013-07-25 Anders Carlsson <andersca@apple.com>
Localizable.strings generated by extract-localizable-strings should be UTF-8
https://bugs.webkit.org/show_bug.cgi?id=119106
Reviewed by Mark Rowe.
* English.lproj/Localizable.strings:
Re-encode this as UTF-8 and remove the BOM.
* WebCore.xcodeproj/project.pbxproj:
Set the file encoding of Localizable.strings to UTF-8.
2013-07-25 Ryosuke Niwa <rniwa@webkit.org>
Don't force layout when querying a fixed or non-box margin/padding property
https://bugs.webkit.org/show_bug.cgi?id=118032
Reviewed by David Hyatt.
Merge https://chromium.googlesource.com/chromium/blink/+/66427d0825fcc2975bd50220cdcaa2504d6f36e5.
This patch avoids layout in ComputedStyleExtractor::propertyValue for margin and padding properties
when they are of fixed length. According to the Blink patch's author, this improves the page load
time of economist.com by 27%.
The actual code change is significantly different from the original Blink patch since we've done
some refactorins in r152938 and r153067 to make this change more self-contained.
Test: fast/css/computed-width-without-renderer.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::paddingOrMarginIsRendererDependent):
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue):
2013-07-25 Sam Weinig <sam@webkit.org>
-[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
https://bugs.webkit.org/show_bug.cgi?id=119099
<rdar://problem/13439291>
Reviewed by Enrica Casucci.
Tests:
API Test: AttributedStringTest_Strikethrough
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
Set the NSStrikethroughStyleAttributeName attribute when text-decoration: line-through is seen.
2013-07-25 Pratik Solanki <psolanki@apple.com>
Unreviewed build fix after r153333.
* platform/network/cf/ResourceResponseCFNet.cpp: Remove toTimeT since it is no longer called.
2013-07-25 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed EFL build fix after r153315.
Fix build error after we started compiling with c++0x support
in r153315.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::toEdjeGroup):
2013-07-25 Anders Carlsson <andersca@apple.com>
Remove lastModifiedDate from ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=119092
Reviewed by Andreas Kling.
Computing m_lastResponseDate is costly on some platforms and we already have a better way to
get the last response time, so convert the two call sites that used to call ResourceresponseBase::lastModifiedDate()
over to using lastModified() instead.
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
* plugins/PluginStream.cpp:
(WebCore::lastModifiedDate):
(WebCore::PluginStream::startStream):
2013-07-25 Yi Shen <max.hong.shen@gmail.com>
Optimize the thread locks for API Shims
https://bugs.webkit.org/show_bug.cgi?id=118573
Reviewed by Geoffrey Garen.
Remove the thread lock from API Shims if the VM has an exclusive thread (e.g. the VM
only used by WebCore's main thread).
No new tests required since no functionality changed.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
2013-07-25 Bear Travis <betravis@adobe.com>
[CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES flag
https://bugs.webkit.org/show_bug.cgi?id=117277
Reviewed by Alexandru Chiculita.
This patch adds some compile guards that were missing from the RenderStyle and
StyleRareNonInheritedData files. When the compile guard caused parameters to
not be used, the parameters were marked using UNUSED_PARAM.
* css/CSSPropertyNames.in: Inserting a line to trigger build.
* rendering/RenderBlock.cpp:
(WebCore::shapeInfoRequiresRelayout):
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
* rendering/RenderBox.cpp:
(WebCore::isCandidateForOpaquenessTest):
* rendering/RenderBox.h:
* rendering/RenderObject.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-07-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGPatternElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=119013
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGPatternElement*> can
be changed with toSVGPatternElement().
Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154734
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGPatternElement.h:
(WebCore::toSVGPatternElement):
2013-06-21 Mark Lam <mark.lam@apple.com>
Fixed broken build: updated to match SmallStrings changes in r151864.
Not reviewed.
No new tests.
* bindings/js/JSDOMBinding.h:
(WebCore::jsStringWithCache):
2013-06-15 Filip Pizlo <fpizlo@apple.com>
Concurrent JIT shouldn't try to recompute the CodeBlockHash as part of debug dumps, since doing so may fail if dealing with a CachedScript that doesn't have its script string handy
https://bugs.webkit.org/show_bug.cgi?id=117676
Reviewed by Sam Weinig.
Remove the broken hack for the concurrent JIT, since now the concurrent JIT won't use this code anymore.
No new tests because no new behavior.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
2013-06-10 Mark Lam <mark.lam@apple.com>
Introducing the StackIterator class.
https://bugs.webkit.org/show_bug.cgi?id=117390.
Reviewed by Geoffrey Garen.
No new tests.
* ForwardingHeaders/interpreter/StackIterator.h: Added.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-06-09 Filip Pizlo <fpizlo@apple.com>
Unreviewed, fix build. Use at() instead of operator[] because of ambiguity on some compilers.
* page/CaptionUserPreferencesMac.mm:
(WebCore::languageIdentifier):
2013-05-27 Filip Pizlo <fpizlo@apple.com>
testRunner should be able to tell you if a function is DFG compiled
https://bugs.webkit.org/show_bug.cgi?id=116847
Reviewed by Mark Hahnenberg.
Bail early if we're in the compilation thread. This is only relevant for
debug dumps.
No new tests becase no new behavior.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
2013-05-25 Mark Lam <mark.lam@apple.com>
Remove Interpreter::retrieveLastCaller().
https://bugs.webkit.org/show_bug.cgi?id=116753.
Reviewed by Geoffrey Garen.
This is part of the refactoring effort to get rid of functions walking
the JS stack in their own way.
No new tests.
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
2013-05-05 Geoffrey Garen <ggaren@apple.com>
Rolled back in r149527 with crash fixed.
Reviewed by Oliver Hunt.
Rationalized 'this' value conversion
https://bugs.webkit.org/show_bug.cgi?id=115542
2013-04-29 Filip Pizlo <fpizlo@apple.com>
fourthTier: String::utf8() should also be available as StringImpl::utf8() so that you don't have to ref() a StringImpl just to get its utf8()
https://bugs.webkit.org/show_bug.cgi?id=115393
Reviewed by Geoffrey Garen.
No new tests because no new behavior.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::close):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):
2013-07-24 Simon Fraser <simon.fraser@apple.com>
[iOS] Captions are clipped in documents using pagination
https://bugs.webkit.org/show_bug.cgi?id=119072
Reviewed by Beth Dakin.
MediaControlTextTrackContainerElement::createTextTrackRepresentationImage() is called
to paint captions into a layer used for fullscreen video. It did the painting using
a subtree paint, but starting at the root RenderView's layer. This is problematic,
because the caption painting is subject to clipping for columns, and any enclosing
overflow:hidden container.
Fix this by starting the paint at the MediaControlTextTrackContainerElement's
renderer's layer. By doing this we don't have to worry about an offset, so no
translation is required.
Also make sure we update layer before grabbing the renderer (in case layout
destroys it).
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
2013-07-24 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r152335): Mac Pro title occluded in MobileSafari; can't scroll page
https://bugs.webkit.org/show_bug.cgi?id=119066
<rdar://problem/14499184>
Reviewed by Daniel Bates.
Following <http://trac.webkit.org/changeset/152335> (bug #118337) we set
the z-index to 0 on every element with CSS "overflow: scroll" and
"-webkit-overflow-scrolling: touch" regardless of whether the element has
non-auto z-index. Instead we should only set the z-index to 0 for such elements
that have an auto z-index.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
2013-07-24 Ryosuke Niwa <rniwa@webkit.org>
Use-after-free in ApplyStyleCommand::removeInlineStyle
https://bugs.webkit.org/show_bug.cgi?id=118627
Reviewed by Oliver Hunt.
Merge https://chromium.googlesource.com/chromium/blink/+/b6471d077e012b05ccba14d0ce8e6d616106c8e6
Unfortunately, there is no test case for this bug.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::removeInlineStyle):
2013-07-24 Zan Dobersek <zdobersek@igalia.com>
Remove CheckedInt, use Checked<T, RecordOverflow> instead
https://bugs.webkit.org/show_bug.cgi?id=119022
Reviewed by Oliver Hunt.
Following the cleanup in r153062, the CheckedInt uses are replaced with
using the Checked<T, RecordOverflow> class. The CheckedInt header is not
used anywhere anymore and is thus removed.
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/CheckedInt.h: Removed.
* html/canvas/DataView.cpp:
(WebCore::DataView::create):
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::associateBufferSubDataImpl):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::drawArrays):
2013-07-24 Andreas Kling <akling@apple.com>
RenderMenuList computes the width of its longest option twice.
<http://webkit.org/b/119046>
<rdar://problem/14534679>
Reviewed by Darin Adler.
Rename the RenderMenuList::m_optionsChanged flag to m_needsOptionsWidthUpdate,
and make sure it gets cleared after we do a width computation in response to font changes.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::styleDidChange):
2013-07-24 Zan Dobersek <zdobersek@igalia.com>
Make KURL::hasPath private
https://bugs.webkit.org/show_bug.cgi?id=118279
Reviewed by Darin Adler.
* platform/KURL.h: The KURL::hasPath method is not used outside of the KURL class, so it is made private.
2013-07-24 Jessie Berlin <jberlin@apple.com>
Remove WKPageGetPlugInInformation - it is not used anymore
https://bugs.webkit.org/show_bug.cgi?id=119047
Rubber-stamped by Alexey Proskuryakov.
Revert r152328, which added a key used only in the callback info for
WKPageGetPlugInInformation.
* WebCore.exp.in:
2013-07-24 Robert Hogan <robert@webkit.org>
Border drawing incorrect when using both border-collapse: collapse and overflow: hidden on a table
https://bugs.webkit.org/show_bug.cgi?id=18305
Reviewed by David Hyatt.
overflowClipRect() clips out the table's half of a collapsed border when there is an overflow clip
on the table. This prevents the table's half of the border ever getting painted.
To fix this, clip to the border box of tables when we're in the paint phase that gets the sections to draw the collapsed borders
or when we're self painting. This will allow the table's half of the border to get painted. In the case where the table is self
painting we ensure that content gets clipped to cell's side of the collapsed border by ensuring the clip passed to child layers
from the table clips to the inside of the collapsed border.
It's worth noting that a table's collapsed borders are painted by the table's layer using functions in
RenderTableSection and RenderTableCell. So if a table section has a self-painting layer this patch still works, because
the borders aren't painted by the section's layer.
Tests: fast/table/overflow-table-collapsed-borders-cell-painting-table-self-painting-layer.html
fast/table/overflow-table-collapsed-borders-cell-painting.html
fast/table/overflow-table-collapsed-borders-section-layer-painting.html
fast/table/overflow-table-collapsed-borders-section-layer-table-self-painting-layer.html
fast/table/overflow-table-collapsed-borders-section-self-painting-layer-painting.html
fast/table/overflow-table-collapsed-borders-section-self-painting-layer-table-self-painting-layer.html
fast/table/table-overflow.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::overflowClipRect):
* rendering/RenderBox.h:
(WebCore::RenderBox::overflowClipRectForChildLayers):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::overflowClipRect):
* rendering/RenderTable.h:
(WebCore::RenderTable::overflowClipRectForChildLayers):
2013-07-24 Frédéric Wang <fred.wang@free.fr>
Graphical elements inside mphantom should not be visible.
https://bugs.webkit.org/show_bug.cgi?id=116600.
Reviewed by Chris Fleizach.
Test: mathml/presentation/phantom.html
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint): don't paint the fraction bar when the visibility is not "visible"
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint): don't paint the radical symbol when the visibility is not "visible"
2013-07-24 Brendan Long <b.long@cablelabs.com>
WebVTTParser's identifier buffering can ignore subsequent lines
https://bugs.webkit.org/show_bug.cgi?id=118483
Reviewed by Eric Carlson.
No new tests since this bug can't be reproduced in layout tests.
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::parseBytes): Only buffer the identifier if we haven't read an entire line.
2013-07-23 Andreas Kling <akling@apple.com>
REGRESSION(r150867): FrameView auto-sizing + delegate denied image load may cause StyleResolver to re-enter itself.
<rdar://problem/14324895>
<http://webkit.org/b/119023>
Reviewed by Simon Fraser.
The bug happened when FrameView::autoSizeIfEnabled() was getting called below FrameLoader::checkCompleted()
triggered by an incorrect loadDone() callback originating in SubresourceLoader::didCancel().
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingResources):
Add an assertion that this function is not getting re-entered. If a similar bug occurs
in the future, this will help the lucky person debugging.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didCancel):
Don't notifyDone() if the SubresourceLoader is in Uninitialized state.
2013-07-23 Tim Horton <timothy_horton@apple.com>
Pixel-snap the unavailable plugin indicator arrow for maximum sharpness
https://bugs.webkit.org/show_bug.cgi?id=119024
<rdar://problem/14523331>
Reviewed by Anders Carlsson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::addReplacementArrowPath):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
Pixel-snap the unavailable plugin indicator arrow. Snapping directions
were chosen by eye/symmetry to look best on 1x and 2x devices at
1x and 2x page scale.
2013-07-19 Ryosuke Niwa <rniwa@webkit.org>
The computed values of fix length padding should be subpixel precision like margin
https://bugs.webkit.org/show_bug.cgi?id=118936
Reviewed by Simon Fraser.
The bug was caused by ComputedStyleExtractor::propertyValue always returning the used value
for padding. Fixed the bug by returning the computed value when they're of fixed length.
This aligns the behaviors of getComputedStyle(~).padding~ with getComputedStyle(~).margin~,
which had been fixed in r102149. While the current CSSOM specification says getComputedStyle
should return the used values for margins when display property is set to anything but none,
new behavior matches that of Chrome, Firefox, and Internet Explorer.
Also extracted zoomAdjustedPaddingOrMarginPixelValue to reduce the code duplication.
Test: fast/css/getComputedStyle/getComputedStyle-padding-margin-subpixel-length.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::zoomAdjustedPaddingOrMarginPixelValue): Extracted.
(WebCore::ComputedStyleExtractor::propertyValue):
2013-07-23 Alex Christensen <achristensen@apple.com>
Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
https://bugs.webkit.org/show_bug.cgi?id=118550
Reviewed by Dean Jackson.
* CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Use Checked<uint32_t, RecordOverflow> instead of CheckedInt in GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=118988
Reviewed by Oliver Hunt.
Use the WTF's Checked class, with uint32_t as the numeric type and RecordOverflow as the overflow handler,
instead of the CheckedInt class. This removes a layering violation that's occurring due to including the CheckedInt
header that's currently located in the WebCore layer (alongside the HTML canvas code in Source/WebCore/html/canvas).
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::computeImageSizeInBytes):
2013-07-23 Zalan Bujtas <zalan@apple.com>
REGRESSION(r152313): Links in certain twitter postings don't warp correctly on page
https://bugs.webkit.org/show_bug.cgi?id=118435
Reviewed by David Hyatt.
When we find an empty inline in the middle of the word, prefer breaking it before
instead of after to match other browsers' rendering.
Test: fast/text/whitespace/inline-whitespace-wrapping-12.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::canBreakAtThisPosition):
2013-07-23 Alexey Proskuryakov <ap@apple.com>
Dictionary hotkey does not work on vertical text
https://bugs.webkit.org/show_bug.cgi?id=118993
<rdar://problem/14478260>
Reviewed by Enrica Casucci.
Test: platform/mac/editing/input/firstrectforcharacterrange-vertical.html
* editing/Editor.cpp:
(WebCore::collapseCaretWidth): A helper function.
(WebCore::Editor::firstRectForRange): Many changes:
- use RenderObject::absoluteBoundingBoxRectForRange() in regular case, because
that's more direct that getting caret rects and computing bounding rect from those.
- handle collapsed ranges separately, because absoluteBoundingBoxRectForRange()
doesn't provide the needed result, and because it can be done faster.
- wherever we use carets to compute the result, account for vertical text (in a hackish
way, as we don't have layout information at Editor level).
* rendering/RenderBlock.cpp: (WebCore::RenderBlock::localCaretRect): Removed
dead code.
2013-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] New positioning model: Borders
https://bugs.webkit.org/show_bug.cgi?id=118822
Reviewed by Dean Jackson.
Converting to the shape coordinate system was not properly accounting
for borders and padding. This has been fixed and a new convienence
method added because of the added complexity of the conversion.
Test: csswg/submitted/shapes/shape-outside/shape-outside-floats-square-border-000.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Update to use
computeSegmentsForContainingBlockLine to do the coordinate
conversion.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForContainingBlockLine):
Add new method to do the coordinate conversion from the containing
block coordinate system to the coordinate system of the shape so
that the segments can be correctly calculated.
2013-07-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove deprecated and unused compositing settings
https://bugs.webkit.org/show_bug.cgi?id=119014
Reviewed by Andreas Kling.
* page/Settings.in:
2013-07-23 Tim Horton <timothy_horton@apple.com>
Add a test for plug-in unavailability indicator obscurity detection
https://bugs.webkit.org/show_bug.cgi?id=119007
Reviewed by Anders Carlsson.
Test: plugins/unavailable-plugin-indicator-obscurity.html
Expose the ability to test whether the unavailable plugin indicator
is obscured via the internals object.
* testing/Internals.cpp:
(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
* testing/Internals.h:
* testing/Internals.idl:
Expose RenderEmbeddedObject::isReplacementObscured as
internals.isPluginUnavailabilityIndicatorObscured for testing purposes.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
[Soup] Clean up header inclusions in ResourceRequest(Soup), SocketStreamHandle
https://bugs.webkit.org/show_bug.cgi?id=118984
Reviewed by Darin Adler.
Execute a minor cleanup of the header inclusions in Soup-specific ResourceRequestSoup.cpp, ResourceRequest.h
and SocketStreamHandle.h source files. The inclusions are sorted into proper order, with blank lines and unnecessary
reinclusions removed.
* platform/network/soup/ResourceRequest.h:
* platform/network/soup/ResourceRequestSoup.cpp:
* platform/network/soup/SocketStreamHandle.h:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
[Soup] Remove unnecessary header inclusions in ResourceHandleSoup.cpp
https://bugs.webkit.org/show_bug.cgi?id=118983
Reviewed by Martin Robinson.
Remove inclusions of the CachedResourceLoader, ChromeClient, Frame and Page headers. These are not
necessary (anymore) and only prevent the source file to be built independently of WebCore, as it should be.
* platform/network/soup/ResourceHandleSoup.cpp:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove unnecessary header inclusions in GraphicsContext3D.cpp, GraphicsContext3DOpenGLCommon.cpp
https://bugs.webkit.org/show_bug.cgi?id=118989
Reviewed by Darin Adler.
* platform/graphics/GraphicsContext3D.cpp: Remove the unnecessary DrawingBuffer header inclusion.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Remove the unnecessary
CanvasRenderingContext and WebGLObject header inclusions.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove the topDocumentURL member of the GraphicsContext3D::Attributes struct
https://bugs.webkit.org/show_bug.cgi?id=118987
Reviewed by Darin Adler.
Remove the topDocumentURL member that currently resides in the GraphicsContext3D::Attributes struct.
It's not used anywhere and only has one place where it is set, in WebGLRenderingContext::create.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
* platform/graphics/GraphicsContext3D.h:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove unused DrawingBuffer::paintRenderingResultsToImageData
https://bugs.webkit.org/show_bug.cgi?id=118986
Reviewed by Darin Adler.
Remove the paintRenderingResultsToImageData method of the DrawingBuffer class. It is not used anywhere
and also introduces a nasty layering violation by including and operating with the ImageData class.
* platform/graphics/gpu/DrawingBuffer.cpp:
* platform/graphics/gpu/DrawingBuffer.h:
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Remove unnecessary includes in FormDataBuilder.cpp
https://bugs.webkit.org/show_bug.cgi?id=118991
Reviewed by Darin Adler.
* platform/network/FormDataBuilder.cpp: Remove the Frame and FrameLoader header inclusions,
nothing these two headers provide is used in this source file.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
Fix the style of the ContentDispositionType enum definition
https://bugs.webkit.org/show_bug.cgi?id=118990
Reviewed by Darin Adler.
* platform/network/HTTPParsers.h: Align the style of the ContentDispositionType enumeration
definition with the other enumeration definitions in the HTTPParsers header, using the
'enum Name { ... }' style instead of a typedef.
2013-07-23 Zan Dobersek <zdobersek@igalia.com>
[GTK] Mock GDK_IS_X11_DISPLAY macro can be redefined unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=118980
Reviewed by Martin Robinson.
* platform/gtk/GtkVersioning.h: Only define the GDK_IS_X11_DISPLAY macro when using the GTK+ 2 API version
as that's the only supported configuration where the macro is not defined. Definining it only if it's not
yet defined at the time of inclusion of this header can cause redefinitions in GTK+ headers that are normally
included later.
2013-07-22 Beth Dakin <bdakin@apple.com>
StickyPositionConstraints should store the constrainingRectAtLastLayout
https://bugs.webkit.org/show_bug.cgi?id=118999
Reviewed by Simon Fraser.
Much like how FixedPositionConstraints store a viewportRectAtLastLayout,
StickyConstraints should store a constrainingRectAtLastLayout. We'll need this to
get sticky right in overflow areas once overflow areas scroll on the scrolling
thread.
* page/scrolling/ScrollingConstraints.h:
(WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
(WebCore::StickyPositionViewportConstraints::constrainingRectAtLastLayout):
(WebCore::StickyPositionViewportConstraints::setConstrainingRectAtLastLayout):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
2013-07-22 Santosh Mahto <santosh.ma@samsung.com>
DateInputType constructor initiate incorrect base class
https://bugs.webkit.org/show_bug.cgi?id=118962
Reviewed by Gyuyoung Kim.
No new test required since solving code error
* html/DateInputType.cpp:
(WebCore::DateInputType::DateInputType):
Corrected the base class instantiation in constructor.
2013-07-22 Tim Horton <timothy_horton@apple.com>
Plug-in unavailability indicator should not be displayed if a blocked plugin's indicator is clipped
https://bugs.webkit.org/show_bug.cgi?id=118998
<rdar://problem/14511268>
Reviewed by Anders Carlsson.
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
(WebCore::HTMLPlugInElement::supportsFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::loadPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidget):
Rename showsUnavailablePluginIndicator to isPluginUnavailable, since being unavailable
and actually showing the indicator are two totally different things.
* WebCore.exp.in: Expose setUnavailablePluginIndicatorIsHidden.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
Rename m_showsUnavailablePluginIndicator to m_isPluginUnavailable.
Add m_isUnavailablePluginIndicatorHidden, defaulting to false.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription):
Set m_isPluginUnavailable when we get an unavailability reason.
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsHidden): Added.
* rendering/RenderEmbeddedObject.h:
(WebCore::RenderEmbeddedObject::isPluginUnavailable): Added.
(WebCore::RenderEmbeddedObject::showsUnavailablePluginIndicator):
Repurpose "showsUnavailablePluginIndicator" to actually represent whether
the indicator is displayed (i.e. the plugin is unavailable, and the
indicator is not hidden).
2013-07-22 Tim Horton <timothy_horton@apple.com>
RenderEmbeddedObject::isReplacementObscured should include the arrow in its area-of-interest
https://bugs.webkit.org/show_bug.cgi?id=118995
<rdar://problem/14516421>
Reviewed by Anders Carlsson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
Rename method from replacementTextRect to unavailablePluginIndicatorBounds for accuracy.
Use the bounding box of the indicator's path, which includes the rounded rect behind
the text as well as the arrow button.
(WebCore::RenderEmbeddedObject::isReplacementObscured):
* rendering/RenderEmbeddedObject.h:
2013-07-22 Tim Horton <timothy_horton@apple.com>
<applet> plugins are instantiated post-attach (instead of post-layout like for object and embed)
https://bugs.webkit.org/show_bug.cgi?id=118994
<rdar://problem/14511232>
Reviewed by Anders Carlsson.
Make <applet> consistent with <object> and <embed>, deferring plugin
instantiation to post-layout, so that layout is up-to-date if anything
needs it (like RenderEmbeddedObject::isReplacementObscured) during creation.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
Copy code from HTMLObjectElement/HTMLEmbedElement that defers plugin
creation until post-layout tasks. Java is always an NPAPI plugin, so
we should always defer if requested.
2013-07-22 Benjamin Poulain <benjamin@webkit.org>
Do not allocate 2 AtomicString just to do a comparison in HTMLAnchorElement::setRel()
https://bugs.webkit.org/show_bug.cgi?id=118941
Reviewed by Gavin Barraclough.
Currently, the only type of link relation supported by HTMLAnchorElement is RelationNoReferrer.
To find the value, we create a SpaceSplitString with the input value of the attribute (which
create one or more AtomicString depending on the input). Then we create a new AtomicString for
the literal "noreferrer". Finally, we compare the pointers and throw away all the AtomicStrings.
This causes a lot of memory operations for something really simple.
This patch adds a little helper method to SpaceSplitString to find a literal in the input. The only
allocation happens if we need to foldCase(). The following operations are done without allocating
new buffer and without hashing the input.
* dom/SpaceSplitString.cpp:
(WebCore::tokenizeSpaceSplitString):
(WebCore::AppendTokenToVectorTokenProcessor::AppendTokenToVectorTokenProcessor):
(WebCore::AppendTokenToVectorTokenProcessor::processToken):
(WebCore::SpaceSplitStringData::createVector):
(WebCore::TokenIsEqualToCStringTokenProcessor::TokenIsEqualToCStringTokenProcessor):
(WebCore::TokenIsEqualToCStringTokenProcessor::processToken):
(WebCore::TokenIsEqualToCStringTokenProcessor::referenceStringWasFound):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setRel):
2013-07-22 Zalan Bujtas <zalan@apple.com>
segfault in RenderLayerCompositor when the iframe's position attribute is changed and it embeds <object>.
https://bugs.webkit.org/show_bug.cgi?id=118965
Reviewed by Simon Fraser.
Do not change the composition state unless we can reliably figure out the iframe's size.
If the renderer is not yet attached, its size is not computable.
Test: compositing/iframes/iframe-position-absolute-with-padding-percentage-crash.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForFrame):
2013-07-22 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver only read the first column in a safari table
https://bugs.webkit.org/show_bug.cgi?id=118992
Reviewed by Tim Horton.
In case the first section has fewer columns than the rest of the table, the AXTable was only reporting the number of
columns for the first section. We need to take the max number of columns out of all sections.
Test: accessibility/table-with-mismatch-column-count-in-initial-section.html
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):
2013-07-22 Beth Dakin <bdakin@apple.com>
StickyPositionContraints should not need to change to account for a RenderLayer's
scrollOffset
https://bugs.webkit.org/show_bug.cgi?id=118958
-and corresponding-
<rdar://problem/12469203>
Reviewed by Simon Fraser.
Before this patch, to get sticky offsets right in overflow areas, the
StickyPositionConstraints changed on every scroll to factor it in. This will be a
problem once we can scroll overflow areas on the scrolling thread. The constraints
should never have to change to account for the scroll position. This patch fixes
that issue by changing the StickyPositionViewportConstraints’s containerBlockRect
and stickyBoxRect to be in a coordinate space that is relative to the scrolling
ancestor rather than being absolute. This patch also removes ‘absolute’ from those
variable names since they are no longer absolute.
A few re-names in the StickyPositionViewportConstraints class. The parameter to
computeStickyOffset() used to be called viewportRect, and is now called
constrainingRect. m_absoluteStickyBoxRect is now m_stickyBoxRect, and
m_absoluteContainingBlockRect is now m_containingBlockRect. And finally,
layerPositionForViewportRect() is now layerPositionForConstrainingRect()
* page/scrolling/ScrollingConstraints.cpp:
(WebCore::StickyPositionViewportConstraints::computeStickyOffset):
(WebCore::StickyPositionViewportConstraints::layerPositionForConstrainingRect):
* page/scrolling/ScrollingConstraints.h:
(WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
(WebCore::StickyPositionViewportConstraints::containingBlockRect):
(WebCore::StickyPositionViewportConstraints::setContainingBlockRect):
(WebCore::StickyPositionViewportConstraints::stickyBoxRect):
(WebCore::StickyPositionViewportConstraints::setStickyBoxRect):
(WebCore::StickyPositionViewportConstraints::operator==):
Accounting for the re-names.
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::syncLayerPositionForViewportRect):
(WebCore::ScrollingStateStickyNode::dumpProperties):
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::parentScrollPositionDidChange):
Compute all values relative to the scrolling ancestor. This requires some juggling
in the overflow case to factor border and padding in or out.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
This is where the scrollOffset should be factored in.
(WebCore::RenderBoxModelObject::stickyPositionOffset):
2013-07-22 Dean Jackson <dino@apple.com>
PlugIn content can disappear after restarting
https://bugs.webkit.org/show_bug.cgi?id=118982
Reviewed by Simon Fraser.
When a snapshotted plug-in is restarted, we inserted its compositing
layer back into the tree, but didn't recalculate style. This meant
that a subsequent compositing tree operation (such as any hardware
animation) could cause the content to disappear.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::setDisplayState): Force a style recalc.
(WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): Ditto.
2013-07-22 Zalan Bujtas <zalan@apple.com>
REGRESSION(r152227) Images with compositing layer don't show up unless the containing window is resized.
https://bugs.webkit.org/show_bug.cgi?id=118951
Reviewed by Simon Fraser.
Ensure that the content rect is initialized when the image is set on the graphics layer.
RenderLayerBacking::updateGraphicsLayerGeometry() only updates the contents rect when
the associated graphics layer has a content layer. Since the image gets committed
on the graphics layer after the update calls, the contents rect is left uninitialized.
Test: compositing/images/positioned-image-content-rect.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateImageContents):
2013-07-22 Diego Pino Garcia <dpino@igalia.com>
[Old Web Inspector] When right-clicking on a DataGrid column, show editing menu option as "Edit <columnName>" instead of just "Edit"
https://bugs.webkit.org/show_bug.cgi?id=118971
Reviewed by Timothy Hatcher.
* English.lproj/localizedStrings.js:
* inspector/front-end/DataGrid.js: Change "Edit" for "Edit <columnTitle>"
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
2013-07-22 Alex Christensen <achristensen@apple.com>
Added assembly files to Windows 64-bit builds.
https://bugs.webkit.org/show_bug.cgi?id=118931
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added PaintHooks.asm for x64 and enabled MASM.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added PaintHooks.asm.
2013-07-22 Jakob Petsovits <jpetsovits@blackberry.com>
[BlackBerry] Fix WebGL to a 2D canvas copies.
https://bugs.webkit.org/show_bug.cgi?id=118921
https://jira.bbqnx.net/browse/BRWSR-12714
JIRA 449577
Reviewed by George Staikos.
The transform here was converted incorrectly when it
replaced the pixel copy that was there before.
As a true draw transformation, it doesn't need the "- 1"
modification that pixel copies often require.
Fixes existing webgl/conformance/canvas tests.
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::paintToCanvas):
2013-07-22 peavo@outlook.com <peavo@outlook.com>
[Curl] Download fails for certain urls.
https://bugs.webkit.org/show_bug.cgi?id=118468
Reviewed by Brent Fulgham.
The current Curl download implementation has a few shortcomings:
1) Downloading from secure locations fails. We need to provide Curl with the path to a certificate file (.pem file).
2) Cookies are not set in the download request. We need to give Curl the path to the cookie file.
3) When a normal load is converted to a download, some of the headers from the original request is not sent (e.g. Referer, User agent).
* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::CurlDownload): Initialize custom headers member.
(WebCore::CurlDownload::~CurlDownload): Free custom headers member.
(WebCore::CurlDownload::init): Set certificate and cookie file path.
(WebCore::CurlDownload::closeFile): Check file handle against value for invalid platform handle.
(WebCore::CurlDownload::writeDataToFile): Added utility method to write download data to file.
(WebCore::CurlDownload::addHeaders): Added utility method to add headers to request.
(WebCore::CurlDownload::didReceiveData): Use writeDataToFile utility method.
* platform/network/curl/CurlDownload.h:
Put class in WebCore namespace.
Added method to init download from resource handle, request, and response object.
Added utility method to write download data to file.
Added utility method to add headers to request.
Added custom headers member.
2013-07-22 Eric Carlson <eric.carlson@apple.com>
[iOS] captions sometimes positioned incorrectly after fullscreen state change
https://bugs.webkit.org/show_bug.cgi?id=118912
Reviewed by Jer Noble.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Call clearTextTrackRepresentation.
(WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Call updateDisplay so
cues are re-rendered with the updated size.
(WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation): Cleanup the
text track representation.
(WebCore::MediaControlTextTrackContainerElement::enteredFullscreen): New, force cues to be updated.
(WebCore::MediaControlTextTrackContainerElement::exitedFullscreen): Ditto.
* html/shadow/MediaControlElements.h:
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::enteredFullscreen): Call MediaControlTextTrackContainerElement::enteredFullscreen.
(WebCore::MediaControls::exitedFullscreen): Call MediaControlTextTrackContainerElement::exitedFullscreen.
2013-07-22 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt][WK1] Support direct painting without GraphicsSurface
https://bugs.webkit.org/show_bug.cgi?id=118302
Reviewed by Jocelyn Turcotte.
Configure the WebGL OpenGL context to share texture with
the HostWindow OpenGL if available, and paint accelerated
using the the now shared textures.
This should return the performance without GraphicsSurface
on the WK1 code path to what it was before r135995 (28/11 2012).
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2013-07-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGUseElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=118942
Reviewed by Allan Sandfeld Jensen.
As a step to change static_cast with toSVGXXX, static_cast<SVGUseElement*> can
be changed with toSVGUseElement().
No new tests, no behavior change.
* dom/EventRetargeter.h:
(WebCore::EventRetargeter::eventTargetRespectingTargetRules):
* page/EventHandler.cpp:
(WebCore::instanceAssociatedWithShadowTreeElement):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::title):
* svg/SVGUseElement.cpp:
(WebCore::dumpInstanceTree):
(WebCore::SVGUseElement::buildInstanceTree):
(WebCore::SVGUseElement::expandUseElementsInShadowTree):
* svg/SVGUseElement.h:
(WebCore::toSVGUseElement):
2013-07-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use toSVGPathElement() instead of static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=118960
Reviewed by Allan Sandfeld Jensen.
Though there is toSVGPathElement(), some files still use static_cast<SVGPathElement*>.
To remove all static_cast<> use, we need to change argument from SVGElement to Element.
Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154621
No new tests, no behavior change.
* rendering/svg/RenderSVGTextPath.cpp:
(WebCore::RenderSVGTextPath::layoutPath):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromPathElement):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::pathElement):
* svg/SVGPathElement.h:
(WebCore::toSVGPathElement):
* svg/SVGPathSegList.cpp:
(WebCore::SVGPathSegList::commitChange):
* svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
(WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
* svg/properties/SVGPathSegListPropertyTearOff.cpp:
(WebCore::SVGPathSegListPropertyTearOff::contextElement):
2013-07-11 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Implement more of DOM3 KeyEvent key-identifiers
https://bugs.webkit.org/show_bug.cgi?id=118566
Reviewed by Jocelyn Turcotte.
Implemented as many of the key values from http://www.w3.org/TR/DOM-Level-3-Events/#key-values-list
as Qt keycodes support.
Also corrected the mapping of the Menu key, which was confused because MENU
is also the ancient Microsoft speak for the Alt keys.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::keyIdentifierForQtKeyCode):
2013-07-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGGradientElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=118943
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGGradientElement*> can
be changed with toSVGGradientElement().
No new tests, no behavior change.
* rendering/svg/RenderSVGGradientStop.cpp:
(WebCore::RenderSVGGradientStop::gradientElement):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::RenderSVGResourceGradient::applyResource):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGGradientElement.h:
(WebCore::toSVGGradientElement):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::collectGradientAttributes):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::collectGradientAttributes):
2013-07-21 Andreas Kling <akling@apple.com>
KURL creates duplicate strings when completing data: URIs.
<http://webkit.org/b/118952>
<rdar://problem/14504480>
Reviewed by Anders Carlsson.
When checking if the original URL input string can be reused, compare against the part
of the parsing buffer that we would actually return, not the entire buffer.
632 kB progression on <http://www.nytimes.com/>
Test: KURLTest.KURLDataURIStringSharing
* platform/KURL.cpp:
(WebCore::KURL::parse):
2013-07-20 Benjamin Poulain <benjamin@webkit.org>
Add ASCIILiteral() on strings allocated often enough to appear in my Instruments
https://bugs.webkit.org/show_bug.cgi?id=118937
Reviewed by Alexey Proskuryakov.
* html/BaseCheckableInputType.cpp:
(WebCore::BaseCheckableInputType::saveFormControlState):
(WebCore::BaseCheckableInputType::fallbackValue):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::CachedScript):
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::ResourceRequestBase):
2013-07-20 Dean Jackson <dino@apple.com>
Updated ANGLE is leaking like a sieve
https://bugs.webkit.org/show_bug.cgi?id=118939
Rollout 152863, r152821, r152929 and r152755.
* CMakeLists.txt:
2013-07-19 Jer Noble <jer.noble@apple.com>
Pagination: Do not paint the baseBackgroundColor if asked to skipRootBackground.
https://bugs.webkit.org/show_bug.cgi?id=118933
Reviewed by Simon Fraser.
Captions rendered through TextTrackRepresentation are rendered with a background
color when in paginated views. Do not fill the paint area with the
baseBackgroundColor when the paint flags include SkipRootBackground.
* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
2013-07-19 Brady Eidson <beidson@apple.com>
Pages should not be able to abuse users inside beforeunload handlers.
<rdar://problem/14475779> and https://bugs.webkit.org/show_bug.cgi?id=118871.
Reviewed by Alexey Proskuryakov.
Tests: fast/loader/show-only-one-beforeunload-dialog.html
http/tests/misc/iframe-beforeunload-dialog-matching-ancestor-securityorigin.html
http/tests/misc/iframe-beforeunload-dialog-not-matching-ancestor-securityorigin.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::shouldCloseFiringBeforeUnloadEvent): Renamed from fireBeforeUnloadEvent.
Add logic to enforce "1 beforeunload dialog per navigation" as well as "iframes can only show beforeunload
dialogs if their entire ancestry's security origins match the navigating frame."
* loader/FrameLoader.h:
* loader/FrameLoader.h:
Add the ability for Page to know when any frame is dispatching beforeunload:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::incrementFrameHandlingBeforeUnloadEventCount):
(WebCore::Page::decrementFrameHandlingBeforeUnloadEventCount):
(WebCore::Page::isAnyFrameHandlingBeforeUnloadEvent):
* page/Page.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::print): Disallow if any frame is in beforeunload dispatch.
(WebCore::DOMWindow::alert): Ditto.
(WebCore::DOMWindow::confirm): Ditto.
(WebCore::DOMWindow::prompt): Ditto.
(WebCore::DOMWindow::showModalDialog): Ditto.
2013-07-19 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver not detecting misspelled words don't work in all cases
https://bugs.webkit.org/show_bug.cgi?id=118924
Reviewed by Tim Horton.
VoiceOver is now looking for a new misspelled attribute.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetSpelling):
(AXAttributedStringAppendText):
2013-07-19 Ryosuke Niwa <rniwa@webkit.org>
Extract computeRenderStyleForProperty and nodeOrItsAncestorNeedsStyleRecalc from ComputedStyleExtractor::propertyValue
https://bugs.webkit.org/show_bug.cgi?id=118930
Reviewed by Andreas Kling.
Extracted two functions as a preparation to fix bugs 118032 and 118618.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::nodeOrItsAncestorNeedsStyleRecalc):
(WebCore::computeRenderStyleForProperty):
(WebCore::ComputedStyleExtractor::propertyValue):
2013-07-19 Andreas Kling <akling@apple.com>
Cache style declaration CSSOM wrappers directly on MutableStylePropertySet.
<http://webkit.org/b/118883>
Reviewed by Gavin Barraclough
Merge https://chromium.googlesource.com/chromium/blink/+/183bcd51eb0e79cab930cf46695df05dc793630f
From Blink r153700 by <ager@chromium.org>:
In my measurements the mapping is adding more overhead than just having a field
in all MutableStylePropertySet objects. So this saves memory and makes access
faster.
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::MutableStylePropertySet):
(WebCore::MutableStylePropertySet::~MutableStylePropertySet):
(WebCore::StylePropertySet::hasCSSOMWrapper):
(WebCore::MutableStylePropertySet::cssStyleDeclaration):
(WebCore::MutableStylePropertySet::ensureCSSStyleDeclaration):
(WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::StylePropertySet):
2013-07-19 Brent Fulgham <bfulgham@apple.com>
[Windows] Avoid passing addresses of temporaries to Windows API.
https://bugs.webkit.org/show_bug.cgi?id=118917
Reviewed by Anders Carlsson.
The temporary Vector returned by String::charactersWithNullTermination
was going out of scope before its first use, causing Windows API to
receive garbage memory.
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
* platform/win/PasteboardWin.cpp:
(WebCore::createGlobalHDropContent):
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
2013-07-19 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Remove lineWithinShapeBounds() from ShapeInfo since it's no longer used
https://bugs.webkit.org/show_bug.cgi?id=118913
Reviewed by Andreas Kling.
No new tests, no behavior change.
* rendering/shapes/ShapeInfo.h: Remove lineWithinShapeBounds().
2013-07-19 Alex Christensen <achristensen@apple.com>
Added x64 configuration to Visual Studio build.
https://bugs.webkit.org/show_bug.cgi?id=118888
Reviewed by Brent Fulgham.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2013-07-19 Abhijeet Kandalkar <abhijeet.k@samsung.com>
Spatial Navigation handling of space key in <select> appears to confuse listIndex and optionIndex.
https://bugs.webkit.org/show_bug.cgi?id=99525
HTMLSelect Element inherently contains the logic to focus option node and thus, implementing an explicit logic to find the focus index is not required.
Reviewed by Joseph Pecoraro.
Test: fast/spatial-navigation/snav-multiple-select-optgroup.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
* page/SpatialNavigation.cpp:
(WebCore::canScrollInDirection):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::addFocusRingRects):
2013-07-19 David Hyatt <hyatt@apple.com>
OSX: ePub: Unable to select text in vertical Japanese book
https://bugs.webkit.org/show_bug.cgi?id=118864
<rdar://problem/14109351>
Reviewed by Dan Bernstein and Sam Weinig.
This patch fixes all of the various writing-mode and pagination combinations
so that the columns are painted in the correct location. The code that sets up
the initial painting translation offset in the block direction and that advances
that offset has been pulled into two helper functions, initialBlockOffsetForPainting
and blockDeltaForPaintingNextColumn, and that code is now shared by the four call
sites that need it (painting and hit testing in RenderBlock and painting and hit testing
in RenderLayer).
This patch also backs out the maximumScrollPosition change, since it only occurred because
of incorrect sizing of the RenderView, and this sizing issue has now been corrected by
ensuring that computeLogicalHeight() always makes sure you are the size of the viewport
and does not shrink you to the column height.
There was also a race condition that caused pagination to be incorrect if layout occurred
before the html/body renderer that set the writing-mode were available. When this happened,
the writing mode got propagated up to the view, but the column styles didn't get
adjusted to compensate for the writing mode change.
Added tests for every pagination and writing-mode combination in fast/multicol/pagination.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForDocument):
(WebCore::StyleResolver::adjustRenderStyle):
Move setStylesForPaginationMode into RenderStyle and make it a member function. This is
necessary so that the style can be adjusted dynamically to fix the race condition mentioned
above.
* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
Back out this change since the symptom it was fixing only occurred because the logical
height of the view was being set incorrectly.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
Patch the column code that sets up the initial page height to use the pagination API's
page height rather than the viewport logical height. This allows the view to still match
the viewport in dimensions rather than being incorrectly sized to the column height.
(WebCore::RenderBlock::initialBlockOffsetForPainting):
(WebCore::RenderBlock::blockDeltaForPaintingNextColumn):
Two new helper functions used to set up the block direction paint/hit testing translation.
The major bug fix that occurred in this code is that the old block axis code didn't handle
reversal correctly and it also used physical coordinates to try to determine the translation
offset, when you really need to use logical coordinates in the original writing mode coordinate
system to determine the offset.
(WebCore::RenderBlock::paintColumnContents):
Patched to call the new helper functions.
(WebCore::ColumnRectIterator::ColumnRectIterator):
(WebCore::ColumnRectIterator::adjust):
(WebCore::ColumnRectIterator::update):
Patched to call the new helper functions.
* rendering/RenderBlock.h:
Add the two new helper functions to the RenderBlock header.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
If the writing mode of the html/body propagates to the viewport and changes its writing mode,
also change our column styles to match if we're in paginated mode.
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
Call the new pageOrViewLogicalHeight function on RenderView instead of
RenderBox::viewLogicalHeightForPercentages (which is now removed).
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintChildLayerIntoColumns):
(WebCore::RenderLayer::hitTestChildLayerColumns):
Patched to use the two new helper functions for block direction paint offset setup and
advancement.
* rendering/RenderView.cpp:
(WebCore::RenderView::pageOrViewLogicalHeight):
New helper function that does what viewLogicalHeightForPercentages used to do but also
handles returning the page length for block axis column progression. Again, this is to
allow the view to retain its correct size (matching the viewport).
(WebCore::RenderView::viewLogicalHeight):
Back out the code that made the view grow or shrink to the size of the Pagination API page
length when the progression was block axis. This was the source of most of the scroll origin
and scrolling issues.
* rendering/RenderView.h:
Add the new pageOrViewLogicalHeight() function.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setColumnStylesFromPaginationMode):
This is the old StyleResolver function for setting up the column styles. It's in RenderStyle
now so that it can be called at any time to change a style rather than only at style resolution
time.
* rendering/style/RenderStyle.h:
Declaration of the setColumnStylesFromPaginationMode function.
2013-07-19 peavo@outlook.com <peavo@outlook.com>
[Curl] Http response code 401 (Authentication required) is not handled.
https://bugs.webkit.org/show_bug.cgi?id=118849
Reviewed by Brent Fulgham.
The current Curl implementation does not handle a 401 response.
When receiving http code 401, we need to give a notification that authorization is required, by calling the appropriate notification method.
This gives a WebKit client the possibility to present a password dialog to the user.
In response to this, we should provide Curl with the given username and password, so another request can be sent with the given credentials.
* platform/network/ResourceHandle.h:
Added method to check if credential storage should be used.
* platform/network/ResourceHandleInternal.h:
Added member to keep track of number of authentication failures.
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::shouldUseCredentialStorage):
Added method to check if credential storage should be used.
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
Implement method; notify client when authentication is required.
(WebCore::ResourceHandle::receivedCredential):
Implement method; provide Curl with password and username when available.
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
Implement method; reset Curl username and password.
(WebCore::ResourceHandle::receivedCancellation):
Implement method; notify client that authorization has been cancelled.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isHttpAuthentication):
Added function to check if http code is an 'Authorization required' code.
(WebCore::getProtectionSpace):
Added function to initialize a protection space object from a Curl handle and a response object.
(WebCore::headerCallback):
Notify client when authorization is required.
(WebCore::ResourceHandleManager::applyAuthenticationToRequest):
Added method to set Curl username and password.
(WebCore::ResourceHandleManager::initializeHandle):
Use method to set Curl username and password.
* platform/network/curl/ResourceHandleManager.h:
Added method to set Curl username and password.
2013-07-19 Radu Stavila <stavila@adobe.com>
Hover doesn't work for block elements inside a href element
https://bugs.webkit.org/show_bug.cgi?id=118907
Reviewed by David Hyatt.
Added test for hovering block elements inside a href element.
Test: fast/css/hover-display-block.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hoverAncestor):
2013-07-19 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Clear overflowing line's segments in pushShapeContentOverflowBelowTheContentBox
https://bugs.webkit.org/show_bug.cgi?id=118002
Reviewed by David Hyatt.
When the last line in the shape overlaps with the shape bottom boundaries we need to clear the computed segments. (We need to compute
the segments anyway, since shape-outside's code uses the same code path to determine its segments and the line containing is not a
requirement in that case.) Rather then doing the job in RenderBlock::LineBreaker::nextLineBreak I moved the functionality to its correct
place to pushShapeContentOverflowBelowTheContentBox. Now all the overflow related functionality is located in one function. I fixed the
corresponding layout test.
Tests: I modified shape-inside-overflow.html.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox): Remove segments if line overlaps with the shape's boundaries.
(WebCore::RenderBlock::LineBreaker::nextLineBreak): Move segments clear logic to pushShapeContentOverflowBelowContentBox.
2013-07-19 Geoffrey Garen <ggaren@apple.com>
TrailingObjects shouldn't shrink vector capacity in a loop
https://bugs.webkit.org/show_bug.cgi?id=118322
Reviewed by Darin Adler.
This seems to take about 3% off the profile of loading a large text file.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::TrailingObjects::clear): clear() has the built-in side effect
of throwing away existing capacity. Use shrink(0) to indicate that we
want to keep our existing capacity.
2013-07-19 Diego Pino Garcia <dpino@igalia.com>
[GTK] Merge decamelizations fix ups in the GObject DOM bindings code generator
https://bugs.webkit.org/show_bug.cgi?id=117543
Reviewed by Carlos Garcia Campos.
Ensure that all the code that calls to decamelize() applies the same fix ups
Now all functions that need to decamelize a string should simply call
to decamelize(). This function calls to FixUpDecamelize to apply some
fix ups.
* bindings/scripts/CodeGeneratorGObject.pm:
(decamelize): decamelizes a string and applies fix ups
(FixUpDecamelize): applies a series of fix ups to a decamelized string
(GetParentGObjType): moved fix ups to FixUpDecamelize()
(GenerateProperties): simply call to decamelize
(GenerateHeader): simply call to decamelize
(GetGReturnMacro): simply call to decamelize
(GenerateFunction): simply call to decamelize
(GenerateCFile): simply call to decamelize
(GenerateEventTargetIface): simply call to decamelize
2013-07-19 Kwang Yul Seo <skyul@company100.net>
Unreviewed.
Fix an assertion failure which causes debug bots to fail.
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
2013-07-19 Miguel Gomez <magomez@igalia.com>
[GTK] media/video-seek-multiple.html is failing
https://bugs.webkit.org/show_bug.cgi?id=117580
Reviewed by Philippe Normand.
When receiving several seek calls in a row, ensure that the final position
is the one requested in the last call received.
Already covered in test media/video-seek-multiple.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::seek):
2013-07-19 Kangil Han <kangil.han@samsung.com>
Use explicit HTMLFrameElementBase cast and introduce toHTMLFrameElementBase
https://bugs.webkit.org/show_bug.cgi?id=118873
Reviewed by Ryosuke Niwa.
It should be HTMLFrameElementBase that embraces both HTMLFrameElement and HTMLIFrameElement.
This also makes correct toFooElement possible.
Next, to avoid direct use of static_cast, this patch introduces toHTMLFrameElementBase for code cleanup.
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::didNotifySubtreeInsertions):
* html/HTMLFrameElementBase.h:
(WebCore::toHTMLFrameElementBase):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* page/EventHandler.cpp:
(WebCore::targetIsFrame):
* page/FrameView.cpp:
(WebCore::FrameView::init):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):
* rendering/RenderLayer.cpp:
(WebCore::frameElementAndViewPermitScroll):
(WebCore::RenderLayer::scrollRectToVisible):
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Bindings generation tests are failing
https://bugs.webkit.org/show_bug.cgi?id=118877
Reviewed by Kentaro Hara.
I inadvertently removed the wrong part of the if statement
in r152845, causing hasAttribute() to be used unconditionally
for reflected boolean attributes instead of fastHasAttribute().
This patch fixes the issue.
No new tests, covered by bindings tests.
* bindings/scripts/CodeGenerator.pm:
(GetterExpression):
2013-07-18 Kwang Yul Seo <skyul@company100.net>
WorkerGlobalScope should support onoffline/ononline event handlers
https://bugs.webkit.org/show_bug.cgi?id=118832
Reviewed by Alexey Proskuryakov.
HTML5 spec says that WorkerGlobalScope should support
onoffline/ononline event handlers as stated in
http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html#event-offline
Modified NetworkStateNotifier to support multiple callbacks and added a
callback to dispatch offline and online events to WorkerGlobalScope
when network state is changed.
No new test because the current test infrastructure does not provide a
mock network state notifier.
* page/Page.cpp:
(WebCore::networkStateChanged):
Change the function to take an additional argument, isOnLine so that we
can remove a call to NetworkStateNotifier::onLine().
(WebCore::Page::Page):
Use NetworkStateNotifier::addNetworkStateChangeListener which
allows us to add multiple callbacks.
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
Replace NetworkStateNotifier::setNetworkStateChangedFunction with
NetworkStateNotifier::addNetworkStateChangeListener.
(WebCore::NetworkStateNotifier::notifyNetworkStateChange):
A helper method to notify all registered network state change
callbacks.
* platform/network/NetworkStateNotifier.h:
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp:
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
(WebCore::NetworkStateNotifier::networkStateChange):
* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::networkInterfaceChanged):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/qt/NetworkStateNotifierQt.cpp:
(WebCore::NetworkStateNotifier::updateState):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/win/NetworkStateNotifierWin.cpp:
(WebCore::NetworkStateNotifier::addressChanged):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
Replace m_networkStateChangedFunction() with notifyNetworkStateChange().
* workers/Worker.cpp:
(WebCore::networkStateChanged):
Notify network state change by iterating all Workers.
(WebCore::Worker::Worker):
Initialize allWorkers and add networkStateChanged to
NetworkStateNotifier in first invocation. Add this Worker to
allWorkers.
(WebCore::Worker::~Worker):
Remove this Worker from allWorkers.
(WebCore::Worker::notifyNetworkStateChange):
* workers/Worker.h:
* workers/WorkerGlobalScope.h:
Add onoffline and ononline event handlers.
* workers/WorkerGlobalScope.idl:
Add onoffline and ononline event handlers
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::NotifyNetworkStateChangeTask::create):
(WebCore::NotifyNetworkStateChangeTask::NotifyNetworkStateChangeTask):
(WebCore::NotifyNetworkStateChangeTask::performTask):
A subclass of ScriptExecutionContext::Task to dispatch offline and
online events to WorkerGlobalScope.
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
Notify network state change using ScriptExecutionContext::postTask to
dispatch events across threads.
* workers/WorkerMessagingProxy.h:
2013-07-18 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r152876.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
2013-07-18 Brent Fulgham <bfulgham@apple.com>
[Media] Share more code between Mac and Windows implementation files.
https://bugs.webkit.org/show_bug.cgi?id=118801
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Move
implementation from ObjC file to parent file.
(WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks):
Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
Remove duplicate implementation.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Ditto.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
Ditto.
2013-07-18 Alex Christensen <achristensen@apple.com>
Fixed compile errors for non-Cairo platforms using EGL.
https://bugs.webkit.org/show_bug.cgi?id=118536
Reviewed by Brent Fulgham.
* platform/graphics/egl/GLContextEGL.cpp: Added #if USE(CAIRO) around cairo.h.
(WebCore::GLContextEGL::~GLContextEGL): Added #if USE(CAIRO) around cairo_device_destroy call.
2013-07-18 Jer Noble <jer.noble@apple.com>
New PDFPlugin doesn't support WebKitOmitPDFSupport, acts as if Plug-ins are off
https://bugs.webkit.org/show_bug.cgi?id=118858
Reviewed by Eric Carlson.
Expand the scope of rejecting non video/ or audio/ MIME types when
filling the MIME type cache.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::shouldRejectMIMEType): Added utility function.
2013-07-17 Brent Fulgham <bfulgham@apple.com>
[Windows] Support in-band text tracks.
https://bugs.webkit.org/show_bug.cgi?id=103770
Reviewed by Eric Carlson.
Existing media tests cover these features.
* WebCore.vcxproj/WebCore.vcxproj: Add new files for Windows captions
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* config.h: Make sure proper buid flags are turned on when building
with AVCF_LEGIBLE_OUTPUT.
* page/CaptionUserPreferencesMediaAF.cpp: Revise to reduce soft linking
duplication between Mac and Windows.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Update
to support Windows platform by removing compiler guards and adding
Windows declarations for soft-link functions.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
Remove build guards preventing Windows from using LegibleOutput
features.
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
(WebCore::MediaPlayerPrivateAVFoundation::seek):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
(WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::contentsNeedsDisplay): Ditto
* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
Add new LegibleOutput support functions, and try to reduce duplication
between Windows and Mac soft link declarations.
* platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Ditto.
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp: Added.
(WebCore::InbandTextTrackPrivateAVCF::InbandTextTrackPrivateAVCF):
(WebCore::InbandTextTrackPrivateAVCF::disconnect):
(WebCore::InbandTextTrackPrivateAVCF::kind):
(WebCore::InbandTextTrackPrivateAVCF::isClosedCaptions):
(WebCore::InbandTextTrackPrivateAVCF::isSDH):
(WebCore::InbandTextTrackPrivateAVCF::containsOnlyForcedSubtitles):
(WebCore::InbandTextTrackPrivateAVCF::isMainProgramContent):
(WebCore::InbandTextTrackPrivateAVCF::isEasyToRead):
(WebCore::InbandTextTrackPrivateAVCF::label):
(WebCore::InbandTextTrackPrivateAVCF::language):
(WebCore::InbandTextTrackPrivateAVCF::isDefault):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h: Added.
(WebCore::InbandTextTrackPrivateAVCF::create):
(WebCore::InbandTextTrackPrivateAVCF::~InbandTextTrackPrivateAVCF):
(WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp: Added.
(WebCore::InbandTextTrackPrivateLegacyAVCF::InbandTextTrackPrivateLegacyAVCF):
(WebCore::InbandTextTrackPrivateLegacyAVCF::disconnect):
(WebCore::InbandTextTrackPrivateLegacyAVCF::kind):
(WebCore::InbandTextTrackPrivateLegacyAVCF::isClosedCaptions):
(WebCore::InbandTextTrackPrivateLegacyAVCF::containsOnlyForcedSubtitles):
(WebCore::InbandTextTrackPrivateLegacyAVCF::isMainProgramContent):
(WebCore::InbandTextTrackPrivateLegacyAVCF::isEasyToRead):
(WebCore::InbandTextTrackPrivateLegacyAVCF::label):
(WebCore::InbandTextTrackPrivateLegacyAVCF::language):
* platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h: Added.
(WebCore::InbandTextTrackPrivateLegacyAVCF::create):
(WebCore::InbandTextTrackPrivateLegacyAVCF::~InbandTextTrackPrivateLegacyAVCF):
(WebCore::InbandTextTrackPrivateLegacyAVCF::avPlayerItemTrack):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Update to support LegibleOutput features for the Windows port.
(WebCore::AVFWrapper::currentTrack): Added.
(WebCore::AVFWrapper::legibleOutput): Added.
(WebCore::createMetadataKeyNames): Added missing key names.
(WebCore::avLegibleOutput): Added.
(WebCore::safeMediaSelectionGroupForLegibleMedia): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::cancelLoad): Clear text
tracks when cancelling.
(WebCore::MediaPlayerPrivateAVFoundationCF::setCurrentTrack): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration): Revised
to match logic in Objective C implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTime): Revised
to match logic in Objective C implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::paintCurrentFrameInContext):
Check presence of metadata before proceeding. Revised to match logic
in Objective C implementation.
(WebCore::MediaPlayerPrivateAVFoundationCF::paint): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Update for
in-band text tracks.
(WebCore::MediaPlayerPrivateAVFoundationCF::clearTextTracks): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::processNewAndRemovedTextTracks):
Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::processMediaSelectionOptions):
Added.
(WebCore::AVFWrapper::setCurrentTrack): Added.
(WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack):
Added.
(WebCore::AVFWrapper::AVFWrapper): Add new initializers.
(WebCore::AVFWrapper::~AVFWrapper): Clean up text track information.
(WebCore::AVFWrapper::createPlayer): Add Legible Output support.
(WebCore::AVFWrapper::createPlayerItem): Ditto.
(WebCore::LegibleOutputData::LegibleOutputData): Added.
(WebCore::AVFWrapper::processCue): Added.
(WebCore::AVFWrapper::legibleOutputCallback): Added.
(WebCore::AVFWrapper::safeMediaSelectionGroupForLegibleMedia): Added.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
Update to support LegibleOutput features for the Windows port.
* platform/win/SoftLinking.h: Change signature of variable accessor
to match Mac so reduce duplicate code.
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Make atob() / btoa() argument non optional
https://bugs.webkit.org/show_bug.cgi?id=118844
Reviewed by Kentaro Hara.
According to the latest specification, the argument to atob() / btoa()
should not be optional:
http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#windowbase64
This patch makes WebKit behave according to the specification. The argument
is also mandatory in Firefox, IE10 and Blink.
atob() / btoa() are also moved to their own WindowBase64 interface which
the Window interface implements. This does not change the behavior but
this is closer to the specification and it will make exposing those
methods to workers easier later on.
No new tests, already covered by:
fast/dom/Window/atob-btoa.html
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* page/DOMWindow.idl:
* page/WindowBase64.idl: Added.
2013-07-18 Antoine Quint <graouts@apple.com>
Crash in WebCore::createMarkup()
https://bugs.webkit.org/show_bug.cgi?id=118847
Reviewed by Ryosuke Niwa.
Also check that we have a containingBlock() for the renderer() so that we
may safely call node() on it.
* editing/markup.cpp:
(WebCore::highestAncestorToWrapMarkup):
2013-07-18 Praveen R Jadhav <praveen.j@samsung.com>
Only the first call to 'stop' method of AudioBufferSourceNode must be entertained.
https://bugs.webkit.org/show_bug.cgi?id=118776
Reviewed by Jer Noble.
Subsequent calls to 'stop' for a AudioSourceBufferNode throws an exception.
End time set by first 'stop' method is used for processing.
No new tests. audiobuffersource-exception.html is updated.
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::stop):
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Simplify SVG animated type handling in the JSC bindings generator
https://bugs.webkit.org/show_bug.cgi?id=118845
Reviewed by Kentaro Hara.
Simplify IsSVGAnimatedType subroutine in the bindings generator so that
we no longer need to hardcode SVG animated types. Also remove the
CanUseFastAttribute subroutine as it is equivalent to IsSVGAnimatedType.
This allows us to simplify the GetterExpression subroutine so that
we can use fastHasAttribute() unconditionally for boolean type.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
(IsSVGAnimatedType):
(GetterExpression):
2013-07-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Use [ImplementedAs] instead of special casing in the bindings generators
https://bugs.webkit.org/show_bug.cgi?id=118848
Reviewed by Kentaro Hara.
In several instances, special casing were used in the bindings generator to avoid
name clashes in the implementation. The [ImplementedBy] IDL extended attribute is
meant to solve this issue so we now use it instead.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
(WK_ucfirst):
(AttributeNameForGetterAndSetter):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(NativeToJSValue):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
(GenerateImplementation):
* svg/SVGAElement.idl:
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::SVGFECompositeElement):
(WebCore::SVGFECompositeElement::parseAttribute):
(WebCore::SVGFECompositeElement::setFilterEffectAttribute):
(WebCore::SVGFECompositeElement::build):
* svg/SVGFECompositeElement.h:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
(WebCore::SVGFEMorphologyElement::parseAttribute):
(WebCore::SVGFEMorphologyElement::setFilterEffectAttribute):
(WebCore::SVGFEMorphologyElement::build):
* svg/SVGFEMorphologyElement.h:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGTransform.cpp:
(WebCore::SVGTransform::updateSVGMatrix):
* svg/SVGTransform.h:
* svg/SVGTransform.idl:
2013-07-18 Zalan Bujtas <zalan@apple.com>
Incorrect calculated width for mspace.
https://bugs.webkit.org/show_bug.cgi?id=118601
Reviewed by Chris Fleizach.
Use intrinsic logical widths to size <mspace> properly.
This patch also fixes an assert on isPreferredLogicalHeightDirty() which occurs
while layouting <mspace>. The assert fix is required, so that the sizing can be
fixed.
Test: mathml/presentation/mspace-prefered-width.html
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::parseMathMLLength): switch to LayoutUnits.
(WebCore::parseMathMLNamedSpace): switch to LayoutUnits.
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* rendering/mathml/RenderMathMLFraction.h:
* rendering/mathml/RenderMathMLSpace.cpp:
(WebCore::RenderMathMLSpace::computeIntrinsicLogicalWidths):
* rendering/mathml/RenderMathMLSpace.h:
2013-07-18 Ryosuke Niwa <rniwa@webkit.org>
willWriteSelectionToPasteboard and willPerformDragSourceAction editing callbacks are not called for drag and drop
https://bugs.webkit.org/show_bug.cgi?id=118828
Reviewed by Gavin Barraclough.
Call these two callbacks when we start a drag and drop.
No new tests for now but we should start logging these callbacks in DRT and WTR's EditorClients.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
2013-07-18 Santosh Mahto <santosh.ma@samsung.com>
ASSERTION FAILED: !listItems().size() || m_activeSelectionAnchorIndex >= 0 in WebCore::HTMLSelectElement::updateListBoxSelection
https://bugs.webkit.org/show_bug.cgi?id=118591
Reviewed by Kent Tamura.
Test: fast/forms/select/selectall-command-crash.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectAll):
We should return this function if activeSelectionAnchorIndex is not valid index
2013-07-18 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Refactor spin.edc not to use offset
https://bugs.webkit.org/show_bug.cgi?id=118830
Reviewed by Gyuyoung Kim.
EDJE allows offset to specify the pixel based position,
but it's not good way if you want to locate object like arrow top or bottom.
Instead, this patch uses align property.
* platform/efl/DefaultTheme/widget/spinner/spinner.edc:
2013-07-18 Nick Diego Yamane <nick.yamane@openbossa.org>
[gstreamer] Avoid calls to g_slist_index in webKitWebAudioSrcLoop()
https://bugs.webkit.org/show_bug.cgi?id=118827
Reviewed by Philippe Normand.
webKitWebAudioSrcLoop() currently calls g_slist_index for each element
to get its index in a list it's iterating over. g_list_index function uses
a sequential search to find that element, which is clearly unecessary.
This patch adds a local variable to store the current index and use it
instead of calling g_slist_index function.
No new tests, no behavior changes.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
2013-07-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGInlineFlowBox() and use it
https://bugs.webkit.org/show_bug.cgi?id=118794
Reviewed by Andreas Kling.
As a step to change static_cast with toSVGXXX, static_cast<SVGInlineFlowBox*> can
be changed with toSVGInlineFlowBox().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154385
No new tests, no behavior change.
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paintSelectionBackground):
* rendering/svg/SVGInlineFlowBox.h:
(WebCore::toSVGInlineFlowBox):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
2013-07-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use toSVGMarkerElement() instead of static_cast<>
https://bugs.webkit.org/show_bug.cgi?id=118800
Reviewed by Andreas Kling.
Though there is toSVGMarkerElement(), some files still use static_cast<SVGMarkerElement*>.
To remove all static_cast<> use, we need to change argument from SVGElement to Node.
No new tests, no behavior changes.
* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::referencePoint):
(WebCore::RenderSVGResourceMarker::angle):
(WebCore::RenderSVGResourceMarker::markerTransformation):
(WebCore::RenderSVGResourceMarker::viewportTransform):
(WebCore::RenderSVGResourceMarker::calcViewport):
* rendering/svg/RenderSVGResourceMarker.h:
(WebCore::RenderSVGResourceMarker::markerUnits):
* svg/SVGMarkerElement.h:
(WebCore::toSVGMarkerElement):
2013-07-17 Jacky Jiang <zhajiang@blackberry.com>
Dereference null pointer crash in Length::decrementCalculatedRef()
https://bugs.webkit.org/show_bug.cgi?id=118686
Reviewed by Simon Fraser.
Length(Calculated) won't insert any CalculationValue to CalculationValueHandleMap;
therefore, we dereference null CalculationValue pointer when the temporary
Length object goes out of the scope.
Length(Calculated) is not allowed as it doesn't make sense that we construct
a Calculated Length object with uninitialized calc expression.
The code just wants to blend with zero. To fix the bug, we can just blend
with Length(0, Fixed) here as we currently can blend different type units
and zero has the same behavior regardless of unit.
Test: transitions/transition-transform-translate-calculated-length-crash.html
* platform/graphics/transforms/TranslateTransformOperation.cpp:
(WebCore::TranslateTransformOperation::blend):
2013-07-17 Tim Horton <timothy_horton@apple.com>
Update blocked/missing plug-in UI
https://bugs.webkit.org/show_bug.cgi?id=118347
<rdar://problem/14209318>
Reviewed by Sam Weinig.
* WebCore.exp.in:
Export RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::replacementTextRoundedRectPressedColor):
(WebCore::replacementTextRoundedRectColor):
(WebCore::replacementTextColor):
Change colors to new design and add some more constants.
(WebCore::shouldUnavailablePluginMessageBeButton): Added.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonWithDescription): Added.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
Call through to the -WithDescription variant.
(WebCore::RenderEmbeddedObject::paintReplaced):
Fill the background, and otherwise match the new design.
(WebCore::addReplacementArrowPath):
Add an arrow to the given path, inside the given rect.
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
Add a 1px padding to the bottom of the text.
Add a circle and an arrow into the indicator as per the new design.
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
Hit-test the indicator arrow as well; otherwise, the fact that the arrow
is a hole in the path means it won't be hit.
* rendering/RenderEmbeddedObject.h:
2013-07-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152701, r152703, r152739, r152754,
and r152756.
http://trac.webkit.org/changeset/152701
http://trac.webkit.org/changeset/152703
http://trac.webkit.org/changeset/152739
http://trac.webkit.org/changeset/152754
http://trac.webkit.org/changeset/152756
https://bugs.webkit.org/show_bug.cgi?id=118821
this was a buggy fix and we're going to try something
different (Requested by thorton on #webkit).
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* css/unavailablePlugIns.css: Removed.
* dom/EventListener.h:
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldUnavailablePluginMessageBeButton):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::replacementTextRoundedRectPressedColor):
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
(WebCore::RenderEmbeddedObject::setUnavailablePluginIndicatorIsPressed):
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::replacementTextRect):
(WebCore::RenderEmbeddedObject::isReplacementObscured):
(WebCore::RenderEmbeddedObject::layout):
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
(WebCore::shouldUnavailablePluginMessageBeButton):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
(WebCore::RenderEmbeddedObject::getCursor):
(WebCore::RenderEmbeddedObject::canHaveChildren):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderWidget.h:
2013-07-17 Simon Fraser <simon.fraser@apple.com>
Optimize RenderLayerCompositor's OverlapMap
https://bugs.webkit.org/show_bug.cgi?id=118764
Reviewed by Tim Horton.
Overlap stack items can have RectLists with hundreds of rectangles.
This makes the linear search in OverlapMap::overlapsLayers() very slow.
Optimize by storing the bounding rect of the list of rects, and doing an early
check on that. This reduces time spent in RenderLayer::scrollTo() by 13% in some
content with lots of layers inside an overflow:scroll.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
(WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
(WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
2013-07-17 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Port refactoring of shape-outside code from Blink
https://bugs.webkit.org/show_bug.cgi?id=118757
Reviewed by Dean Jackson.
Refactor the left and right offset methods to reduce the number of
arguments by splitting the methods into smaller methods. This
refactoring was requested as part of porting support for stacked
floats with shape-outside to Blink.
Also add a variable when calling computeSegmentsForLine to make it
more readable and easier to follow the coordinate system change.
No new tests, no behavior change.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeLogicalLocationForFloat): Update to use
the refactored IgnoringShapeOutside methods.
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): New method to
compute the offset contributed by left floats.
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine): New method to
compute misc adjustments to the left offset.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): New method to
compute the offset contributed by right floats.
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine): New method to
compute misc adjustments to the right offset.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::logicalRightOffsetForLine): Implement original
method in terms of the float offset computation method and the
offset adjustment method. This method takes into account the
shape-outside on any floats when computing the offset.
(WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalRightOffsetForLineIgnoringShapeOutside):
Compute the right offset as if there was no shape-outside on any
of the floats.
(WebCore::RenderBlock::logicalLeftOffsetForLineIgnoringShapeOutside):
Compute the left offset as if there was no shape-outside on any
of the floats.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Update
to use a variable to make the calls to computeSegmentsForLine more
explicit about the coordinate system conversion.
2013-07-17 Zalan Bujtas <zalan@apple.com>
Wrong linebox height, when block element parent has vertical-align property defined.
https://bugs.webkit.org/show_bug.cgi?id=118245
Reviewed by David Hyatt.
Do not push the current element to the next, when it is still considered empty, even with
some object(s) in front. Behave as if it was actually empty.
Inline elements like <span></span> generate such lines.
Test: fast/css/empty-span-with-parent-div-and-vertical-align.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-07-17 Andreas Kling <akling@apple.com>
CSS selector list splitting should be by component, not by selector.
<http://webkit.org/b/118761>
<rdar://problem/14421609>
Reviewed by Antti Koivisto.
Test (amended): fast/css/rule-selector-overflow.html
* css/CSSSelectorList.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::componentCount):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):
Renamed CSSSelectorList::length() to componentCount() and made it public.
* css/RuleSet.h:
maximumSelectorCount => maximumSelectorComponentCount
* css/StyleRule.cpp:
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
Make the splits after accumulating 'maximumSelectorComponentCount' components.
* css/StyleRule.h:
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAppendRule):
splitIntoMultipleRulesWithMaximumSelectorCount => splitIntoMultipleRulesWithMaximumSelectorComponentCount
2013-07-17 Rob Buis <rwlbuis@webkit.org>
[Mac] REGRESSION(r152685): svg/custom/xlink-prefix-in-attributes.html failed unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=118701
Reviewed by Ryosuke Niwa.
Use the computed attribute prefix, otherwise href being in xlink namespace but not having any prefix
will cause outputting the xlink namespace in appendNamespace.
Patch fixes svg/custom/xlink-prefix-in-attributes.html.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::appendAttribute):
2013-07-17 Chris Fleizach <cfleizach@apple.com>
Regression: columnheader/rowheader roles not exposed correctly
https://bugs.webkit.org/show_bug.cgi?id=113628
Reviewed by Tim Horton.
When we determine the row and column headers we look at the ARIA role being returned, but
since TableCell overrides the determineAccessibilityRole method, the ARIA role is never set.
Test: platform/mac/accessibility/aria-columnrowheaders.html
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
2013-07-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of SVGPoint special case from the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=118783
Reviewed by Kentaro Hara.
Get rid of SVGPoint special case from the bindings generator by adding a
new SVGPoint.h header that contains a typedef to FloatPoint.
Also use SVGPoint type in the implementation API for consistency with
the IDL.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
(SkipIncludeHeader):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjMutablePoint):
(WebCore::jsTestObjImmutablePoint):
(WebCore::setJSTestObjMutablePoint):
(WebCore::setJSTestObjImmutablePoint):
(WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
(WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj mutablePoint]):
(-[DOMTestObj immutablePoint]):
(-[DOMTestObj mutablePointFunction]):
(-[DOMTestObj immutablePointFunction]):
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
(-[DOMTestTypedefs immutablePointFunction]):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::startPositionOfCharacter):
(WebCore::SVGTextQuery::endPositionOfCharacter):
(WebCore::SVGTextQuery::characterNumberAtPosition):
* rendering/svg/SVGTextQuery.h:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::getPointAtLength):
* svg/SVGPathElement.h:
* svg/SVGPathTraversalStateBuilder.cpp:
(WebCore::SVGPathTraversalStateBuilder::currentPoint):
* svg/SVGPathTraversalStateBuilder.h:
* svg/SVGPathUtilities.cpp:
(WebCore::getPointAtLengthOfSVGPathByteStream):
* svg/SVGPathUtilities.h:
* svg/SVGPoint.h: Added.
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::valueAsString):
* svg/SVGPointList.h:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::createSVGPoint):
* svg/SVGSVGElement.h:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::getStartPositionOfChar):
(WebCore::SVGTextContentElement::getEndPositionOfChar):
(WebCore::SVGTextContentElement::getCharNumAtPosition):
* svg/SVGTextContentElement.h:
* svg/SVGZoomEvent.cpp:
(WebCore::SVGZoomEvent::previousTranslate):
(WebCore::SVGZoomEvent::newTranslate):
* svg/SVGZoomEvent.h:
2013-07-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GStreamer] webkitwebsrc: use SubResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=73743
Reviewed by Philippe Normand.
* GNUmakefile.list.am: Add new files to compilation.
* PlatformEfl.cmake: Ditto.
* PlatformGTK.cmake: Ditto.
* loader/SubresourceLoader.h: Add getOrCreateReadBuffer() when
using SOUP.
* loader/cache/CachedRawResource.h:
* loader/cache/CachedRawResourceClient.h:
(WebCore::CachedRawResourceClient::getOrCreateReadBuffer): Added
to allow the client to allocate the read buffer.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::getOrCreateReadBuffer):
* loader/soup/CachedRawResourceSoup.cpp: Added.
(WebCore::CachedRawResource::getOrCreateReadBuffer): Iterate the
clients until one returns a valid read buffer or return NULL to
fallback to the default read buffer.
* loader/soup/SubresourceLoaderSoup.cpp: Added.
(WebCore::SubresourceLoader::getOrCreateReadBuffer): Call
CachedResource::getOrCreateReadBuffer().
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient): Make this a CachedRawResourceClient.
(_WebKitWebSrcPrivate): Remove frame and resourceHandle and add a
cached resource handle.
(webKitWebSrcDispose): Clear the player pointer.
(webKitWebSrcStop): Remove the client from the cached resource.
(webKitWebSrcStart): Use CachedResourceLoader to schedule a
CachedRawResource load for the media without buffering the data.
(webKitWebSrcNeedDataMainCb): Call CachedResource::setDefersLoading.
(webKitWebSrcEnoughDataMainCb): Ditto.
(webKitWebSrcSetMediaPlayer): Simply update the player pointer.
(StreamingClient::responseReceived): Update to the
CachedRawResourceClient API.
(StreamingClient::dataReceived): Ditto.
(StreamingClient::getOrCreateReadBuffer): Ditto.
(StreamingClient::notifyFinished): Ditto.
2013-07-17 Kwang Yul Seo <skyul@company100.net>
Remove unused member variable m_domURL from WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=118784
Reviewed by Christophe Dumez.
WorkerContext::webkitURL() was removed in r107082, and this was the
only place where the member variable |m_domURL| in WorkerContext was
mutated. This variable is no longer needed and so it should be removed.
No behavior change.
* workers/WorkerGlobalScope.h:
2013-07-17 Mihai Maerean <mmaerean@adobe.com>
ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage
https://bugs.webkit.org/show_bug.cgi?id=118587
Reviewed by David Hyatt.
The fix consists in not calling containingBlockLogicalHeightForPositioned for flow threads (in
RenderBox::availableLogicalHeightUsing) as it gets to handle the RenderView as it would have been flowed into
the flow thread.
Test: fast/regions/crash-div-outside-body-vertical-rl.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeightUsing):
2013-07-17 Kangil Han <kangil.han@samsung.com>
Use toHTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=118727
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch uses toHTMLMediaElement for code cleanup.
* bindings/js/JSHTMLMediaElementCustom.cpp:
(WebCore::JSHTMLMediaElement::setController):
* html/HTMLMediaElement.h:
(WebCore::toHTMLMediaElement):
* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::insertedInto):
(WebCore::HTMLSourceElement::removedFrom):
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::removedFrom):
(WebCore::HTMLTrackElement::mediaElement):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::toParentMediaElement):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidget):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaFullscreenButton):
(WebCore::RenderThemeEfl::paintMediaMuteButton):
(WebCore::RenderThemeEfl::paintMediaToggleClosedCaptionsButton):
* platform/graphics/wince/MediaPlayerProxy.cpp:
(WebCore::WebMediaPlayerProxy::initEngine):
(WebCore::WebMediaPlayerProxy::element):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::getMediaElementFromRenderObject):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaElement):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
* rendering/RenderMedia.cpp:
(WebCore::RenderMedia::mediaElement):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaSliderTrack):
* rendering/RenderThemeWinCE.cpp:
(WebCore::mediaElementParent):
* testing/Internals.cpp:
(WebCore::Internals::simulateAudioInterruption):
2013-07-16 Ryuan Choi <ryuan.choi@samsung.com>
Remove Platform(EFL) guard from Widget::frameRectsChanged
https://bugs.webkit.org/show_bug.cgi?id=118782
Reviewed by Christophe Dumez.
Since r58487, Widget::frameRectsChanged was moved to cpp and guarded.
But we can move back to header because WebKit/Efl refactored related code in r145710.
No new tests, refactoring.
* platform/Widget.cpp: Removed platform guard and move frameRectsChangd() back to header.
* platform/Widget.h:
(WebCore::Widget::frameRectsChanged):
* platform/efl/WidgetEfl.cpp:
2013-07-16 Alex Christensen <achristensen@apple.com>
Update ANGLE to r2426.
https://bugs.webkit.org/show_bug.cgi?id=118550
Reviewed by Dean Jackson.
* CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added builtin_symbol_table.
2013-07-16 Tim Horton <timothy_horton@apple.com>
Many crashes loading Java applets after r152701
https://bugs.webkit.org/show_bug.cgi?id=118760
<rdar://problem/14462836>
Reviewed by Dean Jackson.
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
Re-acquire the renderer after calling createJavaAppletWidget,
because it can cause reattach, leaving our renderer pointer stale.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::createJavaAppletWidget):
Null-check renderer, as element->renderEmbeddedObject() can very clearly
return null in some cases.
2013-07-16 Pratik Solanki <psolanki@apple.com>
Missing break in WebGLRenderingContext::validateCompressedTexFuncData()
https://bugs.webkit.org/show_bug.cgi?id=118742
Reviewed by Ryosuke Niwa.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
2013-07-16 Andreas Kling <akling@apple.com>
Atomicize HTMLAnchorElement.hash before passing it to JS.
<http://webkit.org/b/118748>
<rdar://problem/14459780>
Reviewed by Sam Weinig.
Instead of generating a unique string from '#' + the URL hash every time HTMLAnchorElement.hash
is queried, turn it into an AtomicString. This prevents massive memory usage in scripts that
fetch .hash a lot.
Reduces memory consumption by 4.65 MB when viewing the full HTML5 spec at <http://whatwg.org/c>
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::hash):
2013-07-16 Brendan Long <b.long@cablelabs.com>
Make WebVTTParser return cue data instead of cue DOM objects
https://bugs.webkit.org/show_bug.cgi?id=118687
Reviewed by Eric Carlson.
No new tests because this doesn't change functionality.
* html/track/InbandTextTrack.cpp:
Make TextTrackCueMap handle WebVTTCues instead of just generic cues.
m_dataToCueMap and m_cueToDataMap were renamed m_genericDataToCueMap
and m_genericCueToDataMap. The cue maps were turned into pointers so we
only allocate the ones we need.
(WebCore::TextTrackCueMap::TextTrackCueMap): Initialize maps to 0.
(WebCore::TextTrackCueMap::~TextTrackCueMap): Delete allocated maps.
(WebCore::TextTrackCueMap::add): Changed to allocate cue maps as needed, and added WebVTT version.
(WebCore::TextTrackCueMap::find): Checked to check if cue maps are allocated, and added WebVTT version.
(WebCore::TextTrackCueMap::findGenericData): Changed to accept TextTrackCue instead of TextTrackCueGeneric.
(WebCore::TextTrackCueMap::findWebVTTData): Same as findGenericData, except for WebVTTCueData.
(WebCore::TextTrackCueMap::remove): Accept TextTrackCue instead of TextTrackCueGeneric, and look in both maps.
(WebCore::InbandTextTrack::addWebVTTCue): Added, based on addGenericCue.
(WebCore::InbandTextTrack::removeWebVTTCue): Added, almost identical to removeGenericCue.
(WebCore::InbandTextTrack::removeCue): m_cueMap.remove() takes a TextTrackCue now so it can remove both types of cue.
(WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Use ASSERT_UNUSED instead of UNUSED_PARAM + ASSERT.
* html/track/InbandTextTrack.h: Add new functions above, change maps to pointers and add maps for holding WebVTT cues.
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::getNewCues): Return WebVTTCueData instead of TextTrackCue.
(WebCore::WebVTTParser::createNewCue): Create WebVTTCueData instead of TextTrackCue.
* html/track/WebVTTParser.h: Add WebVTTCueData class, based on GenericCueData.
The following functions are just constructors, destructors, getters, or setters.
(WebCore::WebVTTCueData::create):
(WebCore::WebVTTCueData::~WebVTTCueData):
(WebCore::WebVTTCueData::startTime):
(WebCore::WebVTTCueData::setStartTime):
(WebCore::WebVTTCueData::endTime):
(WebCore::WebVTTCueData::setEndTime):
(WebCore::WebVTTCueData::id):
(WebCore::WebVTTCueData::setId):
(WebCore::WebVTTCueData::content):
(WebCore::WebVTTCueData::setContent):
(WebCore::WebVTTCueData::settings):
(WebCore::WebVTTCueData::setSettings):
(WebCore::WebVTTCueData::WebVTTCueData):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::getNewCues): Convert WebVTTCueData to TextTrackCue when we get them.
* platform/graphics/InbandTextTrackPrivateClient.h: Add addWebVTTCue and removeWebVTTCue functions to the interface.
2013-07-16 Tim Horton <timothy_horton@apple.com>
Use the correct cursor value for the unavailable plugin indicator
https://bugs.webkit.org/show_bug.cgi?id=118747
<rdar://problem/14456498>
Reviewed by Dean Jackson.
CSS says "pointer" is the hand cursor, not "hand".
* css/unavailablePlugIns.css:
(object::-webkit-unavailable-plugin-content > div):
(object::-webkit-unavailable-plugin-content > div > span):
2013-07-16 Simon Fraser <simon.fraser@apple.com>
Protect against the LayerFlushController being deleted inside its flushLayers() callback
https://bugs.webkit.org/show_bug.cgi?id=118741
Reviewed by Tim Horton.
It's possible (especially on iOS) for the LayerFlushController to be destroyed
inside its callback, via -[WebView _close]. Protect against this by making
it refcounted, and holding a ref across the callback.
Due to the odd relationship in which LayerFlushController owns its LayerFlushScheduler
by value, we achieve this by allowing subclasses of LayerFlushScheduler
to override runLoopObserverCallback(). WebViewLayerFlushScheduler uses the
override to protect the owner of the LayerFlushScheduler, which is the
LayerFlushController, when the callback is firing.
* WebCore.exp.in:
* platform/graphics/ca/LayerFlushScheduler.h: Make runLoopObserverCallback() and the dtor virtual.
2013-07-16 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of multiple inheritance support from the bindings generators
https://bugs.webkit.org/show_bug.cgi?id=118353
Reviewed by Kentaro Hara.
Remove multiple inheritance support from the bindings generators (except
the ObjC one which still needs it for now). Multiple inheritance is no
longer supported in Web IDL and it makes the scripts more complex than
they needs to be.
Multiple inheritance support is no longer needed now that our SVG
interfaces have been updated to use the simpler SVG2 inheritance model
and use Web IDL 'implements' statements.
Note that the IDL parser still support multiple inheritance for now in
order not to break the ObjC bindings generator.
No new tests, no behavior change.
* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorCPP.pm:
(GetParentImplClassName):
(GetParent):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GetParentClassName):
(GetParentImplClassName):
(GetParentGObjType):
* bindings/scripts/CodeGeneratorJS.pm:
(GetParentClassName):
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorObjC.pm:
(AddMethodsConstantsAndAttributesFromParentInterfaces):
(GenerateImplementation):
* bindings/scripts/IDLParser.pm:
(parseInterface):
(parseException):
(parseInheritance):
2013-07-16 Eric Carlson <eric.carlson@apple.com>
HTMLMediaElement should not add cues for disabled text tracks
https://bugs.webkit.org/show_bug.cgi?id=118682
Reviewed by Ryosuke Niwa.
Merge https://src.chromium.org/viewvc/blink?view=rev&revision=153810
Tests: media/track/track-disabled-addcue.html
media/track/track-disabled.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackAddCues): Do nothing if the track is disabled.
(WebCore::HTMLMediaElement::textTrackAddCue): Ditto.
2013-07-16 Krzysztof Czech <k.czech@ymail.com>
[ATK] Adds support for aria-haspopup property.
https://bugs.webkit.org/show_bug.cgi?id=117834
Reviewed by Christophe Dumez.
Adds support for aria-haspopup property.
Tests: accessibility/element-haspopup.html
accessibility/popup-button-title.html
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
2013-07-16 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap][GStreamer] upload onto the texture only the buffer to be painted
https://bugs.webkit.org/show_bug.cgi?id=118471
Reviewed by Philippe Normand.
Right now all the buffers are uploaded onto the texture. With this
logic pose situations where buffers that will not be painted are
uploaded.
This patch uploads only the buffers that are going to be shown.
With this approach, the buffers may arrive before a GraphicsLayer is
set, so we should be more cautious with GraphicsLayerTextureMapper's
client.
No new tests, covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::~GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
2013-07-16 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] verify and log the received caps in the video sink
https://bugs.webkit.org/show_bug.cgi?id=118559
Reviewed by Philippe Normand.
Verify the correctness of the received caps in the video sink, and
also log them for debugging purposes.
No new tests, no behavior change.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkSetCaps):
2013-07-16 Kangil Han <kangil.han@samsung.com>
Use toHTMLSelectElement and dismiss isHTMLSelectElement
https://bugs.webkit.org/show_bug.cgi?id=118714
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
Additionally, this patch removes isHTMLSelectElement because not all element subclasses can be checked by a combination of tag names.
* html/HTMLSelectElement.h:
(WebCore::toHTMLSelectElement):
* testing/Internals.cpp:
(WebCore::Internals::isSelectPopupVisible):
2013-07-15 Yuta Kitamura <yutak@chromium.org>
Fix a crash in Range::processContents().
NULL ptr in WebCore::Range::processAncestorsAndTheirSiblings
https://bugs.webkit.org/show_bug.cgi?id=77614
Reviewed by Ryosuke Niwa.
This change is ported from Blink revision 153483:
https://src.chromium.org/viewvc/blink?revision=153483&view=revision
This crash can be initiated by calling Range.detach() while deleteContents()
is processing the same range. Range::processContents() should save the state
of the range since mutation events can change the state of the range.
Test: fast/dom/Range/detach-range-during-deletecontents.html
* dom/Range.cpp:
(WebCore::Range::processContents):
* dom/RangeBoundaryPoint.h:
(WebCore::RangeBoundaryPoint::RangeBoundaryPoint):
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
Input element that becomes visible during a simulated click event from an associated label element doesn't get focused
https://bugs.webkit.org/show_bug.cgi?id=118700
Reviewed by Kent Tamura.
Inspired by https://chromium.googlesource.com/chromium/blink/+/6435f70d53403b250e261a914f30d55142f81476.
The bug was caused by isMouseFocusable() check in HTMLLabelElement::defaultEventHandler not updating the layout even
though the call to dispatchSimulatedClick may have dirtied the render tree.
Explicitly update the layout so that we have up-to-date render tree.
Test: fast/forms/label/label-becomes-visible-while-clicking-on-label.html
* html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::defaultEventHandler):
2013-07-15 Kangil Han <kangil.han@samsung.com>
Introduce toHTMLIFrameElement
https://bugs.webkit.org/show_bug.cgi?id=118672
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::nameGetter):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* dom/Document.cpp:
(WebCore::Document::seamlessParentIFrame):
* html/HTMLIFrameElement.h:
(WebCore::toHTMLIFrameElement):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::viewCleared):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::isSeamless):
(WebCore::RenderIFrame::flattenFrame):
2013-07-15 Chris Rogers <crogers@google.com>
Add support for WaveShaperNode.oversample
https://bugs.webkit.org/show_bug.cgi?id=117435
Reviewed by Kenneth Russell.
Adapted from Blink:
https://codereview.chromium.org/15619003/
Please see specification for details:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#WaveShaperNode
.oversample specifies what type of oversampling (if any) should be used when applying the shaping curve.
The default value is "none", meaning the curve will be applied directly to the input samples.
A value of "2x" or "4x" can improve the quality of the processing by avoiding some aliasing,
with the "4x" value yielding the highest quality.
Tests: webaudio/waveshaper-oversample-2x.html
webaudio/waveshaper-oversample-4x.html
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webaudio/WaveShaperDSPKernel.cpp:
(WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel):
(WebCore::WaveShaperDSPKernel::lazyInitializeOversampling):
(WebCore::WaveShaperDSPKernel::process):
(WebCore::WaveShaperDSPKernel::processCurve):
(WebCore::WaveShaperDSPKernel::processCurve2x):
(WebCore::WaveShaperDSPKernel::processCurve4x):
(WebCore::WaveShaperDSPKernel::reset):
(WebCore::WaveShaperDSPKernel::latencyTime):
* Modules/webaudio/WaveShaperDSPKernel.h:
* Modules/webaudio/WaveShaperNode.cpp:
(WebCore::WaveShaperNode::WaveShaperNode):
(WebCore::WaveShaperNode::setOversample):
(WebCore::WaveShaperNode::oversample):
* Modules/webaudio/WaveShaperNode.h:
(WebCore::WaveShaperNode::latency):
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveShaperProcessor.cpp:
(WebCore::WaveShaperProcessor::WaveShaperProcessor):
(WebCore::WaveShaperProcessor::setOversample):
* Modules/webaudio/WaveShaperProcessor.h:
(WebCore::WaveShaperProcessor::oversample):
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/DownSampler.cpp: Added.
(WebCore::DownSampler::DownSampler):
(WebCore::DownSampler::initializeKernel):
(WebCore::DownSampler::process):
(WebCore::DownSampler::reset):
(WebCore::DownSampler::latencyFrames):
* platform/audio/DownSampler.h: Added.
* platform/audio/UpSampler.cpp: Added.
(WebCore::UpSampler::UpSampler):
(WebCore::UpSampler::initializeKernel):
(WebCore::UpSampler::process):
(WebCore::UpSampler::reset):
(WebCore::UpSampler::latencyFrames):
* platform/audio/UpSampler.h: Added.
2013-07-15 Tim Horton <timothy_horton@apple.com>
Update blocked/missing plug-in UI
https://bugs.webkit.org/show_bug.cgi?id=118347
<rdar://problem/14209318>
Reviewed by Sam Weinig.
Patch by Anders Carlsson, Antoine Quint, Sam Weinig, and myself.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSDefaultStyleSheets.cpp:
* css/unavailablePlugIns.css: Added.
Add new Source/WebCore/css/unavailablePlugIns.css stylesheet.
* dom/EventListener.h:
New event listener type to support the creation of an event listener
for the label and icon for missing / blocked plug-in UI.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::defaultEventHandler):
Remove explicit event handling since we're now using a DOM event handler
on the label and icon in the shadow root.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
Don't populate the shadow root with plugin snapshotting elements
if we're not planning on showing a snapshot, because this means that
the shadow root was created for the unavailable plugin indicator instead.
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldUnavailablePluginMessageIncludeButton):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
(WebCore::shouldUnavailablePluginMessageIncludeButton):
Rename from shouldUnavailablePluginMessageBeButton to
shouldUnavailablePluginMessageIncludeButton for accuracy.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReasonDescription):
Set custom text to be displayed in the unavailability indicator.
(WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
(WebCore::RenderEmbeddedObject::handleUnavailablePluginButtonClickEvent):
(WebCore::RenderEmbeddedObject::willBeDestroyed):
(WebCore::RenderEmbeddedObject::isReplacementObscured):
(WebCore::RenderEmbeddedObjectEventListener::handleEvent):
(WebCore::RenderEmbeddedObjectEventListener::operator==):
Remove the old code used to render the missing / blocked plug-in UI in C++ in favor
of populating a shadow root in setPluginUnavailabilityReason(). We add a DOM event
listener in the shadow root to eventually call into unavailablePluginButtonClicked()
on the ChromeClient.
(WebCore::RenderEmbeddedObject::paint):
(WebCore::RenderEmbeddedObject::layout):
Paint and lay out UA shadow root children.
(WebCore::RenderEmbeddedObject::canHaveChildren):
canHaveChildren can use the existence of a UA shadow root to decide
whether a RenderEmbeddedObject can have children.
* rendering/RenderEmbeddedObject.h:
(WebCore::RenderEmbeddedObjectEventListener::create):
(WebCore::RenderEmbeddedObjectEventListener::cast):
(WebCore::RenderEmbeddedObjectEventListener::RenderEmbeddedObjectEventListener):
Create the new event listener class necessary to handle events in the shadow root.
(WebCore::RenderEmbeddedObject::pluginUnavailabilityReasonDescription): Added.
* rendering/RenderWidget.h:
Promote willBeDestroyed() to be public so we may override it in the RenderEmbeddedObject subclass.
2013-07-15 Andreas Kling <akling@apple.com>
Pack WebCore::Font slightly better.
<http://webkit.org/b/118681>
<rdar://problem/14446014>
Reviewed by Sam Weinig.
Knock 8 bytes off of Font by packing the members better. Reduces memory consumption by 429 kB when
viewing the full HTML5 spec at <http://whatwg.org/c>
* platform/graphics/Font.h:
(WebCore::Font::typesettingFeatures):
2013-07-15 Rob Buis <rwlbuis@webkit.org>
XMLSerializer doesn't include namespaces on nodes in HTML documents
https://bugs.webkit.org/show_bug.cgi?id=16496
Reviewed by Ryosuke Niwa.
Introduce a xml fragment serialization mode as indicated by
http://html5.org/specs/dom-parsing.html#xmlserializer (commit 00b84d2). In this mode
the XML fragment serialization algorithm is respected, the changes in this patch do the following:
- elements are self-closing if otherwise this would lead to invalid xml syntax.
- the resulting xml is XML namespace-well-formed (http://www.w3.org/TR/xml-names11/#Conformance).
This is achieved by always, when in xml fragment serialization mode, attempting to write out the element/attribute namespace,
preventing using the XML namespace as a default namespace and special casing the use of element's in XML namespace by using the xml prefix.
The chosen approach matches FireFox 25 behavior.
Test: fast/dom/dom-serialize-namespace.html
* WebCore.order: Adapt to changed createMarkup signature.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::MarkupAccumulator):
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces): makes sure xml namespace/prefix is known so it is never used in namespace declarations.
(WebCore::MarkupAccumulator::appendNamespace): Avoid adding namespace declarations that do not differ from current default namespace.
(WebCore::MarkupAccumulator::appendOpenTag): Print xml prefix if the element's namespace is XML to avoid conflicts.
(WebCore::MarkupAccumulator::appendAttribute):
(WebCore::MarkupAccumulator::shouldAddNamespaceAttribute): Also take into account xmlns attributes with no namespace.
(WebCore::MarkupAccumulator::shouldSelfClose): Force self-closing to create well-formed XML elements.
* editing/MarkupAccumulator.h: Use EFragmentSerialization.
(WebCore::MarkupAccumulator::inXMLFragmentSerialization):
* editing/markup.cpp:
(WebCore::createMarkup):
* editing/markup.h: Add EFragmentSerialization enum.
* xml/XMLSerializer.cpp:
(WebCore::XMLSerializer::serializeToString):
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
MediaFragmentURIParser::parseFragments shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118692
Reviewed by Michael Saboff.
Merge https://chromium.googlesource.com/chromium/blink/+/2aa17cc56a807f7e05d386d6eb66cda25e6b0542.
* html/MediaFragmentURIParser.cpp:
(WebCore::MediaFragmentURIParser::parseFragments):
2013-07-15 Kwang Yul Seo <skyul@company100.net>
NetworkStorageSession::createDefaultSession is only implemented by Soup
https://bugs.webkit.org/show_bug.cgi?id=118679
Reviewed by Alexey Proskuryakov.
Remove NetworkStorageSession::createDefaultSession() because
NetworkStorageSession::defaultStorageSession() returns the default
session.
No new tests, no behavior change.
* platform/network/NetworkStorageSession.h:
* platform/network/soup/NetworkStorageSessionSoup.cpp:
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
compositionstart event should contain the text to be replaced
https://bugs.webkit.org/show_bug.cgi?id=118684
Reviewed by Alexey Proskuryakov.
Merge https://chromium.googlesource.com/chromium/blink/+/9e04f728a95ad7d4783b1d31c3cdc1412dd6cc4d.
DOM3 level 3 specifies compositionstart event's data to be the text to be replaced.
http://www.w3.org/TR/DOM-Level-3-Events/#event-type-compositionstart
According to the author of the Blink change, IE10 on Windows and Firefox22 on Linux confirms
to the specified behavior.
Test: fast/events/ime-composition-events-001.html
* editing/Editor.cpp:
(WebCore::Editor::setComposition):
2013-07-15 Ryosuke Niwa <rniwa@webkit.org>
xmlDocPtrForString shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118693
Reviewed by Michael Saboff.
Merge https://chromium.googlesource.com/chromium/blink/+/5d9b240db74591c3689415c7b7c5180fadb379e9
Prior to this changeset, we were upconverting the entire XML document.
Let xmllib2 parse a document as iso-8859-1 when it's a 8-bit string.
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::nativeEndianUTF16Encoding):
(WebCore::xmlDocPtrForString):
2013-07-15 Roger Fong <roger_fong@apple.com>
Replace WKCACFTypes include with d3d9 include.
Rubberstamped by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2013-07-15 Antoine Quint <graouts@apple.com>
Text with "text-overflow:ellipsis" and an SVG font do not render correctly
https://bugs.webkit.org/show_bug.cgi?id=118669
Reviewed by David Kilzer.
Partial runs may be routed through the complex path in several Font functions. While incomplete,
we can check for a non-NULL run.renderingContext() and exempt runs that have it from being forced
down the complex path. A more thorough fix is already tracked by http://webkit.org/b/100050.
Adding a new testcase which is a copy of svg/text/text-overflow-ellipsis-svgfont.html with kerning
and ligatures turned on explicitly since DRT runs with those off by default and this option is required
to be on for the issue to reproduce.
Fix courtesy of Dan Bernstein.
Test: svg/text/text-overflow-ellipsis-svgfont-kerning-ligatures.html
* platform/graphics/Font.cpp:
(WebCore::Font::drawText):
(WebCore::Font::drawEmphasisMarks):
(WebCore::Font::selectionRectForText):
2013-07-15 peavo@outlook.com <peavo@outlook.com>
[Curl] Download does not replace existing file.
https://bugs.webkit.org/show_bug.cgi?id=118356
Reviewed by Brent Fulgham.
If the download target file already exists, it is not replaced after the download has finished.
At this point, the user would have already approved to replace the file, so it should be replaced.
* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination): Move file and replace it if it already exists.
If the new file is on a different volume, do a copy/delete operation.
2013-07-15 Luciano Wolf <luciano.wolf@openbossa.org>
[CoordinatedGraphics] Crash at CoordinatedGraphicsScene::updateImageBacking
https://bugs.webkit.org/show_bug.cgi?id=118613
The operations of creating/removing/updating/clearing weren't in the
right sequence. Changing the order solves the issue because when an image is
replaced the old one is deleted before the new one is created, and IDs are
not unique in cairo (they're based on the image pointer).
Reviewed by Noam Rosenthal.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::syncImageBackings):
2013-07-15 Brian Holt <brian.holt@samsung.com>
[ATK] Leak: Leak in WebKitAccessibleTextGetText
https://bugs.webkit.org/show_bug.cgi?id=118596
Reviewed by Carlos Garcia Campos.
Fixed memory leak.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getGailTextUtilForAtk):
2013-07-14 Jon Lee <jonlee@apple.com>
Origins with invalid ports are not marked as unique (118652)
https://bugs.webkit.org/show_bug.cgi?id=118652
<rdar://problem/14437753>
Reviewed by Sam Weinig.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::create): Return a unique origin if the port is out of range.
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Another Qt build fix attempt after r152619.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::toString):
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Qt build fix attempt after r152619.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::toString):
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Mac build fix attempt after r152615.
* svg/SVGFilterElement.h:
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
https://bugs.webkit.org/show_bug.cgi?id=118299
Reviewed by Andreas Kling.
Address Ben's review comment.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::toString):
2013-07-14 Ryosuke Niwa <rniwa@webkit.org>
HTMLTextFormControlElement::valueWithHardLineBreaks shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118631
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/2c7c70a7bd3d61bfbf97de95c459ec9f40b46e31.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
2013-07-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add toSVGFilterElement() and use it.
https://bugs.webkit.org/show_bug.cgi?id=118653
Reviewed by Ryosuke Niwa.
We can use toSVGFilterElement() instead of using static_cast<..> to improve readability.
Blink also uses it.
No new tests, no behavior change.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::buildPrimitives):
(WebCore::RenderSVGResourceFilter::applyResource):
(WebCore::RenderSVGResourceFilter::resourceBoundingBox):
* rendering/svg/RenderSVGResourceFilter.h:
(WebCore::RenderSVGResourceFilter::filterUnits):
(WebCore::RenderSVGResourceFilter::primitiveUnits):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGFilterElement.h:
(WebCore::toSVGFilterElement):
2013-07-14 Kangil Han <kangil.han@samsung.com>
Introduce toHTMLVideoElement
https://bugs.webkit.org/show_bug.cgi?id=118582
Reviewed by Ryosuke Niwa.
To avoid direct use of static_cast, this patch introduces toHTMLVideoElement.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::getPluginProxyParams):
* html/HTMLVideoElement.h:
(WebCore::toHTMLVideoElement):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::descendentVideoElement):
(WebCore::ancestorVideoElement):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::enterFullscreenForVideo):
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoElement):
2013-07-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151978.
http://trac.webkit.org/changeset/151978
https://bugs.webkit.org/show_bug.cgi?id=118651
Caused regressions at least 3 websites (Requested by rniwa on
#webkit).
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GetNativeTypeFromSignature):
(JSValueToNative):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
2013-07-13 Joone Hur <joone.hur@intel.com>
Caret should respect text background color
https://bugs.webkit.org/show_bug.cgi?id=117493
Reviewed by Ryosuke Niwa.
This patch allows the caret to become visible in the black background
by getting the caret color from the color of the element containing
the text, not the parent element that has the contentEditable attribute.
Test: editing/caret/caret-color.html
* editing/FrameSelection.cpp:
(WebCore::CaretBase::paintCaret):
2013-07-13 Ryosuke Niwa <rniwa@webkit.org>
Avoid upconverting strings in various places in WebCore
https://bugs.webkit.org/show_bug.cgi?id=118632
Reviewed by Andreas Kling.
Avoid calling String::characters() in various places since it upconverts 8-bit strings to 16-bit strings.
Merge
https://chromium.googlesource.com/chromium/blink/+/a6162e2ad7c7870e22445d3c463d17e7ac871e80
https://chromium.googlesource.com/chromium/blink/+/18095209b3f467758b83894e7b14f813f6953f81
https://chromium.googlesource.com/chromium/blink/+/fefcf2b95d55f24c60fd2e95978cf4544f3c92ca
https://chromium.googlesource.com/chromium/blink/+/8e0527b0fb33998318aedfd74b3511025f7ff294
https://chromium.googlesource.com/chromium/blink/+/feaf798b04597b0849b4000fc305264895d3eac5
https://chromium.googlesource.com/chromium/blink/+/bd1a49103a6e07b1023d2c742d8217769efbffb4
* css/CSSParser.cpp:
(WebCore::CSSParser::setupParser):
(WebCore::CSSParser::parseImageSet):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParserValues.h:
(WebCore::CSSParserString::init):
(WebCore::CSSParserString::clear):
* dom/DatasetDOMStringMap.cpp:
(WebCore::isValidAttributeName):
(WebCore::convertAttributeNameToPropertyName):
(WebCore::propertyNameMatchesAttributeName):
(WebCore::isValidPropertyName):
(WebCore::convertPropertyNameToAttributeName):
* dom/Range.cpp:
(WebCore::Range::toString):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::parseSandboxPolicy):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::measureText):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::markFutureAndPastNodes):
2013-07-13 Ryosuke Niwa <rniwa@webkit.org>
parseHTMLInteger shouldn't upconvert 8-bit string
https://bugs.webkit.org/show_bug.cgi?id=118629
Reviewed by Sam Weinig.
Merge https://chromium.googlesource.com/chromium/blink/+/e0ebab23e0c16b49dc90c9c39b8bbbf4f243a01e.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTMLInteger):
2013-07-12 Eric Carlson <eric.carlson@apple.com>
[iOS] TextTrackRepresentation not cleared when captions are disabled
https://bugs.webkit.org/show_bug.cgi?id=118623
Reviewed by Dean Jackson.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Do not return immediately
when captions are disabled so the necessary cleanup happens.
2013-07-12 Brent Fulgham <bfulgham@apple.com>
[Windows] Attempt to satisfy the Open Source Windows bots.
* DerivedSources.make: Restore the HAVE_AVCF macro detection.
* config.h: Return to using HAVE_AVCF to activate AVFoundation code.
2013-07-12 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=118461
Reviewed by Brent Fulgham.
* config.h: Only enable AVFOUNDATION for Windows if CoreGraphics is used.
2013-07-12 Oleg Beletski <oleg.beletski@gmail.com>
[EFL] --minimal build fails while linking libwebcore_efl.so
https://bugs.webkit.org/show_bug.cgi?id=118549
Reviewed by Christophe Dumez.
* CMakeLists.txt:
Moving file plugins/PluginPackage.cpp to ENABLE_NETSCAPE_PLUGIN_API block.
2013-07-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
Insufficient viewport repaints when FrameView::paintsEntireContents
https://bugs.webkit.org/show_bug.cgi?id=118562
Reviewed by Simon Fraser.
When the frameview paints entire content, the visualOverflowRect of RenderView
should be the same as the layoutOverflowRect.
This affects the requested repaints on resize of the frameview.
* rendering/RenderView.cpp:
(WebCore::RenderView::visualOverflowRect):
* rendering/RenderView.h:
2013-07-10 Roger Fong <roger_fong@apple.com>
Plugins that don't support snapshotting should not all autostart.
https://bugs.webkit.org/show_bug.cgi?id=118572
<rdar://problem/14324391>.
Reviewed by Dean Jackson.
Test: plugins/snapshotting/quicktime-plugin-snapshotted.html
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Pass in information about whether or not a snapshot exists
to the shadow dom.
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): We should only add the layer to the tree when the plugin
is actually playing. Otherwise we run into an issue where the contents of the layer initially appear on the screen briefly
on page load before we display the substitute for a plugin that doesn't support snapshotting.
2013-07-11 Dan Bernstein <mitz@apple.com>
[mac] No API for getting the page visibility state of a WebView
https://bugs.webkit.org/show_bug.cgi?id=118578
Reviewed by Simon Fraser.
* WebCore.exp.in: Export WebCore::Page::visibilityState().
2013-07-11 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Layout Test accessibility/deleting-iframe-destroys-axcache.html, platform/gtk/accessibility/replaced-objects-in-anonymous-blocks.html are failing
https://bugs.webkit.org/show_bug.cgi?id=118552
Reviewed by Chris Fleizach.
Do not assume always that we have a RenderText renderer when
calling to toRenderText(), since we might be executing that part
of the code due to have requested to include all the children.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Add
missing guard for RenderText, needed after r152537.
2013-07-11 Andrei Bucur <abucur@adobe.com>
[CSS Regions] In a region chain with auto-height regions, lines get their length based only on the first region
https://bugs.webkit.org/show_bug.cgi?id=118531
Reviewed by Alexandru Chiculita.
When computing the height a flow thread it's possible to overflow the maximum LayoutUnit and obtain a negative value.
This leads to invalid results during layout when computing the region range and the RenderBoxRegion info for the
descendant boxes of the flow thread.
This issue appears especially during the auto-height algorithm because it initializes the auto-height regions
height with the LayoutUnit::max() / 2 value. Summing two such regions overflows and results in a negative value.
The fix clamps the maximum height of the flow thread to LayoutUnit::max() / 2. This doesn't affect the auto-height
algorithm because regionAtBlockOffset() will still return the correct values as the auto-height regions content
is established and their height updated.
Tests: fast/regions/autoheight-correct-region-for-lines-2.html
fast/regions/autoheight-correct-region-for-lines.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::setRegionRangeForBox):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::maxPageLogicalHeight):
2013-07-11 Timothy Hatcher <timothy@apple.com>
Revert r152267 and soft link WebInspectorUI.framework again.
https://bugs.webkit.org/show_bug.cgi?id=118544
Reviewed by David Kilzer.
* platform/mac/SoftLinking.h: Rename SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL
to SOFT_LINK_STAGED_FRAMEWORK and ASSERT since we don't want to silently
fail anymore when using this macro.
2013-07-11 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Parameter of commitSceneState should be const
https://bugs.webkit.org/show_bug.cgi?id=118564
Reviewed by Noam Rosenthal.
Parameter of commitSceneState should be const as there should not be any
modifications to the passed CoordinatedGraphicsState.
* platform/graphics/texmap/coordinated/CompositingCoordinator.h:
2013-07-11 Radu Stavila <stavila@adobe.com>
NamedFlowCollection getters should follow the same pattern as HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=118561
Reviewed by Christophe Dumez.
Modified item and namedItem methods from DOMNamedFlowCollection to return null instead of undefined.
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22617
Completely removed the TreatReturnedNullObjectAs attribute as it was only used by the DOMNamedFlowCollection interface.
Test: fast/regions/webkit-named-flow-collection-empty-getters.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementationFunctionCall):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::treatReturnedNullObjectAsUndefined):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_treat_returned_null_object_as_undefined):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj treatReturnedNullObjectAsUndefined]):
* bindings/scripts/test/TestObj.idl:
* dom/DOMNamedFlowCollection.idl:
2013-07-11 Andreas Kling <akling@apple.com>
Revert r149313: Don't check for @media rules affected by viewport changes in every layout.
<rdar://problem/14277905>
Rubber-stamped by Antti Koivisto.
This changed caused more harm than good. setFrameRect() is not the only path in FrameView
that can cause media queries to need invalidation.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::layout):
2013-07-11 Kangil Han <kangil.han@samsung.com>
Introduce isHTMLTitleElement and toHTMLTitleElement
https://bugs.webkit.org/show_bug.cgi?id=118558
Reviewed by Andreas Kling.
To enhance readability, this patch introduces isHTMLTitleElement and toHTMLTitleElement.
This also helps out to reduce duplicated use of static_cast.
* dom/Document.cpp:
(WebCore::Document::setTitle):
(WebCore::Document::removeTitle):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::removeHeadContents):
* html/HTMLTitleElement.h:
(WebCore::isHTMLTitleElement):
(WebCore::toHTMLTitleElement):
2013-07-11 Patrick Gansterer <paroga@webkit.org>
Remove unused Windows CE files
https://bugs.webkit.org/show_bug.cgi?id=118557
Reviewed by Andreas Kling.
* platform/wince/CursorWinCE.cpp: Removed.
* platform/wince/PasteboardWinCE.cpp: Removed.
* platform/wince/SearchPopupMenuWinCE.cpp: Removed.
2013-07-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of SVGPathSeg* special casing in the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=118525
Reviewed by Kentaro Hara.
Have one header per SVGPathSeg* type so that we no longer need special casing
for them in the JSC bindings generator.
No new tests, no behavior change.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSSVGPathSegCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType):
(NativeToJSValue):
* svg/SVGPathElement.cpp:
* svg/SVGPathSegArc.h:
* svg/SVGPathSegArcAbs.h: Added.
(WebCore::SVGPathSegArcAbs::create):
(WebCore::SVGPathSegArcAbs::SVGPathSegArcAbs):
(WebCore::SVGPathSegArcAbs::pathSegType):
(WebCore::SVGPathSegArcAbs::pathSegTypeAsLetter):
* svg/SVGPathSegArcRel.h: Added.
(WebCore::SVGPathSegArcRel::create):
(WebCore::SVGPathSegArcRel::SVGPathSegArcRel):
(WebCore::SVGPathSegArcRel::pathSegType):
(WebCore::SVGPathSegArcRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubic.h:
* svg/SVGPathSegCurvetoCubicAbs.h: Added.
(WebCore::SVGPathSegCurvetoCubicAbs::create):
(WebCore::SVGPathSegCurvetoCubicAbs::SVGPathSegCurvetoCubicAbs):
(WebCore::SVGPathSegCurvetoCubicAbs::pathSegType):
(WebCore::SVGPathSegCurvetoCubicAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicRel.h: Added.
(WebCore::SVGPathSegCurvetoCubicRel::create):
(WebCore::SVGPathSegCurvetoCubicRel::SVGPathSegCurvetoCubicRel):
(WebCore::SVGPathSegCurvetoCubicRel::pathSegType):
(WebCore::SVGPathSegCurvetoCubicRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicSmooth.h:
* svg/SVGPathSegCurvetoCubicSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::SVGPathSegCurvetoCubicSmoothAbs):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegType):
(WebCore::SVGPathSegCurvetoCubicSmoothAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoCubicSmoothRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoCubicSmooth.h.
(WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::SVGPathSegCurvetoCubicSmoothRel):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegType):
(WebCore::SVGPathSegCurvetoCubicSmoothRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadratic.h:
* svg/SVGPathSegCurvetoQuadraticAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
(WebCore::SVGPathSegCurvetoQuadraticAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticAbs::SVGPathSegCurvetoQuadraticAbs):
(WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticRel.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadratic.h.
(WebCore::SVGPathSegCurvetoQuadraticRel::create):
(WebCore::SVGPathSegCurvetoQuadraticRel::SVGPathSegCurvetoQuadraticRel):
(WebCore::SVGPathSegCurvetoQuadraticRel::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticRel::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticSmoothAbs.h: Copied from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::SVGPathSegCurvetoQuadraticSmoothAbs):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::pathSegTypeAsLetter):
* svg/SVGPathSegCurvetoQuadraticSmoothRel.h: Renamed from Source/WebCore/svg/SVGPathSegCurvetoQuadraticSmooth.h.
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::SVGPathSegCurvetoQuadraticSmoothRel):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegType):
(WebCore::SVGPathSegCurvetoQuadraticSmoothRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegLineto.h.
(WebCore::SVGPathSegLinetoAbs::create):
(WebCore::SVGPathSegLinetoAbs::SVGPathSegLinetoAbs):
(WebCore::SVGPathSegLinetoAbs::pathSegType):
(WebCore::SVGPathSegLinetoAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoHorizontal.h:
* svg/SVGPathSegLinetoHorizontalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
(WebCore::SVGPathSegLinetoHorizontalAbs::create):
(WebCore::SVGPathSegLinetoHorizontalAbs::SVGPathSegLinetoHorizontalAbs):
(WebCore::SVGPathSegLinetoHorizontalAbs::pathSegType):
(WebCore::SVGPathSegLinetoHorizontalAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoHorizontalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoHorizontal.h.
(WebCore::SVGPathSegLinetoHorizontalRel::create):
(WebCore::SVGPathSegLinetoHorizontalRel::SVGPathSegLinetoHorizontalRel):
(WebCore::SVGPathSegLinetoHorizontalRel::pathSegType):
(WebCore::SVGPathSegLinetoHorizontalRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegLineto.h.
(WebCore::SVGPathSegLinetoRel::create):
(WebCore::SVGPathSegLinetoRel::SVGPathSegLinetoRel):
(WebCore::SVGPathSegLinetoRel::pathSegType):
(WebCore::SVGPathSegLinetoRel::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoVertical.h:
* svg/SVGPathSegLinetoVerticalAbs.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
(WebCore::SVGPathSegLinetoVerticalAbs::create):
(WebCore::SVGPathSegLinetoVerticalAbs::SVGPathSegLinetoVerticalAbs):
(WebCore::SVGPathSegLinetoVerticalAbs::pathSegType):
(WebCore::SVGPathSegLinetoVerticalAbs::pathSegTypeAsLetter):
* svg/SVGPathSegLinetoVerticalRel.h: Copied from Source/WebCore/svg/SVGPathSegLinetoVertical.h.
(WebCore::SVGPathSegLinetoVerticalRel::create):
(WebCore::SVGPathSegLinetoVerticalRel::SVGPathSegLinetoVerticalRel):
(WebCore::SVGPathSegLinetoVerticalRel::pathSegType):
(WebCore::SVGPathSegLinetoVerticalRel::pathSegTypeAsLetter):
* svg/SVGPathSegListBuilder.cpp:
* svg/SVGPathSegMovetoAbs.h: Copied from Source/WebCore/svg/SVGPathSegMoveto.h.
(WebCore::SVGPathSegMovetoAbs::create):
(WebCore::SVGPathSegMovetoAbs::SVGPathSegMovetoAbs):
(WebCore::SVGPathSegMovetoAbs::pathSegType):
(WebCore::SVGPathSegMovetoAbs::pathSegTypeAsLetter):
* svg/SVGPathSegMovetoRel.h: Renamed from Source/WebCore/svg/SVGPathSegMoveto.h.
(WebCore::SVGPathSegMovetoRel::create):
(WebCore::SVGPathSegMovetoRel::SVGPathSegMovetoRel):
(WebCore::SVGPathSegMovetoRel::pathSegType):
(WebCore::SVGPathSegMovetoRel::pathSegTypeAsLetter):
2013-07-11 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r152426.
* config.h:
2013-07-11 Fabienne Semeria <fsemeria@nds.com>
[Qt] memory leak in WebCore::FontCache::getLastResortFallbackFont
https://bugs.webkit.org/show_bug.cgi?id=118532
Reviewed by Allan Sandfeld Jensen.
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
2013-07-11 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Refactor code for translating offsets between WebCore a11y and ATK
https://bugs.webkit.org/show_bug.cgi?id=118179
Reviewed by Chris Fleizach.
Encapsulate better and make more clear the translation of offsets
between our ATK implementation and WebCore's accessibility layer.
Values for offsets can differ sometimes between those two worlds
due to some extra flattening we need to do in ATK based ports to
properly expose the accessibility hierarchy to ATs, which
sometimes means adding extra text elements in the exposed text
through the AtkText interface (e.g. list items markers).
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(offsetAdjustmentForListItem): Helper function to refactor code
needed to translate offsets from WebCore to ATK worlds. Currently
related to considering list item markers in LTR text only.
(webCoreOffsetToAtkOffset): Convenience function for code
readability purposes. It just calls offsetAdjustmentForListItem.
(atkOffsetToWebCoreOffset): Likewise.
(getSelectionOffsetsForObject): Use webCoreOffsetToAtkOffset.
(webkitAccessibleTextGetCaretOffset): Use webCoreOffsetToAtkOffset
to translate an offset from WebCore to ATK before returning it.
(webkitAccessibleTextSetSelection): Use atkOffsetToWebCoreOffset
to translate an offset from WebCore to ATK before using it.
(webkitAccessibleTextSetCaretOffset): Likewise.
2013-07-10 Sam Weinig <sam@webkit.org>
Range.getClientRects() not working correctly for partially contained vertically styled text nodes
<rdar://problem/14305675>
https://bugs.webkit.org/show_bug.cgi?id=118447
Reviewed by David Hyatt.
Original patch by Mac Murrett, tweaked by me.
Test: fast/dom/Range/getClientRects-vertical.html
* rendering/RenderText.cpp:
(WebCore::localQuadForTextBox):
Use the physical accessors rather than the logical ones to get the correct metrics.
2013-07-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Reduce number of header includes in SVG
https://bugs.webkit.org/show_bug.cgi?id=118474
Reviewed by Rob Buis.
Reduce number of header includes in SVG. In particular, SVGAnimatedPropertyMacros.h
no longer brings SVGElement.h header include. This means that the SVGElement
class can now have animated properties.
This patch is a prerequirement to merge SVGStyledElement into SVGElement.
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* svg/GradientAttributes.h:
* svg/SVGAllInOne.cpp:
* svg/SVGAnimateMotionElement.cpp:
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimatedTypeAnimator.cpp: Added.
(WebCore::SVGElementAnimatedProperties::SVGElementAnimatedProperties):
(WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
(WebCore::SVGAnimatedTypeAnimator::~SVGAnimatedTypeAnimator):
(WebCore::SVGAnimatedTypeAnimator::calculateFromAndToValues):
(WebCore::SVGAnimatedTypeAnimator::calculateFromAndByValues):
(WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
* svg/SVGAnimatedTypeAnimator.h:
* svg/SVGAnimationElement.h:
* svg/SVGCursorElement.cpp:
* svg/SVGDocumentExtensions.h:
* svg/SVGElement.cpp:
* svg/SVGElementInstanceList.cpp:
* svg/SVGElementInstanceList.h:
* svg/SVGElementRareData.h:
* svg/SVGFEImageElement.cpp:
* svg/SVGFilterElement.cpp:
* svg/SVGFitToViewBox.h:
* svg/SVGFontData.cpp:
* svg/SVGFontData.h:
* svg/SVGFontElement.h:
* svg/SVGForeignObjectElement.cpp:
* svg/SVGGlyphMap.h:
* svg/SVGGradientElement.cpp:
* svg/SVGMPathElement.cpp:
* svg/SVGMPathElement.h:
* svg/SVGPathBlender.cpp:
* svg/SVGPathBlender.h:
* svg/SVGPathBuilder.cpp:
* svg/SVGPathBuilder.h:
* svg/SVGPathParser.cpp:
* svg/SVGPathParser.h:
* svg/SVGPathSegListBuilder.h:
* svg/SVGPathTraversalStateBuilder.cpp:
* svg/SVGPathTraversalStateBuilder.h:
* svg/SVGPathUtilities.h:
* svg/SVGPatternElement.cpp:
* svg/SVGPointList.h:
* svg/SVGScriptElement.cpp:
* svg/SVGStyledElement.h:
* svg/SVGTests.h:
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.cpp:
* svg/SVGTransformable.h:
* svg/SVGURIReference.cpp:
* svg/SVGURIReference.h:
* svg/SVGVKernElement.cpp:
* svg/SVGVKernElement.h:
* svg/SVGZoomAndPan.h:
* svg/properties/SVGAnimatedProperty.cpp: Added.
(WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
(WebCore::SVGAnimatedProperty::commitChange):
(WebCore::SVGAnimatedProperty::animatedPropertyCache):
* svg/properties/SVGAnimatedProperty.h:
* svg/properties/SVGAnimatedPropertyMacros.h:
(WebCore::SVGSynchronizableAnimatedProperty::synchronize):
* svg/properties/SVGAnimatedStaticPropertyTearOff.h:
* svg/properties/SVGListProperty.h:
2013-07-10 Dominique Leuenberger <dimstar@opensuse.org>
Fix build against GTK+ 2.0
https://bugs.webkit.org/show_bug.cgi?id=117895
Reviewed by Martin Robinson.
GTK2 build fails for undefined GDK_IS_X11_DISPLAY
GTK 2.0 does define GDK_WINDOWING_X11,but GDK_IS_X11_DISPLAY is not
present in GTK+ 2.0. A dummy defines is sufficient, as GTK 2.0 is not
that multiple backend aware anyway...
* platform/gtk/GtkVersioning.h: Define GDK_IS_X11_DISPLAY for GTK+ 2.0
and compatibility for gtk_widget_get_preferred_size()
* plugins/gtk/gtk2xtbin.c: Include config.h
2013-07-10 Tim Horton <timothy_horton@apple.com>
Deferring layer flushes can cause painting without layout being done
https://bugs.webkit.org/show_bug.cgi?id=118493
Reviewed by Simon Fraser.
r147797 added a mechanism for the TileController to inform RenderLayerCompositor
that it had performed an action (setNeedsDisplay, etc.) that would cause CoreAnimation
to call back into us to paint in this runloop, and that it shouldn't throttle the next
layer flush.
However, if tiles were created and left unparented (because the TileController was
out-of-window), when they are later parented, we failed to inform RenderLayerCompositor
that they were about to call back for painting, and so it would happily throttle the
next layer flush, and layout would be out of date, and garbage and corruption could result.
To resolve this, rework the logic surrounding parenting existing-but-unparented tiles
to ensure that they get added to the TileController's dirtyRect.
No new tests; the bug only reproduces under specific timing circumstances, and
manifests itself as an assertion failure or garbage on the screen, so it's quite
hard to make a workable test.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::revalidateTiles):
- Factor out the code to parent unparented tiles so that it is shared between the
created-new-tile and reparenting-existing-tile cases.
- Keep track of whether we updated the frame of a pre-existing tile.
- If the tile is dirty and needed to be parented (because either it's new
or hadn't been parented before), add it to the dirty rect list.
- If the tile changed size, add it to the dirty rect list.
(WebCore::TileController::ensureTilesForRect):
Ditto everything from revalidateTiles.
(WebCore::TileController::createTileLayer):
- Explicitly mark fresh tiles as needing display, so that we can depend on
[WebTileLayer needsDisplay] in revalidateTiles to tell us that it's dirty.
2013-07-10 Eric Carlson <eric.carlson@apple.com>
[Mac] every enabled text track should be listed in the track menu
https://bugs.webkit.org/show_bug.cgi?id=118477
Reviewed by Jer Noble.
Test: media/video-controls-captions-trackmenu-includes-enabled-track.html
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Don't select the
"Off" menu item if a track is enabled.
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Always include a track
that is showing in the menu. Add more diagnostic logging.
2013-07-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove ElementTimeControl and expose SVGAnimationElement
https://bugs.webkit.org/show_bug.cgi?id=118349
Reviewed by Rob Buis.
Remove ElementTimeControl IDL interface and move its attributes
to the SVGAnimationElement IDL interface as per the latest SVG2
specification:
https://svgwg.org/svg2-draft/animate.html#InterfaceSVGAnimationElement
Also remove [NoInterfaceObject] IDL extended attribute from
SVGAnimationElement as it is not present in the specification.
This is one step towards removing IDL multiple inheritance in SVG and
complying with the latest SVG2 specification.
No new tests, covered by existing test cases.
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorObjC.pm:
* svg/ElementTimeControl.h: Removed.
* svg/ElementTimeControl.idl: Removed.
* svg/SVGAnimationElement.h:
* svg/SVGAnimationElement.idl:
2013-07-10 Arnaud Renevier <a.renevier@sisa.samsung.com>
Web Inspector: "Always enable" profiling does not work
https://bugs.webkit.org/show_bug.cgi?id=118487
Enable profiler when loading panel if profiler is enabled in inspector
settings.
Reviewed by Timothy Hatcher.
* inspector/front-end/ProfilesPanel.js:
2013-07-09 Roger Fong <roger_fong@apple.com>
HTMLPluginElement's state should be Playing before firing mouse click event.
https://bugs.webkit.org/show_bug.cgi?id=118398.
<rdar://problem/14262126>
Reviewed by Dean Jackson.
Test: plugins/snapshotting/plugin-receives-click-event.html
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired):
The defaultEventHandler returns early if the state is not Playing.
This is because we only want the plugin to deal with user interaction normally if the
plugin is actually enabled (not being snapshotted).
When we click on the snapshotted plugin to start it, we mimic what would happen to the plugin
normally by dispatching another click event on top of where we just clicked.
However, we were sending the click event before setting the state to Playing which meant that our
simulated click was not being handled.
We should be setting this state before sending the click, not after.
2013-07-10 Nick Diego Yamane <nick.yamane@openbossa.org>
Fix a bug in MediaStreamDescriptor::removeVideoComponent
https://bugs.webkit.org/show_bug.cgi?id=118446
Reviewed by Eric Carlson.
MediaStreamDescriptor::removeVideoComponent is currently trying to
remove the 'videoComponent' from the wrong vector.
* platform/mediastream/MediaStreamDescriptor.h:
(WebCore::MediaStreamDescriptor::removeVideoComponent):
2013-07-10 Mario Sanchez Prada <mario.prada@samsung.com>
AX: Allow requesting the full plain text for an object with textUnderElement()
https://bugs.webkit.org/show_bug.cgi?id=105214
Reviewed by Chris Fleizach.
Allow specifying different function modes for textUnderElement(),
so we can effectively ask for the "normal" result (e.g to retrieve
test to be exposed as the 'title') or for the full text under the
element (without omitting any child in the subtree). This is
needed for the implementation of atk_text_get_text() in GTK/EFL.
* accessibility/AccessibilityObject.h: Add new enumeration to
specify the different modes for textUnderElement().
(WebCore::AccessibilityObject::textUnderElement): Added parameter.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::shouldUseAccessiblityObjectInnerText): Always return
'true' when using the "include all children" mode.
(WebCore::AccessibilityNodeObject::textUnderElement): Updated call
to shouldUseAccessiblityObjectInnerText().
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement): Removed
GTK specific code and expand the usage of text iterators beyond
text render objects, using it also when in the "include all
children" mode.
* accessibility/AccessibilityRenderObject.h:
* accessibility/atk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::getLengthForTextRange): Updated
call to textUnderElement(), preserving the previous behavior.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetText): Updated call to textUnderElement(),
using the "include all children" mode.
2013-07-10 Sergio Correia <sergio.correia@openbossa.org>
Remove the meshType from CoordinatedCustomFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=118529
Reviewed by Noam Rosenthal.
Following the removal of the meshType from CustomFilterOperation in r149153,
remove also the meshType from CoordinatedCustomFilterOperation.
No new tests, no new functionality.
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h:
(WebCore::CoordinatedCustomFilterOperation::create): Remove unused meshType parameter.
(WebCore::CoordinatedCustomFilterOperation::CoordinatedCustomFilterOperation): Ditto.
Ditto.
2013-07-10 James Craig <james@cookiecrook.com>
AX: AccessibilityNodeObject::supportsRequiredAttribute() should switch on CellRole
https://bugs.webkit.org/show_bug.cgi?id=117817
Reviewed by Chris Fleizach.
CellRole supports the required attribute now for accessibility, according to ARIA spec.
Updated existing test coverage.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
2013-07-10 Csaba Osztrogonác <ossy@webkit.org>
REGRESSION(r151957): WebGL textures do not show
https://bugs.webkit.org/show_bug.cgi?id=118464
Reviewed by Christophe Dumez.
After r151957 decoder.frameIsCompleteAtIndex(0) doesn't trigger image decoding,
we have to call decoder.createFrameAtIndex(0) explicitly to ensure it.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2013-07-10 Karol Świniarski <k.swiniarsk2@samsung.com>
Change recently ratified extensions prefixes from WEBKIT_WEBGL_ to WEBGL_
https://bugs.webkit.org/show_bug.cgi?id=117786
Reviewed by Dean Jackson.
According to WebGL's revision 10, extensions should be named: WEBGL_lose_context,
WEBGL_depth_texture, WEBGL_compressed_texture_s3tc.
No new tests. Covered by existing tests:
LayoutTests/webgl/conformance/extensions/get-extension.html
LayoutTests/webgl/conformance/context/context-lost.html
LayoutTests/webgl/conformance/extensions/webgl-depth-texture.html
LayoutTests/webgl/conformance/extensions/webgl-compressed-texture-s3tc.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
2013-07-09 Byungwoo Lee <bw80.lee@samsung.com>
Unreviewed build fix.
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
2013-07-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce isSVGFontElement() and isSVGImageElement(), use them
https://bugs.webkit.org/show_bug.cgi?id=118504
Reviewed by Benjamin Poulain.
Let's use isFoo() to enhance readibility in svg element classes along with html's.
No new tests, there is no behavior changes.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::getSVGFontById):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteImageURL):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
* svg/SVGElement.cpp:
(WebCore::SVGElement::viewportElement):
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement):
* svg/SVGFontElement.h:
(WebCore::toSVGFontElement):
(WebCore::isSVGFontElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::associatedFontElement):
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
* svg/SVGImageElement.h:
(WebCore::toSVGImageElement):
(WebCore::isSVGImageElement):
* svg/SVGLocatable.cpp:
(WebCore::isViewportElement):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):
2013-07-09 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Add ewk_view_device_pixel_ratio_set
https://bugs.webkit.org/show_bug.cgi?id=118521
Reviewed by Gyuyoung Kim.
No new tests, covered by existing tests.
* dom/ViewportArguments.cpp: Remove PLATFORM(EFL) not to use deprecatedTargetDPI
* dom/ViewportArguments.h: Ditto.
* platform/efl/EflScreenUtilities.cpp: Removed getDPI() which is not used anymore.
* platform/efl/EflScreenUtilities.h: Ditto.
2013-07-09 James Craig <james@cookiecrook.com>
@readonly and @aria-readonly="false" are not exposed correctly to accessibility
https://bugs.webkit.org/show_bug.cgi?id=118475
Reviewed by Chris Fleizach.
Account for implicit and explicit @readonly/@aria-readonly mismatches. Updated existing test coverage.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetValueAttribute):
2013-07-09 Jer Noble <jer.noble@apple.com>
Reviewed by Simon Fraser.
Remember the scroll position and restore after exiting full-screen mode.
https://bugs.webkit.org/show_bug.cgi?id=61956
No new tests, adds a client callback used by WebKit and WebKit2 win.
* platform/graphics/win/FullScreenController.cpp:
(FullScreenController::enterFullScreen):
(FullScreenController::exitFullScreen):
* platform/graphics/win/FullScreenControllerClient.h:
2013-07-09 Jeff Miller <jeffm@apple.com>
AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate in WebCore::mac()
https://bugs.webkit.org/show_bug.cgi?id=118518
Reviewed by Alexey Proskuryakov.
* platform/network/mac/AuthenticationMac.mm:
(WebCore::mac):
Map ProtectionSpaceAuthenticationSchemeNegotiate to NSURLAuthenticationMethodNegotiate.
2013-07-09 Jeff Miller <jeffm@apple.com>
AuthenticationMac.mm does not handle NSURLAuthenticationMethodNegotiate
https://bugs.webkit.org/show_bug.cgi?id=118517
Reviewed by Brady Eidson.
* platform/network/mac/AuthenticationMac.mm:
(WebCore::core):
Map "NSURLAuthenticationMethodNegotiate" to ProtectionSpaceAuthenticationSchemeNegotiate.
2013-07-09 peavo@outlook.com <peavo@outlook.com>
[Windows] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=106558
Reviewed by Brent Fulgham.
On Windows, dispatch.h needs to be included before certain CFNetwork headers.
* WebCorePrefix.h: Include dispatch.h.
2013-07-09 Mark Lam <mark.lam@apple.com>
Fix 30% JSBench regression (caused by adding column numbers to stack traces).
https://bugs.webkit.org/show_bug.cgi?id=118481.
Reviewed by Mark Hahnenberg and Geoffrey Garen.
Test: fast/js/line-column-numbers.html
Updated the bindings to use StackFrame::computeLineAndColumn(). The old
StackFrame::line() and StackFrame::column() has been removed. The new
algorithm always computes the 2 values together anyway. Hence it is more
efficient to return them as a pair instead of doing the same computation
twice for each half of the result.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):
(WebCore::createScriptCallStackFromException):
* bindings/js/ScriptSourceCode.h:
(WebCore::ScriptSourceCode::ScriptSourceCode):
2013-07-09 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use toSVGFontElement() instead of static_cast<SVGFontElement*>
https://bugs.webkit.org/show_bug.cgi?id=118496
Reviewed by Andreas Kling.
As a step to change static_cast with toXXX, static_cast<SVGFontElement*> can
be changed with toSVGFontElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153761
* svg/SVGFontElement.h:
(WebCore::toSVGFontElement):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache):
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto):
(WebCore::SVGHKernElement::removedFrom):
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto):
(WebCore::SVGVKernElement::removedFrom):
2013-07-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove support for [PassThisToCallback] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=118391
Reviewed by Kentaro Hara.
The [PassThisToCallback] Webkit-specific IDL extended attribute is supported
by the JSC bindings generator but is no longer used. The attribute is not
even documented.
We can therefore drop support for this from the generator to simplify the
code.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/TestCallback.idl:
2013-07-09 Praveen R Jadhav <praveen.j@samsung.com>
Update Exception handling in WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=118405.
Reviewed by Chris Rogers.
AudioBufferSourceNode, OscillatorNode and AnalyserNode don't
propagate exception mentioned in WebAudio spec.
Code updated to throw DOM exception as expected.
Tests: webaudio/analyser-exception.html
webaudio/audiobuffersource-exception.html
* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setFftSize):
(WebCore::AnalyserNode::setMinDecibels):
(WebCore::AnalyserNode::setMaxDecibels):
(WebCore::AnalyserNode::setSmoothingTimeConstant):
* Modules/webaudio/AnalyserNode.h:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::startGrain):
(WebCore::AudioBufferSourceNode::noteGrainOn):
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createBuffer):
(WebCore::AudioContext::createScriptProcessor):
(WebCore::AudioContext::createPeriodicWave):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
(WebCore::AudioScheduledSourceNode::stop):
(WebCore::AudioScheduledSourceNode::noteOn):
(WebCore::AudioScheduledSourceNode::noteOff):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/OscillatorNode.idl:
2013-07-08 Martin Robinson <mrobinson@igalia.com>
[CSS Grid Layout] Rename grid-{rows|columns} to grid-definition-{rows|columns}
https://bugs.webkit.org/show_bug.cgi?id=103336
Reviewed by Tony Chang.
Rename -webkit-grid-{rows|columns} to -webkit-grid-definition-{rows|columns}.
The latest version of the spec has renamed these properties.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle the new names.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Ditto.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty): Ditto.
* css/CSSPropertyNames.in: Add support for the new names.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Handle the new names.
2013-07-08 Enrica Casucci <enrica@apple.com>
DeleteSelectionCommand does not handle correctly deletion with two consecutive BR element.
https://bugs.webkit.org/show_bug.cgi?id=118457
<rdar://problem/14160912>
Reviewed by Simon Fraser.
In DeleteSelectionCommand::handleSpecialCareBRDelete we did not
handle correctly the case where we had <br><br> in the markup and
nothing was being deleted. We should consider this like
the case where the <br> is on the line by itself and remove it.
Test: editing/deleting/delete-image-followed-by-two-br.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete):
2013-07-08 Radu Stavila <stavila@adobe.com>
NamedFlowCollection getters should return undefined when there's no NamedFlow
https://bugs.webkit.org/show_bug.cgi?id=118463
Reviewed by Christophe Dumez.
Added new TreatReturnedNullObjectAs attribute for generated methods and set it to Undefined
for the item and namedItem methods of DOMNamedFlowCollection.
Test: fast/regions/webkit-named-flow-collection-undefined.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementationFunctionCall):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::treatReturnedNullObjectAsUndefined):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_treat_returned_null_object_as_undefined):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionTreatReturnedNullObjectAsUndefined):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj treatReturnedNullObjectAsUndefined]):
* bindings/scripts/test/TestObj.idl:
* dom/DOMNamedFlowCollection.idl:
2013-07-06 Changhun Kang <temoochin@company100.net>
Remove unused variables in FocusCandidate.
https://bugs.webkit.org/show_bug.cgi?id=118449
Reviewed by Antonio Gomes.
The variables for parent in FocusCandidate are not used anymore.
No new tests. No change in behavior.
* page/SpatialNavigation.cpp:
(WebCore::FocusCandidate::FocusCandidate):
* page/SpatialNavigation.h:
(WebCore::FocusCandidate::FocusCandidate):
2013-07-08 Chris Fleizach <cfleizach@apple.com>
AX: iOS: SVG paths are not offset by the parent bounding box
https://bugs.webkit.org/show_bug.cgi?id=118433
The path for SVG shapes is in terms of its parent's view space. We need to offset
the path by that amount so that it's in the right location.
Reviewed by Tim Horton.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::elementPath):
2013-07-08 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Add missing header files.
2013-07-08 Ruth Fong <ruth_fong@apple.com>
Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
https://bugs.webkit.org/show_bug.cgi?id=117815
<rdar://problem/14211041>
Reviewed by Eric Carlson.
Merge https://src.chromium.org/viewvc/blink?revision=153206&view=revision
No new tests, only behavior change is preventing a crash in the release build.
cueIndex() is only used for sorting cues, so returning an invalidCueIndex in the case
where track()->cues() is null makes sense and won't modify behavior.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::cueIndex):
2013-07-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152416.
http://trac.webkit.org/changeset/152416
https://bugs.webkit.org/show_bug.cgi?id=118476
Wrong fix for the bug (Requested by ap on #webkit).
* platform/text/TextEncodingRegistry.cpp:
(WebCore::newTextCodec):
2013-07-08 Andreas Kling <akling@apple.com>
REGRESSION(r125294): A style rule with more than 8192 selectors can cause style corruption.
<http://webkit.org/b/118369>
<rdar://problem/14291428>
Reviewed by Antti Koivisto.
Add a semi-hard cap of 8192 selectors per CSS rule. Rules with longer selector lists will be split into
multiple rules (with 8192 selectors per rule.) The style properties are shared behind the scenes
so it's all pretty efficient.
This does generate a different CSSOM for gigantic selector lists, I've added a test to document this.
Note that setting CSSStyleRule.selectorText with over 8192 selectors will now fail, the splitting into
multiple rules only happens when parsing full style sheets.
Test: fast/css/rule-selector-overflow.html
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::selectorCount):
Add a helper to count the number of selectors in a list (not the number of raw selector components.)
* css/RuleSet.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::setSelectorText):
Add RuleData::maximumSelectorCount constant and cap CSSStyleRule.selectorText to that many selectors.
* css/CSSSelectorList.h:
(WebCore::CSSSelectorList::adoptSelectorArray):
* css/StyleRule.cpp:
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorCount):
* css/StyleRule.h:
(WebCore::StyleRule::parserAdoptSelectorArray):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parserAppendRule):
The meat of this change. Split rules with >8K selectors into multiple rules with 8K selectors in each.
* css/StyleRule.h:
(WebCore::toStyleRule):
Added a toStyleRule() helper for good measure.
2013-07-08 Christophe Dumez <ch.dumez@sisa.samsung.com>
Introduce DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER() macro
https://bugs.webkit.org/show_bug.cgi?id=118408
Reviewed by Philip Rogers.
Split DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER() macro into separate
DECLARE and DEFINE macros to reduce the number of header includes in
SVG.
No new tests, no behavior change.
* dom/EventTarget.h:
* svg/SVGElementInstance.cpp:
(WebCore::SVGElementInstance::create):
(WebCore::SVGElementInstance::toNode):
(WebCore::SVGElementInstance::ownerDocument):
* svg/SVGElementInstance.h:
2013-07-08 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Rename variables in UpdateAtlas
https://bugs.webkit.org/show_bug.cgi?id=118403
Reviewed by Noam Rosenthal.
As of r149292, non-composited contents layer was removed from
CoordinatedGraphics. So, the variables should be renamed for
clarification.
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
2013-07-08 Ádám Kallai <kadam@inf.u-szeged.hu>
[Qt] Incremental build fix after r145712.
https://bugs.webkit.org/show_bug.cgi?id=112576.
Reviewed by Jocelyn Turcotte.
* DerivedSources.pri: Added dependence to INSPECTOR_JSON.
* inspector/front-end/WebKit.qrc: Added missing JS file.
2013-07-08 Kihong Kwon <kihong.kwon@samsung.com>
vibrate function have to return boolean value.
https://bugs.webkit.org/show_bug.cgi?id=118288
Reviewed by Gyuyoung Kim.
According to latest Vibration API which is LC, vibrate() needs to return boolean value
and exception code is removed also. In addition, remove condition for canceling vibration
can be called when visibility state is hidden.
http://www.w3.org/TR/vibration/
No new tests. vibration/navigator-vibration.html is changed.
* Modules/vibration/NavigatorVibration.cpp:
(WebCore::NavigatorVibration::vibrate):
* Modules/vibration/NavigatorVibration.h:
* Modules/vibration/NavigatorVibration.idl:
* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::vibrate):
* Modules/vibration/Vibration.h:
2013-07-07 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLTableElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118393
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLTableElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
(WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
(WebCore::AccessibilityTable::title):
* accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
(webkitAccessibleTableGetCaption):
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetDescription):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* dom/Position.cpp:
(WebCore::endsOfNodeAreVisuallyDistinctPositions):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::handleGeneralDelete):
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::doApply):
* editing/htmlediting.cpp:
(WebCore::isNonTableCellHTMLBlockElement):
* editing/markup.cpp:
(WebCore::ancestorToRetainStructureAndAppearanceForBlock):
* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLTableElement.h:
(WebCore::isHTMLTableElement):
(WebCore::toHTMLTableElement):
* html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::findParentTable):
* html/HTMLTableRowElement.cpp:
(WebCore::HTMLTableRowElement::rowIndex):
* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
(WebCore::HTMLTableRowsCollection::virtualItemAfter):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isScopeMarker):
(WebCore::HTMLNames::isTableScopeMarker):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
(WebCore::HTMLTreeBuilder::processCharacterBuffer):
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _computedStringForNode:property:]):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetParent):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2013-07-06 Rob Buis <rbuis@rim.com>
createElement("image") creates an HTMLImageElement, although this hack should exist in parser only
https://bugs.webkit.org/show_bug.cgi?id=88360
Reviewed by Sam Weinig.
Create a HTMLElement when using createElement('image'), but keep the HTML5 parser constructing HTMLImageelement for it.
* html/HTMLTagNames.in:
2013-07-06 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop hardcoding interfaces that have indexed getters returning strings
https://bugs.webkit.org/show_bug.cgi?id=118414
Reviewed by Kentaro Hara.
Stop hardcoding the names of interfaces that have indexed getters returning
strings in the bindings generator. Now that we use the latest Web IDL indexed
getter, more information is provided in the IDL files and the generator is
able to figure out if the indexed getter is returning a DOMString on its own.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
2013-07-05 Tim Horton <timothy_horton@apple.com>
Tons of crashes on bots after r152425
https://bugs.webkit.org/show_bug.cgi?id=118440
<rdar://problem/14366772>
Reviewed by Sam Weinig.
Null-check the frame's page and early return. It's OK to do this
because it only happens when we're being torn down.
* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
2013-07-05 Tim Horton <timothy_horton@apple.com>
Fix r152265: FrameView's pagination mode is only one of two, and the logic was totally wrong
https://bugs.webkit.org/show_bug.cgi?id=118439
<rdar://problem/14366120>
Reviewed by Anders Carlsson.
* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
- Test both Page and FrameView's pagination modes.
- *Don't* clamp negatives to zero if we are paginated with scroll offset set,
like the original changelog claimed, but the code did the opposite.
- Don't clamp in *all* pagination modes; with 'direction: RTL' it's still possible
to have a negative maximum position in LTR/TB pagination modes.
2013-07-05 Sam Weinig <sam@webkit.org>
WKPageFindStringMatches with kWKFindOptionsBackwards still doesn't work
<rdar://problem/13881024>
https://bugs.webkit.org/show_bug.cgi?id=118436
Reviewed by Tim Horton.
* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges):
- When searching backwards, use END_TO_START rather than START_TO_END.
- If there is no selection and we are searching backwards, we now select the last item,
not the first.
2013-07-05 Tullio Lucena <tullio.lucena@openbossa.org>
Nix upstreaming - Adding Nix render theme files
https://bugs.webkit.org/show_bug.cgi?id=118368
Reviewed by Benjamin Poulain.
All files related to render theme stuff.
No new tests. They will be uploaded on another patch during the upstreaming process.
* platform/nix/RenderThemeNix.cpp: Added.
* platform/nix/RenderThemeNix.h: Added.
* platform/nix/ScrollbarThemeNix.cpp: Added.
* platform/nix/ScrollbarThemeNix.h: Added.
2013-07-05 Brent Fulgham <bfulgham@apple.com>
[Windows] Identify OS-level at build-time.
https://bugs.webkit.org/show_bug.cgi?id=118428
Reviewed by Anders Carlsson.
* DerivedSources.make: Activate legible output features if present.
* WebCorePrefix.h: Activate MSVC 2010 workarounds for CGFloat if
building with VS2010.
* config.h: Activate legible output features if present.
2013-07-05 Tim Horton <timothy_horton@apple.com>
[wk2] Add API to lock the scroll position at the top or bottom of the page
https://bugs.webkit.org/show_bug.cgi?id=118429
<rdar://problem/14120323>
Reviewed by Anders Carlsson.
Test (API): WebKit2.ScrollPinningBehaviors
* WebCore.exp.in:
Expose FrameView::setScrollPinningBehavior.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Our pinning behavior should be DoNotPin by default.
* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
Fix the minimum scroll position's vertical location to the maximum if
we're pinned to the bottom, and vice-versa if we're pinned to the top.
(WebCore::FrameView::setScrollPinningBehavior): Added.
If scroll pinning behavior has changed, inform ScrollingCoordinator
and update scrollbars (which will also re-pin the scroll position).
* page/FrameView.h:
Override minimumScrollPosition, add setScrollPinningBehavior,
and storage for m_scrollPinningBehavior.
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::setScrollPinningBehavior): Added.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
Our pinning behavior should be DoNotPin by default.
(WebCore::ScrollingTree::setScrollPinningBehavior):
(WebCore::ScrollingTree::scrollPinningBehavior):
Getter/setter for m_scrollPinningBehavior, scrolling-thread-safe.
* page/scrolling/ScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::setScrollPinningBehavior):
Inform ScrollingTree of the scroll pinning behavior change.
* platform/ScrollTypes.h:
Add ScrollPinningBehavior enum.
2013-07-05 Zalan Bujtas <zalan@apple.com>
iframe constrained by max-width in full screen
https://bugs.webkit.org/show_bug.cgi?id=118250
Reviewed by Antti Koivisto.
Ensure that contents inside iframe can go full screen properly.
Set max-width and max-height values to the default 'none', so that iframes are not
constrained when entering full screen.
Test: fullscreen/full-screen-iframe-with-max-width-height.html
* css/fullscreen.css:
(iframe:-webkit-full-screen):
2013-07-05 Eric Carlson <eric.carlson@apple.com>
[Mac] .webkitClosedCaptionsVisible doesn't work with "Automatic" caption mode
https://bugs.webkit.org/show_bug.cgi?id=118319
Reviewed by Jer Noble.
Track when captions are enabled with the old 'webkitClosedCaptionsVisible' attribute and
consider that when determining which track should be enabled.
Test: media/track/track-legacyapi-with-automatic-mode.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_webkitLegacyClosedCaptionOverride.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Set m_webkitLegacyClosedCaptionOverride.
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Return m_webkitLegacyClosedCaptionOverride.
* html/HTMLMediaElement.h:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Don't apply "automatic"
logic when captions were enabled with .webkitClosedCaptionsVisible.
2013-07-05 Benjamin Dupont <bdupont@nds.com>
Segmentation fault occurred when ICU data library doesn't embed the expected encoding.
https://bugs.webkit.org/show_bug.cgi?id=118410
Reviewed by Allan Sandfeld Jensen.
* platform/text/TextEncodingRegistry.cpp:
(WebCore::newTextCodec):
2013-07-05 Denis Nomiyama <d.nomiyama@samsung.com>
[GTK] fast/text/font-kerning.html fails
https://bugs.webkit.org/show_bug.cgi?id=76048
Reviewed by Martin Robinson.
Added kerning to the list of features for hb_shade() according to FontDescription::kerning().
Removed font-kerning.html from gtk/TestExpectations, which was failing before this fix.
* platform/graphics/harfbuzz/HarfBuzzFace.cpp:
(WebCore):
* platform/graphics/harfbuzz/HarfBuzzFace.h:
(HarfBuzzFace):
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::setFontFeatures):
2013-07-05 Gwang Yoon Hwang <ryumiel@company100.net>
Build fix GTK after r152404.
https://bugs.webkit.org/show_bug.cgi?id=118407
Reviewed by Christophe Dumez.
* GNUmakefile.list.am:
2013-07-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Have SVGTextContentElement inherit SVGGraphicsElement
https://bugs.webkit.org/show_bug.cgi?id=118351
Reviewed by Dirk Schulze.
Have SVGTextContentElement inherit SVGGraphicsElement instead of
SVGStyledElement in order to match the latest SVG2 specification:
https://svgwg.org/svg2-draft/text.html#InterfaceSVGTextContentElement
This patch also removes the SVGTransformable and SVGLocatable IDL
interfaces as they are no longer needed (were merged into
SVGGraphicsElement in the latest specification).
This is one step towards getting rid of multiple inheritance in
SVG, and complying with the latest SVG2 specification.
No new tests, covered by existing tests.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* bindings/scripts/CodeGeneratorObjC.pm:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
* svg/SVGLocatable.idl: Removed.
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::SVGTextContentElement):
(WebCore::SVGTextContentElement::isSupportedAttribute):
(WebCore::SVGTextContentElement::isPresentationAttribute):
(WebCore::SVGTextContentElement::collectStyleForPresentationAttribute):
(WebCore::SVGTextContentElement::parseAttribute):
(WebCore::SVGTextContentElement::svgAttributeChanged):
* svg/SVGTextContentElement.h:
* svg/SVGTextContentElement.idl:
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::SVGTextElement):
(WebCore::SVGTextElement::animatedLocalTransform):
* svg/SVGTextElement.h:
* svg/SVGTextElement.idl:
* svg/SVGTransformable.idl: Removed.
2013-07-03 Gavin Barraclough <barraclough@apple.com>
Remove PageThrottler::m_activeThrottleBlockers
https://bugs.webkit.org/show_bug.cgi?id=118375
Reviewed by Mark Rowe.
This is simply m_activityTokens.size().
Also, fold preventThrottling into addActivityToken & allowThrottling into removeActivityToken
(these should no longer be called directly, and should not be public).
* page/PageThrottler.cpp:
(WebCore::PageThrottler::PageThrottler):
- removed m_activeThrottleBlockers
(WebCore::PageThrottler::startThrottleHysteresisTimer):
- m_activeThrottleBlockers -> m_activityTokens.size()
(WebCore::PageThrottler::throttleHysteresisTimerFired):
- m_activeThrottleBlockers -> m_activityTokens.size()
(WebCore::PageThrottler::addActivityToken):
- added functionality from preventThrottling
(WebCore::PageThrottler::removeActivityToken):
- added functionality from allowThrottling
* page/PageThrottler.h:
- removed preventThrottling, allowThrottling, and m_activeThrottleBlockers.
2013-07-01 Antti Koivisto <antti@apple.com>
Take document height into account when determining when it is considered visually non-empy
https://bugs.webkit.org/show_bug.cgi?id=118272
Reviewed by Darin Adler.
The current visually non-empy mechanism takes into account only the amount of contents in renderers.
Add a simple layout dependency so that we don't consider page non-empty until the document height
exceed a (low) height threshold (or the load completes).
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
Don't send layout callbacks until we have actually some content.
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
(WebCore::FrameView::updateIsVisuallyNonEmpty):
Factor into functions.
* page/FrameView.h:
(WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount):
(WebCore::FrameView::incrementVisuallyNonEmptyPixelCount):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::RenderEmbeddedObject):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
The size is not known but the estimate provided here is always bigger than the threshold so
the functionality is unchanged.
2013-07-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix after r152399.
Add missing header include for SVGNames.h.
* svg/SVGImageElement.h:
2013-07-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Change static_cast<SVGImageElement*> with toSVGImageElement
https://bugs.webkit.org/show_bug.cgi?id=118387
Reviewed by Andreas Kling.
As a step to change static_cast with toXXX, static_cast<SVGImageElement*> can
be changed with toSVGImageElement().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153557
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::updateImageViewport):
(WebCore::RenderSVGImage::layout):
(WebCore::RenderSVGImage::paintForeground):
* svg/SVGImageElement.h:
(WebCore::toSVGImageElement):
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::dispatchLoadEvent):
2013-07-04 Brian Holt <brian.holt@samsung.com>
[GTK] Leak: Free PangoFontDescription* in RenderThemeGtk3
https://bugs.webkit.org/show_bug.cgi?id=118386
Reviewed by Carlos Garcia Campos.
Free PangoFontDescription* allocated by gtk_style_context_get (transfer full).
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::spinButtonArrowSize):
2013-07-04 Brian Holt <brian.holt@samsung.com>
[ATK] Leak: AtkAttributeSet* should be freed
https://bugs.webkit.org/show_bug.cgi?id=118307
Reviewed by Christophe Dumez.
Use AtkAttributeSet* instead of GSList*.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetObjectLocale):
2013-07-04 Mario Sanchez Prada <mario.prada@samsung.com>
[ATK] Do not expose '\n' for wrapped lines with ATK_TEXT_BOUNDARY_CHAR
https://bugs.webkit.org/show_bug.cgi?id=118359
Reviewed by Carlos Garcia Campos.
Do not expose a '\n' character for every visual line break.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetChar): Removed wrong code.
2013-07-04 Patrick Gansterer <paroga@webkit.org>
Port FileSystemWin.cpp to WinCE
https://bugs.webkit.org/show_bug.cgi?id=117935
Reviewed by Brent Fulgham.
Add #if !OS(WINCE) around a few lines of the code, so it can be used by the WinCE port too.
* PlatformWinCE.cmake:
* platform/win/FileSystemWin.cpp:
(WebCore::storageDirectory):
* platform/wince/FileSystemWinCE.cpp: Removed.
2013-07-04 Balazs Kelemen <b.kelemen@samsung.com>
[GStreamer] support preload="metadata"
https://bugs.webkit.org/show_bug.cgi?id=116817
Reviewed by Eric Carlson.
Add appropriate behavior for preload="metadata". Delay enabling download buffering
until playback is started in this case. This behavior fits with the standard quite
well and this is the most exact match we can get (at least without adding too much
extra complexity). What matters mostly is that we can avoid loading the media
before playback but we have the first frame and the metadata.
Test: media/video-load-preload-metadata.html
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Set |m_preload| to |Auto|
so we will start download buffering if we did not start it yet.
(WebCore::MediaPlayerPrivateGStreamer::play): Ditto.
(MediaPlayerPrivateGStreamer::setDownloadBuffering): Only start download
buffering if |m_preload == Auto|. Also make sure we don't clear the download
flag once we started downloading because it would result in not well defined
behavior and it does not really makes sense.
(MediaPlayerPrivateGStreamer::setPreload): Set download buffering accordingly.
2013-07-03 Jae Hyun Park <jae.park@company100.net>
[Coordinated Graphics] Don't use && operator in ASSERT
https://bugs.webkit.org/show_bug.cgi?id=118377
Reviewed by Noam Rosenthal.
We don't use && opeartor in ASSERT because it's impossible to know which
condition caused the assertion.
* platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
(WebCore::CoordinatedBackingStoreTile::swapBuffers):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
2013-07-03 KyungTae Kim <ktf.kim@samsung.com>
[EFL] Support some more editing keyboard events
https://bugs.webkit.org/show_bug.cgi?id=118346
Reviewed by Gyuyoung Kim.
For editable contents, support the shortcuts for copy, page, cut, select all, undo and redo.
* platform/efl/EflKeyboardUtilities.cpp:
2013-07-03 Chris Fleizach <cfleizach@apple.com>
AX: Items the img aria role aren't inserting an object replacement character
https://bugs.webkit.org/show_bug.cgi?id=118259
Reviewed by Tim Horton.
VoiceOver relies on object replacement characters being emitted when asking for selected text.
This has worked if a real <img> is used, but if role="img" is used on a <div>, for example,
no emission is performed, which leads to missed elements in text.
Test: platform/mac/accessibility/aria-image-emits-object-replacement.html
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
(WebCore::TextIterator::advance):
2013-07-03 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLMapElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118235
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLMapElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getImageMap):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::imageElement):
* html/HTMLMapElement.h:
(WebCore::isHTMLMapElement):
(WebCore::toHTMLMapElement):
2013-07-03 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r15283.
* WebCorePrefix.h: Remove include directive for CGFloat.h, as it
is not present in all Windows build environments.
2013-07-03 Brent Fulgham <bfulgham@apple.com>
[Windows] Exclude unsupported QuartzCore Features.
https://bugs.webkit.org/show_bug.cgi?id=118374
Reviewed by Anders Carlsson.
* WebCore.vcxproj/WebCoreCG.props: Exclude a few non-Windows
concepts from the QuartzCore headers.
2013-07-03 Gavin Barraclough <barraclough@apple.com>
Simplify PageThrottler ownership.
https://bugs.webkit.org/show_bug.cgi?id=118372
Reviewed by Sam Weinig.
* page/Page.cpp:
(WebCore::Page::~Page):
- 'clearPage' method removed - just clear the own pointer.
* page/Page.h:
- make m_pageThrottler an OwnPtr.
* page/PageThrottler.cpp:
(WebCore::PageThrottler::~PageThrottler):
- moved 'setThrottled(false)' from 'clearPage' (removed).
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
- no need to check 'm_page'
* page/PageThrottler.h:
(WebCore::PageThrottler::create):
- create a PassOwnPtr, not PassRefPtr.
2013-07-03 Brent Fulgham <bfulgham@apple.com>
[Windows] Updates to support changes in CoreGraphics libraries.
https://bugs.webkit.org/show_bug.cgi?id=118373
Reviewed by Anders Carlsson.
* WebCorePrefix.h: Include definitions for isnan/round/roundf for versions of
Visual Studio that do not provide them natively.
2013-07-03 Gordon Sheridan <gordon_sheridan@apple.com>
Implement mechanism to detect (partially) hidden blocked plugins.
https://bugs.webkit.org/show_bug.cgi?id=117998
Reviewed by Dean Jackson.
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::replacementTextRect):
Added private method for calculating the size of the replacement text for blocked plugins.
(WebCore::RenderEmbeddedObject::isReplacementObscured):
Added public method to determine if the EMBED element used for a blocked plugin is inaccessible to the user.
* rendering/RenderEmbeddedObject.h:
Declare the two new methods mentioned above.
* WebCore.exp.in:
Export RenderEmbeddedObject::isReplacementObscured().
2013-07-03 Jessie Berlin <jberlin@apple.com>
Speculative build fix after r152340.
* WebCore.exp.in:
2013-07-03 Kangil Han <kangil.han@samsung.com>
Append overloading function for isFooElement
https://bugs.webkit.org/show_bug.cgi?id=118334
Reviewed by Antti Koivisto.
Node::hasTagName needs additional isElementNode() check when it is triggered.
So conversion from Element* to Node* in isFooElement should be avoided.
Therefore, to support both Node* and Element* as an argument of isFooElement,
this patch appends overloading inline function.
* css/CSSStyleSheet.cpp:
(WebCore::isAcceptableCSSStyleSheetParent):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::scopeFor):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
* html/HTMLAudioElement.h:
(WebCore::isHTMLAudioElement):
* html/HTMLFormElement.h:
(WebCore::isHTMLFormElement):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::toHTMLStyleElement):
* html/HTMLTextAreaElement.h:
(WebCore::isHTMLTextAreaElement):
2013-07-03 Balazs Kelemen <b.kelemen@samsung.com>
Gif: zero filling should use memset instead of setRGBA for every pixel
https://bugs.webkit.org/show_bug.cgi?id=118350
Reviewed by Allan Sandfeld Jensen.
No new tests. Actually it is not covered by existing tests. Surprisingly we haven't got pixel
tests for animated images. Given that this patch is pretty trivial I don't think it's worth the
cost to start introducing such tests.
I added a manual test: animated-gif-dispose-background.html.
GIFImageDecoder::initializeFrameBuffer use a loop to fill a subrect with tranparent pixels.
This is extremely ineffecient. The use case for this code path is not frequent on the web
but it's still better to fix it.
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageFrame::zeroFillFrameRect):
* platform/image-decoders/ImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::initFrameBuffer):
Fixed indentation in addition.
2013-07-03 Przemyslaw Szymanski <p.szymanski3@samsung.com>
TextureUnit code optimization
https://bugs.webkit.org/show_bug.cgi?id=117868
Reviewed by Noam Rosenthal.
According to OpenGL ES 2.0 specification it is not possible to use both
texture2D and textureCubeMap in one texture unit.
This patch reduces amount of code, slightly increases rendering performance
and makes WebKit more consistent with OpenGL.
No new tests. Covered by existing tests:
LayoutTests/webgl/conformance/textures/tex-image-webgl.html
LayoutTests/webgl/conformance/textures/texture-complete.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::~WebGLRenderingContext):
(WebCore::WebGLRenderingContext::reshape):
(WebCore::WebGLRenderingContext::bindTexture):
(WebCore::WebGLRenderingContext::deleteTexture):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::handleNPOTTextures):
(WebCore::WebGLRenderingContext::validateTextureBinding):
(WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
* html/canvas/WebGLRenderingContext.h:
2013-07-03 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG
https://bugs.webkit.org/show_bug.cgi?id=118305
Reviewed by Kentaro Hara.
Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG and use
Web IDL implements instead to get rid of multiple inheritance and
follow the latest specification:
- http://www.w3.org/TR/filter-effects/#DOMInterfaces
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* svg/SVGFEBlendElement.idl:
* svg/SVGFEColorMatrixElement.idl:
* svg/SVGFEComponentTransferElement.idl:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEConvolveMatrixElement.idl:
* svg/SVGFEDiffuseLightingElement.idl:
* svg/SVGFEDisplacementMapElement.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEFloodElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFEMergeElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFEOffsetElement.idl:
* svg/SVGFESpecularLightingElement.idl:
* svg/SVGFETileElement.idl:
* svg/SVGFETurbulenceElement.idl:
2013-07-03 Zalan Bujtas <zalan@apple.com>
H&R Block 2010 Help window can not be reopened.
https://bugs.webkit.org/show_bug.cgi?id=118342
Reviewed by Antti Koivisto.
http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
only the opener can (re)focus() a particular window.
H&R Block app relies on the relaxed window.focus() rules.
* WebCore.exp.in:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsHRBlock):
* platform/RuntimeApplicationChecks.h:
2013-07-03 Zan Dobersek <zdobersek@igalia.com>
Further build fixing for build configurations that disable CSS regions support.
* dom/PseudoElement.h: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
2013-07-03 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix after r152320 and r152345 for build configurations that enable
SVG support but disable CSS regions support.
* svg/SVGElement.cpp: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
* svg/SVGElement.h: Ditto.
2013-07-03 Radu Stavila <stavila@adobe.com>
[CSS Regions] Improve implementation of elements in region being flowed to another flow thread
https://bugs.webkit.org/show_bug.cgi?id=118300
Based on patch by Zoltán Árvai <zarvai@inf.u-szeged.hu>
Reviewed by Csaba Osztrogonác.
Fixed CSS_REGIONS guard.
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2013-07-03 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move SVGTests attributes parsing to SVGGraphicsElement
https://bugs.webkit.org/show_bug.cgi?id=118292
Reviewed by Darin Adler.
Move SVGTests attributes parsing to SVGGraphicsElement instead of doing
this in each of its subclasses. SVGGraphicsElement is now the one
subclassing SVGTests after r152167.
No new tests, no behavior change.
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isSupportedAttribute):
(WebCore::SVGAElement::parseAttribute):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute):
(WebCore::SVGCircleElement::parseAttribute):
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::isSupportedAttribute):
(WebCore::SVGClipPathElement::parseAttribute):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::isSupportedAttribute):
(WebCore::SVGEllipseElement::parseAttribute):
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
(WebCore::SVGForeignObjectElement::parseAttribute):
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::isSupportedAttribute):
(WebCore::SVGGElement::parseAttribute):
(WebCore::SVGGElement::svgAttributeChanged):
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::isSupportedAttribute):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
(WebCore::SVGImageElement::parseAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
(WebCore::SVGLineElement::parseAttribute):
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::isSupportedAttribute):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::isSupportedAttribute):
(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::isSupportedAttribute):
(WebCore::SVGRectElement::parseAttribute):
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::svgAttributeChanged): Fall back to calling
SVGGraphicsElement::svgAttributeChanged() instead of
SVGStyledElement::svgAttributeChanged() as SVGGraphicsElement is the
parent class and it takes care of parsing SVGTests attributes now.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::isSupportedAttribute):
(WebCore::SVGUseElement::parseAttribute):
(WebCore::SVGUseElement::svgAttributeChanged):
2013-07-02 Ryosuke Niwa <rniwa@webkit.org>
Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
https://bugs.webkit.org/show_bug.cgi?id=118299
Reviewed by Andreas Kling.
Did cleanups.
* dom/QualifiedName.cpp:
(WebCore::qualifiedNameCache): Added to wrap gNameCache.
(WebCore::QualifiedName::QualifiedName):
(WebCore::QualifiedName::QualifiedNameImpl::~QualifiedNameImpl):
(WebCore::QualifiedName::toString): Use early exit and StringBuilder.
(WebCore::QualifiedName::init): Use early exit.
2013-07-02 Simon Fraser <simon.fraser@apple.com>
Don't set z-index: 0 on lots of elements with -webkit-overflow-scrolling: touch
https://bugs.webkit.org/show_bug.cgi?id=118337
Reviewed by Benjamin Poulain.
-webkit-overflow-scrolling: touch is an inherited property that, on iOS, controls
the behavior of overflow scrolling content, and causes overflow scrolling elements
to become CSS stacking contexts.
However, the code was too aggressive in setting style->setZIndex(0), doing so
for any element with overflow != hidden. Since the default for overflow is visible,
that meant almost every element.
Previously, this didn't really matter. However, since r125693, any renderer with non-auto
z-index gets a RenderLayer, and that RenderLayer will become a stacking context. The result
was too many RenderLayers and incorrect stacking context behavior.
Fix by ensuring that -webkit-overflow-scrolling: touch only affects elements which
are actually scrollable.
Also move the code that does this to below the code that adjust overflow style
for different elements.
* css/StyleResolver.cpp:
(WebCore::isScrollableOverflow):
(WebCore::StyleResolver::adjustRenderStyle):
2013-07-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152318.
http://trac.webkit.org/changeset/152318
https://bugs.webkit.org/show_bug.cgi?id=118333
This patch broke media/track/track-automatic-subtitles.html on
Mac (Requested by dfarler on #webkit).
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
2013-07-02 Ruth Fong <ruth_fong@apple.com>
Change event should not be dispatched by clicking a scrollbar of select listbox
https://bugs.webkit.org/show_bug.cgi?id=118019
<rdar://problem/14297760>
Reviewed by Dean Jackson.
Test: fast/forms/select/listbox-click-on-scrollbar.html
Merge the following:
http://src.chromium.org/viewvc/blink?view=revision&revision=151689
https://chromium.googlesource.com/chromium/blink/+/492549b0fcaa58a85aa0797446b62985a263704f
Previously, a select element with the multiple attribute would dispatch
an onChanged event when the scrollbar is clicked. This patch corrects this
issue by only calling listBoxOnChange(), which fires the onChanged event,
when an actual option is clicked.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childrenChanged): Updated to clear the list
of selected items when when an <option> element is added to/deleted from its <select> element.
(Without this addition, if a option was selected, and then JavaScript was used to modify
the <select> element, and then the scrollbar was clicked, an onChanged event would fire
because it remembers the previously selected option.)
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Updated to
only call listBoxOnChange() if at least one option is selected.
2013-07-02 Alex Christensen <achristensen@apple.com>
Preparing Windows WebGL build system.
https://bugs.webkit.org/show_bug.cgi?id=118325
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added EGL files, removed unused GraphicsContext3DOpenGL.cpp.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added EGL filter and files, removed unused GraphicsContext3DOpenGL.cpp.
2013-07-02 Jessie Berlin <jberlin@apple.com>
The callback for WKPageGetPlugInInformation needs info about whether or not there are any
non-playing instances of the plug-in on the page
https://bugs.webkit.org/show_bug.cgi?id=118330
Reviewed by Anders Carlsson.
* WebCore.exp.in:
Expose a symbol so it can be used in WebKit2.
2013-07-02 Alex Christensen <achristensen@apple.com>
Added getProcAddress implementation for Windows in OpenGLShims.
https://bugs.webkit.org/show_bug.cgi?id=118312
Reviewed by Brent Fulgham.
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress): Added for Windows.
2013-07-02 Jer Noble <jer.noble@apple.com>
media/unsupported-rtsp.html is failing
https://bugs.webkit.org/show_bug.cgi?id=118327
Reviewed by Eric Carlson.
Fixes the media/unsupported-rtsp.html test.
Set the contentType field of contentInformationRequest in order to trigger AVFoundation to
notice that loading failed and generate an error.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::notifyFinished):
2013-07-02 Alex Christensen <achristensen@apple.com>
Fixed compile error in non-X11 platforms using EGL.
https://bugs.webkit.org/show_bug.cgi?id=118323
Reviewed by Brent Fulgham.
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createPixmapContext): Put all X11-specific code into #if PLATFORM(X11).
2013-07-02 Radu Stavila <stavila@adobe.com>
[CSS Regions] Improve implementation of elements in region being flowed to another flow thread
https://bugs.webkit.org/show_bug.cgi?id=118300
Reviewed by David Hyatt.
Methods that must be const have been turned back into const. Code has been better organized.
Performance is better. Tests have been added to.
* dom/Element.cpp:
(WebCore::Element::detach):
(WebCore::Element::setIsInsideRegion):
(WebCore::Element::isInsideRegion):
(WebCore::Element::shouldMoveToFlowThread):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::isInsideRegion):
(WebCore::ElementRareData::setIsInsideRegion):
(WebCore::ElementRareData::ElementRareData):
* dom/Node.cpp:
(WebCore::Node::isRegisteredWithNamedFlow):
* dom/Node.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::parentRenderer):
(WebCore::NodeRenderingContext::shouldCreateRenderer):
(WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
(WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
* dom/NodeRenderingContext.h:
* dom/PseudoElement.h:
* dom/Text.cpp:
(WebCore::Text::textRendererIsNeeded):
* dom/Text.h:
* rendering/FlowThreadController.cpp:
(WebCore::FlowThreadController::unregisterNamedFlowContentNode):
(WebCore::FlowThreadController::isContentNodeRegisteredWithAnyNamedFlow):
* rendering/FlowThreadController.h:
* rendering/RenderObject.h:
* rendering/RenderRegion.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::shouldMoveToFlowThread):
* svg/SVGElement.h:
2013-07-02 Eric Carlson <eric.carlson@apple.com>
[Mac] .webkitClosedCaptionsVisible doesn't work with "Automatic" caption mode
https://bugs.webkit.org/show_bug.cgi?id=118319
Reviewed by Darin Adler.
Test: media/track/track-legacyapi-with-automatic-mode.html
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Don't apply "automatic"
logic when captions were enabled with .webkitClosedCaptionsVisible.
2013-07-02 Anders Carlsson <andersca@apple.com>
Always flip the coordinate system before drawing NSViews from Widget::paint
https://bugs.webkit.org/show_bug.cgi?id=118318
<rdar://problem/13895483>
Reviewed by Beth Dakin.
Undo the change that would not flip on 10.9; turns out the bug was in AppKit. Also remove the
_hasCanDrawSubviewsIntoLayerOrAncestor workaround since drawing works correctly now.
Also, pass flipped:NO when creating the NSGraphicsContext to indicate that the graphics context
is unflipped as far as AppKit knows (since we flipped it earlier).
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-06-26 Robert Hogan <robert@webkit.org>
empty inlines should not affect line-wrapping
https://bugs.webkit.org/show_bug.cgi?id=25638
Reviewed by David Hyatt.
Don't break on empty inlines if we're in the middle of a word. I took this opportunity to
refactor the series of checks we perform to establish if we can break at the current position.
Test: fast/text/whitespace/inline-whitespace-wrapping-11.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::textBeginsWithBreakablePosition):
(WebCore::canBreakAtThisPosition):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-07-02 Jae Hyun Park <jae.park@company100.net>
Implement CoordinatedSurface for Threaded Coordinated Graphics
https://bugs.webkit.org/show_bug.cgi?id=109661
Reviewed by Noam Rosenthal.
This is a preparation patch for Threaded Coordianted Graphics.
This patch implements ThreadSafeCoordinatedSurface using ImageBuffer as a
backend. Also, this patch moves common implementation to CoordinatedSurface to
prevent duplication of code.
* platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:
(WebCore::CoordinatedSurface::CoordinatedSurface):
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
(WebCore::CoordinatedSurface::size):
(WebCore::CoordinatedSurface::flags):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Added.
(WebCore::ThreadSafeCoordinatedSurface::create):
(WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
(WebCore::ThreadSafeCoordinatedSurface::~ThreadSafeCoordinatedSurface):
(WebCore::ThreadSafeCoordinatedSurface::paintToSurface):
(WebCore::ThreadSafeCoordinatedSurface::copyToTexture):
* platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Added.
2013-07-02 Geoffrey Garen <ggaren@apple.com>
plainText() is O(N^2)
https://bugs.webkit.org/show_bug.cgi?id=118282
<rdar://problem/14284360>
Reviewed by Alexey Proskuryakov.
* editing/TextIterator.cpp:
(WebCore::plainText): Linear growth for a vector data type is O(N^2).
Don't do that. Luckily, StringBuilder does the right thing automatically,
so we can just delete code.
2013-07-02 Tim Horton <timothy_horton@apple.com>
constrainScrollPositionForOverhang needs to handle scrollOrigin correctly
https://bugs.webkit.org/show_bug.cgi?id=118176
<rdar://problem/14301271>
Reviewed by Anders Carlsson.
Test: compositing/geometry/fixed-position-flipped-writing-mode.html
WebCore makes use of constrainScrollPositionForOverhang not only for
constraining fixed- and sticky-positioned elements to the viewport, but
also for clamping the tile cache's visible rect.
Therefore, constrainScrollPositionForOverhang needs to correctly take
the scrollOrigin into account. The easiest way I saw to do this was to
reimplement the function in terms of a pair of rect intersections
between a virtual scrollable "viewport" and the document (with a bit
of complication from headers and footers).
The first intersection is performed, then if the viewport doesn't fit,
it is pushed down and to the right, from the origin. Next, we intersect
again, this time pushing the rect up by the amount it overflowed the document
rect from the bottom right. This performs effectively the same constraint
as previously, but handles the scrollOrigin correctly and is also somewhat
easier to read and understand (with pictures).
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
Subtract the scrollOrigin out of the offset passed to scrollOffsetForFixedPosition,
it's expecting an offset without the origin included.
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::constrainScrollPositionForOverhang):
Reimplement the function as described above.
2013-07-02 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove SVGStyledLocatableElement class
https://bugs.webkit.org/show_bug.cgi?id=118283
Reviewed by Dirk Schulze.
Remove SVGStyledLocatableElement class and have SVGGraphicsElement
inherit SVGStyledElement directly instead. SVGStyledLocatableElement
is no longer needed and according to the specification, SVGGraphicsElement
should inherit SVGStyledElement (actually SVGElement once we merge
SVGStyledElement into SVGElement).
No new tests, no behavior change.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* svg/SVGAllInOne.cpp:
* svg/SVGElement.cpp:
(WebCore::SVGElement::getBoundingBox):
* svg/SVGElement.h:
* svg/SVGGraphicsElement.cpp:
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
* svg/SVGGraphicsElement.h:
* svg/SVGLocatable.cpp:
(WebCore::SVGLocatable::getTransformToElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::localCoordinateSpaceTransform):
* svg/SVGStyledLocatableElement.cpp: Removed.
* svg/SVGStyledLocatableElement.h: Removed.
2013-07-02 peavo@outlook.com <peavo@outlook.com>
[Curl] Crash after download.
https://bugs.webkit.org/show_bug.cgi?id=118303
Reviewed by Brent Fulgham.
We need to make sure that the Curl easy handle is removed from the Curl multi handle before it's freed.
* platform/network/curl/CurlDownload.cpp:
(CurlDownloadManager::updateHandleList): Use addToCurl() and removeFromCurl() methods.
(CurlDownloadManager::addToCurl): Add method to add easy handle to multi handle.
(CurlDownloadManager::removeFromCurl): Add method to remove easy handle from multi handle, and then delete the handle.
(CurlDownloadManager::downloadThread): Use removeFromCurl() method.
(CurlDownload::~CurlDownload):
* platform/network/curl/CurlDownload.h: Avoid deleting Curl easy handle in destructor.
2013-07-02 Radu Stavila <stavila@adobe.com>
[CSSRegions] No other SVG elements except the SVGRoot must have RegionInfo objects attached
https://bugs.webkit.org/show_bug.cgi?id=118295
Reviewed by Antti Koivisto.
Only the SVGRoot element can be collected in a named flow. As such, no SVG element below the root should
be attached to a RenderBoxRegionInfo object.
A larger patch's test (https://bugs.webkit.org/show_bug.cgi?id=118300) is failing because of this.
This change will be covered by that test.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderSVGBlock):
* rendering/svg/RenderSVGBlock.h:
2013-07-02 Kangil Han <kangil.han@samsung.com>
is/toHTMLStyleElement should use Element* for its argument
https://bugs.webkit.org/show_bug.cgi?id=118286
Reviewed by Andreas Kling.
To reduce unnecessary call of isElementNode(), this patch replaces argument
of is/toHTMLStyleElement from Node* to Element*. Plus, use Element::hasTagName
in collectActiveStyleSheets function for minor code refactoring since
its cost is cheaper than Node::hasTagName.
* css/CSSStyleSheet.cpp:
(WebCore::isAcceptableCSSStyleSheetParent):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::scopeFor):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::toHTMLStyleElement):
2013-07-02 Ryosuke Niwa <rniwa@webkit.org>
Unexpose EditingPropertiesToInclude in EditingStyle.h after r151772
https://bugs.webkit.org/show_bug.cgi?id=118271
Reviewed by Andreas Kling.
Don't expose EditingPropertiesToInclude in EditingStyle.h and do other cleanups as described below.
No new tests since there should be no behavioral change.
* editing/EditingStyle.cpp:
(WebCore::copyEditingProperties): Use newly defined numAllEditingProperties and numInheritableEditingProperties
instead of a magic number of 2.
(WebCore::copyPropertiesFromComputedStyle): Renamed from editingStyleFromComputedStyle. It now takes ComputedStyleExtractor and
PropertiesToInclude instead of Node* and EditingPropertiesToInclude and handles AllProperties. Also added a helper that takes Node*.
(WebCore::EditingStyle::init): Calls copyPropertiesFromComputedStyle. Unfortunately, we need to special-case EditingPropertiesInEffect
and not set background-color and text-decoration. This is required probably due to a bug elsewhere.
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::extractEditingProperties): Renamed from EditingStyle::removeAllButEditingProperties; takes PropertiesToInclude instead of
EditingPropertiesToInclude since the only caller of this function, EditingStyle::mergeInlineAndImplicitStyleOfElement, was converting
the type.
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
* editing/EditingStyle.h:
2013-07-02 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Introduce toSVGInlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=118289
Reviewed by Andreas Kling.
As a step to change static_cast with toXXX, static_cast<SVGInlineTextBox*> can
be changed with toSVGInlineTextBox().
Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153345
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::positionForPoint):
* rendering/svg/SVGInlineFlowBox.cpp:
(WebCore::SVGInlineFlowBox::paintSelectionBackground):
(WebCore::SVGInlineFlowBox::paint):
(WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
* rendering/svg/SVGInlineTextBox.h:
(WebCore::toSVGInlineTextBox):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGInlineTextBoxes):
* rendering/svg/SVGRootInlineBox.cpp:
(WebCore::SVGRootInlineBox::paint):
(WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
(WebCore::SVGRootInlineBox::layoutChildBoxes):
(WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
2013-07-02 Christophe Dumez <ch.dumez@sisa.samsung.com>
Simplify SVGTextContentElement::elementFromRenderer()
https://bugs.webkit.org/show_bug.cgi?id=118284
Reviewed by Andreas Kling.
Simplify SVGTextContentElement::elementFromRenderer() by leveraging
SVGElement::isTextContent() methods instead of explicitly checking
for tag names.
No new tests, no behavior change.
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::elementFromRenderer):
2013-07-02 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warnings in WebCore/platform/graphics/texmap/TextureMapperGL.cpp
https://bugs.webkit.org/show_bug.cgi?id=118249
Reviewed by Allan Sandfeld Jensen.
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::BitmapTextureGL::updateContents):
2013-07-02 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt][WK1] Support WebGL with EGL on Linux
https://bugs.webkit.org/show_bug.cgi?id=118251
Reviewed by Kenneth Rohde Christiansen.
Let GraphicsContext3D work without a GraphicsSurface.
* Target.pri:
* platform/graphics/OpenGLShims.cpp:
(WebCore::getProcAddress):
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2013-07-02 Catalin Badea <badea@adobe.com>
[CSS-Regions] OverrideLogicalHeight used by both regions and flexbox
https://bugs.webkit.org/show_bug.cgi?id=118057
Reviewed by David Hyatt.
Remove the use of overrideLogicalContentHeight() from regions and
use a local variable instead. The change was needed to avoid
overlapping with flexbox containers.
Test: fast/regions/autoheight-flexbox.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::validateRegions):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::applyBreakAfterContent):
(WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::pageLogicalHeight):
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
(WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag):
(WebCore::RenderRegion::layoutBlock):
(WebCore::RenderRegion::updateLogicalHeight):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::computedAutoHeight):
(WebCore::RenderRegion::setComputedAutoHeight):
(WebCore::RenderRegion::clearComputedAutoHeight):
(WebCore::RenderRegion::hasComputedAutoHeight):
* rendering/RenderView.cpp:
2013-07-01 Alex Christensen <achristensen@apple.com>
Windows should be included in the list of platforms that can use OpenGL ES 2.
https://bugs.webkit.org/show_bug.cgi?id=118264
Reviewed by Dean Jackson.
* platform/graphics/GraphicsContext3D.h: Added PLATFORM(WIN) to platforms using OpenGL ES 2.
2013-07-01 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GTK] Remove unsupported AC backends
https://bugs.webkit.org/show_bug.cgi?id=117362
Reviewed by Martin Robinson.
* GNUmakefile.am:
* GNUmakefile.list.am:
* Source/WebCore/platform/graphics/PlatformLayer.h: Removed mentions of clutter
and the texmap cairo backend.
* platform/graphics/clutter/DrawingBufferClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Removed.
* platform/graphics/clutter/GraphicsContext3DPrivate.h: Removed.
* platform/graphics/clutter/GraphicsLayerActor.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerActor.h: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.cpp: Removed.
* platform/graphics/clutter/GraphicsLayerClutter.h: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.cpp: Removed.
* platform/graphics/clutter/PlatformClutterAnimation.h: Removed.
* platform/graphics/clutter/PlatformClutterLayerClient.h: Removed.
* platform/graphics/clutter/TransformationMatrixClutter.cpp: Removed.
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: Removed cogl
matrix type conversion.
2013-07-01 Alex Christensen <achristensen@apple.com>
DrawingBuffer constructor and destructor were not defined for Windows.
I moved duplicate code from Cairo and Qt to DrawingBuffer.cpp to be used by Qt, Cairo, and Windows.
https://bugs.webkit.org/show_bug.cgi?id=118262
Reviewed by Dean Jackson.
* platform/graphics/cairo/DrawingBufferCairo.cpp: Removed duplicate DrawingBuffer constructor and destructor.
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::DrawingBuffer):
(WebCore::DrawingBuffer::~DrawingBuffer): Moved from Cairo and Qt implementation.
* platform/graphics/gpu/qt/DrawingBufferQt.cpp: Removed duplicate DrawingBuffer constructor and destructor.
2013-07-01 Alex Christensen <achristensen@apple.com>
Fixed unreachable return when GLX or EGL are used with WebGL.
https://bugs.webkit.org/show_bug.cgi?id=118263
Reviewed by Noam Rosenthal.
* platform/graphics/opengl/GLPlatformContext.cpp:
(WebCore::createOffScreenContext): Fixed unreachable return.
2013-07-01 Tim Horton <timothy_horton@apple.com>
Maximum scroll position can be negative in some cases
https://bugs.webkit.org/show_bug.cgi?id=118175
<rdar://problem/14301217>
Reviewed by Anders Carlsson.
Test (API): WebKit2.ResizeReversePaginatedWebView
* page/FrameView.cpp:
(WebCore::FrameView::maximumScrollPosition):
* page/FrameView.h:
Override maximumScrollPosition() in FrameView and don't clamp to zero if
a reverse pagination mode is enabled, as it is possible (and common) to
have a negative maximum scroll position with reverse pagination.
* platform/ScrollView.cpp:
(WebCore::ScrollView::updateScrollbars):
Drive-by adoption of toIntSize().
2013-07-01 Alex Christensen <achristensen@apple.com>
Removed all references to DrawingBuffer methods unused since the removal of Chromium:
DrawingBuffer::prepareBackBuffer,
DrawingBuffer::requiresCopyFromBackToFrontBuffer, and
DrawingBuffer::clearPlatformLayer.
https://bugs.webkit.org/show_bug.cgi?id=118257
Reviewed by Darin Adler.
* platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
(WebCore::DrawingBuffer::platformLayer):
* platform/graphics/cairo/DrawingBufferCairo.cpp:
(WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
* platform/graphics/clutter/DrawingBufferClutter.cpp:
(WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::clear):
* platform/graphics/gpu/DrawingBuffer.h:
* platform/graphics/gpu/mac/DrawingBufferMac.mm:
(WebCore::DrawingBuffer::frontColorBuffer):
* platform/graphics/gpu/qt/DrawingBufferQt.cpp:
(WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
2013-07-01 Jochen Eisinger <jochen@chromium.org>
Remove support for consumable user gestures
https://bugs.webkit.org/show_bug.cgi?id=118247
Reviewed by Geoffrey Garen.
The features was not enabled on any port, and is meanwhile broken, so we
should delete it.
No new tests, just deleting dead code.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeScript):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
* dom/UserGestureIndicator.cpp:
(WebCore::isDefinite):
(WebCore::UserGestureIndicator::UserGestureIndicator):
(WebCore::UserGestureIndicator::~UserGestureIndicator):
* dom/UserGestureIndicator.h:
(WebCore::UserGestureIndicator::processingUserGesture):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorFrontendHost.cpp:
(WebCore::FrontendMenuProvider::contextMenuItemSelected):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::navigate):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::fire):
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledRedirect::fire):
(WebCore::ScheduledRefresh::fire):
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::showModalDialog):
* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/EventHandler.h:
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::toggleMediaFullscreenState):
(WebCore::HitTestResult::enterFullscreenForVideo):
2013-07-01 Frédéric Wang <fred.wang@free.fr>
Add Support for mspace element
https://bugs.webkit.org/show_bug.cgi?id=115610
Reviewed by Chris Fleizach.
This patch adds basic support for the MathML mspace element. This is
important to let people control spacing of mathematical formulas.
Attributes width, height and depth are implemented. For the moment,
only nonnegative width are accepted.
* CMakeLists.txt: add references to the RenderMathMLSpace files.
* GNUmakefile.list.am: ditto.
* Target.pri: ditto.
* WebCore.vcxproj/WebCore.vcxproj: ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.
* css/mathml.css:
(mtable[columnlines="dashed"] > mtr > mtd + mtd): remove the obsolete linebreaking rule.
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createRenderer): map mspaceTag to RenderMathMLSpace.
* mathml/mathattrs.in: add width, height and depth attributes
* mathml/mathtags.in: add mspace element
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::parseMathMLLength): fix int to float conversion.
* rendering/mathml/RenderMathMLBlock.h: declare isRenderMathMLSpace.
(WebCore::RenderMathMLBlock::isRenderMathMLSpace):
* rendering/mathml/RenderMathMLSpace.cpp: Added.
(WebCore::RenderMathMLSpace::RenderMathMLSpace):
(WebCore::RenderMathMLSpace::isChildAllowed):
(WebCore::RenderMathMLSpace::computePreferredLogicalWidths):
(WebCore::RenderMathMLSpace::updateFromElement):
(WebCore::RenderMathMLSpace::updateLogicalWidth):
(WebCore::RenderMathMLSpace::updateLogicalHeight):
(WebCore::RenderMathMLSpace::layout):
(WebCore::RenderMathMLSpace::styleDidChange):
(WebCore::RenderMathMLSpace::firstLineBoxBaseline):
* rendering/mathml/RenderMathMLSpace.h: Added.
(WebCore::RenderMathMLSpace::isRenderMathMLSpace):
(WebCore::RenderMathMLSpace::renderName):
(WebCore::toRenderMathMLSpace):
2013-06-27 Jer Noble <jer.noble@apple.com>
Audio in apps which embed WebViews is corrupted.
https://bugs.webkit.org/show_bug.cgi?id=118163
Reviewed by Maciej Stachowiak.
Add a preference, which defaults to off, which controls whether the
AudioSessionManager will switch to a large audio buffer setting for
power-savings during <video> playback.
* WebCore.exp.in:
* page/Settings.cpp:
(WebCore::Settings::setLowPowerVideoAudioBufferSizeEnabled): Added. Simple setter.
* page/Settings.h:
(WebCore::Settings::lowPowerVideoAudioBufferSizeEnabled): Added. Simple getter.
* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState): Only set the large audio buffer
size if lowPowerVideoAudioBufferSize is enabled.
2013-07-01 Brian Holt <brian.holt@samsung.com>
[ATK] Leak: leaks in WebKitAccessibleInterfaceText
https://bugs.webkit.org/show_bug.cgi?id=118248
Fixed memory leaks.
Reviewed by Christophe Dumez.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getPangoLayoutForAtk):
(webkitAccessibleTextGetText):
2013-07-01 Roger Fong <roger_fong@apple.com>
Unreviewed. Make WebCore.make copy over QTMovieWin DLL's and PDB's.
<rdar://problem/14321403>
* WebCore.vcxproj/WebCore.make:
2013-07-01 peavo@outlook.com <peavo@outlook.com>
[Win] Crash when scrolling page with images.
https://bugs.webkit.org/show_bug.cgi?id=117832
Reviewed by Brent Fulgham.
Avoid access violation by returning early from method if image frame doesn't have pixel data.
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageFrame::hasPixelData): Added method to check if frame has pixel data.
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow): Early return if frame doesn't have pixel data.
2013-07-01 Noam Rosenthal <noam@webkit.org>
Avoid calling RenderLayerBacking::resetContentsRect() if possible
https://bugs.webkit.org/show_bug.cgi?id=118217
Reviewed by Simon Fraser.
Call resetContentsRect() only if the layer has a contentsLayer.
Otherwise the contentsRect is redundant for the GraphicsLayer.
No new tests - optimization only. This is covered by plenty of existing
tests in webgl/ and compositing/.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::hasContentsLayer):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Added hasContentsLayer calls for TextureMapper/CoordinatedGraphics
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2013-07-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Avoid creating a QWindow for offscreen GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=118244
Reviewed by Noam Rosenthal.
In Qt 5.0 we had to create invisible windows, but in Qt 5.1
we can now create specific offscreen surfaces.
* platform/graphics/qt/GraphicsContext3DQt.cpp:
(WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2013-07-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Remove long unused Qt4 forward definitions
Unreviewed cleanu-up.
* platform/graphics/GraphicsContext3D.h:
2013-07-01 Antti Koivisto <antti@apple.com>
Use DeferrableOneShotTimer for deleting decoded data
https://bugs.webkit.org/show_bug.cgi?id=118150
Reviewed by Andreas Kling.
Adam Barth pointed out that the virtual function for overriding the default delay doesn't work
as expected from base class constructor.
* loader/cache/CachedResource.cpp:
(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::CachedResource):
Use static function instead of calling a virtual.
* loader/cache/CachedResource.h:
* loader/cache/CachedScript.cpp:
* loader/cache/CachedScript.h:
2013-07-01 Kangil Han <kangil.han@samsung.com>
Adopt toHTMLTextAreaElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118226
Reviewed by Andreas Kling.
To enhance readability, this patch adopts toHTMLTextAreaElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::text):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendText):
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
* html/HTMLTextAreaElement.h:
(WebCore::toHTMLTextAreaElement):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::isContentEditable):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
(WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
(WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
* testing/Internals.cpp:
(WebCore::Internals::wasLastChangeUserEdit):
2013-07-01 Kwang Yul Seo <skyul@company100.net>
Add missing string headers that are used when LOG_DISABLED is 0.
https://bugs.webkit.org/show_bug.cgi?id=118227
Reviewed by Andreas Kling.
Build fix for LOG_DISABLED=0.
No new tests, no behavior change.
* html/track/InbandTextTrack.cpp:
* rendering/RenderLayerCompositor.cpp:
2013-06-29 Simon Fraser <simon.fraser@apple.com>
Avoid calling into Objective-C every time we get the scrollbar width
https://bugs.webkit.org/show_bug.cgi?id=118216
Reviewed by Geoffrey Garen.
Profiling shows that calling Scrollbar::isOverlayScrollbar() is somewhat
expensive, because it calls down into Objective-C. Fix by caching in
ScrollbarThemeMac whether we're using overlay scrollbars. We update this
cache on creation, and when preferences change; ScrollAnimatorMac::updateScrollerStyle()
is the function that gets called when the user changes the setting in System Preferences.
* platform/ScrollbarTheme.h:
(WebCore::ScrollbarTheme::usesOverlayScrollbarsChanged):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::preferencesChanged):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
(WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
2013-06-29 Simon Fraser <simon.fraser@apple.com>
Avoid calling isSimpleContainerCompositingLayer() an extra time
https://bugs.webkit.org/show_bug.cgi?id=118218
Reviewed by Tim Horton.
containsPaintedContent() called isSimpleContainerCompositingLayer(), which
is not particularly cheap. But the caller already has this information,
so pass it in.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::containsPaintedContent):
* rendering/RenderLayerBacking.h:
2013-06-29 Simon Fraser <simon.fraser@apple.com>
Avoid doing work in RenderBox::outlineBoundsForRepaint() when the repaintContainer is this
https://bugs.webkit.org/show_bug.cgi?id=118215
Reviewed by Tim Horton.
When the RenderGeometryMap code path was added, RenderBox::outlineBoundsForRepaint()
actually got slower if no coordinate mapping was needed. So avoid doing work when
we can, including avoiding the FloatQuad construction.
Speeds up scrolling overflow:scroll areas with large numbers of layer children.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::outlineBoundsForRepaint):
2013-06-29 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLOptGroupElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118213
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLOptGroupElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isEnabled):
(WebCore::AccessibilityListBoxOption::stringValue):
(WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
* html/HTMLOptGroupElement.h:
(WebCore::isHTMLOptGroupElement):
(WebCore::toHTMLOptGroupElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
(WebCore::HTMLOptionElement::isDisabledFormControl):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::childShouldCreateRenderer):
(WebCore::HTMLSelectElement::recalcListItems):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isSelectScopeMarker):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processEndTag):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::itemText):
(WebCore::RenderMenuList::itemIsEnabled):
(WebCore::RenderMenuList::itemIsLabel):
2013-06-29 ChangSeok Oh <changseok.oh@collabora.com>
Build fix for unguarded SVGGraphicsElement
https://bugs.webkit.org/show_bug.cgi?id=118214
Reviewed by Christophe Dumez.
Add the SVG condition to SVGGraphicsElement.idl
No new tests required since no functionality changed.
* svg/SVGGraphicsElement.idl:
2013-06-29 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLOptionElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118212
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLOptionElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::isSelected):
(WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
(WebCore::AccessibilityListBoxOption::stringValue):
(WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::setElement):
(WebCore::AccessibilityMenuListOption::isEnabled):
(WebCore::AccessibilityMenuListOption::isSelected):
(WebCore::AccessibilityMenuListOption::setSelected):
(WebCore::AccessibilityMenuListOption::stringValue):
* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::index):
* html/HTMLOptionElement.h:
(WebCore::isHTMLOptionElement):
(WebCore::toHTMLOptionElement):
* html/HTMLOptionsCollection.cpp:
(WebCore::HTMLOptionsCollection::add):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
(WebCore::HTMLSelectElement::value):
(WebCore::HTMLSelectElement::setValue):
(WebCore::HTMLSelectElement::childShouldCreateRenderer):
(WebCore::HTMLSelectElement::nextValidIndex):
(WebCore::HTMLSelectElement::saveLastSelection):
(WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
(WebCore::HTMLSelectElement::updateListBoxSelection):
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::recalcListItems):
(WebCore::HTMLSelectElement::selectedIndex):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::optionToListIndex):
(WebCore::HTMLSelectElement::listToOptionIndex):
(WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
(WebCore::HTMLSelectElement::saveFormControlState):
(WebCore::HTMLSelectElement::searchOptionsForValue):
(WebCore::HTMLSelectElement::restoreFormControlState):
(WebCore::HTMLSelectElement::appendFormData):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::updateSelectedState):
(WebCore::HTMLSelectElement::lastSelectedListIndex):
(WebCore::HTMLSelectElement::optionAtIndex):
(WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
(WebCore::HTMLSelectElement::length):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::hasImpliedEndTag):
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isSelectScopeMarker):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processEndTag):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::addFocusRingRects):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::updateOptionsWidth):
(WebCore::RenderMenuList::setTextFromOption):
(WebCore::RenderMenuList::itemText):
(WebCore::RenderMenuList::itemIsEnabled):
(WebCore::RenderMenuList::itemIsSelected):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paintSliderTicks):
2013-06-29 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(151586): multipart/x-mixed-replace images are broken
https://bugs.webkit.org/show_bug.cgi?id=118169
Reviewed by Alexey Proskuryakov.
When loading multipart content the resource data will change as
the next part is loaded, so we need to make a copy of the data
before sending it to the resource.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
2013-06-28 Eric Carlson <eric.carlson@apple.com>
[Mac] adopt new AVFoundation caption API
https://bugs.webkit.org/show_bug.cgi?id=118207
Reviewed by Dean Jackson.
No new tests, I was not able to come up with a reliable layout test.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): New, call currentTrack->resetCueValues().
(-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]): New delegate method.
2013-06-28 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLImageElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118182
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLImageElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isNativeImage):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::url):
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::QtPixmapRuntime::toQt):
* dom/Clipboard.cpp:
(WebCore::Clipboard::setDragImage):
* dom/Node.cpp:
(WebCore::Node::enclosingLinkEventParentOrSelf):
* editing/Editor.cpp:
(WebCore::imageElementFromImageDocument):
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition):
* html/HTMLImageElement.h:
(WebCore::isHTMLImageElement):
(WebCore::toHTMLImageElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatches):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintIntoRect):
(WebCore::RenderImage::imageMap):
(WebCore::RenderImage::updateAltText):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::shouldRespectImageOrientation):
2013-06-28 Gavin Barraclough <barraclough@apple.com>
PageThrottler::shouldThrottleTimers is wrong.
https://bugs.webkit.org/show_bug.cgi?id=118210
Reviewed by Anders Carlson.
m_throttleState == PageNotThrottledState
-> page NOT throttled, so should NOT throttle timers
m_throttleState != PageNotThrottledState
-> page NOT NOT throttled, so should throttle timers
This needs cleaning up, but for now, 1 character fix.
* page/PageThrottler.h:
(WebCore::PageThrottler::shouldThrottleTimers):
== -> !=
2013-06-28 Ryosuke Niwa <rniwa@webkit.org>
An element with -webkit-user-select: all should be selected on single click
https://bugs.webkit.org/show_bug.cgi?id=117864
Reviewed by Darin Adler.
Set m_mouseDownMayStartSelect true even when the node cannot start selection
if the node was inside an element with -webkit-user-select: all.
Test: editing/selection/user-select-all-with-single-click.html
* page/EventHandler.cpp:
(WebCore::canMouseDownStartSelect):
2013-06-28 Ryosuke Niwa <rniwa@webkit.org>
Remove unused attachChildrenLazily method and make attach/detachChildren private
https://bugs.webkit.org/show_bug.cgi?id=118016
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/009520dc31c9458e0cf71cf212fa5688c4ca68b0
No one should be manually trying to attach or detach all their children so there's
no reason for these methods to be public.
In doing this I realized that attachChildrenLazily is not used and can be removed.
I also realized that we were detaching all our children before the ShadowRoots which
is sad since the InsertionPoints will call detach() on them as well, and then when we
call ContainerNode::detach at the end of Element::detach we'll go detach them again!
This patch makes it so we only go through and detach them twice instead of three times.
In the future we should figure out a way to only do this once.
* dom/ContainerNode.h:
* dom/Element.cpp:
(WebCore::Element::detach):
2013-06-28 Alexey Proskuryakov <ap@apple.com>
[Mac] Crash when loading is stopped from -didReceiveResponse
https://bugs.webkit.org/show_bug.cgi?id=118209
<rdar://problem/14259249>
Reviewed by Brady Eidson.
Test: TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm.
* loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):
Added yet another check for reachedTerminalState().
2013-06-28 Beth Dakin <bdakin@apple.com>
Cached pages don't update their backing scale factor when it changes
https://bugs.webkit.org/show_bug.cgi?id=118206
-and-
<rdar://problem/14261627>
Reviewed by Tim Horton.
It is not sufficient to mark pages in the PageCache as needing a full style
recalc. We also need to ensure that the RenderLayerCompositors for the CachesPages
get updated.
Keep track of whether device scale has been updated with
m_needsDeviceScaleChanged. If that has been marked true, then restore() will call
Frame::deviceOrPageScaleFactorChanged().
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::restore):
* history/CachedPage.h:
(WebCore::CachedPage::markForDeviceScaleChanged):
Propagate markForDeviceScaleChanged() to all of the CachedPages.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForDeviceScaleChanged):
* history/PageCache.h:
Call PageCache::markPagesForDeviceScaleChanged()
* page/Page.cpp:
(WebCore::Page::setDeviceScaleFactor):
2013-06-28 Alex Christensen <achristensen@apple.com>
Added template parameters to std::min to fix compile errors in Visual Studio x64.
https://bugs.webkit.org/show_bug.cgi?id=118204
Reviewed by Geoffrey Garen.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject): Added <unsigned> to std::min.
(WebCore::createGlobalImageFileDescriptor): Added <int> to std::min.
2013-06-28 Alex Christensen <achristensen@apple.com>
Added WebGL files to Windows build.
https://bugs.webkit.org/show_bug.cgi?id=118200
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
* platform/graphics/cairo/GLContext.cpp: Only include GLContextEGL.h or GLContextGLX.h if they're needed.
* platform/graphics/cg/GraphicsContext3DCG.cpp: Only include GraphicsContext3DNEON.h if it's needed.
2013-06-28 Ryosuke Niwa <rniwa@webkit.org>
-webkit-line-break: after-white-space sometimes truncates DOM on copy & paste
https://bugs.webkit.org/show_bug.cgi?id=118164
Reviewed by Sam Weinig.
We can't assume that all subsequent ancestors contain exactly one child since they could have been
added in the first if statement matching: currentNode->parentNode() != rootNode && isRemovableBlock(currentNode)
Exit early when we encounter such an ancestor since removing its ancestor (that contains multiple children
some of which aren't in nodesToRemove) can clobber more nodes than we're allowed to remove.
Test: editing/pasteboard/simplfiying-markup-should-not-strip-content.html
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
(WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):
2013-06-28 Gwang Yoon Hwang <ryumiel@company100.net>
Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=104360
Reviewed by Noam Rosenthal.
The CoordinatedLayerTreeHost has too many responsibilities. It
implements LayerTreeHost, GraphicsLayerClient,
CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
UpdateAtlas::Client, GraphicsLayerFactory and
WebCustomFilterProgramProxyClient.
This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
This patch introduces a new class called CompositingCoordinator, which
takes the responsibility of managing compositing resources in
WebProcess.
CoordinatedLayerTreeHost is responsible only for the scheduling and
IPC-specific stuff, which are relevant only for WebKit2.
No new tests, covered by existing tests.
* CMakeLists.txt:
* Target.pri:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
(WebCore::CompositingCoordinator::create):
(WebCore::CompositingCoordinator::~CompositingCoordinator):
(WebCore::CompositingCoordinator::CompositingCoordinator):
(WebCore::CompositingCoordinator::setRootCompositingLayer):
(WebCore::CompositingCoordinator::sizeDidChange):
(WebCore::CompositingCoordinator::flushPendingLayerChanges):
(WebCore::CompositingCoordinator::syncDisplayState):
(WebCore::CompositingCoordinator::nextAnimationServiceTime):
(WebCore::CompositingCoordinator::clearPendingStateChanges):
(WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebCore::CompositingCoordinator::createRootLayer):
(WebCore::CompositingCoordinator::syncLayerState):
(WebCore::CompositingCoordinator::createImageBackingIfNeeded):
(WebCore::CompositingCoordinator::createImageBacking):
(WebCore::CompositingCoordinator::updateImageBacking):
(WebCore::CompositingCoordinator::clearImageBackingContents):
(WebCore::CompositingCoordinator::removeImageBacking):
(WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
(WebCore::CompositingCoordinator::notifyAnimationStarted):
(WebCore::CompositingCoordinator::notifyFlushRequired):
(WebCore::CompositingCoordinator::paintContents):
(WebCore::CompositingCoordinator::createGraphicsLayer):
(WebCore::CompositingCoordinator::deviceScaleFactor):
(WebCore::CompositingCoordinator::pageScaleFactor):
(WebCore::CompositingCoordinator::createUpdateAtlas):
(WebCore::CompositingCoordinator::removeUpdateAtlas):
(WebCore::CompositingCoordinator::visibleContentsRect):
(WebCore::CompositingCoordinator::mainContentsLayer):
(WebCore::CompositingCoordinator::setVisibleContentsRect):
(WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
(WebCore::CompositingCoordinator::detachLayer):
(WebCore::CompositingCoordinator::commitScrollOffset):
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::purgeBackingStores):
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
(WebCore::CompositingCoordinator::clearRootLayer):
(WebCore::CompositingCoordinator::rootLayer):
(WebCore::CompositingCoordinator::state):
2013-06-28 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152135.
http://trac.webkit.org/changeset/152135
https://bugs.webkit.org/show_bug.cgi?id=118199
Rolling out temporary patch used for debugging the test bots
(Requested by rfong on #webkit).
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
2013-06-28 Morten Stenshorne <mstensho@opera.com>
SVG relayout problem when displayed with different image box heights
https://bugs.webkit.org/show_bug.cgi?id=118140
Reviewed by Philip Rogers.
If the root element is an SVG, its position and height are affected
by the view height.
Test: svg/as-image/same-source-different-height.html
* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
2013-06-28 Simon Fraser <simon.fraser@apple.com>
Allow some LayoutPoint and LayoutSize conversions to be inlined
https://bugs.webkit.org/show_bug.cgi?id=118167
Reviewed by Ryosuke Niwa.
Construction of FloatSize from LayoutSize, and FloatPoint's move(const LayoutSize&)
and moveBy(const LayoutPoint&) were not inlined, and showed up on some profiles.
Make them inlined by removing the overloaded functions, and instead providing
conversion operators from LayoutSize to FloatSize, and LayoutPoint to FloatPoint.
Do the same to allow a LayoutRect to be converted to a FloatRect.
This is nice because it removes pollution of FloatRect, FloatPoint and FloatSize with
Layout* entirely.
Remove Qt-specific conversions on LayoutRect, LayoutPoint and LayoutSize. Qt can
convert via IntRect/FloatRect as necessary.
* platform/graphics/FloatPoint.cpp:
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::move):
(WebCore::FloatPoint::moveBy):
* platform/graphics/FloatRect.cpp:
* platform/graphics/FloatRect.h:
* platform/graphics/FloatSize.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/LayoutPoint.h:
(WebCore::LayoutPoint::operator FloatPoint):
* platform/graphics/LayoutRect.cpp:
* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::operator FloatRect):
* platform/graphics/LayoutSize.h:
(WebCore::LayoutSize::operator FloatSize):
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of IsWorkerGlobalScope and ExtendsDOMGlobalObject extended attributes
https://bugs.webkit.org/show_bug.cgi?id=118191
Reviewed by Kentaro Hara.
Remove WebKit-specific [IsWorkerGlobalScope] and [ExtendsDOMGlobalObject] IDL
extended attributes and update the JSC bindings generator to figure this out
on its own.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(IsDOMGlobalObject):
(GenerateHeader):
(GenerateImplementation):
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:
* workers/DedicatedWorkerGlobalScope.idl:
* workers/SharedWorkerGlobalScope.idl:
* workers/WorkerGlobalScope.idl:
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Introduce SVGGraphicsElement IDL interface
https://bugs.webkit.org/show_bug.cgi?id=118178
Reviewed by Kentaro Hara.
Introduce SVGGraphicsElement IDL interface as per the latest SVG
specification:
- https://svgwg.org/svg2-draft/types.html#InterfaceSVGGraphicsElement
SVGGraphicsElement is a merge of SVGLocatable and SVGTransformable.
This is one step towards simplifying inheritance in SVG and matching
the latest SVG2 specification.
No new tests, already covered by existing tests.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::RenderSVGEllipse):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::RenderSVGPath):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
* rendering/svg/RenderSVGResourceMarker.cpp:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::RenderSVGShape):
(WebCore::RenderSVGShape::updateShapeFromElement):
(WebCore::RenderSVGShape::layout):
(WebCore::RenderSVGShape::nonScalingStrokeTransform):
(WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
* rendering/svg/RenderSVGShape.h:
* rendering/svg/RenderSVGTransformableContainer.cpp:
(WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
(WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
* rendering/svg/RenderSVGTransformableContainer.h:
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::SVGAElement):
(WebCore::SVGAElement::parseAttribute):
(WebCore::SVGAElement::svgAttributeChanged):
(WebCore::SVGAElement::defaultEventHandler):
(WebCore::SVGAElement::supportsFocus):
(WebCore::SVGAElement::isURLAttribute):
* svg/SVGAElement.h:
* svg/SVGAElement.idl:
* svg/SVGAllInOne.cpp:
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::hasValidAttributeType):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::SVGCircleElement):
(WebCore::SVGCircleElement::parseAttribute):
(WebCore::SVGCircleElement::svgAttributeChanged):
* svg/SVGCircleElement.h:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::SVGClipPathElement):
(WebCore::SVGClipPathElement::parseAttribute):
(WebCore::SVGClipPathElement::svgAttributeChanged):
(WebCore::SVGClipPathElement::childrenChanged):
* svg/SVGClipPathElement.h:
* svg/SVGClipPathElement.idl:
* svg/SVGDefsElement.cpp:
(WebCore::SVGDefsElement::SVGDefsElement):
* svg/SVGDefsElement.h:
* svg/SVGDefsElement.idl:
* svg/SVGElement.h:
(WebCore::SVGElement::isSVGGraphicsElement):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::SVGEllipseElement):
(WebCore::SVGEllipseElement::parseAttribute):
(WebCore::SVGEllipseElement::svgAttributeChanged):
* svg/SVGEllipseElement.h:
* svg/SVGEllipseElement.idl:
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
(WebCore::SVGForeignObjectElement::parseAttribute):
(WebCore::SVGForeignObjectElement::svgAttributeChanged):
(WebCore::SVGForeignObjectElement::rendererIsNeeded):
* svg/SVGForeignObjectElement.h:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::SVGGElement):
(WebCore::SVGGElement::parseAttribute):
(WebCore::SVGGElement::svgAttributeChanged):
* svg/SVGGElement.h:
* svg/SVGGElement.idl:
* svg/SVGGraphicsElement.cpp: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.cpp.
(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::~SVGGraphicsElement):
(WebCore::SVGGraphicsElement::getCTM):
(WebCore::SVGGraphicsElement::getScreenCTM):
(WebCore::SVGGraphicsElement::animatedLocalTransform):
(WebCore::SVGGraphicsElement::supplementalTransform):
(WebCore::SVGGraphicsElement::isSupportedAttribute):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
(WebCore::SVGGraphicsElement::nearestViewportElement):
(WebCore::SVGGraphicsElement::farthestViewportElement):
(WebCore::SVGGraphicsElement::getBBox):
(WebCore::SVGGraphicsElement::createRenderer):
(WebCore::SVGGraphicsElement::toClipPath):
* svg/SVGGraphicsElement.h: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.h.
(WebCore::SVGGraphicsElement::localCoordinateSpaceTransform):
(WebCore::SVGGraphicsElement::synchronizeRequiredFeatures):
(WebCore::SVGGraphicsElement::synchronizeRequiredExtensions):
(WebCore::SVGGraphicsElement::synchronizeSystemLanguage):
(WebCore::toSVGGraphicsElement):
* svg/SVGGraphicsElement.idl: Copied from Source/WebCore/svg/SVGForeignObjectElement.idl.
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::SVGImageElement):
(WebCore::SVGImageElement::isPresentationAttribute):
(WebCore::SVGImageElement::collectStyleForPresentationAttribute):
(WebCore::SVGImageElement::parseAttribute):
(WebCore::SVGImageElement::svgAttributeChanged):
(WebCore::SVGImageElement::attach):
(WebCore::SVGImageElement::insertedInto):
(WebCore::SVGImageElement::addSubresourceAttributeURLs):
(WebCore::SVGImageElement::didMoveToNewDocument):
* svg/SVGImageElement.h:
* svg/SVGImageElement.idl:
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::SVGLineElement):
(WebCore::SVGLineElement::parseAttribute):
(WebCore::SVGLineElement::svgAttributeChanged):
* svg/SVGLineElement.h:
* svg/SVGLineElement.idl:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::insertedInto):
(WebCore::SVGPathElement::removedFrom):
* svg/SVGPathElement.h:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.cpp:
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::SVGPolyElement):
(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::svgAttributeChanged):
* svg/SVGPolyElement.h:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::SVGRectElement):
(WebCore::SVGRectElement::parseAttribute):
(WebCore::SVGRectElement::svgAttributeChanged):
* svg/SVGRectElement.h:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::SVGSVGElement):
(WebCore::SVGSVGElement::didMoveToNewDocument):
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::insertedInto):
(WebCore::SVGSVGElement::removedFrom):
* svg/SVGSVGElement.h:
* svg/SVGSVGElement.idl:
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::localCoordinateSpaceTransform):
* svg/SVGSwitchElement.cpp:
(WebCore::SVGSwitchElement::SVGSwitchElement):
* svg/SVGSwitchElement.h:
* svg/SVGSwitchElement.idl:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::SVGUseElement):
(WebCore::SVGUseElement::parseAttribute):
(WebCore::SVGUseElement::insertedInto):
(WebCore::SVGUseElement::removedFrom):
(WebCore::SVGUseElement::svgAttributeChanged):
(WebCore::SVGUseElement::toClipPath):
(WebCore::SVGUseElement::finishParsingChildren):
* svg/SVGUseElement.h:
* svg/SVGUseElement.idl:
2013-06-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Add new schemes to content utils.
https://bugs.webkit.org/show_bug.cgi?id=118181
Reviewed by Christophe Dumez.
According to latest content handler spec, new schemes are added to it.
Those are "geo, magnet, sip, ssh and xmpp".
http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
Tests: fast/dom/register-protocol-handler.html
fast/dom/unregister-protocol-handler.html
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):
2013-06-28 Sanghyup Lee <sh53.lee@samsung.com>
Avoid duplicating hostWindow() call in ScrollView.cpp
https://bugs.webkit.org/show_bug.cgi?id=118168
Reviewed by Christophe Dumez.
Remove redundant hostWindow() calls in ScrollView.cpp.
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollContents):
(WebCore::ScrollView::contentsToScreen):
(WebCore::ScrollView::screenToContents):
(WebCore::ScrollView::repaintContentRectangle):
(WebCore::ScrollView::updateOverhangAreas):
(WebCore::ScrollView::addPanScrollIcon):
(WebCore::ScrollView::removePanScrollIcon):
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, fix GTK build after r152156.
* GNUmakefile.list.am:
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Merge SVGLangSpace into SVGElement
https://bugs.webkit.org/show_bug.cgi?id=118170
Reviewed by Kentaro Hara.
Remove SVGLangSpace IDL interface and move its attributes to SVGElement
to match the latest specification and simplify inheritance in SVG:
- https://svgwg.org/svg2-draft/types.html#InterfaceSVGElement
No new tests, no behavior change.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* svg/SVGAElement.h:
* svg/SVGAElement.idl:
* svg/SVGCircleElement.h:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.h:
* svg/SVGClipPathElement.idl:
* svg/SVGDefsElement.h:
* svg/SVGDefsElement.idl:
* svg/SVGDescElement.h:
* svg/SVGDescElement.idl:
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute):
* svg/SVGElement.h:
* svg/SVGElement.idl:
* svg/SVGEllipseElement.h:
* svg/SVGEllipseElement.idl:
* svg/SVGFEImageElement.h:
* svg/SVGFEImageElement.idl:
* svg/SVGFilterElement.h:
* svg/SVGFilterElement.idl:
* svg/SVGForeignObjectElement.h:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.h:
* svg/SVGGElement.idl:
* svg/SVGImageElement.h:
* svg/SVGImageElement.idl:
* svg/SVGLangSpace.idl: Removed.
* svg/SVGLineElement.h:
* svg/SVGLineElement.idl:
* svg/SVGMarkerElement.h:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.h:
* svg/SVGMaskElement.idl:
* svg/SVGPathElement.h:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.h:
* svg/SVGPatternElement.idl:
* svg/SVGPolyElement.h:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.h:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.h:
* svg/SVGSVGElement.idl:
* svg/SVGStyleElement.h:
* svg/SVGStyleElement.idl:
* svg/SVGSwitchElement.h:
* svg/SVGSwitchElement.idl:
* svg/SVGSymbolElement.h:
* svg/SVGSymbolElement.idl:
* svg/SVGTextContentElement.h:
* svg/SVGTextContentElement.idl:
* svg/SVGTitleElement.h:
* svg/SVGTitleElement.idl:
* svg/SVGUseElement.h:
* svg/SVGUseElement.idl:
2013-06-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Use & instead of | in the value of [CallWith]
https://bugs.webkit.org/show_bug.cgi?id=118054
Reviewed by Kentaro Hara.
[CallWith=ScriptExecutionContext|ScriptState] meant that both the
ScriptExecutionContext AND the ScriptState would be passed as
arguments to the implementation (not one OR the other).
This patch changes the semantics for those IDL extended attributes
to make it less confusing. Proper usage is now:
[CallWith=ScriptExecutionContext&ScriptState]
No new tests, covered by existing bindings tests.
* bindings/scripts/CodeGenerator.pm:
(ExtendedAttributeContains):
* bindings/scripts/test/TestObj.idl:
* page/Console.idl:
2013-06-27 Kangil Han <kangil.han@samsung.com>
HTMLAudioElement doesn't have to know about isVideo function
https://bugs.webkit.org/show_bug.cgi?id=118116
Reviewed by Eric Carlson.
Minor code cleanup to remove isVideo function from HTMLAudioElement.
We can use default function in HTMLMediaElement as hasVideo does.
* html/HTMLAudioElement.h:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::isVideo):
2013-06-27 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLInputElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118130
Reviewed by Antti Koivisto.
To enhance readability, this patch adopts is/toHTMLInputElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaTimeline::valueDescription):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::isNativeTextControl):
(WebCore::AccessibilityNodeObject::isNativeImage):
(WebCore::AccessibilityNodeObject::isInputImage):
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):
(WebCore::AccessibilityNodeObject::actionElement):
(WebCore::AccessibilityNodeObject::titleElementText):
(WebCore::AccessibilityNodeObject::visibleText):
(WebCore::AccessibilityNodeObject::title):
(WebCore::AccessibilityNodeObject::text):
(WebCore::AccessibilityNodeObject::colorValue):
(WebCore::accessibleNameForNode):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFileUploadButton):
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
(WebCore::AccessibilityRenderObject::url):
(WebCore::AccessibilityRenderObject::setValue):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
(WebCore::AccessibilityRenderObject::addTextFieldChildren):
* accessibility/AccessibilitySlider.cpp:
(WebCore::AccessibilitySlider::element):
* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
* bindings/js/JSHTMLInputElementCustom.cpp:
(WebCore::JSHTMLInputElement::selectionStart):
(WebCore::JSHTMLInputElement::setSelectionStart):
(WebCore::JSHTMLInputElement::selectionEnd):
(WebCore::JSHTMLInputElement::setSelectionEnd):
(WebCore::JSHTMLInputElement::selectionDirection):
(WebCore::JSHTMLInputElement::setSelectionDirection):
(WebCore::JSHTMLInputElement::setSelectionRange):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::isInPasswordField):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
* html/HTMLFormControlElement.cpp:
(WebCore::shouldAutofocus):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getTextFieldValues):
* html/HTMLInputElement.h:
(WebCore::isHTMLInputElement):
(WebCore::toHTMLInputElement):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::mediaControlElementType):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
(WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
(WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
(WebCore::InputFieldSpeechButtonElement::startSpeechInput):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):
* page/Chrome.cpp:
(WebCore::Chrome::setToolTip):
* page/EventHandler.cpp:
(WebCore::isSubmitImage):
(WebCore::EventHandler::handleMousePressEvent):
* page/FocusController.cpp:
(WebCore::clearSelectionIfNeeded):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::getURLForImageNode):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
* platform/qt/RenderThemeQtMobile.cpp:
(WebCore::RenderThemeQtMobile::paintSliderTrack):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::altDisplayString):
(WebCore::HitTestResult::absoluteImageURL):
(WebCore::HitTestResult::isContentEditable):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasLineIfEmpty):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::updateFromElement):
(WebCore::RenderButton::canHaveGeneratedChildren):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::isOpen):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::updateFromElement):
(WebCore::RenderFileUploadControl::maxFilenameWidth):
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::uploadButton):
(WebCore::RenderFileUploadControl::fileTextValue):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateAltText):
* testing/Internals.cpp:
(WebCore::Internals::selectColorInColorChooser):
2013-06-27 Antti Koivisto <antti@apple.com>
Use DeferrableOneShotTimer for deleting decoded data
https://bugs.webkit.org/show_bug.cgi?id=118150
Reviewed by Andreas Kling.
Up to 1% of page load time can be used under CachedScript::script() for restarting
the decoded data deletion timer.
Using DeferrableOneShotTimer instead of a plain Timer avoids unnecessary low level timer access.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):
(WebCore::CachedResource::decodedDataDeletionTimerFired):
(WebCore::CachedResource::decodedDataDeletionTimerDelay):
Adopt DeferrableOneShotTimer.
* loader/cache/CachedResource.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script):
(WebCore::CachedScript::decodedDataDeletionTimerDelay):
Keep using zero delay for scripts.
* platform/Timer.h:
(WebCore::DeferrableOneShotTimer::stop):
Avoid unnecessary restart after stopping and starting again.
2013-06-27 Anders Carlsson <andersca@apple.com>
Add a new String::charactersWithNullTermination() function that returns a vector
https://bugs.webkit.org/show_bug.cgi?id=118155
Reviewed by Andreas Kling.
Change calls to deprecatedCharactersWithNullTermination() to charactersWithNullTermination().data()
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getLinkedFonts):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
* platform/graphics/wince/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination):
* platform/network/win/CookieJarWin.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::createInternetHandle):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::fileLoadTimer):
* platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal):
* platform/text/win/TextCodecWin.cpp:
(WebCore::TextCodecWin::enumerateSupportedEncodings):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getWebLocData):
(WebCore::createGlobalData):
(WebCore::setFileDescriptorData):
(WebCore::getURL):
(WebCore::setCFData):
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageIconForCachedImageFilename):
* platform/win/FileSystemWin.cpp:
(WebCore::getFindData):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::pathByAppendingComponent):
(WebCore::makeAllDirectories):
(WebCore::pathGetFileName):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* platform/win/MIMETypeRegistryWin.cpp:
(WebCore::mimeTypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/win/PasteboardWin.cpp:
(WebCore::createGlobalImageFileDescriptor):
(WebCore::createGlobalHDropContent):
* platform/win/PathWalker.cpp:
(WebCore::PathWalker::PathWalker):
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
* platform/win/SharedBufferWin.cpp:
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/wince/FileSystemWinCE.cpp:
(WebCore::getFileInfo):
(WebCore::fileExists):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::makeAllDirectories):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::addMozillaPluginDirectories):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
* plugins/win/PluginPackageWin.cpp:
(WebCore::getVersionInfo):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::handlePostReadFile):
2013-06-27 Frédéric Wang <fred.wang@free.fr>
Implement parsing of MathML lengths.
https://bugs.webkit.org/show_bug.cgi?id=118053
Reviewed by Chris Fleizach.
A parsing function for MathML lengths, similar to Gecko's one, is
implemented. It is currently only used to parse mfrac@linethickness but
will be convenient to parse other MathML attributes in the future.
Tests: mathml/presentation/mfrac-linethickness1.html
mathml/presentation/mfrac-linethickness2.html
mathml/presentation/mfrac-linethickness3.html
* rendering/mathml/RenderMathMLBlock.cpp: add parsing functions
(WebCore::parseMathMLLength): parsing MathML Length (number unit)
(WebCore::parseNamedSpace): parsing MathML namedspaces
* rendering/mathml/RenderMathMLBlock.h: declare parsing functions
* rendering/mathml/RenderMathMLFraction.cpp: use the parsing function for linethickness
(WebCore::RenderMathMLFraction::updateFromElement):
2013-06-27 Anders Carlsson <andersca@apple.com>
Remove call to deprecatedCharactersWithNullTermination() in WebGL code
https://bugs.webkit.org/show_bug.cgi?id=118154
Reviewed by Dean Jackson.
Remove an unneeded call to deprecatedCharactersWithNullTermination(). Ultimately,
the string we used to call it on gets converted to an UTF-8 CString that has a null character anyway.
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations):
2013-06-27 Roger Fong <roger_fong@apple.com>
Unreviewed. Temporarily add some stderr output to Media Engine load methods to determine which engine buildbots are using for layout tests.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::load):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
2013-06-27 Anders Carlsson <andersca@apple.com>
Stop using deprecatedCharactersWithNullTermination in SQLite code
https://bugs.webkit.org/show_bug.cgi?id=118146
Reviewed by Filip Pizlo.
Turns out SQLite uses UTF-8 internally so we might just as well use the SQLite functions
that take UTF-8 strings and do the conversion ourselves. This has the added advantage that we can
use String::utf8() which returns a null-terminated string.
Require a version of SQLite newer than 3.6.16 so we can remove two workarounds. 3.6.16 was released
4 years ago so supported port is likely to have it.
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
Use sqlite3_open instead of sqlite3_open16.
* platform/sql/SQLiteFileSystem.h:
Fix parameter name capitalization.
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::prepare):
Use sqlite3_prepare_v2. Also, pass the length of the string (including the null character), since
that lets SQLite avoid a buffer copy. Remove a workaround for versions of SQLite older than 3.6.16.
2013-06-27 Andrew Lo <anlo@blackberry.com>
[BlackBerry] Unnecessary root layer commits occur during html5 video playback
https://bugs.webkit.org/show_bug.cgi?id=118147
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson, John Griggs.
Only request layer commits when layer properties change in
GraphicsLayerBlackBerry::updateContentsRect and
GraphicsLayerBlackBerry::setContentsToMedia.
JIRA112749.
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::setContentsToMedia):
(WebCore::GraphicsLayerBlackBerry::updateContentsRect):
2013-06-27 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] New positioning model: basic support for rectangle shape-outside
https://bugs.webkit.org/show_bug.cgi?id=118080
Reviewed by David Hyatt.
With the latest Editor's Draft of the CSS Shapes specification,
shape-outside no longer affects the positioning of floats. This is the
first step in changing the implementation to reflect this
specification change. The bulk of this change is reverting the code
that was needed to position floats based on the bounding box of the
shape.
Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html
csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState): Revert changes to support float
positioning from shape-outside.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::blockSelectionGaps): Ditto.
(WebCore::RenderBlock::insertFloatingObject): Ditto.
(WebCore::RenderBlock::positionNewFloats): Ditto.
(WebCore::RenderBlock::logicalLeftOffsetForLine): Instead of
converting to shape bounding box coordinates, convert to the
float's margin box coordinates.
(WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
(WebCore::positionForPointRespectingEditingBoundaries): Revert changes
to support float positioning from shape-outside.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::xPositionForFloatIncludingMargin): Ditto.
(WebCore::RenderBlock::yPositionForFloatIncludingMargin): Ditto.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Instead
of converting to shape bounding box coordinates, convert to the
float's margin box coordinates.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer): Revert changes to support
float positioning from shape-outside.
(WebCore::RenderBox::offsetFromContainer): Ditto.
(WebCore::RenderBox::computeRectForRepaint): Ditto.
(WebCore::RenderBox::layoutOverflowRectForPropagation): Ditto.
* rendering/RenderBoxModelObject.cpp: Ditto.
* rendering/RenderBoxModelObject.h: Ditto.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::clippedOverflowRectForRepaint): Ditto.
(WebCore::RenderInline::computeRectForRepaint): Ditto.
(WebCore::RenderInline::mapLocalToContainer): Ditto.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition): Ditto.
(WebCore::RenderLayer::calculateClipRects): Ditto.
(WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
* rendering/RenderLayer.h:
(WebCore::RenderLayer::offsetForInFlowPosition): Ditto.
* rendering/RenderObject.h: Ditto.
* rendering/shapes/ShapeInfo.h: Make m_renderer protected, since we
now need it in the subclass to compute the segments.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForLine): Update segment
computation to use the float's margin box instead of the shape's
bounding box for computing the deltas.
(WebCore::ShapeOutsideInfo::leftSegmentMarginBoxDelta): This used to
be leftSegmentShapeBoundingBoxDelta, which has been renamed in the
obvious way.
(WebCore::ShapeOutsideInfo::rightSegmentMarginBoxDelta): This used to
be rightSegmentShapeBoundingBoxDelta, which has been renamed in the
obvious way.
* rendering/shapes/ShapeOutsideInfo.h: Revert changes to support float
positioning from shape-outside.
* rendering/style/RenderStyle.h: Ditto.
2013-06-27 Antti Koivisto <antti@apple.com>
RenderLayerCompositor destructor is fragile
https://bugs.webkit.org/show_bug.cgi?id=118143
Reviewed by Simon Fraser.
With iOS tile cache implementation deleting RenderLayerCompositor may end up starting a deleted timer.
This corrupts the timer heap and leads to a crash later. This happens because GraphicsLayers destructor
calls back to the RenderLayerCompositor that is being deleted. This is pretty fragile in general.
No test as there is no known way to repro this with plain webkit.
* platform/Timer.cpp:
(WebCore::TimerBase::TimerBase):
(WebCore::TimerBase::~TimerBase):
(WebCore::TimerBase::setNextFireTime):
* platform/Timer.h:
Assert that the timer is alive before starting it. This turns bugs like this into clear crash stacks
instead of hard-to-debug timer heap corruptions.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::~RenderLayerCompositor):
Take care to delete owned GraphicsLayers before proceeding with the rest of the destructor.
2013-06-27 Christophe Dumez <ch.dumez@sisa.samsung.com>
Update SVG interfaces to stop inheriting from SVGURIReference and SVGTests
https://bugs.webkit.org/show_bug.cgi?id=118142
Reviewed by Ryosuke Niwa.
Stop inheriting from SVGURIReference and SVGTests and use IDL implements statements
instead. This is one step towards getting rid of multiple inheritance in SVG (which
is no longer supported by Web IDL) and matching the latest specification:
- https://svgwg.org/svg2-draft/types.html#BasicDOMInterfaces
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* svg/SVGAElement.idl:
* svg/SVGAltGlyphElement.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDefsElement.idl:
* svg/SVGEllipseElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.idl:
* svg/SVGGlyphRefElement.idl:
* svg/SVGGradientElement.idl:
* svg/SVGImageElement.idl:
* svg/SVGLineElement.idl:
* svg/SVGMPathElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGSwitchElement.idl:
* svg/SVGTRefElement.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTextPathElement.idl:
* svg/SVGUseElement.idl:
2013-06-27 Ruth Fong <ruth_fong@apple.com>
Polish context menus for media elements
https://bugs.webkit.org/show_bug.cgi?id=118078
<rdar://problem/14278960>
Reviewed by Eric Carlson.
No new tests: media/context-menu-action.html,
which has been disabled by bug 116651, is used to test context menus.
* English.lproj/Localizable.strings: Changed "Fullscreen" to "Full Screen"
and added strings "Show Controls" and "Hide Controls".
* page/ContextMenuController.cpp: Updated to include a new context menu item
that toggles betweeen "Show Controls" and "Hide Controls".
* platform/ContextMenuItem.h:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
* platform/gtk/LocalizedStringsGtk.cpp:
* platform/qt/LocalizedStringsQt.cpp:
Added equivalents of localized strings "Show Controls" and "Hide Controls".
2013-06-27 Chris Fleizach <cfleizach@apple.com>
AX: IOS: crash while navigating with SVG
https://bugs.webkit.org/show_bug.cgi?id=118101
Need to check if the SVG path exists before copying it.
Reviewed by Stephen Chenney.
Test: platform/iphone-simulator/accessibility/svg-path-crash.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::elementPath):
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::hasPath):
2013-06-27 Seokju Kwon <seokju.kwon@gmail.com>
Removing the redundant checks after r152078
https://bugs.webkit.org/show_bug.cgi?id=118117
Reviewed by Simon Fraser.
Avoided redundant checks in RenderLayerCompositor::reasonsForCompositing() after r152078.
No new tests as no functionality change.
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logReasonsForCompositing):
2013-06-27 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=118071
Reviewed by Kentaro Hara.
Expose WorkerGlobalScope interface in worker environment as per the latest
specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
Also expose the SharedWorkerGlobalScope interface when the JavaScript global environment is a
shared worker environment, and the DedicatedWorkerGlobalScope interface when the JavaScript
global environment is a dedicated worker environment:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworkerglobalscope
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope
The semantics of the [GlobalContext] IDL extended attribute has changed to support this
use case. The value for the extended attribute is now the name of the interface to which the
Constructor attribute should be added (Window, WorkerGlobalScope, SharedWorkerGlobalScope...).
It is possible to specify several interface names by using '&' as separator. For e.g.
[GlobalContext=DOMWindow&WorkerGlobalScope].
Tests: fast/js/global-constructors-attributes-dedicated-worker.html
fast/js/global-constructors-attributes-shared-worker.html
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* Modules/websockets/WebSocket.idl:
* UseJSC.cmake:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/generate-bindings.pl:
(checkIfIDLAttributesExists):
* bindings/scripts/preprocess-idls.pl:
* dom/MessageChannel.idl:
* dom/MessageEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMURL.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* page/EventSource.idl:
* workers/DedicatedWorkerGlobalScope.idl:
* workers/SharedWorkerGlobalScope.idl:
* workers/WorkerGlobalScope.idl:
* workers/WorkerLocation.idl:
* xml/XMLHttpRequest.idl:
2013-06-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r152074.
http://trac.webkit.org/changeset/152074
https://bugs.webkit.org/show_bug.cgi?id=118137
It caused lots of layout and API test crash on Qt Wk2.
(Requested by kadam on #webkit).
* CMakeLists.txt:
* Target.pri:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Removed.
* platform/graphics/texmap/coordinated/CompositingCoordinator.h: Removed.
2013-06-27 Seokju Kwon <seokju.kwon@gmail.com>
Avoid duplicating hostWindow() call in FrameView::setFrameRect()
https://bugs.webkit.org/show_bug.cgi?id=118115
Reviewed by Christophe Dumez.
Remove a redundant call in FrameView::setFrameRect().
No function change, no tests.
* page/FrameView.cpp:
(WebCore::FrameView::scheduleAnimation):
2013-06-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
Fixing some compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=117791
Reviewed by Martin Robinson.
No new tests needed.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetTextForOffset): Fixed warning about
uninitialized variable.
2013-06-27 Iago Toral Quiroga <itoral@igalia.com>
Use consistent file names for WidgetBackingStoreGtkX11 class
https://bugs.webkit.org/show_bug.cgi?id=118124
Reviewed by Carlos Garcia Campos.
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* platform/gtk/GtkWidgetBackingStoreX11.cpp: Removed.
* platform/gtk/GtkWidgetBackingStoreX11.h: Removed.
* platform/gtk/WidgetBackingStoreGtkX11.cpp: Added.
(WebCore::WidgetBackingStoreGtkX11::create):
(WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::cairoSurface):
(WebCore::WidgetBackingStoreGtkX11::scroll):
* platform/gtk/WidgetBackingStoreGtkX11.h: Added.
2013-06-27 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Buildfix for !ENABLE(SVG) builds.
Reviewed by Csaba Osztrogonác.
Moving RenderObject::hasAspectRatio() outside from ENABLE(SVG) guard.
* rendering/RenderObject.h:
(WebCore::RenderObject::hasAspectRatio):
2013-06-27 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLLabelElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=118113
Reviewed by Andreas Kling.
To enhance readability, this patch adopts is/toHTMLLabelElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::labelChanged):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
(WebCore::AccessibilityNodeObject::labelForElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::labelElementContainer):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesLabelForAttribute):
* dom/Element.cpp:
(WebCore::Element::updateLabel):
* dom/TreeScope.cpp:
(WebCore::TreeScope::labelElementForId):
* html/HTMLLabelElement.h:
(WebCore::isHTMLLabelElement):
(WebCore::toHTMLLabelElement):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::nodeMatches):
2013-06-27 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Fix unused variable/parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=118050
Reviewed by Christophe Dumez.
Commented out unused parameters and removed an unused variable in the curl backend.
No tests required.
* platform/network/curl/CredentialStorageCurl.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/curl/DNSCurl.cpp:
(WebCore::prefetchDNS):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::curl_lock_callback):
(WebCore::curl_unlock_callback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):
2013-06-27 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align warnings in WebCore/platform/graphics/cairo
https://bugs.webkit.org/show_bug.cgi?id=117990
Reviewed by Rob Buis.
* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::checkForSolidColor):
* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::platformTransformColorSpace):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):
2013-06-27 Szabolcs Dávid <davidsz@inf.u-szeged.hu>
[curl] Add "set-cookie" to appendable headers
https://bugs.webkit.org/show_bug.cgi?id=118061
Reviewed by Christophe Dumez.
Mark set-cookie as an appendable header.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isAppendableHeader):
2013-06-27 Horia Iosif Olaru <olaru@adobe.com>
Remove ENABLE_CSS_COMPOSITING guards around -webkit-background-blend mode related code. The same flag guards -webkit-blend-mode code, but those guards are not touched by this change.
https://bugs.webkit.org/show_bug.cgi?id=117619
Reviewed by Dean Jackson.
Test: css3/compositing/effect-background-blend-mode-tiled.html
* WebCore.exp.in:
* bindings/generic/RuntimeEnabledFeatures.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFillProperty):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2013-06-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Rename WorkerContext to WorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=118059
Reviewed by Kentaro Hara.
Rename WorkerContext / SharedWorkerContext / DedicatedWorkerContext to
WorkerGlobalScope / SharedWorkerGlobalScope / DedicatedWorkerGlobalScope
to match the latest specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
Those interfaces have [NoInterfaceObject] IDL extended attribute so the
name did not matter much so far. However, the specification was updated
and [NoInterfaceObject] was removed. We should therefore rename those
interfaces as a preparation for this change.
No new tests, no behavior change as these interfaces are not exposed to
JavaScript yet.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Modules/filesystem/WorkerGlobalScopeFileSystem.cpp: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.cpp.
(WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystem):
(WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync):
(WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL):
(WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL):
* Modules/filesystem/WorkerGlobalScopeFileSystem.h: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.h.
* Modules/filesystem/WorkerGlobalScopeFileSystem.idl: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl.
* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp.
(WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h.
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl.
* Modules/notifications/Notification.cpp:
* Modules/notifications/NotificationCenter.cpp:
* Modules/notifications/WorkerGlobalScopeNotifications.cpp: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.cpp.
(WebCore::WorkerGlobalScopeNotifications::WorkerGlobalScopeNotifications):
(WebCore::WorkerGlobalScopeNotifications::~WorkerGlobalScopeNotifications):
(WebCore::WorkerGlobalScopeNotifications::supplementName):
(WebCore::WorkerGlobalScopeNotifications::from):
(WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
* Modules/notifications/WorkerGlobalScopeNotifications.h: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.h.
* Modules/notifications/WorkerGlobalScopeNotifications.idl: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.idl.
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::allowDatabaseAccess):
(WebCore::DatabaseContext::databaseExceededQuota):
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.cpp.
(WebCore::WorkerGlobalScopeWebDatabase::openDatabase):
(WebCore::WorkerGlobalScopeWebDatabase::openDatabaseSync):
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.h.
(WebCore::WorkerGlobalScopeWebDatabase::WorkerGlobalScopeWebDatabase):
(WebCore::WorkerGlobalScopeWebDatabase::~WorkerGlobalScopeWebDatabase):
* Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl.
* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
(WebCore::workerGlobalScopeDidSend):
(WebCore::WorkerThreadableWebSocketChannel::Peer::send):
(WebCore::workerGlobalScopeDidGetBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
(WebCore::workerGlobalScopeDidConnect):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
(WebCore::workerGlobalScopeDidReceiveMessage):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
(WebCore::workerGlobalScopeDidReceiveBinaryData):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
(WebCore::workerGlobalScopeDidUpdateBufferedAmount):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
(WebCore::workerGlobalScopeDidStartClosingHandshake):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
(WebCore::workerGlobalScopeDidClose):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::workerGlobalScopeDidReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
* Modules/websockets/WorkerThreadableWebSocketChannel.h:
(WebCore::WorkerThreadableWebSocketChannel::create):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
* Target.pri:
* UseJSC.cmake:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/cpp/WebDOMEventTarget.cpp:
(toWebKit):
* bindings/cpp/WebDOMEventTarget.h:
* bindings/generic/ActiveDOMCallback.cpp:
* bindings/js/DOMRequestState.h:
(WebCore::DOMRequestState::DOMRequestState):
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::scriptExecutionContext):
(WebCore::toJSDOMGlobalObject):
* bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp.
(WebCore::JSDedicatedWorkerGlobalScope::postMessage):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::toJS):
* bindings/js/JSWorkerGlobalScopeBase.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.cpp.
(WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
(WebCore::JSWorkerGlobalScopeBase::finishCreation):
(WebCore::JSWorkerGlobalScopeBase::destroy):
(WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
(WebCore::toJS):
(WebCore::toJSDedicatedWorkerGlobalScope):
(WebCore::toJSSharedWorkerGlobalScope):
(WebCore::toJSWorkerGlobalScope):
* bindings/js/JSWorkerGlobalScopeBase.h: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.h.
(WebCore::JSWorkerGlobalScopeBase::impl):
(WebCore::JSWorkerGlobalScopeBase::createStructure):
* bindings/js/JSWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextCustom.cpp.
(WebCore::JSWorkerGlobalScope::visitChildren):
(WebCore::JSWorkerGlobalScope::getOwnPropertySlotDelegate):
(WebCore::JSWorkerGlobalScope::getOwnPropertyDescriptorDelegate):
(WebCore::JSWorkerGlobalScope::importScripts):
(WebCore::JSWorkerGlobalScope::setTimeout):
(WebCore::JSWorkerGlobalScope::setInterval):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScheduledAction.h:
* bindings/js/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::startForWorkerGlobalScope):
(WebCore::ScriptProfiler::stopForWorkerGlobalScope):
* bindings/js/ScriptProfiler.h:
* bindings/js/ScriptState.cpp:
(WebCore::scriptStateFromWorkerGlobalScope):
* bindings/js/ScriptState.h:
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::WorkerScriptController):
(WebCore::WorkerScriptController::~WorkerScriptController):
(WebCore::WorkerScriptController::initScript):
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):
(WebCore::WorkerScriptController::forbidExecution):
(WebCore::WorkerScriptController::isExecutionForbidden):
(WebCore::WorkerScriptController::disableEval):
(WebCore::WorkerScriptController::attachDebugger):
(WebCore::WorkerScriptController::detachDebugger):
* bindings/js/WorkerScriptController.h:
(WebCore::WorkerScriptController::workerGlobalScopeWrapper):
(WebCore::WorkerScriptController::initScriptIfNeeded):
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
(WebCore::WorkerScriptDebugServer::addListener):
(WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
(WebCore::WorkerScriptDebugServer::removeListener):
(WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
* bindings/js/WorkerScriptDebugServer.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocess-idls.pl:
* dom/ActiveDOMObject.cpp:
* dom/EventTarget.h:
* dom/EventTargetFactory.in:
* dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::createdMessagePort):
(WebCore::ScriptExecutionContext::destroyedMessagePort):
(WebCore::ScriptExecutionContext::vm):
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::isWorkerGlobalScope):
* inspector/InjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createForWorker):
(WebCore::InjectedScriptManager::canAccessInspectedWorkerGlobalScope):
* inspector/InjectedScriptManager.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
(WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
(WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
(WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
(WebCore::WorkerProfilerAgent::startProfiling):
(WebCore::WorkerProfilerAgent::stopProfiling):
(WebCore::InspectorProfilerAgent::create):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorRuntimeAgent.h:
* inspector/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::connectToWorker):
(WebCore::InspectorWorkerAgent::disconnectFromWorker):
(WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
(WebCore::InspectorWorkerAgent::workerGlobalScopeTerminated):
(WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
(WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
* inspector/InspectorWorkerAgent.h:
* inspector/InstrumentingAgents.cpp:
(WebCore::instrumentationForWorkerGlobalScope):
* inspector/InstrumentingAgents.h:
* inspector/WorkerDebuggerAgent.cpp:
(WebCore::WorkerDebuggerAgent::create):
(WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
(WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
(WebCore::WorkerDebuggerAgent::injectedScriptForEval):
* inspector/WorkerDebuggerAgent.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::connectFrontend):
* inspector/WorkerInspectorController.h:
* inspector/WorkerRuntimeAgent.cpp:
(WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
(WebCore::WorkerRuntimeAgent::injectedScriptForEval):
(WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
* inspector/WorkerRuntimeAgent.h:
(WebCore::WorkerRuntimeAgent::create):
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
(WebCore::ThreadableLoader::loadResourceSynchronously):
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::loadResourceSynchronously):
(WebCore::workerGlobalScopeDidSendData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
(WebCore::workerGlobalScopeDidReceiveResponse):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
(WebCore::workerGlobalScopeDidReceiveData):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
(WebCore::workerGlobalScopeDidFinishLoading):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
(WebCore::workerGlobalScopeDidFail):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
(WebCore::workerGlobalScopeDidFailAccessControlCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
(WebCore::workerGlobalScopeDidFailRedirectCheck):
(WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
* loader/WorkerThreadableLoader.h:
(WebCore::WorkerThreadableLoader::create):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromCache):
* platform/blackberry/LocalFileSystemBlackBerry.cpp:
(WebCore::openFileSystem):
(WebCore::LocalFileSystem::deleteFileSystem):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
(WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
(WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
(WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.h:
(WebCore::WorkerAsyncFileSystemBlackBerry::create):
* platform/blackberry/WorkerAsyncFileWriterBlackBerry.h:
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
(WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
* platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
* platform/blackberry/WorkerPlatformFileWriterClient.cpp:
(WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
* platform/blackberry/WorkerPlatformFileWriterClient.h:
* workers/DedicatedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/DedicatedWorkerContext.cpp.
(WebCore::DedicatedWorkerGlobalScope::create):
(WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
(WebCore::DedicatedWorkerGlobalScope::~DedicatedWorkerGlobalScope):
(WebCore::DedicatedWorkerGlobalScope::interfaceName):
(WebCore::DedicatedWorkerGlobalScope::postMessage):
(WebCore::DedicatedWorkerGlobalScope::importScripts):
(WebCore::DedicatedWorkerGlobalScope::thread):
* workers/DedicatedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/DedicatedWorkerContext.h.
* workers/DedicatedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/DedicatedWorkerContext.idl.
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
(WebCore::DedicatedWorkerThread::runEventLoop):
* workers/DedicatedWorkerThread.h:
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::SharedWorkerProxy::workerGlobalScopeClosed):
(WebCore::SharedWorkerProxy::workerGlobalScopeDestroyed):
(WebCore::SharedWorkerConnectTask::performTask):
(WebCore::SharedWorkerScriptLoader::notifyFinished):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
* workers/SharedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/SharedWorkerContext.cpp.
(WebCore::createConnectEvent):
(WebCore::SharedWorkerGlobalScope::create):
(WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
(WebCore::SharedWorkerGlobalScope::~SharedWorkerGlobalScope):
(WebCore::SharedWorkerGlobalScope::interfaceName):
(WebCore::SharedWorkerGlobalScope::thread):
(WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
* workers/SharedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/SharedWorkerContext.h.
(WebCore::SharedWorkerGlobalScope::name):
* workers/SharedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/SharedWorkerContext.idl.
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::createWorkerGlobalScope):
* workers/SharedWorkerThread.h:
* workers/Worker.cpp:
(WebCore::Worker::Worker):
(WebCore::Worker::postMessage):
(WebCore::Worker::terminate):
(WebCore::Worker::notifyFinished):
* workers/Worker.h:
* workers/WorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/WorkerContext.cpp.
(WebCore::CloseWorkerGlobalScopeTask::create):
(WebCore::CloseWorkerGlobalScopeTask::performTask):
(WebCore::CloseWorkerGlobalScopeTask::isCleanupTask):
(WebCore::WorkerGlobalScope::WorkerGlobalScope):
(WebCore::WorkerGlobalScope::~WorkerGlobalScope):
(WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
(WebCore::WorkerGlobalScope::scriptExecutionContext):
(WebCore::WorkerGlobalScope::virtualURL):
(WebCore::WorkerGlobalScope::virtualCompleteURL):
(WebCore::WorkerGlobalScope::completeURL):
(WebCore::WorkerGlobalScope::userAgent):
(WebCore::WorkerGlobalScope::disableEval):
(WebCore::WorkerGlobalScope::location):
(WebCore::WorkerGlobalScope::close):
(WebCore::WorkerGlobalScope::navigator):
(WebCore::WorkerGlobalScope::hasPendingActivity):
(WebCore::WorkerGlobalScope::postTask):
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::clearTimeout):
(WebCore::WorkerGlobalScope::clearInspector):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::clearInterval):
(WebCore::WorkerGlobalScope::importScripts):
(WebCore::WorkerGlobalScope::errorEventTarget):
(WebCore::WorkerGlobalScope::logExceptionToConsole):
(WebCore::WorkerGlobalScope::addConsoleMessage):
(WebCore::WorkerGlobalScope::addMessage):
(WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
(WebCore::WorkerGlobalScope::isContextThread):
(WebCore::WorkerGlobalScope::isJSExecutionForbidden):
(WebCore::WorkerGlobalScope::eventTargetData):
(WebCore::WorkerGlobalScope::ensureEventTargetData):
(WebCore::WorkerGlobalScope::Observer::Observer):
(WebCore::WorkerGlobalScope::Observer::~Observer):
(WebCore::WorkerGlobalScope::Observer::stopObserving):
(WebCore::WorkerGlobalScope::registerObserver):
(WebCore::WorkerGlobalScope::unregisterObserver):
(WebCore::WorkerGlobalScope::notifyObserversOfStop):
(WebCore::WorkerGlobalScope::eventQueue):
* workers/WorkerGlobalScope.h: Renamed from Source/WebCore/workers/WorkerContext.h.
(WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope):
(WebCore::WorkerGlobalScope::isDedicatedWorkerGlobalScope):
(WebCore::WorkerGlobalScope::url):
(WebCore::WorkerGlobalScope::groupSettings):
(WebCore::WorkerGlobalScope::script):
(WebCore::WorkerGlobalScope::clearScript):
(WebCore::WorkerGlobalScope::thread):
(WebCore::WorkerGlobalScope::self):
(WebCore::WorkerGlobalScope::workerInspectorController):
(WebCore::WorkerGlobalScope::optionalNavigator):
(WebCore::WorkerGlobalScope::optionalLocation):
(WebCore::WorkerGlobalScope::isClosing):
* workers/WorkerGlobalScope.idl: Renamed from Source/WebCore/workers/WorkerContext.idl.
* workers/WorkerGlobalScopeProxy.h: Renamed from Source/WebCore/workers/WorkerContextProxy.h.
(WebCore::WorkerGlobalScopeProxy::~WorkerGlobalScopeProxy):
(WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector):
(WebCore::WorkerGlobalScopeProxy::connectToInspector):
(WebCore::WorkerGlobalScopeProxy::disconnectFromInspector):
(WebCore::WorkerGlobalScopeProxy::sendMessageToInspector):
* workers/WorkerLoaderProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::MessageWorkerGlobalScopeTask::create):
(WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask):
(WebCore::MessageWorkerGlobalScopeTask::performTask):
(WebCore::WorkerGlobalScopeDestroyedTask::create):
(WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask):
(WebCore::WorkerGlobalScopeDestroyedTask::performTask):
(WebCore::WorkerTerminateTask::performTask):
(WebCore::PostMessageToPageInspectorTask::performTask):
(WebCore::WorkerGlobalScopeProxy::create):
(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
(WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal):
(WebCore::connectToWorkerGlobalScopeInspectorTask):
(WebCore::WorkerMessagingProxy::connectToInspector):
(WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
(WebCore::WorkerMessagingProxy::disconnectFromInspector):
(WebCore::dispatchOnInspectorBackendTask):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
(WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
(WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerObjectProxy.h:
* workers/WorkerReportingProxy.h:
* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::run):
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::runCleanupTasks):
(WebCore::WorkerRunLoop::Task::performTask):
* workers/WorkerRunLoop.h:
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):
(WebCore::WorkerThread::runEventLoop):
(WebCore::WorkerThreadShutdownFinishTask::performTask):
(WebCore::WorkerThreadShutdownStartTask::performTask):
(WebCore::WorkerThread::stop):
* workers/WorkerThread.h:
(WebCore::WorkerThread::workerGlobalScope):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode):
(WebCore::XMLHttpRequest::responseXML):
2013-06-26 Sanjoy Pal <sanjoy.pal@samsung.com>
Avoid redundant checks for Compositing reasons in RenderLayerCompositor
https://bugs.webkit.org/show_bug.cgi?id=118114
Reviewed by Anders Carlsson.
A RenderObject can be any one of the Video, Canvas, Plugin or Iframe.
Hence removing the redundant checks.
No new tests as no functionality change.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reasonsForCompositing):
2013-06-26 Gwang Yoon Hwang <ryumiel@company100.net>
Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
https://bugs.webkit.org/show_bug.cgi?id=104360
Reviewed by Noam Rosenthal.
The CoordinatedLayerTreeHost has too many responsibilities. It
implements LayerTreeHost, GraphicsLayerClient,
CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
UpdateAtlas::Client, GraphicsLayerFactory and
WebCustomFilterProgramProxyClient.
This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
This patch introduces a new class called CompositingCoordinator, which
takes the responsibility of managing compositing resources in
WebProcess.
CoordinatedLayerTreeHost is responsible only for the scheduling and
IPC-specific stuff, which are relevant only for WebKit2.
No new tests, covered by existing tests.
* CMakeLists.txt:
* Target.pri:
* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
(WebCore::CompositingCoordinator::create):
(WebCore::CompositingCoordinator::~CompositingCoordinator):
(WebCore::CompositingCoordinator::CompositingCoordinator):
(WebCore::CompositingCoordinator::setRootCompositingLayer):
(WebCore::CompositingCoordinator::sizeDidChange):
(WebCore::CompositingCoordinator::flushPendingLayerChanges):
(WebCore::CompositingCoordinator::syncDisplayState):
(WebCore::CompositingCoordinator::nextAnimationServiceTime):
(WebCore::CompositingCoordinator::clearPendingStateChanges):
(WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
(WebCore::CompositingCoordinator::createRootLayer):
(WebCore::CompositingCoordinator::syncLayerState):
(WebCore::CompositingCoordinator::createImageBackingIfNeeded):
(WebCore::CompositingCoordinator::createImageBacking):
(WebCore::CompositingCoordinator::updateImageBacking):
(WebCore::CompositingCoordinator::clearImageBackingContents):
(WebCore::CompositingCoordinator::removeImageBacking):
(WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
(WebCore::CompositingCoordinator::notifyAnimationStarted):
(WebCore::CompositingCoordinator::notifyFlushRequired):
(WebCore::CompositingCoordinator::paintContents):
(WebCore::CompositingCoordinator::createGraphicsLayer):
(WebCore::CompositingCoordinator::deviceScaleFactor):
(WebCore::CompositingCoordinator::pageScaleFactor):
(WebCore::CompositingCoordinator::createUpdateAtlas):
(WebCore::CompositingCoordinator::removeUpdateAtlas):
(WebCore::CompositingCoordinator::visibleContentsRect):
(WebCore::CompositingCoordinator::mainContentsLayer):
(WebCore::CompositingCoordinator::setVisibleContentsRect):
(WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
(WebCore::CompositingCoordinator::detachLayer):
(WebCore::CompositingCoordinator::commitScrollOffset):
(WebCore::CompositingCoordinator::renderNextFrame):
(WebCore::CompositingCoordinator::purgeBackingStores):
(WebCore::CompositingCoordinator::paintToSurface):
(WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
* platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
(WebCore::CompositingCoordinator::clearRootLayer):
(WebCore::CompositingCoordinator::rootLayer):
(WebCore::CompositingCoordinator::state):
2013-06-26 Kihong Kwon <kihong.kwon@samsung.com>
Vibration cannot be canceled during pattern vibration.
https://bugs.webkit.org/show_bug.cgi?id=117822
Reviewed by Gyuyoung Kim.
Vibration can not cancel during pattern vibration is working. If resting time which are
even numbers of pattern m_isVibraing will be false and cancel will thus return early.
In addition, m_timerStart needs to be stopped in the cancelVibration().
If cancelVibration() is called right after m_timerStart is fired, timerStartFired
function can be called even if vibration is already canceled because of timing issue of timer.
Test: vibration/cancelVibration-during-pattern-vibrating.html
* Modules/vibration/Vibration.cpp:
(WebCore::Vibration::vibrate):
(WebCore::Vibration::cancelVibration):
(WebCore::Vibration::suspendVibration):
(WebCore::Vibration::resumeVibration):
(WebCore::Vibration::stopVibration):
(WebCore::Vibration::timerStartFired):
(WebCore::Vibration::timerStopFired):
* Modules/vibration/Vibration.h:
2013-06-26 Anders Carlsson <andersca@apple.com>
Deprecate StringImpl::charactersWithNullTermination
https://bugs.webkit.org/show_bug.cgi?id=118108
Reviewed by Beth Dakin.
Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.
* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::getLinkedFonts):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::createIconForFiles):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
* platform/graphics/wince/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData):
* platform/network/curl/CurlDownload.cpp:
(CurlDownload::moveFileToDestination):
* platform/network/win/CookieJarWin.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
* platform/network/win/DownloadBundleWin.cpp:
(WebCore::DownloadBundle::appendResumeData):
(WebCore::DownloadBundle::extractResumeData):
* platform/network/win/ResourceHandleWin.cpp:
(WebCore::createInternetHandle):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::fileLoadTimer):
* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase):
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::prepare):
* platform/text/win/LocaleWin.cpp:
(WebCore::LCIDFromLocaleInternal):
* platform/text/win/TextCodecWin.cpp:
(WebCore::TextCodecWin::enumerateSupportedEncodings):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::getWebLocData):
(WebCore::createGlobalData):
(WebCore::setFileDescriptorData):
(WebCore::getURL):
(WebCore::setCFData):
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageIconForCachedImageFilename):
* platform/win/FileSystemWin.cpp:
(WebCore::getFindData):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::pathByAppendingComponent):
(WebCore::makeAllDirectories):
(WebCore::pathGetFileName):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* platform/win/MIMETypeRegistryWin.cpp:
(WebCore::mimeTypeForExtension):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/win/PasteboardWin.cpp:
(WebCore::createGlobalImageFileDescriptor):
(WebCore::createGlobalHDropContent):
* platform/win/PathWalker.cpp:
(WebCore::PathWalker::PathWalker):
* platform/win/SSLKeyGeneratorWin.cpp:
(WebCore::WebCore::signedPublicKeyAndChallengeString):
* platform/win/SharedBufferWin.cpp:
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/wince/FileSystemWinCE.cpp:
(WebCore::getFileInfo):
(WebCore::fileExists):
(WebCore::deleteFile):
(WebCore::deleteEmptyDirectory):
(WebCore::makeAllDirectories):
(WebCore::openTemporaryFile):
(WebCore::openFile):
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::PluginDatabase::getPluginPathsInDirectories):
(WebCore::addMozillaPluginDirectories):
(WebCore::addAdobeAcrobatPluginDirectory):
(WebCore::addJavaPluginDirectory):
* plugins/win/PluginPackageWin.cpp:
(WebCore::getVersionInfo):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::handlePostReadFile):
2013-06-26 Roger Fong <roger_fong@apple.com>
Add an accessibility delegate interface to AppleWin port.
https://bugs.webkit.org/show_bug.cgi?id=118094.
Reviewed by Brent Fulgham.
* accessibility/win/AXObjectCacheWin.cpp: We call the page client's AXStartFrameLoad and AXFinishFrameLoad methods here, which will in turn call the AccessibilityDelegate's callbacks.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::AXStartFrameLoad):
(WebCore::EmptyChromeClient::AXFinishFrameLoad):
* page/ChromeClient.h:
2013-06-26 Jer Noble <jer.noble@apple.com>
Potential use-after-free after neutering AudioBuffer's underlying ArrayBuffer.
https://bugs.webkit.org/show_bug.cgi?id=118040
Reviewed by Filip Pizlo.
Test: webaudio/audiobuffer-neuter.html
When creating an AudioBuffer's backing ArrayBufferView objects, mark them as 'unneuterable',
meaning the underlying data will be copied in a neuter scenario rather than transferred. This
means the underlying assumtions of the webaudio code can continue to assume that the memory
areas owned by the ArrayBufferView will be present until the AudioBuffer is itself destroyed.
In order to not expose the 'unneuterable' behavior to JavaScript, return a fresh Float32Array
wrapper around the ArrayBuffer object, rather than our own.
* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::AudioBuffer): Mark the newly created channels as not neuterable.
(WebCore::AudioBuffer::getChannelData): Return a new Float32Array object rather than a pointer to our own.
* Modules/webaudio/AudioBuffer.h:
2013-06-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build correction after r152035.
* page/CaptionUserPreferencesMediaAF.cpp: Don't attempt to include CoreText.h
if we do not have MediaAccessibility Framework.
2013-06-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Enable CaptionUserPreferencesMediaAF on Windows.
https://bugs.webkit.org/show_bug.cgi?id=118076
Reviewed by Eric Carlson.
* WebCore.vcxproj/WebCore.vcxproj: Enable building the CaptionUserPreferencesMediaAF source file.
* page/CaptionUserPreferencesMediaAF.cpp: Add soft-link commands for CoreText symbols needed in
the implementation for Windows.
* platform/LocalizedStrings.cpp: Enable Text Track-related strings on Windows.
* platform/LocalizedStrings.h: Ditto.
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Speed up SVG sprites by only painting the source rect in SVGImage::draw
https://bugs.webkit.org/show_bug.cgi?id=118070
Reviewed by Tim Horton.
Merge https://chromium.googlesource.com/chromium/blink/+/d359ab67fdd76a877d666dca91c311505dd27bbf.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
2013-06-26 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r151981): Include HTMLAudioElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
* css/StyleResolver.cpp:
- Include HTMLAudioElement.h.
- Sort headers.
* rendering/RenderLayerCompositor.cpp:
- Include HTMLAudioElement.h.
2013-06-26 Yuki Sekiguchi <yuki.sekiguchi@access-company.com>
getComputedStyle().width wrong after text changed
https://bugs.webkit.org/show_bug.cgi?id=106611
Reviewed by Dean Jackson.
When a new RenderText is created, NodeRenderingContext::createRendererForTextIfNeeded() sets a style to the RenderText.
If a font in the new style needs transcode (e.g. Meiryo), styleDidChange() calls transformText().
It sets a preferredLogicalWidthsDirty flag.
After that, createRendererForTextIfNeeded() inserts the RenderText to its parent renderer.
However, RenderObjectChildList::insertChildNode() doesn't set a preferredLogicalWidthsDirty flag of owner
because a preferredLogicalWidthsDirty flag of the RenderText is already true.
Inserting new child should always sets a preferredLogicalWidthsDirty flag.
Therefore, this patch called setPreferredLogicalWidthsDirty() of owner.
Test: fast/dynamic/empty-absolute-innerhtml-transcoding-text.html
* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::insertChildNode):
2013-06-26 Brent Fulgham <bfulgham@apple.com>
Prepare CaptionUserPreferencesMac for use on Windows port.
https://bugs.webkit.org/show_bug.cgi?id=118069
Reviewed by Eric Carlson.
* WebCore.vcxproj/WebCore.vcxproj: Add new files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Update for new file name.
* page/CaptionUserPreferencesMac.h: Removed.
* page/CaptionUserPreferencesMac.mm: Removed.
* page/CaptionUserPreferencesMediaAF.cpp: Copied from page/CaptionUserPreferencesMac.mm.
* page/CaptionUserPreferencesMediaAF.h: Copied from page/CaptionUserPreferencesMac.h.
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferences): Updated to new class name.
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Remove unneccesary cast to Node* in MediaControlTextTrackContainerElement::updateDisplay
https://bugs.webkit.org/show_bug.cgi?id=118020
Reviewed by Christophe Dumez.
Merge https://chromium.googlesource.com/chromium/blink/+/2de89f61bb316f5e166b45ce71bb2b293dbf575d
TextTrackCue is a Node, there's no reason to static_cast from it to Node*.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
RenderBox::hasRenderOverflow should return bool instead of RenderOverflow*
https://bugs.webkit.org/show_bug.cgi?id=118041
Reviewed by Christophe Dumez.
Merge https://chromium.googlesource.com/chromium/blink/+/1683b58c855b745463acbf18086e32279db5000f.
* rendering/RenderBox.h:
(WebCore::RenderBox::hasRenderOverflow):
(WebCore::RenderBox::hasHorizontalLayoutOverflow):
(WebCore::RenderBox::hasVerticalLayoutOverflow):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Remove unneeded static_casts from SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=118018
Reviewed by Christophe Dumez.
Merge https://chromium.googlesource.com/chromium/blink/+/adc5b8bec2d8c6a857b3c930ca7484f76cad1367
SelectorChecker::checkOne casts to StyledElement just to call classNames, but
this method is on Element so there's no reason for this. The cast here also
looks pretty suspect. The method also casts to HTMLFrameElementBase to call
containsFullScreenElement which is also on Element so the cast can be removed.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Set Attr.ownerDocument in Element#setAttributeNode()
https://bugs.webkit.org/show_bug.cgi?id=118031
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/fa739fe5369f55bbdcb3fa123cb64df36b8ae414.
Adopt Attr node as needed.
Test: fast/dom/Attr/set-attribute-node-from-iframe.html
* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
2013-06-25 David Hyatt <hyatt@apple.com>
Flex boxes (both old and new) don't handle max-height images correctly.
https://bugs.webkit.org/show_bug.cgi?id=118000
Reviewed by Beth Dakin.
Tests: css3/flexbox/image-percent-max-height.html
fast/flexbox/image-percent-max-height.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
(WebCore::RenderBlock::layoutBlockChildren):
Pull the percentage height descendant code that dirties those descendants
out of layoutBlockChildren and into a protected helper function,
dirtyForLayoutFromPercentageHeightDescendants, that can be called from the
flex box code.
Also patch dirtyForLayoutFromPercentageHeightDescendants so that it will dirty
preferred logical widths when a child has an aspect ratio, since we know that
percentage height changes will potentially affect the preferred widths of the image and
its ancestor blocks.
* rendering/RenderBlock.h:
Declaration of the new dirtyForLayoutFromPercentageHeightDescendants function.
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
Make the old flex box code call dirtyForLayoutFromPercentageHeightDescendants so
that everything is dirtied properly.
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
Remove the isReplaced()/percentage height/width dirtying now that the old flexible
box is using the same dirtying mechanism as RenderBlock.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
Patch the new flexible box code to use the dirtying mechanism that RenderBlock
uses for percentage heights/widths on replaced descendants.
* rendering/RenderObject.h:
(WebCore::RenderObject::hasAspectRatio):
Pulled the static helper function from RenderReplaced into a full-blown method
on RenderObject, so that dirtyForLayoutFromPercentageHeightDescendants can call
it to check if an object has an aspect ratio.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
(WebCore::RenderReplaced::computeIntrinsicRatioInformation):
Patch the call sites of the static helper function to use hasAspectRatio instead
and get rid of the static in the cpp file.
2013-06-26 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLAreaElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117980
Reviewed by Antonio Gomes.
To enhance readibility, this patch adopts is/toHTMLAreaElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::getDocumentLinks):
(WebCore::AccessibilityRenderObject::accessibilityHitTest):
(WebCore::AccessibilityRenderObject::addImageMapChildren):
* html/HTMLAreaElement.h:
(WebCore::isHTMLAreaElement):
(WebCore::toHTMLAreaElement):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusDirectionally):
* page/SpatialNavigation.cpp:
(WebCore::FocusCandidate::FocusCandidate):
(WebCore::areElementsOnSameLine):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteLinkURL):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
2013-06-26 Brady Eidson <beidson@apple.com>
[Mac] Document URL is not updated by HSTS
<rdar://problem/14241270> and https://bugs.webkit.org/show_bug.cgi?id=118003
Patch started by Alexey Proskuryakov, finished by Brady Eidson.
Reviewed by Brady Eidson and then Alexey Proskuryakov.
Synthesize a response and properly handle willSendRequest when the URL changes in a way that's typical for HSTS.
* platform/network/mac/WebCoreURLResponse:
* platform/network/mac/WebCoreURLResponse:
(WebCore::synthesizeRedirectResponseIfNecessary): Synthesize a redirect response and when the URL changes in a way that's
typical for HSTS connections.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Call synthesizeRedirectResponseIfNecessary.
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): Ditto.
2013-06-26 Andrei Bucur <abucur@adobe.com>
[CSS Regions] fast/regions/seamless-iframe-flowed-into-regions.html asserts
https://bugs.webkit.org/show_bug.cgi?id=117797
Reviewed by Antti Koivisto.
The seamless iframes inherit the current RenderFlowThread during layout. This means getting
the LayoutState object from the flow thread RenderView object is not always correct.
For RenderObjects inside the seamless iframes the view()/LayoutState object is different than the one
of the RenderFlowThread. The patch changes the code to use the correct LayoutState object during
layout when pushing a new state.
Tests: covered by fast/regions/seamless-iframe-flowed-into-regions.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::currentActiveRenderBox):
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
(WebCore::RenderFlowThread::popFlowThreadLayoutState):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Remove many static_casts to Element types from AccessibilityNodeObject
https://bugs.webkit.org/show_bug.cgi?id=118021
Reviewed by Chris Fleizach.
Merge https://chromium.googlesource.com/chromium/blink/+/ecd837f94996a20fdb8798e24f26cf6edea2a423.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isReadOnly):
(WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
(WebCore::AccessibilityNodeObject::text):
2013-06-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
https://bugs.webkit.org/show_bug.cgi?id=118029
Reviewed by Kentaro Hara.
Stop inheriting SVGExternalResourcesRequired, SVGFitToViewBox and SVGZoomAndPan
in the IDL and use implements statements instead.
This is one step towards getting rid of multiple inheritance in the SVG code
and matching the latest specification:
http://www.w3.org/TR/SVG2/types.html#BasicDOMInterfaces
There is no webexposed behavior change.
No new tests, no behavior change.
* svg/SVGAnimationElement.idl:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDefsElement.idl:
* svg/SVGEllipseElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.idl:
* svg/SVGGradientElement.idl:
* svg/SVGImageElement.idl:
* svg/SVGLineElement.idl:
* svg/SVGMPathElement.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGRectElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGSwitchElement.idl:
* svg/SVGSymbolElement.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGUseElement.idl:
* svg/SVGViewSpec.idl:
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Use-after-free in RadioInputType::handleKeydownEvent
https://bugs.webkit.org/show_bug.cgi?id=118035
Reviewed by Kent Tamura.
Use RefPtr for inputElement since setFocusedNode could blow it away.
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
2013-06-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of multiple inheritence for SVGViewElement interface
https://bugs.webkit.org/show_bug.cgi?id=118014
Reviewed by Kentaro Hara.
Web IDL no longer supports multiple inheritence. As per the latest
specification SVGViewElement should only inherit from SVGElement.
'implements' statements are used for the rest. This patch refactors
the IDL files to match the latest specification:
http://www.w3.org/TR/SVG2/linking.html#InterfaceSVGViewElement
Note that there is a WebExposed change as SVGZoomAndPan used to be
exposed on the Window and it is not anymore. SVGZoomAndPan merely
supplements SVGViewElement and should not be exposed to JavaScript
according to the latest specification.
No new tests, covered by existing tests.
* CMakeLists.txt:
* DerivedSources.pri:
* GNUmakefile.list.am:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGViewElement.idl:
* svg/SVGZoomAndPan.idl:
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Mark SVG(Circle|Path|Rect)Element::createRenderer() with OVERRIDE
https://bugs.webkit.org/show_bug.cgi?id=118037
Reviewed by Philip Rogers.
Merge https://chromium.googlesource.com/chromium/blink/+/e8196920e769ab0786b2b4b21d3fdc2d87afef0d.
* svg/SVGCircleElement.h:
* svg/SVGPathElement.h:
* svg/SVGRectElement.h:
2013-06-26 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLAudioElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117985
Reviewed by Jer Noble.
To enhance readibility, this patch adopts is/toHTMLAudioElement.
This also helps out to reduce duplicated use of static_cast.
* bindings/js/JSNodeCustom.cpp:
(WebCore::isReachableFromDOM):
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithElement):
* html/HTMLAudioElement.h:
(WebCore::isHTMLAudioElement):
(WebCore::toHTMLAudioElement):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaElement):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForVideo):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintMediaMuteButton):
(WebCore::RenderThemeMac::paintMediaPlayButton):
2013-06-26 Ryosuke Niwa <rniwa@webkit.org>
Refactoring: Fold Document::focusedNodeRemoved into Document::removeFocusedNodeOfSubtree
https://bugs.webkit.org/show_bug.cgi?id=118036
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/3391beabe75548cc638a6c88982f913621a4410f.
* dom/Document.cpp:
(WebCore::Document::removeFocusedNodeOfSubtree):
* dom/Document.h:
2013-06-25 Ryosuke Niwa <rniwa@webkit.org>
JSString should remember AtomicString
https://bugs.webkit.org/show_bug.cgi?id=117386
Reviewed by Geoffrey Garen.
Added "Atomic" attribute as a WebKit extension to WebIDL, and deployed it in Element.idl and Node.idl so that
the binding code can use newly added JSValue::toAtomic to update JSString's m_value.
* bindings/js/JSDOMBinding.cpp:
(WebCore::valueToAtomicStringWithNullCheck): Added.
(WebCore::valueToAtomicStringWithUndefinedOrNullCheck): Added.
* bindings/js/JSDOMBinding.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GetNativeTypeFromSignature): Return const AtomicString& when either Atomic attribute is specified or the type is
Reflect. Note that setAttribute and getAttribute both use AtomicString for all arguments.
(JSValueToNative): Use AtomicString equivalents when possible when converting DOMString to a WebCore object.
* bindings/scripts/IDLAttributes.txt: Added "Atomic" attribute.
* bindings/scripts/test/JS/JSTestObj.cpp: Baselined test cases.
(WebCore::setJSTestObjReflectedStringAttr):
(WebCore::setJSTestObjReflectedURLAttr):
(WebCore::setJSTestObjReflectedCustomURLAttr):
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
2013-06-25 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLAnchorElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117973
Reviewed by Andreas Kling.
To enhance readibility, this patch adopts is/toHTMLAnchorElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::anchorElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::internalLinkElement):
(WebCore::AccessibilityRenderObject::url):
(WebCore::AccessibilityRenderObject::stringValueForMSAA):
(WebCore::AccessibilityRenderObject::isLinked):
* css/CSSDefaultStyleSheets.cpp:
(WebCore::elementCanUseSimpleDefaultStyle):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
* dom/Document.cpp:
(WebCore::Document::updateBaseURL):
* dom/TreeScope.cpp:
(WebCore::TreeScope::findAnchor):
* dom/VisitedLinkState.cpp:
(WebCore::linkHashForElement):
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* html/HTMLAnchorElement.h:
(WebCore::isHTMLAnchorElement):
(WebCore::toHTMLAnchorElement):
* page/DragController.cpp:
(WebCore::DragController::draggableElement):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteLinkURL):
(WebCore::HitTestResult::isLiveLink):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
2013-06-25 Dean Jackson <dino@apple.com>
Don't snapshot plug-ins that come from the same host as the page
https://bugs.webkit.org/show_bug.cgi?id=117969
<rdar://problem/12885400>
Reviewed by Tim Horton.
If a page is serving plug-in content directly, then that content
is typically very important to the page. For example, embedding
a video or audio player. In this case, don't snapshot the plug-ins.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Add a test
that compares the plug-in's URL against the main page's URL and don't snapshot
if they are the same.
2013-06-25 Alex Christensen <achristensen@apple.com>
Added PLATFORM(WIN) to many places where it was missing for compiling WebGL for Windows.
https://bugs.webkit.org/show_bug.cgi?id=117955
Reviewed by Brent Fulgham.
* platform/graphics/GraphicsContext3D.cpp:
* platform/graphics/OpenGLShims.cpp:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp: Include new location of ShaderLang.h on Windows as of r151854.
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES):
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: Added PLATFORM(WIN) when necessary to each file.
2013-06-25 Bruno de Oliveira Abinader <brunoabinader@gmail.com>
Fixes a typo in renderTextDecorationFlagsToCSSValue
https://bugs.webkit.org/show_bug.cgi?id=117989
Reviewed by Gyuyoung Kim.
Return value should be PassRefPtr instead of RefPtr.
Backported from Blink:
https://src.chromium.org/viewvc/blink?view=rev&revision=152994
No new tests, no behavior change.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationFlagsToCSSValue):
2013-06-25 Santosh Mahto <santosh.ma@samsung.com>
"application/x-mimearchive" should be included in finding remoteWebArchive while document loading
https://bugs.webkit.org/show_bug.cgi?id=117734
Reviewed by Alexey Proskuryakov.
"application/x-mimearchive" is also used while checking for
RemoteArchive.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
2013-06-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
HTMLMediaElement should inherit from MediaPlayerClient privately
https://bugs.webkit.org/show_bug.cgi?id=117874
Reviewed by Andreas Kling.
Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
MediaPlayerClient due to the Chromium and Qt port.
The Qt port is changed to not cast from MediaPlayerClient to HTMLMediaElement.
* html/HTMLMediaElement.h:
* platform/graphics/qt/MediaPlayerPrivateQt.cpp:
(WebCore::MediaPlayerPrivateQt::commitLoad):
2013-06-25 Csaba Osztrogonác <ossy@webkit.org>
Checking if frame is complete and access duration doesn't need a decode
https://bugs.webkit.org/show_bug.cgi?id=116041
Reviewed by Allan Sandfeld Jensen.
This change is to avoid image decoding for these two operations:
1. frameIsCompleteAtIndex
2. frameDurationAtIndex
These two operations are moved to ImageDecoder interface and are now const
to prevent future regression.
We are now able to check if a frame is complete by parsing the entire GIF file
without decoding. This also provides information like frame duration such that
controller the animation doesn't require any decoding.
Based on the Blink patch by Hin-Chung Lam <hclam@google.com>
https://src.chromium.org/viewvc/blink?revision=149883&view=revision
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameIsCompleteAtIndex):
(WebCore::BitmapImage::frameDurationAtIndex):
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::frameDurationAtIndex):
(WebCore::ImageSource::frameHasAlphaAtIndex):
(WebCore::ImageSource::frameIsCompleteAtIndex):
* platform/graphics/ImageSource.h:
* platform/image-decoders/ImageDecoder.cpp:
(WebCore::ImageDecoder::frameHasAlphaAtIndex):
(WebCore::ImageDecoder::frameIsCompleteAtIndex):
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::frameDurationAtIndex):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::frameIsCompleteAtIndex):
(WebCore::GIFImageDecoder::frameDurationAtIndex):
(WebCore::GIFImageDecoder::haveDecodedRow):
(WebCore::GIFImageDecoder::gifComplete):
(WebCore::GIFImageDecoder::decode):
(WebCore::GIFImageDecoder::initFrameBuffer):
* platform/image-decoders/gif/GIFImageDecoder.h:
* platform/image-decoders/gif/GIFImageReader.h:
(GIFImageReader::frameContext):
(GIFImageReader::parseCompleted):
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Update AbstractWorker, Worker and SharedWorker to match the specification
https://bugs.webkit.org/show_bug.cgi?id=117930
Reviewed by Kentaro Hara.
Update AbstractWorker, Worker and SharedWorker to match the spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#abstractworker
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#worker
http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworker
Worker and SharedWorker no longer inherit from AbstractWorker. Web IDL 'implements'
statements are used instead. Worker and SharedWorker can now inherit from EventTarget
as per the specification.
No new tests, no behavior change.
* workers/AbstractWorker.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-06-24 Andy Estes <aestes@apple.com>
DerivedSources.make should optionally include SupplementalDependencies.dep
https://bugs.webkit.org/show_bug.cgi?id=117972
Reviewed by Dan Bernstein.
make(1) logs a non-fatal error to stderr when an included Makefile can't
be found. This error is non-fatal because after make(1) reads in all the
Makefiles it runs the recipe for any rule that specifies one of the
Makefiles as a target. Only if the Makefile is still missing after
applying these rules does the error become fatal.
Since SupplementalDependencies.dep is generated by running a script on
SupplementalDependencies.txt, the file won't exist during clean builds.
Each time make(1) logs this non-fatal error, Xcode sees it and itself
logs a non-fatal error. This is annoying.
We don't care about this error. We only care if the recipe to generate
SupplementalDependencies.dep fails, which is already a fatal error.
Suppress the error by including SupplementalDependencies.dep optionally.
* DerivedSources.make:
2013-06-24 Kangil Han <kangil.han@samsung.com>
Add support for document.currentScript
https://bugs.webkit.org/show_bug.cgi?id=104221
Reviewed by Ryosuke Niwa.
Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152230
document.currentScript reflects the script that is currently being executed.
Merge http://src.chromium.org/viewvc/blink?view=revision&revision=152237
Following up patch for code clean-up.
Tests: fast/dom/Document/document-current-script-async.html
fast/dom/Document/document-current-script.html
* dom/Document.cpp:
(WebCore::Document::pushCurrentScript):
(WebCore::Document::popCurrentScript):
* dom/Document.h:
(WebCore::Document::currentScript):
* dom/Document.idl:
* dom/ScriptElement.cpp:
(WebCore::isHTMLScriptElement):
(WebCore::isSVGScriptElement):
(WebCore::ScriptElement::executeScript):
(WebCore::toScriptElementIfPossible):
* html/HTMLScriptElement.h:
(WebCore::toHTMLScriptElement):
* svg/SVGScriptElement.cpp:
* svg/SVGScriptElement.h:
(WebCore::toSVGScriptElement):
2013-06-24 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLFormElement for code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117937
Reviewed by Andreas Kling.
This refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152859
To enhance readibility, this patch adopts is/toHTMLFormElement.
This also helps out to reduce duplicated use of static_cast.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::toHTMLFormElement):
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter):
* editing/FrameSelection.cpp:
(WebCore::scanForForm):
(WebCore::FrameSelection::currentForm):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::findAssociatedForm):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::findFormAncestor):
* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
(WebCore::HTMLFormControlsCollection::formControlElements):
(WebCore::HTMLFormControlsCollection::formImageElements):
(WebCore::HTMLFormControlsCollection::updateNameCache):
* html/HTMLFormElement.h:
(WebCore::isHTMLFormElement):
(WebCore::toHTMLFormElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
* html/HTMLNameCollection.cpp:
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
(WebCore::DocumentNameCollection::nodeMatches):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertHTMLFormElement):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::closestFormAncestor):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
2013-06-24 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove unneeded include header files from WebCore
https://bugs.webkit.org/show_bug.cgi?id=117926
Reviewed by Andreas Kling.
Merge from https://chromiumcodereview.appspot.com/17388003.
Cleanup unused includes from WebCore.
* editing/CompositeEditCommand.cpp:
* editing/DeleteSelectionCommand.cpp:
* editing/EditingStyle.cpp:
* editing/Editor.cpp:
* editing/FrameSelection.cpp:
* editing/HTMLInterchange.cpp:
* editing/IndentOutdentCommand.cpp:
* editing/InsertListCommand.cpp:
* editing/InsertTextCommand.cpp:
* editing/SpellChecker.h:
* editing/VisibleUnits.cpp:
* editing/VisibleUnits.h:
* editing/markup.cpp:
* fileapi/Blob.h:
* fileapi/File.h:
* fileapi/WebKitBlobBuilder.h:
* history/HistoryItem.cpp:
* history/HistoryItem.h:
* html/BaseDateAndTimeInputType.cpp:
* html/BaseDateAndTimeInputType.h:
* html/ClassList.cpp:
* html/ClassList.h:
* html/DOMSettableTokenList.h:
* html/DOMURL.cpp:
* html/DateInputType.h:
* html/FormController.h:
* html/HTMLCanvasElement.cpp:
* html/HTMLCollection.cpp:
* html/HTMLCollection.h:
* html/HTMLDocument.h:
* html/HTMLEmbedElement.cpp:
* html/HTMLFieldSetElement.h:
* html/HTMLFormElement.cpp:
* html/HTMLFrameOwnerElement.h:
* html/HTMLIFrameElement.cpp:
* html/HTMLInputElement.cpp:
* html/HTMLLegendElement.cpp:
* html/HTMLLinkElement.h:
* html/HTMLMediaElement.cpp:
* html/HTMLMeterElement.cpp:
* html/HTMLOptionElement.cpp:
* html/HTMLOutputElement.h:
* html/HTMLPlugInImageElement.cpp:
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
* html/HTMLSelectElement.cpp:
* html/HTMLTableElement.cpp:
* html/HTMLTitleElement.cpp:
* html/HTMLTrackElement.cpp:
* html/ImageInputType.h:
* html/InputType.h:
* html/MediaController.h:
* html/MediaFragmentURIParser.h:
* html/NumberInputType.cpp:
* html/RadioNodeList.h:
* html/TextFieldInputType.h:
* html/TypeAhead.cpp:
* html/ValidityState.cpp:
* html/canvas/CanvasPathMethods.h:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLBuffer.cpp:
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLContextObject.h:
* html/canvas/WebGLDebugShaders.cpp:
* html/canvas/WebGLObject.h:
* html/canvas/WebGLProgram.h:
* html/canvas/WebGLRenderingContext.cpp:
* html/canvas/WebGLRenderingContext.h:
* html/canvas/WebGLShader.h:
* html/canvas/WebGLTexture.h:
* html/canvas/WebGLUniformLocation.h:
* html/canvas/WebGLVertexArrayObjectOES.h:
* html/parser/BackgroundHTMLParser.cpp:
* html/parser/BackgroundHTMLParser.h:
* html/parser/CSSPreloadScanner.cpp:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLConstructionSite.h:
* html/parser/HTMLDocumentParser.h:
* html/parser/HTMLElementStack.h:
* html/parser/HTMLParserIdioms.cpp:
* html/parser/HTMLParserIdioms.h:
* html/parser/HTMLParserScheduler.h:
* html/parser/HTMLPreloadScanner.cpp:
* html/parser/HTMLSourceTracker.h:
* html/parser/HTMLTreeBuilder.h:
* html/parser/HTMLTreeBuilderSimulator.h:
* html/parser/XSSAuditor.cpp:
* html/parser/XSSAuditorDelegate.h:
* html/shadow/HTMLContentElement.cpp:
* html/shadow/HTMLContentElement.h:
* html/shadow/MediaControlElements.cpp:
* html/shadow/MediaControls.h:
* html/shadow/SliderThumbElement.cpp:
* html/shadow/SliderThumbElement.h:
* html/shadow/TextControlInnerElements.cpp:
* html/track/InbandTextTrack.h:
* html/track/LoadableTextTrack.cpp:
* html/track/LoadableTextTrack.h:
* html/track/TextTrackCueGeneric.h:
2013-06-24 Simon Fraser <simon.fraser@apple.com>
Don't crash if renderName() is called on a renderer with no style
https://bugs.webkit.org/show_bug.cgi?id=117960
Reviewed by Dave Hyatt.
Calling renderName() at the top of RenderObject::willChangeStyle() when
adding debug logging would often crash because various functions called
from renderName() assume style is non-null. Fix this.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::renderName):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::renderName):
2013-06-24 Alex Christensen <achristensen@apple.com>
Added /d option to xcopy to prevent unnecessary copying and compiling.
https://bugs.webkit.org/show_bug.cgi?id=117951
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCorePreBuild.cmd:
2013-06-24 Simon Fraser <simon.fraser@apple.com>
Fix various crashes on sites with fixed backgrounds
https://bugs.webkit.org/show_bug.cgi?id=117959
Reviewed by Andy Estes.
FrameView::removeSlowRepaintObject() would assume that addSlowRepaintObject()
had been called before it, but this isn't always the case. For example, if
a page has a fixed background on the body, this falls into the accelerated
path in WK2 tiled mode, so addSlowRepaintObject() is never called. However,
we still call removeSlowRepaintObject() if the body is removed.
So null-check m_slowRepaintObjects to avoid crashing.
Test: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html
* page/FrameView.cpp:
(WebCore::FrameView::removeSlowRepaintObject):
2013-06-24 Ruth Fong <ruth_fong@apple.com>
Expose the mediaHasAudio() function in WK2
https://bugs.webkit.org/show_bug.cgi?id=117946
<rdar://problem/14250527>
Reviewed by Beth Dakin.
* WebCore.exp.in: Updated to include symbol for
HTMLMediaElement::mediaHasAudio() function.
2013-06-24 Simon Fraser <simon.fraser@apple.com>
Move displayID stuff from Widget to Chrome
https://bugs.webkit.org/show_bug.cgi?id=117944
Reviewed by Anders Carlsson.
In r151877 I polluted Widget with displayID-related stuff. This would
be better on HostWindow, so move it there. This is a net code reduction,
and eliminates PlatformScreenMac.h, and the NSScreen category.
* WebCore.exp.in: Remove some functions from the exports list.
* WebCore.xcodeproj/project.pbxproj: PlatformScreenMac.h is gone!
* dom/Document.cpp:
(WebCore::Document::requestAnimationFrame): Get the displayID from page->chrome()
* page/Chrome.cpp:
(WebCore::Chrome::Chrome): Initialize m_displayID.
(WebCore::Chrome::displayID):
(WebCore::Chrome::windowScreenDidChange): Code moved from Page; save the
displayID, and tell all subframes that the displayID changed.
* page/Chrome.h: Add displayID-related functions.
* page/FrameView.cpp: Removed windowDisplayID().
* page/FrameView.h: Ditto.
* page/Page.cpp: Removed code.
(WebCore::Page::Page):
* page/Page.h:
* platform/HostWindow.h: Added virtual displayID-related functions.
* platform/Widget.cpp: Removed code.
* platform/Widget.h: Ditto.
* platform/mac/PlatformScreenMac.h: Removed.
* platform/mac/PlatformScreenMac.mm: Removed the NSScreen category.
(WebCore::displayIDFromScreen):
(WebCore::screenForDisplayID):
(WebCore::displayFromWidget):
(WebCore::screenForWidget):
* platform/mac/WidgetMac.mm: Removed windowDisplayID().
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Get
the displayID via chrome().
2013-06-24 Andreas Kling <akling@apple.com>
Don't create Document's selector query cache just to invalidate it.
<http://webkit.org/b/117942>
Reviewed by Anders Carlsson.
If Document::m_selectorQueryCache is null, there's nothing to invalidate,
so don't go through the trouble of creating a query cache.
* dom/Document.cpp:
(WebCore::Document::setCompatibilityMode):
(WebCore::Document::updateBaseURL):
2013-06-24 Robert Hogan <robert@webkit.org>
Refactor adding a line break
https://bugs.webkit.org/show_bug.cgi?id=117907
Reviewed by Ryosuke Niwa.
Reduce code duplication when adding a line break.
No new tests, refactoring.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::addLineBreak):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-24 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashMap: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
https://bugs.webkit.org/show_bug.cgi?id=117911
Reviewed by Anders Carlsson.
The order of the template arguments at HashMap alternate 'find', 'contains' and
'add' methods is reversed so that callers can just pass the translator
and let the compiler deduce input argument type.
Another rational is consistency with HashSet class.
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::get):
(WebCore::HTTPHeaderMap::contains):
(WebCore::HTTPHeaderMap::add):
2013-06-24 Robert Hogan <robert@webkit.org>
Remove unnecessary check in RenderBlockLineLayout::nextSegmentBreak()
https://bugs.webkit.org/show_bug.cgi?id=117713
Reviewed by David Hyatt.
Changeset r151613 should have done this instead. Since r151518 changed
nextSegmentBreak() to detect line-break opportunities between no-wrap
inlines there is no need to force the break later.
No new tests, covered by existing tests.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-24 Eric Carlson <eric.carlson@apple.com>
Potential crash when in-band track is removed
https://bugs.webkit.org/show_bug.cgi?id=117938
<rdar://problem/14246763>
Reviewed by Jer Noble.
This is timing dependent and I was unable to come up with a reliable test.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::willRemoveTextTrackPrivate): Early return if the media element
has been cleared.
2013-06-24 Chris Rogers <crogers@google.com>
WaveTable name has changed to PeriodicWave
https://bugs.webkit.org/show_bug.cgi?id=117748
Reviewed by Jer Noble.
See related Web Audio bug and spec change:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19561
https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createPeriodicWave):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::OscillatorNode):
(WebCore::OscillatorNode::setType):
(WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):
(WebCore::OscillatorNode::process):
(WebCore::OscillatorNode::setPeriodicWave):
(WebCore::OscillatorNode::propagatesSilence):
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PeriodicWave.cpp: Renamed from Source/WebCore/Modules/webaudio/WaveTable.cpp.
(WebCore::PeriodicWave::create):
(WebCore::PeriodicWave::createSine):
(WebCore::PeriodicWave::createSquare):
(WebCore::PeriodicWave::createSawtooth):
(WebCore::PeriodicWave::createTriangle):
(WebCore::PeriodicWave::PeriodicWave):
(WebCore::PeriodicWave::waveDataForFundamentalFrequency):
(WebCore::PeriodicWave::maxNumberOfPartials):
(WebCore::PeriodicWave::numberOfPartialsForRange):
(WebCore::PeriodicWave::createBandLimitedTables):
(WebCore::PeriodicWave::generateBasicWaveform):
* Modules/webaudio/PeriodicWave.h: Renamed from Source/WebCore/Modules/webaudio/WaveTable.h.
(WebCore::PeriodicWave::rateScale):
(WebCore::PeriodicWave::periodicWaveSize):
(WebCore::PeriodicWave::sampleRate):
(WebCore::PeriodicWave::numberOfRanges):
* Modules/webaudio/PeriodicWave.idl: Renamed from Source/WebCore/Modules/webaudio/WaveTable.idl.
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Commented IDL implements statements should not impact code generation
https://bugs.webkit.org/show_bug.cgi?id=117932
Reviewed by Kentaro Hara.
Fix regular expression in preprocess-idls.pl script so that commented
IDL implements statements no longer cause any code to be generated.
No new tests, covered by TestObj.idl.
* bindings/scripts/preprocess-idls.pl:
(getImplementedInterfacesFromIDL):
* bindings/scripts/test/TestObj.idl:
2013-06-24 Kangil Han <kangil.han@samsung.com>
Adopt is/toHTMLStyleElement for minor code cleanup
https://bugs.webkit.org/show_bug.cgi?id=117917
Reviewed by Antti Koivisto.
This patch refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152853
There are some usages of static_cast to HTMLStyleElement so this patch creates toHTMLStyleElement
function for code cleanup. Plus, isHTMLStyleElement is also made for same purpose.
* css/CSSStyleSheet.cpp:
(WebCore::isAcceptableCSSStyleSheetParent):
* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::scopeFor):
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::getNamedItem):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLStyleElement.h:
(WebCore::isHTMLStyleElement):
(WebCore::toHTMLStyleElement):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::inlineStyleSheetText):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Cleanup RenderThemeWin after r151783 and r151794.
https://bugs.webkit.org/show_bug.cgi?id=117936
Reviewed by Alexis Menard.
GetSysColor() takes an integer as argument. Let cssValueIdToSysColorIndex()
return an int instead of casting the values to the CSSValueID type.
* rendering/RenderThemeWin.cpp:
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWin::systemColor):
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Use SetFilePointer instead of SetFilePointerEx in FileSystemWin
https://bugs.webkit.org/show_bug.cgi?id=116205
Reviewed by Ryosuke Niwa.
SetFilePointerEx is not available on Windows CE, so use SetFilePointer.
Also add a extra return for the case of an failure.
* platform/win/FileSystemWin.cpp:
(WebCore::seekFile):
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Introduce WindowTimers IDL interface
https://bugs.webkit.org/show_bug.cgi?id=117929
Reviewed by Kentaro Hara.
Introduce WindowTimers IDL interface and have both DOMWindow and WorkerContext
implement it to match the latest specification and avoid IDL duplication:
- http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#windowtimers
- http://dev.w3.org/html5/workers/#apis-available-to-workers
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* page/DOMWindow.idl:
* page/WindowTimers.idl:
* workers/WorkerContext.idl:
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r151563.
* bindings/js/JSDOMBinding.cpp:
(WebCore::toInt8): Use fabs() instead of abs().
(WebCore::toUInt8): Ditto.
2013-06-24 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r151783.
* rendering/RenderThemeWinCE.cpp:
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWinCE::systemColor):
2013-06-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151021.
http://trac.webkit.org/changeset/151021
https://bugs.webkit.org/show_bug.cgi?id=117924
caused regressions on Qt and GTK (#117141 and #117688)
(Requested by philn on #webkit).
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init):
(webKitWebSrcFinalize):
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):
(StreamingClient::StreamingClient):
(StreamingClient::~StreamingClient):
(StreamingClient::didReceiveResponse):
(StreamingClient::didReceiveData):
(StreamingClient::didFinishLoading):
(StreamingClient::wasBlocked):
(StreamingClient::cannotShowURL):
2013-06-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move IDL implements statements to IDL files that implement the interface
https://bugs.webkit.org/show_bug.cgi?id=117921
Reviewed by Kentaro Hara.
Move IDL implements statements to IDL files that implement the interface
so that we can more easily know that a given IDL interface implements
another.
The generator now enforces this as well for consistency.
No new tests, covered by TestImplements.idl.
* bindings/scripts/preprocess-idls.pl:
(getImplementedInterfacesFromIDL):
* bindings/scripts/test/TestImplements.idl:
* bindings/scripts/test/TestInterface.idl:
* dom/CharacterData.idl:
* dom/ChildNode.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
2013-06-24 Zalan Bujtas <zalan@apple.com>
Hittest finds the truncated text instead of the floating input, when the input is clicked.
https://bugs.webkit.org/show_bug.cgi?id=115675
Reviewed by David Hyatt.
Ignore truncated text on inline textbox and everything beyond the ellipsis box on
the root inlinebox while hittesting. (provided that nodeAtPoint finds no hit for any of
the root inline's children.)
Test: fast/css/text-overflow-ellipsis-and-floating-input-hittest.html
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::nodeAtPoint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::nodeAtPoint):
(WebCore::InlineTextBox::paint):
2013-06-17 Darin Adler <darin@apple.com>
Sort all the Xcode project files
https://bugs.webkit.org/show_bug.cgi?id=117696
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
2013-06-22 Zalan Bujtas <zalan@apple.com>
Remove redundant helper from RenderRegion.
https://bugs.webkit.org/show_bug.cgi?id=117915
Reviewed by Andreas Kling.
Minor code cleanup.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
* rendering/RenderRegion.h:
2013-06-22 Mark Rowe <mrowe@apple.com>
Build fix after r151878.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading): Pass the new UseDefaultOriginRestrictionsForType
argument to the ResourceLoaderOptions constructor.
2013-06-22 Simon Fraser <simon.fraser@apple.com>
Followup from r151877 .
Fix crash in fast/frames/iframe-access-screen-of-deleted.html by null-checking the widget.
* platform/mac/PlatformScreenMac.mm:
(WebCore::screenForWidget):
2013-06-22 Hans Muller <hmuller@adobe.com>
[CSS Shapes] limit shape image values to same origin
https://bugs.webkit.org/show_bug.cgi?id=117610
Reviewed by Alexey Proskuryakov.
Restrict the image URL values for shape-inside and shape-outside to
the same origin as the document. The alpha channel of image shape values
will be thresholded to produce the shape's boundaries (see bug 116643)
so normal image access rules aren't secure enough.
Added a RequestOriginPolicy ResourceLoaderOption which is used by
StyleResolver::loadPendingShapeImage() to request the additional restriction.
The change should have no other effect although it does enable one to apply
the same restriction to other resources which can currently be loaded from
any origin - see CachedResourceLoader::canRequest().
Test: http/tests/security/shape-inside-image-origin.html
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage): Add an effectively optional ResourceLoaderOptions parameter.
* css/CSSImageValue.h:
(WebCore::CSSImageValue::cachedImage): Ditto.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShapeImage): Load the image with the default CachedResourceLoader options plus RestrictToSameOrigin.
(WebCore::StyleResolver::loadPendingImages): Call loadPendingShapeImage().
* css/StyleResolver.h:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Update the ResourceLoaderOptions static variable.
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Ditto.
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::options):
* loader/ResourceLoaderOptions.h: Add RequestOriginPolicy enum.
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Update load() ResourceLoaderOptions.
(WebCore::CachedResourceLoader::canRequest): Replaced ContentSecurityPolicyCheck parameter with ResourceLoaderOptions.
(WebCore::CachedResourceLoader::requestResource): Pass ResourceLoaderOptions along to revised CachedResourceLoader::canRequest().
(WebCore::CachedResourceLoader::defaultCachedResourceOptions): Added UseDefaultOriginRestrictionsForType initializer.
* loader/cache/CachedResourceLoader.h:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading): Added UseDefaultOriginRestrictionsForType intializer.
2013-06-22 Simon Fraser <simon.fraser@apple.com>
screen.availWidth always returns width of primary display
https://bugs.webkit.org/show_bug.cgi?id=117863
Reviewed by Geoffrey Garen.
In WebKit2, Widgets have no platformWidget, so trying to get to the
NSScreen via the platform widget's window never succeeded, and we always
fell back on getting info for the main display.
However, we were already pushing the WKView's displayID down to the
WebProcess for the requestAnimationFrame infrastructure, so use that.
Add a virtual function on Widget windowDisplayID(), that is overridden
in FrameView to return the PlatformDisplayID which Page has.
Fix PlatformScreenMac to fall back to Widget::windowDisplayID() when it fails
to get an NSWindow from the Widget.
Add a utility category on NSScreen to get an NSScreen's displayID, and to
find an NSScreen given a displayID.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::windowDisplayID):
* page/FrameView.h:
* platform/Widget.cpp:
(WebCore::Widget::windowDisplayID):
* platform/Widget.h:
* platform/mac/PlatformScreenMac.h: Added.
* platform/mac/PlatformScreenMac.mm:
(+[NSScreen screenForDislayID:]):
(-[NSScreen displayID]):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* platform/mac/WidgetMac.mm:
(WebCore::Widget::windowDisplayID):
2013-06-21 Geoffrey Garen <ggaren@apple.com>
Crashes due to NULL dereference beneath WebCore::StyleResolver::loadPendingSVGDocuments and related functions
https://bugs.webkit.org/show_bug.cgi?id=117903
<rdar://problem/14202130>
Reviewed by Darin Adler.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments): Add a NULL check for
RenderStyle here...
(WebCore::StyleResolver::loadPendingResources): ...and here.
2013-06-21 Simon Fraser <simon.fraser@apple.com>
Occasional crash swiping between pages
https://bugs.webkit.org/show_bug.cgi?id=117902
Reviewed by Beth Dakin.
m_scrollingStateTree->rootStateNode() can be null when quickly swiping between pages,
so check this in ScrollingCoordinatorMac::commitTreeState().
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
2013-06-21 Brent Fulgham <bfulgham@apple.com>
AX: Title for ListItemRole should consist of concatenated child text elements.
https://bugs.webkit.org/show_bug.cgi?id=117892
Reviewed by Chris Fleizach.
accessibility/listitem-title.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText): Add ListItemRole to set of
elements that concatenate their children for display purposes.
(WebCore::AccessibilityNodeObject::title): Ditto.
2013-06-21 Sergio Correia <sergio.correia@openbossa.org>
[MediaStream]: Remove ``>= 0'' assertion from a size_t variable
https://bugs.webkit.org/show_bug.cgi?id=117890
Reviewed by Adam Barth.
This patch fixes a strict build by removing the ``>= 0'' assertion from
a size_t (unsigned type) variable in RTCStatsResponse.cpp.
No new tests; build fix.
* Modules/mediastream/RTCStatsResponse.cpp:
(WebCore::RTCStatsResponse::addStatistic): Remove ``>=0''assertion,
since the variable is unsigned and is always >= 0.
2013-06-21 Alex Christensen <achristensen@apple.com>
GraphicsContext3DNEON.h cannot be found on Windows and does not need to be found.
https://bugs.webkit.org/show_bug.cgi?id=117894
Reviewed by Brent Fulgham.
* platform/graphics/GraphicsContext3D.cpp:
Added #if HAVE(ARM_NEON_INTRINSICS) around #include "GraphicsContext3DNEON.h"
2013-06-21 Robert Hogan <robert@webkit.org>
Ignoring padding-right of inline elements in containers with undefined width
https://bugs.webkit.org/show_bug.cgi?id=76451
Reviewed by David Hyatt.
Collapsed trailing space on a normal wrap line should not cause a line-break
if it is the difference between fitting on the line and breaking. Likewise, on a line that
has a mix of auto-wrap and no-wrap inlines we don't want a trailing space at the end of a no-wrap inline
to be the difference between that no-wrap inline fitting or breaking the line. This latter
scenario is covered already by inline-whitespace-wrapping-8.html.
Test: fast/text/whitespace/inline-whitespace-wrapping-9.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::fitsOnLine):
(WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
(WebCore::LineWidth::currentWidth):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-21 Alex Christensen <achristensen@apple.com>
Added WebGL source files to Windows build and made Windows build successfully with them.
https://bugs.webkit.org/show_bug.cgi?id=117853
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added WebGL source files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added platform\graphics\opengl and platform\graphics\gpu filters.
* WebCore.vcxproj/WebCorePreBuild.cmd: Copy ANGLE headers and glext.h before building WebCore (which now uses them).
* platform/graphics/ANGLEWebKitBridge.h: Look in newly copied directory for ShaderLang.h.
* platform/graphics/OpenGLShims.h: Include GL/glext.h.
* platform/graphics/gpu/LoopBlinnShader.cpp:
(WebCore::LoopBlinnShader::use): Fixed parameter ordering in call to uniformMatrix4fv.
* platform/graphics/opengl/GLPlatformSurface.cpp:
(WebCore::GLPlatformSurface::createOffScreenSurface): Added notImplemented for non-EGL builds for now.
2013-06-21 Eric Carlson <eric.carlson@apple.com>
Update platform text track menu
https://bugs.webkit.org/show_bug.cgi?id=117884
Reviewed by Jer Noble.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setSelectedTextTrack):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::platformTextTrack):
* platform/graphics/PlatformTextTrack.h:
(WebCore::PlatformTextTrack::create):
(WebCore::PlatformTextTrack::uniqueId):
(WebCore::PlatformTextTrack::captionMenuOffItem):
(WebCore::PlatformTextTrack::captionMenuAutomaticItem):
(WebCore::PlatformTextTrack::PlatformTextTrack):
2013-06-21 James Craig <james@cookiecrook.com>
AX: audio/video playback control timers (elapsed and remaining) should be exposed as ApplicationTimerRole
https://bugs.webkit.org/show_bug.cgi?id=117883
Reviewed by Chris Fleizach.
Some of the media controls were returning the wrong role. Updated existing test coverage.
* accessibility/AccessibilityMediaControls.h:
(WebCore::AccessibilityMediaTimeDisplay::roleValue):
2013-06-21 Alex Christensen <achristensen@apple.com>
Added glext.h from http://www.opengl.org/registry/oldspecs/glext.h for Windows
This file does not meet WebKit style guidelines.
Part of https://bugs.webkit.org/show_bug.cgi?id=117853
Reviewed by Brent Fulgham.
* platform/graphics/win/GL: Added.
* platform/graphics/win/GL/glext.h: Added.
2013-06-21 Ruth Fong <ruth_fong@apple.com>
Fix TextTrackCue::cueIndex() to handle the null case of TextTrack::cues(() properly
https://bugs.webkit.org/show_bug.cgi?id=117815
<rdar://problem/14211041>
Reviewed by Ryosuke Niwa.
This patch adds assert statements to try to catch when
track()->cues() returns a null pointer.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::cueIndex):
2013-06-21 Jer Noble <jer.noble@apple.com>
[iOS] Hang drawing captions after pressing the home button while playing a video
https://bugs.webkit.org/show_bug.cgi?id=117882
Reviewed by Eric Carlson.
Instead of rendering in a callback on the main thread, pre-render the captions and pass to the main
thread as a CGImage. As such, rename paintTextTrackRepresentation() to createTextTrackRepresentationImage().
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Renamed from
paintTextTrackRepresentation. Now returns an Image object.
* html/shadow/MediaControlElements.h:
* platform/graphics/MediaPlayer.h:
* platform/graphics/TextTrackRepresentation.h:
2013-06-21 Radu Stavila <stavila@adobe.com>
[CSS Regions] Move overset compute code from flow thread to named flow thread
https://bugs.webkit.org/show_bug.cgi?id=117835
Reviewed by Andreas Kling.
Moved computeOversetStateForRegions() and overset() methods from RenderFlowThread to RenderNamedFlowThread.
Added ASSERTS in RenderRegion::regionOversetState and RenderRegion::setRegionOversetState to ensure
the region was created from an element.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::computeOversetStateForRegions):
* rendering/RenderNamedFlowThread.h:
(WebCore::RenderNamedFlowThread::overset):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
2013-06-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151838.
http://trac.webkit.org/changeset/151838
https://bugs.webkit.org/show_bug.cgi?id=117880
Breaks MediaPlayerPrivateQt on Mac (Requested by carewolf on
#webkit).
* html/HTMLMediaElement.h:
2013-06-20 Brent Fulgham <bfulgham@apple.com>
[Windows] AX: Radio buttons with "tab" role should describe themselves as tabs
https://bugs.webkit.org/show_bug.cgi?id=117837
Reviewed by Chris Fleizach.
accessibility/aria-tab-role-on-buttons.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute): Indicate that certain accessibility
types (such as Tabs) can be selected.
* accessibility/AccessibilityNodeObject.h: Signature for canSelectAttribute override.
2013-06-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove unused GesturePinch events
https://bugs.webkit.org/show_bug.cgi?id=117875
Reviewed by Andreas Kling.
The gesturePinch events have not been used for some time, even Chromium
had stop using them before moving out of webkit.
* dom/GestureEvent.cpp:
(WebCore::GestureEvent::create):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent):
* platform/PlatformEvent.h:
2013-06-21 Radu Stavila <stavila@adobe.com>
Improve the reattaching process while applying the :hover style
https://bugs.webkit.org/show_bug.cgi?id=117590
Reviewed by Andreas Kling.
Changes made:
- context is properly propagated to the element's children and to Shadow DOM elements.
- context is properly set on the lazyReattach method.
- another hit-testing is triggered when needed.
- when a hovered element is detached, it's ancestors are also removed from the hovered state.
Tests: fast/css/hover-display-block-inline.html
fast/css/hover-display-block-none.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::attach):
(WebCore::ContainerNode::detach):
* dom/ContainerNode.h:
(WebCore::ContainerNode::attachChildren):
(WebCore::ContainerNode::detachChildrenIfNeeded):
(WebCore::ContainerNode::detachChildren):
* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::updateHoverActiveState):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::detach):
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::detach):
* dom/ElementShadow.h:
* dom/Node.h:
(WebCore::Node::lazyReattach):
2013-06-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
HTMLMediaElement should inherit from MediaPlayerClient privately
https://bugs.webkit.org/show_bug.cgi?id=117874
Reviewed by Andreas Kling.
Fixing FIXME: HTMLMediaElement was stuck with public inheritance from
MediaPlayerClient due to the Chromium port.
This can now be fixed to a private inheritance.
* html/HTMLMediaElement.h:
2013-06-21 Allan Sandfeld Jensen <allan.jensen@digia.com>
Remove Chromium-only TouchDisambiguation
https://bugs.webkit.org/show_bug.cgi?id=117873
Reviewed by Andreas Kling.
* page/TouchDisambiguation.cpp: Removed.
* page/TouchDisambiguation.h: Removed.
2013-06-21 Zalan Bujtas <zalan@apple.com>
Rollout r150602: Restoring text-overflow vs. floating rendering behaviour.
https://bugs.webkit.org/show_bug.cgi?id=117871
Unreviewed. Rolling out r150602.
Undesirable rendering behaviour.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkLinesForTextOverflow):
2013-06-21 Radu Stavila <stavila@adobe.com>
Web Inspector: Integrate new regionOversetChange event into inspector
https://bugs.webkit.org/show_bug.cgi?id=117833
Added the new regionOversetChange event to the WebInspector.
Reviewed by Joseph Pecoraro.
Tests: inspector/styles/protocol-css-regions-commands.html:
* inspector/Inspector.json:
* inspector/InspectorCSSAgent.cpp:
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::scheduleFor):
(WebCore::ChangeRegionOversetTask::unschedule):
(WebCore::ChangeRegionOversetTask::reset):
(WebCore::ChangeRegionOversetTask::onTimer):
(WebCore::InspectorCSSAgent::resetNonPersistentData):
(WebCore::InspectorCSSAgent::willRemoveNamedFlow):
(WebCore::InspectorCSSAgent::didChangeRegionOverset):
(WebCore::InspectorCSSAgent::regionOversetChanged):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didChangeRegionOversetImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didChangeRegionOverset):
* inspector/front-end/CSSNamedFlowCollectionsView.js:
(WebInspector.CSSNamedFlowCollectionsView.prototype._regionOversetChanged):
(WebInspector.CSSNamedFlowCollectionsView.prototype.wasShown):
(WebInspector.CSSNamedFlowCollectionsView.prototype.willHide):
* inspector/front-end/CSSStyleModel.js:
(WebInspector.CSSStyleModel.prototype._regionOversetChanged):
(WebInspector.CSSDispatcher.prototype.regionLayoutUpdated):
(WebInspector.CSSDispatcher.prototype.regionOversetChanged):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
2013-06-21 Sergio Correia <sergio.correia@openbossa.org>
[EFL] NetworkStateNotifierEfl: Use closeWithRetry instead of looping for EINTR on close
https://bugs.webkit.org/show_bug.cgi?id=117872
Reviewed by Christophe Dumez.
closeWithRetry works around the Linux behavior of closing the file descriptor
unconditionally even if the close() call is interrupted.
No new tests, no behavior change.
* platform/network/efl/NetworkStateNotifierEfl.cpp:
(WebCore::NetworkStateNotifier::~NetworkStateNotifier): Use closeWithRetry instead of
looping for EINTR on close.
2013-06-21 Christophe Dumez <ch.dumez@sisa.samsung.com>
REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
https://bugs.webkit.org/show_bug.cgi?id=117825
Reviewed by Kentaro Hara.
Partially revert r150663 so that we use Settings to enable WebAudio instead of
RuntimeEnabledFeatures.
Introduce a new [EnabledBySetting] IDL extended attribute which behaves similarly to
the existing [EnabledAtRuntime] but relies on Settings instead of RuntimeEnabledFeatures
to determine if the feature should be enabled. Make use of this new IDL attribute for
webkitAudioContext interface.
No new tests, no behavior change.
* Modules/webaudio/AudioContext.idl:
* WebCore.exp.in:
* WebCore.order:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
(WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj TestSubObjEnabledBySetting]):
(-[DOMTestObj setTestSubObjEnabledBySetting:]):
* bindings/scripts/test/TestObj.idl:
* page/Settings.in:
2013-06-21 Krzysztof Czech <k.czech@samsung.com>
[ATK] Added support for aria-required attribute.
https://bugs.webkit.org/show_bug.cgi?id=117730
Reviewed by Chris Fleizach.
Tests: accessibility/aria-required.html
accessibility/html5-required-attribute.html
The aria-required attribute is used to indicate that user input is required on an
element before a form can be submitted.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(setAtkStateSetFromCoreObject):
2013-06-21 Chris Fleizach <cfleizach@apple.com>
IndieUI: Add basic IndieUI infrastructure
https://bugs.webkit.org/show_bug.cgi?id=117367
Unreviewed. Revert erroneous file that was included accidentally.
* accessibility/AccessibilityNodeObject.h:
2013-06-21 Chris Fleizach <cfleizach@apple.com>
IndieUI: Add basic IndieUI infrastructure
https://bugs.webkit.org/show_bug.cgi?id=117367
Reviewed by Ryosuke Niwa.
IndieUI is a new W3C spec that aims to abstract the connection between input and action, so that
a user (possibly using assistive technologies like a screen reader) does not need a specific kind
of device (like a mouse) to interact with an object.
http://www.w3.org/WAI/IndieUI/
This initial patch adds in the basic support for UIRequestEvent and the uiactions attribute.
It modifies the config files to enable and build this feature.
Tests: indieui/create-uirequestevent.html
indieui/uiactions.html
* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* GNUmakefile.am:
* Modules/indieui: Added.
* Modules/indieui/UIRequestEvent.cpp: Added.
(WebCore::UIRequestEventInit::UIRequestEventInit):
(WebCore::UIRequestEvent::create):
(WebCore::UIRequestEvent::UIRequestEvent):
(WebCore::UIRequestEvent::~UIRequestEvent):
(WebCore::UIRequestEvent::interfaceName):
(WebCore::UIRequestEventDispatchMediator::UIRequestEventDispatchMediator):
(WebCore::UIRequestEventDispatchMediator::event):
(WebCore::UIRequestEventDispatchMediator::dispatchEvent):
* Modules/indieui/UIRequestEvent.h: Added.
(WebCore::UIRequestEvent::receiver):
(WebCore::UIRequestEventDispatchMediator::create):
* Modules/indieui/UIRequestEvent.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.h:
* dom/Element.cpp:
(WebCore::Element::setUIActions):
(WebCore::Element::UIActions):
* dom/Element.h:
* dom/Element.idl:
* dom/Event.cpp:
(WebCore::EventInit::EventInit):
* dom/Event.h:
* dom/EventNames.in:
* dom/Node.cpp:
(WebCore::Node::dispatchUIRequestEvent):
* dom/Node.h:
* dom/UIEvent.cpp:
(WebCore::UIEventInit::UIEventInit):
* dom/UIEvent.h:
* html/HTMLAttributeNames.in:
2013-06-20 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r145788): mouse drag on canvas shouldn't start selection
https://bugs.webkit.org/show_bug.cgi?id=117860
Reviewed by Benjamin Poulain.
Like HTMLImageElement, HTMLCanvasElement shouldn't start selection.
Also uninline some virtual function overrides.
Test: fast/events/mosuedrag-on-canvas-should-not-start-selection.html
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::areAuthorShadowsAllowed):
(WebCore::HTMLCanvasElement::canContainRangeEndPoint):
(WebCore::HTMLCanvasElement::canStartSelection):
* html/HTMLCanvasElement.h:
2013-06-20 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r149652): accessing items in .children via id doesn't work when element is not rooted in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=117836
Reviewed by Benjamin Poulain.
When the root node of a HTML collection is not in the document or in a shadow tree,
we shouldn't use its tree scope's id and name maps to find name getters.
Always use the slow path in such cases.
Test: fast/dom/htmlallcollection-detached-node-children.html
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::namedItem):
2013-06-20 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=116495
Fix null-pointer deref in DocumentLoader::responseReceived()
Patch by Nate Chapin, reviewed by Mike West and myself.
Test: http/tests/security/XFrameOptions/x-frame-options-deny-delete-frame-in-load-event.html
* loader/DocumentLoader.cpp: (WebCore::DocumentLoader::responseReceived): Added
a null check.
2013-06-20 Roger Fong <roger_fong@apple.com>
Unreviewed. Roll out part of r150618.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2013-06-20 Enrica Casucci <enrica@apple.com>
Initial advance on the first glyph of the run is not correctly set for rtl text.
https://bugs.webkit.org/show_bug.cgi?id=117839
<rdar://problem/13860717>
Reviewed by Sam Weinig.
We need to set the initial advance to the glyphBuffer, using the
initial advance of the complex run that will be drawn first.
In order to choose the run correctly we must consider the text direction.
Test: fast/text/complex-first-glyph-with-initial-advance.html
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::advance):
2013-06-20 Alex Christensen <achristensen@apple.com>
Fixed WebGL compile errors on Windows.
https://bugs.webkit.org/show_bug.cgi?id=117805
Reviewed by Brent Fulgham.
* html/canvas/WebGLRenderingContext.cpp: Included CString.h.
Added PLATFORM(WIN) to existing lists of platform macros.
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::ShaderSourceEntry::symbolMap):
* platform/graphics/OpenGLESShims.h:
2013-06-20 Simon Fraser <simon.fraser@apple.com>
FrameView needs to initialize paintsEntireContents on creation
https://bugs.webkit.org/show_bug.cgi?id=117844
Reviewed by Anders Carlsson.
In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
In this mode, FrameView::paintsEntireContents() is true. However,
we would only call setPaintsEntireContents(true) on the FrameView
when the view's layer-backed status changes. FrameView also needs
to fetch this state when it is initialized, because we may be creating
a new FrameView for an already layer-backed WebHTMLView.
* page/ChromeClient.h:
(WebCore::ChromeClient::shouldPaintEntireContents):
* page/FrameView.cpp:
(WebCore::FrameView::init):
2013-06-20 Simon Fraser <simon.fraser@apple.com>
Sticky elements are missing or misplaced sometimes when reloading a page that scrolls to a named anchor
https://bugs.webkit.org/show_bug.cgi?id=117819
Reviewed by Anders Carlsson.
At the end of FrameView::performPostLayoutTasks() we call scrollToAnchor() which attempts
to restore the scroll position to a named anchor, even when the document has been
changed by layout. This ends up in a call to ScrollView::scrollTo(), which in turn
calls repaintFixedElementsAfterScrolling(). However, repaintFixedElementsAfterScrolling()
would bail if m_nestedLayoutCount != 0, so we never updated layer positions which
depend on scroll position (but which would not be updated by layout, since their
renderers are not marked for layout when scrolling happens).
We've solved this problem once before in updateFixedElementsAfterScrolling() which
checks for m_nestedLayoutCount <= 1, so that we do work on the outermost nested layout.
Apply that same fix to repaintFixedElementsAfterScrolling().
Very timing-dependent, so hard to make a test.
* page/FrameView.cpp:
(WebCore::FrameView::repaintFixedElementsAfterScrolling):
2013-06-20 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
https://bugs.webkit.org/show_bug.cgi?id=117830
Reviewed by Anders Carlsson.
The order of the template arguments at HashSet alternate 'find', 'contains' and
'add' methods is reversed so that callers can just pass the translator
and let the compiler deduce input argument type.
No new tests. No new functionality.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::QualifiedName):
* platform/graphics/cg/SubimageCacheWithTimer.cpp:
(WebCore::SubimageCacheWithTimer::getSubimage):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::isSupportedAttribute):
* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::isSupportedAttribute):
* svg/SVGAnimateTransformElement.cpp:
(WebCore::SVGAnimateTransformElement::isSupportedAttribute):
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::isSupportedAttribute):
* svg/SVGCircleElement.cpp:
(WebCore::SVGCircleElement::isSupportedAttribute):
* svg/SVGClipPathElement.cpp:
(WebCore::SVGClipPathElement::isSupportedAttribute):
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
* svg/SVGCursorElement.cpp:
(WebCore::SVGCursorElement::isSupportedAttribute):
* svg/SVGEllipseElement.cpp:
(WebCore::SVGEllipseElement::isSupportedAttribute):
* svg/SVGFEBlendElement.cpp:
(WebCore::SVGFEBlendElement::isSupportedAttribute):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
* svg/SVGFEComponentTransferElement.cpp:
(WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
* svg/SVGFECompositeElement.cpp:
(WebCore::SVGFECompositeElement::isSupportedAttribute):
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
* svg/SVGFEDiffuseLightingElement.cpp:
(WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
* svg/SVGFEDisplacementMapElement.cpp:
(WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
* svg/SVGFEDropShadowElement.cpp:
(WebCore::SVGFEDropShadowElement::isSupportedAttribute):
* svg/SVGFEGaussianBlurElement.cpp:
(WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::isSupportedAttribute):
* svg/SVGFELightElement.cpp:
(WebCore::SVGFELightElement::isSupportedAttribute):
* svg/SVGFEMergeNodeElement.cpp:
(WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
* svg/SVGFEMorphologyElement.cpp:
(WebCore::SVGFEMorphologyElement::isSupportedAttribute):
* svg/SVGFEOffsetElement.cpp:
(WebCore::SVGFEOffsetElement::isSupportedAttribute):
* svg/SVGFESpecularLightingElement.cpp:
(WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
* svg/SVGFETileElement.cpp:
(WebCore::SVGFETileElement::isSupportedAttribute):
* svg/SVGFETurbulenceElement.cpp:
(WebCore::SVGFETurbulenceElement::isSupportedAttribute):
* svg/SVGFilterElement.cpp:
(WebCore::SVGFilterElement::isSupportedAttribute):
(WebCore::SVGFilterElement::childShouldCreateRenderer):
* svg/SVGFilterPrimitiveStandardAttributes.cpp:
(WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
* svg/SVGForeignObjectElement.cpp:
(WebCore::SVGForeignObjectElement::isSupportedAttribute):
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::isSupportedAttribute):
* svg/SVGGradientElement.cpp:
(WebCore::SVGGradientElement::isSupportedAttribute):
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::isSupportedAttribute):
* svg/SVGLineElement.cpp:
(WebCore::SVGLineElement::isSupportedAttribute):
* svg/SVGLinearGradientElement.cpp:
(WebCore::SVGLinearGradientElement::isSupportedAttribute):
* svg/SVGMPathElement.cpp:
(WebCore::SVGMPathElement::isSupportedAttribute):
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::isSupportedAttribute):
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::isSupportedAttribute):
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::isSupportedAttribute):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::isSupportedAttribute):
* svg/SVGPolyElement.cpp:
(WebCore::SVGPolyElement::isSupportedAttribute):
* svg/SVGRadialGradientElement.cpp:
(WebCore::SVGRadialGradientElement::isSupportedAttribute):
* svg/SVGRectElement.cpp:
(WebCore::SVGRectElement::isSupportedAttribute):
* svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::isSupportedAttribute):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::isSupportedAttribute):
* svg/SVGStyleElement.cpp:
(WebCore::SVGStyleElement::isSupportedAttribute):
* svg/SVGStyledTransformableElement.cpp:
(WebCore::SVGStyledTransformableElement::isSupportedAttribute):
* svg/SVGSymbolElement.cpp:
(WebCore::SVGSymbolElement::isSupportedAttribute):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::isSupportedAttribute):
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::isSupportedAttribute):
* svg/SVGTextElement.cpp:
(WebCore::SVGTextElement::isSupportedAttribute):
* svg/SVGTextPathElement.cpp:
(WebCore::SVGTextPathElement::isSupportedAttribute):
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::isSupportedAttribute):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::isSupportedAttribute):
(WebCore::isDisallowedElement):
* svg/SVGViewElement.cpp:
(WebCore::SVGViewElement::isSupportedAttribute):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::isSupportedAttribute):
2013-06-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151451.
http://trac.webkit.org/changeset/151451
https://bugs.webkit.org/show_bug.cgi?id=117848
"Broke quite a lot of sites" (Requested by rhogan on #webkit).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:
2013-06-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151788.
http://trac.webkit.org/changeset/151788
https://bugs.webkit.org/show_bug.cgi?id=117847
"This is the wrong fix" (Requested by rhogan on #webkit).
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::computePreferredLogicalWidths):
2013-05-24 Balazs Kelemen <kbalazs@webkit.org>
[Gstreamer] cleanup buffering and state updates
https://bugs.webkit.org/show_bug.cgi?id=116642
Reviewed by Philippe Normand.
Covered by existing media tests, especially the ones that have been unskipped.
Always do download buffering. It should not differ if preload is "none" because
it's about when to start buffering, not about how. Fix a bunch other subtle issues
to make this change go smoothly with the tests. As a bonus some tests that were
failing so far started to pass.
It is possible to further tweak the buffering in a way that will enable us to support
a different and appropriate behavior for preload="metadata" but it should be managed
a bit differently. I will implement it in a follow-up.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::load): Don't call setDownloadBuffering
yet. Now it also responsible for starting the fill timer and it turned out that
setting the download flag before the pipeline is set to a state has negative
effect on some tests. Most probably GStreamer starts buffering too early if
we set the download flag.
(WebCore::MediaPlayerPrivateGStreamer::commitLoad): Call setDownloadBuffering now.
(WebCore::MediaPlayerPrivateGStreamer::play): Ditto, plus set m_delayingLoad to false
because otherwise setPreload will wrongly assume that the load has not been committed
yet if prepareToPlay is not called before play.
(WebCore::MediaPlayerPrivateGStreamer::pause): Make sure we don't commit a load here
if it was not committed yet by looking in the pipeline state.
(WebCore::MediaPlayerPrivateGStreamer::processBufferingStats): No need to observe the
type of buffering.
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Introduced m_downloadFinished to update
ready and network states in updateStates based on it. The previously used condition
- (maxTimeLoaded() == duration()) - was not correct in the case when duration is not known.
(WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded): Removed a lie. If the fill timer is not active
it does not necesarily means that download has been finished. This lie was actually ensuring
a lot of tests to pass because it made the condition (maxTimeLoaded() == duration()) true.
Now that state updates has been cleaned up we don't need to lie.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Merge all the parts that takes part in updating
ready and network states. It was untrackable. Unset download buffering for for live streams early so
we don't need to restart them.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer): Removed m_startedBuffering because there is no need for it now.
2013-06-20 Eric Carlson <eric.carlson@apple.com>
ASSERT removing then adding a <track> element
https://bugs.webkit.org/show_bug.cgi?id=117814
Reviewed by Jer Noble.
Test: media/track/add-and-remove-track.html
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::insertedInto): Always call ensureTrack before adding the track
to the parent <video> element.
(WebCore::HTMLTrackElement::ensureTrack): Call m_track->setTrackElement() in case the
parent was cleared after m_track was created.
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::setTrackElement): New, set m_trackElement.
* html/track/LoadableTextTrack.h:
2013-06-20 Roger Fong <roger_fong@apple.com>
Unreviewed. Build fix for Apple Windows port.
* rendering/RenderThemeWin.cpp:
(WebCore::cssValueIdToSysColorIndex):
2013-06-20 Alexey Proskuryakov <ap@apple.com>
[Mac] Downloaded file name encoding is incorrect when download link opens in a new window
https://bugs.webkit.org/show_bug.cgi?id=117818
<rdar://problem/14212635>
Reviewed by Brady Eidson.
No tests added. The machinery we have for logging downloaded file name is very
far from being able to work in a secondary window.
* loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest):
Made a targeted fix - don't update encoding fallback array if we already have one,
there is no chance for it to be more correct. In this case, it's incorrect because
it comes from a new blank window, instead of original referer.
We have a lot of code in addExtraFieldsToRequest() to struggle with this, and we have
a FIXME to try not calling it from policy delegate.
2013-06-18 Robert Hogan <robert@webkit.org>
REGRESSION (r151451): Text not vertically centered correctly on icloud.com
https://bugs.webkit.org/show_bug.cgi?id=117744
Reviewed by David Hyatt.
The positioned height and width computation adds in the element's border and padding so
don't add it to the intrinsic height and preferred widths of text controls that are
absolutely positioned.
Test: fast/replaced/height-of-positioned-text-control.html
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeLogicalHeight):
(WebCore::RenderTextControl::computePreferredLogicalWidths):
2013-06-20 Roger Fong <roger_fong@apple.com>
Make Windows makefile copy build output to a different folder.
<rdar://problem/14219184>.
* WebCore.vcxproj/WebCore.make:
2013-06-19 Jer Noble <jer.noble@apple.com>
Roll-on in-band captions are displayed bottom-to-top rather than top-to-bottom.
https://bugs.webkit.org/show_bug.cgi?id=117811
Reviewed by Eric Carlson.
When comparing Generic cues, we should check that their type is Generic, not WebVTT.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore):
2013-06-20 Ralph Thomas <ralpht@gmail.com>
[CMake][CSS Shaders] Add WebCore files for CSS Shaders to CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=117711
Reviewed by Laszlo Gombos.
No new tests, no CMake platforms currently enable this functionality.
* CMakeLists.txt:
2013-06-20 Alexis Menard <alexis@webkit.org>
Cleanup usage of CSSPropertyID and CSSValueID inside WebKit.
https://bugs.webkit.org/show_bug.cgi?id=117829
Reviewed by Andreas Kling.
A lot of call sites were using integers to represent them. While it's
not incorrect per se, it's not ideal for various reason such as type
safety or to remove ambiguity.
This patch eradicate the wrong usage by not letting any integer based
API for getting CSSValueIDs or CSSPropertyIDs from CSSPrimitiveValues.
Instead we use new but typed functions to construct the values as well
as getting them. Two customs and internal types were added to CSSPrimitiveValue
to handle correctly the new APIs.
It's good to note that in order to preserve compatibility on the
CSSPrimitiveValue type whenever CSSPrimitiveValue handles a CSSValueID
or a CSSPropertyID the return type for the public API will be CSS_IDENT
despite it is a separate internal type.
No new tests: refactor, existing tests should cover.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyMatches):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule):
* css/CSSGradientValue.cpp:
(WebCore::positionFromValue):
(WebCore::CSSLinearGradientValue::customCssText):
(WebCore::CSSLinearGradientValue::createGradient):
(WebCore::CSSRadialGradientValue::customCssText):
(WebCore::CSSRadialGradientValue::createGradient):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSystemColor):
(WebCore::isFillPositionKeyword):
(WebCore::CSSParser::parse4ValuesFillPosition):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::isBlendMode):
(WebCore::CSSParser::isCompositeOperator):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue):
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::CSSPrimitiveValue::primitiveType):
(WebCore::propertyName):
(WebCore::valueName):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::getStringValue):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isValueID):
(WebCore::CSSPrimitiveValue::createIdentifier):
(WebCore::CSSPrimitiveValue::createParserOperator):
(WebCore::CSSPrimitiveValue::getPropertyID):
(WebCore::CSSPrimitiveValue::getValueID):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
(WebCore::CSSPrimitiveValue::operator ColumnSpan):
(WebCore::CSSPrimitiveValue::operator PrintColorAdjust):
(WebCore::CSSPrimitiveValue::operator EBorderStyle):
(WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
(WebCore::CSSPrimitiveValue::operator CompositeOperator):
(WebCore::CSSPrimitiveValue::operator ControlPart):
(WebCore::CSSPrimitiveValue::operator EBackfaceVisibility):
(WebCore::CSSPrimitiveValue::operator EFillAttachment):
(WebCore::CSSPrimitiveValue::operator EFillBox):
(WebCore::CSSPrimitiveValue::operator EFillRepeat):
(WebCore::CSSPrimitiveValue::operator EBoxPack):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
(WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
(WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
(WebCore::CSSPrimitiveValue::operator EBoxSizing):
(WebCore::CSSPrimitiveValue::operator EBoxDirection):
(WebCore::CSSPrimitiveValue::operator EBoxLines):
(WebCore::CSSPrimitiveValue::operator EBoxOrient):
(WebCore::CSSPrimitiveValue::operator ECaptionSide):
(WebCore::CSSPrimitiveValue::operator EClear):
(WebCore::CSSPrimitiveValue::operator ECursor):
(WebCore::CSSPrimitiveValue::operator CursorVisibility):
(WebCore::CSSPrimitiveValue::operator EDisplay):
(WebCore::CSSPrimitiveValue::operator EEmptyCell):
(WebCore::CSSPrimitiveValue::operator EAlignItems):
(WebCore::CSSPrimitiveValue::operator EJustifyContent):
(WebCore::CSSPrimitiveValue::operator EFlexDirection):
(WebCore::CSSPrimitiveValue::operator EAlignContent):
(WebCore::CSSPrimitiveValue::operator EFlexWrap):
(WebCore::CSSPrimitiveValue::operator EFloat):
(WebCore::CSSPrimitiveValue::operator LineBreak):
(WebCore::CSSPrimitiveValue::operator EListStylePosition):
(WebCore::CSSPrimitiveValue::operator EListStyleType):
(WebCore::CSSPrimitiveValue::operator EMarginCollapse):
(WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
(WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
(WebCore::CSSPrimitiveValue::operator ENBSPMode):
(WebCore::CSSPrimitiveValue::operator EOverflow):
(WebCore::CSSPrimitiveValue::operator EPageBreak):
(WebCore::CSSPrimitiveValue::operator EPosition):
(WebCore::CSSPrimitiveValue::operator EResize):
(WebCore::CSSPrimitiveValue::operator ETableLayout):
(WebCore::CSSPrimitiveValue::operator ETextAlign):
(WebCore::CSSPrimitiveValue::operator TextAlignLast):
(WebCore::CSSPrimitiveValue::operator TextJustify):
(WebCore::CSSPrimitiveValue::operator TextDecoration):
(WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
(WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
(WebCore::CSSPrimitiveValue::operator ETextSecurity):
(WebCore::CSSPrimitiveValue::operator ETextTransform):
(WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
(WebCore::CSSPrimitiveValue::operator EUserDrag):
(WebCore::CSSPrimitiveValue::operator EUserModify):
(WebCore::CSSPrimitiveValue::operator EUserSelect):
(WebCore::CSSPrimitiveValue::operator EVerticalAlign):
(WebCore::CSSPrimitiveValue::operator EVisibility):
(WebCore::CSSPrimitiveValue::operator EWhiteSpace):
(WebCore::CSSPrimitiveValue::operator EWordBreak):
(WebCore::CSSPrimitiveValue::operator EOverflowWrap):
(WebCore::CSSPrimitiveValue::operator TextDirection):
(WebCore::CSSPrimitiveValue::operator WritingMode):
(WebCore::CSSPrimitiveValue::operator TextCombine):
(WebCore::CSSPrimitiveValue::operator RubyPosition):
(WebCore::CSSPrimitiveValue::operator TextEmphasisPosition):
(WebCore::CSSPrimitiveValue::operator TextOverflow):
(WebCore::CSSPrimitiveValue::operator TextEmphasisFill):
(WebCore::CSSPrimitiveValue::operator TextEmphasisMark):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
(WebCore::CSSPrimitiveValue::operator EPointerEvents):
(WebCore::CSSPrimitiveValue::operator FontDescription::Kerning):
(WebCore::CSSPrimitiveValue::operator FontSmoothingMode):
(WebCore::CSSPrimitiveValue::operator FontWeight):
(WebCore::CSSPrimitiveValue::operator FontItalic):
(WebCore::CSSPrimitiveValue::operator FontSmallCaps):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
(WebCore::CSSPrimitiveValue::operator ColorSpace):
(WebCore::CSSPrimitiveValue::operator Hyphens):
(WebCore::CSSPrimitiveValue::operator LineSnap):
(WebCore::CSSPrimitiveValue::operator LineAlign):
(WebCore::CSSPrimitiveValue::operator Order):
(WebCore::CSSPrimitiveValue::operator ESpeak):
(WebCore::CSSPrimitiveValue::operator BlendMode):
(WebCore::CSSPrimitiveValue::operator LineCap):
(WebCore::CSSPrimitiveValue::operator LineJoin):
(WebCore::CSSPrimitiveValue::operator WindRule):
(WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
(WebCore::CSSPrimitiveValue::operator EBorderCollapse):
(WebCore::CSSPrimitiveValue::operator EBorderFit):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
(WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
(WebCore::CSSPrimitiveValue::operator ColumnAxis):
(WebCore::CSSPrimitiveValue::operator ColumnProgression):
(WebCore::CSSPrimitiveValue::operator WrapFlow):
(WebCore::CSSPrimitiveValue::operator WrapThrough):
(WebCore::CSSPrimitiveValue::operator GridAutoFlow):
(WebCore::CSSPrimitiveValue::convertToLength):
(WebCore::CSSPrimitiveValue::operator EBufferedRendering):
(WebCore::CSSPrimitiveValue::operator EColorInterpolation):
(WebCore::CSSPrimitiveValue::operator EColorRendering):
(WebCore::CSSPrimitiveValue::operator EDominantBaseline):
(WebCore::CSSPrimitiveValue::operator EShapeRendering):
(WebCore::CSSPrimitiveValue::operator ETextAnchor):
(WebCore::CSSPrimitiveValue::operator SVGWritingMode):
(WebCore::CSSPrimitiveValue::operator EVectorEffect):
(WebCore::CSSPrimitiveValue::operator EMaskType):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment):
(WebCore::CSSToStyleMap::mapFillSize):
(WebCore::CSSToStyleMap::mapAnimationDirection):
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationIterationCount):
(WebCore::CSSToStyleMap::mapAnimationName):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
(WebCore::CSSToStyleMap::mapAnimationProperty):
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
(WebCore::CSSToStyleMap::mapNinePieceImageQuad):
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):
* css/Counter.h:
(WebCore::Counter::listStyleIdent):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyNumber::applyValue):
(WebCore::ApplyPropertyAuto::applyValue):
(WebCore::ApplyPropertyClip::applyValue):
(WebCore::ApplyPropertyColor::applyValue):
(WebCore::ApplyPropertyLength::applyValue):
(WebCore::ApplyPropertyString::applyValue):
(WebCore::ApplyPropertyComputeLength::applyValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
(WebCore::ApplyPropertyFontSize::applyValue):
(WebCore::ApplyPropertyFontWeight::applyValue):
(WebCore::ApplyPropertyFontVariantLigatures::applyValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCursor::applyValue):
(WebCore::ApplyPropertyTextAlign::applyValue):
(WebCore::ApplyPropertyMarqueeIncrement::applyValue):
(WebCore::ApplyPropertyMarqueeRepetition::applyValue):
(WebCore::ApplyPropertyMarqueeSpeed::applyValue):
(WebCore::ApplyPropertyLineHeight::applyValue):
(WebCore::ApplyPropertyPageSize::getPageSizeFromName):
(WebCore::ApplyPropertyPageSize::applyValue):
(WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyVerticalAlign::applyValue):
(WebCore::ApplyPropertyZoom::applyValue):
(WebCore::ApplyPropertyClipPath::applyValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyTextIndent::applyValue):
* css/MediaQueryEvaluator.cpp:
(WebCore::orientationMediaFeatureEval):
(WebCore::view_modeMediaFeatureEval):
(WebCore::pointerMediaFeatureEval):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getLayeredShorthandValue):
* css/StyleResolver.cpp:
(WebCore::createGridTrackBreadth):
(WebCore::createGridTrackList):
(WebCore::createGridPosition):
(WebCore::StyleResolver::applyProperty):
(WebCore::colorForCSSValue):
(WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement):
(WebCore::StyleResolver::colorFromPrimitiveValue):
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
(WebCore::StyleResolver::createFilterOperations):
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue):
* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::setMatrixValue):
* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier):
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty):
(WebCore::HTMLElementEquivalent::create):
(WebCore::HTMLElementEquivalent::HTMLElementEquivalent):
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
(WebCore::HTMLTextDecorationEquivalent::create):
(WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent):
(WebCore::EditingStyle::textDirection):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::fontWeightIsBold):
(WebCore::legacyFontSizeFromCSSValue):
(WebCore::isTransparentColorValue):
* editing/EditingStyle.h:
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::systemFont):
* platform/blackberry/RenderThemeBlackBerry.h:
(WebCore::RenderThemeBlackBerry::systemFont):
* platform/blackberry/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont):
* platform/blackberry/RenderThemeEfl.h:
(WebCore::RenderThemeEfl::systemFont):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk2.cpp:
(WebCore::RenderThemeGtk::systemColor):
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::RenderThemeGtk::systemColor):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::systemFont):
(WebCore::RenderThemeQt::systemColor):
* platform/qt/RenderThemeQt.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::systemColor):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
(WebCore::RenderThemeMac::systemColor):
* rendering/RenderThemeSafari.h:
(WebCore::RenderThemeSafari::systemFont):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::systemFont):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::systemFont):
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWin::systemColor):
* rendering/RenderThemeWin.h:
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::systemFont):
(WebCore::cssValueIdToSysColorIndex):
(WebCore::RenderThemeWinCE::systemColor):
* rendering/RenderThemeWinCE.h:
2013-06-19 Brent Fulgham <bfulgham@apple.com>
AX: List Items should support a default action
https://bugs.webkit.org/show_bug.cgi?id=117812
Reviewed by Chris Fleizach.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::actionVerb): Provide a "select" verb
for use in ListItemRole objects.
* platform/LocalizedStrings.cpp:
(WebCore::AXListItemActionVerb): Added.
* platform/LocalizedStrings.h:
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::AXListItemActionVerb):
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXListItemActionVerb):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXListItemActionVerb):
2013-06-20 Radu Stavila <stavila@adobe.com>
[CSS Regions] Add new regionOversetChange event
https://bugs.webkit.org/show_bug.cgi?id=117508
Added regionOversetChange event and tests for it. The overset value of the region has been moved to the ElementRareData
object instead of the RenderRegion object. This was needed for the case when a reattach is performed (for instance by changing
the display type of the region's containing block) and the RenderRegion object is destroyed. When computing the overset again,
there would be no "previous" value to compare it to and decide whether the regionOversetChange event must be dispatched.
Reviewed by Antti Koivisto.
Tests: fast/regions/webkit-named-flow-event-add-to-flow.html:
fast/regions/webkit-named-flow-event-auto-height.html:
fast/regions/webkit-named-flow-event-crash.html:
fast/regions/webkit-named-flow-event-no-regions.html:
fast/regions/webkit-named-flow-event-region-in-flexbox-no-overset-change.html: Added.
fast/regions/webkit-named-flow-event-region-in-flexbox-overset-change.html: Added.
fast/regions/webkit-named-flow-event-remove-from-dom.html:
fast/regions/webkit-named-flow-event-remove-from-flow.html:
fast/regions/webkit-named-flow-event-target.html:
fast/regions/webkit-named-flow-event-to-null.html:
fast/regions/webkit-named-flow-event.html:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::setRegionOversetState):
(WebCore::Element::regionOversetState):
(WebCore::Element::webkitRegionOverset):
* dom/Element.h:
* dom/ElementRareData.cpp:
* dom/ElementRareData.h:
(WebCore::ElementRareData::regionOversetState):
(WebCore::ElementRareData::setRegionOversetState):
(WebCore::ElementRareData::ElementRareData):
* dom/EventNames.h:
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::firstEmptyRegionIndex):
(WebCore::WebKitNamedFlow::dispatchRegionOversetChangeEvent):
* dom/WebKitNamedFlow.h:
(WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
(WebCore::ChangeRegionOversetTask::scheduleFor):
(WebCore::ChangeRegionOversetTask::unschedule):
(WebCore::ChangeRegionOversetTask::reset):
(WebCore::ChangeRegionOversetTask::onTimer):
* rendering/RegionOversetState.h: Added.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeOversetStateForRegions):
* rendering/RenderFlowThread.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
(WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEvent):
(WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
* rendering/RenderNamedFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::regionOversetState):
(WebCore::RenderRegion::setRegionOversetState):
* rendering/RenderRegion.h:
2013-06-20 James Craig <james@cookiecrook.com>
AX: aria-required is not exposed on all expected roles
https://bugs.webkit.org/show_bug.cgi?id=115123
Reviewed by Chris Fleizach.
aria-required is now exposed on more roles. Updated existing test file.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::supportsRequiredAttribute):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2013-06-20 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Use console.timeStamp instead of console.markTimeline
https://bugs.webkit.org/show_bug.cgi?id=117810
Reviewed by Joseph Pecoraro.
Webkit supports both console.timeStamp and console.markTimeline.
And they do the exact same thing.
This patch gets rid of console.markTimeline for Chrome/Firebug compatibility.
No new functionality, no new tests.
* WebCore.order:
* page/Console.cpp:
* page/Console.h:
* page/Console.idl:
2013-06-20 Grzegorz Czajkowski <g.czajkowski@samsung.com>
background-color and text-decoration are not preserved when merging paragraphs
https://bugs.webkit.org/show_bug.cgi?id=116215
Reviewed by Ryosuke Niwa.
In mergeInlineAndImplicitStyleOfElement(), style from matched rules are retrieved.
If they contain either background-color or text-decoration they will be removed
by removeNonEditingProperties() due to copyEditingProperties() implicit
'OnlyInheritableEditingProperties' parameter.
We have already had similar issue at https://bugs.webkit.org/show_bug.cgi?id=53196
Tests: editing/deleting/merge-div-from-span-with-style.html
editing/deleting/merge-paragraph-from-span-with-multiple-text-decoration.html
editing/deleting/merge-paragraph-from-span-with-style.html
* editing/EditingStyle.cpp:
(WebCore::copyEditingProperties):
(WebCore::editingStyleFromComputedStyle):
Add EditingStyle:: due to move EditingPropertiesToInclude to EditingStyle.h.
(WebCore::toEditingProperties):
Add a helper to easy convert PropertiesToInclude to EditingPropertiesToInclude,
needed in mergeInlineAndImplicitStyleOfElement().
(WebCore::EditingStyle::removeAllButEditingProperties):
Add a parameter to choose which editing properties should be preserved while
removing all properties (OnlyInheritableEditingProperties implicite).
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
Call removeAllButEditingProperties with parameter.
* editing/EditingStyle.h:
Move EditingPropertiesType to the header as it's needed by removeAllButEditingProperties().
Change EditingPropertiesType to EditingPropertiesToInclude to be consistent with
PropertiesToInclude.
Change removeNonEditingProperties() to removeAllButEditingProperties().
2013-06-19 Christophe Dumez <ch.dumez@sisa.samsung.com>
The order of the generated supplemental code is not guaranteed
https://bugs.webkit.org/show_bug.cgi?id=117820
Reviewed by Kentaro Hara.
Sort the supplemental idl files before generating the code so that it is
generated in a consistent order.
No new tests, covered by existing bindings tests.
* bindings/scripts/generate-bindings.pl:
2013-06-19 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151769.
http://trac.webkit.org/changeset/151769
https://bugs.webkit.org/show_bug.cgi?id=117821
Broke windows build due to missing GL/glext.h header.
(Requested by bfulgham on #webkit).
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-06-19 Alex Christensen <alex.christensen@flexsim.com>
Added WebGL files to Windows build without enabling them.
https://bugs.webkit.org/show_bug.cgi?id=117809
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.vcxproj: Added WebGL source files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Added platform\graphics\opengl and platform\graphics\gpu filters.
2013-06-19 Alex Christensen <achristensen@apple.com>
Windows build should include WebGL generated files if WebGL is enabled.
https://bugs.webkit.org/show_bug.cgi?id=117802
Reviewed by Brent Fulgham.
Added WebGL generated files to Windows build if WebGL is enabled.
* DerivedSources.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-06-19 Alexey Proskuryakov <ap@apple.com>
[Mac] Common crashes when playing media
https://bugs.webkit.org/show_bug.cgi?id=117813
<rdar://problem/13837412>
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
This method may be called from a secondary thread, but it does things that are
not thread safe.
2013-06-19 Yuki Sekiguchi <yuki.sekiguchi@access-company.com>
Incomplete repaint of input elements in writing-mode overflow
https://bugs.webkit.org/show_bug.cgi?id=110246
Reviewed by Simon Fraser.
We calculate repaint rect using unflipped rect.
However, RenderBox::applyCachedClipAndScrollOffsetForRepaint() which is called from repaint rect calculation
wants that its argument rect is flipped.
The reason is:
- paintRect.move(-scrolledContentOffset()); cannot scroll if the rect is unflipped.
- It cannot clip using intersect.
Passing unflipped rect to applyCachedClipAndScrollOffsetForRepaint() cause invalid clipping.
Therefore, this patch flipped the rect at the first part of the function and unflipped it at the last part of the function.
Scroll bar rect is absolute rect, so it is flipped rect.
RenderLayer::invalidateScrollbarRect() pass the rect to repaintRectangle() which expects an argument rect is unflipped.
This cause part of overlapping scroll bar doesn't fade out.
Therefore, this patch flipped the rect and pass it to repaintRectangle().
Tests: fast/repaint/horizontal-bt-overflow-child.html
fast/repaint/horizontal-bt-overflow-parent.html
fast/repaint/horizontal-bt-overflow-same.html
fast/repaint/vertical-overflow-child.html
fast/repaint/vertical-overflow-parent.html
fast/repaint/vertical-overflow-same.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::invalidateScrollbarRect):
2013-06-19 Benjamin Poulain <bpoulain@apple.com>
Use the PlatformEvent timestamp when creating a DOM Event
https://bugs.webkit.org/show_bug.cgi?id=117179
Reviewed by Darin Adler.
Previously, the platform event's timestamp was ignored by WebCore and each
new event would get a new timestamp by calling WTF::currentTime().
The problem is there can be a significant delay between the input event and
it being dispatched to JavaScript. Computing the velocity/acceleration of the cursor
is impossible since the delay vary from event to events.
On WebKit2, the delay per event typically vary between 0 and 30ms.
This patch changes the Event creation code to use the timer passed by the underlying platform event.
* WebCore.exp.in:
* dom/Event.cpp:
(WebCore::Event::Event):
* dom/Event.h:
* dom/GestureEvent.cpp:
(WebCore::GestureEvent::create):
(WebCore::GestureEvent::GestureEvent):
* dom/GestureEvent.h:
* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/KeyboardEvent.h:
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
* dom/MouseEvent.h:
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/MouseRelatedEvent.h:
* dom/TouchEvent.cpp:
(WebCore::TouchEvent::TouchEvent):
* dom/UIEvent.cpp:
(WebCore::UIEvent::UIEvent):
* dom/UIEvent.h:
* dom/UIEventWithKeyState.h:
(WebCore::UIEventWithKeyState::UIEventWithKeyState):
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
(WebCore::WheelEventDispatchMediator::WheelEventDispatchMediator):
* dom/WheelEvent.h:
(WebCore::WheelEvent::create):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragEvent):
* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
(WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
(WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
(WebCore::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
2013-06-19 Alexis Menard <alexis@webkit.org>
Make sure to use CSSValueID and CSSPropertyID rather than integers
https://bugs.webkit.org/show_bug.cgi?id=117481
Reviewed by Benjamin Poulain.
This will ensure that types are enforced when passing arguments in various
css functions. Having a compile time check make sure that no mistakes
will be done over the type.
The parser was also patched to directly use CSSValueID over integers.
This patch also fixes various call sites abusing the usage of integers.
This is part 1 of 2.
No new tests : existing ones should cover.
* WebCore.xcodeproj/project.pbxproj: copy CSSValueKeywords.h as it could be used in WebKit/ for example.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForRepeatRule):
(WebCore::cssIdentifierForFontSizeKeyword):
(WebCore::identifierForFamily):
(WebCore::valueForFamily):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseKeywordValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseBackgroundColor):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parse3ValuesFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::parseCounterContent):
(WebCore::CSSParser::parseLineHeight):
(WebCore::CSSParser::parseFontSize):
(WebCore::CSSParser::createFontWeightValueKeyword):
(WebCore::CSSParser::parseFontWeight):
(WebCore::parseDeprecatedGradientColorStop):
(WebCore::parseGradientColorOrKeyword):
(WebCore::CSSParser::parseDeprecatedRadialGradient):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParser.h:
* css/CSSParserValues.h:
* css/CSSPrimitiveValue.h:
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createIdentifierValue):
* css/CSSValuePool.h:
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
* css/StylePropertySet.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
* dom/StyledElement.h:
* editing/EditingStyle.cpp:
(WebCore::HTMLFontSizeEquivalent::attributeValueAsCSSValue):
(WebCore::EditingStyle::prepareToApplyAt):
* editing/EditorCommand.cpp:
(WebCore::executeApplyStyle):
(WebCore::executeFontSize):
* html/HTMLElement.cpp:
(WebCore::unicodeBidiAttributeForDirAuto):
(WebCore::HTMLElement::applyAlignmentAttributeToStyle):
* html/HTMLFontElement.cpp:
(WebCore::HTMLFontElement::cssValueFromFontSizeNumber):
(WebCore::HTMLFontElement::collectStyleForPresentationAttribute):
* html/HTMLFontElement.h:
* html/HTMLTableElement.cpp:
(WebCore::leakBorderStyle):
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::getCSSWritingDirection):
(WebCore::TextTrackCue::getCSSWritingMode):
* html/track/TextTrackCue.h:
2013-06-19 Bem Jones-Bey <bjonesbe@adobe.com>
Fix a few missed renames from Exclusions -> Shapes
https://bugs.webkit.org/show_bug.cgi?id=117803
Reviewed by David Hyatt.
In the great CSS Exclusions to CSS Shapes rename, a few instances were
missed. This fixes those instances.
No new tests, no behavior change, just renames.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
(WebCore::RenderBlock::updateRegionsAndShapesAfterChildLayout):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
* rendering/RenderBlock.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
2013-06-19 Oliver Hunt <oliver@apple.com>
Incorrect use of jsCast in a finalizer
https://bugs.webkit.org/show_bug.cgi?id=117807
Reviewed by Geoffrey Garen.
We can't use jsCast in a finalizer as it checks an object's structure,
and the structure may already have been swept by that point. Use a
static_cast instead.
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::destroy):
2013-06-19 Brent Fulgham <bfulgham@apple.com>
[Windows] AX: Extend notification handling
https://bugs.webkit.org/show_bug.cgi?id=117761.
Reviewed by Anders Carlsson.
accessibility/press-works-on-control-types.html
* accessibility/win/AXObjectCacheWin.cpp:
(WebCore::AXObjectCache::postPlatformNotification): Add handlers for more event notifications.
* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Protect against null
pointer dereference found during testing.
* dom/Document.cpp:
(WebCore::Document::implicitClose): Execute notification handler for Windows as well as Mac.
* page/FrameView.cpp:
(WebCore::FrameView::layout): Ditto.
2013-06-19 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Webfont rendering is broken.
https://bugs.webkit.org/show_bug.cgi?id=117695
Reviewed by Brent Fulgham.
The native font handle created from webfont data is invalid.
In much the same way it's done in WinApple, we first need to install the webfont,
create a native font handle from the new font name,
and pass the font handle to the FontPlatformData object, where it's needed to get the glyphs.
* platform/graphics/FontPlatformData.h: Added HFONT parameter to constructor.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::~FontCustomPlatformData): Release installed webfont.
(WebCore::FontCustomPlatformData::fontPlatformData): Create valid HFONT handle for webfont.
(WebCore::createUniqueFontName): Added method to create webfont name.
(WebCore::createFontCustomPlatformData): Install font from webfont data.
* platform/graphics/win/FontCustomPlatformDataCairo.h: Removed.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Added HFONT parameter to constructor.
2013-06-19 Christophe Dumez <ch.dumez@sisa.samsung.com>
Implement WebIDL implements
https://bugs.webkit.org/show_bug.cgi?id=117785
Reviewed by Kentaro Hara.
Add support for Web IDL 'implements' statements to the bindings generator:
http://www.w3.org/TR/WebIDL/#dfn-implements-statement
Introduce ChildNode IDL interface and have Element, DocumentType and
CharacterData implement it, to match the specification:
http://dom.spec.whatwg.org/#childnode
There is no change in behavior, merely refactoring to match the
specification by leveraging support for Web IDL implements statements.
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* bindings/scripts/generate-bindings.pl:
* bindings/scripts/preprocess-idls.pl:
(GeneratePartialInterface):
(getImplementersFromIDL):
* bindings/scripts/test/CPP/WebDOMTestImplements.cpp: Added.
* bindings/scripts/test/CPP/WebDOMTestImplements.h: Added.
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
(WebDOMTestInterface::implementsStr1):
(WebDOMTestInterface::implementsStr2):
(WebDOMTestInterface::setImplementsStr2):
(WebDOMTestInterface::implementsNode):
(WebDOMTestInterface::setImplementsNode):
(WebDOMTestInterface::implementsMethod1):
(WebDOMTestInterface::implementsMethod4):
* bindings/scripts/test/CPP/WebDOMTestInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestImplements.cpp: Added.
* bindings/scripts/test/GObject/WebKitDOMTestImplements.h: Added.
* bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
(webkit_dom_test_interface_set_property):
(webkit_dom_test_interface_get_property):
(webkit_dom_test_interface_class_init):
(webkit_dom_test_interface_implements_method1):
(webkit_dom_test_interface_implements_method2):
(webkit_dom_test_interface_implements_method4):
(webkit_dom_test_interface_get_implements_str1):
(webkit_dom_test_interface_get_implements_str2):
(webkit_dom_test_interface_set_implements_str2):
(webkit_dom_test_interface_get_implements_node):
(webkit_dom_test_interface_set_implements_node):
* bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
* bindings/scripts/test/JS/JSTestImplements.cpp: Added.
* bindings/scripts/test/JS/JSTestImplements.h: Added.
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
(WebCore::jsTestInterfaceImplementsStr1):
(WebCore::jsTestInterfaceImplementsStr2):
(WebCore::jsTestInterfaceImplementsStr3):
(WebCore::jsTestInterfaceImplementsNode):
(WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
(WebCore::setJSTestInterfaceImplementsStr2):
(WebCore::setJSTestInterfaceImplementsStr3):
(WebCore::setJSTestInterfaceImplementsNode):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
(WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4):
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestImplements.cpp: Added.
* bindings/scripts/test/ObjC/DOMTestImplements.h: Added.
* bindings/scripts/test/ObjC/DOMTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
(-[DOMTestInterface implementsStr1]):
(-[DOMTestInterface implementsStr2]):
(-[DOMTestInterface setImplementsStr2:]):
(-[DOMTestInterface implementsStr3]):
(-[DOMTestInterface setImplementsStr3:]):
(-[DOMTestInterface implementsNode]):
(-[DOMTestInterface setImplementsNode:]):
(-[DOMTestInterface implementsMethod1]):
(-[DOMTestInterface implementsMethod2:objArg:]):
(-[DOMTestInterface implementsMethod3]):
(-[DOMTestInterface implementsMethod4]):
* bindings/scripts/test/TestImplements.idl: Added.
* dom/CharacterData.idl:
* dom/ChildNode.idl: Copied from Source/WebCore/dom/DocumentType.idl.
* dom/DocumentType.idl:
* dom/Element.idl:
2013-06-19 Robert Hogan <robert@webkit.org>
Incorrect computation of shrink-to-fit width for block with white-space:nowrap and floating children
https://bugs.webkit.org/show_bug.cgi?id=114879
Reviewed by David Hyatt.
Per http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins when width is auto then floating non-replaced,
absolute non-replaced, and inline-block non-replaced elements should use shrink-to-fit width. This trumps any no-wrap property
on the element so if we are shrinking to fit ensure our minimum width respects all possible line breaks.
Test: fast/block/shrink-to-fit-width-container-with-floating-children.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2013-06-19 Christophe Dumez <ch.dumez@sisa.samsung.com>
Do not require JS*Custom.h header if [CustomPutFunction] / [CustomNamedSetter] is used
https://bugs.webkit.org/show_bug.cgi?id=117795
Reviewed by Kentaro Hara.
Fix the JS bindings generator so that it stops including JS*Custom.h header whenever
[CustomPutFunction] or [CustomNamedSetter] IDL extended attributes are used. We don't
really need this custom header and this forces the developer to create dummy custom
headers so that it builds.
If the developer really needs such custom header to be included, he can still use
[JSCustomHeader] IDL extended attribute to do so.
This patch also remove the dummy custom headers that were created but are no longer
required to build.
No new tests, no behavior change. Already covered by the following bindings test:
TestInterface.idl
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMStringMapCustom.h: Removed.
* bindings/js/JSHTMLAppletElementCustom.cpp:
* bindings/js/JSHTMLAppletElementCustom.h: Removed.
* bindings/js/JSHTMLEmbedElementCustom.cpp:
* bindings/js/JSHTMLEmbedElementCustom.h: Removed.
* bindings/js/JSHTMLObjectElementCustom.cpp:
* bindings/js/JSHTMLObjectElementCustom.h: Removed.
* bindings/js/JSHistoryCustom.cpp:
* bindings/js/JSHistoryCustom.h: Removed.
* bindings/js/JSLocationCustom.cpp:
* bindings/js/JSLocationCustom.h: Removed.
* bindings/js/JSStorageCustom.cpp:
* bindings/js/JSStorageCustom.h: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
2013-06-19 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Several tests crash due to an assert when creating an ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=117793
Reviewed by Rob Buis.
JIRA 388741
Fixes a crash in several layout tests due to an assert when
creating an ImageBuffer with an empty size.
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
(WebCore::ImageBuffer::ImageBuffer): Return early if the given
size is empty.
2013-06-19 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] [texmap] the bytesPerLine is wrong when updating the texture
https://bugs.webkit.org/show_bug.cgi?id=117551
Reviewed by Philippe Normand.
The bytesPerLine (or stride) is wrong when updating the texture
content. This is because the naturalSize() is not updated to the
current buffer. This patch extracts the current value of the size and
the stride.
No tests required.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
2013-06-19 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Adjust internal size on gstreamer source element when receiving data if necessary
https://bugs.webkit.org/show_bug.cgi?id=116534
Reviewed by Philippe Normand.
If the size received in didReceiveResponse is smaller than the actual size of the received data
update the internal size and the appsrc size to the proper value.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::didReceiveData):
2013-06-19 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] Potential race condition when getting the video sink caps.
https://bugs.webkit.org/show_bug.cgi?id=117736
Reviewed by Philippe Normand.
There is a potential race condition with the pad setting caps, as the
buffer and the caps won't match when renegotiation happens, and might
cause a crash.
This patch keeps an instance of the current caps in the video sink,
and it is accessible through a getter method. Hence the player can ask
for the current caps without running into a race condition.
No new tests. No change in behaviour.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::currentVideoSinkCaps):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkGetProperty):
(webkitVideoSinkStop):
(webkitVideoSinkSetCaps):
(webkit_video_sink_class_init):
2013-06-19 Kihong Kwon <kihong.kwon@samsung.com>
Vibration can be canceled even if page visibility status is hidden
https://bugs.webkit.org/show_bug.cgi?id=117333
Reviewed by Gyuyoung Kim.
vibration can be canceled in the onvisibilitychange listener even if page visibility is changed to hidden status.
Therefore cancelVibration needs to work when page visibility is hidden.
Tests: vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html
* Modules/vibration/NavigatorVibration.cpp:
(WebCore::NavigatorVibration::vibrate):
* Modules/vibration/Vibration.h:
(WebCore::Vibration::isVibrating):
* testing/Internals.cpp:
(WebCore::Internals::isVibrating):
* testing/Internals.h:
* testing/Internals.idl:
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Input type range slider is not updated when min or max are changed
https://bugs.webkit.org/show_bug.cgi?id=117778
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/089c7a0ba2d85b9b59632c2603fbc6472b310be1.
Test: fast/forms/range/range-change-min-max.html
* html/RangeInputType.cpp:
(WebCore::RangeInputType::minOrMaxAttributeChanged):
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Remove two superfluous overrides of supportsFocus
https://bugs.webkit.org/show_bug.cgi?id=117770
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/4228964a63e3a889a40efce0d01866629fdcd9b9.
* html/HTMLOptGroupElement.cpp:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
* html/HTMLOptionElement.h:
2013-06-18 Darin Adler <darin@apple.com>
Improve style of null checks in FrameView::setFrameRect
https://bugs.webkit.org/show_bug.cgi?id=117681
Reviewed by Sam Weinig.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect): Used nested if statements and local variables
to tighten this code up a little.
2013-06-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
Move IDL extended attributes to their correct location
https://bugs.webkit.org/show_bug.cgi?id=117732
Reviewed by Kentaro Hara.
Move IDL extended attributes to their correct location according to the
latest Web IDL specification. We used to be inconsistent in the positioning
of the extended attributes. This simplifies a lot the code of the IDL parser
and makes our IDL files more standard.
Based on Blink r148345 by Kentaro Hara <haraken@chromium.org>.
No new tests, no behavior change.
* Modules/encryptedmedia/MediaKeyMessageEvent.idl:
* Modules/notifications/Notification.idl:
* Modules/speech/SpeechSynthesisVoice.idl:
* bindings/scripts/IDLParser.pm:
(parseDefinitions):
(parseInterfaceMembers):
(parseInterfaceMember):
(parseDictionaryMembers):
(parseAttributeOrOperationOrIterator):
(parseAttribute):
* css/CSSFontFaceLoadEvent.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/Node.idl:
* html/HTMLBodyElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFrameSetElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLSourceElement.idl:
* page/DOMWindow.idl:
* svg/SVGElementInstance.idl:
* svg/SVGScriptElement.idl:
* testing/TypeConversions.idl:
2013-06-18 Jessie Berlin <jberlin@apple.com>
Let the script to update the Localizable.strings file do the reordering it wants to do.
Rubber-stamped by Anders Carlsson.
* English.lproj/Localizable.strings:
2013-06-18 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening -- show missing AccessibilityNodeObject source
files in Visual Studio.
* WebCore.vcxproj/WebCore.vcxproj: Add missing files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2013-06-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151513.
http://trac.webkit.org/changeset/151513
https://bugs.webkit.org/show_bug.cgi?id=117763
It causes assertions in debug (Requested by benjaminp on
#webkit).
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2013-06-18 Roger Fong <roger_fong@apple.com>
Replace tools32 folder with tools and update WebKit Windows solution accordingly.
<rdar://problem/14118143>.
Rubberstamped by Brent Fulgham.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd:
* WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCoreDebug.props:
* WebCore.vcxproj/WebCoreDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreGeneratedDebug.props:
* WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGeneratedProduction.props:
* WebCore.vcxproj/WebCoreGeneratedRelease.props:
* WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreProduction.props:
* WebCore.vcxproj/WebCoreRelease.props:
* WebCore.vcxproj/WebCoreReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/build-generated-files.sh:
2013-06-18 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Remove lineOverflowsFromShapeInside boolean from RenderBlock::layoutRunsAndFloatsInRange function
https://bugs.webkit.org/show_bug.cgi?id=117757
Reviewed by David Hyatt.
We don't need keep lineOverflowsFromShapeInside boolean in RenderBlock::layoutRunsAndFloatsInRange and in its
helpers because it's easy to decide whether we are in an shape content overflow state or not, so I got rid of
lineOverflowsFromShapeInside's occurences and updated the affected functions.
Covered by existing overflow tests in fast/exclusions/shape-inside and fast/regions/shape-inside.
* rendering/RenderBlock.h: Update helper's definition.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox): Add condition when overflow is already positioned.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Remove lineOverflowsFromShapeInside.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Remove lineOverflowsFromShapeInside.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Remove lineOverflowsFromShapeInside.
2013-06-18 Zalan Bujtas <zalan@apple.com>
widthMediaFeatureEval ends up with null FrameView during iframe unload.
https://bugs.webkit.org/show_bug.cgi?id=117754
Reviewed by Geoffrey Garen.
Ensure that MediaQueryEvaluator checks against NULL FrameView.
While frames are being unloaded, the Frame object does not necessarily have valid
FrameView anymore. Layout on the main frame can end up querying media values on such child
frames, while detaching.
Test: fast/frames/crash-when-child-iframe-forces-layout-during-unload-and-sibling-frame-has-mediaquery.html
* css/MediaQueryEvaluator.cpp:
(WebCore::orientationMediaFeatureEval):
(WebCore::aspect_ratioMediaFeatureEval):
(WebCore::evalResolution):
(WebCore::heightMediaFeatureEval):
(WebCore::widthMediaFeatureEval):
(WebCore::MediaQueryEvaluator::eval):
2013-06-18 Ruth Fong <ruth_fong@apple.com>
Expose a getMediaType method in WebKit
https://bugs.webkit.org/show_bug.cgi?id=117667
Reviewed by Brady Eidson.
* WebCore.exp.in: Updated to add a symbol for
HitTestResult::mediaIsVideo method
and alphabetize the list of exposed methods.
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Remove unused bool argument from ReplacementFragment's constructor
https://bugs.webkit.org/show_bug.cgi?id=117752
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/265586d9f154a9dff657511d09926429b8e1b53d.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment):
(WebCore::ReplaceSelectionCommand::doApply):
2013-06-18 Eric Carlson <eric.carlson@apple.com>
Not all subtitle tracks are SDH
https://bugs.webkit.org/show_bug.cgi?id=117738
Reviewed by Dean Jackson.
No new tests, existing tests updated.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::isSDH): New.
* html/track/InbandTextTrack.h: Add isSDH override.
* html/track/TextTrack.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::trackDisplayName): Only add "SDH" label if a track claims to be SDH.
* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::isSDH): New.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::isSDH): Return true if track has both "transcribes
spoken dialog for accessibility" and "describes music and sound for accessibility"
characteristics.
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
Simplify FormKeyGenerator::willDeleteForm
https://bugs.webkit.org/show_bug.cgi?id=117751
Reviewed by Antti Koivisto.
Merge https://chromium.googlesource.com/chromium/blink/+/c6399efb9da863eb1d1fc98b17ef925998b985ac
* html/FormController.cpp:
(WebCore::FormKeyGenerator::willDeleteForm):
2013-06-18 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
https://bugs.webkit.org/show_bug.cgi?id=117747
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/7ff656c8239ce3b125246abcc8b149a603fcff28
r147612 added setNeedsLayout(true, MarkOnlyThis) for
TextControlInnerTextElement renderer. It's ok for input[type=text]
because RenderTextControlSingleLine also has needsLayout flag, and it
has only the inner text renderer as a child.
As for input[type=search], it doesn't work. Renderer structure for
input[type=search] is:
RenderTextControlSingleLine
└Renderer for TextControlInnerContainer
└Renderer for TextControlInnerElement
└Renderer for TextControlInnerTextElement
After r147612, there is a case that only RenderTextControlSingleLine
and TextControlInnerTextElement renderer have needsLayout flag, and
others don't. It won't trigger layout for
TextControlInnerTextElement renderer.
We should set needsLayout flags of TextControlInnerContainer renderer
and TextControlInnerElement renderer by MarkContainingBlockChain.
Manual Tests: search-select-all-with-focus-style.html
(I tried but couldn't make a test that works in DRT)
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::styleDidChange):
2013-06-18 Dean Jackson <dino@apple.com>
Attempted build fix for non-Mac.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::nonSyntheticItalicFontData):
2013-06-18 Dean Jackson <dino@apple.com>
Synthesized vertical italics on rotated glyphs are transformed incorrectly
https://bugs.webkit.org/show_bug.cgi?id=117726
Reviewed by Enrica Casucci.
If a font does not have italic glyphs, and is in a vertical flow, then
the synthesis of italics was skewing in the wrong direction. While here,
ensure that no CJK text will get italics in vertical layout.
This is a topic under discussion in the CSS Working Group. The resolution
at the June 2013 face-to-face was that:
- italics in Japanese (and Chinese) text are rare in vertical layout
- most people wanted Latin text to italicize in the direction of the line flow
The final behaviour was left undefined, but we consider the change here
to be sufficient for now. In all cases, the best solution is to avoid
synthesized italics by specifying a font that includes such forms.
Tests: fast/text/international/synthesized-italic-vertical-latin.html
fast/text/international/synthesized-italic-vertical.html
* platform/graphics/FontGlyphs.cpp:
(WebCore::glyphDataAndPageForCJKCharacterWithoutSyntheticItalic): New function
that makes a new glyph data pair that is marked as NOT using a synthesized italic.
(WebCore::FontGlyphs::glyphDataAndPageForCharacter): If this is a CJK character and
has a synthesized oblique, then run it through the function above to make a new glyph data pair.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::nonSyntheticItalicFontData): Creates/returns a new SimpleFontData that will
not synthesize italics.
* platform/graphics/SimpleFontData.h: New method nonSyntheticItalicFontData.
* platform/graphics/mac/FontMac.mm:
(WebCore::Font::drawGlyphs): This is the actual bug fix. If you are in a vertical flow, the
skew direction should be downwards, not leftwards.
2013-06-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r151549.
http://trac.webkit.org/changeset/151549
https://bugs.webkit.org/show_bug.cgi?id=117741
broke selection in the web inspector source after scrolling
(Requested by smfr on #webkit).
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderLayerModelObject.cpp:
* rendering/RenderLayerModelObject.h:
2013-06-18 Santosh Mahto <santosh.ma@samsung.com>
<video> element delays document load event for ~ 3 seconds
https://bugs.webkit.org/show_bug.cgi?id=90272
Reviewed by Eric Carlson.
Test: media/media-preload-no-delay-loadevent.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::prepareForLoad):
No need to delay document load event here when preload="none"
2013-06-18 Diego Pino Garcia <dpino@igalia.com>
[GTK] Remove comment about possibility of handling ObjCPolymorphic (it's used by ObjC bindings only)
https://bugs.webkit.org/show_bug.cgi?id=117546
Reviewed by Xan Lopez.
According to the WebKit IDL spec the modifier ObjCPolymorphic only
applies to the Objective-C bindings generator
* bindings/scripts/CodeGeneratorGObject.pm:
(IsPolymorphic): Remove comment. Search parameter 'type' in array, instead of
concatening a series of 'or' conditionals.
2013-06-18 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fix after r151673
https://bugs.webkit.org/show_bug.cgi?id=116042
Reviewed by Philippe Normand.
Removed a spurious semicolon in the video sink caps definition.
No new tests, no behavior change.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2013-06-18 Praveen R Jadhav <praveen.j@samsung.com>
[WebSpeech] Speech Recognition requires convertValue support in JSDictionary
https://bugs.webkit.org/show_bug.cgi?id=117731
Reviewed by Christophe Dumez.
Build fails after enabling ENABLE_SCRIPTED_SPEECH feature. This patch
resolves the issue.
No new tests. No change in behaviour.
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
2013-06-18 Mary Wu <mary.wu@torchmobile.com.cn>
[BlackBerry] only notify download client when download error
https://bugs.webkit.org/show_bug.cgi?id=117687
Reviewed by Rob Buis.
When met network error in downloading, we notify the error to download
client through download stream, we shouldn't notify page client the error.
RIM JIRA 419985
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::shouldNotifyClientFailed):
2013-06-18 Mario Sanchez Prada <mario.prada@samsung.com>
Shader compiler not properly configured for GLES on cairo based ports
https://bugs.webkit.org/show_bug.cgi?id=117705
Reviewed by Martin Robinson.
Configure the shader compiler with SH_ESSL_OUTPUT for GLESv2
compliant platforms, and with SH_GLSL_OUTPUT otherwise.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::GraphicsContext3D):
2013-06-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
touching any idl rebuilds all derived sources
https://bugs.webkit.org/show_bug.cgi?id=117708
Reviewed by Kentaro Hara.
Fix preprocess-idls.pl script to update the following files only
if they have changed:
DerivedSources/WebCore/supplemental_dependency.tmp
DerivedSources/WebCore/DOMWindowConstructors.idl
DerivedSources/WebCore/WorkerContextConstructors.idl
This avoids triggering uselessly bindings generation for all IDL
files whenever an IDL file is touched.
No new tests, no behavior change.
* bindings/scripts/preprocess-idls.pl:
(WriteFileIfChanged):
(GeneratePartialInterface):
2013-06-18 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GStreamer] [texmap] upload a video buffer into the video texture
https://bugs.webkit.org/show_bug.cgi?id=116042
Reviewed by Philippe Normand.
This patch prepares more quickly the texture when the video frame is
already in the GPU memory.
It is done using a new buffer's metadata available in GStreamer 1.2,
and its purpose is to upload buffers into a OpenGL texture.
If the decoder provides buffers with this metadata, the buffer will be
uploaded into the texture used for the video display and it will be
rendered, avoiding a expensive mem copies. This is particularly useful
for Full HD videos, where all the processing and display will be done
in the GPU.
No new tests, covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
(webkitVideoSinkProposeAllocation):
2013-06-17 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Set the http response status text
https://bugs.webkit.org/show_bug.cgi?id=117307
Reviewed by Brent Fulgham.
No new tests, covered by existing ones.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback):
2013-06-14 Brent Fulgham <bfulgham@apple.com>
AX: Correct accessibility role when -webkit-box:display is used.
https://bugs.webkit.org/show_bug.cgi?id=117706
Reviewed by Chris Fleizach.
accessibility/box-styled-lists.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): If HTML token is
of the list element type, treat it as a ListItemRole accessibility role, regardless
of what specific renderer is being used.
2013-06-17 Roger Fong <roger_fong@apple.com>
Add some UNUSED_PARAMs to RenderBlock.cpp so that it builds properly if CSS_EXCLUSIONS is disabled.
https://bugs.webkit.org/show_bug.cgi?id=117722.
Rubberstamped by Jon Lee.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
2013-06-17 Beth Dakin <bdakin@apple.com>
PageBanners appear over HTML5 video when media element is in full screen mode
https://bugs.webkit.org/show_bug.cgi?id=117721
-and corresponding-
<rdar://problem/13686998>
Reviewed by Sam Weinig.
Update the scrolling tree when a header/footer has been removed.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
2013-06-17 Roger Fong <roger_fong@apple.com>
Modify Windows makefiles to copy some bin output into Program Files.
https://bugs.webkit.org/show_bug.cgi?id=117714.
<rdar://problem/14179054>
Reviewed by Brent Fulgham.
* WebCore.vcxproj/WebCore.make:
2013-06-17 Max Vujovic <mvujovic@adobe.com>
Crash in loadPendingShaders
https://bugs.webkit.org/show_bug.cgi?id=117665
Reviewed by Dean Jackson.
Speculative fix because the crash reports do not contain a test case.
Rearrange the conditions to check m_state.hasPendingShaders() first. Additionally, check if
m_state.style() is non-null.
No new tests. We don't know how to reproduce this crash yet.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingShaders):
2013-06-17 Ruth Fong <ruth_fong@apple.com>
REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
https://bugs.webkit.org/show_bug.cgi?id=20599
Add a "Download Video"/"Download Audio" context menu item to download media
elements.
Reviewed by Beth Dakin.
No new tests. media/context-menu-action.html,
which has been disabled by bug 116651, is used to test context menus.
* English.lproj/Localizable.strings: Updated to
include localizable strings for "Download Video" and "Download Audio".
* page/ContextMenuController.cpp: Updated to
include and handle a "Download Video/Audio" context menu item.
* platform/ContextMenuItem.h:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
* platform/gtk/LocalizedStringsGtk.cpp:
* platform/qt/LocalizedStringsQt.cpp:
Updated to include localizable strings for "Download Video" and "Download Audio".
2013-06-17 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Consider bottom borders when calculating the position of the overflow
https://bugs.webkit.org/show_bug.cgi?id=117663
Reviewed by Alexandru Chiculita.
When you have a shape and the content overflows from the shape we need to push the overflow below the content box,
not below the border box. We didn't consider the bottom borders of the content box, now I fixed it too and the overflow
just starts after the content box. I added a new helper function called pushShapeContentOverflowBelowTheContentBox. Now
both the shape in flow thread and the shape overflow use the same function. I added a new test and modified the existing
tests to cover all the affected cases.
Test: fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
Existing overflow tests also modified to test the behavior:
fast/exclusions/shape-inside/shape-inside-empty-expected.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content-expected.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-block-content.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions-expected.html
fast/exclusions/shape-inside/shape-inside-overflow-fixed-dimensions.html
fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes-expected.html
fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::pushShapeContentOverflowBelowTheContentBox):
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine):
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
2013-06-17 Igor Oliveira <igor.o@sisa.samsung.com>
[CSS Regions] ::before and ::after pseudo-elements are not displayed for regions
https://bugs.webkit.org/show_bug.cgi?id=80163
When the implementation of the before/after was moved to the DOM, before/after generated
content stoppped to work with css regions. The problem happens when:
1. RenderRegion can not have children and when the PseudoElement::attach tries to create a renderer for the
generated content, it fails.
2. RenderRegion::canHaveGeneratedChildren should not be false because regions can have generated content.
Reviewed by David Hyatt.
Tests: fast/regions/region-dynamic-after-before.html
fast/regions/region-generated-content-before-after.html
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::shouldCreateRenderer):
* rendering/RenderRegion.h:
2013-06-17 Michael Brüning <michael.bruning@digia.com>
[Mac] Remove unmaintained GStreamer specific video code.
https://bugs.webkit.org/show_bug.cgi?id=117694
Reviewed by Philippe Normand.
No new tests, no behaviour change.
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]):
(-[WebVideoFullscreenController windowDidLoad]):
(-[WebVideoFullscreenController setMediaElement:]):
(-[WebVideoFullscreenController windowDidExitFullscreen]):
2013-06-17 Michael Brüning <michael.bruning@digia.com>
[Qt] Remove Qt specific QTKIT flagged code.
https://bugs.webkit.org/show_bug.cgi?id=117635
Reviewed by Simon Hausmann.
Due to disabling QTKIT for Qt in r151546, the
code the flags that are not taken into account
anymore and the code that has been rendered
unreachable by this are removed.
No new tests, no behavioural change.
* Target.pri:
* WebCore.exp.in:
* page/Settings.cpp:
* page/Settings.h:
* platform/KURL.h:
* platform/SharedBuffer.h:
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::fileSystemPath):
* platform/cf/SharedBufferCF.cpp:
* platform/graphics/FloatSize.h:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines):
* platform/graphics/cg/FloatSizeCG.cpp:
* platform/graphics/cg/IntRectCG.cpp:
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
(WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
(WebCore::MediaPlayerPrivateQTKit::paint):
(-[WebCoreMovieObserver layerHostChanged:]):
* platform/mac/SharedBufferMac.mm:
(+[WebCoreSharedBufferData initialize]):
(WebCore::SharedBuffer::createWithContentsOfFile):
2013-06-17 Allan Sandfeld Jensen <allan.jensen@digia.com>
REGRESSSION(r151632) : Build error on ASSERT(WTF_USE_GRAMMAR_CHECKING)
https://bugs.webkit.org/show_bug.cgi?id=117692
Reviewed by Jocelyn Turcotte.
Ifdef the feature-depending code and fix the assertions to check runtime conditions.
* editing/Editor.cpp:
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::markMisspellingsOrBadGrammar):
(WebCore::Editor::markBadGrammar):
* editing/TextCheckingHelper.cpp:
(WebCore::findBadGrammars):
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
(WebCore::TextCheckingHelper::isUngrammatical):
(WebCore::TextCheckingHelper::markAllBadGrammar):
(WebCore::checkTextOfParagraph):
* editing/TextCheckingHelper.h:
2013-06-17 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Unreviewed, rolling out r151632.
http://trac.webkit.org/changeset/151632
https://bugs.webkit.org/show_bug.cgi?id=117585
Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
platforms
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
2013-06-17 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.list.am: Remove non existent files from compilation
and add a missing header file.
2013-06-14 Grzegorz Czajkowski <g.czajkowski@samsung.com>
Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
https://bugs.webkit.org/show_bug.cgi?id=117585
Reviewed by Anders Carlsson.
Do not add "Check Grammar With Spelling" and "Ignore Grammar" to the context menu
when GRAMMAR_CHECKING is off.
Replace "Spelling and Grammar" with "Spelling" as the sub menu title and "Show/Hide Spelling
and Grammar" with "Show/Hide Spelling" when GRAMMAR_CHECKING is off.
Additionally, guard grammar checking in context menu code to not necessarily
compile it.
No new layout tests because every port has a different way of showing
spelling/grammar context menu items.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
2013-06-16 Simon Fraser <simon.fraser@apple.com>
Fix test assertion after r151624
An assertion was hit in RenderObject::willBeDestroyed()
for fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
because the code asserted that the RenderObject had been removed from
the FrameView's slowRepaintObject set before remove() was called,
so move the assertion to after that call.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
2013-06-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Remove a redundant virtual call to hostWindow() in FrameView::invalidateRect()
https://bugs.webkit.org/show_bug.cgi?id=117685
Reviewed by Andreas Kling.
From Blink r152490 by <vivek.vg@samsung.com>
* page/FrameView.cpp:
(WebCore::FrameView::invalidateRect): Avoid hostWindow() twice call.
2013-06-16 Kent Tamura <tkent@chromium.org>
Fix two assertion failures in Range::insertNode
https://bugs.webkit.org/show_bug.cgi?id=116511
Reviewed by Ryosuke Niwa.
> ASSERTION FAILED: childBefore == (offset ? container->childNode(offset - 1) : 0)
> third_party/WebKit/Source/WebCore/dom/RangeBoundaryPoint.h(115) : void WebCore::RangeBoundaryPoint::set(PassRefPtr<WebCore::Node>, int, WebCore::Node *)
> ASSERTION FAILED: child->parentNode()
> ../../third_party/WebKit/Source/core/dom/RangeBoundaryPoint.h(133) : void WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node *)
> 1 0x87594b2 WebCore::RangeBoundaryPoint::setToBeforeChild(WebCore::Node*)
> 2 0x87534a9 WebCore::Range::insertNode(WTF::PassRefPtr<WebCore::Node>, int&)
Range::insertNode calls Node::insertBefore, in which an event handler
can update the DOM structure so that RangeBoundaryPoint don't like. We
postpone event dispatching by EventQueueScope.
Also, remove old comments about Acid3. The behavior is standardized.
(Step 9 of http://dom.spec.whatwg.org/#dom-range-insertnode)
This patch imports http://src.chromium.org/viewvc/blink?view=revision&revision=150470 .
Test: fast/dom/Range/range-insertNode-assertion.html
* dom/Range.cpp:
(WebCore::Range::insertNode):
- Add EventQueueScope
- Remove obsolete comments
2013-06-16 Simon Fraser <simon.fraser@apple.com>
Fixed backgrounds in composited layers not repainted on scrolling
https://bugs.webkit.org/show_bug.cgi?id=117684
Reviewed by Tim Horton.
FrameView is aware that "slow-repaint objects" (i.e. renderers with
background-attachment:fixed) require a slow-scrolling path. However,
it was ignorant of the fact that such objects could be painting into
compositing layers; it simply dirtied the main tiles, and nothing else.
Fix by having FrameView track the slow-repaints objects explicitly, as we
do for position:fixed, and repaint each of them on scrolling.
Test: compositing/repaint/fixed-background-scroll.html
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): No need to initialize m_slowRepaintObjectCount,
which is now an OwnPtr<RenderObjectSet>.
(WebCore::FrameView::useSlowRepaints): Use hasSlowRepaintObjects() now.
(WebCore::FrameView::addSlowRepaintObject): Now adds the object to a set,
allocating the set if necessary.
(WebCore::FrameView::removeSlowRepaintObject): Remove the object from the set,
and deallocate the set if empty.
(WebCore::FrameView::scrollContentsSlowPath): Call repaintSlowRepaintObjects();
this is the change that fixes the bug for always-composited implementations (e.g.
tile cache). This is a conservative change; we still invalidate the tile cache
as well. This could be optimized later.
(WebCore::FrameView::repaintSlowRepaintObjects): Repaint each object in the set.
Their appropriate compositing ancestor will be repainted.
(WebCore::FrameView::scrollPositionChangedViaPlatformWidget): Call
repaintSlowRepaintObjects() so that fixed backgrounds in composited layers are
correctly repainted; this fixes the bug for WebKit1.
* page/FrameView.h: Replace m_slowRepaintObjectCount with a HashSet of
RenderObjects.
(WebCore::FrameView::hasSlowRepaintObject): Takes a RenderObject* now.
(WebCore::FrameView::hasSlowRepaintObjects): Ditto.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::styleWillChange): Pass the RenderObject.
(WebCore::RenderObject::willBeDestroyed): Assert that this RenderObject
has been removed from FrameView's set of slow-repaint objects already, if
the document is not being destroyed.
(WebCore::RenderObject::willBeRemovedFromTree): Pass the RenderObject.
2013-06-15 Simon Fraser <simon.fraser@apple.com>
Painting of fixed background images is wrong in composited layers
https://bugs.webkit.org/show_bug.cgi?id=65793
Reviewed by Sam Weinig.
The code that computed background image geometry for background-attachment:fixed
images was unaware of compositing, so often painting the image at the wrong location.
Fix by having RenderBoxModelObject::calculateBackgroundImageGeometry() do the correct
math for fixed backgrounds in composited layer by offsetting the viewport rect by
the paint container's absolute position.
Tests: compositing/backgrounds/fixed-background-on-descendant.html
compositing/backgrounds/fixed-backgrounds.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::getBackgroundPaintedExtent): Now returns a bool indicating
whether it is returning a reliable extent rect. It can return false in the case where
a background is fixed, since computing the correct extent would require finding
the appropriate composited ancestor to pass to calculateBackgroundImageGeometry().
This is OK since this function is used for "background opaque" optimizations.
(WebCore::RenderBox::computeBackgroundIsKnownToBeObscured): If getBackgroundPaintedExtent()
returns false, return false.
(WebCore::RenderBox::maskClipRect): We removed mask-attachment, so we never need to
compute the composited ancestor here and can pass null.
(WebCore::RenderBox::repaintLayerRectsForImage): Unwrap a comment.
If the changed image is related to a fixed background, geometry.hasNonLocalGeometry()
will be true. In that cause, just repaint the entire renderer rather than groveling
around for a composited ancestor.
* rendering/RenderBox.h: Changed name and signature of backgroundPaintedExtent.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): calculateBackgroundImageGeometry()
now needs to know the painting container.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Now takes a painting
container, that is required to correctly compute the viewport-relative offset for fixed
backgrounds. geometry.setHasNonLocalGeometry() is set for fixed backgrounds to indicate
to callers that, if they didn't pass a paint container, the destRect is not accurate.
The main bug fix is also here: we move the viewportRect by the absolute location of
paint container, which is equivalent to the composited layer offset.
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage): calculateBackgroundImageGeometry()
takes a paint container.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setHasNonLocalGeometry):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::hasNonLocalGeometry):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::computeBackgroundIsKnownToBeObscured): If getBackgroundPaintedExtent()
can't cheaply give an accurate answer, return false.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Pass the paint container,
which is our own renderer.
2013-06-15 Simon Fraser <simon.fraser@apple.com>
webkit-backface-visibility on a parent element stops background-position from updating
https://bugs.webkit.org/show_bug.cgi?id=116319
Reviewed by Darin Adler.
The optimization added in r102952 was incorrect in the case where a style change
resulted in a positioned-movement-only layout but also required a repaint; it assumed
that a composited layer did not need to be repainted for a a positioned-movement-only layout.
Fix by making RenderObject::setNeedsLayoutForPositionedMovement() check whether the
style change requires a repaint, and calling setLayerNeedsFullRepaint() in that situation.
Test: compositing/repaint/positioned-movement.html
* rendering/RenderLayer.h: RepaintStatus values do not need to be bit flags.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::setStyle): Pass the old style to setNeedsPositionedMovementLayout().
(WebCore::RenderObject::styleDidChange): Ditto.
* rendering/RenderObject.h:
(WebCore::RenderObject::setNeedsPositionedMovementLayout): Now takes a const RenderStyle*.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff): Remove a comment now that this bug is fixed.
(WebCore::RenderStyle::diffRequiresRepaint): Public wrapper for changeRequiresRepaint().
That function never uses contextSensitiveProperties so we can safely ignore them.
* rendering/style/RenderStyle.h: Expose a way to call changeRequiresRepaint().
2013-06-15 Darin Adler <darin@apple.com>
Try to fix iOS after last Pasteboard change.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeSelection): Put the new code inline here because the
stringSelectionForPasteboard function is currently Mac-only.
2013-06-15 Darin Adler <darin@apple.com>
Move Pasteboard::getStringSelection to Editor, fixing a layering violation
https://bugs.webkit.org/show_bug.cgi?id=117673
Reviewed by Ryosuke Niwa.
* editing/Editor.h: Added stringSelectionForPasteboardWithImageAltText.
* editing/mac/EditorMac.mm:
(WebCore::Editor::stringSelectionForPasteboard): Moved code here from the Pasteboard
class, since all the Pasteboard class did really was turn around and call back here.
(WebCore::Editor::stringSelectionForPasteboardWithImageAltText): Added. Variant of
the function above that includes image alt text. Separate named functions are often
the best pattern for something like this unless there are many different combinations.
* platform/Pasteboard.h: Remove the Mac-only Pasteboard::getStringSelectioon.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeSelection):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::writeSelectionForTypes):
Call the two new functions instead of the old Pasteboard::getStringSelection.
2013-06-15 Darin Adler <darin@apple.com>
Support using clang instead of gcc for bindings preprocessing
https://bugs.webkit.org/show_bug.cgi?id=117674
Reviewed by Sam Weinig.
I couldn't build on my computer because I don't have gcc installed.
This is my cut at fixing it.
* bindings/scripts/CodeGeneratorObjC.pm:
(ReadPublicInterfaces): Use clang if present.
* bindings/scripts/preprocessor.pm:
(applyPreprocessor): Ditto.
2013-06-14 Robert Hogan <robert@webkit.org>
REGRESSION (r148367): Facebook and Twitter icons at macworld.com are stacked vertically, obscuring Twitter one
https://bugs.webkit.org/show_bug.cgi?id=117284
Reviewed by David Hyatt.
Test: fast/text/whitespace/inline-whitespace-wrapping-7.html
We were looking for line breaks in trailing collapsed whitespace even when inside a nowrap inline.
It's wrong to do this as we don't know yet if we will want or need to break - that decision has to
be deferred until we enter a part of the line that is autowrap.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-14 Lukasz Gajowy <l.gajowy@samsung.com>
background-color is not preserved when inserting a new paragraph
https://bugs.webkit.org/show_bug.cgi?id=117138
Reviewed by Ryosuke Niwa.
The style isn't copied because background-color isn't defined as inheritable property.
Test: editing/inserting/insert-paragraph-not-preserving-background-color.html
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
Passing EditingPropertiesInEffect instead of implicit parameter OnlyEditingInheritableProperties.
2013-06-14 Adam Barth <abarth@webkit.org>
Threaded HTML parser can ASSERT in some situations
https://bugs.webkit.org/show_bug.cgi?id=117662
Reviewed by Ryosuke Niwa.
This patch merges https://chromium.googlesource.com/chromium/blink/+/3c0a112b42d72c7623f78463166dd7f04d680b4c
--->8---
The parser is supposed to stop processing data when there's a pending
location change, but before this CL we would actually process the first
token from every chunk when there was a pending location change.
If the first token in a chunk was a "script" start tag, that would put
the tree builder into TextMode, which can only process character
tokens. If the next chunk starts with another start tag token, the tree
builder would be sad and hit an ASSERT.
This CL reorders a couple lines in HTMLDocumentParser so that we check
for pending location changes before processing any tokens. This change
stops us from processing the first token from each chunk while there is
a pending location change.
This issue can reproduce on any platform, but it reproduced often on
Android because mobile markup often elides spaces between consecutive
script tags. If there are space characters between the script tags,
then those space characters will be the first ones processes in the
chunk, which doesn't trigger the ASSERT.
---8<---
Since we landed this patch in Blink, we've been able to reproduce this
issue on desktops as well. I spoke with rniwa in #webkit and he said
that WebKit doesn't have any current plans to enable the threaded
parser but that it was probably worth merging this patch anyway.
Test: http/tests/navigation/pending-location-change-assert.html
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
2013-06-14 Patrick Gansterer <paroga@webkit.org>
Introduce USE(WINGDI) for the Windows port
https://bugs.webkit.org/show_bug.cgi?id=116138
Reviewed by Ryosuke Niwa.
Using USE(WINGDI) instead of OS(WINCE) will allow us to
compile the GDI based Windows port on WinNT too.
* config.h:
* platform/graphics/BitmapImage.h:
* platform/graphics/FontPlatformData.h:
* platform/graphics/GlyphBuffer.h:
(WebCore):
(GlyphBuffer):
* platform/graphics/Gradient.h:
(Gradient):
* platform/graphics/GraphicsContext.cpp:
(WebCore):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):
* platform/graphics/ImageBufferData.h:
* platform/graphics/NativeImagePtr.h:
(WebCore):
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::paintWindowedPluginIntoContext):
(WebCore::PluginView::paint):
(WebCore::PluginView::snapshot):
2013-06-13 Jer Noble <jer.noble@apple.com>
Report the memory cost of HTMLMediaElements to GC.
https://bugs.webkit.org/show_bug.cgi?id=117608
Reviewed by Darin Adler.
Report the extra memory cost of a HTMLMediaElement to the VM, in order to
encourage GC to occur after a media element is removed from the DOM.
Because we cannot know for sure the memory cost of our underlying media
framework objects, use the worst case scenario for the media memory cost:
the buffered percentage of movie * the total data length of the movie.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_reportedExtraMemoryCost.
(WebCore::HTMLMediaElement::removedFrom): Report the extra memory cost.
* html/HTMLMediaElement.h:
* html/TimeRanges.cpp:
(TimeRanges::totalDuration): Added convenience function.
* html/TimeRanges.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::extraMemoryCost): Pass to MediaPlayerPrivate.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default to 0.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Return the percentage
loaded * total data length.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2013-06-13 Jer Noble <jer.noble@apple.com>
Add support for AVFoundation-backed HTMLMediaElements in the WebVideoFullScreenController.
https://bugs.webkit.org/show_bug.cgi?id=117597
Reviewed by Eric Carlson.
Check for media elements with AVFoundation media types and create a AVPlayerLayer
rather than a QTMovieLayer.
* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setupVideoOverlay:]): Take a CALayer rather than a
QTMovieLayer. Move the code which connects the layer with it's media source into
setMediaElement.
(-[WebVideoFullscreenController windowDidLoad]): Give the window's contentView a generic
CALayer instaead of a QTMovieLayer.
(-[WebVideoFullscreenController setMediaElement:]): Test whether the incoming media
element is backed by a QTMovie or an AVPlayer, and create the appropriate layer.
(-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the observer of
AVPlayer's rate property.
(-[WebVideoFullscreenController observeValueForKeyPath:ofObject:change:context:]):
If the keyPath is "rate", call rateChanged.
2013-06-14 Enrica Casucci <enrica@apple.com>
WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
https://bugs.webkit.org/show_bug.cgi?id=117647
<rdar://problem/13881024>
Reviewed by Darin Adler.
The API returns the matched ranges in the DOM order regardless of the
find direction, but the index of the first match after the user selection
should take the find direction into account.
Extended existing test in TestWebKitAPI.
* page/Page.cpp:
(WebCore::Page::findStringMatchingRanges): Added handling of the Backwards case.
* page/Page.h: Fixed incorrect name of the enum.
2013-06-14 Jer Noble <jer.noble@apple.com>
REGRESSION (r150651): Web Audio doesn't work at all (silence or squawks) on Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=117652
Reviewed by Eric Carlson.
r150651 disabled setting the buffer size to a large value, but in so doing, also
disabled setting the buffer size to a small value for Web Audio. Narrow the Mountain
Lion protection to just the <video> element case.
* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState):
2013-06-14 Ryosuke Niwa <rniwa@webkit.org>
Function names on Object.prototype should be common identifiers
https://bugs.webkit.org/show_bug.cgi?id=117614
Reviewed by Darin Adler.
Use the added common identifiers.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::finishCreation):
(WebCore::JSDOMWindowBase::updateDocument):
2013-06-14 Arpita Bahuguna <a.bah@samsung.com>
Editing: wrong text position when you click enter on the text behind the image
https://bugs.webkit.org/show_bug.cgi?id=115023
Reviewed by Ryosuke Niwa.
When trying to break a line after an image followed by some text, contrary
to the expected behavior the text doesn't move to a new line, instead, the
caret position just shifts to the end of line.
As per the existing implementation for inserting a paragraph separator,
the insertion position obtained corresponds to the point after the image
element.
Since the insertion position doesn't resolve to being offset in the
following text node (0 offset), no splitting of text occurs and the block
to be inserted is placed after the containing (start) block (thereby
causing the caret position to shift).
If the computed insertionPosition points to an element that shall be
ignored for editing purposes (i.e. cannot have a VisiblePosition inside
it), and the position lies either at the start or at the end of such
an element, we should move our Position either upstream or
downstream (respectively) so as to obtain a valid position which can
be used further for splitting of the text.
Test: editing/inserting/insert-paragraph-after-non-editable-node-before-text.html
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
Moving the insertionPosition either upstream or downstream, if the point
lies either at the start or at the end of the anchor node.
The ensuing position, if a text node, can then be used for splitting of
the text correctly.
2013-06-14 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Remove implementation of ContextMenu classes
https://bugs.webkit.org/show_bug.cgi?id=114860
Reviewed by Rob Buis.
This code is not being used so we can safely remove it.
* PlatformBlackBerry.cmake:
* platform/blackberry/ContextMenuBlackBerry.cpp: Removed.
* platform/blackberry/ContextMenuItemBlackBerry.cpp: Removed.
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
2013-06-14 Brent Fulgham <bfulgham@apple.com>
[Windows] Provide simple <meter> drawing logic for testing.
https://bugs.webkit.org/show_bug.cgi?id=117645.
Reviewed by Anders Carlsson.
accessbility/meter-element.html
* rendering/RenderThemeSafari.cpp: Simple test implementation
(WebCore::RenderThemeSafari::adjustMeterStyle): Added.
(WebCore::RenderThemeSafari::supportsMeter): Added.
(WebCore::RenderThemeSafari::meterSizeForBounds): Added.
(WebCore::RenderThemeSafari::paintMeter): Added.
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::progressBarTheme): Added.
(WebCore::RenderThemeWin::getClassicThemeData): Support meters.
(WebCore::RenderThemeWin::getThemeData): Support meter theme.
(WebCore::RenderThemeWin::adjustMeterStyle): Added.
(WebCore::RenderThemeWin::supportsMeter): Added.
(WebCore::RenderThemeWin::meterSizeForBounds): Added.
(WebCore::RenderThemeWin::paintMeter): Added.
* rendering/RenderThemeWin.h:
2013-06-14 Eric Carlson <eric.carlson@apple.com>
Potential use-after-free with an event fired at a HTMLMediaElement which is currently being deleted
https://bugs.webkit.org/show_bug.cgi?id=117466
Reviewed by Oliver Hunt.
Merge https://chromium.googlesource.com/chromium/blink/+/f4200a0093b3d9376f703961615359ec7fb712b4
If an event is created using as target an HTMLMediaElement which is
currently being deleted it becomes a heap-use-after free situation.
The GenericEventQueue instance is already owned by the HTMLMediaElement,
and there already is an underlying mechanism to set the target of the
event to NULL, if their target is owner of the queue.
In order to avoid creating this reference in the first place, we enqueue
the event with a NULL target to defer the refcount increment until the
timer for dispatching the event happens (which won't happen at all if
garbage collection is already destroying the objects).
Test: media/track/media-element-enqueue-event-crash.html
* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::enqueueEvent): Don't ASSERT if the event has no target.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement): Close the event queue so it won't try to
dispatch any pending events.
(WebCore::HTMLMediaElement::scheduleEvent): Don't set the event target, it will happen just
prior to event dispatch.
(WebCore::HTMLMediaElement::stop): Close the event queue.
2013-06-14 Dean Jackson <dino@apple.com>
Clicking on snapshotting plug-ins does not restart them
https://bugs.webkit.org/show_bug.cgi?id=117620
<rdar://problem/13821729>
Follow-up review comments from Darin Adler, with some
discussion on IRC.
Sprinkle OVERRIDE on virtual functions where needed. Also
make sure that the Event is a MouseEvent before casting to it.
* html/HTMLPlugInElement.h: Move defaultEventHandler back to protected and add OVERRIDE.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::defaultEventHandler): Check for MouseEvent and
use toMouseEvent().
* html/HTMLPlugInImageElement.h: Sprinkle some OVERRIDEs, and move defaultEventHandler
to private.
2013-06-14 Timothy Hatcher <timothy@apple.com>
Remove front-end from the WebCore Xcode project.
https://bugs.webkit.org/show_bug.cgi?id=117640
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
2013-06-14 Jaehun Lim <ljaehun.lim@samsung.com>
CSSParser::parseImageSet() doesn't need a parameter.
https://bugs.webkit.org/show_bug.cgi?id=117617
Reviewed by Darin Adler.
parseImageSet() can get m_valueList directly.
And minor fixes.
No new tests, no behavior change.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseFillImage):
(WebCore::CSSParser::parseBorderImage):
(WebCore::CSSParser::parseImageSet):
* css/CSSParser.h:
2013-06-14 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Dropdown button UX updates.
https://bugs.webkit.org/show_bug.cgi?id=117642.
Reviewed by Rob Buis.
JIRA 388652
Internally Reviewed by Jeff Rogers.
Change arrow assert.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintMenuList):
2013-06-14 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] LayerTiler fails to tile really big layers
https://bugs.webkit.org/show_bug.cgi?id=117211
Reviewed by Carlos Garcia Campos.
PR 273550
The cause for this bug was that LayerTiler computed which tiles are
visible by exhaustively mapping every tile to normalized device
coordinates and checking if it intersected the viewport. If there was a
lot of tiles, it would get stuck in this loop, iterating over all
tiles, for a very long time. Also, the visibility information was
transferred to the WebKit thread using mutexes, which added unnecessary
mutex contention to the mix.
Fixed by doing the reverse calculation, unprojecting the visible part
of the layer to layer coordinate space to find which tiles are visible.
Instead of doing a traditional unprojection of point to line and see
where the line intersects the layer, this patch uses the w-coordinates
of triangle vertices to perform "perspective correct texturing" of the
intersection points in device space, which is equivalent to
unprojection since perspective correct texturing computes a 2D
coordinate in (normalized) layer coordinate space which is easily
scaled up to the layer bounds and get the visible region expressed in
layer coordinate space.
The visible area is approximated by a rectangle, and a set of tiles
needing render are added to the mix, and we have a swappable data
structure so visbility can be transferred to WebKit thread without
mutexes, but instead using atomic swap.
No new tests, covered by existing tests.
* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
(CanvasLayerCompositingThreadClient):
(WebCore::CanvasLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.h:
(EGLImageLayerCompositingThreadClient):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
* platform/graphics/blackberry/LayerCompositingThreadClient.h:
(WebCore):
(LayerCompositingThreadClient):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerTile.cpp:
(WebCore::LayerTile::LayerTile):
(WebCore::LayerTile::setContents):
(WebCore::LayerTile::updateContents):
(WebCore::LayerTile::discardContents):
* platform/graphics/blackberry/LayerTile.h:
(LayerTile):
(WebCore::LayerTile::contentsScale):
(WebCore::LayerTile::setContentsDirty):
* platform/graphics/blackberry/LayerTiler.cpp:
(LayerVisibility):
(WebCore::LayerVisibility::LayerVisibility):
(WebCore::LayerVisibility::visibleRect):
(WebCore::LayerVisibility::setVisibleRect):
(WebCore::LayerVisibility::needsRender):
(WebCore::LayerVisibility::tileNeedsRender):
(WebCore::LayerVisibility::willRenderTile):
(WebCore::LayerVisibility::swapTilesNeedingRender):
(WebCore::LayerVisibility::merge):
(WebCore):
(WebCore::LayerTiler::LayerTiler):
(WebCore::LayerTiler::~LayerTiler):
(WebCore::LayerTiler::updateTextureContentsIfNeeded):
(WebCore::LayerTiler::swapFrontVisibility):
(WebCore::LayerTiler::setFrontVisibility):
(WebCore::LayerTiler::layerVisibilityChanged):
(WebCore::LayerTiler::uploadTexturesIfNeeded):
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::addTileJob):
(WebCore::LayerTiler::performTileJob):
(WebCore::LayerTiler::drawTile):
(WebCore::inflateViewport):
(WebCore::LayerTiler::drawTextures):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::rectForTile):
* platform/graphics/blackberry/LayerTiler.h:
(WebCore):
(LayerTiler):
(WebCore::LayerTiler::TextureJob::TextureJob):
(WebCore::LayerTiler::takeFrontVisibility):
* platform/graphics/blackberry/LayerUtilities.h:
(WebCore):
(WebCore::det):
(WebCore::dot):
(LayerClipEdge):
(WebCore::LayerClipEdge::LayerClipEdge):
(WebCore::LayerClipEdge::isPointInside):
(WebCore::LayerClipEdge::computeIntersection):
(WebCore::intersectPolygonWithRect):
(WebCore::computeBarycentricCoordinates):
(WebCore::manhattanDistanceToViewport):
(UnprojectionVertex):
(WebCore::compareManhattanDistanceToViewport):
(WebCore::unproject):
2013-06-14 Antoine Quint <graouts@apple.com>
[Mac] clicking caption track glyph should dismiss menu
https://bugs.webkit.org/show_bug.cgi?id=117621
We now correctly capture all click events while the captions track menu
is showing, and ensure that no other control in the media player can be
activated as the track list gets dismissed by clicking anywhere but on
itself.
Reviewed by Eric Carlson.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
Make the controls panel non-interactive and track click events in the
capture phase also on the controls container itself such that we can
identify correctly whether a click in the <video> shadow tree is on
the track list or another element (the target could only be resolved
to a shadow tree node if the event is handled within the shadow tree).
(WebCore::MediaControlsApple::hideClosedCaptionTrackList):
Make the controls panel interactive again and remove the new click
event handler on the controls container.
(WebCore::MediaControlsApple::handleClickEvent):
Capture any click event that targets a node anywhere outside of the track
list container and its subtree and hide the track list in this condition.
(WebCore::MediaControlsAppleEventListener::handleEvent):
Call handleClickEvent() on the media controls when a click event is handled.
* html/shadow/MediaControlsApple.h:
New public handleClickEvent() API such that it can be called from
MediaControlsAppleEventListener::handleEvent().
2013-06-14 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Accelerated compositing layers that intersect the image plane are incorrectly transformed
https://bugs.webkit.org/show_bug.cgi?id=117067
Reviewed by Carlos Garcia Campos.
PR 273550
The BlackBerry port used to mathematically project each corner of each
layer bounds rectangle, which gives the wrong results when the layer
intersects the image plane.
For display lists, we still got the correct appearance of the layer
contents, since the display list results in geometry that's transformed
in the vertex shader, on the GPU.
However, the transformed bounds are used for drawing the debug border,
performing visibility calculations on the CPU and drawing of WebGL,
masks/reflections and filters. Using the mathematical projection of
points that lie behind the image plane gives the wrong results.
The most important consequence of this bug was that the wrong area of
the layer would be considered visible, so a tiled layer would not
populate the right tiles (or any tiles at all).
Fixed by implementing something along the lines of the recipe in
section 6.2 of http://www.w3.org/TR/css3-transforms.
No new tests, manually testable by enabling debug border on
https://developer.mozilla.org/en-US/demos/detail/the-box/launch.
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::LayerCompositingThread):
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore):
(WebCore::LayerCompositingThread::textureCoordinates):
(WebCore::LayerCompositingThread::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
(WebCore::LayerCompositingThread::transformedBounds):
(WebCore::LayerCompositingThread::ws):
(WebCore::LayerCompositingThread::centerW):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::compareLayerW):
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::drawDebugBorder):
(WebCore):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerRenderer.h:
(WebCore):
(LayerRenderer):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::boundingBox):
(WebCore::LayerRendererSurface::transformedBounds):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::setDrawTransform):
(WebCore::LayerRendererSurface::setReplicaDrawTransform):
(LayerRendererSurface):
* platform/graphics/blackberry/LayerUtilities.h: Added.
(WebCore):
(LayerClipPlane):
(WebCore::LayerClipPlane::LayerClipPlane):
(WebCore::LayerClipPlane::isPointInside):
(WebCore::LayerClipPlane::computeIntersection):
(WebCore::intersect):
(WebCore::boundingBox):
(WebCore::multVecMatrix):
(WebCore::toVector):
2013-06-14 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Map rewind and fast forward keys to match GoogleTV
https://bugs.webkit.org/show_bug.cgi?id=117634
Reviewed by Jocelyn Turcotte.
Set the same keycode for media keys rewind and fast-forward as
GoogleTV does.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::windowsKeyCodeForKeyEvent):
2013-06-13 Carlos Garcia Campos <cgarcia@igalia.com>
Avoid unnecessary data copies when loading subresources with DoNotBufferData option
https://bugs.webkit.org/show_bug.cgi?id=115804
Reviewed by Darin Adler.
When DoNotBufferData option is used to load a resource its data
is always copied before sending it to the CachedResource. Most
of the cached resources ignore the incremental data and wait
until all data has been received to save the ResourceBuffer,
that will be NULL anyway when DoNotBufferData is used.
CachedRawResource notifies its clients about the incremental
data, but it doesn't save the data when DoNotBufferData option
is present. In those cases we are unnecessary copying the data.
CachedResource::data has been split into
CachedResource::addDataBuffer() used for incremental data chunks
when buffering data, CachedResource::addData() used for
incremental data chunks when not buffering and
CachedResource::finishLoading() used to finish the loading. This
way we get rid of the allDataReceived boolean parameter and cached
resources not interested in incremenetal data chunks only have to
implement finishLoading() without having to check if all data have
been received or not.
SubresourceLoader::sendDataToResource was always called after
checking if loading multipart content, and then it was checked
again to decided whether to copy the data or not. It has been
removed in favor of calling directly the resource methods,
finishLoading for multipart content, addDataBuffer for data chunks
when buffering and addData for data chunks when not buffering.
No new functionality, covered by existing tests.
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes): Update to API changes.
(WebCore::ImageDocumentParser::finish): Ditto.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Call
finishLoading() for multipart content.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Add data to
the resource using addDataBuffer or addData depending on whether
we are buffering or not.
(WebCore::SubresourceLoader::didFinishLoading): Call
finishLoading() for the cached resource instead of data.
* loader/SubresourceLoader.h:
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::isValidDecodedImageSize): Helper function
to check if the image size is valid.
(WebCore::CachedImage::addIncrementalDataBuffer): Helper function
to add incremental data buffer.
(WebCore::CachedImage::addDataBuffer): Call
addIncrementalDataBuffer().
(WebCore::CachedImage::addData): Create a ResourceBuffer and call
addIncrementalDataBuffer().
(WebCore::CachedImage::finishLoading):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk):
Returns a pointer to the data corresponding to the current chunk
and its length.
(WebCore::CachedRawResource::addDataBuffer): Assert to make sure
this is only called when BufferData option is present. Use
calculateIncrementalDataChunk().
(WebCore::CachedRawResource::addData): Assert to make sure this is
only called when DoNotBufferData option is present.
(WebCore::CachedRawResource::finishLoading):
(WebCore::CachedRawResource::notifyClientsDataWasReceived): Helper
private function to notify the clients about data received.
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::addDataBuffer):
(WebCore::CachedResource::addData):
(WebCore::CachedResource::finishLoading):
* loader/cache/CachedResource.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading):
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::finishLoading):
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::addDataBuffer):
(WebCore::CachedTextTrack::finishLoading):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading):
* loader/cache/CachedXSLStyleSheet.h:
2013-06-14 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL] Fix build when DRAG_SUPPORT is set OFF
https://bugs.webkit.org/show_bug.cgi?id=117628
Reviewed by Gyuyoung Kim.
Add guard around Clipboard::declareAndWriteDragImage.
* platform/efl/ClipboardEfl.cpp:
2013-06-13 Simon Fraser <simon.fraser@apple.com>
Sometimes we stick in slow scrolling mode even after leaving a page
https://bugs.webkit.org/show_bug.cgi?id=117622
Reviewed by Sam Weinig.
ScrollingCoordinator, and thus the scrolling state tree, is owned by Page,
and so persists when navigating between cached pages. We do give the ScrollingStateTree
a new ScrollingStateScrollingNode on navigation, however the ScrollingStateScrollingNode
would not have dirty flags set for, say, WheelEventHandlerCount if the document had
no wheel handlers. And because that dirty flag wasn't set, ScrollingTree::commitNewTreeState()
would fail to update m_hasWheelEventHandlers, so we'd remain in slow scrolling.
Fix by having ScrollingStateTree remember if it's been given a new root ScrollingStateScrollingNode,
and making ScrollingTree::commitNewTreeState() to the right thing in that case.
Also fix a couple of issues with the tiled scrolling indicator. First, on cached page
navigation, the indicator color would show the state for the old page, because
ScrollingCoordinatorMac::commitTreeState() checked scrollingTree()->hasWheelEventHandlers()
before the scrolling thread has committed the new scrolling tree.
Second, the color change would animate, so stop that.
Not testable, since tests can only dump the scrolling state tree.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::ScrollingStateTree):
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::commit):
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::hasNewRootStateNode):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitNewTreeState):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
* platform/graphics/ca/mac/TileController.mm:
(-[WebTiledScrollingIndicatorLayer init]): Turn off borderColor implicit animations.
2013-06-13 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Merge http response header values
https://bugs.webkit.org/show_bug.cgi?id=117342
Reviewed by Brent Fulgham.
According to the HTTP RFC some HTTP header values should be
merged if multiple entries for the same header exists.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isAppendableHeader):
(WebCore::headerCallback):
2013-06-13 Simon Fraser <simon.fraser@apple.com>
Should not call firePaintRelatedMilestones() for "update control tints" paint pass
https://bugs.webkit.org/show_bug.cgi?id=117624
Reviewed by Sam Weinig.
When window activation changes, we do a fake paint pass that is just used to
invalidate controls that change their appearance in background windows. This fake
paint should not be recorded in the inspector, and it should not cause paint-related
milestones to fire.
* page/FrameView.cpp:
(WebCore::FrameView::paintContents):
2013-06-13 Dean Jackson <dino@apple.com>
Clicking on snapshotting plug-ins does not restart them
https://bugs.webkit.org/show_bug.cgi?id=117620
<rdar://problem/13821729>
Reviewed by Simon Fraser.
HTMLPlugInElement has an event handler which would return
immediately if the element was not snapshotted, restarting
or playing. There is a case it missed, which was snapshotting
(WaitingForSnapshot to be precise). If we get a click in this
state then it should immediately restart.
* html/HTMLPlugInElement.h: Move defaultEventHandler to public (we call it from the child class).
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::defaultEventHandler): If there is a click on a snapshotting
plug-in, then call restart.
* html/HTMLPlugInImageElement.h: Virtual defaultEventHandler declaration.
2013-06-13 Zoltan Horvath <zoltan@webkit.org>
Use borderAndPadding[Before,After]() instead of border[Before,After]() + padding[Before,After]()
https://bugs.webkit.org/show_bug.cgi?id=117611
Reviewed by Dirk Schulze.
I added a new function called borderAndPaddingAfter(), since we already had borderAndPaddingBefore(). I changed
every separate additions to the old/new function. This change makes the code shorter and more straightforward.
Behavior hasn't changed, no new tests were needed.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::marginBeforeEstimateForChild):
(WebCore::RenderBlock::layoutBlockChildren):
(WebCore::RenderBlock::paintColumnRules):
(WebCore::RenderBlock::columnRectAt):
(WebCore::RenderBlock::relayoutForPagination):
(WebCore::RenderBlock::adjustRectForColumns):
(WebCore::RenderBlock::flipForWritingModeIncludingColumns):
(WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns):
(WebCore::RenderBlock::adjustForColumns):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread):
(WebCore::RenderBlock::layoutInlineChildren):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::borderAndPaddingStart):
(WebCore::RenderBoxModelObject::borderAndPaddingBefore):
(WebCore::RenderBoxModelObject::borderAndPaddingAfter):
(WebCore::RenderBoxModelObject::borderAndPaddingLogicalHeight):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::columnRectAt):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::computeIntrinsicPadding):
(WebCore::RenderTableCell::cellBaselinePosition):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
(WebCore::RenderTableSection::layoutRows):
(WebCore::RenderTableSection::firstLineBoxBaseline):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::lineSnapAdjustment):
(WebCore::RootInlineBox::selectionTop):
(WebCore::RootInlineBox::ascentAndDescentForBox):
2013-06-13 Andreas Kling <akling@apple.com>
Move Node::shouldUseInputMethod() to Element.
<http://webkit.org/b/117603>
Reviewed by Antti Koivisto.
This method is only ever called on Elements, so move it off of Node.
* dom/Element.cpp:
(WebCore::Element::shouldUseInputMethod):
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.h:
2013-06-13 Max Vujovic <mvujovic@adobe.com>
[CSS Regions] Selection dragged from a region paints its background
https://bugs.webkit.org/show_bug.cgi?id=117607
Reviewed by Alexandru Chiculita.
When a RenderFlowThread is in the selection paint phase, tell its layer to paint with the
selection only behavior. This way, only foregrounds and not backgrounds will be painted in
the dragged selection.
Manual test: ManualTests/regions/drag-selection-painting.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
2013-06-13 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes][CSS Regions] Respect bottom positioned shapes and content adjustment inside shapes
https://bugs.webkit.org/show_bug.cgi?id=117599
Reviewed by David Hyatt.
In r150478 I added support for multiple positioned shape-insides on regions, this patch covers the cases when a shape
is positioned to the bottom of the region or the region contains a shape which forces the content to be adjusted inside
the shape (e.g. we have a triangle shape and the first line needs to be started at the first position where it fits).
I introduced a new helper function to update the current shape and the current line segments in the flow thread cases. With
this new helper function all the logic which calculates the segments for shape-inside on regions is located in one function.
Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes.html
fast/regions/shape-inside/shape-inside-on-regions-block-content-polygon-with-adjustment.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-polygon-with-adjustment.html
* rendering/RenderBlock.h: Add new helper's declaration
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineLayoutState::LineLayoutState): Add a member to carry adjustment for flow thread cases.
(WebCore::LineLayoutState::adjustedLogicalLineTop): Add new member.
(WebCore::LineLayoutState::setAdjustedLogicalLineTop): Add new setter for the new member.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLine): Move flow thread case to its helper function.
(WebCore::RenderBlock::updateShapeAndSegmentsForCurrentLineInFlowThread): Added new helper for flow thread cases.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Save adjustment for flow thread cases.
2013-06-13 Mihai Tica <mitica@adobe.com>
[CSS Background Blending] Enable CSS Background blending for layers with SVGs.
The change implies adding the blending parameter for SVGImage
https://bugs.webkit.org/show_bug.cgi?id=117588
Reviewed by Dirk Schulze.
Tests: css3/compositing/background-blend-mode-image-svg.html
css3/compositing/background-blend-mode-svg-color.html
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::draw):
2013-06-13 Mihai Tica <mitica@adobe.com>
Updating the -webkit-background-blend-mode property dynamically does not trigger a redraw of the element.
Adding krit's fix: actual blending values should be compared, not the sets.
https://bugs.webkit.org/show_bug.cgi?id=117223
Reviewed by Dirk Schulze.
Test: css3/compositing/background-blend-mode-image-color-dynamic.html
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::operator==):
2013-06-13 Beth Dakin <bdakin@apple.com>
Headers and footers should be pinned to the left edge of the window when scrolling
horizontally, even when zoomed
https://bugs.webkit.org/show_bug.cgi?id=117562
-and corresponding-
<rdar://problem/14006745>
Reviewed by Sam Weinig.
We really want to use the width value from scrollOffsetForFixedPosition() for the
banner with a scaled factor of 1. So if there is a different scale factor, re-
compute this value specifically for the banners.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2013-06-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Support byte and octet types in bindings generators
https://bugs.webkit.org/show_bug.cgi?id=117547
Reviewed by Kentaro Hara.
Add support for byte and octet IDL types to the bindings
generator:
http://dev.w3.org/2006/webapi/WebIDL/#idl-byte
http://dev.w3.org/2006/webapi/WebIDL/#idl-octet
No new tests, covered by existing layout tests and by new
bindings tests.
No new tests, covered by bindings tests and:
fast/js/webidl-type-mapping.html
* WebCore.exp.in: Export new symbols for mac port.
* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMBinding.h: Add toInt8() / toUInt8()
methods to convert from JSValue to int8_t / uint8_t as
specified by Web IDL.
* bindings/js/JSDataViewCustom.cpp: Remove custom code for
getInt8, getUInt8, setInt8, setUInt8 now that byte and octet
types are supported by the bindings generator.
* bindings/scripts/CodeGeneratorCPP.pm:
* bindings/scripts/CodeGeneratorGObject.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
* bindings/scripts/test/TestObj.idl: Add tests for byte and octet types.
* html/canvas/DataView.idl: Remove [Custom] extended attribute for
getInt8, getUInt8, setInt8, setUInt8 and use newly supported byte / octet
types.
2013-06-13 Timothy Hatcher <timothy@apple.com>
Revert r150339 since it causes a hang while paused in the Web Inspector in other apps.
https://bugs.webkit.org/show_bug.cgi?id=117596
Reviewed by Joseph Pecoraro.
* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle):
2013-06-13 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed gardening. Remove dangling 'strings' folder from solution.
* WebCore.vcxproj/WebCore.vcxproj.filters: Get rid of 'strings' that was orphaned by
recent file reorganization.
2013-06-13 Praveen R Jadhav <praveen.j@samsung.com>
Avoid unwanted thread hops in ScriptProcessorNode when 'onaudioprocess' listener is not set.
https://bugs.webkit.org/show_bug.cgi?id=117578.
Reviewed by Darin Adler.
ScriptProcessorNode process operation continues to dispatch AudioProcessingEvent
even though 'onaudioprocess' listener is not set. This results in unwanted thread hops.
Code is optimized to dispatch AudioProcessingEvent only if the listener is set.
No new tests, already covered by existing tests.
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::process):
(WebCore::ScriptProcessorNode::setOnaudioprocess):
* Modules/webaudio/ScriptProcessorNode.h:
(WebCore::ScriptProcessorNode::onaudioprocess):
2013-06-13 Max Vujovic <mvujovic@adobe.com>
[CSS Regions] -webkit-background-clip: text; does not clip the background in regions
https://bugs.webkit.org/show_bug.cgi?id=117566
Reviewed by Alexandru Chiculita.
This patch enables -webkit-background-clip: text; on regions.
Test: fast/regions/webkit-background-clip-text.html
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
Force black text if we're in the text clip paint phase. This makes sure the text's alpha
channel does not affect the final opacity of the background clipping result. Rather,
the text's alpha channel affects the amount of blending between the text color
and the background.
* rendering/RenderRegion.cpp:
(WebCore::shouldPaintRegionContentsInPhase):
Factor out a function to check if we should paint the region contents in a particular
phase. Add "PaintPhaseTextClip" so that we draw the contents in the text clipping phase.
(WebCore::RenderRegion::paintObject):
Call shouldPaintRegionContentsInPhase instead of doing the phase checks directly in this
function. Move, update, and clarify the surrounding comments.
2013-06-13 Anton Obzhirov <a.obzhirov@samsung.com>
[CSS Regions] Regions auto-height and absolute positioning bug
https://bugs.webkit.org/show_bug.cgi?id=111092
Reviewed by David Hyatt.
During last layout that should update the auto-height regions new auto-height region height
is calculated correctly based on the text content, but it requires extra step
to reposition the render block after new logical height is set (correct logical height becomes
available only during last layout).
Tests: fast/regions/autoheight-abspos-bottom-align.html
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::updateLogicalHeight):
2013-06-13 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed build correction.
* WebCore.vcxproj/WebCoreCairo.props: Use proper WebKit_Libraries
environment variable, rather than older WebKitLibraries.
2013-06-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings
https://bugs.webkit.org/show_bug.cgi?id=117593
Reviewed by Geoffrey Garen.
Avoid duplicate isInt32() / isUInt32() checks in JSDOMBindings by
calling asInt32() / asUInt32() instead of toInt32() / toUInt32()
when we already know the value is a int32 / uint32.
No new tests, no behavior change.
* bindings/js/JSDOMBinding.cpp:
2013-06-13 Yuki Sekiguchi <yuki.sekiguchi@access-company.com>
Setting overflow:hidden on position:absolute does not repaint hidden content
https://bugs.webkit.org/show_bug.cgi?id=116994
Reviewed by Simon Fraser.
Since a container which has overflow clip of RenderBox which has self painting layer doesn't have a rect of the RenderBox as visual overflow,
the container should not clip request repainting rect of the RenderBox.
Test: fast/repaint/change-overflow-and-display-of-relative.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeRectForRepaint):
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::shouldUseClipForRepaint): If this has self painting layer, we should not clip for repaint.
* rendering/RenderLayerModelObject.h:
2013-06-13 Mihai Tica <mitica@adobe.com>
[CSS Background Blending] Gradients don't blend with any of the layers behind.
First, allow the layers behind opaque gradients to be drawn, then add the blending filters
when working with gradients.
https://bugs.webkit.org/show_bug.cgi?id=117532
Reviewed by Dirk Schulze.
Tests: css3/compositing/background-blend-mode-gradient-color.html
css3/compositing/background-blend-mode-gradient-gradient.html
css3/compositing/background-blend-mode-gradient-image.html
css3/compositing/background-blend-mode-multiple-background-layers.html
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
2013-06-13 Michael Brüning <michael.bruning@digia.com>
[Qt][Mac] Disable QTKit video on OS X.
https://bugs.webkit.org/show_bug.cgi?id=117591
Reviewed by Tor Arne Vestbø.
Deployment of the same Qt binaries to different
Mac OS X version makes it impossible to link against
the correct WebKitSystemInterface version at build time.
No new tests, no behavioural change.
* WebCore.pri:
2013-06-13 Morten Stenshorne <mstensho@opera.com>
Column balancing support in the region based multicol implementation
https://bugs.webkit.org/show_bug.cgi?id=116033
Start by setting the column height to the flow thread's height divided
by the number of columns. Then stretch the column height until
contents fits without creating overflowing columns, or until the
maximum allowed column height is reached, whichever comes first. This
may require several layout iterations (but normally only a
couple). For each time we stretch, stretch by the least amount
required to make a difference to which box goes where.
Also make sure that the columns get tall enough to honor orphans
and widows settings.
This change takes some tiny steps in preparing for multiple column
set support. There is also some minor cleanup and bugfixing; see
details below.
Reviewed by David Hyatt.
Tests: fast/multicol/newmulticol/balance-images.html
fast/multicol/newmulticol/balance-maxheight1.html
fast/multicol/newmulticol/balance-maxheight2.html
fast/multicol/newmulticol/balance1.html
fast/multicol/newmulticol/balance2.html
fast/multicol/newmulticol/balance3.html
fast/multicol/newmulticol/balance4.html
fast/multicol/newmulticol/balance5.html
fast/multicol/newmulticol/balance6.html
fast/multicol/newmulticol/balance7.html
fast/multicol/newmulticol/balance8.html
fast/multicol/newmulticol/balance9.html
fast/multicol/newmulticol/cell-shrinkback.html
fast/multicol/newmulticol/columns-shorthand-parsing.html
fast/multicol/newmulticol/orphans-and-widows-balance.html
fast/multicol/newmulticol/single-line.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::adjustForUnsplittableChild):
(WebCore::RenderBlock::setPageBreak):
(WebCore):
(WebCore::RenderBlock::updateMinimumPageHeight):
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlock::adjustLinePositionForPagination):
(WebCore::RenderBlock::adjustBlockChildForPagination): If no lines
cross the boundaries, we need to report where blocks cross
instead, so that the column balancer knows how much to stretch
columns if necessary.
* rendering/RenderBlock.h:
* rendering/RenderFlowThread.h:
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
(WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
(WebCore::RenderMultiColumnBlock::relayoutForPagination):
(WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
* rendering/RenderMultiColumnBlock.h:
(WebCore::RenderMultiColumnBlock::columnHeightAvailable):
(WebCore::RenderMultiColumnBlock::requiresBalancing):
(RenderMultiColumnBlock):
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
* rendering/RenderMultiColumnFlowThread.h:
(RenderMultiColumnFlowThread):
* rendering/RenderMultiColumnSet.cpp: Get rid of
RenderMultiColumnSet::updateLogicalHeight() override. Make
RenderMultiColumnSet behave more like normal blocks, by having
computeLogicalHeight() calculate logical top in addition to
height, just like any other block.
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset): This
method will become more meaningful once we add support for
multiple column sets.
(WebCore):
(WebCore::RenderMultiColumnSet::pageLogicalTopForOffset):
(WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
(WebCore::RenderMultiColumnSet::calculateBalancedHeight):
(WebCore::RenderMultiColumnSet::recordSpaceShortage):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
(WebCore::RenderMultiColumnSet::prepareForLayout):
(WebCore::RenderMultiColumnSet::computeLogicalHeight):
(WebCore::RenderMultiColumnSet::columnCount):
(WebCore::RenderMultiColumnSet::columnIndexAtOffset):
repaintFlowThreadContent() could end up in an infinite loop
because columnIndexAtOffset() could return UINT_MAX
(subtracting 1 from unsigned 0, which columnCount() could return),
which an unsigned integer obviously can never become larger
than. Also always call columnIndexAtOffset() if we want to get the
column index for some offset, rather than doing it on our own
sometimes. To make this work also during layout, we cannot just
return the last column created so far if we're past it, since
adding new columns is exactly what we want to do at this point.
* rendering/RenderMultiColumnSet.h:
(RenderMultiColumnSet):
2013-06-12 Anders Carlsson <andersca@apple.com>
Remove the notion of inactive plug-ins
https://bugs.webkit.org/show_bug.cgi?id=117570
<rdar://problem/13484213>
Reviewed by Tim Horton.
Remove RenderEmbeddedObject::PluginInactive and the replacement text.
* English.lproj/Localizable.strings:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::unavailablePluginReplacementText):
* rendering/RenderEmbeddedObject.h:
2013-06-12 Dean Jackson <dino@apple.com>
[Mac] Change default Traditional Chinese serif font on 10.9
https://bugs.webkit.org/show_bug.cgi?id=117568
Reviewed by Alexey Proskuryakov.
Change default font on newer versions of OS X.
* page/mac/SettingsMac.mm:
(WebCore::Settings::initializeDefaultFontFamilies): Use 'Songti TC'
on 10.9 and above.
2013-06-12 Dean Jackson <dino@apple.com>
[Mac] Change default Simplified Chinese serif font on 10.9
https://bugs.webkit.org/show_bug.cgi?id=117567
Reviewed by Alexey Proskuryakov.
Change default font on newer versions of OS X.
* page/mac/SettingsMac.mm:
(WebCore::Settings::initializeDefaultFontFamilies): Use 'Songti SC'
instead of 'STSong' on newer systems.
2013-06-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix crashes due to failed ImageBuffer allocation
https://bugs.webkit.org/show_bug.cgi?id=117541
Reviewed by Andreas Kling.
From Blink r152268 by <pdr@chromium.org>
A crash can happen due to a failed ImageBuffer allocation in
SVGImage::drawPatternForContainer(). Added a check for that failed allocation.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
2013-06-12 Eduardo Lima Mitev <elima@igalia.com>
[atk] Replace deprecated call to atk_document_get_locale() in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=115647
Reviewed by Martin Robinson.
Override the get_object_locale() method of WebkitAccessibleWrapperAtk's internal
AtkObject, to include custom implementations for AtkDocument and AtkText objects,
taking the logic as-is from AtkDocument::get_document_locale() and DumpRenderTree's
AccessibilityUIElementAtk::language(), respectively.
Apart from improving encapsulation, this avoids calling deprecated get_document_locale()
method.
No new functionality, no new tests.
* accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
(webkitAccessibleDocumentInterfaceInit): Chains implementation of
AtkDocument::get_document_locale() to AtkObject::get_object_locale().
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetObjectLocale): Add implementation of locale resolution for
objects of type AtkDocument and AtkText.
(webkitAccessibleClassInit): Override AtkObject::get_object_locale() method.
2013-06-12 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move more build targets for source code that's free of layer violations into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115936
Reviewed by Martin Robinson.
No new tests - no new functionality.
* GNUmakefile.list.am: Move more build targets under the platform_sources and platformgtk_sources listing.
These build targets represent source files that are already free of platform layer violations and are as such
ready to be pushed down from the WebCore layer into the Platform layer.
2013-06-12 Ruth Fong <ruth_fong@apple.com>
"Open Video in New Window" doesn't make sense in fullscreen
https://bugs.webkit.org/show_bug.cgi?id=117556
Reviewed by Beth Dakin.
No new tests needed.
* WebCore.exp.in: Added WebKit2 hook for mediaIsInFullscreen() method.
2013-06-12 Ryosuke Niwa <rniwa@webkit.org>
Accessibility code assumes an area element's parent is a map element
https://bugs.webkit.org/show_bug.cgi?id=117496
Reviewed by Chris Fleizach.
We can't make such an assumption. Scripts can insert any element between area and map elements.
Merge https://chromium.googlesource.com/chromium/blink/+/b6f486284f08c52904701c93e1ec0b7d6e76af9f.
Test: accessibility/image-map-with-indirect-area-crash.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
2013-06-12 Robert Hogan <robert@webkit.org>
Whitespace between inlines with nowrap and a shrink-to-fit parent gets a line-break when it shouldn't
https://bugs.webkit.org/show_bug.cgi?id=117370
Reviewed by David Hyatt.
Test: fast/text/whitespace/inline-whitespace-wrapping-8.html
A no-wrap inline shouldn't include trailing space when deciding whether it fits on a line.
Likewise when we finish iterating through the objects on a line we should clear our linebreak
if the only thing that prevents us fitting on the line is our collapsed trailing whitespace.
Removing the trailing space from this measurement means we need to watch out for potential
breaks between no-wrap inlines, in particular if we leave a no-wrap inline ignoring spaces
and enter an autowrap inline then we need to mark the beginning of the autowrap inline
as a potential linebreak. The test fast/text/whitespace/inline-whitespace-wrapping-5.html
is an example of such a case.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::fitsOnLine):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
(WebCore::LineWidth::setTrailingWhitespaceWidth):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2013-06-12 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] rectangle and inset-rectangle do not properly handle rx and ry
https://bugs.webkit.org/show_bug.cgi?id=116745
Reviewed by Dirk Schulze.
If ry is not supplied, it now defaults to the rx value. Also, if rx
and ry are not supplied, they default to 0px. This also has the effect
that the computed style for any rectangle or inset-rectangle now
contains all six parameters.
If rx > width/2 then it is clamped to width/2, and if ry > height/2,
then it is clamped to height/2. This happens at layout time because
given mixed units and relative units, that is the only time this
determination can be made.
Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-large-radius.html
fast/exclusions/shape-outside-floats/shape-outside-floats-rounded-rectangle-large-radius.html
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape): Remove checks for undefined, since rx
and ry cannot be undefined in BasicShapes anymore.
(WebCore::basicShapeForValue): If radii are undefined in CSS, set
default values in the BasicShape, per the spec.
* rendering/ExclusionShape.cpp:
(WebCore::ensureRadiiDoNotOverlap): Utility method to ensure radii
don't overlap.
(WebCore::ExclusionShape::createExclusionShape): Remove defaulting to
zero, clamp radii per the spec.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeRectangle::path): Remove defaulting.
(WebCore::BasicShapeRectangle::blend): Ditto.
(WebCore::BasicShapeInsetRectangle::path): Ditto.
(WebCore::BasicShapeInsetRectangle::blend): Ditto.
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeRectangle::BasicShapeRectangle): Remove defaulting
to undefined for radii.
(WebCore::BasicShapeRectangle::setCornerRadiusX): Add assert to
prevent undefined.
(WebCore::BasicShapeRectangle::setCornerRadiusY): Add assert to
prevent undefined.
(WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle): Ditto.
(WebCore::BasicShapeInsetRectangle::setCornerRadiusX): Add assert to
prevent undefined.
(WebCore::BasicShapeInsetRectangle::setCornerRadiusY): Add assert to
prevent undefined.
2013-06-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Support Title UI Element Accessibility Attribute
https://bugs.webkit.org/show_bug.cgi?id=117530
Reviewed by Anders Carlsson.
Fixes: accessibility/list-item-role.html
accessibility/hidden-legend.html
* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Extend to support access
for the Title UI Element object.
* accessibility/win/AccessibilityObjectWrapperWin.h: Revise interface to use Variant output,
which is more in keeping with the Mac's 'id' method signature.
2013-06-12 Ralph Thomas <ralpht@gmail.com>
[CSS Shaders] Animations and transitions should use validated custom programs
https://bugs.webkit.org/show_bug.cgi?id=117550
Run filters used for animations and transitions through RenderLayer::computeFilterOperations
in order to validate custom filter operations.
Reviewed by Alexandru Chiculita.
No new tests as no platform can run custom filters with accelerated animations yet.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2013-06-12 Ruth Fong <ruth_fong@apple.com>
Allow for toggling fullscreen on <video> elements
https://bugs.webkit.org/show_bug.cgi?id=117220
Reviewed by Dean Jackson.
This patch adds the ability for fullscreen
context menu item on <video> elements to switch between "Enter Fullscreen"
and "Exit Fullscreen" and behave appropriately.
No new tests. media/context-menu-action.html,
which has been disabled by bug 116651, is used to test context menus.
* English.lproj/Localizable.strings: Add "Exit Fullscreen" string.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::toggleFullscreenState): Added to appropriately enter/exit fullscreen.
* html/HTMLMediaElement.h:
* page/ContextMenuController.cpp:
* platform/ContextMenuItem.h:
* platform/LocalizedStrings.cpp:
* platform/LocalizedStrings.h:
Updated to rename variables more appropriately to reflect the toggle-ability of video fullscreen.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::mediaIsInFullscreen): Added to check if an element
was a media element in fullscreen.
(WebCore::HitTestResult::toggleMediaFullscreenState): Added to hook into
HTMLMediaElement::toggleFullscreenState.
* rendering/HitTestResult.h:
2013-06-12 Sergio Villar Senin <svillar@igalia.com>
Skipping {}, () and [] blocks while error recovering in CSS
https://bugs.webkit.org/show_bug.cgi?id=116071
Reviewed by Darin Adler.
From Blink r150201 and r150755 by <serya@chromium.org>
Test: fast/css/parsing-expr-error-recovery.html
The CSS parser should properly recover from invalid {}, () and []
blocks skipping them instead of discarding the whole declaration
as invalid. This merge is actually made of two different changes
from Blink, the original one that fixes the bug and another one
which refactors a bit the code making it more legible.
* css/CSSGrammar.y.in:
2013-06-12 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Remove dead WebDOM code
https://bugs.webkit.org/show_bug.cgi?id=113370
Reviewed by Anders Carlsson.
BlackBerry PR 347565
Internally reviewed by Charles Wei.
* PlatformBlackBerry.cmake:
2013-06-12 Daniel Bates <dabates@apple.com>
window.find() case-insensitive search doesn't match diacritical marks
https://bugs.webkit.org/show_bug.cgi?id=117353
<rdar://problem/8535227>
Reviewed by Darin Adler.
Currently, a case-insensitive window.find() search will return true for a word w
(e.g. café) with diacritical characters when w appears on the page without
diacritical marks (e.g. cafe). This leads to bad results, especially when
searching for a non-English word (e.g. qué) where the presence of an accented
character(s) may change the meaning of the word. Instead window.find() should
return false when case-insensitively matching a word with diacritical marks to
the same word without diacritical marks.
Test: fast/text/find-diacritical-mark.html
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::SearchBuffer):
2013-06-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
Support latest Web IDL indexed property getters
https://bugs.webkit.org/show_bug.cgi?id=117507
Reviewed by Kentaro Hara.
Support latest Web IDL indexed property getters:
http://www.w3.org/TR/WebIDL/#dfn-support-indexed-properties
Drop support for outdated [IndexedGetter] and [NumericIndexedGetter]
IDL extended attributes. Since the new getter format specifies the
return type, the bindings generator is now smart enough to know if
the indexed getter is numeric or not on its own.
Based on Blink r149564 by <kojih@chromium.org>.
No new tests, no behavior change.
* Modules/filesystem/EntryArray.idl:
* Modules/filesystem/EntryArraySync.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* bindings/scripts/CodeGenerator.pm:
(IsNumericType):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GetIndexedGetterFunction):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestTypedArray.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSValueList.idl:
* css/MediaList.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSTransformValue.idl:
* dom/ClientRectList.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItemList.idl:
* dom/NamedNodeMap.idl:
* dom/NodeList.idl:
* dom/PropertyNodeList.idl:
* dom/TouchList.idl:
* fileapi/FileList.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLFormElement.idl:
* html/HTMLPropertiesCollection.idl:
* html/HTMLSelectElement.idl:
* html/RadioNodeList.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
2013-06-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
Rename [CallWith] to [ConstructorCallWith] for IDL interfaces
https://bugs.webkit.org/show_bug.cgi?id=117531
Reviewed by Kentaro Hara.
Rename [CallWith] to [ConstructorCallWith] for IDL interfaces as the
meaning is slightly different when [CallWith] is used for IDL operations
or attributes. This improves IDL readability a bit and makes it more
directly understandable.
Also removed [ConstructorCallWith] statements from interfaces with custom
constructors or no constructor, as this does not have any effect.
No new tests, no behavior change.
* Modules/filesystem/FileWriter.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* dom/MessageChannel.idl:
* fileapi/FileReader.idl:
* html/MediaController.idl:
* html/track/TextTrackCue.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* xml/XMLHttpRequest.idl:
2013-06-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Set windows key-code for multimedia keys
https://bugs.webkit.org/show_bug.cgi?id=117535
Reviewed by Jocelyn Turcotte.
Map Qt Key-events to their defined windows keycode values.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::windowsKeyCodeForKeyEvent):
2013-06-12 Sergio Villar Senin <svillar@igalia.com>
[Soup] Use ResourceLoadPriority
https://bugs.webkit.org/show_bug.cgi?id=112902
Reviewed by Carlos Garcia Campos.
Use the ResourceLoadPriority from the ResourceRequest to set the
correnpondent priority to each SoupMessage.
No new tests required as there is no change in functionality,
we're just enabling a new feature in the underlying network stack.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupMessageForHandleAndRequest):
* platform/network/soup/ResourceRequest.h:
(WebCore):
(WebCore::toSoupMessagePriority): Translates ResourceLoadPriority
to SoupMessagePriority.
2013-06-12 Zan Dobersek <zdobersek@igalia.com>
Remove memoryInfoEnabled, quantizedMemoryInfoEnabled settings
https://bugs.webkit.org/show_bug.cgi?id=117512
Reviewed by Darin Adler.
* page/Settings.in: Remove the memoryInfoEnabled and the quantizedMemoryInfoEnabled settings. These are not used
anywhere anymore after r151199 which simplified and moved the MemoryInfo interface under window.internals.
2013-06-12 Diego Pino Garcia <dpino@igalia.com>
[GTK] Parameter 'pseudoElement' from function 'webkit_dom_dom_window_get_computed_style' should be allowed to be NULL
https://bugs.webkit.org/show_bug.cgi?id=117332
Reviewed by Xan Lopez.
Add parameter 'pseudoElement' to the list of parameters that are allowed to
be NULL.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGReturnMacro):
2013-06-12 Sergio Villar Senin <svillar@igalia.com>
Add CSS parsing recovery to functions
https://bugs.webkit.org/show_bug.cgi?id=117500
Reviewed by Andreas Kling.
From Blink r150205 by <serya@chromium.org>
Add parsing recovery capabilities to functions. Errors were
correctly detected without this change but then the whole
declaration was invalidated. By using expr_recovery to handle them
we can recover from those errors and go on with the parsing.
* css/CSSGrammar.y.in:
2013-06-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, rolling out r151378.
http://trac.webkit.org/changeset/151378
https://bugs.webkit.org/show_bug.cgi?id=117400
Decreased IDL readability a bit.
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* css/WebKitCSSMatrix.idl:
* html/HTMLOptionElement.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Have to invalidate the mute button when changing the volume
https://bugs.webkit.org/show_bug.cgi?id=117464
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/c4c685c82908449526fd8c251cc551e729ebed08
but without a test since the test doesn't work in WebKit.
* html/shadow/MediaControls.cpp:
(WebCore::MediaControls::changedVolume):
2013-06-11 Max Vujovic <mvujovic@adobe.com>
[CSS Regions] Regions don't create a stacking context for their contents
https://bugs.webkit.org/show_bug.cgi?id=114268
Reviewed by Alexandru Chiculita.
Paint the region content (from RenderFlowThread) during the background phase instead of the
foreground phase.
Let's assume there is a region and a sibling element. The sibling partially overlaps the
region and appears after the region in DOM order.
Before this patch, we would paint in this order:
1) Region background
2) Sibling background
3) Region content
4) Sibling content
As a result, the sibling background would incorrectly paint between the region
background and the region content. Instead, the sibling background should paint over the
region background and the region content.
After this patch, we paint in this order:
1) Region background
2) Region content
3) Sibling background
4) Sibling content
Test: fast/regions/region-sibling-paint-order.html
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::paintObject):
2013-06-11 Jer Noble <jer.noble@apple.com>
REGRESSION: (r149232) videos on disney.com are initially scrambled on load
https://bugs.webkit.org/show_bug.cgi?id=117517
Reviewed by Eric Carlson.
Set a background color on the AVPlayerLayer to avoid corruption when no
frames are available to display.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Use HTMLElementFactory to create equivalent elements in WebVTTElement
https://bugs.webkit.org/show_bug.cgi?id=117423
Reviewed by Eric Carlson.
Merge https://chromium.googlesource.com/chromium/blink/+/3d60bec8e5dabfe877c482797d9ef430bfde31
This change forces the calls through the factory so that we create appropriate sub-classes based upon the passed tag name,
rather than just creating a concrete HTMLElement class with an inappropriate tag name.
Test: media/track/getCueAsHTMLCrash.html
* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::createEquivalentHTMLElement):
2013-06-11 Benjamin Poulain <bpoulain@apple.com>
Split SelectorDataList::executeSingleTagNameSelectorData() into the 4 kinds of traversal
https://bugs.webkit.org/show_bug.cgi?id=117486
Reviewed by Ryosuke Niwa.
Since this is pretty common, split the name selector to have the constant conditions
outside the traversal.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2013-06-11 Eric Carlson <eric.carlson@apple.com>
[Mac] Update text track menu
https://bugs.webkit.org/show_bug.cgi?id=117351
Reviewed by Darin Adler.
No new tests, existing tests updated.
* English.lproj/Localizable.strings: Update the menu title.
* page/CaptionUserPreferencesMac.mm: System language is no longer needed.
* platform/LocalizedStrings.cpp: Ditto.
* platform/LocalizedStrings.h:
2013-06-11 Benjamin Poulain <bpoulain@apple.com>
Fix the element type in the selector checkers
https://bugs.webkit.org/show_bug.cgi?id=117450
Reviewed by Anders Carlsson.
* css/SelectorCheckerFastPath.cpp:
(WebCore::HTMLNames::checkClassValue):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::executeSingleClassNameSelectorData):
2013-06-11 Benjamin Poulain <bpoulain@apple.com>
Clean up the initializer mess in Document
https://bugs.webkit.org/show_bug.cgi?id=117448
Reviewed by Ryosuke Niwa.
Basic cleaning from
https://chromium.googlesource.com/chromium/blink/+/e54ba8d3b62b0245ecdf2f3ec11cd33b4035a4d7
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
2013-06-11 Jer Noble <jer.noble@apple.com>
Set the font size for in-band captions on the display box, not the :cue.
https://bugs.webkit.org/show_bug.cgi?id=117515
Reviewed by Eric Carlson.
Make the in-band font size behavior match the out-of-band behavior.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::setFontSize):
2013-06-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Implement 'attributeValue' accessor to support testing.
https://bugs.webkit.org/show_bug.cgi?id=117513
Reviewed by Anders Carlsson.
* WebCore.vcxproj/WebCore.vcxproj: Add new implementation file.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* accessibility/win/AccessibilityObjectWrapperWin.cpp: Added.
* accessibility/win/AccessibilityObjectWrapperWin.h: Add declaration
2013-05-27 Robert Hogan <robert@webkit.org>
Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
https://bugs.webkit.org/show_bug.cgi?id=93735
Reviewed by Darin Adler.
Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
intrinsic height or width. This causes them to go down the wrong height and width computation
path in RenderBox when they are absolute positioned.
The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
the helpers for returning their approximation of intrinsic height and width.
Test: fast/replaced/width-and-height-of-positioned-replaced-elements.html
* rendering/RenderBox.cpp:
(WebCore::isReplacedElement):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
There are unused variables in ApplyStyleCommand::mergeEndWithNextIfIdentical and ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds
https://bugs.webkit.org/show_bug.cgi?id=117475
Reviewed by Andreas Kling.
Removed.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
2013-06-11 Robert Hogan <robert@webkit.org>
Fix typo in r151445
Unreviewed build fix.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Remove redundant calls to ceilToFloat in RenderBlock::computeInlinePreferredLogicalWidths
https://bugs.webkit.org/show_bug.cgi?id=117490
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/be336b14325b2938ff6a4fb6191073a6e717a57c.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2013-06-03 Robert Hogan <robert@webkit.org>
Painting collapsed borders during scrolling
https://bugs.webkit.org/show_bug.cgi?id=85658
Reviewed by David Hyatt.
Test: fast/repaint/table-cell-collapsed-border-scroll.html
WHen painting collapsed borders we need to paint the borders of the row above
the topmost dirtied row so that we compute the correct value for the dirtied row's collapsed border.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintObject):
2013-06-11 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Custom HTTP method support
https://bugs.webkit.org/show_bug.cgi?id=117302
Reviewed by Kenneth Rohde Christiansen.
No new tests, already covered by existing ones like:
http/tests/xmlhttprequest/workers/methods.html
http/tests/xmlhttprequest/workers/methods-async.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-06-11 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Remove 'using namespace std'
https://bugs.webkit.org/show_bug.cgi?id=117498
Reviewed by Anders Carlsson.
No new tests, no behavior change.
* inspector/InspectorAgent.cpp: Remove unneeded 'using namespace std'.
* inspector/InspectorFrontendClientLocal.cpp: Use explicit std:: qualifiers instead.
(WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowHeight):
(WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
* inspector/InspectorFrontendHost.cpp: Remove unneeded 'using namespace std'.
* inspector/InspectorPageAgent.cpp: Remove unneeded 'using namespace std'.
2013-06-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Support latest Web IDL named property getters
https://bugs.webkit.org/show_bug.cgi?id=117403
Reviewed by Kentaro Hara.
Add support for the latest Web IDL named property getters to the JSC
bindings generator:
http://www.w3.org/TR/WebIDL/#idl-named-properties
Drop support for outdated [NamedGetter] IDL extended attribute.
Support for other kinds of named properties will be added in later
patches. This patch only brings named property getters.
This patch is based on Blink r149247 by kojih@chromium.org.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertyDescriptorBody):
(GetSpecialAccessorFunctionForType):
(GetNamedGetterFunction):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(applyTypedefs):
(parseSpecialOperation):
(parseSpecials):
(applyMemberList):
* bindings/scripts/test/TestEventTarget.idl:
* css/StyleSheetList.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringMap.idl:
* dom/NamedNodeMap.idl:
* dom/NodeList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLCollection.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLPropertiesCollection.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/Storage.idl:
2013-06-11 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Test editing/execCommand/indent-paragraphs.html times out
https://bugs.webkit.org/show_bug.cgi?id=117235
Reviewed by Rob Buis.
PR 346414.
After r150224 ResourceHandle::start() can fail returning false so
that the ResourceHandle is destroyed and the error not
handled. Handle the errors by scheduling a InvalidURLFailure and
returning true when startJob fails to make sure the ResourceHandle
is not destroyed and the error is handled and notified to the
client.
Fixes timeout in editing/execCommand/indent-paragraphs.html.
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
(WebCore::ResourceHandle::start):
2013-06-11 Ryosuke Niwa <rniwa@webkit.org>
Remove IntRect::pixelSnapped* and its enclosingRect since they are no longer used
https://bugs.webkit.org/show_bug.cgi?id=117494
Reviewed by Darin Adler.
Merge: https://chromium.googlesource.com/chromium/blink/+/9433dc00e882e2808ac1db3c1fd89090896d7b58
https://chromium.googlesource.com/chromium/blink/+/7beaa73aa099170cb2cad02c12c5e0a448b12c21
* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::update):
* platform/graphics/IntRect.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::hitTestCulledInline):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintUsingContainer):
2013-06-11 Sergio Villar Senin <svillar@igalia.com>
Autoclose braces and parentheses at the end of style sheet
https://bugs.webkit.org/show_bug.cgi?id=117414
Reviewed by Andreas Kling.
From Blink r150202 by <serya@chromium.org>
Use closing_parenthesis and closing_brace instead of the literals
'}' and ')'. This allows the parser to treat expressions with
unmatched closing braces/parenthesis as if all of them were
actually closed.
Tests: animations/keyframe-autoclose-brace.html
css3/autoclose-braces-and-parentheses.html
* css/CSSGrammar.y.in:
2013-06-10 Jae Hyun Park <jae.park@company100.net>
[CoordinatedGraphics] Typos in custom shader support
https://bugs.webkit.org/show_bug.cgi?id=117413
Reviewed by Noam Rosenthal.
Wrong keyframe is passed when assigning filterValue.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
2013-06-10 Ryosuke Niwa <rniwa@webkit.org>
text-transform: capitalize shouldn't upconvert
https://bugs.webkit.org/show_bug.cgi?id=117485
Reviewed by Adam Barth.
Avoid the upconversion. Merge https://chromium.googlesource.com/chromium/blink/+/c5a221d6da2443df0639c01c40aac6040908ec79.
* rendering/RenderText.cpp:
(WebCore::makeCapitalized):
2013-06-10 Ryosuke Niwa <rniwa@webkit.org>
DocType strings should be 8 bit wide
https://bugs.webkit.org/show_bug.cgi?id=117487
Reviewed by Michael Saboff.
Merge https://chromium.googlesource.com/chromium/blink/+/8da02d0ce3965c4e6bf227db856bce930393429a.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertDoctype):
2013-06-10 Ryosuke Niwa <rniwa@webkit.org>
Make more functions const
https://bugs.webkit.org/show_bug.cgi?id=117455
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/886866f5034d7f30f8aa607b909313f99db1f3b4.
* editing/VisibleUnits.cpp:
(WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves):
* html/canvas/WebGLRenderingContext.cpp:
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::evalDisabledErrorMessage):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::shouldIndentText):
2013-06-10 Jer Noble <jer.noble@apple.com>
REGRESSION(r151302): Many broken webaudio/ tests on Mac port.
https://bugs.webkit.org/show_bug.cgi?id=117446
Reviewed by Chris Rogers.
The new "pageConsentRequiredForAudioStart()" restriction was blocking playback event
even when page consent was given. Remvoe the restriction immediately in that case.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::startRendering):
2013-06-10 Andreas Kling <akling@apple.com>
REGRESSION(r150633): Find on page non-focused text highlight color is bright yellow.
<rdar://problem/14098882>
<http://webkit.org/b/117371>
Reviewed by Anders Carlsson.
There was a mistake in the parameter ordering which still compiled because of
implicit bool/unsigned conversion.
Changed the interface of Page::findMatchesForText() to use enums instead of bools.
No test because the color of the highlighted matches is not available through APIs.
* page/Page.h:
* page/Page.cpp:
(WebCore::Page::findMatchesForText):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::countFindMatches):
2013-06-10 Bear Travis <betravis@adobe.com>
[CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code
https://bugs.webkit.org/show_bug.cgi?id=117162
Reviewed by Alexandru Chiculita.
With the split between the CSS Exclusions and CSS Shapes specifications,
some renaming is necessary. In general, this patch removes 'Exclusion' from
any Shapes code, while organizing the rendering shapes code into a 'shapes'
folder.
Renames:
ExclusionShape -> Shape
Exclusion[Rectangle|Polygon] -> [Rectangle|Polygon]Shape
Exclusion -> Shape
Refactoring, no new tests.
* CMakeLists.txt:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSPrimitiveValue.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyShape::setValue):
(WebCore::ApplyPropertyShape::applyValue):
(WebCore::ApplyPropertyShape::createHandler):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::PropertyWrapperShape::PropertyWrapperShape):
(WebCore::CSSPropertyAnimation::ensurePropertyMap):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::shapeInsideInfo):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange):
(WebCore::shapeInfoRequiresRelayout):
(WebCore::RenderBlock::updateRegionsAndExclusionsBeforeChildLayout):
(WebCore::RenderBlock::computeShapeSize):
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::computeLogicalLocationForFloat):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::ensureShapeInsideInfo):
(WebCore::RenderBlock::shapeInsideInfo):
(WebCore::RenderBlock::setShapeInsideInfo):
(WebCore::RenderBlock::allowsShapeInsideInfoSharing):
(WebCore::RenderBlock::xPositionForFloatIncludingMargin):
(WebCore::RenderBlock::yPositionForFloatIncludingMargin):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutShapeInsideInfo):
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::constructBidiRunsForLine):
(WebCore::adjustLogicalLineTop):
(WebCore::RenderBlock::updateLineBoundariesForShapes):
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
* rendering/RenderBox.h:
(WebCore::RenderBox::shapeOutsideInfo):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintOffset):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):
* rendering/shapes/PolygonShape.cpp: Renamed from Source/WebCore/rendering/ExclusionPolygon.cpp.
(WebCore::leftSide):
(WebCore::isReflexVertex):
(WebCore::computeXIntersection):
(WebCore::inwardEdgeNormal):
(WebCore::outwardEdgeNormal):
(WebCore::appendArc):
(WebCore::snapVerticesToLayoutUnitGrid):
(WebCore::computeShapePaddingBounds):
(WebCore::computeShapeMarginBounds):
(WebCore::PolygonShape::shapePaddingBounds):
(WebCore::PolygonShape::shapeMarginBounds):
(WebCore::getVertexIntersectionVertices):
(WebCore::appendIntervalX):
(WebCore::compareEdgeIntersectionX):
(WebCore::computeXIntersections):
(WebCore::computeOverlappingEdgeXProjections):
(WebCore::PolygonShape::getExcludedIntervals):
(WebCore::PolygonShape::getIncludedIntervals):
(WebCore::firstFitRectInPolygon):
(WebCore::aboveOrToTheLeft):
(WebCore::PolygonShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/PolygonShape.h: Renamed from Source/WebCore/rendering/ExclusionPolygon.h.
(WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
(WebCore::OffsetPolygonEdge::edgeIndex):
(WebCore::OffsetPolygonEdge::basis):
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/RectangleShape.cpp: Renamed from Source/WebCore/rendering/ExclusionRectangle.cpp.
(WebCore::ellipseXIntercept):
(WebCore::ellipseYIntercept):
(WebCore::FloatRoundedRect::paddingBounds):
(WebCore::FloatRoundedRect::marginBounds):
(WebCore::FloatRoundedRect::cornerInterceptForWidth):
(WebCore::RectangleShape::shapePaddingBounds):
(WebCore::RectangleShape::shapeMarginBounds):
(WebCore::RectangleShape::getExcludedIntervals):
(WebCore::RectangleShape::getIncludedIntervals):
(WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
* rendering/shapes/RectangleShape.h: Renamed from Source/WebCore/rendering/ExclusionRectangle.h.
(WebCore::FloatRoundedRect::FloatRoundedRect):
(WebCore::FloatRoundedRect::rx):
(WebCore::FloatRoundedRect::ry):
(WebCore::RectangleShape::RectangleShape):
* rendering/shapes/Shape.cpp: Renamed from Source/WebCore/rendering/ExclusionShape.cpp.
(WebCore::createRectangleShape):
(WebCore::createShapeCircle):
(WebCore::createShapeEllipse):
(WebCore::createPolygonShape):
(WebCore::physicalRectToLogical):
(WebCore::physicalPointToLogical):
(WebCore::physicalSizeToLogical):
(WebCore::Shape::createShape):
* rendering/shapes/Shape.h: Renamed from Source/WebCore/rendering/ExclusionShape.h.
(WebCore::LineSegment::LineSegment):
(WebCore::Shape::~Shape):
(WebCore::Shape::shapeMargin):
(WebCore::Shape::shapePadding):
* rendering/shapes/ShapeInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.cpp.
(WebCore::::computedShape):
(WebCore::::computeSegmentsForLine):
* rendering/shapes/ShapeInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInfo.h.
(WebCore::MappedInfo::ensureInfo):
(WebCore::MappedInfo::removeInfo):
(WebCore::MappedInfo::info):
(WebCore::MappedInfo::infoMap):
(WebCore::ShapeInfo::~ShapeInfo):
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::clearSegments):
(WebCore::ShapeInfo::shapeLogicalTop):
(WebCore::ShapeInfo::shapeLogicalBottom):
(WebCore::ShapeInfo::shapeLogicalLeft):
(WebCore::ShapeInfo::shapeLogicalRight):
(WebCore::ShapeInfo::shapeLogicalWidth):
(WebCore::ShapeInfo::shapeLogicalHeight):
(WebCore::ShapeInfo::logicalLineTop):
(WebCore::ShapeInfo::logicalLineBottom):
(WebCore::ShapeInfo::shapeContainingBlockHeight):
(WebCore::ShapeInfo::lineOverlapsShapeBounds):
(WebCore::ShapeInfo::lineWithinShapeBounds):
(WebCore::ShapeInfo::dirtyShapeSize):
(WebCore::ShapeInfo::shapeSizeDirty):
(WebCore::ShapeInfo::owner):
(WebCore::ShapeInfo::ShapeInfo):
(WebCore::ShapeInfo::logicalTopOffset):
(WebCore::ShapeInfo::logicalLeftOffset):
* rendering/shapes/ShapeInsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.cpp.
(WebCore::LineSegmentRange::LineSegmentRange):
(WebCore::ShapeInsideInfo::isEnabledFor):
(WebCore::ShapeInsideInfo::adjustLogicalLineTop):
* rendering/shapes/ShapeInsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeInsideInfo.h.
(WebCore::LineSegmentIterator::LineSegmentIterator):
(WebCore::ShapeInsideInfo::createInfo):
(WebCore::ShapeInsideInfo::hasSegments):
(WebCore::ShapeInsideInfo::segments):
(WebCore::ShapeInsideInfo::segmentRanges):
(WebCore::ShapeInsideInfo::currentSegment):
(WebCore::ShapeInsideInfo::setNeedsLayout):
(WebCore::ShapeInsideInfo::needsLayout):
(WebCore::ShapeInsideInfo::ShapeInsideInfo):
* rendering/shapes/ShapeInterval.cpp: Renamed from Source/WebCore/rendering/ExclusionInterval.cpp.
(WebCore::IntervalX1Comparator::operator()):
(WebCore::ShapeInterval::intersect):
(WebCore::sortShapeIntervals):
(WebCore::mergeShapeIntervals):
(WebCore::intersectShapeIntervals):
(WebCore::subtractShapeIntervals):
* rendering/shapes/ShapeInterval.h: Renamed from Source/WebCore/rendering/ExclusionInterval.h.
(WebCore::ShapeInterval::ShapeInterval):
* rendering/shapes/ShapeOutsideInfo.cpp: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.cpp.
(WebCore::ShapeOutsideInfo::isEnabledFor):
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
* rendering/shapes/ShapeOutsideInfo.h: Renamed from Source/WebCore/rendering/ExclusionShapeOutsideInfo.h.
(WebCore::ShapeOutsideInfo::shapeLogicalOffset):
(WebCore::ShapeOutsideInfo::leftSegmentShapeBoundingBoxDelta):
(WebCore::ShapeOutsideInfo::rightSegmentShapeBoundingBoxDelta):
(WebCore::ShapeOutsideInfo::createInfo):
(WebCore::ShapeOutsideInfo::ShapeOutsideInfo):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::initialShapeInside):
* rendering/style/RenderStyle.h:
* rendering/style/ShapeValue.h: Renamed from Source/WebCore/rendering/style/ExclusionShapeValue.h.
(WebCore::ShapeValue::createShapeValue):
(WebCore::ShapeValue::createOutsideValue):
(WebCore::ShapeValue::createImageValue):
(WebCore::ShapeValue::type):
(WebCore::ShapeValue::shape):
(WebCore::ShapeValue::image):
(WebCore::ShapeValue::setImage):
(WebCore::ShapeValue::operator==):
(WebCore::ShapeValue::ShapeValue):
* rendering/style/StyleRareNonInheritedData.h:
2013-06-10 Iago Toral Quiroga <itoral@igalia.com>
Use Cairo implementation of the WidgetBackingStore instead of X11 when running on Wayland
https://bugs.webkit.org/show_bug.cgi?id=116717
Reviewed by Martin Robinson.
Refactored WidgetBackingStore to be an abstract base class and make
GtkWidgetBackingStoreX11 and WidgetBackingStoreCairo inherit from it.
GtkWidgetBackingStoreX11 renamed to WidgetBackingStoreGtkX11.
* GNUmakefile.list.am:
* platform/cairo/WidgetBackingStore.h:
(WebCore):
(WidgetBackingStore):
(WebCore::WidgetBackingStore::WidgetBackingStore):
(WebCore::WidgetBackingStore::~WidgetBackingStore):
* platform/cairo/WidgetBackingStoreCairo.cpp:
(WebCore::WidgetBackingStoreCairo::create):
(WebCore):
(WebCore::WidgetBackingStoreCairo::WidgetBackingStoreCairo):
(WebCore::WidgetBackingStoreCairo::~WidgetBackingStoreCairo):
(WebCore::WidgetBackingStoreCairo::cairoSurface):
(WebCore::WidgetBackingStoreCairo::scroll):
* platform/cairo/WidgetBackingStoreCairo.h: Added.
(WebCore):
(WidgetBackingStoreCairo):
* platform/gtk/GtkWidgetBackingStoreX11.cpp:
(WebCore::WidgetBackingStoreGtkX11::create):
(WebCore):
(WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
(WebCore::WidgetBackingStoreGtkX11::cairoSurface):
(WebCore::WidgetBackingStoreGtkX11::scroll):
* platform/gtk/GtkWidgetBackingStoreX11.h: Added.
(WebCore):
(WidgetBackingStoreGtkX11):
2013-06-10 Otto Derek Cheung <otcheung@rim.com>
[BlackBerry] Store ParsedCookies as RefPtrs instead of PassRefPtrs in CookieDatabaseBackingStore
https://bugs.webkit.org/show_bug.cgi?id=117411
JIRA388672
BRWSR-11465
Reviewed by Rob Buis.
When we queue up ParsedCookie objects for modification, we should be storing them as a refptr instead
of a PassRefPtr.
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
2013-06-10 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in RenderGeometryMap::mapToContainer
https://bugs.webkit.org/show_bug.cgi?id=117395
Reviewed by Alexandru Chiculita.
Test: fast/regions/assert-flow-thread-compositing.html
We should not allow RenderNamedFlowThread layers to be composited, rather their collected children should checked
for compositing through their associated RenderRegions.
The assert in RenderGeometryMap::mapToContainer was hit because after https://bugs.webkit.org/show_bug.cgi?id=117270
the render named flow threads are hooked in RenderView layer tree - with the caveat that they are not directly involved
in hit testing/paint which is done through their associated regions.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeCompositingRequirements): Bail out if we hit a render named flow thread layer.
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Ditto.
2013-06-10 Sergio Villar Senin <svillar@igalia.com>
Refactor CALCFUNCTION rules in the CSS grammar
https://bugs.webkit.org/show_bug.cgi?id=117401
Reviewed by Andreas Kling.
From Blink r149862 by <serya@chromium.org>.
Reduce the number of CALCFUNCTION rules by refactoring the closing
parenthesis handling code.
No new tests required as this is a refactoring, no new functionality
added.
* css/CSSGrammar.y.in:
2013-06-10 Radu Stavila <stavila@adobe.com>
[CSS Regions] Rename region-overflow to region-fragment
https://bugs.webkit.org/show_bug.cgi?id=117397
Renamed -webkit-region-overflow to -webkit-region-fragment and
webkitRegionOverflow to webkitRegionFragment according to the new working draft
at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
Reviewed by Alexander Pavlov.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasNextPage):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2013-06-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Replace [ConstructorRaisesException] with [RaisesException]
https://bugs.webkit.org/show_bug.cgi?id=117400
Reviewed by Kentaro Hara.
Replace [ConstructorRaisesException] with [RaisesException] IDL extended
attribute and drop [ConstructorRaisesException]. It makes little sense
to have 2 extended attributes with the same meaning.
[RaisesException] can now be used on IDL operations to indicate that the
method may throw exceptions or on interfaces to indicate that the
constructor may throw exceptions.
From Blink r148027 by Kentaro Hara <haraken@chromium.org>.
No new tests, no behavior change.
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* css/WebKitCSSMatrix.idl:
* html/HTMLOptionElement.idl:
* page/EventSource.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-06-10 Mátyás Mustoha <mmatyas@inf.u-szeged.hu>
Web Inspector: refactor statusBarItems getter in front-end.
https://bugs.webkit.org/show_bug.cgi?id=110114
Reviewed by Noam Rosenthal.
Refactored "statusBarItems" methods from getters into functions and
moved default implementation from Panel.js to View.js.
Patch created by Andrey Lushnikov.
* inspector/front-end/AdvancedSearchController.js:
(WebInspector.SearchView.prototype.statusBarItems):
* inspector/front-end/ApplicationCacheItemsView.js:
(WebInspector.ApplicationCacheItemsView.prototype.statusBarItems):
* inspector/front-end/AuditsPanel.js:
(WebInspector.AuditsPanel.prototype.statusBarItems):
* inspector/front-end/CPUProfileView.js:
(WebInspector.CPUProfileView.prototype.statusBarItems):
* inspector/front-end/CSSSelectorProfileView.js:
(WebInspector.CSSSelectorProfileView.prototype.statusBarItems):
* inspector/front-end/CanvasProfileView.js:
(WebInspector.CanvasProfileView.prototype.statusBarItems):
(WebInspector.CanvasProfileType.prototype.statusBarItems):
* inspector/front-end/ConsolePanel.js:
(WebInspector.ConsolePanel.prototype.statusBarItems):
* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype.statusBarItems):
* inspector/front-end/CookieItemsView.js:
(WebInspector.CookieItemsView.prototype.statusBarItems):
* inspector/front-end/DOMStorageItemsView.js:
(WebInspector.DOMStorageItemsView.prototype.statusBarItems):
* inspector/front-end/DatabaseTableView.js:
(WebInspector.DatabaseTableView.prototype.statusBarItems):
* inspector/front-end/Drawer.js:
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.statusBarItems):
* inspector/front-end/ExtensionPanel.js:
(WebInspector.ExtensionPanel.prototype.statusBarItems):
* inspector/front-end/FileSystemView.js:
(WebInspector.FileSystemView.prototype.statusBarItems):
* inspector/front-end/HeapSnapshotView.js:
* inspector/front-end/IndexedDBViews.js:
(WebInspector.IDBDataView.prototype.statusBarItems):
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkLogView.prototype.statusBarItems):
(WebInspector.NetworkPanel.prototype.statusBarItems):
* inspector/front-end/Panel.js:
(WebInspector.Panel.prototype.wasShown):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfileType.prototype.statusBarItems):
(WebInspector.ProfilesPanel.prototype.statusBarItems):
(WebInspector.ProfilesPanel.prototype._updateProfileTypeSpecificUI):
(WebInspector.ProfilesPanel.prototype._showProfile):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.statusBarItems):
(WebInspector.ResourcesPanel.prototype._innerShowView):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype.statusBarItems):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype.statusBarItems):
* inspector/front-end/View.js:
(WebInspector.View.prototype.statusBarItems):
2013-06-10 Benjamin Poulain <benjamin@webkit.org>
Add special tree walking for the single tag or class CSS query selectors
https://bugs.webkit.org/show_bug.cgi?id=117388
Reviewed by Ryosuke Niwa.
Queries for a single tag name or a single class name are the most common
input of querySelector.
This patch adds a simplified tree walking in those cases, only checking that particular
case instead of a full selector.
With the change, the balanced query selector benchmarks become 11% faster.
* css/SelectorCheckerFastPath.cpp:
(WebCore::HTMLNames::checkClassValue):
* dom/SelectorQuery.cpp:
(WebCore::isSingleTagNameSelector):
(WebCore::SelectorDataList::executeSingleTagNameSelectorData):
(WebCore::isSingleClassNameSelector):
(WebCore::SelectorDataList::executeSingleClassNameSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2013-06-09 Roger Fong <roger_fong@apple.com>
Layout info should never be cleared before delayed scroll information updates.
https://bugs.webkit.org/show_bug.cgi?id=116689.
Reviewed by Darin Adler.
Test: fast/flexbox/clear-overflow-before-scroll-update.html
Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic in RenderBlock.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::finishDelayUpdateScrollInfo): Call clearLayoutOverflow here.
(WebCore::RenderBlock::layout): Only call clearLayoutOverflow here if scrolling isn't being delayed.
(WebCore::RenderBlock::clearLayoutOverflow): Remove clearLayoutOverflow, move into RenderBlock to keep delayed scrolling logic in the same file.
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp: Should call updateScrollInfoAfterLayout, not layer()->updateScrollInfoAfterLayout(), so that it takes delayed scrolling logic into account.
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp: Ditto
(WebCore::RenderGrid::layoutBlock):
2013-06-09 Benjamin Poulain <bpoulain@apple.com>
Split the 3 paths of SelectorDataList::execute() into 3 separate functions
https://bugs.webkit.org/show_bug.cgi?id=117378
Reviewed by Ryosuke Niwa.
Split those to have several small execute() fucntions instead of a giant one.
* dom/SelectorQuery.cpp:
(WebCore::selectorForIdLookup):
(WebCore::isTreeScopeRoot):
(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::executeSingleMultiSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:
2013-06-09 Benjamin Poulain <bpoulain@apple.com>
Scrolling with platformWidget and delegateScrolling is incorrectly clamped
https://bugs.webkit.org/show_bug.cgi?id=117369
<rdar://problem/13985064>
Reviewed by Darin Adler.
The patch http://trac.webkit.org/changeset/142526 clamps the input position
in the ScrollView scroll range. This was done for the path to the ScrollingCoordinator.
The problem with that change is ScrollView::setScrollPosition() can delegate the scrolling
to either a platformWidget, or through delegateScrolling. After r142526, the position is clamped,
and we do not let those external scrolling mechanims handle the out-of-bound scrolling.
This patch fixes the issue by moving the threaded scrolling call to ScrollView,
after the delegate handling code.
* page/FrameView.cpp:
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::requestScrollPositionUpdate):
2013-06-08 Igor Oliveira <igor.o@sisa.samsung.com>
before/after generated content is not working with HTMLSummaryElement and HTMLDetailsElement.
https://bugs.webkit.org/show_bug.cgi?id=117374
Allow before/after pseudo generated content be added in HTMLDetailsElement and HTMLSumamaryElement.
Reviewed by Ryosuke Niwa.
Test: fast/css-generated-content/details-summary-before-after.html
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::childShouldCreateRenderer):
* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::childShouldCreateRenderer):
2013-06-08 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Allow headers with empty value
https://bugs.webkit.org/show_bug.cgi?id=117344
Reviewed by Brent Fulgham.
No new tests, already covered by:
http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html
http/tests/xmlhttprequest/post-blob-content-type-sync.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-06-08 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Handling of blob elements is incorrect
https://bugs.webkit.org/show_bug.cgi?id=117301
Reviewed by Kenneth Rohde Christiansen.
No new tests, covered by existing ones:
http/tests/fileapi/xhr-send-form-data-filename-escaping.html
http/tests/fileapi/xhr-send-form-data-mimetype-normalization.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getFormElementsCount): Resolve Blob elements.
2013-06-07 Alexandru Chiculita <achicu@adobe.com>
[CSS Regions] Layers inside the RenderFlowThread should be collected by the layer of RenderView
https://bugs.webkit.org/show_bug.cgi?id=117270
Reviewed by David Hyatt.
RenderNamedFlowThreads are attached to the RenderView, but they are painted
and hit-tested through their regions. The easiest way to prevent the RenderView
from seeing the RenderNamedFlowThreads as its own children was to avoid collecting
the layers of the RenderNamedFlowThreads as children layers of the RenderView.
However, most of the code is analyzing the layers tree starting from the root,
so having the RenderNamedFlowThread participate in the layer tree is needed
in order to enable compositing for layers inside the flow thread.
This patch makes the RenderNamedFlowThread visible to the RenderView, but
ignores it when iterates the children of the RenderView in paint and hit-test methods.
No new tests, no visible changes.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintList):
(WebCore::RenderLayer::hitTestList):
(WebCore::RenderLayer::calculateLayerBounds):
(WebCore::RenderLayer::collectLayers):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
2013-06-07 Bear Travis <betravis@adobe.com>
[CSS Exclusions][CSS Shapes] Incorrect compile flag in LayoutState.h
https://bugs.webkit.org/show_bug.cgi?id=117318
Reviewed by Alexandru Chiculita.
m_exclusionShapeInsideInfo should be guarded by the CSS_SHAPES flag,
not the CSS_EXCLUSIONS flag.
No tests required.
* rendering/LayoutState.h:
2013-06-07 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of outdated raises() from Web IDL
https://bugs.webkit.org/show_bug.cgi?id=117350
Reviewed by Darin Adler.
Stop using "raises()" in the IDL as this is no longer part of the Web IDL
specification. Web IDL no longer specifies exceptions for operations. Instead
it is now explained in prose.
WebKit still needs to know if the method can throw an exception (but does not
need the exception name) so this patch adds a WebKit specific IDL extended
attribute: [RaisesException]. The naming is consistent with Blink.
This results in more standard and concise IDL. This also simplifies a lot
the code of the IDL parser.
No new tests, no behavior change.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReaderSync.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/FileEntrySync.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(GenerateConstructorDefinition):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOperationRest):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSupplemental.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/DOMImplementation.idl:
* dom/DataTransferItemList.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/EventTarget.idl:
* dom/MessagePort.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeIterator.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/WebKitNamedFlow.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMTokenList.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLDialogElement.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLVideoElement.idl:
* html/MediaController.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/Crypto.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Performance.idl:
* storage/Storage.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGColor.idl:
* svg/SVGDocument.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGLocatable.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPointList.idl:
* svg/SVGStringList.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransformList.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathResult.idl:
2013-06-07 Brady Eidson <beidson@apple.com>
REGRESSION (r151088): Crash navigating away from non-loaded main resources with non-loaded scripts.
<rdar://problem/14052886> and https://bugs.webkit.org/show_bug.cgi?id=117278
Reviewed by Anders Carlsson.
Test: http/tests/navigation/slow-loading-page-with-slow-script.php
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::isPendingScriptReady): The script runner might be told about a script
after it has already been detached (the main resource load has finished/failed/cancelled).
Don't dereference a null document in that case.
2013-06-07 Andy Estes <aestes@apple.com>
Compile WebCoreTestShimLibrary.cpp on iOS, but exclude the Carbon bits
https://bugs.webkit.org/show_bug.cgi?id=117360
Reviewed by Mark Rowe.
In r150114 we tried to make the WebCoreTestShim target build on iOS by
excluding its only source file from the build. While this allowed the
target to build, it prevented the target's product (WebCoreTestShim.dylib)
from being created. This causes xcodebuild to fail if you ask it to
install the target.
Fix this by building the target's product on iOS. Just use the
preprocessor to exclude the bits that won't build on iOS.
* Configurations/WebCoreTestShim.xcconfig:
* testing/WebCoreTestShimLibrary.cpp:
2013-06-07 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION: Lines jump up and down while typing Chinese or Japanese
https://bugs.webkit.org/show_bug.cgi?id=115931
Reviewed by Darin Adler.
The bug was caused by Font::width caching the width of text even when the font fallbacks existed when fallbackFonts
argument was null; because of this, a later call to Font::width was returning the width without filling up
fallbackFonts even if it was not null this time.
Fixed the bug by adding a local fallback fonts hash set, and checking the emptiness of this variable in Font::width.
Also added pass fallbackFonts around in various places to make use of the cached font fallbacks.
No new tests. Unfortunately I haven't been able to make a reliable reduction for this bug.
* platform/graphics/Font.cpp:
(WebCore::Font::width):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::measureHyphenWidth):
(WebCore::setLogicalWidthForTextRun):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderText.cpp:
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
2013-06-07 Zan Dobersek <zdobersek@igalia.com>
[regression] build failure WebKitFontFamilyNames.h missing
https://bugs.webkit.org/show_bug.cgi?id=117178
Reviewed by Sam Weinig.
* GNUmakefile.am: Make libPlatform and other sources depend on the generated platform sources. This should prevent
build failures in source code that's depending on the generated platform sources.
2013-06-07 Chris Fleizach <cfleizach@apple.com>
MathML line fraction needs to parse number values
https://bugs.webkit.org/show_bug.cgi?id=117305
Reviewed by Darin Adler.
The line fraction thickness was not handling arbitrary thickness numbers.
The accessibility code was not handling default values for line thickness, so
it made sense to have AX rely on the RenderFraction object to retrive the thickness.
Modified existing tests to cover new behavior.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathLineThickness):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::updateFromElement):
* rendering/mathml/RenderMathMLFraction.h:
(WebCore::RenderMathMLFraction::lineThickness):
(WebCore::toRenderMathMLFraction):
2013-06-07 Claudio Saavedra <csaavedra@igalia.com>
[rendering] Use foreground color to render the overtype caret
https://bugs.webkit.org/show_bug.cgi?id=117347
Reviewed by Darin Adler.
Currently, the overtype caret is rendered using the colors of
a normal selection, which is confusing. This patch enables RenderObject
to differentiate between a normal and a overtype caret selection,
in order to use a different color for the latter.
Also, let RenderView update the selection if this is unchanged
when going from a overtype caret to one character selection and
viceversa.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor):
* rendering/RenderView.cpp:
(WebCore::RenderView::setSelection):
* rendering/RenderView.h:
2013-06-07 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of outdated getter / setter raises from Web IDL
https://bugs.webkit.org/show_bug.cgi?id=117346
Reviewed by Darin Adler.
Stop using "getter / setter raises" in the IDL as this is no longer part of
the Web IDL specification. Web IDL no longer specifies exceptions for
attribute getters or setters. Instead, it is now explained in prose.
WebKit still needs to know if the getter / setter can throw an exception
(but does not need the exception name) so this patch adds 2 WebKit specific
IDL extended attributes: [GetterRaisesException] / [SetterRaisesException].
The naming is consistent with Blink.
This results in more standard and concise IDL. This also simplifies a lot
the code of the IDL parser.
Note that this patch does not remove "raises()" from the IDL methods yet.
This should be replaced by [RaisesException] IDL extended attribute in a
later patch.
No new tests, no behavior change.
* Modules/indexeddb/IDBRequest.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/SQLResultSet.idl:
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateProperty):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseAttributeRest):
(parseAttributeRestOld):
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSCharsetRule.idl:
* css/CSSRule.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSValue.idl:
* css/MediaList.idl:
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/Document.idl:
* dom/Node.idl:
* dom/ProcessingInstruction.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/TreeWalker.idl:
* html/HTMLElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLProgressElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackRegion.idl:
* page/DOMWindow.idl:
* storage/Storage.idl:
* svg/SVGAltGlyphElement.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimatedBoolean.idl:
* svg/SVGAnimatedEnumeration.idl:
* svg/SVGAnimatedInteger.idl:
* svg/SVGAnimatedNumber.idl:
* svg/SVGAnimatedString.idl:
* svg/SVGElement.idl:
* svg/SVGGlyphRefElement.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLength.idl:
* svg/SVGPreserveAspectRatio.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGStyleElement.idl:
* svg/SVGViewSpec.idl:
* xml/XMLHttpRequest.idl:
* xml/XPathResult.idl:
2013-06-07 Kangil Han <kangil.han@samsung.com>
Remove unused header includes in Document
https://bugs.webkit.org/show_bug.cgi?id=117339
Reviewed by Andreas Kling.
Minor code cleanup.
* dom/Document.cpp:
* dom/Document.h:
2013-06-07 Allan Sandfeld Jensen <allan.jensen@digia.com>
Unnecessary use of Layout types in GraphicsLayer::paintGraphicsLayerContents
https://bugs.webkit.org/show_bug.cgi?id=117340
Reviewed by Darin Adler.
There is no reason to use Layout types when copying from Int types to Int types.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::paintGraphicsLayerContents):
2013-06-07 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL][GTK] TextCheckerEnchant uses deprecated enchant_dict_add_to_personal
https://bugs.webkit.org/show_bug.cgi?id=117335
Reviewed by Christophe Dumez.
enchant_dict_add_to_personal has been deprecated at r22321 in Enchant repository.
No behavior change, no new tests needed.
* platform/text/enchant/TextCheckerEnchant.cpp:
(WebCore::TextCheckerEnchant::learnWord):
Use enchant_dict_add instead of enchant_dict_add_to_personal.
2013-06-07 Zalan Bujtas <zalan@apple.com>
Frame flattening: crash when child iframe is removed during beforeload.
https://bugs.webkit.org/show_bug.cgi?id=116220
Reviewed by Antti Koivisto.
FrameView can get destroyed in updateWidget(). Normally, it is protected by layout()
but with frame flattening on, it can also be called asynchronously through the
post layout timer.
Test: fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-06-06 Carlos Garcia Campos <cgarcia@igalia.com>
Make CachedResource virtual methods overridden in derived classes private
https://bugs.webkit.org/show_bug.cgi?id=117289
Reviewed by Darin Adler.
And mark them as OVERRIDE too. Also mark all CachedResource
derived classes as FINAL.
* inspector/InspectorPageAgent.cpp:
(WebCore::cachedResourcesForFrame):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.h:
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.h:
2013-06-07 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] getBoundingClientRect wrong for inline content nodes
https://bugs.webkit.org/show_bug.cgi?id=117290
Reviewed by Alexandru Chiculita.
getBoundingClientRect returned incorrect values for inline content that
was directly flowed inside regions because its mapLocalToContainer was not
properly patched as its RenderBox counterpart. This patch adds mapLocalToContainer
method in RenderFlowThread so that is properly called for all the elements inside the
flow thread.
Also, modified offsetFromContainer so that if the container is the flow thread,
offsetDependsOnPoint is set to true which further sets RenderGeometryMapStep::m_isNonUniform
to true for each step added in pushMappingToContainer methods.
Test: fast/regions/flowed-inline-content-bounding-client-rect.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
(WebCore::RenderBox::pushMappingToContainer):
(WebCore::RenderBox::offsetFromContainer):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::mapLocalToContainer):
* rendering/RenderFlowThread.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetFromContainer):
2013-06-06 Kangil Han <kangil.han@samsung.com>
Minor code cleanup to remove unused header includes
https://bugs.webkit.org/show_bug.cgi?id=117283
Reviewed by Andreas Kling.
* loader/cache/CachedResourceClient.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderBoxModelObject.cpp:
* rendering/RenderObject.cpp:
2013-06-06 Jer Noble <jer.noble@apple.com>
Restrict WebAudio from playing when disallowed by page.
https://bugs.webkit.org/show_bug.cgi?id=117310
Reviewed by Eric Carlson.
Add a new behavior restriction which would mute WebAudio
when media playback is disallowed by the page.
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::constructCommon): Set the RequirePageConsentForAudioStartRestriction
restriction for the Mac port
(WebCore::AudioContext::document): Cast the execution context to a document.
(WebCore::AudioContext::lazyInitialize): Call startRendering() instead of
m_destinationNode->startRendering() directly.
(WebCore::AudioContext::startRendering): If media loading is disabled, add
a mediaCanStart listener.
(WebCore::AudioContext::mediaCanStart): Remove the RequirePageConsentForAudioStartRestriction.
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::pageConsentRequiredForAudioStart): Added; simple wrapper.
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render): Mute output if pageConsentRequiredForAudioStart().
2013-06-03 Jer Noble <jer.noble@apple.com>
Upstream iOS WebAudio behavior restrictions.
https://bugs.webkit.org/show_bug.cgi?id=117151
Reviewed by Eric Carlson.
2012-06-25 Jeffrey Pfau <jpfau@apple.com>
<rdar://problem/11041007> WebAudio should restrict playback to user interaction on iOS
Added a bevahior restrictions field in AudioContext that behaviors similarly to
the one in HTMLMediaElement. Restrictions are lifted when JavaScript calls noteOn,
noteGrainOn or startRendering from a user gesture event.
Reviewed by Dean Jackson.
No new tests, testing framework doesn't support web audio.
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::startGrain):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::constructCommon):
(WebCore::AudioContext::lazyInitialize):
(WebCore::AudioContext::startRendering):
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::userGestureRequiredForAudioStart):
(WebCore::AudioContext::addBehaviorRestriction):
(WebCore::AudioContext::removeBehaviorRestriction):
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::render):
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::start):
2013-06-06 Ruth Fong <ruth_fong@apple.com>
Expose HTMLCanvasElement supportsContext
https://bugs.webkit.org/show_bug.cgi?id=70117
Reviewed by Darin Adler.
Adds the supportsContext function for <canvas> elements as speced here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvas-supportscontext
Test: fast/canvas/webgl/canvas-supports-context.html
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::get3DContextAttributes): Added.
Refactored function from JSHTMLCanvasElement::getContext that parses attributes.
(WebCore::JSHTMLCanvasElement::getContext): Updated to use refactored function.
(WebCore::JSHTMLCanvasElement::supportsContext): Added.
Exposes JS function supportsContext.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext): Updated to use refactored functions.
(WebCore::HTMLCanvasElement::supportsContext): Added.
Implements supportsContext function based on contextId parameter (i.e. '2d').
* html/HTMLCanvasElement.h: Added refactored functions from HTMLCanvasElement::getContext.
* html/HTMLCanvasElement.idl:
2013-06-06 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Rename updateLineBoundariesForExclusions to updateShapeAndSegmentsForCurrentLine
https://bugs.webkit.org/show_bug.cgi?id=117308
Reviewed by Alexandru Chiculita.
We have a standalone specification for CSS Shapes now: http://dev.w3.org/csswg/css-shapes/
this change renames updateLineBoundariesForExclusions to updateShapeAndSegmentsForCurrentLine.
No behavior change, no new tests needed.
* rendering/RenderBlock.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateLineBoundariesForShapes):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
2013-06-06 Diego Pino Garcia <dpino@igalia.com>
[GTK] Parameter 'refChild' from function 'webkit_dom_node_insert_before' should be allowed to be NULL
https://bugs.webkit.org/show_bug.cgi?id=117303
Reviewed by Xan Lopez.
Add parameter 'refChild' to the list of parameters that are allowed to
be NULL.
* bindings/scripts/CodeGeneratorGObject.pm:
2013-06-06 Bem Jones-Bey <bjonesbe@adobe.com>
Fix formatting in BasicShapes.cpp
https://bugs.webkit.org/show_bug.cgi?id=117309
Reviewed by Alexandru Chiculita.
I reformatted the code in BasicShapes.cpp (bug 116734) to fix the
style issues, and I got some of the formatting wrong, which makes the
code much harder to read. This patch fixes that formatting.
No new tests, formatting clean up.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeRectangle::path): Fix formatting.
(WebCore::BasicShapeInsetRectangle::path): Fix formatting.
2013-06-06 Christophe Dumez <ch.dumez@sisa.samsung.com>
Clean up AddIncludesForType in JSC bindings generators
https://bugs.webkit.org/show_bug.cgi?id=117297
Reviewed by Kentaro Hara.
Clean up AddIncludesForType in JSC bindings generators:
- Add JSC specific SkipIncludeHeader() subroutine and move
exceptions there.
- Remove special case for SerializedScriptValue by improving
the condition for callbacks: "JS" prefix is now only added to
headers in callbacks if they are wrapper types. Non-wrapper
types such as SerializedScriptValue do not have a JS*.h
header.
No new tests, code clean up.
* bindings/scripts/CodeGenerator.pm:
(SkipIncludeHeader):
- Reuse IsPrimitiveType() to avoid code duplication.
- Remove special case for String as this is not a valid IDL type
and it is not currently used.
* bindings/scripts/CodeGeneratorJS.pm:
(SkipIncludeHeader):
(AddIncludesForType):
2013-06-06 Radu Stavila <stavila@adobe.com>
:hover style not applied on hover if its display property is different from original style's
https://bugs.webkit.org/show_bug.cgi?id=7555
Properly apply the :hover pseudo-class when reattaching is required (e.g. when changing the display type)
A new AttachContext class was created to be passed along as an optional parameter to the attach/detach/reattach methods.
This new parameter is used to:
- prevent the element from being removed from the list of hovered/active elements upon detach when a reattach is in progress
- prevent the style from being incorrectly computed (due to the previous point)
- prevent the style from being computed twice (the attach() method used to recompute it)
Special care was required to the case when display:none is specified in the :hover class. Enabling the :hover style
was leaving the element without a renderer, which was causing it to remain stuck in the :hover state (subsequent mouseMove
events were not able to reset the element to its normal style due to the fact that it had no renderer).
The DragController::startDrag method was updated to properly handle the case when dragImage is NULL
(for instance by setting display:none inside the -webkit-drag pseudo-class).
Reviewed by Antti Koivisto.
Tests: fast/regions/hover-display-block-inline.html
fast/regions/hover-display-block-none.html
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::attach):
(WebCore::ContainerNode::detach):
* dom/ContainerNode.h:
* dom/Document.cpp:
(WebCore::Document::attach):
(WebCore::Document::detach):
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::setHovered):
(WebCore::Element::createRendererIfNeeded):
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::recalcStyle):
* dom/Element.h:
* dom/Node.cpp:
(WebCore::Node::AttachDetachContext::AttachDetachContext):
(WebCore::Node::AttachDetachContext::~AttachDetachContext):
(WebCore::Node::attach):
(WebCore::Node::detach):
* dom/Node.h:
(WebCore::Node::reattach):
(WebCore::Node::reattachIfAttached):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::attach):
* dom/PseudoElement.h:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::attach):
* dom/ShadowRoot.h:
* dom/Text.cpp:
(WebCore::Text::attach):
* dom/Text.h:
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::attach):
* html/HTMLCanvasElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::attach):
* html/HTMLFormControlElement.h:
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::attach):
* html/HTMLFrameElement.h:
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::attach):
* html/HTMLFrameElementBase.h:
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::attach):
* html/HTMLFrameSetElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::attach):
* html/HTMLImageElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::attach):
(WebCore::HTMLInputElement::detach):
* html/HTMLInputElement.h:
* html/HTMLLIElement.cpp:
(WebCore::HTMLLIElement::attach):
* html/HTMLLIElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::attach):
* html/HTMLMediaElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::attach):
(WebCore::HTMLOptGroupElement::detach):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::attach):
(WebCore::HTMLOptionElement::detach):
* html/HTMLOptionElement.h:
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::detach):
* html/HTMLPlugInElement.h:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::attach):
(WebCore::HTMLPlugInImageElement::detach):
* html/HTMLPlugInImageElement.h:
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::attach):
* html/HTMLProgressElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::attach):
* html/HTMLTextAreaElement.h:
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::attach):
* html/HTMLVideoElement.h:
* html/PluginDocument.cpp:
(WebCore::PluginDocument::detach):
* html/PluginDocument.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
* html/shadow/InsertionPoint.h:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::detach):
* html/shadow/SliderThumbElement.h:
* html/shadow/SpinButtonElement.cpp:
(WebCore::SpinButtonElement::detach):
* html/shadow/SpinButtonElement.h:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::SearchFieldCancelButtonElement::detach):
(WebCore::InputFieldSpeechButtonElement::attach):
(WebCore::InputFieldSpeechButtonElement::detach):
* html/shadow/TextControlInnerElements.h:
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::attach):
* loader/PlaceholderDocument.h:
* svg/SVGImageElement.cpp:
(WebCore::SVGImageElement::attach):
* svg/SVGImageElement.h:
2013-06-06 Allan Sandfeld Jensen <allan.jensen@digia.com>
ENABLE(PAN_SCROLLING) AutoscrollController::updateAutoscrollRenderer calls hitTestResultAtPoint with `true` for HitTestRequestType
https://bugs.webkit.org/show_bug.cgi?id=116896
Reviewed by Andreas Kling.
Update hitTestResultAtPoint call to new API.
* page/AutoscrollController.cpp:
(WebCore::AutoscrollController::updateAutoscrollRenderer):
2013-06-06 Carlos Garcia Campos <cgarcia@igalia.com>
ResourceLoader::resourceData() should not return a PassRefPtr
https://bugs.webkit.org/show_bug.cgi?id=117288
Reviewed by Darin Adler.
Change ResourceLoader::resourceData() to return a raw pointer
instead of a PassRefPtr since we don't want to transfer the
ownership of the resource data. Also pass a raw pointer to
CachedResource::data() so that the cached resource can decide
whether to take a reference of the data or not, for example,
CachedRawResource only takes a reference when buffering policy is
BufferData.
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
(WebCore::ImageDocumentParser::finish):
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::sendDataToResource):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::data):
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::data):
* loader/cache/CachedFont.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::data):
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::data):
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::data):
* loader/cache/CachedResource.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::data):
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::data):
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::data):
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::data):
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::data):
* loader/cache/CachedXSLStyleSheet.h:
2013-06-06 Chris Fleizach <cfleizach@apple.com>
AX: iOS ignores ARIA progressbar elements
https://bugs.webkit.org/show_bug.cgi?id=116727
Reviewed by David Kilzer.
Make this an accessible element on iOS.
Test: platform/iphone-simulator/accessibility/progressbar.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
(-[WebAccessibilityObjectWrapper _accessibilityMinValue]):
(-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
2013-06-06 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove unused HashValueForClassAndName() from JSC bindings generator
https://bugs.webkit.org/show_bug.cgi?id=117292
Reviewed by Kentaro Hara.
Remove HashValueForClassAndName() subroutine from JSC bindings generator
as it is dead code.
No new tests, code clean up.
* bindings/scripts/CodeGeneratorJS.pm:
2013-06-06 Gwang Yoon Hwang <ryumiel@company100.net>
Cannot set a new timer inside of timer callback in RunLoopTimerGtk & RunLoopTimerEFL
https://bugs.webkit.org/show_bug.cgi?id=117224
Reviewed by Christophe Dumez.
RunLoopTimer should clear its isActive flag before invoking timer
callback.
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::TimerBase::timerFired):
* platform/gtk/RunLoopGtk.cpp:
(WebCore::RunLoop::TimerBase::timerFiredCallback):
2013-06-06 Diego Pino Garcia <dpino@igalia.com>
[GTK] Parameters 'inResult' and 'resolver' from function 'webkit_dom_document_evaluate' should be allowed to be NULL
https://bugs.webkit.org/show_bug.cgi?id=117129
Reviewed by Xan Lopez.
At this moment there was a temporary fix that allowed parameter
'inResult' to be NULL (see: webk.it/42115). However, there was no fix
for parameter 'resolver'.
This patch refactors the code of the previous fix, moving the code for
determine whether a parameter can be NULL or not to GetGReturnMacro.
The solution is quite general and will alow to add other parameters in
the future if needed.
* bindings/scripts/CodeGeneratorGObject.pm:
(GetGReturnMacro): Pass functionName, as in some cases the code
generated depends on the paramName and the functionName
(ParamCanBeNull): Checks if a parameter is allowed to be NULL
(GenerateFunction):
2013-06-06 Zalan Bujtas <zalan@apple.com>
SVG objects are misplaced when SVG root has CSS transform.
https://bugs.webkit.org/show_bug.cgi?id=117252
Reviewed by Simon Fraser.
Update layer transforms for SVG if needed.
SVG root, similarly to RenderBlock needs to call RenderLayer
to get transforms updated after layout, in order to
position the transformed objects properly.
Test: fast/transforms/transform-svg.html
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):
2013-06-06 Jae Hyun Park <jae.park@company100.net>
Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=108899
Reviewed by Noam Rosenthal.
This is a preparation patch for Threaded Coordinated Graphics.
This patch changes CoordinatedSurface to be responsible for the
lifecycle of GraphicsContext used in Coordinated Graphics System.
CoordinatedImageBacking and UpdateAtlas do not ask for the ownership
of GraphicsContext anymore. Instead, those classes use client pattern to
ask the CoordiantedSurface to paint to the GraphicsContext.
This refactoring is needed to implement CoordinatedSurface for Threaded
Coordinated Graphics.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::paintToSurface):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::ImageBackingSurfaceClient::ImageBackingSurfaceClient):
(WebCore::CoordinatedImageBacking::update):
* platform/graphics/texmap/coordinated/CoordinatedSurface.h:
(WebCore::CoordinatedSurface::Client::~Client):
* platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
(WebCore::CoordinatedTile::updateBackBuffer):
(WebCore::CoordinatedTile::paintToSurfaceContext):
* platform/graphics/texmap/coordinated/CoordinatedTile.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlasSurfaceClient::UpdateAtlasSurfaceClient):
(WebCore::UpdateAtlas::paintOnAvailableBuffer):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
2013-06-05 Ryosuke Niwa <rniwa@webkit.org>
Revert the second half of r151257. WebGLRenderingContext::create can return null.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
2013-06-05 Ryosuke Niwa <rniwa@webkit.org>
Remove unnecessary null check in HTMLCanvasElement.cpp.
Rubber-stamped by Benjamin Poulain.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):
2013-06-05 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Add implementation for HTTP PUT method.
https://bugs.webkit.org/show_bug.cgi?id=117256
Reviewed by Brent Fulgham.
No new tests, covered by existing tests.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::getFormSize):
(WebCore::setupFormData):
(WebCore::ResourceHandleManager::setupPUT):
(WebCore::ResourceHandleManager::setupPOST):
2013-06-05 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Normalize mime type information
https://bugs.webkit.org/show_bug.cgi?id=117194
Reviewed by Brent Fulgham.
* platform/MIMETypeRegistry.cpp: Enable MIME type normalization for curl.
2013-06-05 Xueqing Huang <huangxueqing@baidu.com>
Move OleGetClipboard to Pasteboard::createForCopyAndPaste.
https://bugs.webkit.org/show_bug.cgi?id=117064
Reviewed by Darin Adler.
No behavior change, no new tests.
* platform/win/EditorWin.cpp:
(WebCore::Editor::newGeneralClipboard): Editor should not create IDataObject explicitly then set it to Pasteboard.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::createForCopyAndPaste): Construct a Pasteboard and create IDataObject by "OleGetClipboard".
2013-06-05 Benjamin Poulain <bpoulain@apple.com>
WebSQL forces 16-bit strings
https://bugs.webkit.org/show_bug.cgi?id=116935
Reviewed by Darin Adler.
Merge chromium 49c9632ac135f6f06e623a7a81d9da1f6bb7196f.
https://chromium.googlesource.com/chromium/blink/+/49c9632ac135f6f06e623a7a81d9da1f6bb7196f
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::getColumnValue):
2013-06-05 Bear Travis <betravis@adobe.com>
[CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
https://bugs.webkit.org/show_bug.cgi?id=117172
Reviewed by Alexandru Chiculita.
This patch adds a new compile and runtime flag for the CSS Shapes feature, which
has split off from the previous CSS Exclusions and Shapes specification. The
specifications are available here:
http://dev.w3.org/csswg/css-exclusions/
http://dev.w3.org/csswg/css-shapes/
The changes introduce a new CSS_SHAPES compile flag, and a new cssShapesEnabled
runtime flag. In general, the code changes are simple renames.
Refactoring, no new tests.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSShapesEnabled):
(WebCore::RuntimeEnabledFeatures::cssShapesEnabled):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimation::ensurePropertyMap):
* rendering/BidiRun.h:
(WebCore::BidiRun::BidiRun):
* rendering/ExclusionShapeInfo.cpp:
* rendering/ExclusionShapeInfo.h:
* rendering/ExclusionShapeInsideInfo.cpp:
* rendering/ExclusionShapeInsideInfo.h:
* rendering/ExclusionShapeOutsideInfo.cpp:
* rendering/ExclusionShapeOutsideInfo.h:
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::exclusionInfoRequiresRelayout):
(WebCore::RenderBlock::updateRegionsAndExclusionsBeforeChildLayout):
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::computeLogicalLocationForFloat):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::::collectIfNeeded):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::xPositionForFloatIncludingMargin):
(WebCore::RenderBlock::yPositionForFloatIncludingMargin):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
(WebCore::RenderBlock::constructLine):
(WebCore::computeExpansionForJustifiedText):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::computeInlineDirectionPositionsForSegment):
(WebCore::constructBidiRunsForLine):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
(WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::styleDidChange):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintOffset):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
* rendering/RenderObject.h:
(WebCore::RenderObject::hasPaintOffset):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setCSSShapesEnabled):
2013-06-05 Oliver Hunt <oliver@apple.com>
Don't throttle timers if a page is doing something that might be interesting
https://bugs.webkit.org/show_bug.cgi?id=117273
Reviewed by Gavin Barraclough.
Make the decision about whether or not to throttle timers be
determined by the PageThrottler
* page/Page.cpp:
(WebCore::Page::throttleTimers):
(WebCore::Page::unthrottleTimers):
(WebCore::Page::setVisibilityState):
(WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged):
* page/Page.h:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
2013-06-05 Mark Salisbury <mark.salisbury@hp.com>
[WinCE,WinCairo] RenderThemeWin.cpp needs to include FrameSelection.h.
https://bugs.webkit.org/show_bug.cgi?id=116583
Reviewed by Brent Fulgham.
* rendering/RenderThemeWin.cpp:
2013-06-05 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Restrict allowed protocols
https://bugs.webkit.org/show_bug.cgi?id=117257
Reviewed by Brent Fulgham.
curl supports various protocols (like: HTTP,...,POP3,IMAP...) and by
default all of the are enabled for a single curl handle. Furthermore
all of the protocols are allowed during Location header follow.
This could pose a security risk for example: a malicious server responds
with a crafted Location header pointing to an imap/../(etc) url and the
curl backend will follow it and will give the result for the WebCore.
This patch will restrict the allowed protocols to: HTTP(S), FTP(S), FILE
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-06-05 Bear Travis <betravis@adobe.com>
[css exclusions] Clean up ExclusionShapeInsideInfo dynamic removal code
https://bugs.webkit.org/show_bug.cgi?id=116236
Reviewed by David Hyatt.
Instead of keeping the ExclusionShapeInsideInfo around after it has
become stale, we can immediately remove it and just mark descendants
for relayout. This patch removes most of the code added by
https://bugs.webkit.org/show_bug.cgi?id=111029
in favor of this simpler approach.
This patch does not introduce new functionality.
* rendering/ExclusionShapeInsideInfo.h:
(WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo):
(ExclusionShapeInsideInfo): Remove needsRemoval code.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState): Ditto.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Remove
needsRemoval code and mark descendants for layout.
(WebCore):
(WebCore::RenderBlock::markShapeInsideDescendantsForLayout): Method to mark
descendants of a shape inside with inline content for layout.
(WebCore::exclusionInfoRequiresRelayout): Remove needsRemoval code.
(WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto.
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Ditto.
2013-06-05 Arunprasad Rajkumar <arurajku@cisco.com>
Avoid multiple copies of inline script & style strings
https://bugs.webkit.org/show_bug.cgi?id=117202
Reviewed by Darin Adler.
Merge from https://chromiumcodereview.appspot.com/16005007.
No new tests needed.
The HTML parser breaks up large text nodes into small chunks to avoid some
O(n^2) editing algorithms. This fix skips that workaround for <script> and
<style> elements, which aren't likely to need editing. As a result, <script>
ends up with a single text node, containing a contiguous String, which is the
source code of that inline script block.
Prior this fix, we could end up with two copies of large inline scripts: one
monolithic string retained by JSC and a number of shards retained by the DOM.
After this fix, both the DOM and JSC use the same monolithic string, removing a
copy.
* dom/Text.cpp:
(WebCore::Text::createWithLengthLimit):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::shouldUseLengthLimit):
(WebCore::HTMLConstructionSite::insertTextNode):
2013-06-05 Kondapally Kalyan <kalyan.kondapally@intel.com>
[EFL] Build fix with EGL and GLES2 backend.
https://bugs.webkit.org/show_bug.cgi?id=117246
Reviewed by Kenneth Rohde Christiansen.
r150958 added support for EGLTransportSurfaceClient.
This patch adds the missing changes.
* platform/graphics/surfaces/efl/GLTransportSurface.cpp:
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
(WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GLTransportSurface.h:
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurfacePrivate::initializeClient):
* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
* platform/graphics/surfaces/egl/EGLXSurface.h:
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/GLXSurface.h:
* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow):
(WebCore::X11Helper::createPixmap):
* platform/graphics/surfaces/glx/X11Helper.h:
2013-06-05 Jae Hyun Park <jae.park@company100.net>
[GTK] Support using GLContext from multiple threads
https://bugs.webkit.org/show_bug.cgi?id=117238
Reviewed by Martin Robinson.
Current implementation assumes that GLContext is only used in the main thread.
However, to support using GLContext from multiple threads, we need to change it
to thread local. Therefore, ASSERT(isMainThread()) is removed and GLContext is
changed to thread local.
* platform/graphics/cairo/GLContext.cpp:
(WebCore::ThreadGlobalGLContext::setContext):
(WebCore::ThreadGlobalGLContext::context):
(WebCore::currentContext):
(WebCore::GLContext::sharingContext):
(WebCore::GLContext::~GLContext):
(WebCore::GLContext::makeContextCurrent):
(WebCore::GLContext::getCurrent):
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix when CHANNEL_MESSAGING is disabled.
Add #if ENABLE(CHANNEL_MESSAGING) to JSMessageChannelCustom.cpp.
* bindings/js/JSMessageChannelCustom.cpp:
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove remaining custom getters for WorkerContext constructor attributes
https://bugs.webkit.org/show_bug.cgi?id=117247
Reviewed by Kentaro Hara.
Remove custom getter code for remaining constructor attribute on WorkerContext
interface. The custom code wasn't needed as it was doing nothing more than the
generated one. These constructor attributes are now automatically generated.
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/websockets/WebSocket.idl:
* Modules/websockets/WorkerContextWebSocket.idl: Removed.
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWorkerContextCustom.cpp:
* dom/MessageChannel.idl:
* page/EventSource.idl:
* workers/WorkerContext.idl:
* xml/XMLHttpRequest.idl:
2013-06-05 Ryuan Choi <ryuan.choi@samsung.com>
Remove ChromeClient::deviceOrPageScaleFactorChanged
https://bugs.webkit.org/show_bug.cgi?id=117245
Reviewed by Andreas Kling.
It was introduced for chromium at r147357.
But now, there are no ports to use this.
No new tests - no behavior change.
* page/ChromeClient.h:
* page/Frame.cpp:
(WebCore::Frame::deviceOrPageScaleFactorChanged):
2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net>
[Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=117222
Reviewed by Noam Rosenthal.
CoordinatedGraphicsLayer::flushCompositingState() will cross frame
boundaries if the GraphicsLayers are connected. In this case,
updateContentBuffers will invoke a painting of a sub-frame that causes
flushCompositingState recursively.
To prevent this behavior this patch extracts updateContentBuffers from
flushCompositingState, and places it in
updateContentBuffersIncludeSublayers, which is another tree traveler for
painting.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2013-06-05 Andreas Kling <akling@apple.com>
Fix some inefficiencies in AnimationController's composite animation map.
<http://webkit.org/b/117248>
Reviewed by Antti Koivisto.
Clean up some small things that were showing up in a window resizing profile (0.4%)
* page/animation/AnimationControllerPrivate.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
Renamed this ensure* to conform to the WebKit Design Patterns, 2013 edition.
Always do a single hash lookup instead of two.
(WebCore::AnimationControllerPrivate::clear):
Use RefPtr<T> for local variables, never PassRefPtr<T>. See WKDP, 2013 ed.
(WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
(WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
(WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
Peek into m_compositeAnimations through "const CompositeAnimation*" instead
of using RefPtrs. There's no need to hold a reference on the animation while
querying some const method on it.
(WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
(WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
(WebCore::AnimationController::updateAnimations):
Poke into m_compositeAnimations through "CompositeAnimation*" instead of using
RefPtrs. There's no need to hold a reference here either, we can modify the
animations through a raw pointer.
2013-06-05 Roland Takacs <rtakacs@inf.u-szeged.hu>
Web Inspector: Clear button doesn't clean Memory graph in Overview pane.
https://bugs.webkit.org/show_bug.cgi?id=112429
Reviewed by Noam Rosenthal.
There is an early return from TimelineMemoryOverview.update() when
record array is empty. Thats why if you click onto the clear button,
the canvas won't be updated.
Moved this "return condition" after the canvas size definition
because we need to know the canvas size for refreshing.
Overridden TimelineOverviewBase's reset function to clear
HeapSizeLabels' content.
* inspector/front-end/TimelineOverviewPane.js:
(WebInspector.TimelineMemoryOverview.prototype.reset):
(WebInspector.TimelineMemoryOverview.prototype.update):
2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net>
[Coordinated Graphics] Rename client classes for CoordinatedImageBacking and UpdateAtlas.
https://bugs.webkit.org/show_bug.cgi?id=111948
Reviewed by Noam Rosenthal.
This patch renames CoordinatedImageBacking::Coordinator to
CoordinatedImageBacking::Client, and UpdateAtlasClient to
UpdateAtlas::Client for naming consistency and clarification.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::create):
(WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
(WebCore::CoordinatedImageBacking::removeHost):
(WebCore::CoordinatedImageBacking::update):
(WebCore::CoordinatedImageBacking::clearContentsTimerFired):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlas::UpdateAtlas):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
2013-06-05 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Handle Return key without key text
https://bugs.webkit.org/show_bug.cgi?id=117239
Reviewed by Andreas Kling.
Test added to tst_qwebpage.cpp.
* platform/qt/PlatformKeyboardEventQt.cpp:
(WebCore::keyTextForKeyEvent):
2013-06-05 Gwang Yoon Hwang <ryumiel@company100.net>
Coordinated Graphics: Unify messages related object's lifecycles into CoordinatedGraphicsState.
https://bugs.webkit.org/show_bug.cgi?id=111919
Reviewed by Noam Rosenthal.
CoordinatedLayerTreeHostProxy has several methods, which simply passes
these calls to CoordinatedGraphicsScene.
This patch removes methods in CoordinatedLayerTreeHostProxy just for
message chaining. Instead of that, messages for creation/deletion of objects
(Layers, CustomFilters, UpdateAtlas, and ImageBacking) are unified into
CommitCoordinatedGraphicsState.
And this patch also removes codes for WebCoordinatedSurface in
CoordinatedLayerTreeHost, except for a factory method.
CoordinatedGraphicsArgumentCoders [en|de]codes CoordinatedSurface itself
using WebCoordinatedSurface.
No new tests, covered by existing tests.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::syncCustomFilterPrograms):
(WebCore::CoordinatedGraphicsScene::syncUpdateAtlases):
(WebCore::CoordinatedGraphicsScene::syncImageBackings):
(WebCore::CoordinatedGraphicsScene::commitSceneState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::update):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
* platform/graphics/texmap/coordinated/UpdateAtlas.cpp:
(WebCore::UpdateAtlas::UpdateAtlas):
* platform/graphics/texmap/coordinated/UpdateAtlas.h:
2013-06-05 Andreas Kling <akling@apple.com>
Remove unnecessary null checks in SelectorChecker::checkOne().
<http://webkit.org/b/117243>
Reviewed by Antti Koivisto.
This function was riddled with unnecessary null checks of 'element', despite ASSERT(element)
being the first thing it does.
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Merge [NoInterfaceObject] and [OmitConstructor] extended attributes
https://bugs.webkit.org/show_bug.cgi?id=115853
Reviewed by Geoffrey Garen.
Remove [OmitConstructor] extended attribute as it is overlapping with
the standard [NoInterfaceObject] Web IDL extended attribute.
Having [NoInterfaceObject] extended attribute on an interface now
implies that its constructor is omitted (i.e. not generated).
No new tests, no behavior change.
* Modules/geolocation/Coordinates.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/geolocation/Geoposition.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLError.idl:
* Modules/webdatabase/SQLResultSet.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateAttributesHashTable):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* css/CSSUnknownRule.idl:
* css/MediaQueryListListener.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* html/MicroDataItemValue.idl:
* html/ValidityState.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/EXTTextureFilterAnisotropic.idl:
* html/canvas/OESElementIndexUint.idl:
* html/canvas/OESStandardDerivatives.idl:
* html/canvas/OESTextureFloat.idl:
* html/canvas/OESTextureHalfFloat.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLCompressedTextureATC.idl:
* html/canvas/WebGLCompressedTexturePVRTC.idl:
* html/canvas/WebGLCompressedTextureS3TC.idl:
* html/canvas/WebGLContextAttributes.idl:
* html/canvas/WebGLDebugRendererInfo.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLDepthTexture.idl:
* html/canvas/WebGLLoseContext.idl:
* inspector/JavaScriptCallFrame.idl:
* inspector/ScriptProfile.idl:
* inspector/ScriptProfileNode.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/AbstractView.idl:
* page/Console.idl:
* page/Crypto.idl:
* page/PerformanceEntryList.idl:
* page/WorkerNavigator.idl:
* page/make_settings.pl:
(generateInternalSettingsIdlFile):
* svg/ElementTimeControl.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLocatable.idl:
* svg/SVGTests.idl:
* svg/SVGTransformable.idl:
* svg/SVGURIReference.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* testing/MallocStatistics.idl:
* testing/MemoryInfo.idl:
* testing/TypeConversions.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorkerContext.idl:
* workers/WorkerContext.idl:
* xml/XPathNSResolver.idl:
2013-06-05 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Font::shouldUseSmoothing() has fake dependency on Qt 5.1
https://bugs.webkit.org/show_bug.cgi?id=117195
Reviewed by Jocelyn Turcotte.
Remove the fake dependency on Qt 5.1 so we may rebase the layout tests
before switching to Qt 5.1
* platform/graphics/qt/FontPlatformDataQt.cpp:
(WebCore::FontPlatformData::FontPlatformData):
2013-06-05 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Respect renderer creation constraints when element is part of named flow
https://bugs.webkit.org/show_bug.cgi?id=116790
Reviewed by David Hyatt.
Before adding a child to a named flow, we have to make sure that the rules for
creation are properly checked.
Test: fast/regions/br-content-node-crash.xhtml
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::isChildAllowed):
Call isChildAllowed on the original parent renderer, before reparenting to
named flow.
* rendering/RenderNamedFlowThread.h:
2013-06-05 Philippe Normand <pnormand@igalia.com>
Unreviewed, GStreamer 0.10 build fix after r151175.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2013-06-05 Mihnea Ovidenie <mihnea@adobe.com>
[CSS Regions] REGRESSION Incorrect layer clipping inside flow thread
https://bugs.webkit.org/show_bug.cgi?id=117074
Reviewed by David Hyatt.
Function RenderBox::mapLocalToContainer was adapted for elements inside flow threads to convert
elements coordinates to RenderView coordinates, passing through the region in which the elements
were flowed (https://bugs.webkit.org/show_bug.cgi?id=66641).
The fix for https://bugs.webkit.org/show_bug.cgi?id=76486 modified RenderLayer::calculateClipRects and replaced
convertToLayerCoords with localToContainerPoint, which further calls mapLocalToContainer.
However, for elements inside the flow thread, which acts as a root layer for its collected children, we do not want
to get the offset in RenderView coordinates but rather in flow thread coordinates (and still take transforms into
account). This patch modifies RenderBox::mapLocalToContainer so that it stops at flow thread boundary when the passed
repaintContainer is the flow thread. The flow thread is the container for repaint for elements inside it, as seen from
RenderObject::containerForRepaint.
No new tests, converted overflow-size-change-with-stacking-context and overflow-size-change-with-stacking-context-rtl
into ref tests so that the we do not rely on pixel tests in the future.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::mapLocalToContainer):
2013-06-05 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from TreeWalker
https://bugs.webkit.org/show_bug.cgi?id=117225
Reviewed by Kentaro Hara.
Remove [NoInterfaceObject] IDL extended attribute from TreeWalker interface
to match Firefox's behavior and the specification:
http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-TreeWalker
No new tests, already covered by existing tests.
* dom/TreeWalker.idl:
2013-06-05 Zan Dobersek <zdobersek@igalia.com>
Move MemoryInfo under window.internals
https://bugs.webkit.org/show_bug.cgi?id=117197
Reviewed by Ryosuke Niwa.
The MemoryInfo interface is not a subject of any specification and should not be exposed
to the Web. It's still used by the performance tests so it is moved under the testing
internals, accessible through window.internals.memoryInfo.
The jsHeapSizeLimit attribute is removed from the MemoryInfo interface as that value was
only usable when using the V8 bindings which are not supported anymore. A small fast/harness
test is also provided to check that the MemoryInfo object is accessible through window.internals.
Test: fast/harness/memoryinfo-object.html
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.exp.in:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am: Remove the GObject bindings targets for MemoryInfo.
* bindings/js/JSBindingsAllInOne.cpp: Remove the JSMemoryInfo.h and MemoryInfo.h inclusion.
* bindings/js/JSMemoryInfoCustom.cpp: Removed.
* bindings/js/ScriptGCEvent.cpp: Remove the ENABLE(INSPECTOR) guards.
(WebCore::ScriptGCEvent::getHeapSize): Remove the jsHeapSizeLimit assignment.
* bindings/js/ScriptGCEvent.h: Remove the ENABLE(INSPECTOR) guards.
(WebCore::HeapInfo::HeapInfo): Remove the jsHeapSizeLimit member.
* page/Console.cpp: Remove the Console::memory method.
* page/Console.h: Ditto.
* page/Console.idl: Remove the window.console.memory attribute.
* page/MemoryInfo.cpp: Removed.
* page/Performance.cpp: Remove the Performance::memory method.
* page/Performance.h: Ditto.
* page/Performance.idl: Remove the window.performance.memory attribute.
* testing/Internals.cpp:
(WebCore::Internals::memoryInfo): Return a MemoryInfo object upon invoking.
* testing/Internals.h: Declare the Internals::memoryInfo method.
* testing/Internals.idl: Expose the window.internals.memoryInfo operation.
* testing/MemoryInfo.h: Renamed from Source/WebCore/page/MemoryInfo.h.
(WebCore::MemoryInfo::create): Return a new RefPtr-wrapped MemoryInfo object.
(WebCore::MemoryInfo::usedJSHeapSize): Return the value of the equally-named HeapInfo member.
(WebCore::MemoryInfo::totalJSHeapSize): Ditto.
(WebCore::MemoryInfo::MemoryInfo): Acquire the current heap info upon construction.
* testing/MemoryInfo.idl: Renamed from Source/WebCore/page/MemoryInfo.idl.
The jsHeapSizeLimit attribute is removed.
2013-06-04 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Headers should be parsed as utf8 if possible
https://bugs.webkit.org/show_bug.cgi?id=117196
Reviewed by Brent Fulgham.
Testcase already present: http/tests/download/literal-utf-8.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Parse the header as an utf8 string if possible.
2013-06-04 Oliver Hunt <oliver@apple.com>
Prevent throttling while resources are being loaded
https://bugs.webkit.org/show_bug.cgi?id=117218
Reviewed by Gavin Barraclough.
Make use of the page activity assertion infrastructure to delay
throttling while we are waiting on resource loads.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
* loader/FrameLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::init):
(WebCore::SubresourceLoader::checkForHTTPStatusCodeError):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/SubresourceLoader.h:
2013-06-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from XPathExpression and NodeIterator
https://bugs.webkit.org/show_bug.cgi?id=117204
Reviewed by Alexey Proskuryakov.
Remove [NoInterfaceObject] from XPathExpression and NodeIterator to match
their respective specifications:
- http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#XPathExpression
- http://www.w3.org/TR/DOM-Level-2-Traversal-Range/traversal.html#Traversal-NodeIterator
No new tests, already covered by:
fast/js/global-constructors-attributes.html
* dom/NodeIterator.idl:
* xml/XPathExpression.idl:
2013-06-04 Chris Fleizach <cfleizach@apple.com>
AX: MathML multiscripts not exposed in Accessibility
https://bugs.webkit.org/show_bug.cgi?id=115069
Unreviewed, build fix.
Remove an accessibility iOS method that was erroneously added.
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2013-06-04 Greg Hughes <ghughes@apple.com>
Add "VisibleOnly" key to search predicate
https://bugs.webkit.org/show_bug.cgi?id=115491
Reviewed by Chris Fleizach.
Added support for accessibility clients to use the search predicate to find only visible elements
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
(WebCore::AccessibilityObject::isOnscreen):
(WebCore):
* accessibility/AccessibilityObject.h:
(AccessibilitySearchCriteria):
(WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
(AccessibilityObject):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2013-06-04 Roger Fong <roger_fong@apple.com>
Unreviewed. Rollout of r151146. Broke some tests.
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::finishDelayUpdateScrollInfo):
(WebCore::RenderBlock::updateScrollInfoAfterLayout):
(WebCore::RenderBlock::layout):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clearLayoutOverflow):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
2013-06-04 Noam Rosenthal <noam@webkit.org>
Refactor the code that decides whether to enable WebGL from settings to helper functions
https://bugs.webkit.org/show_bug.cgi?id=117181
This removes some #ifdef crud out of the getContext() function.
Reviewed by Benjamin Poulain.
* html/HTMLCanvasElement.cpp:
(WebCore::requiresAcceleratedCompositingForWebGL):
(WebCore::shouldEnableWebGL):
(WebCore::HTMLCanvasElement::getContext):
2013-06-04 Thiago Santos <thiago.sousa.santos@collabora.com>
Prevent race when pad caps is set on gstreamer player
https://bugs.webkit.org/show_bug.cgi?id=115355
Reviewed by Philippe Normand.
Prevent race when pad caps is set on gstreamer player and
Also protect internal paint buffer with a mutex.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
2013-06-04 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Fix a crash in QtPixmapRuntime.
https://bugs.webkit.org/show_bug.cgi?id=117193
https://bugreports.qt-project.org/browse/QTBUG-30736
Reviewed by Allan Sandfeld Jensen.
The crash could only be reproduced in release builds on Windows.
JSClassCreate calculates the size of JSClassDefinition.staticValues
and staticFunctions by iterating until an entry with a null name is found.
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapRuntime::getClassRef):
2013-06-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Automatically generate WorkerContext constructor attributes
https://bugs.webkit.org/show_bug.cgi?id=117183
Reviewed by Kentaro Hara.
Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker] IDL extended attribute
to indicate to the bindings generator on which global context the constructor
attribute should be generated for interfaces without [NoInterfaceObject]:
- WindowOnly: only on the global Window object (default if ommitted)
- WorkerOnly: only on the worker context
- WindowAndWorker: On both the global Window object and the worker context
This covers all the current use cases.
The JSC bindings generator now automatically generates the Constructor attributes
on the WorkerContext for non-callback interfaces which do not have the
[NoInterfaceObject] extended attribute but have [GlobalContext=WorkerOnly|WindowAndWorker]
extended attribute.
No new tests, already covered by:
fast/js/global-constructors-attributes.html
fast/js/global-constructors-attributes-worker.html
* CMakeLists.txt:
* DerivedSources.make: Pass new --workerContextConstructorsFile argument to preprocess-idls.pl.
* DerivedSources.pri: Ditto.
* GNUmakefile.am: Ditto.
* PlatformBlackBerry.cmake: Ditto.
* UseJSC.cmake: Ditto.
* bindings/scripts/IDLAttributes.txt: Add [GlobalContext=WindowOnly|WorkerOnly|WindowAndWorker]
IDL extended attribute.
* bindings/scripts/preprocess-idls.pl: Add support for [GlobalContext] extended attribute and
generate a partial interface for WorkerContext global constructors that are automatically
generated.
* dom/MessageEvent.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/Blob.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/FileReader.idl: Add [GlobalContext=WindowAndWorker].
* fileapi/FileReaderSync.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
as the interface should only be visible in worker environment as per the spec.
* html/DOMURL.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/ArrayBuffer.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/DataView.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Float32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Float64Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int16Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Int8Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint16Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint32Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint8Array.idl: Add [GlobalContext=WindowAndWorker].
* html/canvas/Uint8ClampedArray.idl: Add [GlobalContext=WindowAndWorker].
* workers/WorkerContext.idl: Remove several Constructor attributes which are now automatically
generated.
* workers/WorkerLocation.idl: Add [GlobalContext=WorkerOnly] and remove [NoInterfaceObject]
as the interface should only be visible in worker environment as per the spec.
2013-06-04 Kangil Han <kangil.han@samsung.com>
Use ASSERT_DISABLED option for assertion purpose code in InlineBox
https://bugs.webkit.org/show_bug.cgi?id=117146
Reviewed by Alexey Proskuryakov.
We can distinguish assertion code with debug purpose by using ASSERT_DISABLED option.
* rendering/InlineBox.cpp:
(WebCore::InlineBox::~InlineBox):
(WebCore::InlineBox::destroy):
(WebCore::InlineBox::operator delete):
* rendering/InlineBox.h:
(WebCore::InlineBox::InlineBox):
2013-06-04 Kent Tamura <tkent@chromium.org>
Fix an assertion failure in Range::textNodeSplit by Text::splitText
https://bugs.webkit.org/show_bug.cgi?id=116509
Reviewed by Ryosuke Niwa.
Range::textNodeSplit is called in Text::splitText, and it assumes the
next sibling node is still a Text node. A DOM mutation event handler can
break this assumption.
We had better postpone DOM mutation events dispatched in Node::insertBefore
until exiting splitText to avoid inconsistent Range state.
This imports http://src.chromium.org/viewvc/blink?view=revision&revision=150493 .
Test: fast/dom/Range/split-text-in-range.html
* dom/Text.cpp:
(WebCore::Text::splitText): Add EventQueueScope.
2013-06-03 Kangil Han <kangil.han@samsung.com>
Remove unused arithmetic operation in RenderListItem
https://bugs.webkit.org/show_bug.cgi?id=117175
Reviewed by Brent Fulgham.
Variable 'markerLogicalLeft' is reassigned a value before the old one has been used.
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::positionListMarker):
2013-06-03 Roger Fong <roger_fong@apple.com>
Unreviewed. Some AppleWin VS2010 house cleaning.
* WebCore.vcxproj/build-generated-files.sh:
2013-06-03 Roger Fong <roger_fong@apple.com>
clearLayoutOverflow should never be called before calling layer()->updateScrollInfoAfterLayout().
https://bugs.webkit.org/show_bug.cgi?id=116689.
Reviewed by Ojan Vafai.
Make sure that clearLayoutOverflow only gets called after layer()->updateScrollInfoAfterLayout().
Also move clearLayoutOverflow to RenderBlock so we can keep all the delayed scroll update logic together.
Test: fast/flexbox/clear-overflow-before-scroll-update.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layout): Remove call to clearLayoutOverflow.
(WebCore::RenderBlock::finishDelayUpdateScrollInfo): Add call to clearLayoutOverflow.
(WebCore::RenderBlock::updateScrollInfoAfterLayout): Ditto.
(WebCore::RenderBlock::clearLayoutOverflow): ASSERT(!gDelayUpdateScrollInfo) and move from RenderBox to RenderBlock to keep delayed scroll update logic together.
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderBox.cpp:
* rendering/RenderBox.h:
(WebCore::RenderBox::layoutOverflowRect): Remove from layoutOverflowRect.
(RenderBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock): This should call updateScrollInfoAfterLayout() intead of directly calling layer()->updateScrollInfoAfterLayout().
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock): Ditto.
2013-05-31 Anders Carlsson <andersca@apple.com>
Take the normal NSView code path when drawing into an inclusive layer
https://bugs.webkit.org/show_bug.cgi?id=117094
<rdar://problem/13812355>
Reviewed by Sam Weinig.
For now, take the normal code path when drawing into an inclusive layer.
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-05-31 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Update Button UX.
https://bugs.webkit.org/show_bug.cgi?id=116992
Reviewed by Rob Buis.
BlackBerry PR 342298.
Internally Review by Jeff Rogers.
* css/themeBlackBerry.css:
2013-05-31 David Kilzer <ddkilzer@apple.com>
DerivedSources.make: any rules that use $(FEATURE_DEFINES) should be rebuilt when FeatureDefines.xcconfig changes
<http://webkit.org/b/117081>
Reviewed by Mark Rowe.
* DerivedSources.make: Add $(PLATFORM_FEATURE_DEFINES)
dependency for all rules that use $(FEATURE_DEFINES) to generate
files.
(PLATFORM_FEATURE_DEFINES): Set this variable to
Configurations/FeatureDefines.xcconfig if not already set on
Mac OS X.
2013-05-31 Tiancheng Jiang <tijiang@rim.com>
Text Field UX updates.
https://bugs.webkit.org/show_bug.cgi?id=116996
Reviewed by Rob Buis.
BlackBerry PR 342333.
Internally Reviewed by Jeff Rogers.
Update disabled text field font color.
* css/themeBlackBerry.css:
2013-05-31 Dean Jackson <dino@apple.com>
Update CheckedInt.h to latest version from Mozilla
https://bugs.webkit.org/show_bug.cgi?id=117009
Reviewed by Darin Adler.
Mozilla have updated their version of CheckedInt and suggested
we sync. Here are the improvements:
- CheckedInt now consistently rejects unsupported types. Before, you
could sometimes construct a CheckedInt from an unsupported type (like,
float) or multiply a CheckedInt by a float, and have it not caught! See
https://bugzilla.mozilla.org/show_bug.cgi?id=869194
- Fixed a possibility of undefined behavior in unary operator-. See bug
https://bugzilla.mozilla.org/show_bug.cgi?id=849666
- CheckedInt now supports the "long long" and "unsigned long long"
types. We don't like "long long" (and neither does the Google C++ style
guide!) but we had to do that because libogg exposes typedefs to those
types. See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=869685
- CheckedInt also now supports "signed char" in addition to "char" ---
they are not the same type! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=847521
- Fixed and simplified usage of CheckedInt outside of Mozilla. You'll
like this one! See Bug https://bugzilla.mozilla.org/show_bug.cgi?id=849667
- Fixed compilation with the Intel C++ compiler. See bug https://bugzilla.mozilla.org/show_bug.cgi?id=784309
* html/canvas/CheckedInt.h: Updated.
2013-05-31 Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
Make sure gstreamer source element is thread-safe
https://bugs.webkit.org/show_bug.cgi?id=115352
Reviewed by Philippe Normand.
GStreamer source element may be created by any gstreamer element on any thread by calling
gst_element_make_from_uri with the URIs handled by the source element.
This patch makes sure the gstreamer source element is thread-safe to avoid issues with it
being created outside the main thread.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(_WebKitWebSrcPrivate):
(webkit_web_src_init):
(webKitWebSrcFinalize):
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStop):
(webKitWebSrcStart):
(webKitWebSrcChangeState):
(webKitWebSrcQueryWithParent):
(webKitWebSrcGetUri):
(webKitWebSrcSetUri):
(webKitWebSrcNeedDataMainCb):
(webKitWebSrcEnoughDataMainCb):
(webKitWebSrcSeekMainCb):
(webKitWebSrcSeekDataCb):
(webKitWebSrcSetMediaPlayer):
(StreamingClient::StreamingClient):
(StreamingClient::~StreamingClient):
(StreamingClient::didReceiveResponse):
(StreamingClient::didReceiveData):
(StreamingClient::didFinishLoading):
(StreamingClient::wasBlocked):
(StreamingClient::cannotShowURL):
2013-05-31 Sergio Villar Senin <svillar@igalia.com>
Build fix when CSSParser debugging is enabled
https://bugs.webkit.org/show_bug.cgi?id=117075
Reviewed by Andreas Kling.
Build fails when enabling parser debugging by setting YYDEBUG to
1 because of a missing include.
* css/CSSGrammar.y.includes:
2013-05-31 Alberto Garcia <agarcia@igalia.com>
[Soup] [Gstreamer] ASSERT in StreamingClient::getOrCreateReadBuffer
https://bugs.webkit.org/show_bug.cgi?id=116686
Reviewed by Carlos Garcia Campos.
We were using g_input_stream_read_async() to handle redirections
because of Gnome bug #691489.
This produces an unexpected read attempt which triggers an assert
in StreamingClient::getOrCreateReadBuffer().
Now that the Gnome bug is fixed we can replace read_async() with
skip_async().
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer):
(WebCore::redirectSkipCallback):
(WebCore::sendRequestCallback):
2013-05-30 Eugene Klyuchnikov <eustas@chromium.org>
selectionStart/selectionEnd return "obsolete" values when requested during "input" event
https://bugs.webkit.org/show_bug.cgi?id=110742
Reviewed by Ryosuke Niwa.
This patch defers firing "webkitEditableContentChanged" until new
selection is applied to control. This makes selection during "input"
more consistent and reliable.
Background: "input" event is fired by "webkitEditableContentChanged"
dispatcher. But "input" is scoped event, so under some conditions its
dispatching may be deferred. When "input" dispatching is deferred,
dispatcher observes updated selectionStart and selectionEnd.
Otherwise values repersent state before applying editing command.
So, to make selectionStart/End to be more predictable and useful, we
need either always dispatch "input" before selection is updated, or
always dispatch "input" after selection is updated.
As it was mentioned, dispatching could be deferred by scoping. So
dispatching before updating selection couldn't be guaranteed.
Moreover, it will be hard to calculate updated selection in user
code. On the other side - old selection could be easily tracked.
So, it looks logically that we should guarantee dispatching "input"
after updating selection. There are no execution paths in
"webkitEditableContentChanged" dispatched that depends on current
selection. So it is safe to fire this event after selection is updated.
Test: editing/selection/caret-after-keypress.html
* editing/Editor.cpp:
Dispatch "input" event after new selection in applied.
2013-05-30 Ruth Fong <ruth_fong@apple.com>
WebKit's Enter Full Screen for <video> elements isn't working
https://bugs.webkit.org/show_bug.cgi?id=117001
Reviewed by Jer Noble.
Fix workflow to allow a video to enter into full screen
mode from a kWKContextMenuItemTagEnterVideoFullscreen
context menu item by denoting the enterFullscreenForVideo
call as a user gesture, so Document::requestFullScreenForElement
will execute correctly.
No new tests. Covered by media/context-menu-actions.html,
which is disabled due to bug #116651.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::enterFullscreenForVideo):
2013-05-30 Rafael Brandao <rafael.lobo@openbossa.org>
Fix double hash lookup in RenderTableSection::paintObject loop
https://bugs.webkit.org/show_bug.cgi?id=117055
Reviewed by Antonio Gomes.
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintObject):
2013-05-31 Stephanie Lewis <slewis@apple.com>
Update low memory handler to use new memory pressure notifications on new OS versions.
<rdar://problem/14027095>
Reviewed by Mark Rowe.
No change in functionality.
* WebCore.exp.in:
* platform/mac/MemoryPressureHandlerMac.mm:
(WebCore::MemoryPressureHandler::install): Call new API
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-05-30 Rafael Brandao <rafael.lobo@openbossa.org>
Fix double hash lookup in WebSocket::connect loop
https://bugs.webkit.org/show_bug.cgi?id=117052
Reviewed by Anders Carlsson.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
2013-05-30 Benjamin Poulain <bpoulain@apple.com>
Remove some 16bits conversion.
https://bugs.webkit.org/show_bug.cgi?id=116935
Reviewed by Darin Adler.
Merge chromium ce35a544d09e6cb907457535340eb0e9984e57b8.
https://chromium.googlesource.com/chromium/blink/+/ce35a544d09e6cb907457535340eb0e9984e57b8
* html/parser/InputStreamPreprocessor.h:
* platform/FileSystem.cpp:
(WebCore::encodeForFileName):
2013-05-30 Anders Carlsson <andersca@apple.com>
REGRESSION (r119759): Adobe Flash Player "smaller" installer relies on the incorrect firing of a load event and needs an app-specific hack for compatibility
https://bugs.webkit.org/show_bug.cgi?id=117042
<rdar://problem/13916291>
Reviewed by Mark Rowe.
Ignore HTTP errors for scripts requested from within the installer. Instead of just checking for the
Adobe Flash installer, we use the "com.solidstatenetworks.awkhost" bundle identifier to determine
whether to apply the workaround. This could in theory fix other installers that use the same mechanism.
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::shouldIgnoreHTTPStatusCodeErrors):
* loader/cache/CachedScript.h:
* platform/RuntimeApplicationChecks.cpp:
(WebCore::applicationIsSolidStateNetworksDownloader):
* platform/RuntimeApplicationChecks.h:
2013-05-30 Sergio Villar Senin <svillar@igalia.com>
Allow no space between "background-position:" dimensions
https://bugs.webkit.org/show_bug.cgi?id=116870
Reviewed by Darin Adler.
From Blink r149314 by <ericwilligers@chromium.org>
Specs allow no spaces between the dimensions of a
"background-position:" like "1px+1px", we should support
that.
Whitespaces are no longer early consumed, dramatically dropping
the shift/reduce conflicts to half. The productions unary_term,
calc_func_term, calc_func_expr and calc_func_paren_expr no longer
consume whitespaces.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::realLex):
2013-05-30 Jer Noble <jer.noble@apple.com>
HTMLMediaElement will not unthrottle page when playback stops for nreasons other than user-initiated pause.
https://bugs.webkit.org/show_bug.cgi?id=117016
Reviewed by Oliver Hunt.
Add a new class PageActivityAssertionToken to allow HTMLMediaElement to decouple
knowledge of and control over the lifetime of PageThrottler. The new class will
have weak references to and from the PageThrottler so that holders of the token
will not need to care if the Page or PageThrottler has been destroyed.
HTMLMediaElement will create one of these PageActivityAssertionTokens when playback
begins and destroy it when playback stops for any reason, or when the element is
destroyed.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
(WebCore::HTMLMediaElement::playbackProgressTimerFired):
(WebCore::HTMLMediaElement::updatePlayState):
* html/HTMLMediaElement.h:
* page/Page.cpp:
(WebCore::createActivityToken): Added simple factory method.
* page/Page.h:
* page/PageActivityAssertionToken.cpp:
(WebCore::PageActivityAssertionToken::PageActivityAssertionToken): Call addActivityToken();
(WebCore::PageActivityAssertionToken::~PageActivityAssertionToken): Call removeActivityToken();
(WebCore::PageActivityAssertionToken::invalidate): Clear m_throttler.
* page/PageActivityAssertionToken.h:
* page/PageThrottler.cpp:
(WebCore::PageThrottler::~PageThrottler): Invalidate all outstanding tokens.
(WebCore::PageThrottler::addActivityToken): Bump the activity count.
(WebCore::PageThrottler::removeActivityToken): Lower the activity count.
* page/PageThrottler.h:
Add the new files to the various build systems:
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2013-05-29 Jeffrey Pfau <jpfau@apple.com>
[Mac] Enable cache partitioning and the public suffix list on 10.8
<rdar://problem/13679019>
Rubber-stamped by David Kilzer.
* Configurations/FeatureDefines.xcconfig:
2013-05-30 Andreas Kling <akling@apple.com>
Fix double hash lookup in DocumentEventQueue::cancelEvent().
<http://webkit.org/b/117031>
Reviewed by Anders Carlsson.
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::cancelEvent):
2013-05-30 Andreas Kling <akling@apple.com>
Fix double hash lookup in DocumentLoader::removeSubresourceLoader().
<http://webkit.org/b/117030>
Reviewed by Anders Carlsson.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::removeSubresourceLoader):
2013-05-30 Andreas Kling <akling@apple.com>
Fix double hash lookup in RenderView::repaintSelection() loop.
<http://webkit.org/b/117029>
Reviewed by Anders Carlsson.
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintSelection):
2013-05-30 Peter Gal <galpeter@inf.u-szeged.hu>
CURL: Incorrect stripping of query from file URL
https://bugs.webkit.org/show_bug.cgi?id=104307
Reviewed by Darin Adler.
Clear the query part of the file URL if there is any.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle):
2013-05-30 Antti Koivisto <antti@apple.com>
Separate generic font family settings to a class
https://bugs.webkit.org/show_bug.cgi?id=117027
Reviewed by Andreas Kling.
The new class is under platform/ and can be accessed by the font code directly without platform violations.
* WebCore.xcodeproj/project.pbxproj:
* page/Settings.cpp:
(WebCore::invalidateAfterGenericFamilyChange):
(WebCore::Settings::Settings):
(WebCore::Settings::~Settings):
(WebCore::Settings::create):
(WebCore::Settings::standardFontFamily):
(WebCore::Settings::setStandardFontFamily):
(WebCore::Settings::fixedFontFamily):
(WebCore::Settings::setFixedFontFamily):
(WebCore::Settings::serifFontFamily):
(WebCore::Settings::setSerifFontFamily):
(WebCore::Settings::sansSerifFontFamily):
(WebCore::Settings::setSansSerifFontFamily):
(WebCore::Settings::cursiveFontFamily):
(WebCore::Settings::setCursiveFontFamily):
(WebCore::Settings::fantasyFontFamily):
(WebCore::Settings::setFantasyFontFamily):
(WebCore::Settings::pictographFontFamily):
(WebCore::Settings::setPictographFontFamily):
* page/Settings.h:
* platform/graphics/FontGenericFamilies.cpp: Added.
(WebCore::setGenericFontFamilyForScript):
(WebCore::genericFontFamilyForScript):
(WebCore::FontGenericFamilies::FontGenericFamilies):
(WebCore::FontGenericFamilies::standardFontFamily):
(WebCore::FontGenericFamilies::fixedFontFamily):
(WebCore::FontGenericFamilies::serifFontFamily):
(WebCore::FontGenericFamilies::sansSerifFontFamily):
(WebCore::FontGenericFamilies::cursiveFontFamily):
(WebCore::FontGenericFamilies::fantasyFontFamily):
(WebCore::FontGenericFamilies::pictographFontFamily):
(WebCore::FontGenericFamilies::setStandardFontFamily):
(WebCore::FontGenericFamilies::setFixedFontFamily):
(WebCore::FontGenericFamilies::setSerifFontFamily):
(WebCore::FontGenericFamilies::setSansSerifFontFamily):
(WebCore::FontGenericFamilies::setCursiveFontFamily):
(WebCore::FontGenericFamilies::setFantasyFontFamily):
(WebCore::FontGenericFamilies::setPictographFontFamily):
* platform/graphics/FontGenericFamilies.h: Added.
(WebCore::UScriptCodeHashTraits::emptyValue):
(WebCore::UScriptCodeHashTraits::constructDeletedValue):
(WebCore::UScriptCodeHashTraits::isDeletedValue):
(WebCore::FontGenericFamilies::create):
2013-05-30 Andreas Kling <akling@apple.com>
Avoid using CSSOM style declarations in HTML editing.
<http://webkit.org/b/117019>
Reviewed by Antti Koivisto.
Convert the editing code to use ComputedStyleExtractor instead of instantiating CSSOM wrappers.
* css/CSSComputedStyleDeclaration.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
(WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
(WebCore::ComputedStyleExtractor::propertyMatches):
(WebCore::ComputedStyleExtractor::copyProperties):
(WebCore::ComputedStyleExtractor::copyPropertiesInSet):
Moved here from CSSComputedStyleDeclaration. These methods are used by HTML editing.
(WebCore::CSSComputedStyleDeclaration::copyProperties):
Reimplemented to call ComputedStyleExtractor.
* css/CSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.h:
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::copyProperties):
Removed CSSStyleDeclaration::cssPropertyMatches(), the remaining code lives in
ComputedStyleExtractor::propertyMatches() and is only used by HTML editing.
* css/StylePropertySet.h:
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::removeEquivalentProperties):
Added an overload that takes a ComputedStyleExtractor.
This code should move into EditingStyle.cpp, material for a follow-up patch.
* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier):
Add a file-local helper for yanking the identifier value (if any) out of a CSSPrimitiveValue.
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::highestEmbeddingAncestor):
* editing/EditingStyle.h:
* editing/EditingStyle.cpp:
(WebCore::editingStyleFromComputedStyle):
(WebCore::extractPropertyValue):
(WebCore::identifierForStyleProperty):
(WebCore::textColorFromStyle):
(WebCore::backgroundColorFromStyle):
(WebCore::EditingStyle::init):
(WebCore::EditingStyle::removeStyleAddedByNode):
(WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
(WebCore::EditingStyle::triStateOfStyle):
(WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
(WebCore::StyleChange::StyleChange):
(WebCore::fontWeightIsBold):
(WebCore::extractPropertiesNotIn):
(WebCore::getPropertiesNotIn):
Use ComputedStyleExtractor instead of CSSComputedStyleDeclaration in all of this code.
Templatized a bunch of the code so we don't have to repeat ourselves for both StylePropertySet
and ComputedStyleExtractor inputs.
2013-05-30 Roland Takacs <rtakacs@inf.u-szeged.hu>
Remove "hidden"=true from Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=114116
Reviewed by Timothy Hatcher.
Remove "hidden"=true because it's a Chromium concept.
Patch created by Timothy Hatcher.
* inspector/Inspector.json:
2013-05-30 Kondapally Kalyan <kalyan.kondapally@intel.com>
[EFL][EGL] Implement TransportSurface client.
https://bugs.webkit.org/show_bug.cgi?id=114122
Reviewed by Kenneth Rohde Christiansen.
Covered by existing WebGL tests.
This patch implements the client support for Transport
Surface with EGL backend using GLES2.
* platform/graphics/surfaces/efl/GLTransportSurface.cpp:
(WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
(WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GLTransportSurface.h:
(GLTransportSurfaceClient):
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
(WebCore::GraphicsSurfacePrivate::initializeClient):
* platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
(WebCore):
(WebCore::EGLConfigSelector::surfaceClientConfig):
(WebCore::EGLConfigSelector::findMatchingConfigWithVisualId):
* platform/graphics/surfaces/egl/EGLConfigSelector.h:
(WebCore):
(EGLConfigSelector):
Support for retrieving valid EGLConfig on client side.
* platform/graphics/surfaces/egl/EGLHelper.cpp:
(WebCore):
(WebCore::resolveDisplay):
(WebCore::EGLHelper::resolveEGLBindings):
(WebCore::EGLHelper::createEGLImage):
(WebCore::EGLHelper::destroyEGLImage):
(WebCore::EGLHelper::imageTargetTexture2DOES):
* platform/graphics/surfaces/egl/EGLHelper.h:
Helper functions to create and destroy EGLImage.
* platform/graphics/surfaces/egl/EGLXSurface.cpp:
(WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
(WebCore):
(WebCore::EGLXTransportSurfaceClient::~EGLXTransportSurfaceClient):
(WebCore::EGLXTransportSurfaceClient::destroy):
(WebCore::EGLXTransportSurfaceClient::prepareTexture):
(WebCore::EGLTextureFromPixmap::EGLTextureFromPixmap):
(WebCore::EGLTextureFromPixmap::~EGLTextureFromPixmap):
(WebCore::EGLTextureFromPixmap::destroy):
(WebCore::EGLTextureFromPixmap::isValid):
(WebCore::EGLTextureFromPixmap::bindTexImage):
(WebCore::EGLTextureFromPixmap::reBindTexImage):
* platform/graphics/surfaces/egl/EGLXSurface.h:
(EGLXTransportSurfaceClient):
TransportSurfaceClient implementation.
(WebCore):
* platform/graphics/surfaces/glx/GLXSurface.cpp:
(WebCore::GLXTransportSurfaceClient::GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/GLXSurface.h:
(GLXTransportSurfaceClient):
* platform/graphics/surfaces/glx/X11Helper.cpp:
(WebCore::X11Helper::createOffScreenWindow):
(WebCore):
(WebCore::X11Helper::createPixmap):
* platform/graphics/surfaces/glx/X11Helper.h:
(X11Helper):
2013-05-30 Mike West <mkwst@chromium.org>
Rename 'KURL::elidedString' and inspector's 'String.prototype.trimMiddle' for clarity.
https://bugs.webkit.org/show_bug.cgi?id=111700
Reviewed by Darin Adler.
Darin suggested that 'KURL::elidedString' is inaccurately named[1], this
patch is an attempt to do better. It additionally brings the Inspector's
'String.prototype.trimMiddle' method into line, as the two methods do
more or less the same thing.
After a bit of discussion with Maciej and Daniel Bates on IRC, I've
settled on 'KURL::stringCenterEllipsizedToLength(unsigned)' and
'String.prototype.centerEllipsizedToLength(number)' respectively.
No new tests are added, as this patch shouldn't have any visible effect
on the web. It's strictly an internal refactoring.
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
(WebCore::WebSocket::send):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::send):
(WebCore::WebSocketChannel::fail):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::canExecuteScripts):
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::executeScript):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::canPlayType):
(WebCore::HTMLMediaElement::isSafeToLoadURL):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
(WebCore::createWindow):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::willSendRequest):
(WebCore::MainResourceLoader::responseReceived):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::logWarning):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFail):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::printAccessDeniedMessage):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkSourceAndReportViolation):
(WebCore::CSPDirectiveList::allowScriptNonce):
(WebCore::CSPDirectiveList::allowPluginType):
* platform/KURL.cpp:
(WebCore::KURL::stringCenterEllipsizedToLength):
* platform/KURL.h:
Rename 'KURL::elidedString' to 'KURL::stringCenterEllipsizedToLength',
and adjust callsites accordingly.
* inspector/front-end/CallStackSidebarPane.js:
(WebInspector.CallStackSidebarPane.Placard.prototype._update):
* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGenericObjectNode.prototype.shortenWindowURL):
* inspector/front-end/Linkifier.js:
(WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyURLAsNode):
* inspector/front-end/TabbedEditorContainer.js:
(WebInspector.TabbedEditorContainer.prototype._titleForFile):
* inspector/front-end/utilities.js:
Rename 'String.prototype.trimMiddle' to 'String.prototype.centerEllipsizedToLength'
and adjust callsites accordingly.
2013-05-30 Antti Koivisto <antti@apple.com>
Rename FontFallbackList.cpp/h to FontGlyphs.cpp/h
https://bugs.webkit.org/show_bug.cgi?id=117022
Reviewed by Andreas Kling.
Rename to match the class name.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/Font.h:
* platform/graphics/FontCache.cpp:
* platform/graphics/FontFallbackList.cpp: Removed.
* platform/graphics/FontFallbackList.h: Removed.
* platform/graphics/FontFastPath.cpp:
* platform/graphics/FontGlyphs.cpp: Copied from Source/WebCore/platform/graphics/FontFallbackList.cpp.
* platform/graphics/FontGlyphs.h: Copied from Source/WebCore/platform/graphics/FontFallbackList.h.
* platform/graphics/mac/FontComplexTextMac.cpp:
2013-05-30 Ryosuke Niwa <rniwa@webkit.org>
Get rid of Position::computedStyle
https://bugs.webkit.org/show_bug.cgi?id=117024
Reviewed by Andreas Kling.
Removed the function.
* dom/Position.cpp:
* dom/Position.h:
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange): We need a position
inside the dummy element since we'll get the containing element's style instead
if we had the position before the dummy element.
* editing/EditingStyle.cpp:
(WebCore::StyleChange::StyleChange):
2013-05-30 Seokju Kwon <seokju.kwon@gmail.com>
Remove obsolete forward declaration from InspectorFrontendHost.h
https://bugs.webkit.org/show_bug.cgi?id=117017
Reviewed by Joseph Pecoraro.
Remove obsolete forward declaration and fix style issue as well.
No change in behavior, no new tests.
* inspector/InspectorFrontendHost.h:
(WebCore):
(InspectorFrontendHost):
2013-05-29 Tim Horton <timothy_horton@apple.com>
Expose incrementalRenderingSuppressionTimeout via WK2
https://bugs.webkit.org/show_bug.cgi?id=117015
<rdar://problem/13992853>
Reviewed by Darin Adler.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
Inform the FrameLoader that we're ready to transition the page, if
nothing else already has. This will be forwarded to the FrameLoaderClient,
and WebKit2's implementation will go ahead and un-freeze the layer tree,
so that the incremental rendering suppression watchdog timer actually works.
(WebCore::Document::setVisualUpdatesAllowedByClient):
Make incremental rendering suppression extension tokens play nice with the
watchdog timer; allow setVisualUpdatesAllowedByClient=true to re-enable updates
if either the page is in the "completed" state or the watchdog has already fired.
* loader/FrameLoader.cpp:
* loader/FrameLoader.h:
(WebCore::FrameLoader::forcePageTransitionIfNeeded): Added.
Forward to the client.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::forcePageTransitionIfNeeded): Added.
2013-05-29 Praveen R Jadhav <praveen.j@samsung.com>
ProgressEvent should not be cancelable
https://bugs.webkit.org/show_bug.cgi?id=114444
Reviewed by Darin Adler.
Parameter "cancelable" in ProgressEvent is set to false, by default, as mentioned in the specification. The spec link is given below.
Spec: http://www.w3.org/TR/2011/CR-progress-events-20110922/#suggested-names-for-events-using-the-progressevent-interface
No new tests. file-reader-event-listener.html and infoOnProgressEvent-expected.txt are updated.
* dom/ProgressEvent.cpp:
(WebCore::ProgressEvent::ProgressEvent):
(WebCore):
2013-05-29 Simon Fraser <simon.fraser@apple.com>
Fix paint-related milestones to not fire when the layer tree is frozen
https://bugs.webkit.org/show_bug.cgi?id=117012
Reviewed by Tim Horton.
In the previous code, it was possible to paint some layer and schedule
the m_paintRelatedMilestonesTimer, but then the layer tree was put into
a frozen state because the page redirected. However, the paint-related
milestones timer would still fire. This caused woes with header/footer
banners.
Fix by not firing paint-related milestones if the layer tree is frozen,
which we know via a new ChromeClient callback. When unfrozen, we'll
paint again, and fire the timer later.
* page/ChromeClient.h:
(WebCore::ChromeClient::layerTreeStateIsFrozen):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Store form control list with RefPtr
https://bugs.webkit.org/show_bug.cgi?id=116910
Reviewed by Kent Tamura.
Merge https://chromium.googlesource.com/chromium/blink/+/582132773280455ead1d42b0073be37efdeaf989.
Unfortunately, the Blink change doesn't provide much insight as to what kind of crashes are fixed
by this code change but it cleans up the way form elements with state are registered to the form
controller so it seems benefitial to merge it anyway.
* dom/Document.cpp:
(WebCore::Document::dispose):
* html/FormController.cpp:
(WebCore::FormController::createSavedFormStateMap):
(WebCore::FormController::registerFormElementWithState):
(WebCore::FormController::unregisterFormElementWithState):
(WebCore):
* html/FormController.h:
(FormController):
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::insertedInto):
(WebCore):
(WebCore::HTMLFormControlElementWithState::removedFrom):
* html/HTMLFormControlElementWithState.h:
(HTMLFormControlElementWithState):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::insertedInto):
2013-05-29 Andreas Kling <akling@apple.com>
Take ComputedStyleExtractor for a spin.
<http://webkit.org/b/116968>
Reviewed by Antti Koivisto.
Convert some editing and SVG code to use ComputedStyleExtractor instead of creating full
blown CSSComputedStyleDeclaration objects.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
(WebCore::highestEmbeddingAncestor):
(WebCore::ApplyStyleCommand::computedFontSize):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
(WebCore::EditingStyle::textDirectionForSelection):
(WebCore::getIdentifierValue):
(WebCore::backgroundColorInEffect):
* editing/EditingStyle.h:
* svg/SVGAnimationElement.cpp:
(WebCore::SVGAnimationElement::computeCSSPropertyValue):
2013-05-29 Benjamin Poulain <bpoulain@apple.com>
Add a special case for SelectorDataList::execute when there is only one selector
https://bugs.webkit.org/show_bug.cgi?id=116891
Reviewed by Andreas Kling.
In the vast majority of cases, querySelector is called with a single selector.
This patch takes that input into account to improve the performance of
SelectorDataList::execute(). For the case of a single selector, we avoid three
branches executed for every node of the traversal.
This improves QuerySelector's time by 2.3%.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
2013-05-29 Dean Jackson <dino@apple.com>
-webkit-text-underline-position should not be inherited
https://bugs.webkit.org/show_bug.cgi?id=116363
Reverting http://trac.webkit.org/changeset/150366
It was an incorrect fix referring to an old specification.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):
2013-05-29 Ryuan Choi <ryuan.choi@samsung.com>
[CMAKE] cmake errors when CMAKE_BUILD_TYPE is not specified.
https://bugs.webkit.org/show_bug.cgi?id=116899
Reviewed by Laszlo Gombos.
* CMakeLists.txt: Fixed if statement to escape when find command fails.
2013-05-28 Oliver Hunt <oliver@apple.com>
Add more accurate activity state tracking
https://bugs.webkit.org/show_bug.cgi?id=116893
Reviewed by Gavin Barraclough.
Add a hysteresis to Page activity throttling. We do this
through a PageThrottler class that now handles entering and
exiting throttling state, and adds a hysteresis to we can
limit the amount of on/off bouncing on the throttle.
Media elements now make use of this to disable timer throttling
while they are playing, and plugins use it to momentarily bounce
from throttled to unthrottled state.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::pageThrottlerIfPossible):
(WebCore):
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):
* html/HTMLMediaElement.h:
(WebCore):
* html/MediaController.cpp:
(MediaController::unpause):
* page/ChromeClient.h:
(WebCore::ChromeClient::incrementActivePageCount):
(WebCore::ChromeClient::decrementActivePageCount):
(ChromeClient):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::setThrottled):
* page/Page.h:
(WebCore):
(Page):
(WebCore::Page::pageThrottler):
* page/PageThrottleState.h: Added.
* page/PageThrottler.cpp: Added.
(WebCore):
(WebCore::PageThrottler::PageThrottler):
(WebCore::PageThrottler::~PageThrottler):
(WebCore::PageThrottler::clearPage):
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
(WebCore::PageThrottler::setThrottled):
(WebCore::PageThrottler::preventThrottling):
(WebCore::PageThrottler::allowThrottling):
(WebCore::PageThrottler::stopThrottleHysteresisTimer):
(WebCore::PageThrottler::reportInterestingEvent):
(WebCore::PageThrottler::startThrottleHysteresisTimer):
(WebCore::PageThrottler::throttleHysteresisTimerFired):
* page/PageThrottler.h: Added.
(WebCore):
(PageThrottler):
(WebCore::PageThrottler::create):
(WebCore::PageThrottler::shouldThrottleAnimations):
(WebCore::PageThrottler::shouldThrottleTimers):
2013-05-29 Kent Tamura <tkent@chromium.org>
Remove leftover files for ENABLE_PAGE_POPUP and ENABLE_CALENDAR_PICKER
https://bugs.webkit.org/show_bug.cgi?id=116999
Reviewed by Anders Carlsson.
* Resources/pagepopups/colorSuggestionPicker.css: Removed.
* Resources/pagepopups/colorSuggestionPicker.js: Removed.
* Resources/pagepopups/pickerCommon.css: Removed.
* Resources/pagepopups/pickerCommon.js: Removed.
* Resources/pagepopups/suggestionPicker.css: Removed.
* Resources/pagepopups/suggestionPicker.js: Removed.
2013-05-29 Jer Noble <jer.noble@apple.com>
Unreviewed build fix; remove unintentional semicolon.
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::finish):
2013-05-29 Anders Carlsson <andersca@apple.com>
Merge PODArea::Chunk into PODFreeListArena::FreeListChunk
https://bugs.webkit.org/show_bug.cgi?id=117000
Reviewed by Oliver Hunt.
* platform/PODArena.h:
(WebCore::PODArena::roundUp):
* platform/PODFreeListArena.h:
(PODFreeListArena):
(WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
(FreeListChunk):
(WebCore::PODFreeListArena::FreeListChunk::~FreeListChunk):
(WebCore::PODFreeListArena::FreeListChunk::allocate):
2013-05-29 Anders Carlsson <andersca@apple.com>
Move some PODArena members to PODFreeListArena
https://bugs.webkit.org/show_bug.cgi?id=116993
Reviewed by Sam Weinig.
This is more work towards merging the two classes.
* platform/PODArena.h:
(PODArena):
* platform/PODFreeListArena.h:
(PODFreeListArena):
(WebCore::PODFreeListArena::PODFreeListArena):
2013-05-29 Jer Noble <jer.noble@apple.com>
[Mac] Scrubbing long movie files results in timeline snapping back to 0 during scrub.
https://bugs.webkit.org/show_bug.cgi?id=116986
Reviewed by Eric Carlson.
Keep a count of the number of in-flight seek requests, and only issue a timeupdate
(which triggers a "seeked" event) when the final seek completes.
Test: media/video-seek-multiple.html
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seek):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(MediaPlayerPrivateAVFoundation):
2013-05-29 Anders Carlsson <andersca@apple.com>
Remove unused code from PODArena
https://bugs.webkit.org/show_bug.cgi?id=116990
Reviewed by Sam Weinig.
PODArena is only used as a base class of PODFreeListArena so remove unused member functions and make all
members protected to make it impossible to use it without subclassing.
PODArena is a risky class to use since it doesn't return memory to the system unless the arena object is destroyed.
This was the reason why PODFreeListArea was added. An upcoming patch will merge PODArena with PODFreeListArena and
this is a small step towards that goal.
* platform/PODArena.h:
2013-05-29 Darin Adler <darin@apple.com>
Remove custom binding for Clipboard setDragImage function
https://bugs.webkit.org/show_bug.cgi?id=116422
Reviewed by Sam Weinig.
* bindings/js/JSClipboardCustom.cpp: Removed setDragImage binding.
* dom/Clipboard.cpp:
(WebCore::Clipboard::canSetDragImage): Added a condition that this is a drag
and drop clipboard. That used to be checked in the setDragImage binding.
(WebCore::Clipboard::setDragImage): Added a version that takes an Element
and calls through to the existing functions (in the legacy code path), or handles
both the Element and HTMLImageElement not-in-document cases (in the new code path).
* dom/Clipboard.h: Updated for changes above.
* dom/Clipboard.idl: Removed [Custom] from setDragImage.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag): Call the new setDragImage instead of the
old setDragImageElement.
2013-05-29 Praveen R Jadhav <praveen.j@samsung.com>
Cleanup AudioSourceNode.idl from WebKit build.
https://bugs.webkit.org/show_bug.cgi?id=116905.
Reviewed by Darin Adler.
AudioSourceNode.idl is not part of WebAudio Specifications anymore.
AudioNode is inherited directly in all the audio source nodes.
No new tests. Current test cases will cover all the scenarios.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/AudioSourceNode.h: Removed.
* Modules/webaudio/AudioSourceNode.idl: Removed.
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
* Modules/webaudio/MediaElementAudioSourceNode.h:
(MediaElementAudioSourceNode):
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.cpp:
(WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
* Modules/webaudio/MediaStreamAudioSourceNode.h:
(MediaStreamAudioSourceNode):
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/OscillatorNode.idl:
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:
2013-05-29 Adam Barth <abarth@webkit.org>
Optimize RenderText::offsetNext for 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=116877
Reviewed by Darin Adler.
Previously, this function was always upconverting strings to 16 bits in
order to create a cursorMovementIterator. This patch adds a fast path
for ASCII and Latin-1 strings, which don't need this complicated cursor
movement logic.
I ran into this code because nextOffset showed up as a memory pig on a
memory profile of Mobile Gmail.
Test: editing/selection/move-by-character-brute-force.html
* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffset):
(WebCore::RenderText::nextOffset):
2013-05-29 Brent Fulgham <bfulgham@apple.com>
[Windows] Correct copy command (form versus forms)
* WebCore.vcproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
2013-05-29 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Fix style issues in BasicShapes
https://bugs.webkit.org/show_bug.cgi?id=116734
Reviewed by Alexandru Chiculita.
Fix indentation in BasicShapes.cpp, and change enums to respect the
style rules CamelCase instead of HAVING_UNDERSCORES.
No new tests, only style changes.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape):
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.cpp:
(WebCore::buildRectangleString):
(WebCore::CSSBasicShapeRectangle::equals):
(WebCore::CSSBasicShapeCircle::equals):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::CSSBasicShapePolygon::equals):
(WebCore::CSSBasicShapeInsetRectangle::equals):
* css/CSSBasicShapes.h:
(WebCore::CSSBasicShapeRectangle::type):
(WebCore::CSSBasicShapeInsetRectangle::type):
(WebCore::CSSBasicShapeCircle::type):
(WebCore::CSSBasicShapeEllipse::type):
(WebCore::CSSBasicShapePolygon::type):
* rendering/ExclusionShape.cpp:
(WebCore::ExclusionShape::createExclusionShape):
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::isEnabledFor):
* rendering/ExclusionShapeOutsideInfo.cpp:
(WebCore::ExclusionShapeOutsideInfo::isEnabledFor):
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShape::canBlend):
(WebCore::BasicShapeRectangle::path):
(WebCore::BasicShapeCircle::path):
(WebCore::BasicShapeEllipse::path):
(WebCore::BasicShapeInsetRectangle::path):
* rendering/style/BasicShapes.h:
(WebCore::BasicShapeRectangle::type):
(WebCore::BasicShapeCircle::type):
(WebCore::BasicShapeEllipse::type):
(WebCore::BasicShapePolygon::type):
(WebCore::BasicShapeInsetRectangle::type):
2013-05-29 Otto Derek Cheung <otcheung@rim.com>
[BlackBerry] Handle Host-Only cookies
https://bugs.webkit.org/show_bug.cgi?id=116969
PR 338809
Reviewed by Rob Buis.
Internally Reviewed by Joe Mason.
Adding support for host-only cookies (cookies with no
specified domains). These cookies should only be returned
when the host matches the cookie domain exactly.
Tested using Opera and Browser cookie test suite. Tested
that host cookies are being stored in it's own map using
Web Inspector.
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::getRawCookies):
(WebCore::CookieManager::checkAndTreatCookie):
(WebCore::CookieManager::findOrCreateCookieMap):
* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::CookieParser):
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/ParsedCookie.h:
(WebCore::ParsedCookie::isHostOnly):
(ParsedCookie):
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Remove the size of DataVector in HTMLToken
https://bugs.webkit.org/show_bug.cgi?id=116931
Reviewed by Sam Weinig.
Merge https://chromium.googlesource.com/chromium/blink/+/7977721e62c471bfa17b84d82cd5d8243a4eb9a9.
Shink HTMLToken by 1.5 kB
HTMLToken has an inline vector for buffering characters during tokenization. We
originally picked the inline capacity of this buffer somewhat arbitrarily. This
CL tunes the number based on a somewhat non-scientific browse of a number of
popular web sites.
I (abarth) instrumented content_shell to log the length of each complete DataVector. I
then browsed around a variety of web sites to collect data. The 99% percentile
of DataVector lengths was just shy of 250 characters. I rounded that up to 256
because powers of two are pretty. That means we'll malloc an external buffer
less than 1% of the time, which seems fine.
* html/parser/HTMLToken.h:
(HTMLToken):
2013-05-29 Brent Fulgham <bfulgham@apple.com>
[Windows] Build correction after r150837
New 'forms' sub-folder of html needs to be included in
copy operations.
* WebCore.vcproj/copyForwardingHeaders.cmd: copy html/forms.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Use correct
'obj32' folder for build output.
* WebCore.vcxproj/copyForwardingHeaders.cmd: copy html/forms.
2013-05-29 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Radio Button UX updates.
https://bugs.webkit.org/show_bug.cgi?id=116881
Reviewed by Rob Buis.
BlackBerry PR 342322.
Internally Reviewed by Jeff Rogers.
Change images.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintRadio):
2013-05-29 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Datetime string is not centred in form controls.
https://bugs.webkit.org/show_bug.cgi?id=100760
Reviewed by Rob Buis.
BlackBerry PR 343512
Internally Reviewed by Jeff Rogers.
Adjust margin for inner text node of datetime form controls.
* css/themeBlackBerry.css:
(input::-webkit-date-and-time-value):
2013-05-29 Brent Fulgham <bfulgham@apple.com>
[Windows] Build correction after r150876
A clean build will now fail because the BaseMultipleFieldsDateAndTimeInputType sources have
been removed, but are still referenced in the project file.
* WebCore.vcxproj/WebCore.vcxproj: Remove reference to BaseMultipleFieldsDateAndTimeInputType
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
2013-05-28 Jer Noble <jer.noble@apple.com>
Support the 'onended' EventListener property for AudioBufferSourceNode and OscillatorNode.
https://bugs.webkit.org/show_bug.cgi?id=116798
Reviewed by Eric Carlson.
Tests: webaudio/audiobuffersource-ended.html
webaudio/oscillator-ended.html
* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
(WebCore::AudioScheduledSourceNode::setOnended): Set m_hasEndedListener.
(WebCore::AudioScheduledSourceNode::finish): Call notifyEndedDispatch on the main thread.
(WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Call notifyEnded().
(WebCore::AudioScheduledSourceNode::notifyEnded): Call the onended event listener.
* Modules/webaudio/AudioScheduledSourceNode.h:
(WebCore::AudioScheduledSourceNode::onended): Added boilerplate.
* Modules/webaudio/AudioBufferSourceNode.idl: Added the onerror attribute.
* Modules/webaudio/OscillatorNode.idl: Ditto.
2013-05-29 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Shapes] Support parsing inset-rectangle shapes
https://bugs.webkit.org/show_bug.cgi?id=116638
Reviewed by Dean Jackson.
Add parsing for inset-rectangle. It's very similar to parsing for
rectangle.
No new tests, updated existing tests to cover this.
* css/BasicShapeFunctions.cpp:
(WebCore::valueForBasicShape): Add support for inset rectangles.
(WebCore::basicShapeForValue): Add support for inset rectangles.
* css/CSSBasicShapes.cpp:
(WebCore::buildInsetRectangleString): Create an inset-rectangle css
string.
(WebCore::CSSBasicShapeInsetRectangle::cssText): Convert inset
rectangle shape to a CSS string.
(WebCore::CSSBasicShapeInsetRectangle::equals): Compare two inset
rectangles.
(WebCore::CSSBasicShapeInsetRectangle::serializeResolvingVariables):
Create an inset rectangle string, with CSS variables resolved.
(WebCore::CSSBasicShapeInsetRectangle::hasVariableReference):
Determine if this inset rectangle has any CSS Variable references.
* css/CSSBasicShapes.h:
(CSSBasicShapeInsetRectangle): Add inset rectangle class. This is a
direct representation of the CSS property. All the methods below
are just simple getters and setters, along with a construtor and a
factory method.
(WebCore::CSSBasicShapeInsetRectangle::create):
(WebCore::CSSBasicShapeInsetRectangle::top):
(WebCore::CSSBasicShapeInsetRectangle::right):
(WebCore::CSSBasicShapeInsetRectangle::bottom):
(WebCore::CSSBasicShapeInsetRectangle::left):
(WebCore::CSSBasicShapeInsetRectangle::radiusX):
(WebCore::CSSBasicShapeInsetRectangle::radiusY):
(WebCore::CSSBasicShapeInsetRectangle::setTop):
(WebCore::CSSBasicShapeInsetRectangle::setRight):
(WebCore::CSSBasicShapeInsetRectangle::setBottom):
(WebCore::CSSBasicShapeInsetRectangle::setLeft):
(WebCore::CSSBasicShapeInsetRectangle::setRadiusX):
(WebCore::CSSBasicShapeInsetRectangle::setRadiusY):
(WebCore::CSSBasicShapeInsetRectangle::type):
(WebCore::CSSBasicShapeInsetRectangle::CSSBasicShapeInsetRectangle):
(WebCore):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapeInsetRectangle): Parse the
inset-rectangle CSS property and create a
CSSBasicShapeInsetRectangle.
(WebCore::CSSParser::parseBasicShape): Add a call to parse
inset-rectangle.
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::isEnabledFor): Disable
inset-rectangles, since only the parsing has been implemented so
far.
* rendering/ExclusionShapeOutsideInfo.cpp:
(WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Disable
inset-rectangles, since only the parsing has been implemented so
far.
* rendering/style/BasicShapes.cpp:
(WebCore::BasicShapeInsetRectangle::path): Calculate the Path for an
inset-rectangle.
(WebCore::BasicShapeInsetRectangle::blend): Blend two inset rectangles
together at a point depending on the "progress" and return the
blended rectangle.
* rendering/style/BasicShapes.h:
(BasicShapeInsetRectangle): Add higher level inset rectangle class.
This is used outside of the CSS representation. The methods below
are just simple getters and setters, along with a constructor and
a factory method.
(WebCore::BasicShapeInsetRectangle::create):
(WebCore::BasicShapeInsetRectangle::top):
(WebCore::BasicShapeInsetRectangle::right):
(WebCore::BasicShapeInsetRectangle::bottom):
(WebCore::BasicShapeInsetRectangle::left):
(WebCore::BasicShapeInsetRectangle::cornerRadiusX):
(WebCore::BasicShapeInsetRectangle::cornerRadiusY):
(WebCore::BasicShapeInsetRectangle::setTop):
(WebCore::BasicShapeInsetRectangle::setRight):
(WebCore::BasicShapeInsetRectangle::setBottom):
(WebCore::BasicShapeInsetRectangle::setLeft):
(WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
(WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
(WebCore::BasicShapeInsetRectangle::type):
(WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle):
2013-05-29 Andreas Kling <akling@apple.com>
Move computed style extraction out of CSSComputedStyleDeclaration.
<http://webkit.org/b/116965>
Reviewed by Antti Koivisto.
Make it possible to get computed CSSValues from a Node without creating a CSSOM
style declaration object.
The bulk of the logic moves to a new class; ComputedStyleExtractor, which can be created
on the stack, and takes the same setup variables as CSSComputedStyleDeclaration.
This is prep to enable futuristic optimizations in editing and elsewhere.
* css/CSSComputedStyleDeclaration.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Create a ComputedStyleExtractor to do the work!
(WebCore::ComputedStyleExtractor::currentColorOrValidColor):
(WebCore::ComputedStyleExtractor::valueForFilter):
(WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
(WebCore::ComputedStyleExtractor::valueForShadow):
(WebCore::ComputedStyleExtractor::styledNode):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
(WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
(WebCore::ComputedStyleExtractor::svgPropertyValue):
Moved all of these from CSSComputedStyleDeclaration to the new class.
* rendering/style/RenderStyle.h:
* svg/SVGPaint.h:
Have these two befriend ComputedStyleExtractor.
2013-05-29 Antti Koivisto <antti@apple.com>
Another attempt to fix windows build.
Not reviewed.
* css/CSSFontSelector.h:
2013-05-29 Antti Koivisto <antti@apple.com>
Try to fix window build.
Not reviewed.
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionFontDataCacheKey::computeHash):
2013-05-29 Simon Fraser <simon.fraser@apple.com>
Fix the firing of m_paintRelatedMilestonesTimer
https://bugs.webkit.org/show_bug.cgi?id=116919
Reviewed by Tim Horton.
r150671 intended to change things so that paint-related milestones
only fire when painting has actually happened, so that WebKit clients
are notified when we actually have bits to present.
However, it made an incorrect assumption that painting would happen
inside of flushCompositingState(). This is not the case; flushCompositingState()
will just dirty CALayers, and later on Core Animation will ask us to paint them.
This incorrect assumption meant that we would never start the
m_paintRelatedMilestonesTimer, so never fire the milestones.
Fix by starting the m_paintRelatedMilestonesTimer via the RenderLayerBacking
paintContents call back. At this time we know we're painting, so we can both
set the FrameView's last paint time, and start up the timer. We also only
want to start the timer if there are pending milestones.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
(WebCore::RenderLayerBacking::paintContents):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::didPaintBacking):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
2013-05-29 Antti Koivisto <antti@apple.com>
Share FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=116863
Reviewed by Anreas Kling.
Style system generates many Font objects that are identical or similar enough to have identical FontGlyphs.
We can figure out that the FontGlyphs are going to be the same and share them. This reduces memory usage.
It also improves performance as the glyph cache and the width cache hang from FontGlyphs and their hit rate
increases.
On PLT3 this takes the number of live FontGlyphs at the end from 40k+ to <1k. Width cache hit rate improves
from ~42% to ~55%.
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
Add unique id we can use in cache key.
(WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
Bump the version number on invalidation so we don't reuse cache entries after web font is loaded.
(WebCore::CSSFontSelector::resolvesFamilyFor):
Test if FontSelector is needed for resolving a particular FontDescription.
* css/CSSFontSelector.h:
* page/Settings.cpp:
(WebCore::setGenericFontFamilyMap):
Invalidate the cache if standard font settings change.
* platform/graphics/Font.cpp:
(FontGlyphsCacheKey):
(FontGlyphsCacheEntry):
(WebCore::operator==):
(WebCore::fontGlyphsCache):
(WebCore::invalidateFontGlyphsCache):
(WebCore::makeFontSelectorFlags):
(WebCore::makeFontGlyphsCacheKey):
The cache key consists of
- all families.
- shared key with the lower level FontData cache (FontCache), guaranteeing FontDatas would be identical.
- font selector specific keys.
These guarantee the FontData will be identical.
(WebCore::computeFontGlyphsCacheHash):
(WebCore::pruneUnreferencedFromFontGlyphsCache):
Don't accumulate unused entries.
(WebCore::retrieveOrAddCachedFontGlyphs):
(WebCore::Font::update):
* platform/graphics/Font.h:
* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
(WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
(WebCore::FontPlatformDataCacheKey::operator==):
(FontPlatformDataCacheKey):
(WebCore::computeHash):
(WebCore::FontCache::getCachedFontPlatformData):
(WebCore::FontCache::purgeInactiveFontData):
(WebCore::FontCache::invalidate):
* platform/graphics/FontCache.h:
(WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey):
(WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
(WebCore::FontDescriptionFontDataCacheKey::operator==):
(WebCore::FontDescriptionFontDataCacheKey::operator!=):
(WebCore::FontDescriptionFontDataCacheKey::computeHash):
Separate part of the key for sharing.
(FontDescriptionFontDataCacheKey):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::releaseFontData):
* platform/graphics/FontFallbackList.h:
(WebCore::FontGlyphs::create):
(WebCore::FontGlyphs::~FontGlyphs):
Remove invalidate(). If FontGlyphs needs invalidation it is reconstructed.
* platform/graphics/FontSelector.h:
2013-05-29 Nico Weber <thakis@chromium.org>
Remove unused file PlatformGestureEvent.cpp
https://bugs.webkit.org/show_bug.cgi?id=116894
Reviewed by Darin Adler.
This was added in https://bugs.webkit.org/show_bug.cgi?id=49345 but
not removed in https://bugs.webkit.org/show_bug.cgi?id=77492 which
removed most of that code again.
* platform/PlatformGestureRecognizer.cpp: Removed.
2013-05-29 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap][GStreamer][GTK] Composited Video support
https://bugs.webkit.org/show_bug.cgi?id=86410
Reviewed by Noam Rosenthal.
Enable the video accelerated compositing using the WebKit's
TextureMapper.
This patch does not use hardware accelerated video decoding. It
provides a generic path for system memory buffers.
This new functionality is only available when the coordinated graphics
system is not used.
No new tests, already covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
texture content with the new received video buffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
use the accelerated compositing or the normal code path
(WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
compositing is used this method is halted.
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
a texture from the pool and draws it if it is already available.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
(WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
returns true
2013-05-29 Peter Gal <galpeter@inf.u-szeged.hu>
[Qt] Missing files from build after r150853
https://bugs.webkit.org/show_bug.cgi?id=116932
Reviewed by Csaba Osztrogonác.
* Target.pri: Added missing include path.
2013-05-29 Mihai Maerean <mmaerean@adobe.com>
[CSS Regions] Content that has overflow: scroll cannot be scrolled by dragging the scroll thumbs with the mouse
https://bugs.webkit.org/show_bug.cgi?id=113703
Reviewed by Darin Adler.
The point inside a box that's inside a region has its coordinates relative to the region, not the FlowThread
that is its container in the RenderObject tree.
Previously, the coordinates were computed relatively to the FlowThread which doesn't really have a location in
the page.
Tests: fast/regions/drag-scrollbars-of-content.html
fast/regions/hover-in-second-region.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::offsetFromContainer):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2013-05-29 Andreas Kling <akling@apple.com>
Fix dumb typo in r150879.
* editing/htmlediting.cpp:
(WebCore::nextLeafNode):
2013-05-29 Andreas Kling <akling@apple.com>
Move leaf Node traversal helpers to htmlediting.cpp
<http://webkit.org/b/116940>
Reviewed by Antti Koivisto.
Move Node::previousLeafNode() and Node::nextLeafNode() to htmlediting.cpp along with their helpers.
Fixes an 8-year old FIXME. \o/
* dom/Node.h:
* dom/Node.cpp:
* dom/Position.cpp:
(WebCore::nextRenderedEditable):
(WebCore::previousRenderedEditable):
* editing/VisibleUnits.cpp:
(WebCore::previousLeafWithSameEditability):
(WebCore::nextLeafWithSameEditability):
* editing/htmlediting.h:
* editing/htmlediting.cpp:
(WebCore::previousNodeConsideringAtomicNodes):
(WebCore::nextNodeConsideringAtomicNodes):
(WebCore::previousLeafNode):
(WebCore::nextLeafNode):
2013-05-29 Peter Gal <galpeter@inf.u-szeged.hu>
[Qt] Missing files from build after r150853
https://bugs.webkit.org/show_bug.cgi?id=116932
Reviewed by Csaba Osztrogonác.
* Target.pri: Added the CFURLExtras.{cpp,h} files to the projectfile.
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
PresentationAttributeCacheCleaner::m_hitCount is never initialized
https://bugs.webkit.org/show_bug.cgi?id=116946
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/70be7ddc41141ef6dec7795d37842c27dab2e194.
* dom/StyledElement.cpp:
(WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
2013-05-29 Kent Tamura <tkent@chromium.org>
Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
https://bugs.webkit.org/show_bug.cgi?id=116796
Reviewed by Ryosuke Niwa.
This feature was used only by Chromium port.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/html.css:
(input::-webkit-date-and-time-value):
* dom/Element.cpp:
* dom/Element.h:
* html/BaseChooserOnlyDateAndTimeInputType.cpp:
* html/BaseChooserOnlyDateAndTimeInputType.h:
* html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed.
* html/BaseMultipleFieldsDateAndTimeInputType.h: Removed.
* html/DateInputType.cpp:
* html/DateInputType.h:
(DateInputType):
* html/DateTimeFieldsState.cpp: Removed.
* html/DateTimeFieldsState.h: Removed.
* html/DateTimeInputType.cpp:
* html/DateTimeInputType.h:
(DateTimeInputType):
* html/DateTimeLocalInputType.cpp:
* html/DateTimeLocalInputType.h:
(DateTimeLocalInputType):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore):
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/InputType.cpp:
* html/InputType.h:
(InputType):
* html/MonthInputType.cpp:
* html/MonthInputType.h:
(MonthInputType):
* html/TimeInputType.cpp:
* html/TimeInputType.h:
(TimeInputType):
* html/WeekInputType.cpp:
* html/WeekInputType.h:
(WeekInputType):
* html/shadow/ClearButtonElement.cpp: Removed.
* html/shadow/ClearButtonElement.h: Removed.
* html/shadow/DateTimeEditElement.cpp: Removed.
* html/shadow/DateTimeEditElement.h: Removed.
* html/shadow/DateTimeFieldElement.cpp: Removed.
* html/shadow/DateTimeFieldElement.h: Removed.
* html/shadow/DateTimeFieldElements.cpp: Removed.
* html/shadow/DateTimeFieldElements.h: Removed.
* html/shadow/DateTimeNumericFieldElement.cpp: Removed.
* html/shadow/DateTimeNumericFieldElement.h: Removed.
* html/shadow/DateTimeSymbolicFieldElement.cpp: Removed.
* html/shadow/DateTimeSymbolicFieldElement.h: Removed.
* html/shadow/PickerIndicatorElement.cpp: Removed.
* html/shadow/PickerIndicatorElement.h: Removed.
* page/ChromeClient.h:
(ChromeClient):
* platform/LocalizedStrings.h:
(WebCore):
* platform/text/PlatformLocale.cpp:
* platform/text/PlatformLocale.h:
(Locale):
* rendering/RenderDetailsMarker.cpp:
* rendering/RenderDetailsMarker.h:
* rendering/RenderObject.h:
(RenderObject):
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor
https://bugs.webkit.org/show_bug.cgi?id=116914
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/508eb21a07f69ed38b9be9ff92fe75dcb907861f
* dom/Document.cpp:
* dom/Document.h:
2013-05-29 Ryosuke Niwa <rniwa@webkit.org>
Make WidgetHierarchyUpdatesSuspensionScope use swap instead of copy
https://bugs.webkit.org/show_bug.cgi?id=116927
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/1d577e1fd5c5716a06e4007e04fc3d9d0a88f5e4
This is equivalent behavior code that is unambiguously better performance. swap is O(1) time and memory,
copying a hash table is at least linear with the number of elements.
* rendering/RenderWidget.cpp:
(WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2013-05-29 Andreas Kling <akling@apple.com>
Remove Document::nodeAbsIndex() and Document::nodeWithAbsIndex().
Rubber-stamped by Antti "Lucky" Koivisto.
* dom/Document.h:
* dom/Document.cpp:
2013-05-28 Andreas Kling <akling@apple.com>
FocusController should operate on Elements internally.
<http://webkit.org/b/116781>
Reviewed by Antti Koivisto.
Switch from Node* to Element* as much as possible inside FocusController.
Mostly mechanical, gets rid of some unnecessary isElementNode() checks and casts.
* page/FocusController.h:
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedElement):
(WebCore::isNonFocusableShadowHost):
(WebCore::adjustedTabIndex):
(WebCore::shouldVisit):
(WebCore::FocusController::setFocused):
(WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::FocusController::findFocusableElementAcrossFocusScope):
(WebCore::FocusController::findFocusableElementRecursively):
(WebCore::FocusController::findFocusableElement):
(WebCore::FocusController::nextFocusableElement):
(WebCore::FocusController::previousFocusableElement):
(WebCore::FocusController::setActive):
2013-05-29 Radu Stavila <stavila@adobe.com>
[CSS Regions] Mouse over an element does not trigger :hover state for parent when the element is flowed in a region
https://bugs.webkit.org/show_bug.cgi?id=111749
Reviewed by Antti Koivisto.
When searching for the hover ancestor and encountering a named flow thread,
the search will continue with the DOM ancestor of the top-most element
in the named flow thread.
Tests: fast/regions/hover-in-region-grandparent.html
fast/regions/hover-in-region-parent-skip.html
fast/regions/hover-in-region-parent-skip-inlines-anonymous.html
fast/regions/hover-on-child-in-region.html
fast/regions/hover-on-child-in-region-in-region.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hoverAncestor):
* rendering/RenderObject.h:
2013-05-28 Nate Chapin <japhet@chromium.org>
Crash in WebCore::SubresourceLoader::releaseResources when connection fails
https://bugs.webkit.org/show_bug.cgi?id=87743
Don't do anything complicated in SubresourceLoader::releaseResources(),
just clear variables. With this patch, releaseResources() will still
assert in debug builds if it is called twice, but it will safely execute
in release.
Reviewed by Darin Adler.
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::cleanupForError): Pull shared cleanup code out of didFail()
and cancel() into a helper.
(WebCore::ResourceLoader::cancel): Merge a couple variables into an enum, check for
reentrancy from within didCancel().
* loader/ResourceLoader.h: Replace m_calledWillCancel and m_cancelled with an enum.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didFinishLoading): Don't call ResourceLoader::didFinishLoading(),
put finish() in the middle of the process.
(WebCore::SubresourceLoader::didFail): Don't call ResourceLoader::didFail(), put finish()
in the middle of the process.
(WebCore::SubresourceLoader::didCancel):
(WebCore::SubresourceLoader::notifyDone): Do the non-trivial work previous done in releaseResources(),
most importantly calling loadDone().
(WebCore::SubresourceLoader::releaseResources): Only do simple variable clearing here.
* loader/SubresourceLoader.h:
(SubresourceLoader):
* loader/cache/CachedResource.cpp: Split stopLoading() into cancelLoad() (which notifies clients)
and clearLoader() (which just nulls m_loader).
* loader/cache/CachedResource.h:
* loader/chromium/ResourceLoaderChromium.cpp:
2013-05-28 Seokju Kwon <seokju.kwon@gmail.com>
[GTK] Build fix after r150837
https://bugs.webkit.org/show_bug.cgi?id=116904
Unreviewed build fix.
* GNUmakefile.am:
2013-05-28 Andy Estes <aestes@apple.com>
REGRESSION (r150169): Images from file: URLs display after a delay even though they were preloaded by JavaScript
https://bugs.webkit.org/show_bug.cgi?id=116906
<rdar://problem/13991927>
Reviewed by Andreas Kling.
Writing a test for this is blocked on https://webkit.org/b/116199.
Some WebKit clients use JavaScript to preload images from disk so that
subsequent loads will display immediately from the memory cache. By not
caching non-HTTP sub-resources in memory, we break this common pattern.
This change restricts r150169 to only apply to cached main resources.
Sub-resources will again be cached indefinitely as they were prior to
r150169.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::freshnessLifetime): If this is a non-HTTP
main resource from a scheme that should not be cached indefinitely,
return 0 for the freshness lifetime. For other non-HTTP cached
resources, return an indefinite freshness lifetime.
2013-05-28 Dean Jackson <dino@apple.com>
Animations do not restart after exiting page cache
https://bugs.webkit.org/show_bug.cgi?id=116900
Reviewed by Tim Horton.
Animations are suspended as they enter the page cache, but
were not getting correctly resumed when exiting. The cause
was an error in r149576 which was checking a global flag for suspension
on the AnimationController and thus not trying to resume anything.
Test: animations/resume-after-page-cache.html
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
2013-05-28 Chris Rogers <crogers@google.com>
Support multiple HRTFDatabases for different sample-rates
https://bugs.webkit.org/show_bug.cgi?id=116183
Reviewed by Kenneth Russell.
Adapted from Blink:
https://codereview.chromium.org/14636011/
This removes the limitation which required OfflineAudioContexts to be created at native sample-rate
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::hrtfDatabaseLoader):
(AudioContext):
* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::create):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender):
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::initialize):
(WebCore::PannerNode::setPanningModel):
* platform/audio/HRTFDatabaseLoader.cpp:
(WebCore):
(WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
(WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
* platform/audio/HRTFDatabaseLoader.h:
(HRTFDatabaseLoader):
(WebCore::HRTFDatabaseLoader::loaderMap):
* platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::HRTFPanner):
(WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
(WebCore::HRTFPanner::pan):
* platform/audio/HRTFPanner.h:
(HRTFPanner):
* platform/audio/Panner.cpp:
(WebCore::Panner::create):
* platform/audio/Panner.h:
(WebCore):
2013-05-28 Alexey Proskuryakov <ap@apple.com>
Windows build fix.
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::createCFURL):
2013-05-28 Alexey Proskuryakov <ap@apple.com>
Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
https://bugs.webkit.org/show_bug.cgi?id=116887
<rdar://problem/12965959>
Reviewed by Darin Adler.
Test: http/tests/uri/curly-braces-escaping.html
The issue was that WebKit used an incorrect accessor to get a string out of CFURL,
unlike WebCore.
Centralized code for converting between CFURLs and strings in a place that WebKit
can use directly.
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
Keeping things building.
* platform/KURL.cpp: (WebCore::KURL::copyToBuffer):
* platform/KURL.h:
Updated for a new typedef name. The code was using Vector<char, 512> and CharBuffer
inconsistently, and now URLs use URLCharBuffer.
* platform/cf/CFURLExtras.cpp: Added.
(WebCore::createCFURLFromBuffer):
(WebCore::getURLBytes):
* platform/cf/CFURLExtras.h: Added.
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::KURL):
(WebCore::KURL::createCFURL):
Extracted code for CFURL string manipulation that is not logcally part of KURL.
* platform/mac/KURLMac.mm:
(WebCore::KURL::KURL): Use the new getURLBytes function.
(WebCore::KURL::operator NSURL *): Added a comment.
(WebCore::KURL::createCFURL): Added a comment, and updated for new names and
signatures.
* platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformLazyInit):
Added a FIXME. We are still using CFURLGetString here. The difficulty is getting
encodings right.
2013-05-28 Anders Carlsson <andersca@apple.com>
Create a html/forms subdirectory and move FileIconLoader there
https://bugs.webkit.org/show_bug.cgi?id=116880
Reviewed by Jessie Berlin.
A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
them out into a separate subdirectory, html/forms.
Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
the file upload element), and is not really a platform abstraction so it doesn't belong in platform.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
* html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.
2013-05-28 Chris Fleizach <cfleizach@apple.com>
AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
https://bugs.webkit.org/show_bug.cgi?id=116756
Reviewed by Tim Horton.
If AXFocused is set to true, but the WebView is not the first responder, then the call will
not do anything. This change asks the Chrome to make the WebView the first responder before
trying to set focus within the page.
Was not able to make a test, it requires on interplay between areas outside the web view.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2013-05-28 Jer Noble <jer.noble@apple.com>
Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
https://bugs.webkit.org/show_bug.cgi?id=116882
Reviewed by Eric Carlson.
Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::repositionGenericCue):
2013-05-28 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] GraphicsContext: add missing definitions.
https://bugs.webkit.org/show_bug.cgi?id=115515
Reviewed by Rob Buis.
* platform/graphics/GraphicsContext.h:
(Graphics):
Add definition for PlatformGraphicsContext.
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
Include RoundedRect.h
2013-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
https://bugs.webkit.org/show_bug.cgi?id=116604
Reviewed by Carlos Garcia Campos.
PR 273550, 99638
Remove the "get" prefix from getters in the WebKit- and compositing-
thread layer classes, as well as LayerRendererSurface. Clarify which
geometry-related getters return normalized device coordinates by adding
a comment.
Also remove dead code related to LayerData::m_holePunchClipRect, which
was part of an eventually disabled fix for video clipping in iframes,
PR 99638. Since we now use AC layers for iframes, the bug is no longer
reproducible, and the dead code will never need to be enabled again.
No change in behavior, no new tests.
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore::LayerCompositingThread::transformedHolePunchRect):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
(LayerCompositingThread):
(WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
(WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
(WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
* platform/graphics/blackberry/LayerData.h:
(LayerData): Removed unused data member "m_holePunchClipRect"
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::drawDebugBorder):
(WebCore::LayerRenderer::drawHolePunchRect):
(WebCore::LayerRenderer::prepareFrameRecursive):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::collect3DPreservingLayers):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::boundingBox):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
* platform/graphics/blackberry/LayerWebKitThread.h:
(WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
* platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
(WebCore::VideoLayerWebKitThread::setHolePunchRect):
(WebCore::VideoLayerWebKitThread::boundsChanged):
2013-05-28 Jer Noble <jer.noble@apple.com>
Made AudioNode an EventTarget
https://bugs.webkit.org/show_bug.cgi?id=116871
Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b
Reviewed by Darin Adler.
Tests: webaudio/audionode-expected.txt:
webaudio/audionode.html:
Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
all that same boilerplate from ScriptProcessorNode now that it's base class
is an EventTarget.
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::interfaceName): Added boilerplate.
(WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
(WebCore::AudioNode::processIfNecessary): Whitespace.
* Modules/webaudio/AudioNode.h:
* Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
* Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
* Modules/webaudio/ScriptProcessorNode.h: Ditto.
* Modules/webaudio/ScriptProcessorNode.idl: Ditto.
* dom/EventTarget.h: Mark AudioNode as an EventTarget.
* dom/EventTargetFactory.in: Ditto.
2013-05-28 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] backface-visibility: hidden doesn't work properly with masks and filters
https://bugs.webkit.org/show_bug.cgi?id=116616
Reviewed by Carlos Garcia Campos.
The BlackBerry::Platform::Graphics::GraphicsContext generates geometry
with a different winding order than the accelerated compositing backend
of the BlackBerry port. So, when we switched from Skia to this new
rendering engine, we switched from glFrontFace(GL_CCW) to
glFrontFace(GL_CW), and all was well when drawing display lists.
However, we forgot to update the winding order of geometry generated
within the accelerated compositing backend, which is used for masks and
filters, so they were getting erroneously culled out when
backface-visibility: hidden was applied to them. Fixed by switching the
winding order of all geometry generated up here, which has the added
benefit of enabling us to use TransformationMatrix::mapQuad instead of
transforming point-by-point.
To further complicate matters, a right-side up transform is used when
drawing layers into surfaces, reversing the winding order and requiring
us to switch back to glFrontFace(GL_CCW) temporarily, when drawing
layers to surfaces, or the layers will get culled out inside the
surface.
Also fix spelling error, "drawed" should be "drawn".
No new tests, this is only detectable by pixel tests, which the
BlackBerry port currently doesn't support.
PR 341945.
* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore::getTransformedRect):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(LayerCompositingThread):
(WebCore::LayerCompositingThread::origin):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayers):
(WebCore):
(WebCore::LayerRenderer::drawLayersOnSurfaces):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::drawRect):
(WebCore::LayerRendererSurface::transformedBounds):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::origin):
(LayerRendererSurface):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore):
(WebCore::loadBufferingImageData):
(WebCore::MediaPlayerPrivate::drawBufferingAnimation):
2013-05-28 Andreas Kling <akling@apple.com>
Move Node::dispatchChangeEvent() to HTMLFormControlElement.
<http://webkit.org/b/116866>
Reviewed by Anders Carlsson.
...and devirtualize it, since it had no overrides.
* dom/Node.h:
* dom/Node.cpp:
* html/HTMLFormControlElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchChangeEvent):
(WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
* html/FileInputType.cpp:
(WebCore::FileInputType::setFiles):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
2013-05-28 Sergio Villar Senin <svillar@igalia.com>
Refactoring CSS grammar
https://bugs.webkit.org/show_bug.cgi?id=116679
Reviewed by Andreas Kling.
From Blink r149948 by <serya@chromium.org>
Added "closing_parenthesis:" and "error_recovery:" to avoid code
duplication in a couple of error recovery rules. Some other rules
were also refactored which allows to reduce the the number of
shift/reduce conflicts by 2.
No new tests required as this is just a refactoring, no new
functionality added.
* css/CSSGrammar.y.in:
2013-05-28 Sergio Villar Senin <svillar@igalia.com>
Invalid block doesn't make declaration invalid
https://bugs.webkit.org/show_bug.cgi?id=115709
Reviewed by Andreas Kling.
From Blink r149446 by <serya@chromium.org>
Added a new rule "declaration_recovery:" which covers any kind of
"invalid_block_list maybe_space" sequence. By appending this new
rule to every rule reductable to "declaration:" we can remove some
redundant rules and improve error recovery of some others that
were only accepting exactly one error.
One of the rules being removed was preventing invalid blocks in a
declaration to invalidate the whole declaration. The rule was
reporting the syntax error but at the same time accepting the
invalid block as part of a valid declaration.
* css/CSSGrammar.y.in:
2013-05-28 Andreas Kling <akling@apple.com>
Move dispatching of focus-related events from Node to Element.
<http://webkit.org/b/116864>
Reviewed by Antti Koivisto.
...and pass around pointers to Element instead of Node.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::dispatchFocusInEvent):
(WebCore::Element::dispatchFocusOutEvent):
(WebCore::Element::dispatchFocusEvent):
(WebCore::Element::dispatchBlurEvent):
Moved here from Node.
* html/HTMLFormControlElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchBlurEvent):
* html/HTMLSelectElement.h:
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::dispatchFocusEvent):
(WebCore::HTMLSelectElement::dispatchBlurEvent):
* html/HTMLTextFormControlElement.h:
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
(WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
Update subclass overrides and sprinkle OVERRIDE/FINAL.
2013-05-28 Zan Dobersek <zdobersek@igalia.com>
Remove CachedResourceRequest::initiatorElement
https://bugs.webkit.org/show_bug.cgi?id=116862
Reviewed by Andreas Kling.
The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.
* loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
* loader/cache/CachedResourceRequest.h:
(CachedResourceRequest): Remove the initiatorElement method declaration.
2013-05-28 Andreas Kling <akling@apple.com>
Document::setFocusedNode() should be setFocusedElement().
<http://webkit.org/b/116857>
Reviewed by Antti Koivisto.
Only Elements can be focused, so tighten Document's idea of what's focused.
Most of this patch is just updating call sites for the new names and removing
now-unnecessary isElementNode() checks and casts.
* WebCore.exp.in:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::focusedUIElementForPage):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetFocusAttribute):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isFocused):
(WebCore::AccessibilityRenderObject::setFocused):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
* bindings/objc/DOM.mm:
(-[DOMElement isFocused]):
* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::detach):
(WebCore::Document::focusedNodeRemoved):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::setFocusedElement):
(WebCore::Document::updateFocusAppearanceTimerFired):
(WebCore::eventTargetNodeForDocument):
* dom/Document.h:
(Document):
(WebCore::Document::focusedElement):
* dom/Element.cpp:
(WebCore::Element::attach):
(WebCore::Element::focus):
(WebCore::Element::blur):
(WebCore::Element::cancelFocusAppearanceUpdate):
* dom/Node.cpp:
(WebCore::Node::rendererIsEditable):
* dom/TreeScope.cpp:
(WebCore::TreeScope::focusedElement):
* dom/UserTypingGestureIndicator.cpp:
(WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::setComposition):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
* editing/EditorCommand.cpp:
(WebCore::verticalScrollDistance):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectAll):
(WebCore::FrameSelection::focusedOrActiveStateChanged):
(WebCore::FrameSelection::setFocusedElementIfNeeded):
(WebCore::FrameSelection::currentForm):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::attach):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setValueCommon):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
(WebCore::HTMLTextFormControlElement::selectionStart):
(WebCore::HTMLTextFormControlElement::selectionEnd):
(WebCore::HTMLTextFormControlElement::selectionDirection):
* html/RadioInputType.cpp:
(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::focusedFieldIndex):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollOverflow):
(WebCore::EventHandler::logicalScrollOverflow):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::capsLockStateMayHaveChanged):
* page/FocusController.cpp:
(WebCore::dispatchEventsOnWindowAndFocusedNode):
(WebCore::FocusController::advanceFocusInDocumentOrder):
(WebCore::FocusController::setFocusedElement):
(WebCore::FocusController::findFocusCandidateInContainer):
(WebCore::FocusController::advanceFocusDirectionallyInContainer):
(WebCore::FocusController::advanceFocusDirectionally):
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
* plugins/PluginView.cpp:
(WebCore::PluginView::focusPluginElement):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::setFocus):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::platformStart):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintAreaElementFocusRing):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
(WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):
2013-05-28 Sergio Villar Senin <svillar@igalia.com>
Web Inspector: Enable CSS logging
https://bugs.webkit.org/show_bug.cgi?id=113401
Reviewed by Benjamin Poulain.
From Blink r149265 by <serya@chromium.org>
CSS logging was disabled in r147028 to prevent message overflow in
the inspector console. This change restores it by modifying the
CSS grammar in order to reduce as much consecutive errors as
possible in 'declaration_list' and 'decl_list' rules.
This way, for rules like 'x { color: ### }' only the first '#'
will be reported as error (instead of 3 identical errors).
The rule 'declaration' still produces multiple errors, because it
does not eat as much errors as possible. So in order not to create
a complex risky patch we just disable logging in the parser for
that rule.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::syntaxError):
(WebCore::CSSParser::isLoggingErrors):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParser.h:
(CSSParser):
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r150730.
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Build fix for WinCE after r150772.
* platform/win/ClipboardWin.cpp:
(WebCore):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::readFilenames):
(WebCore):
2013-05-27 Darin Adler <darin@apple.com>
Fix build.
* html/HTMLAnchorElement.cpp:
(WebCore::hasNonEmptyBox): Fix typo.
2013-05-27 Darin Adler <darin@apple.com>
Move hasNonEmptyBoundingBox from Node to HTMLAnchorElement
https://bugs.webkit.org/show_bug.cgi?id=116842
Reviewed by Antti Koivisto.
* dom/Node.cpp: Removed hasNonEmptyBoundingBox.
* dom/Node.h: Ditto.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::isMouseFocusable): Fixed #if to be more readable and
added more-explicit clearer comments. No behavior change.
(WebCore::hasNonEmptyBox): Added. Has the same code that was in
Node::hasNonEmptyBoundingBox with some additional comments.
(WebCore::HTMLAnchorElement::isKeyboardFocusable): Call hasNonEmptyBox.
2013-05-27 Darin Adler <darin@apple.com>
Move isBlockFlowElement and related functions out of the Node class into editing code
https://bugs.webkit.org/show_bug.cgi?id=116846
Reviewed by Antti Koivisto.
* dom/Node.cpp: Removed isBlockFlowElement, enclosingBlockFlowElement, and
inSameContainingBlockFlowElement. These are all editing functions that don't
belong in the Node class, and mostly-deprecated ones to boot.
* dom/Node.h: Ditto.
* dom/Position.cpp:
(WebCore::inSameEnclosingBlockFlowElement): Added. This editing-specific function
is used only here, so put it here.
(WebCore::Position::rendersInDifferentPosition): Updated to call new function above.
(WebCore::Position::leadingWhitespacePosition): Ditto.
* editing/InsertLineBreakCommand.cpp:
(WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use
deprecatedEnclosingBlockFlowElement at its new location.
(WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApplyForSingleParagraph): use
isBlockFlowElement at its new location.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::enclosingInline): Ditto.
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::canonicalPosition): Use deprecatedEnclosingBlockFlowElement
at its new location.
(WebCore::enclosingBlockFlowElement): Ditto. Also added FIXME.
* editing/VisibleSelection.cpp:
(WebCore::makeSearchRange): Ditto.
* editing/htmlediting.cpp:
(WebCore::isBlockFlowElement): Added. Same as the Node::isBlockFlowElement
function, but here because this is an editing function, not suitable as a Node member.
(WebCore::deprecatedEnclosingBlockFlowElement): Ditto. Added "deprecated" to the name
since the Node member function had a comment saying it was deprecated. Also changed so
it tolerates a 0 for an argument, which made it easier for one caller.
* editing/htmlediting.h: Added the two new functions.
2013-05-27 Seokju Kwon <seokju.kwon@gmail.com>
Add guard around paintForFixedRootBackground
https://bugs.webkit.org/show_bug.cgi?id=116754
Reviewed by Simon Fraser.
paintForFixedRootBackground is only used when ACCELERATED_COMPOSITING is enabled.
No new tests, no behavior change.
* rendering/RenderLayer.cpp:
(WebCore):
2013-05-27 Seokju Kwon <seokju.kwon@gmail.com>
Remove a leftover Pagepoup from PickerIndicatorElement.h
https://bugs.webkit.org/show_bug.cgi?id=116801
Reviewed by Anders Carlsson.
No new tests, no behavior change.
* html/shadow/PickerIndicatorElement.h:
(WebCore):
2013-05-27 Claudio Saavedra <csaavedra@igalia.com>
[CSS] -webkit-var prefix is case-sensitive
https://bugs.webkit.org/show_bug.cgi?id=116829
Reviewed by Darin Adler.
Tests: Added case to fast/css/variables/case-sensitive.html
* css/CSSParser.cpp:
(WebCore::isEqualToCSSCaseSensitiveIdentifier): Add variant to
IsEqualToCSSIdentifier that respects case-sensitivity.
(WebCore::CSSParser::realLex): Use the above method for CSS
variable declarations.
2013-05-27 Zalan Bujtas <zalan@apple.com>
drop-shadow filter with overflow:hidden child misbehaves.
https://bugs.webkit.org/show_bug.cgi?id=109783
Reviewed by Simon Fraser.
Applying CSS filters only to the scrollbar rect leaves rendering
artefacts. Filters should skip such partial repaints.
Tests: Test framework uses mock theme for scrollbars. Such scrollbars do not
initiate partial repaints.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintLayerContents):
* rendering/RenderLayer.h:
(RenderLayer):
2013-05-27 Xueqing Huang <huangxueqing@baidu.com>
Move Windows port off legacy clipboard.
https://bugs.webkit.org/show_bug.cgi?id=116258
Reviewed by Darin Adler.
Clipboard refactor, no new tests.
* dom/Clipboard.h:
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::createDraggingClipboard): Create Clipboard instead of ClipboardWin.
* platform/Pasteboard.h:
(WebCore::Pasteboard::dataObject): Get IDataObject by Clipborad.
(WebCore::Pasteboard::writableDataObject): Get WCDataObject by Clipborad.
* platform/win/ClipboardWin.cpp:
(WebCore::Clipboard::createDragImage): Change parameter name loc to dragLocation.
(WebCore::Clipboard::declareAndWriteDragImage): Implement declareAndWriteDragImage use WCDataObject exposed by Pasteboard.
* platform/win/ClipboardWin.h: Removed.
* platform/win/EditorWin.cpp:
(WebCore::Editor::newGeneralClipboard): Create Clipboard instead of ClipboardWin.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard.
(WebCore::Pasteboard::createPrivate): Ditto.
(WebCore::Pasteboard::createForDragAndDrop): Ditto.
(WebCore::Pasteboard::finishCreatingPasteboard): Create Pasteboard use Windows API.
(WebCore::Pasteboard::Pasteboard):
(WebCore::clipboardTypeFromMIMEType): Copied from ClipboardWin.cpp.
(WebCore::Pasteboard::clear): Ditto.
(WebCore::Pasteboard::hasData): Ditto.
(WebCore::addMimeTypesForFormat): Ditto.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.
(WebCore::writeURL): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
(WebCore::Pasteboard::setDragImage): Ditto.
(WebCore::Pasteboard::writeRangeToDataObject): Write range to WCDataObject.
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writePlainTextToDataObject): Write PlainText to WCDataObject.
(WebCore::Pasteboard::writePlainText):
(WebCore::pathRemoveBadFSCharacters): Copied from ClipboardWin.cpp.
(WebCore::filesystemPathFromUrlOrTitle): Ditto.
(WebCore::writeFileToDataObject): Ditto.
(WebCore::Pasteboard::writeURLToDataObject): Write URL to WCDataObject.
(WebCore::Pasteboard::writeURL): Copied from ClipboardWin.cpp.
(WebCore::Pasteboard::writePasteboard): Copied from Pasteboard::writeClipboard.
(WebCore::Pasteboard::documentFragment): Copied from ClipboardWin.cpp.
(WebCore::Pasteboard::setExternalDataObject): Clipboard can set new IDataObject.
(WebCore::getCachedImage): Copied from ClipboardWin.cpp.
(WebCore::createGlobalImageFileDescriptor): Ditto.
(WebCore::createGlobalImageFileContent): Ditto.
(WebCore::createGlobalHDropContent): Ditto.
(WebCore::Pasteboard::writeImageToDataObject): Expose to make Clipboard implement declareAndWriteDragImage.
(WebCore::Pasteboard::writeURLToWritableDataObject): Ditto.
2013-05-27 Tim Horton <timothy_horton@apple.com>
PDFPlugin: Main-frame PDFPlugin Accessibility
https://bugs.webkit.org/show_bug.cgi?id=116563
<rdar://problem/13458534>
Reviewed by Sam Weinig.
* WebCore.exp.in: Export AffineTransform::mapRect.
2013-05-27 Tiancheng Jiang <tijiang@rim.com>
Checkbox UX update.
https://bugs.webkit.org/show_bug.cgi?id=116838.
Reviewed by Rob Buis.
BlackBerry PR 342302.
Internally Reviewed by Jeff Rogers.
Remove old background and change pressed checkmark image.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintCheckbox):
2013-05-27 Sam Weinig <sam@webkit.org>
When the background is completely transparent we should be conservative and use the default scrollbar style, not the light one
https://bugs.webkit.org/show_bug.cgi?id=116836
<rdar://problem/13949905>
Reviewed by Simon Fraser.
* page/FrameView.cpp:
(WebCore::FrameView::recalculateScrollbarOverlayStyle):
Don't use the light style when the background is completely transparent.
2013-05-27 Patrick Gansterer <paroga@webkit.org>
Use ICU_INCLUDE_DIRS in BlackBerry CMake files
https://bugs.webkit.org/show_bug.cgi?id=116210
Reviewed by Rob Buis.
Set and use the ICU_INCLUDE_DIRS variable to avoid
duplicated adding of the ICU include directory.
* PlatformBlackBerry.cmake:
2013-05-27 Antti Koivisto <antti@apple.com>
Tighten FontGlyphs::glyphDataAndPageForCharacter to take FontDescription
https://bugs.webkit.org/show_bug.cgi?id=116823
Reviewed by Andreas Kling.
FontGlyphs does not need to know about Font anymore.
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::operator=):
* platform/graphics/Font.h:
(WebCore::Font::isPlatformFont):
(WebCore::Font::glyphDataAndPageForCharacter):
(Font):
* platform/graphics/FontCache.h:
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.h:
(WebCore):
(WebCore::FontGlyphs::createForPlatformFont):
Tweaked the name.
(WebCore::FontGlyphs::isForPlatformFont):
Move knowledge about platform font to FontGlyphs as it is needed for resolving system fallback on Mac.
* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore::FontCache::systemFallbackForCharacters):
More descriptive name and tighter interface.
2013-05-27 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Prevent unnecessary copy of LayoutRect objects
https://bugs.webkit.org/show_bug.cgi?id=116828
Reviewed by Andreas Kling.
Use const references for parameter passing.
No functional change, no new tests.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/RenderFlowThread.h:
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/RenderRegion.h:
2013-05-27 Leo Yang <leoyang@rim.com>
[BlackBerry] Reveal HTTP error code for XHR even if there is no response body
https://bugs.webkit.org/show_bug.cgi?id=116543
Reviewed by Rob Buis.
Reviewed internally by Joe Mason.
It's a regression introduced by r132556.
BlackBerry is doing friendly HTTP error handling: if there is no response body
for an HTTP error it will display an error message made by the port. But for a
XHR request, which usually does not result in displaying error messages to the
end user, HTTP error code should be revealed to let the JavaScript know what
the actual server error code is.
Covered by existing tests:
ManualTests/blackberry/head-xhr-nonexistant-file.html
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::shouldNotifyClientFailed):
2013-05-27 Tiancheng Jiang <tijiang@rim.com>
Adjust date input width.
https://bugs.webkit.org/show_bug.cgi?id=100760.
Reviewed by Rob Buis.
BlackBerry PR 343497.
Internally Reviewed by Jeff Rogers.
Set width to auto to fit the string length.
* css/themeBlackBerry.css:
(input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
2013-05-27 Andreas Kling <akling@apple.com>
Document::setHoveredNode() should be setHoveredElement().
<http://webkit.org/b/116819>
Reviewed by Antti Koivisto.
Only Elements can be hovered, teach Document about this.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::dispose):
(WebCore::Document::detach):
m_hoverNode => m_hoveredElement.
Removed hoverNode() and setHoverNode() since those were only used internally.
(WebCore::Document::updateHoverActiveState):
Updated for hovered things always being Elements.
(WebCore::Document::hoveredElementDidDetach):
* dom/Element.cpp:
(WebCore::Element::detach):
Renamed Document::hoveredNodeDetached() to hoveredElementDidDetach() and fix it up
following the same pattern as elementInActiveChainDidDetach().
2013-05-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] REGRESSION(r150716): It made 15 inspector and 1 mozilla test to assert
https://bugs.webkit.org/show_bug.cgi?id=116822
Reviewed by Andreas Kling.
The input fontDescription may have more than one family defined.
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::adjustButtonStyle):
2013-05-27 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt][Win] Input events aren't mapped properly with windowless plugins.
https://bugs.webkit.org/show_bug.cgi?id=116094
Reviewed by Tor Arne Vestbø.
The events are first sent properly but Flash then immediately repaints
and this causes flickering painting.
The issue is that Flash seems to be doing some input event tracking of
its own internally, using the HWND returned through NPN_GetValue(NPNVnetscapeWindow).
We are currently using two coordinate systems for windowless plugins on Windows with Qt:
- FrameView coordinates: Used for input events and ajusted with the WM_WINDOWPOSCHANGED message
- Drawable coordinates: Used by WM_PAINT and adjusted with NPP_SetWindow
This patch fixes the bug by mapping input events to the native window returned
as NPNVnetscapeWindow instead of the FrameView to ensure that those coordinates will match
the ones used by Flash internally.
With this we shouldn't be using FrameView coordinates anywhere for windowless plugins
on Windows with Qt.
* platform/qt/QWebPageClient.h:
(QWebPageClient):
Added mapToOwnerWindow to the interface, mapping from the FrameView up to the wrapping nativeParentWidget.
* plugins/win/PluginViewWin.cpp:
(WebCore::contentsToNativeWindow):
(WebCore::PluginView::paintIntoTransformedContext):
(WebCore::PluginView::handleMouseEvent):
2013-05-27 Antti Koivisto <antti@apple.com>
Tighten FontGlyphs interfaces to take FontDescription instead of Font
https://bugs.webkit.org/show_bug.cgi?id=116818
Reviewed by Andreas Kling.
This gives better understanding of what the actual inputs are.
* WebCore.exp.in:
* platform/graphics/Font.h:
(WebCore::Font::primaryFont):
(WebCore::Font::fontDataAt):
(WebCore::Font::isFixedPitch):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getFontData):
* platform/graphics/FontCache.h:
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::realizeFontDataAt):
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.h:
(WebCore::FontGlyphs::primaryFontData):
(WebCore::FontGlyphs::isFixedPitch):
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
* platform/graphics/freetype/FontCacheFreeType.cpp:
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::similarFontPlatformData):
Drop get* naming and make this Mac only as no other platform has it.
* platform/graphics/qt/FontCacheQt.cpp:
* platform/graphics/win/FontCacheWin.cpp:
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore):
2013-05-27 Andreas Kling <akling@apple.com>
Strengthen typing of detaching an Element from Document's :active chain.
<http://webkit.org/b/116815>
Reviewed by Antti Koivisto.
Tiny cleanup now that the :active chain can only contain elements.
Rename Document::activeChainNodeDetached() to elementInActiveChainDidDetach().
* dom/Element.cpp:
(WebCore::Element::detach):
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::elementInActiveChainDidDetach):
Rename, take Element*, remove silly condition that was always true.
2013-05-27 Andrei Bucur <abucur@adobe.com>
[CSS Regions] Remove the offsetFromLogicalTopOfFirstPage parameter from layout functions
https://bugs.webkit.org/show_bug.cgi?id=116441
Reviewed by David Hyatt.
The patch changes the following things:
- exposes offsetFromLogicalTopOfFirstPage() to all the RenderBoxes;
- offsetFromLogicalTopOfFirstPage() is now safe to call from any box inside a flow thread, not only the
currently being laid out;
- removes the offsetFromLogicalTopOfFirstPage parameter from all the layout functions
that didn't actually required it; when the value is necessary, the offsetFromLogicalTopOfFirstPage
function is called instead;
- RenderFlowThread now handles its own logic for obtaining the offset from logical top of the first
region for a box, based on the layout states pushed on RenderView; it provides a better caching mechanism
that can be used for all the ancestor containing blocks of the current box being laid out.
The RenderBoxRegionInfo structures are cached only based on the box and the region. This means that
passing around a value for offsetFromLogicalTopOfFirstPage different in some cases than others was
risky. If there is a possibility of having a different box info result for a different offset
then the cache is not working correctly.
Tests: No function change, no tests.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::logicalLeftOffsetForContent):
(WebCore::RenderBlock::logicalRightOffsetForContent):
(WebCore::RenderBlock::getClearDelta):
(WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
(WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage):
(WebCore::RenderBlock::logicalWidthChangedInRegions):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLine):
(WebCore::RenderBlock::logicalRightOffsetForLine):
(WebCore::RenderBlock::logicalLeftOffsetForLine):
(WebCore::RenderBlock::startOffsetForLine):
(WebCore::RenderBlock::endOffsetForLine):
(WebCore::RenderBlock::availableLogicalWidthForContent):
(WebCore::RenderBlock::startOffsetForContent):
(WebCore::RenderBlock::endOffsetForContent):
(WebCore::RenderBlock::logicalLeftOffsetForContent):
(WebCore::RenderBlock::logicalRightOffsetForContent):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::borderBoxRectInRegion):
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::renderBoxRegionInfo):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
(WebCore::RenderBox::offsetFromLogicalTopOfFirstPage):
* rendering/RenderBox.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
(WebCore::RenderFlowThread::hasCachedOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::cachedOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::setOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::clearOffsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::currentActiveRenderBox):
(WebCore::RenderFlowThread::pushFlowThreadLayoutState):
(WebCore::RenderFlowThread::popFlowThreadLayoutState):
(WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFlowThread.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
* rendering/RenderView.cpp:
(WebCore::RenderView::pushLayoutState):
(WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
(WebCore::RenderView::popLayoutStateForCurrentFlowThread):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):
(WebCore::RenderView::popLayoutState):
2013-05-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
Active DOM objects stopped twice
https://bugs.webkit.org/show_bug.cgi?id=116524
Reviewed by Alexey Proskuryakov.
Only iterate over all active DOM object to stop them once.
To ensure later created active DOM objects are stopped,
suspendActiveDOMObjectIfNeeded now also stops active DOM objects
if needed. This also fixes an existing bug when active DOM
objects were created after stopActiveDOMObjects had been called.
Two existing tests creates new active DOM objects after stopActiveDOMObjects
has been called:
fast/dom/xmlhttprequest-constructor-in-detached-document.html
fast/dom/Window/timer-null-script-execution-context.html
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded):
2013-05-27 Charles Wei <charles.wei@torchmobile.com.cn>
Remove redundant CachedRawResource::loader()
https://bugs.webkit.org/show_bug.cgi?id=116805
Reviewed by Andreas Kling.
Just remove redundant code, no test case needed.
* loader/cache/CachedRawResource.cpp:
* loader/cache/CachedRawResource.h:
2013-05-27 Andreas Kling <akling@apple.com>
WinCE build TLC: Node::active() moved to Element.
* rendering/RenderThemeWinCE.cpp:
(WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
2013-05-26 Jaehun Lim <ljaehun.lim@samsung.com>
CSSParser::parseImageResolution doesn't need a parameter.
https://bugs.webkit.org/show_bug.cgi?id=116755
Reviewed by Darin Adler.
parseImageResolution() can get CSSPraserValueList from m_valueList directly.
No new tests, no behavior change.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseImageResolution):
* css/CSSParser.h:
2013-05-26 Andreas Kling <akling@apple.com>
Turn TreeScope::focusedNode() into focusedElement().
<http://webkit.org/b/116802>
Reviewed by Darin Adler.
For the hundredth time, only Elements can be focused!
This change mostly reverts r121079 since that made things unnecessarily complicated
just to tweak the behavior of ShadowRoot.activeElement, an API that we don't expose.
Finding a TreeScope's focused element now does a simple walk up the parent chain instead
of running the full Shadow DOM re-targeting algorithm.
(WebCore::TreeScope::focusedElement):
Simplify and return Element* instead of Node*.
* dom/TreeScope.h:
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):
Make this return Element* as the name already suggested.
* dom/Document.cpp:
(WebCore::Document::removeFocusedNodeOfSubtree):
* dom/Element.cpp:
(WebCore::Element::blur):
* dom/ShadowRoot.h:
(WebCore::ShadowRoot::activeElement):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::activeElement):
Simplified call sites that were paranoid about getting a non-Element focused node.
2013-05-26 Dean Jackson <dino@apple.com>
Plugins with no src but valid type should not snapshot
https://bugs.webkit.org/show_bug.cgi?id=116799
<rdar://problem/13695911>
Reviewed by Simon Fraser.
There are a few plug-ins around that don't take any source content
via the src attribute, but rather just load the binary based on the
mime-type. In those cases we shouldn't snapshot until we have a
mechanism to do so.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
Add MIMEType logging, and detect the case of no src but valid type.
* html/HTMLPlugInImageElement.h: Add another SnapshotReason enum for
this special case.
2013-05-26 Antti Koivisto <antti@apple.com>
Encapsulate FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=116803
Reviewed by Andreas Kling.
FontGlyphs is unfriending Font. Give it a real class interface and some actual code.
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
* platform/graphics/Font.h:
(WebCore::Font::glyphDataForCharacter):
(WebCore::Font::glyphDataAndPageForCharacter):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::isInRange):
(WebCore::shouldIgnoreRotation):
(WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation):
Helpers from FontFastPath.cpp.
(WebCore::FontGlyphs::glyphDataAndPageForCharacter):
This is the primary interface. The code moves here from FontFastPath.cpp.
* platform/graphics/FontFallbackList.h:
(WebCore::FontGlyphs::createForPlatformData):
Remove setPlatformData in favor of constructor.
(WebCore::FontGlyphs::primarySimpleFontData):
* platform/graphics/FontFastPath.cpp:
* platform/graphics/GraphicsContext.h:
Remove a stray function definition also called setPlatformFont().
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2013-05-26 Seokju Kwon <seokju.kwon@gmail.com>
Remove a leftover CALENDAR_PICKER from LocaleNone.cpp
https://bugs.webkit.org/show_bug.cgi?id=116800
Reviewed by Kent Tamura.
No new tests, no behavior change.
* platform/text/LocaleNone.cpp:
(LocaleNone):
2013-05-26 Antti Koivisto <antti@apple.com>
Rename FontFallbackList to FontGlyphs
https://bugs.webkit.org/show_bug.cgi?id=116797
Reviewed by Andreas Kling.
Maybe it was a fallback list once. Nowadays its purpose is to cache realized glyphs and related data.
File renaming will be done separately.
* WebCore.exp.in:
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::Font::operator=):
(WebCore::Font::operator==):
Refactored to early return style.
(WebCore::Font::update):
(WebCore::Font::width):
* platform/graphics/Font.h:
(Font):
(WebCore::Font::glyphs):
(WebCore::Font::loadingCustomFonts):
(WebCore::Font::primaryFont):
(WebCore::Font::fontDataAt):
(WebCore::Font::isFixedPitch):
(WebCore::Font::fontSelector):
* platform/graphics/FontCache.h:
(FontCache):
* platform/graphics/FontFallbackList.cpp:
(WebCore::FontGlyphs::FontGlyphs):
(WebCore::FontGlyphs::invalidate):
(WebCore::FontGlyphs::releaseFontData):
(WebCore::FontGlyphs::determinePitch):
(WebCore::FontGlyphs::realizeFontDataAt):
Renamed for clarity along with m_fontList -> m_realizedFontData.
(WebCore::FontGlyphs::setPlatformFont):
* platform/graphics/FontFallbackList.h:
(FontGlyphs):
(WebCore::FontGlyphs::GlyphPagesStateSaver::GlyphPagesStateSaver):
(WebCore::FontGlyphs::GlyphPagesStateSaver::~GlyphPagesStateSaver):
(GlyphPagesStateSaver):
(WebCore::FontGlyphs::create):
(WebCore::FontGlyphs::~FontGlyphs):
(WebCore::FontGlyphs::primaryFontData):
* platform/graphics/FontFastPath.cpp:
(WebCore::Font::glyphDataAndPageForCharacter):
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2013-05-26 Kent Tamura <tkent@chromium.org>
Remove ENABLE_CALENDAR_PICKER
https://bugs.webkit.org/show_bug.cgi?id=116795
Reviewed by Ryosuke Niwa.
This feature was used only by Chromium port.
* Resources/pagepopups/calendarPicker.css: Removed.
* Resources/pagepopups/calendarPicker.js: Removed.
* css/html.css:
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::LocaleICU):
(WebCore):
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/PlatformLocale.h:
(Locale):
* platform/text/mac/LocaleMac.h:
(LocaleMac):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::monthLabels):
* platform/text/win/LocaleWin.cpp:
(WebCore::LocaleWin::LocaleWin):
(WebCore::LocaleWin::monthLabels):
* platform/text/win/LocaleWin.h:
(LocaleWin):
2013-05-26 Andreas Kling <akling@apple.com>
Move :active chain participation state from Node to Element.
<http://webkit.org/b/116786>
Reviewed by Antti Koivisto.
Only Elements can be in the :active chain so move the logic there from Node.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
Add isElementNode() type checks when updating the :active chain.
* dom/Node.h:
* dom/Node.cpp:
(WebCore::Node::detach):
* dom/Element.cpp:
(WebCore::Element::detach):
Move the remaining logic for detaching from the UserActionElementSet to Element.
(WebCore::Element::isUserActionElementInActiveChain):
* dom/Element.h:
(WebCore::Element::inActiveChain):
Move all the :active chain stuff from Node to Element.
* dom/UserActionElementSet.cpp:
(WebCore::UserActionElementSet::didDetach):
* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::isInActiveChain):
(WebCore::UserActionElementSet::setInActiveChain):
UserActionElementSet now only takes Element* in its API.
2013-05-26 Antti Koivisto <antti@apple.com>
Remove FontFamily.h/.cpp
https://bugs.webkit.org/show_bug.cgi?id=116788
Reviewed by Anders Carlsson.
Empty files.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/FontDescription.h:
* platform/graphics/FontFamily.cpp: Removed.
* platform/graphics/FontFamily.h: Removed.
2013-05-26 Antti Koivisto <antti@apple.com>
Use Vector instead of custom linked list for font families
https://bugs.webkit.org/show_bug.cgi?id=116783
Reviewed by Andreas Kling.
Get rid of FontFamily and SharedFontFamily.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::hasSameFont):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontFamilyFromStyle):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyFontFamily::applyInheritValue):
(WebCore::ApplyPropertyFontFamily::applyInitialValue):
(WebCore::ApplyPropertyFontFamily::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForDocument):
(WebCore::StyleResolver::initializeFontStyle):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::font):
(WebCore::CanvasRenderingContext2D::setFont):
* page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::systemFont):
* platform/graphics/Font.h:
(WebCore::Font::firstFamily):
(WebCore::Font::familyCount):
(WebCore::Font::familyAt):
* platform/graphics/FontCache.cpp:
(WebCore::FontCache::getFontData):
* platform/graphics/FontDescription.cpp:
(SameSizeAsFontDescription):
* platform/graphics/FontDescription.h:
(WebCore::FontDescription::FontDescription):
(WebCore::FontDescription::familyCount):
(WebCore::FontDescription::firstFamily):
(WebCore::FontDescription::familyAt):
(WebCore::FontDescription::families):
(WebCore::FontDescription::useFixedDefaultSize):
(WebCore::FontDescription::setOneFamily):
(WebCore::FontDescription::setFamilies):
(WebCore::FontDescription::adoptFamilies):
(WebCore::FontDescription::operator==):
* platform/graphics/FontFamily.cpp:
* platform/graphics/FontFamily.h:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::displayCallback):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::getSimilarFontPlatformData):
* platform/graphics/qt/FontCacheQt.cpp:
(WebCore::FontCache::getLastResortFallbackFont):
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::systemFont):
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::controlFont):
* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::adjustButtonStyle):
* platform/text/transcoder/FontTranscoder.cpp:
(WebCore::FontTranscoder::converterType):
* platform/win/DragImageWin.cpp:
(WebCore::dragLabelFont):
* rendering/RenderText.cpp:
(WebCore::RenderText::styleDidChange):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::systemFont):
(WebCore::RenderThemeSafari::setFontFromControlSize):
* rendering/RenderThemeWin.cpp:
(WebCore::fillFontDescription):
2013-05-26 Andreas Kling <akling@apple.com>
Move "active" state logic from Node to Element.
<http://webkit.org/b/116785>
Reviewed by Antti Koivisto.
Resolve another 7 year old FIXME by merging the "active" state logic from Node and ContainerNode
and moving it all to Element instead.
* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::isActive):
(WebCore::UserActionElementSet::setActive):
* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
(WebCore::Element::active):
* dom/Element.cpp:
(WebCore::Element::isUserActionElementActive):
(WebCore::Element::setActive):
Moved here from Node/ContainerNode.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isPressed):
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
(WebCore::Document::updateHoverActiveState):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isPressed):
(WebCore::RenderTheme::isSpinUpButtonPartPressed):
* rendering/RenderThemeMac.mm:
(WebCore::getMediaUIPartStateFlags):
(WebCore::RenderThemeMac::updatePressedState):
* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::getMediaControlForegroundColor):
Check that the inspected Node is an Element before asking if it's active.
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::setActive):
Call the right superclass.
* html/HTMLAnchorElement.h:
* html/HTMLLabelElement.h:
* html/shadow/MediaControlElementTypes.h:
Sprinkle OVERRIDE>
2013-05-26 Andreas Kling <akling@apple.com>
Move Node::dispatchSimulatedClick() to Element.
<http://webkit.org/b/116784>
Reviewed by Antti Koivisto.
Only Elements use the dispatchSimulatedClick() functionality, so move it there.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::dispatchSimulatedClick):
* dom/EventDispatcher.h:
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchSimulatedClick):
2013-05-26 Andreas Kling <akling@apple.com>
TreeScope::rootNode() should return a ContainerNode.
<http://webkit.org/b/116782>
Reviewed by Antti Koivisto.
The rootNode() of a TreeScope is always a ContainerNode, so update pointer types to reflect that.
This lets us take advantage of Antti's optimized traversal functions.
* dom/ContainerNode.h:
(WebCore::Node::isTreeScope):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
* dom/Node.cpp:
(WebCore::Node::containingShadowRoot):
* dom/Node.h:
* dom/TreeScope.h:
(WebCore::TreeScope::rootNode):
(TreeScope):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::rootNode):
(WebCore::FocusNavigationScope::owner):
* page/FocusController.h:
(FocusNavigationScope):
2013-05-26 Andreas Kling <akling@apple.com>
FocusController::setFocusedNode() should be setFocusedElement().
<http://webkit.org/b/116780>
Reviewed by Antti Koivisto.
Only Elements can have focus, so make the public API of FocusController take Element*.
* WebCore.exp.in:
* page/FocusController.h:
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):
Out with the setFocusedNode(), in with the setFocusedElement().
* dom/Element.cpp:
(WebCore::Element::focus):
(WebCore::Element::blur):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):
* plugins/PluginView.cpp:
(WebCore::PluginView::focusPluginElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedNodeIfNeeded):
Tweak for FocusController taking Element* instead of Node*.
(WebCore::FrameSelection::setFocusedElementIfNeeded):
Renamed from setFocusedNodeIfNeeded().
* editing/htmlediting.h:
* editing/htmlediting.cpp:
(WebCore::enclosingAnchorElement):
Cleaned up the loop for readability and made it return an Element.
2013-05-26 Andreas Kling <akling@apple.com>
Move some form control things from Element to HTMLFormControlElement.
<http://webkit.org/b/116779>
Reviewed by Antti Koivisto.
The following methods sit better on HTMLFormControlElement than on Element:
- formControlType()
- wasChangedSinceLastFormControlChangeEvent()
- setChangedSinceLastFormControlChangeEvent()
- dispatchFormControlChangeEvent()
Moved them, and devirtualized as much as possible.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
Check if the old focus target is an Element before (possibly) dispatching a change event.
* dom/Element.cpp:
* dom/Element.h:
Removed some stub methods that were only used by HTMLFormControlElement subclasses.
* html/HTMLFormControlElement.cpp:
* html/HTMLFormControlElement.h:
(WebCore::isHTMLFormControlElement):
(WebCore::toHTMLFormControlElement):
Add toHTMLFormControlElement() helper with ASSERT_WITH_SECURITY_IMPLICATION.
* html/HTMLTextFormControlElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::supportsFocus() to Element.
<http://webkit.org/b/116778>
Reviewed by Antti Koivisto.
Node never supports focus, so move supportsFocus() to Element instead.
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
Removed Node::supportsFocus(), it always returned false anyway.
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetFocusAttribute):
Check that the underlying Node is an Element before asking if it supports focus.
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLBodyElement.h:
* html/HTMLElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLFrameElementBase.h:
* html/HTMLMediaElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLOutputElement.h:
* svg/SVGAElement.h:
* svg/SVGCircleElement.h:
* svg/SVGEllipseElement.h:
* svg/SVGGElement.h:
* svg/SVGImageElement.h:
* svg/SVGLineElement.h:
* svg/SVGPathElement.h:
* svg/SVGPolyElement.h:
* svg/SVGRectElement.h:
* svg/SVGSVGElement.h:
* svg/SVGSwitchElement.h:
* svg/SVGSymbolElement.h:
* svg/SVGTextElement.h:
* svg/SVGUseElement.h:
OVERRIDE ALL THE THINGS!
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::isFocusable() to Element.
<http://webkit.org/b/116777>
Reviewed by Anders Carlsson.
Nodes cannot be focusable, so move isFocusable() from Node to Element.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isFocusable):
Moved here from Node.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::determineAccessibilityRole):
Check that the underlying node is an Element before asking if it's focusable.
* page/FrameView.cpp:
(WebCore::FrameView::scrollToAnchor):
Renamed the 'anchorNode' variable to 'anchorElement' because reasons.
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLLabelElement.h:
* html/HTMLOptionElement.h:
* svg/SVGAElement.h:
Sprinkle OVERRIDE.
* html/ValidationMessage.cpp:
(WebCore::ValidationMessage::setMessage):
Update a comment to refer to Element::isFocusable() instead of Node.
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::tabIndex() to Element.
<http://webkit.org/b/116772>
Reviewed by Ryosuke Niwa.
Since only Elements are keyboard-focusable, it doesn't make sense for Node to have a tabIndex().
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
A Node can't have a tab index, so move tabIndex() to Element.
* page/FocusController.h:
* page/FocusController.cpp:
(WebCore::adjustedTabIndex):
(WebCore::FocusController::findElementWithExactTabIndex):
(WebCore::nextElementWithGreaterTabIndex):
(WebCore::previousElementWithLowerTabIndex):
(WebCore::FocusController::nextFocusableNode):
(WebCore::FocusController::previousFocusableNode):
Make this code deal in Element* when doing tab index stuff. FocusController needs
more Node->Element cleanup, but let's do that separately.
* html/HTMLAnchorElement.h:
* html/HTMLElement.h:
* html/HTMLFormControlElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Don't instantiate ChildNodeLists just to get a child count.
<http://webkit.org/b/116776>
Reviewed by Ryosuke Niwa.
Use ContainerNode::childNodeCount() instead of Node::childNodes()->length().
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2013-05-25 Andreas Kling <akling@apple.com>
PluginDocument::pluginNode() should be pluginElement() instead.
<http://webkit.org/b/116774>
Reviewed by Anders Carlsson.
Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.
* dom/Document.cpp:
(WebCore::eventTargetNodeForDocument):
* html/PluginDocument.h:
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocument::pluginWidget):
(WebCore::PluginDocument::setPluginElement):
(WebCore::PluginDocument::detach):
2013-05-25 Andreas Kling <akling@apple.com>
Remove Document::getFocusableNodes().
<http://webkit.org/b/116773>
Reviewed by Joseph Pecoraro.
This was added in r42191 and there are no remaining clients of the API.
* dom/Document.cpp:
* dom/Document.h:
* WebCore.exp.in:
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::focusDelegate() to Element.
<http://webkit.org/b/116768>
Reviewed by Anders Carlsson.
Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually)
so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed.
* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::focusDelegate):
* html/shadow/SliderThumbElement.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):
2013-05-25 Alberto Garcia <agarcia@igalia.com>
Path: clean up addPathForRoundedRect()
https://bugs.webkit.org/show_bug.cgi?id=116765
Reviewed by Andreas Kling.
Reorganize code that is a bit redundant.
No new tests, no behavior change.
* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):
2013-05-25 Simon Fraser <simon.fraser@apple.com>
Unprefix Page Visibility API
https://bugs.webkit.org/show_bug.cgi?id=102340
Reviewed by Tim Horton.
Remove prefixes from the document properties, and the visibilitychanged event.
Rename the "preview" state to "unloaded". The "unloaded" state is never
reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).
Add some comments to places where we should update the visibility state
when going in and out of the page cache, but cannot safely do so yet.
Tested by existing Page Visibility tests.
* dom/Document.cpp:
(WebCore::Document::pageVisibilityState):
(WebCore::Document::visibilityState):
(WebCore::Document::hidden):
(WebCore::Document::dispatchVisibilityStateChangeEvent):
* dom/Document.h:
* dom/Document.idl:
* dom/EventNames.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/Page.cpp:
(WebCore::Page::setVisibilityState):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString):
* page/PageVisibilityState.h:
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::isMouseFocusable() to Element.
<http://webkit.org/b/116762>
Reviewed by Anders Carlsson.
Node::isMouseFocusable() would just return isFocusable(), which is never true for a non-Element
since Node::supportsFocus() always returns false. So move it to Element!
* dom/Node.h:
* dom/Node.cpp:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isMouseFocusable):
Moved here from Node.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedNodeIfNeeded):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):
Walk up the parent chain with parentOrShadowHostElement() instead of parentOrShadowHostNode().
Removed a misleading no-op hunk about mouse-focusable ShadowRoots, since ShadowRoots are not
Elements and thus cannot be mouse-focusable.
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::nodeRespondsToTapGesture):
Check that the Node is an Element before asking if it's mouse-focusable.
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.h:
* html/HTMLMediaElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.h:
* html/shadow/ClearButtonElement.h:
* html/shadow/TextControlInnerElements.h:
* svg/SVGAElement.h:
* svg/SVGStyledElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Move Node::isKeyboardFocusable() to Element.
<http://webkit.org/b/116761>
Reviewed by Antti Koivisto.
Only Elements can be keyboard-focusable. Move the base isKeyboardFocusable() implementation to Element
and sprinkle OVERRIDE on subclass overrides.
FocusController gets some temporary type checks that will go away as that code moves to dealing in
Elements instead of Node.
* dom/Node.h:
* dom/Node.cpp:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isKeyboardFocusable):
Move isKeyboardFocusable() from Node to Element.
* page/FocusController.cpp:
(WebCore::isNonFocusableShadowHost):
(WebCore::isFocusableShadowHost):
(WebCore::shouldVisit):
(WebCore::FocusController::advanceFocusInDocumentOrder):
Check that the inspected Node is an Element before querying isKeyboardFocusable().
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLFrameOwnerElement.h:
* html/HTMLInputElement.h:
* html/HTMLPlugInElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.h:
* svg/SVGAElement.h:
* svg/SVGStyledElement.h:
Sprinkle OVERRIDE.
2013-05-25 Andreas Kling <akling@apple.com>
Begin moving "focus" state logic from Node to Element.
<http://webkit.org/b/116760>
Reviewed by Antti Koivisto.
Only Elements can be focused, so merge the "focus" state logic from Node and ContainerNode
and move it into Element. There's a lot more iceberg under this tip, but we'll be starting
with setFocus(bool) and focused().
* dom/Node.h:
* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
* dom/Element.cpp:
(WebCore::Element::isUserActionElementFocused):
(WebCore::Element::setFocus):
* dom/Element.h:
(WebCore::Element::focused):
* dom/Node.cpp:
Move focused() and setFocus(bool) from Node/ContainerNode to Element.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):
Check if the inspected Node is an Element before asking if it's focused.
2013-05-25 Noam Rosenthal <noam.rosenthal@nokia.com>
Direct pattern compositing breaks when no-repeat is set on a large layer
https://bugs.webkit.org/show_bug.cgi?id=116140
Reviewed by Antti Koivisto.
In some cases the directly composited background color logic overrides the layer's
contentsRect, which results in wrong rendering of tiled images.
This patch makes sure that the background image is applied after the solid color,
which ensures the correct contentsRect.
Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
2013-05-24 Andreas Kling <akling@apple.com>
Move "hover" state logic from Node to Element.
<http://webkit.org/b/116757>
Reviewed by Antti Koivisto.
Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
and moving it all to Element instead.
* dom/Node.cpp:
(WebCore::Node::detach):
* dom/Element.cpp:
(WebCore::Element::detach):
Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().
(WebCore::Element::isUserActionElementHovered):
(WebCore::Element::setHovered):
* dom/Element.h:
(WebCore::Element::hovered):
Moved here from Node/ContainerNode.
* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::setHovered):
(WebCore::UserActionElementSet::setFlags):
Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
of these methods eventually, so added a setFlags() helper with the tighter type.
* html/HTMLLabelElement.h:
* html/shadow/SpinButtonElement.h:
Sprinkle OVERRIDE on setHovered() overrides.
* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isHovered):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isHovered):
Check if the inspected Node is an element before asking if it's hovered.
2013-05-25 Andreas Kling <akling@apple.com>
Document::formController() should return a reference.
<http://webkit.org/b/116758>
Reviewed by Antti Koivisto.
The formController() is created on demand, so return a reference instead.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::formController):
(WebCore::Document::setStateForNewFormElements):
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
(WebCore::HTMLFormControlElementWithState::finishParsingChildren):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::finishParsingChildren):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::checkedRadioButtons):
2013-05-25 Sergio Villar Senin <svillar@igalia.com>
Reducing CSS code duplication in declaration list error recovery
https://bugs.webkit.org/show_bug.cgi?id=115157
Reviewed by Andreas Kling.
From Blink r148974 by <serya@chromium.org>
Refactor "invalid_block_list error | /* empty */" in a new
decl_list_recovery rule that allows to remove 4 redundant rules.
No new test required as we're just refactoring code, no new behaviour.
* css/CSSGrammar.y.in:
2013-05-24 Ryosuke Niwa <rniwa@webkit.org>
Build fix after r150664.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore):
2013-05-24 Sergio Villar Senin <svillar@igalia.com>
Fixing invalid block recovery in some declaration list.
https://bugs.webkit.org/show_bug.cgi?id=115159
Reviewed by Darin Adler.
From Blink r148889 by <serya@chromium.org>
Improves the detection of some invalid block declarations inside a
declaration list. This allows the parser not to completely discard
a whole declaration list that contains an invalid block. In
particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
new test added by this change.
Test: fast/css/parsing-invalid-block-recovery.html
* css/CSSGrammar.y.in:
2013-05-24 Beth Dakin <bdakin@apple.com>
DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
https://bugs.webkit.org/show_bug.cgi?id=116749
-and corresponding-
<rdar://problem/13886753>
Reviewed by Simon Fraser.
Only start m_paintRelatedMilestonesTimer if we have actually painted.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2013-05-24 Anders Carlsson <andersca@apple.com>
Fix Windows build.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-05-24 Tim Horton <timothy_horton@apple.com>
Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
https://bugs.webkit.org/show_bug.cgi?id=116744
<rdar://problem/13973514>
Reviewed by Simon Fraser.
* WebCore.exp.in: Export FrameView::resumeAnimatingImages.
* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):
(WebCore::FrameView::resumeAnimatingImages):
Factor the code to restart animated images out of frameView::setIsInWindow.
* page/FrameView.h:
(FrameView):
2013-05-24 Anders Carlsson <andersca@apple.com>
Move history property list writer to WebKit
https://bugs.webkit.org/show_bug.cgi?id=116746
Reviewed by Tim Horton.
Remove files from the Xcode project and remove symbols that now live in WebKit.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
2013-05-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Global constructors exposed in worker environment have wrong attributes
https://bugs.webkit.org/show_bug.cgi?id=116708
Reviewed by Geoffrey Garen.
Fix JSC bindings generator so that Global constructors exposed in worker environment
have the following attributes:
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
This is now consistent with global constructors on DOMWindow and with the Web IDL
specification:
http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
Test: fast/js/global-constructors-attributes-worker.html
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):
2013-05-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove custom code for webkitAudioContext global constructor getter
https://bugs.webkit.org/show_bug.cgi?id=116530
Reviewed by Geoffrey Garen.
Get rid of custom code for webkitAudioContext global constructor getter. The
global DOMWindow attribute is now automatically generated by leveraging support
for [EnabledAtRuntime] extended attribute and the existing methods in
RuntimeEnabledFeatures class.
No new tests, no behavior change.
* GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
* Modules/webaudio/AudioContext.idl:
Remove [NoInterfaceObject] extended attribute so that the global constructor is
automatically generated instead of automatically added. Add [EnabledAtRuntime]
extended attribute since this global constructor can be disabled at runtime and
so that we can getter rid of the [CustomGetter] for the corresponding global
constructor. Use [InterfaceName] extended attribute so that the interface name
matches the global constructor on DOMWindow (webkitAudioContext).
* Target.pri: Remove JSDOMWindowWebAudioCustom.*.
* UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.exp.in: Export additional symbol.
* WebCore.order: Export additional symbol.
* WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
* bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
* bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
bindings generator now.
* page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
generated.
* page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
in RuntimeEnabledFeatures now.
2013-05-24 Seokju Kwon <seokju.kwon@gmail.com>
[AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
https://bugs.webkit.org/show_bug.cgi?id=116712
Reviewed by Andreas Kling.
renderView is used when ACCELERATED_COMPOSITING is enabled.
So, this patch allows it to be guarded by USE(ACCELERATED_COMPOSITING).
No new tests, no behavior change.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
2013-05-24 Thomas Deniau <deniau@apple.com>
Add more lines to the context during Dictionary lookups
https://bugs.webkit.org/show_bug.cgi?id=115256
Reviewed by Ryosuke Niwa.
No new tests - no new functionality.
* WebCore.exp.in: Export a few methods in VisibleUnits needed to be able
to call previousLinePosition(), nextLinePosition(), startOfLine() and
endOfLine() in WebPageMac.mm when determining the context while looking
up a dictionary definition. These symbols used to be exported for iOS
only, export them on the desktop too.
2013-05-24 Anders Carlsson <andersca@apple.com>
Remove PagePopup code
https://bugs.webkit.org/show_bug.cgi?id=116732
Reviewed by Andreas Kling.
Remove all page popup code.
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* dom/ContextFeatures.cpp:
* dom/ContextFeatures.h:
* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/DOMWindowPagePopup.cpp: Removed.
* page/DOMWindowPagePopup.h: Removed.
* page/DOMWindowPagePopup.idl: Removed.
* page/PagePopup.h: Removed.
* page/PagePopupClient.cpp: Removed.
* page/PagePopupClient.h: Removed.
* page/PagePopupController.cpp: Removed.
* page/PagePopupController.h: Removed.
* page/PagePopupController.idl: Removed.
* page/PagePopupDriver.h: Removed.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore):
* testing/Internals.h:
(WebCore):
(Internals):
* testing/Internals.idl:
* testing/MockPagePopupDriver.cpp: Removed.
* testing/MockPagePopupDriver.h: Removed.
2013-05-24 Jer Noble <jer.noble@apple.com>
Mac: Set the default audio buffer size to a large value for <video> elements.
https://bugs.webkit.org/show_bug.cgi?id=116342
Reviewed by Eric Carlson.
Roll-in rubber stamped by Eric Carlson.
To enable power savings by waking up the audio hardware less often, set the
requested buffer frame size to a large value, such as 4096. Since this results
in approximately 100ms worth of buffer, set the buffer size to a much lower
value when playing WebAudio, which is much more sensitive to latency than video
or audio elements.
Introduce a new class, AudioSessionManager, as well as a helper class,
AudioSessionManagerToken. Audio elements, video elements, and WebAudio destination
nodes will create and retain a token, and release the token in their destructor.
This allows the AudioSessionManager to track how many of what type of audio-
generating objects are in existence.
This requires implementing AudioSession for Mac platforms. Move the implementation
for retrieving the hardware sample rate and setting the buffer duration into
AudioSessionMac from AudioDestinationMac, to be shared with AudioSessionManagerMac.
Change the AudioSession method preferredBufferLength() into preferredBufferSize(),
as the callers really want to specify a buffer size, not a buffer duration. On iOS,
where the available API requires a duration, perform the conversion from duration to
size on behalf of the caller.
However, since the original version of this patch caused media test
failures on the Mac ML and Lion bots, only enable the buffer size
change for OS X > ML.
* html/HTMLMediaElement.h: Add a AudioSessionManagerToken member.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the token.
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
(WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength.
* platform/audio/AudioSession.h:
* platform/audio/AudioSessionManager.cpp:
(AudioSessionManagerToken::create): Simple factory method.
(AudioSessionManagerToken::AudioSessionManagerToken): Call AudioSessionManager::incrementCount().
(AudioSessionManagerToken::~AudioSessionManagerToken): Call AudioSessionManager::decrementCount().
(AudioSessionManager::sharedManager): Simple singleton method.
(AudioSessionManager::AudioSessionManager): Simple constructor.
(AudioSessionManager::has): Return whether the type is present.
(AudioSessionManager::incrementCount): Increment, then call updateSessionState()
(AudioSessionManager::decrementCount): Decrement, then call updateSessionState()
(AudioSessionManager::updateSessionState): Stub, does nothing.
* platform/audio/AudioSessionManager.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::configure): Call setPreferredBufferSize() instead of setPreferredBufferLength()
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
(WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestination::hardwareSampleRate): Call AudioSession::sampleRate().
(WebCore::AudioDestinationMac::AudioDestinationMac): Create the AudioSessionManagerToken.
(WebCore::AudioDestinationMac::configure): Do not set the buffer size (this is done in AudioSessionManagerMac).
* platform/audio/mac/AudioDestinationMac.h:
* platform/audio/mac/AudioSessionMac.cpp: Added.
(WebCore::defaultDevice): Added, returns the default audio device.
(WebCore::AudioSession::AudioSession): Simple constructor.
(WebCore::AudioSession::~AudioSession): Simple destructor.
(WebCore::AudioSession::category): Stub, unimplemented.
(WebCore::AudioSession::setCategory): Ditto.
(WebCore::AudioSession::categoryOverride): Ditto.
(WebCore::AudioSession::setCategoryOverride): Ditto.
(WebCore::AudioSession::numberOfOutputChannels): Ditto.
(WebCore::AudioSession::setActive): Ditto.
(WebCore::AudioSession::sampleRate): Use the HAL to return the default audio device sample rate.
(WebCore::AudioSession::preferredBufferSize): Return the current HAL setting.
(WebCore::AudioSession::setPreferredBufferSize): Set the buffer size.
* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState): Set the buffer size depending on what audio outputs are present.
* WebCore.xcodeproj/project.pbxproj: Add the new files to the project.
2013-05-24 Alberto Garcia <agarcia@igalia.com>
Path: upstream the missing bits from the BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=116658
Reviewed by Xan Lopez.
PathBlackBerry was upstreamed a while ago (r144612) but a few bits
were missing from the cross-platform code.
* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):
* platform/graphics/Path.h:
(Graphics):
(Path):
2013-05-24 Noam Rosenthal <noam@webkit.org>
WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
https://bugs.webkit.org/show_bug.cgi?id=115135
Reviewed by Antti Koivisto.
Issue is invoked when there is a visibility:hidden layer with a non-compositable
background image (e.g. a radial gradient).
The layer is treated as a no-contents layer because of its visibility, however
updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
with direct background-image compositing.
Fixed by returning early from updating directly composited contents for layers
with hidden contents.
Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::paintsChildren):
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2013-05-24 Robert Hogan <robert@webkit.org>
Refactor shouldAddBorderPaddingMargin()
https://bugs.webkit.org/show_bug.cgi?id=98803
Reviewed by Ryosuke Niwa.
Make this helper function less clever-stupid in its misguided sacrifice of intelligibility
for the sake of concision.
No new tests, refactoring.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::shouldAddBorderPaddingMargin):
(WebCore::inlineLogicalWidth):
2013-05-24 Xiaobo Wang <xiaobwang@blackberry.com>
[BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
https://bugs.webkit.org/show_bug.cgi?id=116654
Reviewed by Carlos Garcia Campos.
PR 331552.
Internally reviewed and amended by Arvid Nilsson.
No new tests, this patch is to fix DRT crashes in fast/canvas/webgl.
The instance of GraphicsContext3D has already been destroyed but
WebGLLayerWebKitThread is not aware of that. This is because compositor
layer of the WebGL graphics context was referenced outside the context.
So when destructing GraphicsContext3D the compositing layer was not
destructed.
Fix by setting m_webGLContext to 0 when destructing GrapthicsContext3D
after releasing the compositor layer, so that it won't be de-referenced
again later.
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
(WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
(WebCore::WebGLLayerWebKitThread::webGLContextDestroyed):
(WebCore):
* platform/graphics/blackberry/WebGLLayerWebKitThread.h:
(WebGLLayerWebKitThread):
2013-05-24 Andreas Kling <akling@apple.com>
Typing in Safari's unified field causes unnecessary web content repaints.
<http://webkit.org/b/116703>
Reviewed by Andy Estes.
Break out an alternate version of Page::markAllMatchesForText() that only counts the number of times
a string occurs in the page, but doesn't try to mark the occurrences.
This allows Safari to count matches for the 'Find "foo" on This Page' functionality in the unified
location bar without causing tile repaints.
* WebCore.exp.in:
* page/Page.h:
* page/Page.cpp:
(WebCore::Page::findMatchesForText):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::countFindMatches):
Renamed markAllMatchesForText() to findMatchesForText() and gave it a boolean parameter to control whether
matches should be marked or not. countFindMatches() is the new helper that doesn't mark.
2013-05-23 Beth Dakin <bdakin@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=116702
REGRESSION (r150399): Scrollbar missing for all overflow scroll
-and corresponding-
<rdar://problem/13963712>
Reviewed by Simon Fraser.
This was a silly copy-paste error.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
2013-05-23 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Build fails to link.
https://bugs.webkit.org/show_bug.cgi?id=116671
Reviewed by Brent Fulgham.
* page/FrameView.h: Added guard for ACCELERATED_COMPOSITING.
2013-05-23 Roger Fong <roger_fong@apple.com>
Unreviewed. Modify WebCore for AppleWin 2010 production build.
* WebCore.vcxproj/WebCoreGenerated.make:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2013-05-23 Yongjun Zhang <yongjun_zhang@apple.com>
We need to clear main resource when detaching DocumentLoader from the frame.
https://bugs.webkit.org/show_bug.cgi?id=116680
Normally, when we detach the documentLoader in DocumentLoader::detachFromFrame, main resource is also cleared
in stopLoading(). There is possibility that main resource not being cleared, and this could cause crash later
since docLoader could still receive resource callbacks. To avoid that, we can remove docLoader from main resource's
client set in detachFromFrame.
Reviewed by Brady Eidson.
No new tests, this doesn't happen on OS X.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::detachFromFrame):
(WebCore::DocumentLoader::clearMainResource):
* loader/cache/CachedResource.h: make hasClient accessible publicly.
(WebCore::CachedResource::hasClient):
(CachedResource):
2013-05-23 Mihai Maerean <mmaerean@adobe.com>
assertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
https://bugs.webkit.org/show_bug.cgi?id=116614
Reviewed by David Hyatt.
Add a test for flow threads so they don't end up being cloned in region based multi columns with columns:1 where
the only child has column-span:all.
Test: fast/multicol/newmulticol/direct-child-column-span-all.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
2013-05-23 Anders Carlsson <andersca@apple.com>
Crash in convertMainResourceLoadToDownload when downloading file by option-return
https://bugs.webkit.org/show_bug.cgi?id=116451
Reviewed by Andreas Kling.
Handle MainResourceLoader being null here which will happen when loading a cached main resource.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):
2013-05-23 Benjamin Poulain <bpoulain@apple.com>
KURL::createCFURL() should return a RetainPtr<CFURLRef>
https://bugs.webkit.org/show_bug.cgi?id=116644
Reviewed by Andreas Kling.
For consistency with the other createCFType() APIs in WebKit, KURL should
return a RetainPtr<> instead of raw +1 CFURLRef.
No leak were discovered while making this change.
* platform/KURL.h:
* platform/cf/KURLCFNet.cpp:
(WebCore):
(WebCore::createCFURLFromBuffer):
(WebCore::KURL::createCFURL):
(WebCore::KURL::fileSystemPath):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createAssetForURL):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setURLForRect):
* platform/mac/KURLMac.mm:
(WebCore):
(WebCore::KURL::operator NSURL *):
(WebCore::KURL::createCFURL):
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
* platform/network/cf/ProxyServerCFNet.cpp:
(WebCore::addProxyServersForURL):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
2013-05-18 Robert Hogan <robert@webkit.org>
The ellipsis in a text overflow should not avoid floats
https://bugs.webkit.org/show_bug.cgi?id=115746
Reviewed by David Hyatt.
When placing an ellipsis for text overflow we shouldn't avoid any floats on the line.
That is to say, if there is a float in the box we overflow we should let our no-wrap text,
including the ellipsis, render inside the float just as we would if overflow was hidden but
a text-overflow rendering had not been specified.
Test: fast/css/text-overflow-ellipsis-behind-floats.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkLinesForTextOverflow):
2013-05-23 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, rolling out r150586.
http://trac.webkit.org/changeset/150586
https://bugs.webkit.org/show_bug.cgi?id=116660
Those constructors should be exposed on the WorkerContext, not
the DOMWindow
* fileapi/FileReaderSync.idl:
* workers/WorkerLocation.idl:
2013-05-23 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation
https://bugs.webkit.org/show_bug.cgi?id=116660
Reviewed by Kentaro Hara.
Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation to match their
respective specifications:
- http://dev.w3.org/2006/webapi/FileAPI/#FileReaderSync
- http://dev.w3.org/html5/workers/#workerlocation
No new tests, covered by existing tests.
* fileapi/FileReaderSync.idl:
* workers/WorkerLocation.idl:
2013-05-23 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove special case for MessagePortArray from bindings generator
https://bugs.webkit.org/show_bug.cgi?id=116653
Reviewed by Kentaro Hara.
Use MessagePort[] instead of MessagePortArray type in the IDL as MessagePortArray
is not defined on IDL side. This allows us to remove the special case for
MessagePortArray from the bindings generator.
No new tests, no behavior change.
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::JSMessageEvent::data):
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Remove special case for MessagePortArray.
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
(WebDOMTestSerializedScriptValueInterface):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_get_property):
(webkit_dom_test_serialized_script_value_interface_class_init):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::jsTestSerializedScriptValueInterfacePorts):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl: Replace MessagePortArray
by MessagePort[].
* dom/MessageEvent.h:
(WebCore::MessageEvent::ports): The method should return a Vector, not a Vector*
as the array on JavaScript side is not nullable.
* dom/MessageEvent.idl: Replace MessagePortArray by MessagePort[].
2013-05-23 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL] Back, Forward and Stop should be hidden in context menu
https://bugs.webkit.org/show_bug.cgi?id=116615
Reviewed by Christophe Dumez.
Context menu items: Back, Forward, Stop, Reload, should be shown only when
they are able to perform action.
No new tests - no new functionality.
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
2013-05-22 Dean Jackson <dino@apple.com>
Rolling out r150555. It borked about 30 media tests.
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
* html/HTMLMediaElement.h:
* platform/audio/AudioSession.cpp:
(WebCore):
(WebCore::AudioSession::AudioSession):
(WebCore::AudioSession::preferredBufferDuration):
(WebCore::AudioSession::setPreferredBufferDuration):
* platform/audio/AudioSession.h:
* platform/audio/AudioSessionListener.h:
(AudioSessionListener):
* platform/audio/AudioSessionManager.cpp: Removed.
* platform/audio/AudioSessionManager.h: Removed.
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::configure):
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::preferredBufferDuration):
(WebCore::AudioSession::setPreferredBufferDuration):
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestination::hardwareSampleRate):
(WebCore::AudioDestinationMac::AudioDestinationMac):
(WebCore::AudioDestinationMac::configure):
* platform/audio/mac/AudioDestinationMac.h:
(AudioDestinationMac):
* platform/audio/mac/AudioSessionMac.cpp: Removed.
* platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
2013-05-20 Jeffrey Pfau <jpfau@apple.com>
Active DOM object resumption should match reason for suspending
https://bugs.webkit.org/show_bug.cgi?id=116476
Add a reason to the arguments for resuming active DOM object and
scheduled tasks and ensure that it matches the suspend reason before
actually resuming the objects.
Reviewed by Joseph Pecoraro.
No new tests, no change in functionality.
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused): Add matching resume reason
* dom/Document.cpp:
(WebCore::Document::resumeActiveDOMObjects): Check for matching resume reason
(WebCore::Document::resumeScheduledTasks): Check for matching resume reason
* dom/Document.h:
(Document):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Check for matching resume reason
* dom/ScriptExecutionContext.h:
(ScriptExecutionContext):
(WebCore::ScriptExecutionContext::reasonForSuspendingActiveDOMObjects): Expose suspend reason to subclasses
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore): Add matching resume reason
* page/Frame.cpp:
(WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Add matching resume reason
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): Add matching resume reason
2013-05-22 Dean Jackson <dino@apple.com>
Don't snapshot plugins that can't be snapshotted
https://bugs.webkit.org/show_bug.cgi?id=116490
Reviewed by Tim Horton.
Some plugins, such as QuickTime, don't support snapshotting. We're
planning on another way to capture snapshots, but in the meantime make
sure that they don't fail to initialise because they were told to
not use accelerated rendering.
* WebCore.exp.in: Export restartSnapshottedPlugin so that it can be used from WK2.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Don't set the play state before restarting.
(WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Make sure we indicated that this snapshotted plugin was clicked.
* html/HTMLPlugInImageElement.h: Move restartSnapshottedPlugin from protected to public.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::handleEvent): Don't set play state here. Let the restart functions do it.
2013-05-22 Max Vujovic <mvujovic@adobe.com>
[CSS Shaders] valueForCustomFilterTransformParameter should check that renderer is a RenderBox
https://bugs.webkit.org/show_bug.cgi?id=116464
Reviewed by Alexandru Chiculita.
If the renderer is not a RenderBox, we just use a zero size to compute the transform,
like in CSSComputedStyleDeclaration::computedTransform.
Test: css3/filters/custom/custom-filter-crash-inline-computed-style.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForCustomFilterTransformParameter):
2013-05-22 Simon Fraser <simon.fraser@apple.com>
Fix assertion in the getComputedStyle-background-shorthand.html test
https://bugs.webkit.org/show_bug.cgi?id=116639
Reviewed by Ryosuke Niwa.
getComputedStyle-background-shorthand.html was asserting under the newly added
code in willBeRemovedFromTree(). The assertion was caused by too many calls to
FrameView::removeSlowRepaintObject(), which happened because we called it for
RenderTexts, which share style with their parent renderer.
RenderText overrides styleWillChange() to do nothing, so we never
call add/removeSlowRepaintObject() for them. Thus we should also skip this
work in willBeRemovedFromTree() for RenderTexts.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeRemovedFromTree):
2013-05-22 Bem Jones-Bey <bjonesbe@adobe.com>
Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
https://bugs.webkit.org/show_bug.cgi?id=116626
Reviewed by David Hyatt.
This is a port of a Blink bug fix by Emil Eklund.
Account for saturated estimated position in RenderBlock::layoutBlockChild.
If the estimated top position is saturated the comparison with oldLogicalTop
might yield a false negative as adding and removing margins, borders etc from
a saturated number might yield incorrect results. If this is the case always
mark for layout.
Minimal test case impractical. See bug for raw fuzzer test case.
* platform/LayoutUnit.h:
(WebCore::LayoutUnit::mightBeSaturated): Add helper method for checking whether
a number might be saturated.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChild): Check if logicalTopEstimate is likely
to be saturated and if so mark for layout.
2013-05-22 Benjamin Poulain <benjamin@webkit.org>
Remove CSSPropertySourceData emptyCSSPropertySourceData
https://bugs.webkit.org/show_bug.cgi?id=116517
Reviewed by Darin Adler.
This was added for chromium and does not seem to be used
anywhere anymore.
* css/CSSParser.cpp:
(WebCore::CSSParser::CSSParser):
* css/CSSPropertySourceData.cpp:
* css/CSSPropertySourceData.h:
2013-05-22 Csaba Osztrogonác <ossy@webkit.org>
Buildfix for !ENABLE(FULLSCREEN_API) platforms.
Rubber-stamped by Ryosuke Niwa.
* rendering/RenderInline.cpp: Missing #if guard added.
(WebCore::RenderInline::splitInlines):
2013-05-22 Ryosuke Niwa <rniwa@webkit.org>
Fix a typo in 150469.
* editing/Editor.cpp:
(WebCore::dispatchEditableContentChangedEvents):
2013-05-22 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION: ASSERTION FAILED: obj->isRenderInline() || obj == this, Bad cast in WebCore::RenderBlock::createLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=110622
Reviewed by David Hyatt.
Merge https://chromium.googlesource.com/chromium/blink/+/998ad358eed702b873dd54697b3fa3f952e0feb7
Inserting an element before the fullscreened element could crash if it caused a containing inline to be split,
since the splitting logic doesn't expect the fullscreened element to be wrapped in a RenderFullScreen. This patch changes
inline splitting to be aware of RenderFullScreen.
Test: fullscreen/full-screen-inline-split-crash.html
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):
2013-05-22 Simon Fraser <simon.fraser@apple.com>
Fix issues with focus rings on search fields
https://bugs.webkit.org/show_bug.cgi?id=116591
Reviewed by Darin Adler.
On a future OS, the rect returned by _focusRingVisibleRect should
be in the coordinate system of the that NSView, not the base
coordinate system, so fix the code that sets and reads the global
focusRingClipRect variable accordingly.
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents):
* platform/mac/ThemeMac.mm:
(-[WebCoreFlippedView _focusRingVisibleRect]):
2013-05-22 Simon Fraser <simon.fraser@apple.com>
New Flickr doesn't get fast scrolling but should
https://bugs.webkit.org/show_bug.cgi?id=116514
Reviewed by Darin Adler.
RenderObject increments and decrements a counter of slow repaint objects on
FrameView when it sees style changes related to background-attachment:fixed.
However, it omitted to decrement the count when a renderer with a fixed background
was destroyed.
This caused Flickr to never fall into fast scrolling mode, since it toggled
display:none on an element with a fixed background during loading, then removed
the fixed background.
Did some minor cleanup of #ENABLE(FAST_MOBILE_SCROLLING) crap.
Tests: platform/mac-wk2/tiled-drawing/slow-scrolling-background-toggle.html
platform/mac-wk2/tiled-drawing/slow-scrolling-hidden-background-toggle.html
platform/mac-wk2/tiled-drawing/slow-scrolling.html
* rendering/RenderObject.cpp:
(WebCore::shouldRepaintFixedBackgroundsOnScroll):
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::willBeRemovedFromTree):
2013-05-22 Robert Hogan <robert@webkit.org>
Need to Remove Anonymous Wrappers When All Children Become Inline
https://bugs.webkit.org/show_bug.cgi?id=115687
Reviewed by David Hyatt.
Remove a simple subset of anonymous wrappers, i.e. anonymous blocks without continuations,
when a block becoming float or positioned removes the need for them.
Test: fast/block/remove-anonymous-wrappers-when-element-changes-to-float-or-positioned.html
* rendering/RenderBlock.h:
(RenderBlock):
* rendering/RenderObject.cpp:
(WebCore):
(WebCore::RenderObject::removeAnonymousWrappersFromLineIfNecessary):
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::styleDidChange):
* rendering/RenderObject.h:
(RenderObject):
2013-05-22 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
[css] Update ETextDecorations enum to TextDecorations
https://bugs.webkit.org/show_bug.cgi?id=116581
Reviewed by Andreas Kling.
Currently, ETextDecorations enum uses a C-like coding style for its
enumeration values, as well as a 'E' prefix that surely had some meaning
in the past, but not nowadays.
No behavior changes, covered by existing tests.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::hasPlainText):
(WebCore::AccessibilityRenderObject::hasUnderline):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(AXAttributeStringSetStyle):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetStyle):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationFlagsToCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator TextDecoration):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyTextDecoration::applyValue):
(WebCore::ApplyPropertyTextDecoration::createHandler):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontAttributesForSelectionStart):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintDecoration):
* rendering/InlineTextBox.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getTextDecorationColors):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
(WebCore::operator|):
(WebCore::operator|=):
* rendering/style/StyleVisualData.h:
(StyleVisualData):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
(WebCore::positionOffsetForDecoration):
(WebCore::thicknessForDecoration):
(WebCore::findRenderObjectDefininingTextDecoration):
(WebCore::SVGInlineTextBox::paintDecoration):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
* rendering/svg/SVGInlineTextBox.h:
2013-05-22 Lori Anderson <lori@rkymtnhi.com>
[GStreamer] Allow multiple log levels in media player
https://bugs.webkit.org/show_bug.cgi?id=116618
Reviewed by Philippe Normand.
No new tests, just changing logging.
* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::pause):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::setRate):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2013-05-22 Beth Dakin <bdakin@apple.com>
The LayoutMilestones didLayout callback sometimes fires with a milestone value of 0
https://bugs.webkit.org/show_bug.cgi?id=116623
Reviewed by Geoffrey Garen.
Make sure we have actually achieved some milestones before calling didLayout().
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-05-22 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Reimplement atk_text_get_text_*_offset for CHAR boundary
https://bugs.webkit.org/show_bug.cgi?id=114870
Reviewed by Martin Robinson.
Re-implement this functions without using GailTextUtil nor Pango.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetChar): New function.
(webkitAccessibleTextGetTextForOffset): Call the new function for CHAR.
2013-05-22 Antoine Quint <graouts@apple.com>
[Mac] Captions menu isn't internationalized, doesn't use rtl layout for rtl languages
https://bugs.webkit.org/show_bug.cgi?id=116605
Reviewed by Eric Carlson.
Ensure that rtl languages are properly recognized by the captions menu such that text
layout and alignment is natural.
* css/mediaControls.css:
(::-webkit-media-controls):
Remove the forced "direction: ltr" property which was forcing all layout to be
left-to-right.
* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-track-list):
Remove the forced "text-align: left" property which was forcing all caption
titles to be left-aligned.
(video::-webkit-media-controls-closed-captions-track-list h3):
Use "-webkit-margin-start" instead of "padding-left" to position the heading
such that it adds the margin on the left for ltr languages and on the right
for rtl languages.
(video::-webkit-media-controls-closed-captions-track-list li):
Set "position: relative" such that the ::before pseudo-class can use "position: absolute"
to position itself relative to the caption title rather than the list element.
(video::-webkit-media-controls-closed-captions-track-list li.selected::before):
(video::-webkit-media-controls-closed-captions-track-list li.selected:hover::before):
Make the checkmarks a ::before pseudo-class rather than a background-image such that
we may control its positioning using the internationlization-friendly "-webkit-margin-start"
property.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsContainerElement::create):
Set the "dir" attribute to "auto" such that rtl languages are correctly handled. This
means that the first string displayed within the captions container, currently the
"Subtitles" <h3> element, defines the direction for the whole container. It is therefore
crucial that this string is properly localized in rtl languages as falling back to
english would mean the entire caption container is using ltr.
2013-05-22 Hugo Parente Lima <hugo.lima@openbossa.org>
WebCore fails to compile with -Werror=maybe-uninitialized on GCC 4.8.0
https://bugs.webkit.org/show_bug.cgi?id=116340
Reviewed by Christophe Dumez.
No new tests, just a simple build fix.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem): Init frame variable.
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): Init frame variable.
2013-05-22 Christophe Dumez <ch.dumez@sisa.samsung.com>
Have IDL interface names match their global constructor
https://bugs.webkit.org/show_bug.cgi?id=116520
Reviewed by Kentaro Hara.
Have IDL interface names match their global constructor name on DOMWindow.idl
using [InterfaceName] extended attribute. This affects in particular webkit
prefixed constructors. This is mandated by Web IDL specification:
http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
As a consequence, we can now get rid of [NoInterfaceObject] extended attribute
for those interfaces and have their global constructors automatically generated
by the bindings generator.
No new tests, no behavior change for layout tests.
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/speech/SpeechGrammar.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionError.idl:
* Modules/speech/SpeechRecognitionEvent.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/PannerNode.idl:
* dom/ShadowRoot.idl:
* page/DOMWindow.idl:
2013-05-21 Mihai Tica <mitica@adobe.com>
Update the background blending implementation to match the changes done
in the spec. This implies that background color blending is removed and
the background layers won't blend with the content behind the element
any more.
https://bugs.webkit.org/show_bug.cgi?id=116212
Reviewed by Dean Jackson.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintFillLayers):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
2013-05-21 Ryosuke Niwa <rniwa@webkit.org>
Use-after-free in DOMSelection::containsNode
https://bugs.webkit.org/show_bug.cgi?id=116468
Reviewed by Andreas Kling.
Retain the node pointer. Also bail out early if the node was not in the document
since Range::compareBoundaryPoints sets ec to WRONG_DOCUMENT_ERR otherwise.
Test: editing/selection/contains-node-crash.html
* page/DOMSelection.cpp:
(WebCore::DOMSelection::containsNode):
* page/DOMSelection.h:
(DOMSelection):
2013-05-21 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: InspectorFrontendHost::loadResourceSynchronously() builds ASCII-only results
https://bugs.webkit.org/show_bug.cgi?id=116569
Merge: https://chromium.googlesource.com/chromium/blink/+/7f1cfecfe34f4dbc6ce1ef0250b13f2058128eeb
Reviewed by Timothy Hatcher.
Test: inspector/load-resource-synchronously-utf8.html
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
2013-05-21 Andy Estes <aestes@apple.com>
Allow session storage for third-party origins even if third-party data access is blocked.
https://bugs.webkit.org/show_bug.cgi?id=116532
Reviewed by Anders Carlsson.
In http://trac.webkit.org/changeset/149326 we relaxed our policy for
localStorage when third-party data blocking is enabled to create a
transient, session-scoped storage area for the third-party origin
instead of throwing an exception. Since this gives essentially the same
behavior as sessionStorage, we might as well also allow sessionStorage
for third-party origins.
Test: http/tests/security/cross-origin-session-storage-third-party-blocked.html
* WebCore.exp.in: Updated the symbol for
SecurityOrigin::canAccessStorage.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage): Called canAccessSessionStorage()
rather than canAccessLocalStorage().
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccessStorage): Passed in an enum
indicating if access should be allowed from third-party origins.
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::canAccessSessionStorage): Called
canAccessStorage() with AlwaysAllowFromThirdParty.
(SecurityOrigin):
2013-05-21 Hugo Parente Lima <hugo.lima@openbossa.org>
[EFL] Add missing #if guards on drag support methods
https://bugs.webkit.org/show_bug.cgi?id=116574
Reviewed by Christophe Dumez.
* platform/efl/PasteboardEfl.cpp:
(WebCore):
2013-05-21 Antti Koivisto <antti@apple.com>
Remove stub HTMLContentElement
https://bugs.webkit.org/show_bug.cgi?id=116580
Reviewed by Andreas Kling.
Inherit DetailsContentElement and DetailsSummaryElement directly from InsertionPoint instead.
* html/HTMLDetailsElement.cpp:
(WebCore::DetailsContentElement::DetailsContentElement):
(WebCore::DetailsSummaryElement::DetailsSummaryElement):
* html/HTMLSummaryElement.cpp:
(WebCore::SummaryContentElement::SummaryContentElement):
* html/shadow/HTMLContentElement.cpp:
(WebCore::HTMLContentElement::contentTagName):
* html/shadow/HTMLContentElement.h:
(WebCore::isHTMLContentElement):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::setResetStyleInheritance):
* html/shadow/InsertionPoint.h:
Also remove some leftover selector code.
(WebCore::InsertionPoint::insertionPointType):
2013-05-21 Andreas Kling <akling@apple.com>
Robustify repaint of previous caret node when moving FrameSelection.
<http://webkit.org/b/116558>
Reviewed by Ryosuke Niwa.
As a follow-up to r150396, also repaint the caret rects if the previous node is contenteditable.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):
2013-05-21 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed build fix after r150469. We need to bail out here when DOM is mutated by an event listener such that
the split text nodes no longer exist right next to each other.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
2013-05-21 Antti Koivisto <antti@apple.com>
Remove ScopeContentDistribution
https://bugs.webkit.org/show_bug.cgi?id=116576
Reviewed by Andreas Kling.
With maximum one ShadowRoot per Element this can be smashed into ContentDistributor.
* dom/ShadowRoot.cpp:
(WebCore):
* dom/ShadowRoot.h:
(WebCore):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ContentDistributor):
(WebCore):
(WebCore::ContentDistributor::~ContentDistributor):
(WebCore::ContentDistributor::invalidateInsertionPointList):
(WebCore::ContentDistributor::ensureInsertionPointList):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
* html/shadow/ContentDistributor.h:
(WebCore):
(ContentDistributor):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
Simplify insertion point list invalidation.
* html/shadow/InsertionPoint.h:
2013-05-21 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Exclusions] Multiple regions with shape-insides should respect positioned shapes and overflow
https://bugs.webkit.org/show_bug.cgi?id=115001
Reviewed by David Hyatt.
In r150375 I implemented the new overflow behavior for shape-inside on regions, but it covered only the simple cases
when you had only one region. This patch adds support for the new overflow behavior for multiple regions with multiple
positioned shape-insides and overflow.
Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-multiple-shapes.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-multiple-shapes.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Cover cases when content flows into the next region, update the
line segments for the overflow.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): In flow thread case we don't want to adjust the height
in two places.
2013-05-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r150425.
http://trac.webkit.org/changeset/150425
https://bugs.webkit.org/show_bug.cgi?id=116573
Not the right fix for WebKit2 (Requested by rniwa on #webkit).
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
2013-05-20 Ryosuke Niwa <rniwa@webkit.org>
dispatchEvent call can execute javascript and blow away endRoot from underneath
https://bugs.webkit.org/show_bug.cgi?id=116483
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/798cba0af9b2aff21e475e2e08ea3ca5e97dfc2c.
Test: editing/undo/undo-after-event-edited.html
* editing/Editor.cpp:
(WebCore::dispatchEditableContentChangedEvents):
2013-05-21 Antti Koivisto <antti@apple.com>
Remove ContentDistribution
https://bugs.webkit.org/show_bug.cgi?id=116527
Reviewed by Andreas Kling.
Resolving distribution on traversal is simpler.
* WebCore.exp.in:
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseNode):
(WebCore::ComposedShadowTreeWalker::traverseDistributedNodes):
(WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
* html/HTMLDetailsElement.cpp:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distributeSelectionsTo):
* html/shadow/ContentDistributor.h:
* html/shadow/HTMLContentElement.idl:
Remove getDistributedNodes().
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::InsertionPoint):
(WebCore::InsertionPoint::attach):
(WebCore::InsertionPoint::detach):
(WebCore):
(WebCore::InsertionPoint::firstDistributed):
(WebCore::InsertionPoint::lastDistributed):
(WebCore::InsertionPoint::nextDistributedTo):
(WebCore::InsertionPoint::previousDistributedTo):
Rename for clarity.
* html/shadow/InsertionPoint.h:
(WebCore::InsertionPoint::hasDistribution):
(WebCore::InsertionPoint::setHasDistribution):
(WebCore::InsertionPoint::clearDistribution):
(WebCore::InsertionPoint::matchTypeFor):
(InsertionPoint):
2013-05-21 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Add support for building WebKit2
https://bugs.webkit.org/show_bug.cgi?id=116372
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Add missing source files, include directories, and WebP properties.
2013-05-21 Jer Noble <jer.noble@apple.com>
REGRESSION(r101810): Media controls status text missing for live-stream videos.
https://bugs.webkit.org/show_bug.cgi?id=116547
Reviewed by Eric Carlson.
Un-reverse the logic in loadedMetadata() so that the status text isn't
hidden (when it should be shown) for live-stream videos.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::loadedMetadata):
2013-05-21 Jer Noble <jer.noble@apple.com>
Implement overlap-avoidance for in-band text track cues.
https://bugs.webkit.org/show_bug.cgi?id=116540
Reviewed by Eric Carlson.
In-band (or Generic) cues need special casing for certain features
present in in-band tracks, like paint-on and roll-up modes. To avoid
the problem of overlap avoidance forcing a caption meant to appear
below a cue to appear above it when a larger font size is selected,
impose an additional sort ordering for "generic cues". Instead of
cues being ordered by the order they appear in the track, "generic
cues" further sorted by their position within the video area, such
that cues at the bottom of the video area appear first, and later
cues are pushed up to avoid them, preserving the desired apparent
ordering.
* html/HTMLMediaElement.cpp:
(WebCore::compareCueInterval): Added; wrapper around
TextTrackCue::isOrderedBefore.
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
After creating the list of current cues, sort them.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::isOrderedBefore): Added; implementation moved
from TextTrackCueList::add().
* html/track/TextTrackCue.h:
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGeneric::isOrderedBefore): Added override;
impose additional oredring on generic cues.
* html/track/TextTrackCueGeneric.h:
* html/track/TextTrackCueList.cpp:
(WebCore::TextTrackCueList::add): Moved ordering test into
isOrderedBefore().
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::repositionGenericCue):
Call repositionCueSnapToLinesNotSet() after positioning the cue.
2013-05-20 Jer Noble <jer.noble@apple.com>
Implement overlap avoidance for cues with snap-to-lines flag not set
https://bugs.webkit.org/show_bug.cgi?id=84296
Reviewed by Eric Carlson.
Test: media/track/track-cue-overlap-snap-to-lines-not-set.html
Support overlap avoidance for the non-snap-to-lines part of the WebVTT spec.
* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::isOutside): Split implementation into rectIsWithinContainer().
(WebCore::RenderTextTrackCue::rectIsWithinContainer): Ditto.
(WebCore::RenderTextTrackCue::isOverlapping): Split into overlappingObject() and overlappingObjectForRect().
(WebCore::RenderTextTrackCue::overlappingObject): Ditto.
(WebCore::RenderTextTrackCue::overlappingObjectForRect): Ditto.
(WebCore::RenderTextTrackCue::moveIfNecessaryToKeepWithinContainer): Added.
(WebCore::RenderTextTrackCue::findNonOverlappingPosition): When an overlapping object is found, move the
cue to just above or below that object and try again.
(WebCore::RenderTextTrackCue::repositionCueSnapToLinesSet): Move implementation into moveIfNecessaryToKeepWithinContainer().
(WebCore::RenderTextTrackCue::repositionCueSnapToLinesNotSet): Add implementanton based on above.
* rendering/RenderTextTrackCue.h:
2013-05-21 Alberto Garcia <agarcia@igalia.com>
Remove GraphicsLayerClient::contentsVisible()
https://bugs.webkit.org/show_bug.cgi?id=116523
Reviewed by Darin Adler.
This is dead code from the BlackBerry port.
* platform/graphics/GraphicsLayerClient.h:
* rendering/RenderLayerBacking.cpp:
2013-05-21 Zan Dobersek <zdobersek@igalia.com>
PLATFORM(*) macros used in Source/WebCore/loader/archive/ArchiveFactory.cpp
https://bugs.webkit.org/show_bug.cgi?id=116453
Reviewed by Alexey Proskuryakov.
* loader/archive/ArchiveFactory.cpp: Remove a redundant PLATFORM(QT) macro when checking whether
to include the LegacyWebArchive.h header that's specific to the WebArchive support. The Qt port
does not enable the WebArchive feature at all (which is enabled only on AppleMac, AppleWin and iOS
platforms) so there's no reason to additionally condition the header include with building on
non-Qt platforms.
2013-05-21 Alberto Garcia <agarcia@igalia.com>
Add BlackBerry definition of NativeImagePtr
https://bugs.webkit.org/show_bug.cgi?id=116526
Reviewed by Darin Adler.
* platform/graphics/NativeImagePtr.h:
(Graphics):
(WebCore):
2013-05-21 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] FontCache::getFontDataForCharacters() returns nullptr
https://bugs.webkit.org/show_bug.cgi?id=116529
Reviewed by Andreas Kling.
This cannot be converted to a PassRefPtr and breaks the build.
* platform/graphics/blackberry/FontCacheBlackBerry.cpp:
(WebCore::FontCache::getFontDataForCharacters):
2013-05-21 Iago Toral Quiroga <itoral@igalia.com>
[GTK] Always use EGL to create the GL context when running on Wayland
https://bugs.webkit.org/show_bug.cgi?id=115721
Reviewed by Martin Robinson.
* platform/graphics/cairo/GLContext.cpp:
(WebCore::GLContext::createContextForWindow):
(WebCore::GLContext::createOffscreenContext): Always use EGL to create the GL context
instead of GLX when running on Wayland and make createOffScreenContext reuse the code
in createContextWindow.
2013-05-21 Alberto Garcia <agarcia@igalia.com>
Add FloatRect::normalized() for BlackBerry
https://bugs.webkit.org/show_bug.cgi?id=116531
Reviewed by Carlos Garcia Campos.
This was added to FloatRectBlackBerry.cpp in r111072 when the
graphics platform code was upstreamed, but this change was
missing.
* platform/graphics/FloatRect.h:
(FloatRect):
2013-05-21 Balazs Kelemen <kbalazs@webkit.org>
[GStreamer] cleanup duration query
https://bugs.webkit.org/show_bug.cgi?id=116228
Reviewed by Philippe Normand.
Covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::duration):
We can also cache the duration here if the query succeeds.
(MediaPlayerPrivateGStreamer::updateStates):
Don't query when we are in GST_STATE_READY state because it never succeeds.
Do it instead when we reached a stable state.
(MediaPlayerPrivateGStreamer::cacheDuration): Return early if it is already
cached. Recaching is not necessary and now we call it a lot of times.
Only look into the state if the query failed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer): Made m_mediaDuration mutable to be
able to cache it in duration(). Internal cached values is one of
the sensible uses of mutable.
2013-05-21 Patrick Gansterer <paroga@webkit.org>
Build fix for !USE(ACCELERATED_COMPOSITING) after r150307.
* rendering/RenderLayerCompositor.h: Added missing #if USE(ACCELERATED_COMPOSITING).
2013-05-20 Antti Koivisto <antti@apple.com>
Simplify Shadow DOM distribution code
https://bugs.webkit.org/show_bug.cgi?id=116454
Reviewed by Andreas Kling.
Remove code supporting nested insertion points and distributing to multiple insertion points.
* html/HTMLDetailsElement.cpp:
(DetailsContentElement):
Make distribution to <details> and <summary> mutually exclusive.
* html/shadow/ContentDistributor.cpp:
(WebCore):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
(WebCore::ContentDistributor::distributeSelectionsTo):
* html/shadow/ContentDistributor.h:
* html/shadow/InsertionPoint.cpp:
(WebCore::resolveReprojection):
2013-05-21 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Constrain auto-height region computation in a different way
https://bugs.webkit.org/show_bug.cgi?id=116310
Reviewed by Alexandru Chiculita.
After https://bugs.webkit.org/show_bug.cgi?id=74132, the region is a render block. We can use RenderBox::constrainContentBoxLogicalHeightByMinMax
instead of RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight to better reflect the fact that the region is not a replaced element.
Covered by existing regions tests, since when replaced-based the region had an intrinsic height of 0 and now, block-based, it does not have any children.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addForcedRegionBreak):
2013-05-21 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r150393): editing/inserting/typing-at-end-of-line.html fails
https://bugs.webkit.org/show_bug.cgi?id=116516
Reviewed by Antti Koivisto.
The bug was caused by DRT not resetting various auto correction states.
Do that in Internals::resetToConsistentState.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
2013-05-20 Zan Dobersek <zdobersek@igalia.com>
[GTK] Fix concatenations of string literals that are not C++11-compliant
https://bugs.webkit.org/show_bug.cgi?id=116449
Reviewed by Martin Robinson.
Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
is simply a matter of separating the string and the string literal that are being concatenated with a space.
* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
* platform/gtk/FileSystemGtk.cpp:
(WebCore::sharedResourcesPath):
2013-05-20 Zan Dobersek <zdobersek@igalia.com>
[GTK] Support application/x-mimearchive mimetype for MHTML archives instead of message/rfc822
https://bugs.webkit.org/show_bug.cgi?id=116442
Reviewed by Martin Robinson.
* loader/archive/ArchiveFactory.cpp:
(WebCore::archiveMIMETypes): Like EFL and Qt, register the application/x-mimearchive mime type as a MHTML archive type
and stop propagating the message/rfc822 mime type as such. This also removes a couple of PLATFORM ifdefs.
2013-05-20 Benjamin Poulain <bpoulain@apple.com>
Minor String fixes in CSS
https://bugs.webkit.org/show_bug.cgi?id=116291
Reviewed by Darin Adler.
Some trival changes to make up for a bad day :)
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::customCssText):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customCssText):
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::cssText):
* css/CSSInheritedValue.cpp:
(WebCore::CSSInheritedValue::customCssText):
* css/CSSInitialValue.cpp:
(WebCore::CSSInitialValue::customCssText):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::customCssText):
* css/CSSPropertySourceData.cpp:
(WebCore::CSSPropertySourceData::toString):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::generateSelectorText):
* css/CSSStyleSheet.h:
(WebCore::CSSStyleSheet::type):
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSLinearTimingFunctionValue::customCssText):
(WebCore::CSSCubicBezierTimingFunctionValue::customCssText):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::customCssText):
(WebCore::CSSValueList::customSerializeResolvingVariables):
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExp::serialize):
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::customCssText):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
(WebCore::WebKitCSSKeyframesRule::cssText):
* css/WebKitCSSMatFunctionValue.cpp:
(WebCore::WebKitCSSMatFunctionValue::customCssText):
* css/WebKitCSSMixFunctionValue.cpp:
(WebCore::WebKitCSSMixFunctionValue::customCssText):
2013-05-20 Ryosuke Niwa <rniwa@webkit.org>
Null pointer deference in WebCore::AppendNodeCommand::create
https://bugs.webkit.org/show_bug.cgi?id=116479
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/5cb43002a44f67a60ecf5a7ed76de2d0bcf89eb2
DeleteSelection::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss() make style and link elements
to be the direct children of the editable root. However, these style and link elements are not necessary editable
and WebKit crashes when they are not.
Test: editing/deleting/delete-uneditable-style.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
2013-05-20 Beth Dakin <bdakin@apple.com>
Scrollbars still show sometimes even when WKPageSetSuppressScrollbarAnimations()
is set
https://bugs.webkit.org/show_bug.cgi?id=116493
-and corresponding-
<rdar://problem/13912871>
Reviewed by Dean Jackson.
We need to be more aggressive with our approach since AppKit may still ask the
scrollbars to paint here.
scrollbarAnimationsAreSuppressed() will allow us to find out if the setting has
been set.
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarAnimationsAreSuppressed):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::scrollbarAnimationsAreSuppressed):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollbarAnimationsAreSuppressed):
* rendering/RenderListBox.h:
Don’t allow animations if scrollbars are suppressed.
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
Call cancelAnimations() to prevent a just-started animation from continuing.
(WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):
2013-05-20 Andreas Kling <akling@apple.com>
Avoid caret repaints if we're not showing carets anyway.
<http://webkit.org/b/116489>
Reviewed by Simon Fraser.
When moving the selection, check if we're inside a contenteditable element (or in caret browsing mode)
before repainting the caret's previous location.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::recomputeCaretRect):
2013-05-20 Simon Fraser <simon.fraser@apple.com>
position:sticky should stick for the enclosing overflow ancestor
https://bugs.webkit.org/show_bug.cgi?id=100054
Reviewed by Beth Dakin.
Make position: -webkit-sticky be constrained by an enclosing ancestor
with non-visible overflow if there is one, rather than being constained
always by the viewport.
Test: fast/css/sticky/sticky-top-overflow.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::computeStickyPositionConstraints): Rename
viewportRect to constrainingRect, since it isn't just about the viewport any more.
Fix an issue where just adding stickyLocation to absContainerFrame.location() was
incorrect when the container is scrolled; we also have to take the scroll offset
into account, and that offset is stored in the layer tree.
(WebCore::RenderBoxModelObject::stickyPositionOffset):
Look for an enclosing layer with overflow clipping, and, if found, use it to
compute the sticky constraint rect.
* rendering/RenderLayer.h: Add a helpful IncludeSelfOrNot, and fix several member functions
to use it place of hard-to-read boolean arguments.
Add enclosingOverflowClipLayer(IncludeSelfOrNot).
(WebCore::RenderLayer::ancestorCompositingLayer):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::enclosingOverflowClipLayer): New function, finds the enclosing
layer with overflow clip.
(WebCore::RenderLayer::enclosingCompositingLayer): Use IncludeSelfOrNot.
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint): Ditto.
(WebCore::RenderLayer::enclosingFilterLayer): Ditto.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::repaintInCompositedAncestor): Use IncludeSelfOrNot.
(WebCore::isViewportConstrainedFixedOrStickyLayer): Renamed from isRootmostFixedOrStickyLayer
and moved up so we can use it in requiresCompositingForPosition().
(WebCore::RenderLayerCompositor::requiresCompositingForPosition): Only make sticky composited if
it's viewport-constrained.
(WebCore::RenderLayerCompositor::updateViewportConstraintStatus):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints): Declare StickyPositionViewportConstraints
one line down to just before it gets used.
2013-05-20 Jeff Rogers <jrogers@blackberry.com>
Remove DISABLE_ROUNDED_CORNER_CLIPPING
https://bugs.webkit.org/show_bug.cgi?id=115531
Reviewed by Andreas Kling.
BlackBerry port is no longer using this.
* rendering/RenderLayer.cpp:
(WebCore::inContainingBlockChain):
(WebCore::RenderLayer::clipToRect):
2013-05-20 Tim Horton <timothy_horton@apple.com>
Clients should have a way to extend rendering suppression
https://bugs.webkit.org/show_bug.cgi?id=116463
<rdar://problem/13738496>
Reviewed by Andy Estes.
* WebCore.exp.in:
Export FrameView::setVisualUpdatesAllowedByClient.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
Move rendering-suppression watchdog into setVisualUpdatesAllowed(bool).
setVisualUpdatesAllowed(ReadyState) should not re-enable visual updates
if the client is itself disabling visual updates.
(WebCore::Document::visualUpdatesSuppressionTimerFired):
If the watchdog fires and the client is still disabling visual
updates, we should not re-enable visual updates, but instead
wait for the client.
(WebCore::Document::setVisualUpdatesAllowedByClient):
Actually re-enable visual updates if we deferred the re-enabling above
(when the page finishes loading, but the client had them disabled).
* dom/Document.h:
(Document): Add setVisualUpdatesAllowedByClient.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): Visual updates are allowed by default.
(WebCore::FrameView::setVisualUpdatesAllowedByClient):
Forward through to the document, but we also need to persist the state
here in FrameView so that it survives through navigation.
* page/FrameView.h:
(WebCore::FrameView::setVisualUpdatesAllowedByClient): Added.
(WebCore::FrameView::visualUpdatesAllowedByClient): Added.
Added storage for m_visualUpdatesAllowedByClient.
2013-05-20 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Add CSS parsing support for image URI shape-inside and shape-outside values
https://bugs.webkit.org/show_bug.cgi?id=116349
Reviewed by Alexandru Chiculita.
Add support for parsing image URI values for the shape-inside and shape-outside CSS properties.
Extended the ExclusionShapeValue class to support tracking the property's StyleImage value.
The ExclusionShapeValue::type enums were changed from all upper case to "Intercase" by order
of the style bot.
The existing CSS parsing tests were extended to check URI values.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyExclusionShape::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingImages):
* rendering/style/ExclusionShapeValue.h:
(WebCore::ExclusionShapeValue::createImageValue):
(ExclusionShapeValue):
(WebCore::ExclusionShapeValue::image):
(WebCore::ExclusionShapeValue::setImage):
(WebCore::ExclusionShapeValue::ExclusionShapeValue):
2013-05-20 Radu Stavila <stavila@adobe.com>
[CSSRegions] Fix offsetLeft / offsetTop for elements inside named flow
https://bugs.webkit.org/show_bug.cgi?id=115899
Reviewed by David Hyatt.
Elements in named flows that have the body as their offsetParent, need to compute their
offsetLeft and offsetTop values relative to the body.
Tests: fast/regions/offsetLeft-offsetTop-in-multiple-regions.html
fast/regions/offsetLeft-offsetTop-in-region-absolute-sticky-fixed.html
fast/regions/offsetLeft-offsetTop-in-region-float-vert-rl.html
fast/regions/offsetLeft-offsetTop-in-region-float.html
fast/regions/offsetLeft-offsetTop-inlines-region-in-element.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFlowThread.cpp:
(WebCore):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
* rendering/RenderFlowThread.h:
2013-05-20 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Exclusions] shape-inside on regions should respect positioned shapes and overflow
https://bugs.webkit.org/show_bug.cgi?id=116252
Reviewed by David Hyatt.
Regions should respect shape-inside properties which have specified top offset. Since the content which overflows from the
shape should be pushed after the content box (for details check out r148975), I implemented overflowthe behavior for simple
cases when you have only one region. I'm going to implement it for additional regions in a follow up patch.
Tests: fast/regions/shape-inside/shape-inside-on-regions-block-content-basic-overflow-shape-top-offset.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content-basic-overflow-shape-top-offset.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Handle the flow thread case, push the overflowing content after the
content box. Respect existing shape-inside on region tests.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Set the correct logical top position for the shape-inside in
the case of regions. Respect the region's margins and paddings.
2013-05-20 Darin Adler <darin@apple.com>
Remove custom binding for the Clipboard clearData function
https://bugs.webkit.org/show_bug.cgi?id=116421
Reviewed by Andreas Kling.
* bindings/js/JSClipboardCustom.cpp: Removed the clearData binding.
* dom/Clipboard.idl: Removed [Custom].
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearData): Renamed from clearAllData.
* dom/Clipboard.h: Rename clearAllData to clearData so we just use
overloading for the one with and without a MIME type.
* platform/ios/ClipboardIOS.h: Rename clearAllData to clearData.
* platform/ios/ClipboardIOS.mm:
(WebCore::ClipboardIOS::clearData): Ditto.
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::clearData). Ditto.
* platform/qt/ClipboardQt.h: Ditto.
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::clearData): Ditto.
* platform/win/ClipboardWin.h: Ditto.
2013-05-20 Eric Carlson <eric.carlson@apple.com>
[iOS] media/event-queue-crash.html ASSERTs in notifyChildInserted
https://bugs.webkit.org/show_bug.cgi?id=116444
Reviewed by Jer Noble.
No new tests, covered by existing tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureMediaControls): Only create media controls when the
element is in a Document.
2013-05-20 Antoine Quint <graouts@apple.com>
[Mac] captions menu should behave more like a menu
https://bugs.webkit.org/show_bug.cgi?id=116436
Reviewed by Eric Carlson.
Let the captions menu behave more like a native Mac menu by hiding it when
clicking anywhere on the page and preventing the page from scrolling when
attempting to scroll the captions menu when it cannot scroll in the requested
direction.
Test: media/video-controls-captions-trackmenu-hide-on-click-outside.html
* dom/EventListener.h:
Add the new MediaControlsAppleEventListenerType.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::defaultEventHandler):
(WebCore::MediaControlsApple::hide):
(WebCore::MediaControlsApple::makeTransparent):
(WebCore::MediaControlsApple::changedClosedCaptionsVisibility):
(WebCore::MediaControlsApple::reportedError):
(WebCore::MediaControlsApple::toggleClosedCaptionTrackList):
Use the hideClosedCaptionTrackList() and showClosedCaptionTrackList()
methods to hide and show the captions menu instead of calling hide()
and show() directly on m_closedCaptionsContainer.
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
Show the m_closedCaptionsContainer and register a "mousewheel" event
listener on it as well as a "click" event listener on the entire document.
(WebCore::MediaControlsApple::hideClosedCaptionTrackList):
Hide the m_closedCaptionsContainer and remove the "mousewheel" event
listener on it as well as the "click" event listener on the entire document.
(WebCore::MediaControlsApple::shouldClosedCaptionsContainerPreventPageScrolling):
New private utility to determine whether the m_closedCaptionsContainer can scroll
in the provided scroll direction.
(WebCore::MediaControlsApple::eventListener):
Obtain the event listener used for "mousewheel" and "click" event handlers.
(WebCore::MediaControlsAppleEventListener::handleEvent):
Event handler for the "mousewheel" and "click" events. If we get a "click" event, we
toggle the captions menu visibility and if we get a "mousewheel" event, we call into
shouldClosedCaptionsContainerPreventPageScrolling() to see if we can scroll in the
current scroll direction, and if not prevent the event from resulting in a scroll by
calling preventDefault().
(WebCore::MediaControlsAppleEventListener::operator==):
Required for the successful subclassing of EventListener.
* html/shadow/MediaControlsApple.h:
(MediaControlsAppleEventListener):
(WebCore::MediaControlsAppleEventListener::create):
(WebCore::MediaControlsAppleEventListener::cast):
(WebCore::MediaControlsAppleEventListener::MediaControlsAppleEventListener):
New subclass of EventListener required to provide a custom event listener for the
"mousewheel" and "click" events registered in showClosedCaptionTrackList() and
hideClosedCaptionTrackList().
2013-05-18 Rashmi Shyamasundar <rashmi.s2@samsung.com>
[Cairo] Canvas-shadow behavior is not being as expected
https://bugs.webkit.org/show_bug.cgi?id=108897
Reviewed by Martin Robinson.
ShadowBlur::endShadowLayer copies the image from shadowContext to cairoContext.
CairoContext-path should be empty for doing this copy. Otherwise, the
original-image area will also get filled with the shadow.
Test: fast/canvas/canvas-image-shadow.html
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::drawPathShadow):
2013-05-20 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
-webkit-text-underline-position should not be inherited
https://bugs.webkit.org/show_bug.cgi?id=116363
Reviewed by Dean Jackson.
Specification says text-underline-position should not be inherited.
No new tests, this updates existing tests.
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty): Make
CSSPropertyWebkitTextUnderlinePosition return false.
* rendering/style/RenderStyle.h: Treat TextUnderlinePosition as
non-inherited.
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.
* rendering/style/StyleRareNonInheritedData.h:
(StyleRareNonInheritedData):
2013-05-20 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
Add compile asserts for the size of RootInlineBox and InlineTextbox
https://bugs.webkit.org/show_bug.cgi?id=116337
Reviewed by Darin Adler.
Add compile asserts to ensure RootInlineBox and InlineTextbox stay small.
* rendering/InlineTextBox.cpp:
(SameSizeAsInlineTextBox):
(WebCore):
* rendering/RootInlineBox.cpp:
(SameSizeAsRootInlineBox):
(WebCore):
2013-05-20 Xan Lopez <xlopez@igalia.com>
[BlackBerry] LocalizedStringsBlackBerry: add dummy text track strings
https://bugs.webkit.org/show_bug.cgi?id=116300
Reviewed by Rob Buis.
These are dummy implementations necessary to make WebKit link.
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::weekFormatInLDML):
(WebCore):
(WebCore::textTrackClosedCaptionsText):
(WebCore::textTrackSubtitlesText):
(WebCore::textTrackOffText):
(WebCore::textTrackNoLabelText):
2013-05-19 Darin Adler <darin@apple.com>
[Mac] Improve string use in PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116418
Reviewed by Sam Weinig.
Did a Ben Poulain all over this file.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::plainText): Add the newline separately to the string builder.
Prepending it to the string first just does more allocations for no good reason.
(WebCore::Pasteboard::documentFragment): Use emptyString() instead of "" and use
ASCIILiteral where appropriate.
(WebCore::cocoaTypeFromHTMLClipboardType): More ASCIILiteral.
(WebCore::Pasteboard::clear): Use early return instead of a nested if here.
Use emptyString() instead of "".
(WebCore::addHTMLClipboardTypesForCocoaType): More ASCIILiteral.
2013-05-19 Anders Carlsson <andersca@apple.com>
Remove link prerendering code
https://bugs.webkit.org/show_bug.cgi?id=116415
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/Document.h:
(WebCore):
(Document):
* dom/EventNames.h:
(WebCore):
* html/HTMLLinkElement.cpp:
* html/HTMLLinkElement.h:
* html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::LinkRelAttribute):
* html/LinkRelAttribute.h:
(LinkRelAttribute):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::~LinkLoader):
(WebCore::LinkLoader::loadLink):
(WebCore::LinkLoader::released):
* loader/LinkLoader.h:
(WebCore):
(LinkLoader):
* loader/LinkLoaderClient.h:
(LinkLoaderClient):
* loader/Prerenderer.cpp: Removed.
* loader/Prerenderer.h: Removed.
* loader/PrerendererClient.cpp: Removed.
* loader/PrerendererClient.h: Removed.
* platform/PrerenderClient.h: Removed.
* platform/PrerenderHandle.h: Removed.
2013-05-19 Simon Fraser <simon.fraser@apple.com>
Change the terminology used by rendering code when painting a given node and its children from "paintingRoot" to "subtreePaintRoot"
https://bugs.webkit.org/show_bug.cgi?id=116417
Reviewed by Sam Weinig.
PaintInfo and RenderLayer code referred to a "paintingRoot". This is only set when
FrameView::setNodeToDraw() has been called and is used to restrict painting to
some part of the subtree, but it could easily be misinterpreted, and confused with
the "rootLayer" used by RenderLayer (which is usually not the layer associated with
the paintingRoot).
Change the terminology from "paintingRoot" to "subtreePaintRoot" root to make the
purpose of this variable more obvious.
No behavior change.
* page/FrameView.cpp: Add a comment for setNodeToDraw(); in future this should
be called setSubtreePaintRoot() or something. Not done in this patch to avoid
risk; this function is exported from WebCore.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paint):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo):
(WebCore::PaintInfo::updateSubtreePaintRootForChildren):
(WebCore::PaintInfo::shouldPaintWithinRoot):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintContents):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::paintOverlayScrollbars):
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintLayerByApplyingTransform):
(WebCore::RenderLayer::paintBackgroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragments):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
(WebCore::RenderLayer::paintOutlineForFragments):
(WebCore::RenderLayer::paintMaskForFragments):
* rendering/RenderLayer.h:
(WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
* rendering/RenderObject.cpp: Add a comment to recommend changing the name of
paintingRootRect() to refer to a subtree paint. Not done in this patch to avoid
risk; this function is exported from WebCore.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
2013-05-19 Darin Adler <darin@apple.com>
Use Element instead of Node in DragState, also redo DragState struct
https://bugs.webkit.org/show_bug.cgi?id=116411
Reviewed by Sam Weinig.
The drag source is an element, so use RefPtr<Element> instead of RefPtr<Node>.
Also, the entire drag state is about dragging, so no need for the word "drag" in the
name of its members. Also, it's a struct, so the members don't need m_ prefixes.
* page/DragController.cpp: Removed unneeded include of Node.h since it's included by
Element.h, which is also included.
(WebCore::DragController::draggableElement): Renamed from Node to Element and changed
the types and names of arguments accordingly. Also made this function handle a
startElement of 0 so callers don't need to. Also updated for changes to DragState members.
(WebCore::DragController::startDrag): Updated for changes to DragState members.
Since dragSource can only be an element, was able to get rid of isElementNode checks.
* page/DragController.h: Fixed style of forward declarations of structs. Updated for
change of draggableNode to draggableElement. Also removed declarations of nonexistent
selectionDraggingRect and doDrag functions.
* page/DragState.h: Rewrote practically this whole header. Added an include of Element
instead of Node since that's what we use now. Removed includes that are redundant.
There's no problem copying a DragState, so removed WTF_MAKE_NONCOPYABLE. There's no need
to allocate a DragState on the heap, so removed WTF_MAKE_FAST_ALLOCATED. The event dispatch
boolean is never set to a constant, so there's no need for a policy enum; it can just be
a boolean. Removed the "m_" prefixes from the struct members, since this is a struct with
public members and we don't use the prefix in those cases. Removed the word "drag" from the
struct member names since this entire struct is about dragging and has drag in its name.
Left the comments mostly intact, even though I'm not certain of their value.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent): Updated for changes to DragState.
(WebCore::EventHandler::eventMayStartDrag):
Use innerElement instead of innerNode to call draggableElement instead of draggableNode.
(WebCore::EventHandler::updateDragAndDrop): Updated for changes to DragState.
(WebCore::EventHandler::cancelDragAndDrop): Ditto.
(WebCore::EventHandler::handleWheelEvent): Added FIXME.
(WebCore::EventHandler::dragHysteresisExceeded): Updated for changes to DragState.
(WebCore::EventHandler::freeClipboard): Updated for changes to DragState. Also re-added
code to release the clipboard object, which is needed here to avoid keeping it around in
memory until the next drag.
(WebCore::EventHandler::dragSourceEndedAt): Updated for changes to DragState.
(WebCore::EventHandler::updateDragStateAfterEditDragIfNeeded): Ditto.
(WebCore::EventHandler::dispatchDragSrcEvent): Ditto.
(WebCore::EventHandler::handleDrag): Updated for changes to DragState. Use innerElement
instead of innerNode to call draggableElement instead of draggableNode. No longer need to
null check innerElement because draggableElement does that. Removed unneeded else that was
setting m_dragSrc to zero since it's guaranteed to already be zero.
2013-05-19 Anders Carlsson <andersca@apple.com>
Remove ChromeClient::webView()
https://bugs.webkit.org/show_bug.cgi?id=116054
Reviewed by Darin Adler.
This blatantly horrible layer violation was only used to know if a ChromeClient is an empty
client or not. We already have a (slightly less horrible) way to do that.
* loader/EmptyClients.h:
* page/ChromeClient.h:
(ChromeClient):
2013-05-19 Darin Adler <darin@apple.com>
Eliminate the Editor::newGeneralClipboard function
https://bugs.webkit.org/show_bug.cgi?id=116410
Reviewed by Andreas Kling.
This is one of the clean-ups made possible by the changes to the DOM clipboard class.
I had been waiting until all the platforms were moved over to it, but it turns out to be
easy to do this now, just with #ifdefs.
* PlatformBlackBerry.cmake: Deleted EditorBlackBerry.cpp.
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Call Clipboard::createForCopyAndPaste directly when
using the new version of the Clipboard class. Also some small style cleanup nearby.
* editing/blackberry/EditorBlackBerry.cpp: Removed. The only function in this file was
newGeneralClipboard.
* editing/mac/EditorMac.mm: Deleted newGeneralClipboard.
* platform/efl/ClipboardEfl.cpp: Ditto.
* platform/gtk/ClipboardGtk.cpp: Ditto.
2013-05-19 Martin Robinson <mrobinson@igalia.com>
GtkSelectionData length is off by one
https://bugs.webkit.org/show_bug.cgi?id=113962
Reviewed by Anders Carlsson.
No new tests. Since drag data is interpreted as a null-terminated string
this is difficult to test with a C program and we have no infrastructure
built for using GIR tests.
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillSelectionData): Instead of including the null
character in the paste data length, just include the string. This matches the behavior
of Firefox.
2013-05-18 Simon Fraser <simon.fraser@apple.com>
Hoist several chunks of code at the top of RenderLayer::paintLayerContents() onto new functions
https://bugs.webkit.org/show_bug.cgi?id=116406
Reviewed by Andreas Kling.
RenderLayer::paintLayerContents() was getting polluted with code related to filters,
clipping and font subpixel quantization, and hard to follow.
Move three hunks of code into new functions:
setupFontSubpixelQuantization() now contains the code related to whether we disable
font subpixel quantization on the context.
setupClipPath() now contains code related to clipping to shapes and references.
setupFilters() and applyFilters() contain code related to CSS filters.
As part of this, the interaction with FilterEffectRendererHelper was simplified.
It was convenient for setupFilters() to return a FilterEffectRendererHelper object
if successful, so we use an OwnPtr<FilterEffectRendererHelper> now. In addition,
the GraphicsContext swapping was moved from FilterEffectRendererHelper code into RenderLayer
to make it easier to follow. FilterEffectRendererHelper no longer holds on to
the old GraphicsContext.
No behavior change.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRendererHelper::filterContext):
(WebCore::FilterEffectRendererHelper::beginFilterEffect):
(WebCore::FilterEffectRendererHelper::applyFilterEffect):
* rendering/FilterEffectRenderer.h:
(WebCore::FilterEffectRendererHelper::FilterEffectRendererHelper):
(WebCore::FilterEffectRendererHelper::hasStartedFilterEffect):
(FilterEffectRendererHelper):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupFontSubpixelQuantization):
(WebCore::RenderLayer::setupClipPath):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::applyFilters):
(WebCore::RenderLayer::paintLayerContents):
* rendering/RenderLayer.h:
2013-05-18 Simon Fraser <simon.fraser@apple.com>
Refactor RenderStyle::diff()
https://bugs.webkit.org/show_bug.cgi?id=116397
Reviewed by Andreas Kling.
RenderStyle::diff() was prone to being changed incorrectly, since there was
a poorly documented ordering requirement: style changes that cause layout
have to be detected before those that cause only repainting.
In addition, the existing code made it impossible to separately ask whether
a given style change requires a repaint, if we've already detected that it
requires a positioned-movement-only layout.
Fix by factoring the code into member functions that check for each type
of style change.
No behavior change.
* rendering/style/RenderStyle.cpp:
(WebCore::positionChangeIsMovementOnly):
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
(WebCore::RenderStyle::changeRequiresLayerRepaint):
(WebCore::RenderStyle::changeRequiresRepaint):
(WebCore::RenderStyle::changeRequiresRepaintIfText):
(WebCore::RenderStyle::changeRequiresRecompositeLayer):
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
2013-05-18 Anders Carlsson <andersca@apple.com>
Simplify the StorageArea setter functions
https://bugs.webkit.org/show_bug.cgi?id=116402
Reviewed by Sam Weinig.
Move more security checking code to Storage so more code can be shared between WebKit1 and WebKit2.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
(WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
* storage/Storage.cpp:
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
* storage/StorageArea.h:
(StorageArea):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::setItem):
(WebCore::StorageAreaImpl::removeItem):
(WebCore::StorageAreaImpl::clear):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):
2013-05-18 Anders Carlsson <andersca@apple.com>
Simplify StorageArea getter functions
https://bugs.webkit.org/show_bug.cgi?id=116399
Reviewed by Sam Weinig.
Move the security and private browsing checks from StorageArea to Storage so we can share
more code between WebKit1 and WebKit2.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
Update to new StorageArea interface. The security checks are unnecessary here anyway because
InspectorDOMStorageAgent::findStorageArea will only return a StorageArea that can be accessed
by the frame's security origin.
* storage/Storage.cpp:
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::contains):
* storage/StorageArea.h:
(StorageArea):
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::key):
(WebCore::StorageAreaImpl::item):
(WebCore::StorageAreaImpl::contains):
* storage/StorageAreaImpl.h:
(StorageAreaImpl):
2013-05-17 Simon Fraser <simon.fraser@apple.com>
Garbage on page background while http://canberraballoons.com.au is loading
https://bugs.webkit.org/show_bug.cgi?id=116384
<rdar://problem/13930328>
Reviewed by Dan Bernstein.
This page loads a large JPEG image as the body background.
ImageSource::frameHasAlphaAtIndex() always claims that JPEG images
are opaque, but this isn't true if the frame is only partially loaded.
However, this would cause FillLayer::hasOpaqueImage() to report that the
background image is opaque, so we'd skip painting the background color.
Unpainted content in an opaque layer results in garbage.
Fix by having ImageSource::frameHasAlphaAtIndex() always return true
for frames that are not complete. When the image load completes, we
recompute metadata and correctly determine that the frame is opaque.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameHasAlphaAtIndex):
2013-05-18 Timothy Hatcher <timothy@apple.com>
Simplify EventLoop::cycle() on Mac.
https://webkit.org/b/116392
Reviewed by Anders Carlsson.
* platform/mac/EventLoopMac.mm:
(WebCore::EventLoop::cycle): Use CFRunLoopRunInMode instead.
2013-05-18 Andreas Kling <akling@apple.com>
Use CSSParserSelector::appendTagHistory() from CSS grammar.
<http://webkit.org/b/116382>
Reviewed by Antti Koivisto.
CSSParserSelector already knows how to append another component to itself,
no need to duplicate that logic in the grammar.
* css/CSSGrammar.y.in:
2013-05-18 Patrick Gansterer <paroga@webkit.org>
[CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
https://bugs.webkit.org/show_bug.cgi?id=114554
Reviewed by Gyuyoung Kim.
Using variables as target names is very uncommon in CMake.
The usual way to specify the name of the resulting binary
is to set the OUTPUT_NAME target property.
* CMakeLists.txt:
2013-05-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GTK port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116221
Reviewed by Martin Robinson.
Merge clipboard methods into PasteboardGtk that now wraps a
DataObjectGtk.
* GNUmakefile.list.am: Remove ClipboardGtk.h.
* dom/Clipboard.h: Remove GTK from the list of ports using legacy
clipboard.
* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::createDraggingClipboard): Use
Clipboard::createForDragAndDrop().
* platform/Pasteboard.h:
(Pasteboard):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::Editor::newGeneralClipboard): Use
Clipboard::createForCopyAndPaste().
(WebCore::Clipboard::createDragImage):
(WebCore::Clipboard::declareAndWriteDragImage):
* platform/gtk/ClipboardGtk.h: Removed.
* platform/gtk/DragDataGtk.cpp:
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::create): Create a new Pasteboard for a given
GtkClipboard or DataObjectGtk.
(WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard
for the GDK_SELECTION_CLIPBOARD clipboard.
(WebCore::Pasteboard::createPrivate): Create a Pasteboard without
a GtkClipboard associated.
(WebCore::Pasteboard::createForDragAndDrop): Create a Pasteboard
for drag and drop operations.
(WebCore::selectionClipboard): Return a static Pasteboard for the
GDK_SELECTION_CLIPBOARD clipboard.
(WebCore::primaryClipboard): Return a static Pasteboard for the
GDK_SELECTION_PRIMARY clipboard.
(WebCore::Pasteboard::generalPasteboard): Return
selectionClipboard() or primaryClipboard() depending on whether
primary selection clipboard is the active one or not.
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::~Pasteboard):
(WebCore::Pasteboard::dataObject): Return the wrapped DataObjectGtk.
(WebCore::dataObjectTypeFromHTMLClipboardType): Copied from
ClipboardGtk.cpp.
(WebCore::Pasteboard::writeString): Adapted to upate the wrapped
DataObjectGtk and the GtkClipboard if needed.
(WebCore::Pasteboard::writeSelection): Ditto.
(WebCore::Pasteboard::writePlainText): Ditto.
(WebCore::Pasteboard::writeURL): Ditto.
(WebCore::Pasteboard::writeImage): Ditto.
(WebCore::Pasteboard::writePasteboard): Copy the wrapped
DataObjectGtk from the DataObjectGtk of the given Pasteboard and
upsate the GtkClipboard if needed.
(WebCore::Pasteboard::clear): Copied from ClipboardGtk.cpp.
(WebCore::Pasteboard::canSmartReplace): Check if current
GtkClipboard supports smart replace.
(WebCore::Pasteboard::setDragImage):
(WebCore::Pasteboard::documentFragment): Adapted to use the
wrapped DataObjectGtk reading from the current GtkClipboard if
present.
(WebCore::Pasteboard::plainText): Ditto.
(WebCore::Pasteboard::hasData): Copied from ClipboardGtk.cpp.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.
2013-05-18 Alberto Garcia <agarcia@igalia.com>
[GTK] Parallel build fails if gtk-doc is enabled
https://bugs.webkit.org/show_bug.cgi?id=116227
Reviewed by Martin Robinson.
* GNUmakefile.am:
Don't overwrite noinst_DATA, modify its existing value instead.
2013-05-17 Michelangelo De Simone <michelangelo@webkit.org>
CSSParser parsing of CSSPropertyFontStretch falls into CSSPropertyGeometry
https://bugs.webkit.org/show_bug.cgi?id=116370
CSSPropertyFontStretch mistakenly fell through the shader parsing logic.
Reviewed by Alexandru Chiculita.
No new test possible, the feature is not implemented nor exposed.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
2013-05-17 Timothy Hatcher <timothy@apple.com>
Force the script debug server to continue when disabling the debugger.
There might be some cases where the debugger will stay in the nested run loop
which cause weird issues.
Speculative fix for: https://webkit.org/b/111438
Reviewed by Joseph Pecoraro.
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::disable):
2013-05-16 Darin Adler <darin@apple.com>
[BlackBerry] Get BlackBerry port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116287
Reviewed by Rob Buis.
* PlatformBlackBerry.cmake: Removed ClipboardBlackBerry.cpp.
* dom/Clipboard.h: Removed BLACKBERRY from the list of platforms that
use the legacy clipboard.
* editing/blackberry/EditorBlackBerry.cpp:
(WebCore::Editor::newGeneralClipboard): Changed to just create a copy
and paste clipboard.
* page/blackberry/EventHandlerBlackBerry.cpp: Removed a drag-related
function that wasn't doing any good.
* platform/blackberry/ClipboardBlackBerry.cpp: Removed.
* platform/blackberry/ClipboardBlackBerry.h: Removed.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardBlackBerry.cpp.
(WebCore::Pasteboard::clear): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
(WebCore::Pasteboard::types): Ditto.
(WebCore::Pasteboard::readFilenames): Ditto.
2013-05-17 Andreas Kling <akling@apple.com>
Ads on theverge.com cause repaints when hovered, even though content doesn't visibly change.
<http://webkit.org/b/116344>
Reviewed by Darin Adler.
Teach RenderStyle::diff() to ignore differences in the outline value if both styles have non-visible outlines.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/StyleBackgroundData.cpp:
(WebCore::StyleBackgroundData::isEquivalentForPainting):
* rendering/style/StyleBackgroundData.h:
(StyleBackgroundData):
2013-05-17 Andreas Kling <akling@apple.com>
Plug leak in CSSSelectorList::deleteSelectors().
<http://webkit.org/b/116371>
<rdar://problem/13930698>
Reviewed by Ryosuke Niwa.
Don't forget to destroy the very last selector in the list.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::deleteSelectors):
2013-05-17 Anders Carlsson <andersca@apple.com>
Share code between WebKit1 and WebKit2 StorageArea subclasses
https://bugs.webkit.org/show_bug.cgi?id=116367
Reviewed by Andreas Kling.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
Remove ec parameter.
* inspector/InspectorDOMStorageAgent.h:
Add forward declaration.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
Storage::StorageArea returns a reference now.
* storage/Storage.cpp:
(WebCore::Storage::length):
Check that the storage area can be accessed by the frame, and that it's not disabled by private browsing.
Then call down to the (now simplified) StorageArea::length().
(WebCore::Storage::isDisabledByPrivateBrowsing):
New helper function that's based on StorageAreaImpl::disabledByPrivateBrowsingInFrame, but reordered
to make it easier to follow.
* storage/Storage.h:
(WebCore::Storage::area):
Return a reference.
* storage/StorageAreaImpl.cpp:
(WebCore::StorageAreaImpl::storageType):
Add this new virtual member funciton that's needed by Storage::isDisabledByPrivateBrowsing.
(WebCore::StorageAreaImpl::length):
Remove unneeded code.
2013-05-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r150294.
http://trac.webkit.org/changeset/150294
https://bugs.webkit.org/show_bug.cgi?id=116369
Caused 31 tests to fail (Requested by rniwa on #webkit).
* WebCore.exp.in:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderApplet.h:
* rendering/RenderBR.h:
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::virtualContinuation):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderBoundingBox):
(RenderBox):
(WebCore::RenderBox::marginLogicalLeft):
(WebCore::RenderBox::marginLogicalRight):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::isBoxModelObject):
* rendering/RenderButton.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderEmbeddedObject.h:
(RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::isEmbeddedObject):
(WebCore::RenderEmbeddedObject::virtualChildren):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderImage.h:
(RenderImage):
(WebCore::RenderImage::isRenderImage):
* rendering/RenderInline.h:
(RenderInline):
(WebCore::RenderInline::virtualContinuation):
(WebCore::RenderInline::virtualChildren):
(WebCore::RenderInline::isRenderInline):
(WebCore::RenderInline::layout):
(WebCore::RenderInline::requiresLayer):
(WebCore::RenderInline::offsetWidth):
(WebCore::RenderInline::offsetHeight):
(WebCore::RenderInline::borderBoundingBox):
(WebCore::RenderInline::dirtyLinesFromChangedChild):
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.h:
(WebCore::RenderMedia::virtualChildren):
(WebCore::RenderMedia::canHaveChildren):
(WebCore::RenderMedia::isMedia):
(WebCore::RenderMedia::isImage):
(WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderPart.h:
(RenderPart):
(WebCore::RenderPart::isRenderPart):
(WebCore::RenderPart::renderName):
* rendering/RenderProgress.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::isRenderRegion):
* rendering/RenderRegionSet.h:
* rendering/RenderReplaced.h:
(RenderReplaced):
(WebCore::RenderReplaced::renderName):
* rendering/RenderReplica.h:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):
* rendering/RenderTable.h:
(RenderTable):
(WebCore::RenderTable::renderName):
(WebCore::RenderTable::isTable):
(WebCore::RenderTable::avoidsFloats):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
(RenderText):
(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):
(WebCore::RenderText::styleWillChange):
(WebCore::RenderText::length):
(WebCore::RenderText::paint):
(WebCore::RenderText::layout):
* rendering/RenderTextControl.h:
(RenderTextControl):
(WebCore::RenderTextControl::renderName):
(WebCore::RenderTextControl::isTextControl):
(WebCore::RenderTextControl::avoidsFloats):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::isTextField):
* rendering/RenderTextFragment.h:
* rendering/RenderTextTrackCue.h:
* rendering/RenderVideo.h:
* rendering/RenderView.h:
* rendering/RenderWidget.h:
(RenderWidget):
(WebCore::RenderWidget::isWidget):
* rendering/RenderWordBreak.h:
* rendering/RootInlineBox.h:
(RootInlineBox):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/svg/RenderSVGBlock.h:
(RenderSVGBlock):
* rendering/svg/RenderSVGContainer.h:
(WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
(WebCore::RenderSVGContainer::virtualChildren):
(WebCore::RenderSVGContainer::isSVGContainer):
(WebCore::RenderSVGContainer::renderName):
(RenderSVGContainer):
(WebCore::RenderSVGContainer::objectBoundingBox):
(WebCore::RenderSVGContainer::strokeBoundingBox):
(WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.h:
(WebCore::RenderSVGHiddenContainer::renderName):
(RenderSVGHiddenContainer):
(WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.h:
(WebCore::RenderSVGInline::renderName):
(WebCore::RenderSVGInline::requiresLayer):
(WebCore::RenderSVGInline::isSVGInline):
(RenderSVGInline):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.h:
(WebCore::RenderSVGModelObject::requiresLayer):
(RenderSVGModelObject):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(RenderSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.h:
(RenderSVGResourceGradient):
(WebCore::RenderSVGResourceGradient::resourceBoundingBox):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
(WebCore::RenderSVGShape::setNeedsTransformUpdate):
(WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
(WebCore::RenderSVGShape::localToParentTransform):
(WebCore::RenderSVGShape::localTransform):
(WebCore::RenderSVGShape::isSVGShape):
(RenderSVGShape):
(WebCore::RenderSVGShape::objectBoundingBox):
(WebCore::RenderSVGShape::strokeBoundingBox):
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of Custom code for Audio global constructor
https://bugs.webkit.org/show_bug.cgi?id=116343
Reviewed by Geoffrey Garen.
Remove custom code for Audio global constructor. It is no longer needed
now that the the bindings generator no longer require custom code for
named constructors and now that [EnabledAtRuntime] extended attribute is
supported for global constructors.
HTMLAudioElement global constructors are now automatically generated.
No new tests, no behavior change for layout tests.
* bindings/js/JSDOMWindowCustom.cpp:
* html/HTMLAudioElement.idl:
* page/DOMWindow.idl:
2013-05-17 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13819878> Disable SharedWorker when in multiple web process model
https://bugs.webkit.org/show_bug.cgi?id=116359
Reviewed by Anders Carlsson.
This feature was already RuntimeEnabled. Call through layers to get the answer from
a platform strategy.
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::DefaultSharedWorkerRepository::isAvailable):
* workers/DefaultSharedWorkerRepository.h:
* workers/SharedWorkerRepository.cpp:
(WebCore::SharedWorkerRepository::isAvailable):
* workers/SharedWorkerStrategy.h:
(WebCore::SharedWorkerStrategy::isAvailable):
2013-05-17 Anders Carlsson <andersca@apple.com>
Move Storage member functions out of line
https://bugs.webkit.org/show_bug.cgi?id=116364
Reviewed by Andreas Kling.
This is preparation for sharing more code between the WebKit1 and WebKit2 storage area subclasses.
Also remove unnecessary null checks and make m_storageArea const.
* storage/Storage.cpp:
(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
(WebCore::Storage::contains):
* storage/Storage.h:
(WebCore::Storage::area):
2013-05-17 Beth Dakin <bdakin@apple.com>
Headers and footers will sometimes disappear and re-appear during page loads
https://bugs.webkit.org/show_bug.cgi?id=116336
-and corresponding-
<rdar://problem/13886753>
Reviewed by Simon Fraser.
This patch changes the WebCore-level API that WebKit uses to create a banner.
Specifically this patch removes FrameView::setWantsLayerForHeader(), which created
and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the
layer has been created, it will call back into WK2 via ChromeClient. This will
allow WebCore to re-create the header/footer layers as needed whenever the
FrameView/RenderLayerCompositor have been destroyed and recreated.
Remove references to old FrameView functions. Add references to new Page
functions.
* WebCore.exp.in:
New ChromeClient functions will pass the new layers up to WK2.
* page/ChromeClient.h:
(WebCore::ChromeClient::didAddHeaderLayer):
(WebCore::ChromeClient::didAddFooterLayer):
(ChromeClient):
Remove setWantsLayerForHeader/Footer.
* page/FrameView.cpp:
* page/FrameView.h:
(FrameView):
Page now caches the header and footer height. When the FrameView/RLC have been
destroyed, and the cached layer/height information on those classes has been lost,
this data on Page will persist so that we can build the layers back up.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::addHeaderWithHeight):
(WebCore::Page::addFooterWithHeight):
* page/Page.h:
(WebCore::Page::headerHeight):
(WebCore::Page::footerHeight):
As soon as the root gets a backing, recreate the header and footer layers if
needed.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):
Call into ChromeClient.
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
2013-05-18 Claudio Saavedra <csaavedra@igalia.com>
[CSS] Minor cleanups in CSS variables handling
https://bugs.webkit.org/show_bug.cgi?id=116318
Reviewed by Ryosuke Niwa.
No new tests, only a cleanup.
* css/CSSParser.cpp:
(WebCore::CSSParserString::substring): Optimize.
(WebCore::CSSParser::createPrimitiveVariableNameValue):
Remove intermediate variable.
2013-05-17 Alexey Proskuryakov <ap@apple.com>
[Mac] Add DOMWindowConstructors.idl to Xcode project file
https://bugs.webkit.org/show_bug.cgi?id=116351
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Added the file, so that Xcode includes it
in searches.
2013-05-17 Ryosuke Niwa <rniwa@webkit.org>
Remove the declaration of Element::detachAttrNodeAtIndex erroneously added in r150072.
* dom/Element.h:
(Element):
2013-05-17 Anders Carlsson <andersca@apple.com>
WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
https://bugs.webkit.org/show_bug.cgi?id=116346
<rdar://problem/13852829>
Reviewed by Andreas Kling.
Export the UTF8Encoding symbol.
* WebCore.exp.in:
2013-05-17 Andreas Kling <akling@apple.com>
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>
Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
Re-landing without devirtualization tweaks.
* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.
2013-05-17 Alexey Proskuryakov <ap@apple.com>
Build fix.
* loader/FrameLoader.cpp: (WebCore::FrameLoader::willTransitionToCommitted):
Frame:editor() now returns a reference.
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of [ConstructorParameters] extended attributes
https://bugs.webkit.org/show_bug.cgi?id=116308
Reviewed by Kentaro Hara.
Get rid of WebKit-specific [ConstructorParameters] IDL extended attribute. Instead,
[CustomConstructor] arguments are now explicitly specified, similarly to [Constructor]
arguments and the constructor object's "length" property is now automatically
computed for custom constructors as well.
This is less error-prone as the value is not hardcoded, more consistent with
[Constructor] extended attribute and gives more information about the custom constructor
in the IDL file. We also get rid of a WebKit-specific IDL attribute which is always
nice.
No new tests, already covered by fast/js/constructor-length.html.
* Modules/mediastream/MediaStream.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(applyTypedefs):
(parseAttributeRest):
(copyExtendedAttributes):
(parseExtendedAttributeRest):
(applyExtendedAttributeList):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64ArrayConstructor::finishCreation):
* bindings/scripts/test/TestTypedArray.idl:
* dom/MutationObserver.idl:
* fileapi/Blob.idl:
* html/DOMFormData.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/DataView.idl:
* page/WebKitPoint.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
2013-05-17 Alexey Proskuryakov <ap@apple.com>
Text input is largely broken when there are subframes loading
http://bugs.webkit.org/show_bug.cgi?id=59121
<rdar://problem/9320468>
Reviewed by Darin Adler.
This addresses text input being abandoned when another frame in a page is navigated.
There are still many opportunities for improvement:
- Track other cases where WebCore interferes may want to cancel input without
direct user action (e.g. deleting the whole editable element on a timer).
- Fix how dictionary panel and autocorrection are dismissed (they still have the
same issue, and get dismissed with any frame navigation).
Test: platform/mac/editing/input/unconfirmed-text-navigation-with-page-cache.html
* loader/FrameLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::willTransitionToCommitted): Make sure that we
do not keep an inline session in a frame that's no longer active, as WebKit2 no
longer takes care of this case (and more of the logic should be in WebCore anyway).
(WebCore::FrameLoader::commitProvisionalLoad): Added a hook that gets invoked right
before transitioning to committed state starts. We may want to move more code here
eventually, e.g. from Frame::setView.
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of [CustomGetter] for global named constructors
https://bugs.webkit.org/show_bug.cgi?id=116116
Reviewed by Geoffrey Garen.
Improve the JSC bindings generator so that global named constructors no longer
require a [CustomGetter] IDL extended attribute. As a consequence, attributes
on the global window object can now be automatically generated for interfaces
that have a [NamedConstructor], namely HTMLOptionElement.
The HTMLAudioElement global constructors are still manually defined because it
requires custom code at the moment to check if the media player is available.
No new tests, no behavior change.
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/preprocess-idls.pl:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* html/HTMLOptionElement.idl:
* page/DOMWindow.idl:
2013-05-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: SyntaxError evaluating "1+1; //@ sourceURL=test" in console
https://bugs.webkit.org/show_bug.cgi?id=116292
Add a newline after the expression so a single line comment doesn't
erroneously comment out the closing brace of the with block.
Reviewed by Timothy Hatcher.
Test: inspector/console/console-eval-comment.html
* inspector/InjectedScriptSource.js:
2013-05-17 David Hyatt <hyatt@apple.com>
fast/flexbox/auto-height-with-flex.html failing only on release builds.
https://bugs.webkit.org/show_bug.cgi?id=116240
Reviewed by Darin Adler.
Fix the mainAxisContentExtent method so no overflow occurs, since it
doesn't work right on release builds.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add [EnabledAtRuntime] extended attribute support for global constructors
https://bugs.webkit.org/show_bug.cgi?id=116147
Reviewed by Geoffrey Garen.
Add [EnabledAtRuntime] extended attribute support for global constructors.
This patch adds [EnabledAtRuntime] extended attribute to SharedWorker and
WebSocket IDL interfaces so that their global constructors on the global
Window object can now be automatically generated.
The behavior on JavaScript side is unchanged. We simply leverage
RuntimeEnabledFeatures class and the new [EnabledAtRuntime] IDL extended
attribute to generate the code for global constructors getters instead
of using custom code.
No new tests, no behavior change for layout tests.
* GNUmakefile.list.am:
* Modules/websockets/WebSocket.cpp: Enable WebSockets at runtime by default.
* Modules/websockets/WebSocket.idl:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore):
* bindings/js/JSDOMWindowWebSocketCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(ToMethodName):
(GetRuntimeEnableFunctionName):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* page/DOMWindow.idl:
* workers/SharedWorker.idl:
2013-05-17 Darin Adler <darin@apple.com>
[EFL] Move EFL port off legacy clipboard
https://bugs.webkit.org/show_bug.cgi?id=116181
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Switched EFL away from "legacy" mode for Clipboard.
* page/efl/EventHandlerEfl.cpp:
(WebCore::EventHandler::createDraggingClipboard): Changed to call Clipboard member function.
* platform/efl/ClipboardEfl.cpp: Deleted most of the functions.
(WebCore::Editor::newGeneralClipboard): Changed to call Clipboard member function.
(WebCore::Clipboard::createDragImage): Moved from ClipboardEfl to Clipboard.
(WebCore::Clipboard::declareAndWriteDragImage): Moved from ClipboardEfl to Clipboard.
(WebCore::Clipboard::items): Ditto.
* platform/efl/PasteboardEfl.cpp: A lot of copyright notices for a file that
has no code in it other than notImplemented lines! I didn't add a new one.
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::createForDragAndDrop): Added.
(WebCore::Pasteboard::hasData): Added.
(WebCore::Pasteboard::readString): Added.
(WebCore::Pasteboard::writeString): Added.
(WebCore::Pasteboard::types): Added.
(WebCore::Pasteboard::readFilenames): Added.
(WebCore::Pasteboard::setDragImage): Added.
(WebCore::Pasteboard::writePasteboard): Added.
2013-05-17 Frédéric Wang <fred.wang@free.fr>
Bad spacing inside MathML formulas when text-indent is specified
https://bugs.webkit.org/show_bug.cgi?id=106600
Reviewed by Martin Robinson.
When MathML is used in a HTML page that modifies the CSS text-indent,
large gaps appear inside the mathematical expressions. Resetting it to
0 on the math root (as Gecko does) fixes the issue.
Tests: mathml/presentation/text-indent.html
mathml/presentation/text-indent-expected.html
* css/mathml.css:
(math): reset text-indent to its default value.
2013-05-17 Alberto Garcia <agarcia@igalia.com>
Fix code that expects Page::chrome() to return a pointer
https://bugs.webkit.org/show_bug.cgi?id=116313
Reviewed by Darin Adler.
Page::chrome() returns a reference after r150214.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setEnableMockPagePopup):
2013-05-17 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] ImageBlackBerry: add missing BlendMode parameter
https://bugs.webkit.org/show_bug.cgi?id=116316
Reviewed by Carlos Garcia Campos.
When the new BitmapImage::draw() method was added in r147110 it
didn't include the BlendMode parameter, which has been there since
r137011.
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::BitmapImage::draw):
2013-05-16 Jer Noble <jer.noble@apple.com>
Some media/track tests fail or assert on Mac
https://bugs.webkit.org/show_bug.cgi?id=97132
Reviewed by Simon Fraser.
Rationalize the font and padding behavior of cues and cue boxes; ::cue pseudo elements cannot have padding
values applied via CSS (due to padding not being included in the whitelist of applicable CSS properties).
Also, the font values were being applied to the box at one level and the cue at another, leading to incorrect
layout in the snapToLines case. Padding has been removed from the cue, and the font settings are now applied
to the box exclusively.
Additionally, a few drive-by changes were made in TextTrackCue to the return values of displayTreeInternal() &
element(), which previously returned a PassRefPtr<> instead of a plain pointer.
* css/mediaControls.css:
(video::-webkit-media-text-track-container): Move the font size to the display selector.
(video::cue): Remove the display:inline and padding:2px declarations.
(video::-webkit-media-text-track-display): Remove the -webkit-line-content now that the ::cue has no padding.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::TextTrackCue): The background box is now a span, rather than a forced-inline div.
(WebCore::TextTrackCue::displayTreeInternal): Return a plain pointer.
(WebCore::TextTrackCue::getDisplayTree): Ditto.
(WebCore::TextTrackCue::setFontSize): Set the font on the box, not the cue.
* html/track/TextTrackCue.h:
(WebCore::TextTrackCue::element): Return a plain pointer.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): The cue element is now a span, not a div.
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::captionsWindowCSS): Whitespace.
(WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Do not set padding on the cue.
2013-05-16 Andreas Kling <akling@apple.com>
Changes in text-only properties shouldn't cause repaints unless there is actually text.
<http://webkit.org/b/116250>
Reviewed by Antti Koivisto.
Add a new StyleDifferenceRepaintIfText value to the repertoire of RenderStyle::diff().
This result means that the renderer only needs to repaint if one of its immediate children contains text.
This lets us avoid repainting the same pixels when hovering over constructs like:
<style>
a { text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
<a href="http://is.gd/andersca">
<img src="cool-hat.jpg">
</a>
Since the change in text-decoration has no effect on the rendering of the <img> element,
we'll now be smart enough to avoid repainting it.
* rendering/style/RenderStyleConstants.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
Move checking of text-only properties until the very end, and return StyleDifferenceRepaintIfText
in case a difference is found, giving precedence to StyleDifferenceRepaint.
* rendering/RenderObject.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::hasImmediateNonWhitespaceTextChild):
Helper to check if a RenderObject has at least one RenderText child containing more than just
collapsible whitespace.
(WebCore::RenderObject::shouldRepaintForStyleDifference):
Helper to check if a StyleDifference is either ...Repaint or ...RepaintIfText and the renderer
has an immediate text child.
(WebCore::RenderObject::styleWillChange):
(WebCore::RenderObject::setStyle):
Don't repaint for StyleDifferenceRepaintIfText unless hasImmediateNonWhitespaceTextChild().
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::clientStyleChanged):
Tweak for new StyleDifference enum value.
* rendering/RenderText.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::isAllCollapsibleWhitespace):
Made this const.
2013-05-17 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
Improve -webkit-text-underline-position memory usage.
https://bugs.webkit.org/show_bug.cgi?id=116108
Reviewed by Benjamin Poulain.
Remove m_maxLogicalTop private variable from RootInlineBox to reduce
the overall memory used to render RootInlineBoxes (eight bytes per RootInlineBox
instance in a 64-bit machine). RootInline::maxLogicalTop() now computes
the maxLogicalTop value everytime it is called. In a typical page
computeMaxLogicalTop is called less than 10 times for each
InlineTextBox that uses -webkit-text-underline-position. That is a small
price users of -webkit-text-underline-position will pay so that
everybody can benefit from the memory reduction in RootInlineBox.
No new tests, no change in behavior.
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeMaxLogicalTop): Make it const.
* rendering/InlineFlowBox.h:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::RootInlineBox): Remove m_maxLogicalTop.
(WebCore::RootInlineBox::alignBoxesInBlockDirection): Remove
computeMaxLogicalTop call and obsolete comment.
(WebCore):
(WebCore::RootInlineBox::maxLogicalTop): Compute maxLogicalTop before
returning its value.
* rendering/RootInlineBox.h:
(RootInlineBox):
2013-05-17 Alexis Menard <alexis@webkit.org>
Make sure to call release() on our smart pointers when we should.
https://bugs.webkit.org/show_bug.cgi?id=116307
Reviewed by Andreas Kling.
Call release() when we should call it. There is probably more occurence
of this problem on the codebase but this is a first bunch of fixes.
No new tests : existing ones should cover.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImage):
(WebCore::getBorderRadiusShorthandValue):
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForSidesShorthand):
(WebCore::CSSComputedStyleDeclaration::getCSSPropertyValuesForGridShorthand):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseBorderImage):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
2013-05-17 Allan Sandfeld Jensen <allan.jensen@digia.com>
Make PNGImageDecoder::rowAvailable auto-vectorizable
https://bugs.webkit.org/show_bug.cgi?id=116151
Reviewed by Benjamin Poulain.
Changed the main loops under PNGImageDecoder::rowAvailable so that they
avoid branches and non-sequential table look ups.
Together with automatic vectorization by the compiler this provides around
4x speed-up with AVX or 2x speed-up on generic x64. Shaving off 12-40% on
PNG decoding in general.
* platform/graphics/Color.cpp:
(WebCore::premultipliedARGBFromColor):
* platform/graphics/Color.h:
(WebCore::fastDivideBy255):
* platform/graphics/filters/FEBlend.cpp:
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::setPixelRGB):
(WebCore::setPixelRGBA):
(WebCore::setPixelRGBA_Premultiplied):
(WebCore::PNGImageDecoder::rowAvailable):
2013-05-17 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Allow "//# sourceMappingURL" syntax alongside "//@"
https://bugs.webkit.org/show_bug.cgi?id=116290
Follow an update to the spec and support the new and old syntax.
Reviewed by Timothy Hatcher.
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::scriptCommentPattern):
(WebCore::ContentSearchUtils::stylesheetCommentPattern):
* inspector/front-end/SASSSourceMapping.js:
(WebInspector.SASSSourceMapping.prototype._loadAndProcessSourceMap):
2013-05-17 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove custom code for MessageEvent.ports getter
https://bugs.webkit.org/show_bug.cgi?id=116304
Reviewed by Kentaro Hara.
Remove Custom code for the "ports" attribute getter in MessageEvent
IDL interface. The JSC bindings generator already supports attributes
of type MessagePortArray.
No new tests, already covered by existing layout tests and bindings
tests.
* bindings/js/JSMessageEventCustom.cpp: Remove Custom code for ports getter.
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Small tweak to correctly handle the case where impl->ports()
returns NULL and avoid crashing in this case.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Rebaseline due
to bindings generator tweak.
* dom/MessageEvent.idl: Remove [CustomGetter] extended attribute for 'ports' attribute
and switch to MessagePortArray type.
2013-05-16 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Add stubs for ContextMenu and ContextMenuItem
https://bugs.webkit.org/show_bug.cgi?id=116235
Reviewed by Antonio Gomes.
No new tests needed, only a refactor.
Add ContextMenuNone.cpp and ContextMenuItemNone.cpp
so ports using ENABLE(CROSS_PLATFORM_CONTEXT_MENU) don't
need to replicate these stubs.
* PlatformEfl.cmake:
* Target.pri:
* platform/ContextMenuNone.cpp: Added.
(WebCore):
(WebCore::ContextMenu::ContextMenu):
(WebCore::ContextMenu::getContextMenuItems):
(WebCore::ContextMenu::createPlatformContextMenuFromItems):
(WebCore::ContextMenu::platformContextMenu):
* platform/ContextMenuItemNone.cpp: Added.
(WebCore):
(WebCore::ContextMenuItem::platformContextMenuItem):
* platform/efl/ContextMenuEfl.cpp: Removed.
* platform/efl/ContextMenuItemEfl.cpp: Removed.
* platform/qt/ContextMenuQt.cpp: Removed.
* platform/qt/ContextMenuItemQt.cpp: Removed.
2013-05-16 Alexis Menard <alexis@webkit.org>
Regression: Event#stopPropagation() does not halt bubbling for webkitTransitionEnd
https://bugs.webkit.org/show_bug.cgi?id=115656
Reviewed by Darin Adler.
If we create a prefixed event to dispatch it (in the case we have only
prefixed event listeners in client's code) then we need to make sure to
keep it in sync with the original unprefixed event after it has been
dispatched. While being dispatched the event can be modified by
client's code and when propagated back to outer elements, attributes were
not updated. This patch changes the old design of creating a separate event
for the prefixed case and now change the type of the event (so the name) before
dispatching it, keeping the attributes if changed and then rename it
back to unprefixed when the dispatching is finished.
Tests: transitions/transition-end-event-prefixed-01.html
transitions/transition-end-event-prefixed-02.html
transitions/transition-end-event-prefixed-03.html
* dom/Event.h:
(WebCore::Event::setType):
* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
2013-05-16 Mike Fenton <mifenton@rim.com>
[BlackBerry] Strip invoke URLs when writing to the clipboard.
https://bugs.webkit.org/show_bug.cgi?id=116226
Reviewed by Rob Buis.
PR 333516.
Invoke URLs should not be included in the paste data.
Internally Reviewed by Gen Mak.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::writeSelection):
2013-05-16 Eduardo Lima Mitev <elima@igalia.com>
Missing UNUSED_PARAM macro for textPosition argument in WebKitAccessibleInterfaceText
https://bugs.webkit.org/show_bug.cgi?id=116230
Reviewed by Chris Fleizach.
No new functionality, no new tests.
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(webkitAccessibleTextGetTextForOffset): List textPosition argument as
unused parameter for all platforms except GTK.
2013-05-16 Jaehun Lim <ljaehun.lim@samsung.com>
Frame flattening prevents <HTML> in <OBJECT> from having scrollbars
https://bugs.webkit.org/show_bug.cgi?id=115884
Reviewed by Antonio Gomes.
Frame flattening should be applied when the frame owner is frame or iframe. But when
the frame owner is object element, frame flattening prevents it from having scrollbars.
In this situation, we can't scroll the html document in object element.
This patch adds two helper functions to verify flattening conditions.
Test: fast/frames/flattening/scrolling-in-object.html
* page/FrameView.cpp:
(WebCore::frameFlatteningEnabled): Added. Helper to check whether flattening is enabled or not.
(WebCore::supportsFrameFlattening): Added. Helper to check whether the frame owner is <frame> or <iframe>.
(WebCore::FrameView::avoidScrollbarCreation):
(WebCore::FrameView::calculateScrollbarModesForLayout): Use frameFlatteningEnabled().
(WebCore::FrameView::layout): Use frameFlatteningEnabled().
(WebCore::FrameView::isInChildFrameWithFrameFlattening): Use frameFlatteningEnabled().
2013-05-16 Patrick Gansterer <paroga@webkit.org>
Port functions for pathhandling to Windows CE in FileSystemWin
https://bugs.webkit.org/show_bug.cgi?id=116208
Reviewed by Darin Adler.
This will allow us to remove FileSystemWinCE in a next step.
* platform/win/FileSystemWin.cpp:
(WebCore::pathByAppendingComponent):
(WebCore::pathGetFileName):
2013-05-16 Tim Horton <timothy_horton@apple.com>
PDFPlugins don't load when plugins are disabled, but they should
https://bugs.webkit.org/show_bug.cgi?id=75790
<rdar://problem/11650197>
Reviewed by Anders Carlsson.
Make it possible to load "application" plug-ins even if settings or the FrameLoaderClient
say that plug-ins should be disabled, providing a mechanism for WebKit* to offer built-in
functionality which happens to use the plug-in infrastructure, and which also doesn't
unexpectedly disappear for users with plug-ins off.
* WebCore.exp.in:
Export SubframeLoader::allowPlugins().
Update signature for PluginData::supportsMimeType to include the AllowedPluginTypes argument.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
Load PluginData even if plug-ins are disabled, but if that is the case, only
create a PluginDocument for application plug-ins.
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::appendBytes):
Don't bail if plug-ins are disabled, because we could still be a PluginDocument
for an application plug-in.
* page/Page.cpp:
(WebCore::Page::pluginData):
Allow PluginData to be constructed even if plug-ins are disabled, as there might
be application plug-ins that we want to load anyway.
* platform/mac/MIMETypeRegistryMac.mm:
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
On Mac, if we have PDFPlugin, we can support PDF and PostScript with a native application plug-in.
* plugins/PluginData.cpp:
(WebCore::PluginData::supportsMimeType):
Add an AllowedPluginTypes argument to supportsMimeType, allowing callers to specify
whether they are looking for any plug-in, or are looking only for application plug-ins.
* plugins/PluginData.h:
(PluginInfo): Added an isApplicationPlugin field, to specify whether this is a "built-in" plug-in.
(PluginData): Add the aforementioned AllowedPluginTypes enum and the argument to supportsMimeType.
2013-05-16 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Crash due to an assert running test editing/execCommand/indent-paragraphs.html
https://bugs.webkit.org/show_bug.cgi?id=114944
Reviewed by Rob Buis.
It crashes in network platform code when trying to save an
invalid URL in the disk cache. That test contains references to
empty URLs like http://. Those empty URLs, are parsed as http:/ by
KURL and considered valid. BlackBerry network platform uses GURL
which considers those URLs invalid. We needed to check that the
URLs are valid for our platform before starting the network
operation.
Fixes a crash running test
editing/execCommand/indent-paragraphs.html.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Check if the request URL is
valid from the platform point of view right after creating the
platform network request and return early if the URL is invalid
with StatusErrorInvalidUrl error.
2013-05-16 Patrick Gansterer <paroga@webkit.org>
Remove unused function safeCreateFile() from WebCore
https://bugs.webkit.org/show_bug.cgi?id=116211
Reviewed by Anders Carlsson.
* platform/FileSystem.h:
* platform/win/FileSystemWin.cpp:
2013-05-16 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] MIME type should be in lowercase
https://bugs.webkit.org/show_bug.cgi?id=116218
Reviewed by Benjamin Poulain.
Existing testcase: http/tests/mime/uppercase-mime-type.html
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Convert the MIME type to lowercase.
2013-05-16 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Fix optional value of promptText in Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=116203
Reviewed by Joseph Pecoraro.
Merge from https://chromiumcodereview.appspot.com/14672031.
No new tests needed.
* inspector/Inspector.json:
2013-05-16 Mary Wu <mary.wu@torchmobile.com.cn>
[BlackBerry] Unable to download blob resource
https://bugs.webkit.org/show_bug.cgi?id=115888
Reviewed by Benjamin Poulain.
Add BlobStream to handle over blob data from BlobResourceHandle to download stream.
RIM bug 331086, internally reviewed by Charles Wei and Leo Yang.
* PlatformBlackBerry.cmake:
* platform/network/blackberry/BlobStream.cpp: Added.
(WebCore):
(WebCore::BlobStream::BlobStream):
(WebCore::BlobStream::~BlobStream):
(WebCore::BlobStream::didReceiveData):
(WebCore::BlobStream::didFinishLoading):
(WebCore::BlobStream::didFail):
(WebCore::BlobStream::url):
(WebCore::BlobStream::mimeType):
* platform/network/blackberry/BlobStream.h: Added.
(WebCore):
(BlobStream):
2013-05-16 Anders Carlsson <andersca@apple.com>
Remove SystemTime header and implementations
https://bugs.webkit.org/show_bug.cgi?id=116200
Reviewed by Alexey Proskuryakov.
SystemTim just had a single function that's not called anymore. Remove it.
* GNUmakefile.list.am:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* history/PageCache.cpp:
* platform/SystemTime.h: Removed.
* platform/blackberry/SystemTimeBlackBerry.cpp: Removed.
* platform/efl/SystemTimeEfl.cpp: Removed.
* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/mac/SystemTimeMac.cpp: Removed.
* platform/qt/TemporaryLinkStubsQt.cpp:
* platform/win/SystemTimeWin.cpp: Removed.
2013-05-16 Glenn Adams <glenn@skynav.com>
[Inspector] Don't filter syntax error caused by asterisk in CSS Property name.
https://bugs.webkit.org/show_bug.cgi?id=116196
Reviewed by Benjamin Poulain.
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
- Remove questionable IE7 related error filtering
2013-05-16 Andreas Kling <akling@apple.com>
Page::chrome() should return a reference.
<http://webkit.org/b/116185>
Reviewed by Anders Carlsson.
A Page's chrome() can never be null. Change Page::chrome() to return a reference to reflect this.
Also, make Page::m_chrome a const member variable so nobody will accidentally set it to null.
2013-05-16 Simon Fraser <simon.fraser@apple.com>
Content disappears when scrolling http://www.childrenscancer.org/zach/
https://bugs.webkit.org/show_bug.cgi?id=116206
Reviewed by Darin Adler.
When a RenderLayerBacking gains or loses a foregroundLayer or backgroundLayer,
we need to repaint the primary layer, since what paints into that primary
layer will change.
On the page in question, we gained/lost a foreground layer when scrolling because
the page popped an element into position:fixed.
Test: compositing/repaint/foreground-layer-change.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
2013-05-16 Andy Estes <aestes@apple.com>
Do not indefinitely cache resources from blob URLs.
Reviewed by Alexey Proskuryakov.
Alexey pointed out after I landed r150169 that blob URLs backed by
files should return an error if the file changed after the URL was
created. By indefinitely caching them in memory, we don't give the
loader a chance to check for modification. Remove "blob" from the list
of schemes that should be indefinitely cached.
* platform/SchemeRegistry.cpp:
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
2013-05-16 Claudio Saavedra <csaavedra@igalia.com>
[CSS] CSS Variables are case-sensitive
https://bugs.webkit.org/show_bug.cgi?id=116239
Reviewed by Ryosuke Niwa.
The CSS Variables specification states that variables are
case-sensitive, unlike other CSS properties.
Test: fast/css/variables/case-sensitive.html
* css/CSSParser.cpp:
(WebCore::CSSParserString::substring): Replace
the now unnecessary lowerSubstring() with this method.
Also, since the method is only used by the CSS variables
implementation, #ifdef it.
(WebCore::CSSParser::createPrimitiveVariableNameValue):
(WebCore::CSSParser::storeVariableDeclaration):
Do not normalize variable declarations to lowercase.
* css/CSSParserValues.h:
(CSSParserString): Replace the lowerSubstring() declaration
and wrap with #if/#endif.
2013-05-16 Brady Eidson <beidson@apple.com>
svg/as-image/img-zoom-svg-stylesheet.html crashes with NetworkProcess enabled.
<rdar://problem/13837408> and https://bugs.webkit.org/show_bug.cgi?id=115917
Reviewed by Sam Weinig.
Give WebKit2 the ability to not mis-cast.
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::isEmptyFrameLoaderClient): Defaults to false, and include a FIXME
to remove it once https://bugs.webkit.org/show_bug.cgi?id=116233 is resolved.
* loader/EmptyClients.h: Make isEmptyFrameLoaderClient() return true, and add a FIXME to remove it.
2013-05-14 Martin Robinson <mrobinson@igalia.com>
[GTK] Add support for building WebCore to the cmake build
https://bugs.webkit.org/show_bug.cgi?id=116128
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Added.
* platform/gtk/GtkVersioning.c: Include "config.h" because we removed
the autotoolsconfig.h include from the header.
* platform/gtk/GtkVersioning.h: Remove autotoolsconfig.h include to support for
non-autotools build systems.
2013-05-15 Ryosuke Niwa <rniwa@webkit.org>
DocumentOrderedMap doesn't need to have two HashMaps
https://bugs.webkit.org/show_bug.cgi?id=116167
Reviewed by Geoffrey Garen.
Previously, we had two hash maps: m_map and m_duplicateCounts in DocumentOrderedMap to keep track
of the first element and the number of duplicates for a given name. This patch simplifies this structure
by having a single hash map that contains both the pointer and the number of duplicates.
In addition, this patch fixes a regression introduced in r149652 that window and document name maps
were not updated for some elements inside a SVG use element, and makes use of the newly added list of
the matching elements in SelectorQuery.
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::clear): Updated to use the new hash map.
(WebCore::DocumentOrderedMap::add): Ditto.
(WebCore::DocumentOrderedMap::remove): Ditto.
(WebCore::DocumentOrderedMap::get): Ditto.
(WebCore::DocumentOrderedMap::getAllElementsById): Added.
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::MapEntry::MapEntry): Added.
(WebCore::DocumentOrderedMap::containsSingle): Updated to use new hash map.
(WebCore::DocumentOrderedMap::contains): Ditto.
(WebCore::DocumentOrderedMap::containsMultiple): Ditto.
* dom/Element.cpp:
(WebCore::Element::insertedInto): This function didn't add this element to window and document's name maps
if the element had already been inserted into a tree scope, and the current call was inserting an ancestor
of the tree scope into the document. We were exiting early per scope != treeScope().
Fixed the bug by splitting updateId into two functions updateIdForTreeScope and updateIdForDocument.
The former is called when this element is inserted into a new tree scope, and the latter is called when
this element is inserted into a HTML document even if it had already been inside some tree scope.
(WebCore::Element::removedFrom): This function didn't remove this element from tree scope's id maps if
the tree scope wasn't a document. Fixed the bug by simply checking that the removal happens beneath the
current tree scope.
(WebCore::Element::updateName):
(WebCore::Element::updateNameForTreeScope): Renamed from updateName.
(WebCore::Element::updateNameForDocument): Extracted from updateName.
(WebCore::Element::updateId):
(WebCore::Element::updateIdForTreeScope): Renamed from updateId.
(WebCore::Element::updateIdForDocument): Extracted from updateId.
* dom/Element.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::canUseIdLookup): Refactored to return the id subselector instead of checking if
the first subselector happens to be matching an id.
(WebCore::SelectorDataList::execute): Use the subselector canUseIdLookup returned. Also make use of newly
added getAllElementsById when there are multiple matching elements for a given id.
* dom/SelectorQuery.h:
* dom/TreeScope.cpp:
(WebCore::TreeScope::getAllElementsById): Added.
* dom/TreeScope.h:
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard::create functions for Mac platform independent by moving Pasteboard creation to Pasteboard functions
https://bugs.webkit.org/show_bug.cgi?id=116179
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::createForCopyAndPaste): Moved the function here from
ClipboardMac, and have it use Pasteboard functions that are not Mac-specific.
(WebCore::Clipboard::create): Ditto.
(WebCore::Clipboard::createForDragAndDrop): Ditto.
* platform/DragData.h:
(WebCore::DragData::pasteboardName): Made this const.
* platform/Pasteboard.h: Added new create functions, used by the clipboard
create functions above.
* platform/mac/ClipboardMac.mm: Removed the functions that were moved to the
Clipboard.cpp file.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::createForCopyAndPaste): Added.
(WebCore::Pasteboard::createPrivate): Added.
(WebCore::Pasteboard::createForDragAndDrop): Added.
2013-05-15 Anders Carlsson <andersca@apple.com>
Fix a thinko.
We want to invalidate the file icon loader if it exists, not create it!
* html/FileInputType.cpp:
(WebCore::FileInputType::requestIcon):
2013-05-15 Darin Adler <darin@apple.com>
Move drag-specific Clipboard functions inside ENABLE(DRAG_SUPPORT)
https://bugs.webkit.org/show_bug.cgi?id=116176
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::writeRange):
(WebCore::Clipboard::writePlainText):
(WebCore::Clipboard::writeURL):
Move these three functions inside ENABLE(DRAG_SUPPORT). Even though their names do
not make it obvious, these are here only for use by dragging code. Later we may
refactor them away entirely, but for now it's good not to compile them in on any
platform that does not support dragging.
2013-05-15 Andy Estes <aestes@apple.com>
Resources from non-HTTP schemes should not be cached indefinitely
https://bugs.webkit.org/show_bug.cgi?id=113626
Reviewed by Ryosuke Niwa.
With the exception of schemes that we know will always return the same
result for a given URL, we should not indefinitely cache non-HTTP
resources when their freshness cannot be verified.
Writing a test for this is blocked on https://webkit.org/b/116199.
The following two existing tests of memory cache behavior were
converted to HTTP tests so that they continue to function as expected:
Tests: http/tests/cache/display-image-unset-allows-cached-image-load.html
http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::freshnessLifetime): Returned a freshness
lifetime of 0 for non-HTTP schemes that can't be indefinitely cached.
* platform/SchemeRegistry.cpp:
(WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely):
Checked whether the scheme is blob:, data:, or applewebdata:.
* platform/SchemeRegistry.h:
2013-05-15 Tim Horton <timothy_horton@apple.com>
makeRGBAFromNSColor throws an exception if given a color in a greyscale colorspace
https://bugs.webkit.org/show_bug.cgi?id=116198
<rdar://problem/13904395>
Reviewed by Simon Fraser.
Block Objective-C exceptions in makeRGBAFromNSColor.
Remove a comment saying that they're impossible.
Convert the incoming color to the DeviceRGB colorspace to match
existing color sources. Some rare cases (attributed strings that come
from PDFKit) can have DeviceGrayscale color spaces, which would
previously throw an exception here.
* platform/graphics/mac/ColorMac.mm:
(WebCore::makeRGBAFromNSColor):
2013-05-15 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r150140): Frame::editor() should return a reference for iOS, too
* platform/ios/ClipboardIOS.mm:
(WebCore::ClipboardIOS::ClipboardIOS):
(WebCore::ClipboardIOS::hasData):
(WebCore::ClipboardIOS::clearData):
(WebCore::ClipboardIOS::clearAllData):
(WebCore::ClipboardIOS::getData):
(WebCore::ClipboardIOS::setData):
(WebCore::ClipboardIOS::types):
(WebCore::ClipboardIOS::writeRange):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::getStringSelection):
(WebCore::Pasteboard::writeSelection):
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::writeImage):
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
(WebCore::Pasteboard::documentFragment):
2013-05-15 Anders Carlsson <andersca@apple.com>
Stop using the factory pattern in FileIconLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=116197
Reviewed by Andreas Kling.
Move the FileIconLoader member out of FileIconLoaderClient and into FileInputType and remove the factory gunk.
* html/FileInputType.cpp:
(WebCore::FileInputType::~FileInputType):
(WebCore::FileInputType::requestIcon):
* html/FileInputType.h:
(FileInputType):
* platform/FileIconLoader.cpp:
(WebCore::FileIconLoader::invalidate):
* platform/FileIconLoader.h:
(WebCore::FileIconLoaderClient::~FileIconLoaderClient):
(FileIconLoader):
2013-05-15 Anders Carlsson <andersca@apple.com>
Fix FileChooserClient design
https://bugs.webkit.org/show_bug.cgi?id=116195
Reviewed by Andreas Kling.
FileChooserClient doesn't match the standard WebCore client idiom of only having virtual member functions.
Instead it holds on to its FileChooser and it's even a factory for creating new file choosers(!).
Fix this by making it an abstract class, and moving FileChooser into FileInputType.
* html/FileInputType.cpp:
(WebCore::FileInputType::~FileInputType):
Invalidate the file chooser.
(WebCore::FileInputType::handleDOMActivateEvent):
Apply the file chooser settings.
(WebCore::FileInputType::applyFileChooserSettings):
Recreate the file chooser with new settings.
(WebCore::FileInputType::receiveDropForDirectoryUpload):
Apply the settings.
* platform/FileChooser.cpp:
(WebCore::FileChooser::invalidate):
Set m_client to null.
(WebCore::FileChooser::chooseFiles):
Early return.
* platform/FileChooser.h:
2013-05-15 Gavin Barraclough <barraclough@apple.com>
ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
https://bugs.webkit.org/show_bug.cgi?id=116193
Reviewed by Darin Adler
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::ScriptedAnimationController::setThrottled):
(WebCore::ScriptedAnimationController::scheduleAnimation):
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
- Fixes for review comments.
2013-05-15 Anders Carlsson <andersca@apple.com>
Move HTTPRequest class to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=116192
Reviewed by Darin Adler.
HTTPRequest is only used by the "remote inspector" feature in WebKit2,
so there's no need to have it in WebCore.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2013-05-15 Oliver Hunt <oliver@apple.com>
RefCountedArray needs to use vector initialisers for its backing store
https://bugs.webkit.org/show_bug.cgi?id=116194
Reviewed by Gavin Barraclough.
Update to use new functions for operating on the exception stack.
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
2013-05-15 Gavin Barraclough <barraclough@apple.com>
ScriptedAnimationController::setThrottled should extend MinimumAnimationInterval
https://bugs.webkit.org/show_bug.cgi?id=116193
Reviewed by Simon Fraser.
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
- initialize m_throttled
(WebCore::ScriptedAnimationController::setThrottled):
- sets m_throttled, reschedule when this changes.
(WebCore::ScriptedAnimationController::scheduleAnimation):
- if throtled don't use a display link, and extend the timeout.
* dom/ScriptedAnimationController.h:
(ScriptedAnimationController):
- Added m_throttled
2013-05-08 Gavin Barraclough <barraclough@apple.com>
Process suppression should throttle scripted animations
https://bugs.webkit.org/show_bug.cgi?id=115812
Reviewed by Simon Fraser.
<rdar://problem/13799726>
* WebCore.exp.in:
- Expose Page::setThrottled
* dom/Document.cpp:
(WebCore::Document::scriptedAnimationControllerSetThrottled):
(WebCore):
* dom/Document.h:
(Document):
- Forwards to ScriptedAnimationController::setThrottled
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::setThrottled):
(WebCore):
* dom/ScriptedAnimationController.h:
- Force use of a timer.
(ScriptedAnimationController):
* page/Page.cpp:
(WebCore::Page::setThrottled):
(WebCore):
* page/Page.h:
(Page):
- When under throttling force the ScriptedAnimationController to use a timer.
2013-05-15 Igor Oliveira <igor.o@sisa.samsung.com>
Implement run-in remove child cases.
https://bugs.webkit.org/show_bug.cgi?id=86520
Move runin to original position when sibling element is destroyed.
Reviewed by David Hyatt.
Tests: fast/runin/runin-remove-child-simple.html
fast/runin/runin-sibling-inline.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
If moveRunInUnderSiblingBlockIfNeeded is called when the sibling run-in block
is being destroyed, it means that the run-in is moving to original position and
we do not need to do nothing.
2013-05-15 Anders Carlsson <andersca@apple.com>
Remove WebSocketHandshakeResponse class
https://bugs.webkit.org/show_bug.cgi?id=116190
Reviewed by Andreas Kling.
Just use ResourceResponse instead of WebSocketHandshakeResponse.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::serverWebSocketProtocol):
(WebCore::WebSocketHandshake::serverSetCookie):
(WebCore::WebSocketHandshake::serverSetCookie2):
(WebCore::WebSocketHandshake::serverUpgrade):
(WebCore::WebSocketHandshake::serverConnection):
(WebCore::WebSocketHandshake::serverWebSocketAccept):
(WebCore::WebSocketHandshake::serverHandshakeResponse):
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
* Modules/websockets/WebSocketHandshakeResponse.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
2013-05-15 Eric Carlson <eric.carlson@apple.com>
[Mac] media engine may deliver NULL in-band "cue"
https://bugs.webkit.org/show_bug.cgi?id=116180
Reviewed by Jer Noble.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCue): NULL check before logging cue count.
2013-05-15 Darin Adler <darin@apple.com>
List platforms that still use the legacy clipboard instead of just saying "not Mac"
https://bugs.webkit.org/show_bug.cgi?id=116177
Reviewed by Andreas Kling.
* dom/Clipboard.h: Replaced the "!MAC || IOS" with a list of platforms still on the
legacy model.
2013-05-15 Yongjun Zhang <yongjun_zhang@apple.com>
We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
https://bugs.webkit.org/show_bug.cgi?id=116119
Reviewed by Oliver Hunt.
MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
cleared when we cancel the loader.
No new tests needed.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::continueAfterNavigationPolicy):
(WebCore::DocumentLoader::cancelMainResourceLoad):
(WebCore::DocumentLoader::clearMainResource):
(WebCore):
* loader/DocumentLoader.h: add helper method clearMainResource()
(DocumentLoader):
2013-05-15 Joe Mason <jmason@blackberry.com>
[BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
https://bugs.webkit.org/show_bug.cgi?id=116164
Reviewed by Rob Buis.
Internal PR: 338490
Internally Reviewed By: Lyon Chen
When there are multiple HTTP requests in flight with the same bad credentials (common with
proxy auth if the user mistyped their password), the first 407 that's received will cause
the credentials to be purged and the password dialog to open for new credentials. This means
that all 407's received after this should only purge the credentials if they have not
already been updated from the dialog; otherwise they will be wiping out credentials that
haven't failed yet.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::purgeCredentials):
2013-05-15 Chris Fleizach <cfleizach@apple.com>
AX: Use caching when requesting children object on iOS
https://bugs.webkit.org/show_bug.cgi?id=116112
Reviewed by David Kilzer.
Building up the children list in the AX hierarchy can be time consuming. On iOS, this
is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).
We can speed everything up if we just cache the isIgnored() attribute while building up children.
* accessibility/AXObjectCache.cpp:
(WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler):
(WebCore):
(WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler):
* accessibility/AXObjectCache.h:
(AXAttributeCacheEnabler):
(WebCore):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):
2013-05-15 Anders Carlsson <andersca@apple.com>
Remove WebSocketHandshakeRequest class
https://bugs.webkit.org/show_bug.cgi?id=116178
Reviewed by Andreas Kling.
Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason
why we can't just use a ResourceRequest instead.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didOpenSocketStream):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeRequest):
* Modules/websockets/WebSocketHandshake.h:
(WebCore):
* Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
* Modules/websockets/WebSocketHandshakeRequest.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
* platform/network/HTTPRequest.cpp:
(WebCore):
2013-05-15 Darin Adler <darin@apple.com>
Try to fix iOS build.
* platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
on iOS.
2013-05-13 Anders Carlsson <andersca@apple.com>
Frame::editor() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=116037
Reviewed by Darin Adler.
A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasMisspelling):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetSpelling):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes):
* dom/Document.cpp:
(WebCore::acceptsEditingFocus):
(WebCore::Document::setFocusedNode):
(WebCore::command):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapply):
(WebCore::EditCommandComposition::reapply):
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/DeleteButton.cpp:
(WebCore::DeleteButton::defaultEventHandler):
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::show):
* editing/DeleteButtonController.h:
(WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
(WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::doApply):
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
* editing/EditingStyle.cpp:
(WebCore::StyleChange::StyleChange):
* editing/Editor.cpp:
(WebCore::Editor::markMisspellingsAfterTypingToWord):
* editing/EditorCommand.cpp:
(WebCore::applyCommandToFrame):
(WebCore::executeToggleStyle):
(WebCore::executeApplyParagraphStyle):
(WebCore::expandSelectionToGranularity):
(WebCore::stateStyle):
(WebCore::valueStyle):
(WebCore::executeCopy):
(WebCore::executeCut):
(WebCore::executeDefaultParagraphSeparator):
(WebCore::executeDelete):
(WebCore::executeDeleteBackward):
(WebCore::executeDeleteBackwardByDecomposingPreviousCharacter):
(WebCore::executeDeleteForward):
(WebCore::executeDeleteToBeginningOfLine):
(WebCore::executeDeleteToBeginningOfParagraph):
(WebCore::executeDeleteToEndOfLine):
(WebCore::executeDeleteToEndOfParagraph):
(WebCore::executeDeleteToMark):
(WebCore::executeDeleteWordBackward):
(WebCore::executeDeleteWordForward):
(WebCore::executeFindString):
(WebCore::executeForwardDelete):
(WebCore::executeIgnoreSpelling):
(WebCore::executeInsertNewline):
(WebCore::executeMakeTextWritingDirectionLeftToRight):
(WebCore::executeMakeTextWritingDirectionNatural):
(WebCore::executeMakeTextWritingDirectionRightToLeft):
(WebCore::executeToggleOverwrite):
(WebCore::executePaste):
(WebCore::executePasteGlobalSelection):
(WebCore::executePasteAndMatchStyle):
(WebCore::executePasteAsPlainText):
(WebCore::executeRedo):
(WebCore::executeRemoveFormat):
(WebCore::executeSelectToMark):
(WebCore::executeSetMark):
(WebCore::executeStyleWithCSS):
(WebCore::executeUseCSS):
(WebCore::executeSwapWithMark):
(WebCore::executeTakeFindStringFromSelection):
(WebCore::executeTranspose):
(WebCore::executeUndo):
(WebCore::executeYank):
(WebCore::executeYankAndSelect):
(WebCore::supportedCopyCut):
(WebCore::supportedPaste):
(WebCore::enabledVisibleSelection):
(WebCore::enabledVisibleSelectionAndMark):
(WebCore::enableCaretInEditableText):
(WebCore::enabledCopy):
(WebCore::enabledCut):
(WebCore::enabledInEditableText):
(WebCore::enabledDelete):
(WebCore::enabledPaste):
(WebCore::enabledRedo):
(WebCore::enabledTakeFindStringFromSelection):
(WebCore::enabledUndo):
(WebCore::stateOrderedList):
(WebCore::stateStyleWithCSS):
(WebCore::stateUnorderedList):
(WebCore::valueDefaultParagraphSeparator):
* editing/FrameSelection.cpp:
(WebCore::shouldAlwaysUseDirectionalSelection):
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::nextWordPositionForPlatform):
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modify):
(WebCore::shouldStopBlinkingDueToTypingCommand):
(WebCore::FrameSelection::shouldDeleteSelection):
(WebCore::FrameSelection::shouldChangeSelection):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::doApply):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheck):
* editing/SpellingCorrectionCommand.cpp:
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
(WebCore::TypingCommand::markMisspellingsAfterTyping):
(WebCore::TypingCommand::typingAddedToOpenCommand):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
* editing/htmlediting.cpp:
(WebCore::createDefaultParagraphElement):
* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
* editing/markup.cpp:
(WebCore::createMarkup):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::endEditing):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::didSetValueByUserEdit):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::didOpenURL):
(WebCore::FrameLoader::clear):
* page/ContextMenuController.cpp:
(WebCore::insertUnicodeCharacter):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::find):
* page/DragController.cpp:
(WebCore::DragController::dispatchTextInputEventFor):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromMouseEvent):
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::EventHandler::handlePasteGlobalSelection):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::defaultKeyboardEventHandler):
(WebCore::EventHandler::defaultTextInputEventHandler):
(WebCore::EventHandler::defaultBackspaceEventHandler):
* page/FocusController.cpp:
(WebCore::relinquishesEditingFocus):
* page/Frame.cpp:
(WebCore::Frame::rangeForPoint):
* page/Frame.h:
(Frame):
(WebCore::Frame::editor):
* page/Page.cpp:
(WebCore::Page::findString):
(WebCore::Page::findStringMatchingRanges):
(WebCore::Page::rangeOfString):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::setDeviceScaleFactor):
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::writeRange):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asURL):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::getStringSelection):
(WebCore::Pasteboard::getDataSelection):
(WebCore::Pasteboard::writeSelectionForTypes):
(WebCore::writeURLForTypes):
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragment):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::dictationAlternatives):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintTextMatchMarker):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForPointWithInlineChildren):
* testing/Internals.cpp:
(WebCore::spellchecker):
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::hasSpellingMarker):
(WebCore::Internals::hasAutocorrectedMarker):
(WebCore::Internals::setContinuousSpellCheckingEnabled):
(WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
(WebCore::Internals::setAutomaticLinkDetectionEnabled):
(WebCore::Internals::setAutomaticDashSubstitutionEnabled):
(WebCore::Internals::setAutomaticTextReplacementEnabled):
(WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
(WebCore::Internals::isOverwriteModeEnabled):
(WebCore::Internals::toggleOverwriteModeEnabled):
(WebCore::Internals::hasGrammarMarker):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
https://bugs.webkit.org/show_bug.cgi?id=116166
Reviewed by Anders Carlsson.
* WebCore.exp.in: Add ~Clipboard since it's no longer a virtual function, but to the
non-iOS section, since iOS is still using the legacy version of Clipboard.
* dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.
2013-05-15 Dongseong Hwang <dongseong.hwang@intel.com>
Remove an overloaded strokeRect in <canvas>
https://bugs.webkit.org/show_bug.cgi?id=116017
Reviewed by Benjamin Poulain.
The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
remains only strokeRect with 4 arguments.
[1] http://www.w3.org/TR/2dcontext2/
Covered by existing tests: canvas/philip/tests/2d.missingargs.html
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::strokeRect):
* html/canvas/CanvasRenderingContext2D.h:
(CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.idl:
2013-05-15 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
[css3-text] text-decoration-line now accepts "blink" as valid value
https://bugs.webkit.org/show_bug.cgi?id=116104
Reviewed by Andreas Kling.
As of November 13th 2012, the W3C specification has been updated to
accept "blink" as a valid property value in text-decoration-line. Though
accepting the value as valid, it is ignored as CSS Level 1
text-decoration property currently does.
Updated related layout tests to reflect changes in specification.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseTextDecoration):
2013-05-14 Simon Fraser <simon.fraser@apple.com>
Revert http://trac.webkit.org/changeset/150047
It introduced unwanted behavioral differences between
Retina and non-Retina Mac hardware.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::computePixelAlignment):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Remove the ClipboardMac class and header file
https://bugs.webkit.org/show_bug.cgi?id=116165
Reviewed by Anders Carlsson.
* WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
* editing/mac/EditorMac.mm: Import Clipboard.h rather than ClipboardMac.h.
* page/mac/EventHandlerMac.mm: Ditto.
* platform/mac/ClipboardMac.h: Removed.
* platform/mac/ClipboardMac.mm: Import Clipboard.h rather than ClipboardMac.h.
Deleted ClipboardMac constructor.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
https://bugs.webkit.org/show_bug.cgi?id=116163
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.
* platform/mac/ClipboardMac.mm: Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
and it's not helpful to have the conditionals in here. It's helpful in cross-platform
source files.
(WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
Later could refactor to have the Pasteboard creation be platform-specific, and make these
functions platform-independent.
(WebCore::Clipboard::createForDragAndDrop): Ditto.
(WebCore::Clipboard::createForCopyAndPaste): Ditto.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
https://bugs.webkit.org/show_bug.cgi?id=116162
Reviewed by Andreas Kling.
* dom/Clipboard.h: Add createForCopyAndPaste function.
* editing/mac/EditorMac.mm:
(WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
Editor::newGeneralClipboard.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
https://bugs.webkit.org/show_bug.cgi?id=116161
Reviewed by Andreas Kling.
* dom/Clipboard.h: Added createForDragAndDrop function.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
instead of ClipboardMac::create.
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
EventHandler::createDraggingClipboard function did, soon to be refactored better.
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
https://bugs.webkit.org/show_bug.cgi?id=116159
Reviewed by Andreas Kling.
* dom/Clipboard.h:
(WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
object and need to get to the Pasteboard platform abstraction.
* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
Our long term plan is to delete writeClipboard.
* platform/Pasteboard.h: Added writePasteboard function.
(WebCore::Pasteboard::name): Made this const.
* platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
Deleted all the data members and the virtual destructor.
* platform/mac/ClipboardMac.mm: Deleted the many includes that are no longer needed.
Deleted the destructor, since it's now automatically generated. Deleted the comment
on an #endif since it's only a few source lines away from the #if.
(WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
since they are no longer used.
* platform/mac/PasteboardMac.mm: Changed include to Clipboard.h instead of ClipboardMac.h.
(WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.
2013-05-15 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
https://bugs.webkit.org/show_bug.cgi?id=116144
Reviewed by Timothy Hatcher.
No new tests, no behavior change.
* inspector/Inspector.json:
2013-05-15 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
https://bugs.webkit.org/show_bug.cgi?id=116035
Reviewed by Allan Sandfeld Jensen.
The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
which expects its QNetworkAccessManager to still be alive.
Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
instead. The QNetworkReply doesn't need to be aborted in this case anyway.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
(WebCore::QNetworkReplyWrapper::release):
(WebCore::QNetworkReplyWrapper::stopForwarding):
Rename resetConnections to stopForwarding since not all connections are related
to data forwarding to the client anymore.
(WebCore::QNetworkReplyWrapper::receiveMetaData):
(WebCore::QNetworkReplyWrapper::replyDestroyed):
(WebCore::QNetworkReplyWrapper::didReceiveFinished):
* platform/network/qt/QNetworkReplyHandler.h:
(QNetworkReplyWrapper):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard::declareAndWriteDragImage non-virtual
https://bugs.webkit.org/show_bug.cgi?id=116156
Reviewed by Anders Carlsson.
* dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.
* platform/Pasteboard.h:
(WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
pasteboard operations directly instead of through the Pasteboard class
functions. Not sure if we'll need it long term or not.
* platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.
* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
member instead of ClipboardMac.
2013-05-15 Peter Gal <galpeter@inf.u-szeged.hu>
[curl] Remove version #if guards
https://bugs.webkit.org/show_bug.cgi?id=116152
Reviewed by Brent Fulgham.
No tests required.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::platformSetDefersLoading): Removed version guard.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback): Ditto.
(WebCore::headerCallback): Ditto.
(WebCore::readCallback): Ditto.
(WebCore::ResourceHandleManager::dispatchSynchronousJob): Ditto.
(WebCore::ResourceHandleManager::initializeHandle): Ditto.
2013-05-15 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r150089): Make WebCoreTestShim build for iOS
* Configurations/WebCoreTestShim.xcconfig: Exclude
WebCoreTestShimLibrary.cpp when building for iOS.
2013-05-15 Radu Stavila <stavila@adobe.com>
[CSSRegions] Implement offsetParent for elements inside named flow
https://bugs.webkit.org/show_bug.cgi?id=113276
In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.
http://dev.w3.org/csswg/css-regions/#cssomview-offset-attributes
As a result of this change, the DumpRenderTree tool would crash in
WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent when running the selecting-text-through-different-region-flows.html
test. The RenderObjects inside a flow are attached to the RenderFlowThread. However, the RenderFlowThread is attached to the
RenderView directly, meaning that we are going to bypass the <body>'s RenderObject while iterating the parents.
Reviewed by Darin Adler.
Tests: fast/regions/offsetParent-body-in-flow-thread.html
fast/regions/offsetParent-in-flow-thread.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetParent):
2013-05-15 Darin Adler <darin@apple.com>
[Mac] Make Clipboard::createDragImage non-virtual
https://bugs.webkit.org/show_bug.cgi?id=116136
Reviewed by Benjamin Poulain.
* dom/Clipboard.h: Made createDragImage non-virtual for non-legacy.
* platform/mac/ClipboardMac.h: Removed frame argument from create function
and constructor. Removed createDragImage and dragNSImage. Removed m_frame
data member.
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::ClipboardMac): Removed frame argument and code
to initialize m_frame.
(WebCore::Clipboard::createDragImage): Merged the createDragImage and
dragNSImage functions, since they were the same thing. Changed code to get
the frame from the drag image element. Made the createDragImage function
a Clipboard member instead of ClipboardMac.
2013-05-15 Patrick Gansterer <paroga@webkit.org>
[WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
https://bugs.webkit.org/show_bug.cgi?id=116137
Reviewed by Andreas Kling.
Use zero for the glyp when the fontData pointer is null.
This aligns GlyphPageTreeNodeWinCE with the other implementations
and makes all ASSERT() pass in setGlyphDataForIndex().
* platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
(WebCore::GlyphPage::fill):
2013-05-15 Benjamin Poulain <bpoulain@apple.com>
Do not bloat HTMLTokenizer with a giant inline InputStreamPreprocessor::peek
https://bugs.webkit.org/show_bug.cgi?id=116066
Reviewed by Ryosuke Niwa.
Merge https://chromium.googlesource.com/chromium/blink/+/45e0337b2f2db535ab08365f6e763a5015e4d990.
On x86_64, this removes 40kb from the binary. On my machine it is completely neutral on performance.
* html/parser/InputStreamPreprocessor.h:
(WebCore::InputStreamPreprocessor::peek):
(InputStreamPreprocessor):
(WebCore::InputStreamPreprocessor::advance):
(WebCore::InputStreamPreprocessor::skipNextNewLine):
(WebCore::InputStreamPreprocessor::reset):
(WebCore::InputStreamPreprocessor::processNextInputCharacter):
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
Remove WTF_USE_PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=114431
Reviewed by Darin Adler.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::suspendPostAttachCallbacks):
(WebCore::ContainerNode::resumePostAttachCallbacks):
* dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* loader/CookieJar.cpp:
(WebCore::cookies):
(WebCore::setCookies):
(WebCore::cookiesEnabled):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/HistoryController.cpp:
(WebCore::addVisitedLink):
* loader/LoaderStrategy.cpp:
* loader/LoaderStrategy.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::resourceLoadScheduler):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::releaseResources):
(WebCore::ResourceLoader::willSendRequest):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::performPostLoadActions):
* platform/CookiesStrategy.h:
* platform/DatabaseStrategy.cpp:
* platform/DatabaseStrategy.h:
* platform/PasteboardStrategy.h:
* platform/PlatformStrategies.cpp:
* platform/PlatformStrategies.h:
* platform/VisitedLinkStrategy.h:
* platform/mac/PasteboardMac.mm:
* platform/network/BlobRegistry.cpp:
(WebCore::blobRegistry):
* plugins/PluginData.cpp:
(WebCore::PluginData::initPlugins):
* plugins/PluginStrategy.h:
* storage/StorageNamespace.cpp:
(WebCore::StorageNamespace::localStorageNamespace):
(WebCore::StorageNamespace::transientLocalStorageNamespace):
(WebCore::StorageNamespace::sessionStorageNamespace):
* storage/StorageStrategy.cpp:
* storage/StorageStrategy.h:
* workers/SharedWorkerStrategy.h:
2013-05-15 Dávid Szabolcs <David.Szabolcs@stud.u-szeged.hu>
[curl] Add support for HttpOnly cookies
https://bugs.webkit.org/show_bug.cgi?id=116102
Reviewed by Brent Fulgham.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::addMatchingCurlCookie):
(WebCore::cookiesForSession):
(WebCore::cookiesForDOM):
(WebCore):
(WebCore::cookieRequestHeaderFieldValue):
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r147548): Broken comboboxes
https://bugs.webkit.org/show_bug.cgi?id=115475
Reviewed by Gustavo Noronha Silva.
The problem is that r147548 made the popup to be closed when a
blur event is received. Right before showing the popup the input
element is focused, so that after the the popup is shown the focus
event is emitted and the event handler is called again hiding the
popup.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler): Check
element has lost the focus before closing the popup menu.
2013-05-14 Darin Adler <darin@apple.com>
[Mac] Move setDragImage from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116036
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::~Clipboard): Stop loading the drag image when
the clipboard object is deallocated. It would be better if there was
a more-well-defined time to stop the load.
(WebCore::Clipboard::setDragImage): Added. Sets up a drag image
based on a CachedImage. This tells the image loader to load the image
and updates the drag image when the image arrives. Copied from the
code in ClipboardMac, but refactored to use a separate loader object.
(WebCore::Clipboard::setDragImageElement): Added. Sets up a drag image
based on an element.
(WebCore::Clipboard::updateDragImage): Added. Common code to update
drag image when a new one is set or when a drag image load completes.
(WebCore::DragImageLoader::create): Added.
(WebCore::DragImageLoader::DragImageLoader): Ditto.
(WebCore::DragImageLoader::startLoading): Ditto.
(WebCore::DragImageLoader::stopLoading): Ditto.
(WebCore::DragImageLoader::imageChanged): Ditto.
* dom/Clipboard.h: Made setDragImage and setDragImageElement non-virtual
for non-legacy. Added updateDragImage and m_dragImageLoader.
* platform/Pasteboard.h: Added setDragImage function.
* platform/mac/ClipboardMac.h: Removed CachedImageClient as a base class
for ClipboardMac. Removed setDragImage and setDragImageElement.
* platform/mac/ClipboardMac.mm: Removed setDragImage and setDragImageElement.
(WebCore::ClipboardMac::~ClipboardMac): Removed code to remove self as
client loading the drag image. This is now in the Clipboard base class.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::setDragImage): Added. Contains code moved here
from ClipboardMac.
2013-05-14 Ryosuke Niwa <rniwa@webkit.org>
Use ElementTraversal in SelectorDataList::execute
https://bugs.webkit.org/show_bug.cgi?id=116131
Reviewed by Darin Adler.
Use ElementTraversal::firstWithin and ElementTraversal::next to simplify the code.
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
2013-05-14 Tim Horton <timothy_horton@apple.com>
[wk2] Not updating tiled backing coverage when main frame scrollability changes
https://bugs.webkit.org/show_bug.cgi?id=116123
<rdar://problem/13836559>
Reviewed by Simon Fraser.
Export FrameView::adjustTiledBackingCoverage.
* WebCore.exp.in:
2013-05-14 Alexey Proskuryakov <ap@apple.com>
[Mac] Add a testing shim for secure event input functions
https://bugs.webkit.org/show_bug.cgi?id=116122
Reviewed by Mark Rowe.
Added a new target with a dynamic library that interposes secure event input functions.
We need this to avoid interfering with user session state.
* Configurations/WebCoreTestShim.xcconfig: Added.
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
* testing/WebCoreTestShimLibrary.cpp: Added.
(shimEnableSecureEventInput):
(shimDisableSecureEventInput):
(shimIsSecureEventInputEnabled):
2013-05-14 Benjamin Poulain <bpoulain@apple.com>
Get rid of Gradient::getColor()
https://bugs.webkit.org/show_bug.cgi?id=116089
Reviewed by Andreas Kling.
This code is now useless, remove it.
* html/canvas/CanvasGradient.h:
(CanvasGradient):
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::Gradient):
(WebCore::Gradient::hash):
* platform/graphics/Gradient.h:
(Gradient):
2013-05-14 David Hyatt <hyatt@apple.com>
REGRESSION: united.com has overlapping elements and is broken by flex box changes.
https://bugs.webkit.org/show_bug.cgi?id=115329
<rdar://problem/13690610>
The new flexbox spec says that flex-basis omitted in the flex shorthand defaults to
0 when flex-grow/shrink are set. This has undesirable behavior when objects don't
end up flexing at all, and it's something the spec is going to eventually address.
For now, though, to fix the regression, I'm making a targeted "hack" to deliberately
violate the spec, but to do so as minimally as possible. This hack detects if there
is infinite available space on a line, and if so, it treats a flex-basis of 0 like
auto.
This means that when height is constrained and set by a container, flexing will do
the right thing. Basically any time you end up actually flexing, the spec behavior
should happen. If you're just laying out at intrinsic sizes, though, and no flexing
is going to occur, we ignore a flex-basis of 0 and just use the child's normal size.
Note that widths don't have to be patched because the preferred logical widths
algorithm is broken right now and not checking flex-basis. If it did, we'd have seen
the same bug in the width direction.
This width issue is covered by https://bugs.webkit.org/show_bug.cgi?id=116117
Reviewed by Simon Fraser.
Added fast/flexbox/auto-height-with-flex.html
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
Make sure we return LayoutUnit::max when you have infinite free space and not
max - borderPadding.
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
Only clear override size if it was set. Only mark for relayout if we did
an override size clear (i.e., if we were actually flexed). Add a new parameter,
hasInfiniteLineLength, that - if set - causes us to special case flex-basis:0
and treat it like flex-basis:auto.
(WebCore::RenderFlexibleBox::layoutFlexItems):
Define hasInfiniteLineLength and pass it to all the functions that need it.
(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
Remove the code that marks for layout and does a layout so early. This code
is moving (and changing) to preferredMainAxisContentExtentForChild.
(WebCore::RenderFlexibleBox::computeNextFlexLine):
Computes whether or not we have infinite line length now.
(WebCore::RenderFlexibleBox::freezeViolations):
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
Propagate hasInfiniteLineLength through to preferredMainAxisContentExtentForChild.
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):
Add hasInfiniteLineLength parameter to a bunch of functions.
2013-05-14 Andreas Kling <akling@apple.com>
Assertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDataForAllGlyphs)
<http://webkit.org/b/116113>
<rdar://problem/13833790>
Reviewed by Dan Bernstein.
If we're filling a full GlyphPage with a SimpleFontData that is actually a composite font reference,
we need to make sure we have per-glyph font data pointers, since it may end up using them.
Added GlyphPage::mayUseMixedFontDataWhenFilling() which can be implemented by the platform to let
GlyphPageTreeNode know that it should allocate a full-sized GlyphPage for mixed font data pointers
in case the font is a composite font reference, or if there are CJK ideographs in the text.
This code can be made smarter, but that's outside the scope of this change.
Fixes heavy asserting on bots running unreleased software.
* platform/graphics/GlyphPage.h:
(GlyphPage):
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::shouldUseCoreText):
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
2013-05-14 Bem Jones-Bey <bjonesbe@adobe.com>
Heap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
https://bugs.webkit.org/show_bug.cgi?id=115566
Reviewed by David Hyatt.
When a portion of the render tree is being detached, anonymous blocks
will be combined as their children are deleted. In this process, the
anonymous block later in the tree is merged into the one preceeding it.
It can happen that the later block contains floats that the previous
block did not contain, and thus are not in the floating objects list for
the new block. This can result in the new block containing floats that
are not in it's floating objects list, but are in the floating objects
lists of siblings and parents. This can cause problems when the float
itself is deleted, since the deletion code assumes that if a float is not
in it's containing block's floating objects list, it isn't in any
floating objects list, causing dangling pointers in the floating objects
lists of the siblings and parents. In order to preserve this condition
(removing it has serious performance implications), we need to copy the
floating objects from the old block to the new block. The float's
metrics will likely all be wrong, but since the new block is already
marked for layout, this will get fixed before anything gets displayed.
Test: fast/block/float/float-append-child-crash.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Copy
floating objects list in addition to children.
(WebCore::RenderBlock::FloatingObject::clone): Added.
(WebCore::RenderBlock::removeChild): Use new method to copy children.
* rendering/RenderBlock.h:
(RenderBlock): Add method.
2013-05-14 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r150023.
http://trac.webkit.org/changeset/150023
https://bugs.webkit.org/show_bug.cgi?id=116120
Causes table layout issues (Bug 116118) and crashes on
buildbot waterfall pages. (Requested by ddkilzer on #webkit).
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
* rendering/RenderTableSection.h:
(RenderTableSection):
2013-05-14 Antoine Quint <graouts@apple.com>
Snapshotted plug-ins shadow tree should reset style inheritance
https://bugs.webkit.org/show_bug.cgi?id=116098
Reset the styles such that only injected user-agent stylesheets affect
the rendering of snapshotted plug-ins' shadow content.
Reviewed by Darin Adler.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2013-05-14 Mihnea Ovidenie <mihnea@adobe.com>
[CSSRegions] Improve hit testing for empty regions
https://bugs.webkit.org/show_bug.cgi?id=115534
Reviewed by David Hyatt.
As a better follow up after WebKit bug https://bugs.webkit.org/show_bug.cgi?id=107752,
we can improve the code by not doing hit testing on the render flow thread object when
we are trying to hit test the render flow thread background. In this case, we should just bail out.
No new tests, covered by existing regions tests.
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::nodeAtPoint):
(WebCore):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/RenderFlowThread.h:
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Handle network errors when starting a new job
https://bugs.webkit.org/show_bug.cgi?id=116101
Reviewed by Rob Buis.
Make startJob() return a network status that can be used by the
caller to create a network error.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::initialize): createNetworkStream() should
always return a valid pointer so use an ASSERT instead of an early
return to make sure we have a valid stream.
(WebCore::NetworkJob::startNewJobWithRequest): Only return true if
the network job was started successfully.
* platform/network/blackberry/NetworkJob.h:
(NetworkJob): Make initialize method void instead of bool since it
can't fail.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Return a network error or
StatusSuccess.
* platform/network/blackberry/NetworkManager.h:
(NetworkManager):
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
(WebCore::ResourceHandle::start): Return true if job was started
successfully.
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
Check return value of startJob and fill the ResourceError with the
network status returned to finish the load.
2013-05-14 Antoine Quint <graouts@apple.com>
[Mac] captions menu is not positioned correctly in full-screen
https://bugs.webkit.org/show_bug.cgi?id=116103
Update the positioning properties of the captions menu in full-screen
following the fix for https://webkit.org/b/115968.
Reviewed by Darin Adler.
* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
Add 50px to the bottom position since we're now positioned relative to the
media element, and use a calc() command to be right-aligned to the captions
icon in the media controller. The max-width and max-height properties follow
the same technique used for the non-full-screen mode.
2013-05-14 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115921
Reviewed by Gustavo Noronha Silva.
No new tests - no new functionality.
* GNUmakefile.am: Add platform_cppflags to the list of CPPFLAGS for libWebCoreSVG, libWebCore,
libWebCorePlatform, libWebCoreGtk. Remove generation rules for ColorData.cpp and WebKitFontFamilyNames.(cpp|h).
* GNUmakefile.list.am: Include the ColorData.cpp and WebKitFontFamilyNames.(cpp|h) build targers under
platform_built_sources.
* bindings/gobject/GNUmakefile.am: Add platform_cppflags to the list of libWebCoreDOM CPPFLAGS.
2013-05-14 Zan Dobersek <zdobersek@igalia.com>
[GTK] libPlatform, libPlatformGtk must depend on the related GNUmakefiles
https://bugs.webkit.org/show_bug.cgi?id=115937
Reviewed by Martin Robinson.
No new tests - no new functionality.
* GNUmakefile.am: Fix typos in two libraries' names - Webcore -> WebCore.
2013-05-13 Ryosuke Niwa <rniwa@webkit.org>
Removing Attr can delete a wrong Attribute in ElementData
https://bugs.webkit.org/show_bug.cgi?id=116077
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/e861452a292e185501e48940305947aa6a4e23c2
after simplifying and renaming functions to be more WebKit style.
The XML parser can produce elements with attributes whose names have
distinct prefixes, but the same expanded name. When one of these
attributes is put up for adoption, it may be its similarly named
sibling that is removed from its owner element. As a result the
original owner hangs onto the adopted attribute, despite the fact that
it is now in a different document. Sometimes it's just hard to let go.
Test: fast/dom/adopt-attribute-crash.svg
* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::ElementData::getAttributeItemIndex):
* dom/Element.h:
(ElementData):
(Element):
2013-05-14 Antti Koivisto <antti@apple.com>
Remove ::-webkit-distributed()
https://bugs.webkit.org/show_bug.cgi?id=116106
Reviewed by Andreas Kling.
This experimental Shadow DOM selector code is unused and has no owner.
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
(WebCore::CSSParser::rewriteSpecifiersWithElementName):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::CSSParserSelector):
* css/CSSParserValues.h:
(CSSParserSelector):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/CSSSelectorList.cpp:
* css/CSSSelectorList.h:
(CSSSelectorList):
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::resetAuthorStyle):
* css/DocumentRuleSets.h:
(DocumentRuleSets):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAuthorRules):
* css/ElementRuleCollector.h:
(ElementRuleCollector):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
* css/SelectorFilter.cpp:
(WebCore::SelectorFilter::collectIdentifierHashes):
* html/shadow/InsertionPoint.cpp:
* html/shadow/InsertionPoint.h:
2013-05-14 Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
Remove RenderTheme::supportsCalendarPicker
https://bugs.webkit.org/show_bug.cgi?id=116068
Reviewed by Benjamin Poulain.
No new tests needed because it doesn't affect behaviour.
This method was never overrided by any platform
and always leaded to the same behaviour.
The code which depended on it was also removed.
* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
* page/ChromeClient.h:
(ChromeClient):
* rendering/RenderTheme.h:
2013-04-30 Balazs Kelemen <b.kelemen@sisa.samsung.com>
[GStreamer] cannot seek after video finished
https://bugs.webkit.org/show_bug.cgi?id=114044
Reviewed by Philippe Normand.
Test: media/video-seek-after-end.html
Reland without wrong assertion. If seek is called after didEnd the pipeline
state will not be in GST_STATE_NULL yet but it is not a problem because we handle that.
Rework the seeking logic to be able to seek after reseting the pipeline.
In addition to solve the actual problem this patch supposed to make seeking
more robust and correct.
The previous implementation tried to hide the complexity of asynchronous operations
on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
but instead reported the seek as finished when it saw an asynchronous pending state
(GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
Seeks are not the only operations executed asynchronously, changing the pipeling state is
similar. It means a seek can overlap with onother ongoing asynchronous operation.
This change address this by introducing an invariant for seeks, which is that we only request
a seek if there are no other ongoing asynchronous operations and the pipeline state is either
paused or playing (which is recommended anyway according to GStreamer's documentation).
This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
seek has been completed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::toGstClockTime): Factored time conversation into a helper.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
This function called when there is an intent to restart playback but it does not actually restart it.
(WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
(WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
Now we handle overlapping seeks as well because I saw that it can happen in some tests.
Added an early return for live streams as it doesn't makes sense to try seeking in them.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
now handled in asyncStateChangeDone.
(WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
2013-05-14 Zalan Bujtas <zalan@apple.com>
Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
https://bugs.webkit.org/show_bug.cgi?id=115858
Reviewed by Darin Adler.
Take text direction into account to calculate ellipsis position in case of
full truncation.
Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::placeEllipsisBox):
2013-05-14 Carlos Garcia Campos <cgarcia@igalia.com>
[BlackBerry] Implement platform strategies
https://bugs.webkit.org/show_bug.cgi?id=112162
Reviewed by Rob Buis.
This is just a refactoring, covered by existing tests.
* CMakeLists.txt: Move PlatformStrategies.cpp from platform
specific makefiles to the global one now that all platforms using
cmake implement platform strategies.
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* loader/CookieJar.cpp: Remove the preprocessor error that is not
needed anymore.
* loader/blackberry/CookieJarBlackBerry.cpp: Removed.
* platform/network/blackberry/CookieJarBlackBerry.cpp: Added.
(WebCore):
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
* plugins/blackberry/PluginDataBlackBerry.cpp: Removed.
2013-05-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
https://bugs.webkit.org/show_bug.cgi?id=116035
Reviewed by Simon Hausmann.
Reproduced with arora which does destroy the QNetworkAccessManager in some situations.
The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle
with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager.
* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper.
(WebCore::QNetworkReplyWrapper::release):
2013-05-13 Eric Carlson <eric.carlson@apple.com>
[Mac] update in-band caption attributes
https://bugs.webkit.org/show_bug.cgi?id=116057
Reviewed by Dean Jackson.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::updateCueFromCueData): Copy highlight color.
* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): "highlight" color sets the cue
background, "background" color sets the cue container background.
* html/track/TextTrackCueGeneric.h:
* platform/graphics/InbandTextTrackPrivateClient.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process "highlight" color.
2013-05-13 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r150049): Fix RetainPtr<> type in PasteboardIOS.mm
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeImage): Use RetainPtr<CFStringRef>
instead of RetainPtr<NSString>.
2013-05-13 Benjamin Poulain <bpoulain@apple.com>
Remove platform/graphic's Generator
https://bugs.webkit.org/show_bug.cgi?id=116084
Reviewed by Darin Adler.
The Generator no longer abstract anything useful, its only
implementation is Gradient.
* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GeneratedImage.h:
* platform/graphics/Generator.h: Removed.
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::create):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
(GeneratorGeneratedImage):
* platform/graphics/Gradient.h:
(WebCore):
(Gradient):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRect):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):
2013-05-13 David Kilzer <ddkilzer@apple.com>
Upstream iOS Clipboard and Pasteboard changes
<http://webkit.org/b/116062>
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
* dom/Clipboard.h:
* platform/Pasteboard.h:
* platform/ios/ClipboardIOS.h: Added.
* platform/ios/ClipboardIOS.mm: Added.
* platform/ios/PasteboardIOS.mm: Added.
2013-05-13 Huang Dongsung <luxtella@company100.net>
[Mac] Use pageScaleFactor * deviceScaleFactor in requiresTiledLayer() and computePixelAlignment() of GraphicsLayerCA.
https://bugs.webkit.org/show_bug.cgi?id=107359
Reviewed by Darin Adler.
Currently GraphicsLayerCA uses pageScaleFactor in requiresTiledLayer() and
computePixelAlignment(), but we must use pageScaleFactor * deviceScaleFactor in
them.
It is because:
1. requiresTiledLayer() uses the scale to compute an actual layer size in the device
pixel unit.
2. computePixelAlignment() uses the scale to compute an aligned layer position
in the device pixel unit.
No new tests. We can not test about requiresTiledLayer() because it depends on
gpu. computePixelAlignment() is correct now because fortunately Mac uses
only 2 (for retina display) as a deviceScaleFactor.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::computePixelAlignment):
2013-05-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Rename BarInfo to BarProp and remove [NoInterfaceObject]
https://bugs.webkit.org/show_bug.cgi?id=116027
Reviewed by Andreas Kling.
Rename BarInfo to BarProp and remove [NoInterfaceObject] extended attribute from
the IDL interface to match the specification:
http://www.w3.org/html/wg/drafts/html/master/browsers.html#barprop
The new behavior also matches Firefox and Blink.
No new tests, covered by LayoutTests/fast/js/global-constructors-attributes.html.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/gobject/GNUmakefile.am:
* page/BarProp.cpp: Renamed from Source/WebCore/page/BarInfo.cpp.
* page/BarProp.h: Renamed from Source/WebCore/page/BarInfo.h.
* page/BarProp.idl: Renamed from Source/WebCore/page/BarInfo.idl.
* page/DOMWindow.cpp:
* page/DOMWindow.h:
* page/DOMWindow.idl:
2013-05-13 Anders Carlsson <andersca@apple.com>
Remove ChromeClient::willPopupMenu
https://bugs.webkit.org/show_bug.cgi?id=116063
Reviewed by Andreas Kling.
Remove ChromeClient::willPopupMenu.
* page/ChromeClient.h:
2013-05-13 Beth Dakin <bdakin@apple.com>
Headers and footers should be pinned to the left edge of the window when scrolling
horizontally
https://bugs.webkit.org/show_bug.cgi?id=116061
-and corresponding-
<rdar://problem/13599215>
Reviewed by Simon Fraser.
The scrolling thread will need to know about the header and footer layers in order
the implement this custom scrolling behavior.
These getters will fetch the header or footer layer from the FrameView as
appropriate.
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::headerLayerForFrameView):
(WebCore::ScrollingCoordinator::footerLayerForFrameView):
* page/scrolling/ScrollingCoordinator.h:
When we’re scrolling on the main thread, adjust the position of the header and
footer layers here.
(WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
ScrollingStateScrollingNode now stores GraphicsLayers and PlatformLayers for the
header and footer, just like it already does for the counterScrollingLayer.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* page/scrolling/ScrollingStateScrollingNode.h:
(ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::headerLayer):
(WebCore::ScrollingStateScrollingNode::footerLayer):
Setters for the new layers.
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorMac::setHeaderLayerForNode):
(WebCore::ScrollingCoordinatorMac::setFooterLayerForNode):
These setters and getters mirror the existing one for counterScrollingLayer.
* page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
(WebCore::ScrollingStateScrollingNode::headerPlatformLayer):
(WebCore::ScrollingStateScrollingNode::setHeaderLayer):
(WebCore::ScrollingStateScrollingNode::footerPlatformLayer):
(WebCore::ScrollingStateScrollingNode::setFooterLayer):
And the ScrollingTree will store CALayers for the header and footer.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
(ScrollingTreeScrollingNodeMac):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
This is where the magic happens when we are scrolling on the scrolling thread.
Adjust the horizontal position the behave like a fixed object, but keep the
vertical position what it was when layer was created.
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
RenderLayerCompositor must now provide getters for the header and footer.
* rendering/RenderLayerCompositor.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::headerLayer):
(WebCore::RenderLayerCompositor::footerLayer):
Set the anchor point for when we adjust the position later on. Also call
frameViewRootLayerDidChange() to get the new layers picked up and sent to the
scrolling tree.
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
2013-05-12 Timothy Hatcher <timothy@apple.com>
Add support for updating the Web Inspector toolbar height.
https://bugs.webkit.org/show_bug.cgi?id=115996
Reviewed by Joseph Pecoraro and Benjamin Poulain.
* inspector/InspectorFrontendClient.h:
(InspectorFrontendClient):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::setToolbarHeight):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:
* testing/Internals.cpp:
2013-05-13 Dean Jackson <dino@apple.com>
toDataURL can return an empty image in some cases
https://bugs.webkit.org/show_bug.cgi?id=115981
<rdar://problem/13760256>
Reviewed by Darin Adler.
In some accelerated rendering cases, calling toDataURL on
an off-screen canvas produced an empty image. The solution
was to force a CGContextFlush before extracting the data
for image generation.
While here, I collected the flushing code from other methods
into a single place. Also we were getting into a situation where
we called flush two times in a row.
Test: fast/canvas/toDataURL-not-empty.html
* platform/graphics/ImageBuffer.h:
(ImageBuffer): Define two new methods flushContext and flushContextIfNecessary.
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::ImageBuffer::context): Call flushContextIfNecessary.
(WebCore::ImageBuffer::flushContextIfNecessary): Moved the 10.7 code in here.
(WebCore::ImageBuffer::flushContext): Calls CGContextFlush.
(WebCore::ImageBuffer::getUnmultipliedImageData): Call new helper.
(WebCore::ImageBuffer::getPremultipliedImageData): Call new helper.
(WebCore::ImageBuffer::toDataURL): Flush the CG context.
2013-05-13 David Hyatt <hyatt@apple.com>
Regressions in flexbox layout caused by the flexing optimizations.
https://bugs.webkit.org/show_bug.cgi?id=116058
<rdar://problem/13863647>
Reviewed by Beth Dakin.
Roll out the flex-related changes from r149597 so that the layout
algorithm goes back to the way it was. Leave the repainting optimizations
in place though.
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::gatherFlexChildrenInfo):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2013-05-13 Philippe Normand <pnormand@igalia.com>
Unreviewed, rolling out r150014.
http://trac.webkit.org/changeset/150014
https://bugs.webkit.org/show_bug.cgi?id=86410
Broke video playback on WK2 and some webgl tests
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
2013-05-13 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed, rolling out r150022.
http://trac.webkit.org/changeset/150022
https://bugs.webkit.org/show_bug.cgi?id=114044
Causes assertions in media tests
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
(WebCore::MediaPlayerPrivateGStreamer::currentTime):
(WebCore::MediaPlayerPrivateGStreamer::seek):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
2013-05-13 Bem Jones-Bey <bjonesbe@adobe.com>
Floats should not overhang from flex items
https://bugs.webkit.org/show_bug.cgi?id=115925
Reviewed by David Hyatt.
Allowing floats to overhand from flex items is not only against the
spec, it causes bad bugs. Fix this by having flex items properly avoid
floats.
Test: fast/block/float/float-not-removed-crash2.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::avoidsFloats): Add flex items to avoid floats.
* rendering/RenderBox.h:
(WebCore::RenderBox::isFlexItemIncludingDeprecated): Determine if the current box is a
flex item or deprecated flex item.
2013-05-13 Zoltan Horvath <zoltan@webkit.org>
[CSS Regions][CSS Exclusions] Shape-inside on regions should respect region borders and paddings
https://bugs.webkit.org/show_bug.cgi?id=115456
Reviewed by David Hyatt.
I refactored the computation logic of shape-inside on regions by removing access to RenderFlowThread from ExclusionShapeInfo's logicalTopOffset
function, this means all the logic is now existing in RenderBlockLineLayout.cpp. By modifying the logicalTopOffset it turned out that the borders
and padding hadn't worked correctly, since borders and paddings were counted twice in the shape-inside's computation. This patch adds the necessary
modifications to let it respect the borders and padding in the correct way. I created 2 new helper functions to prevent increasing the code size of
the layoutRunsAndFloatsInRange function.
I introduced 7 new tests to test for testing the correct behavior.
Tests: fast/regions/shape-inside/shape-inside-on-first-region-block-content.html
fast/regions/shape-inside/shape-inside-on-first-region-inline-content.html
fast/regions/shape-inside/shape-inside-on-second-region-block-content.html
fast/regions/shape-inside/shape-inside-on-second-region-inline-content.html
fast/regions/shape-inside/shape-inside-on-regions-inline-content.html
fast/regions/shape-inside/shape-inside-with-region-borders.html
fast/regions/shape-inside/shape-inside-with-region-padding.html
* rendering/ExclusionShapeInfo.cpp:
(WebCore): Remove FlowThread logic from logicalTopOffset move definition to header.
* rendering/ExclusionShapeInfo.h:
(WebCore::ExclusionShapeInfo::logicalTopOffset): Moved from cpp.
(WebCore::ExclusionShapeInfo::logicalLeftOffset): Add condition for RenderRegions.
* rendering/RenderBlock.h:
(RenderBlock): Add definition to the new helper members.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutExclusionShapeInsideInfo): Modified the flow thread case to return the appropriate region.
(WebCore::RenderBlock::updateLineBoundariesForExclusions): Added new helper function. Modify the shape-inside on regions
line boundaries and position computation logic.
(WebCore::RenderBlock::adjustLogicalLineTopAndLogicalHeightIfNeeded): Added new helper function which handles the flow thread case also.
(WebCore::RenderBlock::layoutRunsAndFloatsInRange): Modified the code to use the helper functions.
2013-05-13 Bear Travis <betravis@adobe.com>
[css exclusions] Enable CSS Exclusions by default when CSS_EXCLUSIONS is set
https://bugs.webkit.org/show_bug.cgi?id=115919
Reviewed by Dean Jackson.
Change the RuntimeEnabledFeatures::isCSSExclusionsEnabled boolean to default
to true. CSS Exclusions can still be enabled / disabled in platforms by
setting the CSS_EXCLUSIONS compile flag in one of the FeatureDefine files.
Test: fast/exclusions/css-exclusions-enabled.html
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
2013-05-13 Suchit Agrawal <a.suchit@samsung.com>
Cell heights are disproportional when a row-spanning cell contains a block element that determines the height of the rows
https://bugs.webkit.org/show_bug.cgi?id=52185
Reviewed by David Hyatt.
Cells heights are not proper when rowspan cell have its own height and rowspan height
is more than the height of the rows present in rowspan.
After calculating logical height of the rows in the table, we are recalculating the height
of the rows present in rowspan. Based on the ratio of row's logical height, we are
distributing rowspan cell height in rows.
Test: fast/table/table-rowspan-height-distribution-in-rows.html
* rendering/RenderTableSection.cpp:
(WebCore):
Update the logical height of the rows based on rowspan cell height.
(WebCore::RenderTableSection::distributeRowSpanHeightToRows):
It calculates logical height of the rows in the table.
(WebCore::RenderTableSection::calcRowLogicalHeight):
Added new private API to distribute rowSpan cell height in rows.
* rendering/RenderTableSection.h:
(RenderTableSection):
2013-04-30 Balazs Kelemen <b.kelemen@sisa.samsung.com>
[GStreamer] cannot seek after video finished
https://bugs.webkit.org/show_bug.cgi?id=114044
Reviewed by Philippe Normand.
Test: media/video-seek-after-end.html
Rework the seeking logic to be able to seek after reseting the pipeline.
In addition to solve the actual problem this patch supposed to make seeking
more robust and correct.
The previous implementation tried to hide the complexity of asynchronous operations
on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
but instead reported the seek as finished when it saw an asynchronous pending state
(GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
Seeks are not the only operations executed asynchronously, changing the pipeling state is
similar. It means a seek can overlap with onother ongoing asynchronous operation.
This change address this by introducing an invariant for seeks, which is that we only request
a seek if there are no other ongoing asynchronous operations and the pipeline state is either
paused or playing (which is recommended anyway according to GStreamer's documentation).
This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
seek has been completed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::toGstClockTime): Factored time conversation into a helper.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
this workaround. Otherwise those overlapping operations are handled fine by GStreamer.
(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
This function called when there is an intent to restart playback but it does not actually restart it.
(WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
(WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
Now we handle overlapping seeks as well because I saw that it can happen in some tests.
Added an early return for live streams as it doesn't makes sense to try seeking in them.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
now handled in asyncStateChangeDone.
(WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move writeRange/PlainText/URL from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116009
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::writeRange): Added. Moved from ClipboardMac,
but added some FIXMEs.
(WebCore::Clipboard::writePlainText): Ditto.
(WebCore::Clipboard::writeURL): Ditto.
* dom/Clipboard.h: Made writeURL, writeRange, and writePlainText
non-virtual in non-legacy clipboard implementations.
* platform/mac/ClipboardMac.h: Removed writeRange, writeURL, and
writePlainText.
* platform/mac/ClipboardMac.mm: Ditto.
2013-05-13 Noam Rosenthal <noam@webkit.org>
[CoordGfx] requestAnimationFrame performance issues
https://bugs.webkit.org/show_bug.cgi?id=112345
Reviewed by Jocelyn Turcotte.
Removed current requestAnimationFrame logic from CoordinatedGraphics. The new logic
is entirely in WebKit2 CoordinatedLayerTreeHost.
Covered by existing tests in fast/animations.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(CoordinatedGraphicsScene):
2013-05-13 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap][GStreamer] Composited Video support
https://bugs.webkit.org/show_bug.cgi?id=86410
Reviewed by Philippe Normand.
Enable the video accelerated compositing using the WebKit's
TextureMapper.
This patch does not use hardware accelerated video decoding. It
provides a generic path for system memory buffers.
No new tests, already covered by existing tests.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore):
(WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
texture content with the new received video buffer.
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
use the accelerated compositing or the normal code path
(WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
compositing is used this method is halted.
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
a texture from the pool and draws it if it is already available.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
(MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
(WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
returns true
2013-05-13 Andreas Kling <akling@apple.com>
Document: Use a DeferrableOneShotTimer to throw out StyleResolver when unused.
<http://webkit.org/b/115929>
Reviewed by Anders Carlsson.
Nothing exciting here, just replacing a rickety-looking punting mechanism with a proper
DeferrableOneShotTimer. Note that the timeout changes from 60 to 30 seconds because DOST
works by punting a full interval on next timeout.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didAccessStyleResolver):
(WebCore::Document::styleResolverThrowawayTimerFired):
* dom/Document.h:
(Document):
2013-05-13 Andreas Kling <akling@apple.com>
REGRESSION(r149287): FoldingText only shows me half of my text.
<http://webkit.org/b/115956>
<rdar://problem/13831099>
Reviewed by Antti Koivisto.
Check if the FrameView geometry changed post-layout, and send a resize event if needed.
This brings us closer to the original resize event behavior, with the exception that
setFrameRect() still fires an event right away if possible. This means we are still
guarded from FOUC's but frames that layout via [WebHTMLView layoutToMinimumPageWidth]
also get resize events like they used to.
No new tests, because I don't know how to test this.
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
Factor out the resize event logic from setFrameRect() so we can call it from both
there and performPostLayoutTasks(). sendResizeEventIfNeeded() only sends an event
if view geometry or zoom factor has changed since last time it was called.
2013-05-13 Antti Koivisto <antti@apple.com>
Remove unneeded counters from ScopeContentDistribution.
https://bugs.webkit.org/show_bug.cgi?id=116028
Reviewed by Andreas Kling.
They don't do much.
* WebCore.exp.in:
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::ShadowRoot):
* dom/ShadowRoot.h:
No need for registration code anymore.
* html/shadow/ContentDistributor.cpp:
(WebCore::ScopeContentDistribution::ScopeContentDistribution):
Default m_insertionPointListIsValid to true to avoid crawling when there are no InsertionPoints.
(WebCore::ScopeContentDistribution::ensureInsertionPointList):
(WebCore::ScopeContentDistribution::registerInsertionPoint):
(WebCore::ScopeContentDistribution::unregisterInsertionPoint):
* html/shadow/ContentDistributor.h:
Remove distributeNodeChildrenTo, it was only used by the older/younger shadow root code.
* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
2013-05-13 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Remove unused references from projects in Visual Studio
https://bugs.webkit.org/show_bug.cgi?id=116002
Reviewed by Csaba Osztrogonác.
nativeMemoryProfiler.css and NativeMemorySnapshotView.js were removed in r149807.
No new tests, no behavior change.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-05-13 Zalan Bujtas <zalan@apple.com>
WebProcess consuming very high CPU on linkedin.com
https://bugs.webkit.org/show_bug.cgi?id=115601
Reviewed by Andreas Kling.
Disable WEB_TIMING_MINIMAL.
Turn off window.performance and performance.now(). Some JS frameworks expect
additional Web Timing APIs, when performance.now() is available.
* Configurations/FeatureDefines.xcconfig:
* dom/EventTargetFactory.in:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::resetDOMWindowProperties):
(WebCore):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* page/Performance.cpp:
(WebCore::Performance::timing):
* page/Performance.h:
(Performance):
* page/Performance.idl:
2013-05-12 Eric Carlson <eric.carlson@apple.com>
REGRESSION (r149749): Video becomes invisible when it starts playing at newyorkbygehry.com
https://bugs.webkit.org/show_bug.cgi?id=115963
Reviewed by Dean Jackson.
Test: media/video-remove-insert-repaints.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::insertedInto): Set m_inActiveDocument when inserted into a document.
(WebCore::HTMLMediaElement::removedFrom): Fix logging.
2013-05-12 David Kilzer <ddkilzer@apple.com>
Move sudden termination symbols to the Mac-only section
* WebCore.exp.in: Move the sudden termination symbols to the
!PLATFORM(IOS) section for reals this time.
2013-05-12 Darin Adler <darin@apple.com>
Fix Mac build.
* platform/mac/PasteboardMac.mm: Add back include of ClipboardMac.h
that was removed by accident a couple of patches back.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Moved files function from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116008
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::files): Added. Moved the DOM-depdendent and
platform-independent part of the files function in ClipboardMac here.
* dom/Clipboard.h: Made files function non-virtual in non-legacy case.
* platform/Pasteboard.h: Removed static member function
absoluteURLsFromPasteboardFilenames since it can now be private to
PasteboardMac. Added member function readFilenames.
* platform/mac/ClipboardMac.h: Removed function member files and also
now-unused data member m_clipboardContents.
* platform/mac/ClipboardMac.mm: Removed files function.
(WebCore::ClipboardMac::ClipboardMac): Removed code to initialize
m_clipboardContents.
* platform/mac/PasteboardMac.mm:
(WebCore::absoluteURLsFromPasteboardFilenames): Changed from a static
member function to a file-local function.
(WebCore::absoluteURLsFromPasteboard): Changed to call the function
above in its new location.
(WebCore::Pasteboard::readFilenames): Added. Code from ClipboardMac,
minus the DOM-specific parts. Added a FIXME about the peculiar round
trip through NSURL this code takes.
2013-05-12 Anders Carlsson <andersca@apple.com>
Fix WebKit2 build.
* WebCore.exp.in:
Put WebCore::disableSuddenTermination and WebCore::enableSuddenTermination symbols in the right section.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move types function from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116007
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Added. Calls through to Pasteboard
after doing checks needed at this level.
* dom/Clipboard.h: Made types function non-virtual in non-legacy case,
and removed non-helpful comment.
* platform/Pasteboard.h: Updated includes and comments at the top of
the file a bit. Removed static member function addHTMLClipboardTypesForCocoaType,
since it can now be private to PasteboardMac. Added member function types.
* platform/mac/ClipboardMac.h: Removed types function.
* platform/mac/ClipboardMac.mm: Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::addHTMLClipboardTypesForCocoaType): Made this a file-local
function instead of a static member function.
(WebCore::Pasteboard::types): Added. Moved from ClipboardMac.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move setData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116006
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::setData): Added. Calls through to Pasteboard
after doing checks needed at this level.
* dom/Clipboard.h: Made setData non-virtual in non-legacy case.
* platform/Pasteboard.h: Updated includes and forward declarations.
Removed static member function cocoaTypeFromHTMLClipboardType, since
it can now be private to PasteboardMac. Added static member function
addHTMLClipboardTypesForCocoaType, which is shared between the
ClipboardMac and PasteboardMac files for now. Added writeString.
* platform/mac/ClipboardMac.h: Removed setData.
* platform/mac/ClipboardMac.mm: Removed utiTypeFromCocoaType,
addHTMLClipboardTypesForCocoaType, and setData.
(WebCore::ClipboardMac::types): Call addHTMLClipboardTypesForCocoaType
as a Pasteboard static member function, for now.
* platform/mac/PasteboardMac.mm:
(WebCore::cocoaTypeFromHTMLClipboardType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::readString): Changed to call
cocoaTypeFromHTMLClipboardType as a file-local function, not a member
function (in fact, we didn't need to repeat the class name before, either,
so this is just removing something we didn't need).
(WebCore::utiTypeFromCocoaType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move getData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116005
Reviewed by Anders Carlsson.
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Added a new boolean argument, forFileDrag,
to the constructor. Maybe we can find a better way to do this once we move
all the platforms over, but this boolean seems a good way to do it for now.
(WebCore::Clipboard::getData): Added. Calls through to Pasteboard after
doing the canReadData check, which is part of DOM rules, not the platform.
Also checks for the file drag case like the old ClipboardMac code did.
* dom/Clipboard.h: Made getData non-virtual in non-legacy case.
* platform/Pasteboard.h: Added a static member function named
absoluteURLsFromPasteboardFilenames, temporary so it can be shared between
ClipboardMac and PasteboardMac. Added a readString public function member,
and a m_changeCount data member. The type of m_changeCount is long since
that can always hold an NSInteger but yet is a type we can compile without
including the header file that defines NSInteger.
* platform/mac/ClipboardMac.h: Removed getData.
* platform/mac/ClipboardMac.mm: Removed getData.
(WebCore::ClipboardMac::ClipboardMac): Added code to pass in the new
forFileDrag boolean.
(WebCore::ClipboardMac::files): Call absoluteURLsFromPasteboardFilenames
as a static member function in Pasteboard since we moved it there.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::Pasteboard): Initialize the change count, so later
pasteboard operations can check it.
(WebCore::Pasteboard::absoluteURLsFromPasteboardFilenames): Added. Moved
here from ClipboardMac.
(WebCore::absoluteURLsFromPasteboard): Ditto.
(WebCore::Pasteboard::readString): Added. Moved here from ClipboardMac.
2013-05-12 Anders Carlsson <andersca@apple.com>
Stop including UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116003
Reviewed by Sam Weinig.
UnusedParam.h is empty now so there's no need to include it anymore.
* Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/webdatabase/DatabaseServer.cpp:
* Modules/webdatabase/DatabaseThread.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/objc/DOMObject.mm:
* css/CSSCursorImageValue.cpp:
* css/DeprecatedStyleBuilder.cpp:
* dom/EventDispatcher.cpp:
* dom/Node.cpp:
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
* html/HTMLPlugInElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/OESVertexArrayObject.h:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLTokenizer.cpp:
* html/track/InbandTextTrack.cpp:
* inspector/InspectorCanvasInstrumentation.h:
* inspector/InspectorConsoleInstrumentation.h:
* inspector/InspectorController.cpp:
* inspector/InspectorCounters.h:
* inspector/InspectorDatabaseInstrumentation.h:
* inspector/InspectorInstrumentation.h:
* loader/DocumentThreadableLoader.cpp:
* loader/PingLoader.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* loader/cache/CachedResourceLoader.cpp:
* loader/mac/DocumentLoaderMac.cpp:
* page/ChromeClient.h:
* page/Console.cpp:
* page/FrameView.cpp:
* page/PageConsole.cpp:
* page/animation/AnimationController.cpp:
* page/animation/ImplicitAnimation.cpp:
* page/animation/KeyframeAnimation.cpp:
* platform/LocalizedStrings.cpp:
* platform/ScrollAnimator.h:
* platform/ThreadGlobalData.cpp:
* platform/blackberry/AsyncFileSystemBlackBerry.cpp:
* platform/graphics/Font.cpp:
* platform/graphics/GlyphBuffer.h:
* platform/graphics/Gradient.cpp:
* platform/graphics/ShadowBlur.cpp:
* platform/graphics/SimpleFontData.cpp:
* platform/graphics/SimpleFontData.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/blackberry/GradientBlackBerry.cpp:
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/mac/WebTileLayer.mm:
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/clutter/PlatformClutterAnimation.cpp:
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/graphics/mac/SimpleFontDataMac.mm:
* platform/graphics/mac/WebGLLayer.mm:
* platform/graphics/mac/WebLayer.mm:
* platform/graphics/mac/WebTiledLayer.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/wince/ImageBufferWinCE.cpp:
* platform/mac/PasteboardMac.mm:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/SharedTimerMac.mm:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
* platform/mac/WebCoreObjCExtras.mm:
* platform/mac/WebFontCache.mm:
* platform/mac/WebVideoFullscreenController.mm:
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
* platform/mac/WebWindowAnimation.mm:
* platform/network/blackberry/CredentialStorageBlackBerry.cpp:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/mac/CookieStorageMac.mm:
* platform/network/mac/ResourceHandleMac.mm:
* platform/network/win/ResourceHandleWin.cpp:
* platform/text/TextEncodingDetectorICU.cpp:
* rendering/RenderFlowThread.h:
* rendering/RenderImage.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderTreeAsText.cpp:
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceGradient.cpp:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/SVGRenderSupport.cpp:
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
* workers/WorkerContext.cpp:
* workers/WorkerScriptLoader.cpp:
* xml/XMLHttpRequest.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move clearAllData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116001
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearAllData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.
* dom/Clipboard.h: Made clearAllData non-virtual in non-legacy case.
* platform/mac/ClipboardMac.h: Removed clearAllData.
* platform/mac/ClipboardMac.mm: Ditto.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move clearData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116000
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::clearData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.
* dom/Clipboard.h: Made clearData non-virtual in non-legacy case.
* platform/Pasteboard.h: Added an overload of the clear function that takes
a single type and clears only that type. Also temporarily exported the
cocoaTypeFromHTMLClipboardType function as a static member so it can be used
in both ClipboardMac and PasteboardMac during the transition.
* platform/mac/ClipboardMac.h: Removed clearData.
* platform/mac/ClipboardMac.mm: Removed clearData.
(WebCore::ClipboardMac::getData): Changed to call cocoaTypeFromHTMLClipboardType
as a Pasteboard class static member function.
(WebCore::ClipboardMac::setData): Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::cocoaTypeFromHTMLClipboardType): Moved here from
ClipboardMac.
(WebCore::Pasteboard::clear): Added. Moved here from ClipboardMac.
2013-05-12 Darin Adler <darin@apple.com>
[Mac] Move hasData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=115999
Reviewed by Andreas Kling.
* dom/Clipboard.cpp:
(WebCore::Clipboard::hasData): Added. Calls through to Pasteboard.
* dom/Clipboard.h: Added LEGACY_VIRTUAL and LEGACY_PURE macros,
only for within this header file. These help us keep many functions
as pure virtual in the legacy style Clipboard class, but have them
be non-virtual in the normal/future style. Use LEGACY_VIRTUAL and
LEGACY_PURE to make the hasData member non-virtual.
* platform/Pasteboard.h: Added hasData, and added some blank lines and a FIXME.
* platform/mac/ClipboardMac.h: Removed hasData override.
* platform/mac/ClipboardMac.mm: Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardMac.
2013-05-12 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r149971): sudden termination is a Mac-only concept
* WebCore.exp.in: Move sudden termination symbols to Mac-only
section.
2013-05-12 Andreas Kling <akling@apple.com>
Node: Use FINAL instead of the non-virtual shadowing hack.
<http://webkit.org/b/115995>
Reviewed by Anders Carlsson.
Decorate Element/Attr implementations of prefix/localName/namespaceURI getters with FINAL
so that call sites with a more specific pointer type than Node* can avoid the virtual dispatch.
* dom/Attr.h:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:
2013-05-11 Darin Adler <darin@apple.com>
[Mac] Give every Clipboard an underlying Pasteboard
https://bugs.webkit.org/show_bug.cgi?id=115979
Reviewed by Andreas Kling.
This is the first step in Clipboard and Pasteboard refactoring
to fix the overlap and many layering violations.
* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Add an m_pasteboard data member,
Mac-only for now, but eventually for all platforms.
(WebCore::Clipboard::~Clipboard): No longer inline the destructor.
* dom/Clipboard.h: Add WTF_USE_LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
flag, currently true for all non-Mac platforms. Make the constructor
no longer inline. Added a PassOwnPtr<Pasteboard> argument to the
constructor and an OwnPtr<Pasteboard> data member.
* platform/Pasteboard.h: Added a create function to make it easy
to create a pasteboard given a pasteboard name.
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::ClipboardMac): Create a pasteboard and pass
it to the Clipboard constructor.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::create): Added.
2013-05-12 Andreas Kling <akling@apple.com>
Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
<http://webkit.org/b/115988>
<rdar://problem/13870943>
Reviewed by Anders Carlsson.
Add two methods to Chrome (and ChromeClient):
- enableSuddenTermination()
- disableSuddenTermination()
..and call these from DOMWindow instead of the free global functions.
For WebKit1, it just calls the NSProcessInfo methods to keep behavior the same.
For WebKit2, the new methods plumb through the information to the UI process.
Also updated the DOMWindow logic to think in terms of per-DOMWindow sudden termination counters
instead of a process-global one, since that gets confusing in a WK2 world.
When a DOMWindow transitions between having/not having unload/beforeunload event listeners,
we send a notification to the Chrome.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/Chrome.h:
(WebCore::Chrome::enableSuddenTermination):
(WebCore::Chrome::disableSuddenTermination):
* page/ChromeClient.h:
(WebCore::ChromeClient::enableSuddenTermination):
(WebCore::ChromeClient::disableSuddenTermination):
* page/DOMWindow.cpp:
(WebCore::addUnloadEventListener):
(WebCore::removeUnloadEventListener):
(WebCore::removeAllUnloadEventListeners):
(WebCore::addBeforeUnloadEventListener):
(WebCore::removeBeforeUnloadEventListener):
(WebCore::removeAllBeforeUnloadEventListeners):
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
(WebCore::DOMWindow::enableSuddenTermination):
(WebCore::DOMWindow::disableSuddenTermination):
* page/DOMWindow.h:
(DOMWindow):
2013-05-12 Anders Carlsson <andersca@apple.com>
Remove Complex.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115989
Reviewed by Beth Dakin.
Replace Complex declarations with std::complex<double>. Pass by value since the struct
is small enough to go into two registers on X86-64.
* Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::doFFTAnalysis):
(WebCore::RealtimeAnalyser::getFloatFrequencyData):
(WebCore::RealtimeAnalyser::getByteFrequencyData):
(WebCore::RealtimeAnalyser::getByteTimeDomainData):
* platform/audio/Biquad.cpp:
(WebCore::Biquad::setZeroPolePairs):
(WebCore::Biquad::setAllpassPole):
(WebCore::Biquad::getFrequencyResponse):
* platform/audio/Biquad.h:
* platform/audio/FFTFrame.cpp:
(WebCore::FFTFrame::interpolateFrequencyComponents):
(WebCore::FFTFrame::extractAverageGroupDelay):
(WebCore::FFTFrame::addConstantGroupDelay):
2013-05-12 Simon Fraser <simon.fraser@apple.com>
Dropdowns on http://www.exploratorium.edu don't show anything
https://bugs.webkit.org/show_bug.cgi?id=115991
Reviewed by Dan Bernstein.
We can't optimize away the backing store of a layer by saying that
it paints into a composited ancestor if its composited bounds are not contained
by that ancestor.
Test: compositing/backing/no-backing-for-clip-overhang.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Pass in our
previously computed composited bounds relative to our composited ancestor,
and its composited bounds.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): If the ancestor's
composited bounds don't contain the layer's composited bounds, the layer
needs its own backing store.
* rendering/RenderLayerCompositor.h:
2013-05-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r149955.
http://trac.webkit.org/changeset/149955
https://bugs.webkit.org/show_bug.cgi?id=115990
Broke lots of tests (Requested by smfr on #webkit).
* WebCore.exp.in:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderApplet.h:
* rendering/RenderBR.h:
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::virtualContinuation):
(WebCore::RenderBlock::virtualChildren):
(WebCore::RenderBlock::isRenderBlock):
(WebCore::RenderBlock::isBlockFlow):
(WebCore::RenderBlock::isInlineBlockOrInlineTable):
(WebCore::RenderBlock::dirtyLinesFromChangedChild):
(WebCore::RenderBlock::collapsedMarginBefore):
(WebCore::RenderBlock::collapsedMarginAfter):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderBoundingBox):
(RenderBox):
(WebCore::RenderBox::marginLogicalLeft):
(WebCore::RenderBox::marginLogicalRight):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::isBoxModelObject):
* rendering/RenderButton.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderEmbeddedObject.h:
(RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::isEmbeddedObject):
(WebCore::RenderEmbeddedObject::virtualChildren):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderImage.h:
(RenderImage):
(WebCore::RenderImage::isRenderImage):
* rendering/RenderInline.h:
(RenderInline):
(WebCore::RenderInline::virtualContinuation):
(WebCore::RenderInline::virtualChildren):
(WebCore::RenderInline::isRenderInline):
(WebCore::RenderInline::layout):
(WebCore::RenderInline::requiresLayer):
(WebCore::RenderInline::offsetWidth):
(WebCore::RenderInline::offsetHeight):
(WebCore::RenderInline::borderBoundingBox):
(WebCore::RenderInline::dirtyLinesFromChangedChild):
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.h:
(WebCore::RenderMedia::virtualChildren):
(WebCore::RenderMedia::canHaveChildren):
(WebCore::RenderMedia::isMedia):
(WebCore::RenderMedia::isImage):
(WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderPart.h:
(RenderPart):
(WebCore::RenderPart::isRenderPart):
(WebCore::RenderPart::renderName):
* rendering/RenderProgress.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::isRenderRegion):
* rendering/RenderRegionSet.h:
* rendering/RenderReplaced.h:
(RenderReplaced):
(WebCore::RenderReplaced::renderName):
* rendering/RenderReplica.h:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):
* rendering/RenderTable.h:
(RenderTable):
(WebCore::RenderTable::renderName):
(WebCore::RenderTable::isTable):
(WebCore::RenderTable::avoidsFloats):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
(RenderText):
(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):
(WebCore::RenderText::styleWillChange):
(WebCore::RenderText::length):
(WebCore::RenderText::paint):
(WebCore::RenderText::layout):
* rendering/RenderTextControl.h:
(RenderTextControl):
(WebCore::RenderTextControl::renderName):
(WebCore::RenderTextControl::isTextControl):
(WebCore::RenderTextControl::avoidsFloats):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::isTextField):
* rendering/RenderTextFragment.h:
* rendering/RenderTextTrackCue.h:
* rendering/RenderVideo.h:
* rendering/RenderView.h:
* rendering/RenderWidget.h:
(RenderWidget):
(WebCore::RenderWidget::isWidget):
* rendering/RenderWordBreak.h:
* rendering/RootInlineBox.h:
(RootInlineBox):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/svg/RenderSVGBlock.h:
(RenderSVGBlock):
* rendering/svg/RenderSVGContainer.h:
(WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
(WebCore::RenderSVGContainer::virtualChildren):
(WebCore::RenderSVGContainer::isSVGContainer):
(WebCore::RenderSVGContainer::renderName):
(RenderSVGContainer):
(WebCore::RenderSVGContainer::objectBoundingBox):
(WebCore::RenderSVGContainer::strokeBoundingBox):
(WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.h:
(WebCore::RenderSVGHiddenContainer::renderName):
(RenderSVGHiddenContainer):
(WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.h:
(WebCore::RenderSVGInline::renderName):
(WebCore::RenderSVGInline::requiresLayer):
(WebCore::RenderSVGInline::isSVGInline):
(RenderSVGInline):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.h:
(WebCore::RenderSVGModelObject::requiresLayer):
(RenderSVGModelObject):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(RenderSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.h:
(RenderSVGResourceGradient):
(WebCore::RenderSVGResourceGradient::resourceBoundingBox):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
(WebCore::RenderSVGShape::setNeedsTransformUpdate):
(WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
(WebCore::RenderSVGShape::localToParentTransform):
(WebCore::RenderSVGShape::localTransform):
(WebCore::RenderSVGShape::isSVGShape):
(RenderSVGShape):
(WebCore::RenderSVGShape::objectBoundingBox):
(WebCore::RenderSVGShape::strokeBoundingBox):
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:
2013-05-12 Anders Carlsson <andersca@apple.com>
Simplify AutodrainedPool
https://bugs.webkit.org/show_bug.cgi?id=115986
Reviewed by Andreas Kling.
Remove calls to AutodrainedPool::cycle as well as the iteration counter passed to the constructor.
Instead, just declare RAII pools where it seems necessary.
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::databaseThread):
* fileapi/FileThread.cpp:
(WebCore::FileThread::runLoop):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::performURLImport):
(WebCore::IconDatabase::readFromDatabase):
2013-05-12 Andreas Kling <akling@apple.com>
Apply FINAL to the Node hierarchy.
<http://webkit.org/b/115984>
Mostly from Blink r149454 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149454>
A couple of the stable DOM/ microbenchmarks are perf positive on Linux clang:
- CloneNodes time reduced from 162.4 to 156.5 ms.
- CreateNodes time reduced from 113.9 to 104.9 ms.
* dom/: Beat things with the FINAL stick.
* html/: Ditto.
* svg/: Ditto.
2013-05-12 Andreas Kling <akling@apple.com>
Devirtualize some things on Document.
From Blink r149967 by <esprehn@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149967>
Several methods on Document are virtual but don't override a super class method
and don't need to be virtual. This patch devirtualizes:
- createElementNS()
- finishedParsing()
- suspendScriptedAnimationControllerCallbacks()
- resumeScriptedAnimationControllerCallbacks()
It also removes the suspend and resume callbacks from ScriptExecutionContext
since they didn't need to be there.
* dom/Document.h:
* dom/ScriptExecutionContext.h:
2013-05-12 Andreas Kling <akling@apple.com>
Remove redundant call to removeAllEventListeners() in Document::open().
From Blink r150175 by <dcheng@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=150175>
Document::open() already calls Document::removeAllEventListeners(), which
removes the event listeners from the DOMWindow it's attached to, so
there's no need to do it manually here as well.
* dom/Document.cpp:
(WebCore::Document::open):
2013-05-12 Andreas Kling <akling@apple.com>
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>
Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>
* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.
2013-05-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115914
Reviewed by Martin Robinson.
* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
(WebCore::FullscreenVideoControllerGtk::hideHud):
(WebCore::FullscreenVideoControllerGtk::initializeWindow):
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:
* platform/gtk/WidgetRenderingContext.cpp:
(WebCore::WidgetRenderingContext::WidgetRenderingContext):
* plugins/gtk/gtk2xtbin.c:
(gtk_xtbin_realize):
2013-05-11 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r149932
* make-export-file-generator: Don't attempt to import
(or use) non-existent cxxabi functions on Windows.
2013-05-11 Simon Fraser <simon.fraser@apple.com>
Add more info to compositing log channel output
https://bugs.webkit.org/show_bug.cgi?id=115978
Reviewed by Dean Jackson.
Add to compositing log channel output whether a layer paints
into its compositing ancestor.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
2013-05-10 Simon Fraser <simon.fraser@apple.com>
REGRESSION: Fixed background on ColterReed.com scrolls
https://bugs.webkit.org/show_bug.cgi?id=115951
Reviewed by Beth Dakin.
The logic for painting the fixed root background into its own layer was
broken when the document element's layer was composited. This could be caused
by a negative z-index child of the body, or by an explicit compositing-causing
style on the <html>.
There were two issues. First, when painting the layer for the fixed root
background, we would simply short-circuit the fixed background paint in
RenderLayer::paintLayer(), when checking for a composited layer. We have
to continue to paint through the composited <html> layer to get the root
background in this case.
Secondly, RenderLayerBacking::paintIntoLayer() would only set the PaintLayerPaintingSkipRootBackground
flag if this RenderLayerBacking had a m_backgroundLayer. However, when the <html> is
composited, we need to skip painting the root layer for both the RenderView's backing,
and for the <html>'s backing. Checking whether there is *any* layer that paints
the fixed root background (i.e. checking compositor()->fixedRootBackgroundLayer())
is a simple way to fix this test.
Tests: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html
platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html
* rendering/RenderLayer.cpp:
(WebCore::paintForFixedRootBackground):
(WebCore::RenderLayer::paintLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
2013-05-11 Simon Fraser <simon.fraser@apple.com>
Possible crash when going Back while loading PDF
https://bugs.webkit.org/show_bug.cgi?id=115972
Reviewed by Dan Bernstein.
It's possible for m_frame to be null when Document::findUnsafeParentScrollPropagationBoundary()
is called, so null-check currentFrame.
* dom/Document.cpp:
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
2013-05-11 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13823864> TextCodecICU complains about ambiguous codec names with current ICU release
https://bugs.webkit.org/show_bug.cgi?id=115953
Reviewed by Darin Adler.
Store and use canonical converter name to create converters.
As a side effect, we now actually reuse cached converters - previously we would compare
a standard encoding name to internal canonical one, which rarely match.
* platform/text/TextCodecICU.h:
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create): Pass canonical ICU converter name to constructor.
(WebCore::TextCodecICU::registerEncodingNames):
- Updated terminology.
- Added a comment that special cases should be kept in sync between registerEncodingNames
and registerCodecs.
- Moved maccyrillic alias to a correct section. It's not present in ICU even today.
- Changed a few aliases to actually map to standard name, not to an overridden one
(this doesn't change behavior since addToTextEncodingNameMap looks up canonical
name, but is clearer).
(WebCore::TextCodecICU::registerCodecs): Store a converter name to use with each
canonical encoding name.
(WebCore::TextCodecICU::TextCodecICU): Ditto.
(WebCore::TextCodecICU::releaseICUConverter): Reset the converter to remove any
leftover data.
(WebCore::TextCodecICU::createICUConverter):
- Compare converter name to converter name, not to another alias name.
- Use proper string comparison instead of pointer comparison.
- When creating a converter, assert that the name is not ambigous - canonical
converter names should never be, otherwise there would be no way to create
the converter without ambiguity.
2013-05-11 Antoine Quint <graouts@apple.com>
[Mac] The captions menu should not use a canned max-width and max-height
https://bugs.webkit.org/show_bug.cgi?id=115968
Reviewed by Eric Carlson.
Use more real estate to display the captions menu should the caption names
be long.
* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-container):
(video::-webkit-media-controls-closed-captions-track-list):
Make the captions menu scale to a max-width and max-height to allow 4px
above and below the menu, except on the right where it always aligns with
the captions icon in the media controller.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::createControls):
Move the captions menu element to be a child of the controls instead of
the panel such that it may scale relative to the controls when using %
CSS values.
2013-05-11 Jochen Eisinger <jochen@chromium.org>
Disallow a window to focus itself via javascript URLs or using target _self
https://bugs.webkit.org/show_bug.cgi?id=115906
Reviewed by Geoffrey Garen.
Test: fast/dom/Window/window-focus-self.html
* loader/FrameLoader.cpp:
(WebCore::createWindow):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):
2013-05-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
Fix several style warnings in generated bindings
https://bugs.webkit.org/show_bug.cgi?id=115961
Reviewed by Kentaro Hara.
Fix several style errors in the bindings generated under
Source/WebCore/bindings/scripts/test/
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
(WriteData):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(WriteData):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
* bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
* bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
* bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
* bindings/scripts/test/CPP/WebDOMTestException.cpp:
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
* bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestNode.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::releaseImplIfNotNull):
* bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestObjInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
(WebCore):
2013-05-11 Anders Carlsson <andersca@apple.com>
Make it a build error to put invalid C++ symbol names in WebCore.exp.in
https://bugs.webkit.org/show_bug.cgi?id=115958
Reviewed by Andreas Kling.
While invalid C++ symbols will eventually show up as a link error since the symbol won't be found,
this makes it easier to catch invalid symbols inside of #ifdefs.
* make-export-file-generator:
Try to demangle C++ symbols before printing them.
2013-05-11 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r149718): Move exported symbol into ENABLE(FULLSCREEN_API) section
Fixes the following build failure when ENABLE(FULLSCREEN_API) is
off:
Undefined symbols for architecture i386:
"__ZNK7WebCore7Element25containsFullScreenElementEv", referenced from:
-exported_symbol[s_list] command line option
* WebCore.exp.in: Move the symbol.
2013-05-11 Robert Hogan <robert@webkit.org>
Unreviewed, remove some lint accidentally left in r149929.
* rendering/InlineFlowBox.cpp:
(WebCore::verticalAlignApplies):
2013-03-17 Robert Hogan <robert@webkit.org>
Text flow broken in elements with vertical align top/bottom and inline elements taller than line-height
https://bugs.webkit.org/show_bug.cgi?id=111974
Reviewed by Ryosuke Niwa.
Per http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align 'vertical-align' only applies to inline and table-cell
elements.
Test: fast/css/vertical-align-block-elements.html
* rendering/InlineFlowBox.cpp:
(WebCore::isTextInBlockElement):
(WebCore):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2013-05-11 Benjamin Poulain <bpoulain@apple.com>
Make CanvasStyle a plain object instead of an RefCounted object
https://bugs.webkit.org/show_bug.cgi?id=115775
Reviewed by Andreas Kling.
CanvasStyle is just 2 words wide. We do not gain anything from allocating
it on the heap. Change the object to be just a type and some data.
* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::toJS):
(WebCore::toHTMLCanvasStyle):
* html/HTMLCanvasElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::State::State):
(WebCore::CanvasRenderingContext2D::setStrokeStyle):
(WebCore::CanvasRenderingContext2D::setFillStyle):
(WebCore::CanvasRenderingContext2D::setStrokeColor):
(WebCore::CanvasRenderingContext2D::setFillColor):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
(WebCore::CanvasRenderingContext2D::strokeStyle):
(CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::fillStyle):
(State):
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::createFromString):
(WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
(WebCore::CanvasStyle::isEquivalentColor):
(WebCore):
(WebCore::CanvasStyle::operator=):
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(WebCore::CanvasStyle::isValid):
(WebCore::CanvasStyle::CanvasStyle):
(WebCore):
(WebCore::CanvasStyle::operator=):
2013-05-11 Benjamin Poulain <benjamin@webkit.org>
Gradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
https://bugs.webkit.org/show_bug.cgi?id=115779
Reviewed by Andreas Kling.
* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient): Clang is surprisingly smart at removing
all the branches of this function. Remove two more with reserveInitialCapacity.
2013-05-10 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13666412> Clean up some edge cases of URL parsing.
https://bugs.webkit.org/show_bug.cgi?id=104919
Reviewed by Darin Adler.
Test: fast/url/segments-userinfo-vs-host.html
* page/SecurityOrigin.cpp:
(WebCore::schemeRequiresHost):
(WebCore::shouldTreatAsUniqueOrigin):
Updated function name and comments (host is not the same as authority). We still
need this check - KURL can still produce http URLs with an empty host (even as this
patch reduces the number of such cases). So can Gecko and current draft of URL
Standard.
It would be good to have a guarantee that such useless URLs can not come out of
URL parser, as relying on downstream code re-parsing the URL correctly would be fragile.
* platform/KURL.cpp:
(WebCore::hostPortIsEmptyButCredentialsArePresent): Updated an argument name for
correctness.
(WebCore::KURL::parse):
1. Reverted behavior changes from <http://trac.webkit.org/changeset/82181> - I could
find no reason to allow "@" in hostnames, and having a URL like this re-parsed by
a different parser would likely produce different results. It's better to just treat
these edge case URLs as invalid.
2. When hostname component is a lone colon, preserve it in parsed URL string,
as otherwise path would get pushed in its place when re-parsing.
3. When authority component is a lone colon, don't forget to "//" after scheme, too.
4. Added some assertions about contents of authority component, to catch potential
mis-parsing earlier.
2013-05-10 Alexey Proskuryakov <ap@apple.com>
Make TextCodecICU not depend on TextEncoding
https://bugs.webkit.org/show_bug.cgi?id=115848
Reviewed by Darin Adler.
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::create):
(WebCore::TextCodecICU::TextCodecICU):
(WebCore::TextCodecICU::createICUConverter):
(WebCore::TextCodecICU::decode):
(WebCore::TextCodecICU::encode):
* platform/text/TextCodecICU.h:
Use a plain encoding string in platform encoder wrapper, not a higher level concept.
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
Remove Mac OS X Leopard (10.5) support
https://bugs.webkit.org/show_bug.cgi?id=107964
Reviewed by Ryosuke Niwa.
Removed the code for 10.5 and removed if-def for 10.6.
No new tests, covered by existing tests.
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagLookUpInDictionary):
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/WebCoreSystemInterface.h:
* platform/text/mac/HyphenationMac.mm:
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
Remove USE(OS_RANDOMNESS)
https://bugs.webkit.org/show_bug.cgi?id=108095
Reviewed by Darin Adler.
Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
ports.
No new tests as this is covered by existing tests.
* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):
* platform/UUID.cpp:
(WebCore::createCanonicalUUIDString):
2013-05-10 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove [NoInterfaceObject] from several WebAudio IDL interfaces
https://bugs.webkit.org/show_bug.cgi?id=115894
Reviewed by Darin Adler.
Several WebAudio IDL interfaces had [NoInterfaceObject] extended attribute set,
meaning that there was no corresponding attribute on the global window object.
This behavior is not according to the specification:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
This patch removes the [NoInterfaceObject] extended attribute where needed to
match the specification.
No new tests, already covered by existing tests.
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/ScriptProcessorNode.idl:
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveTable.idl:
2013-05-10 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it
https://bugs.webkit.org/show_bug.cgi?id=115840
Reviewed by Antti Koivisto.
In r107836, we moved some box-shadow painting into the paintFillLayer code for performance.
However, in r145680 we started to skip background painting when we know the background is
obscured. This broke shadow painting in some cases.
Fix by always painting the background fill layers if we know that they will also
paint the shadow.
Test: fast/box-shadow/box-shadow-obscured-backgrounds.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackground):
2013-05-10 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r143626): Element shows as garbage in image gallery
https://bugs.webkit.org/show_bug.cgi?id=115946
Reviewed by Antti Koivisto.
RenderLayer::backgroundIsKnownToBeOpaqueInRect() used hasVisibleContent()
to check whether the layer's content was hidden via the visibility property.
However, this assumed that a passing hasVisibleContent() check meant that the
entire area was covered by the renderers and layers checked layer.
This is not always true. It's possible to have a visibility:hidden layer
with a non-covering visbility:visible child, or even a single RenderText
child that happens to have visibility:visible style. In these situations,
hasVisibleContent() returns true but the entire area is not painted.
So we have to fall back to on a more conservative check using the
visibility style, which will give is a reliable answer for the current layer.
Tests: compositing/contents-opaque/hidden-with-visible-child.html
compositing/contents-opaque/hidden-with-visible-text.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2013-05-10 Simon Fraser <simon.fraser@apple.com>
Garbage down left side of nytimes.com page (if subscriber)
https://bugs.webkit.org/show_bug.cgi?id=115839
Reviewed by Antti Koivisto.
RenderLayer::backgroundIsKnownToBeOpaqueInRect() would incorrectly return true
for layers where the given rect wasn't contained in the background rect, but
where some child layer obscured the rect, even though clipping hid part
of that child layer.
So bail from RenderLayer::backgroundIsKnownToBeOpaqueInRect() if we have
any overflow clipping. This could be enhanced in future to test whether child
layers obscure the clipping rect, but that would be more expensive.
Test: compositing/contents-opaque/overflow-hidden-child-layers.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2013-05-10 Eric Carlson <eric.carlson@apple.com>
In-band captions not visible immediately after track mode change
https://bugs.webkit.org/show_bug.cgi?id=115922
Reviewed by Dean Jackson.
Test: media/track/track-in-band-mode.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackModeChanged): Add cues for all loaded tracks, regardless
of track type.
2013-05-10 Timothy Hatcher <timothy@apple.com>
Web Inspector: determine the resource type in InspectorResourceAgent::willSendRequest.
This allows the Network timeline and Resources sidebar to filter Resources earlier,
before the server sends a response. Useful for long polling (comet) XHRs.
https://webkit.org/b/74935
rdar://problem/13726105
Reviewed by Joseph Pecoraro.
* inspector/Inspector.json:
(Network.requestWillBeSent): Added.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest): Send the type if it isn't Other along in requestWillBeSent.
(WebCore::InspectorResourceAgent::didReceiveResponse): Don't determine the type here anymore. Clear the CachedResource
if isNotModified like the old code path did by not setting cachedResource if !isNotModified.
2013-05-10 Laszlo Gombos <l.gombos@samsung.com>
[CMake] Consolidate list of files to build for WebCore plugin support
https://bugs.webkit.org/show_bug.cgi?id=104429
Reviewed by Rob Buis.
Move the common files to support plugins and the logic for disabling
plugins) to CMakeLists.txt from PlatformXXX.cmake.
No new tests as there is no new functionality.
* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
2013-05-10 Robert Hogan <robert@webkit.org>
REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
https://bugs.webkit.org/show_bug.cgi?id=115818
Reviewed by David Hyatt.
r148121 only worried about split inlines inside anonymous blocks - it ought to have
catered for empty inlines, with no continuations, inside a single solitary anonymous block too.
Test: fast/inline/anonymous-block-with-empty-inline.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[GTK] Remove unnecessary includes in WidgetGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=115912
Reviewed by Andreas Kling.
No new tests - no new functionality.
* platform/gtk/WidgetGtk.cpp: Remove the unnecessary includes of the Chrome.h, Frame.h, FrameView.h,
Page.h and RenderObject.h headers as the included declarations are not used anywhere. ScrollView.h is
included instead as it is required and was previously included by one of the removed header inclusions.
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[Cairo] Remove the unnecessary ImageData.h include in ImageBufferCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=115911
Reviewed by Carlos Garcia Campos.
No new tests - no new functionality.
* platform/graphics/cairo/ImageBufferCairo.cpp: Remove the ImageData.h include
as the included declarations are not used anywhere.
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[Cairo] Remove the unnecessary CSSParser.h include in GradientCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=115910
Reviewed by Laszlo Gombos.
No new tests - no new functionality.
* platform/graphics/cairo/GradientCairo.cpp: Remove the CSSParser.h include
as the included declarations are not used anywhere.
2013-05-10 Dean Jackson <dino@apple.com>
Include tab character as a word end for kerning
https://bugs.webkit.org/show_bug.cgi?id=115915
<rdar://problem/13861491>
Reviewed by Enrica Casucci.
This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=112507
which only looked for a space character as a word end. It should
look for tab characters too.
Test: fast/text/word-space-with-kerning-4.html
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Look for ' '.
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove EventTracer
https://bugs.webkit.org/show_bug.cgi?id=115916
Reviewed by Sam Weinig.
EventTracer is dead code, remove it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/EventTracer.cpp: Removed.
* platform/EventTracer.h: Removed.
2013-05-10 Zan Dobersek <zdobersek@igalia.com>
[GTK] Generated files are regenerated always
https://bugs.webkit.org/show_bug.cgi?id=115908
Reviewed by Carlos Garcia Campos.
No new tests - no change in functionality.
* GNUmakefile.am: Don't treat the window constructors IDL file as a dependency of the JavaScriptCore bindings.
The file is generated during the IDL preprocessing, and the JSC bindings already depend on that step through
the idl_supplemental_dependencies file. Because of that the window constructors IDL file has a phony target
which seems to confuse the bindings generation rule into thinking that a complete regeration of the bindings is required.
2013-05-10 Andreas Kling <akling@apple.com>
Caching of generated images in CSS should be smarter.
<http://webkit.org/b/115902>
<rdar://problem/13542727>
Reviewed by Antti Koivisto.
Add an IntSize => GeneratorGeneratedImage cache at the CSSImageGeneratorValue level.
CSSGradientValue is currently the only CSSImageGeneratorValue subclass that makes use of the cache.
Generated images are kept for 3 seconds after last use.
The main problem with the previous approach was that background renderers (e.g <body>, <tr>, etc)
would be passed to multiple CSSImageGeneratorValue::getImage() calls with different sizes requested
for each of the descendent renderers that inherit their background from the same parent.
The cache wasn't smart enough for this, it just thought the background renderer was changing size
a lot, and would regenerate the image over and over.
We already had caching of intermediate image buffers for GeneratorGeneratedImage::drawPattern().
This removes the eviction timer from that cache so that the intermediate images can live a bit longer.
(WebCore::CSSImageGeneratorValue::cachedImageForSize):
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize):
Renamed from getImage() and putImage().
(WebCore::CSSImageGeneratorValue::evictCachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):
Let the CachedGeneratedImage throw itself out from cache when the timer fires.
* css/CSSImageGeneratorValue.h:
(CachedGeneratedImage):
Exactly what it sounds like. These go into CSSImageGeneratorValue::m_images with the size
as the hash key.
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::~GeneratorGeneratedImage):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
Keep the intermediate image for drawPattern() until destruction instead of dropping it on
a timer. These objects are now evicted by the CSSImageGeneratorValue's image cache
after 3 seconds of disuse rather than kept for the lifetime of the renderer.
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::canvasChanged):
(WebCore::CSSCanvasValue::canvasResized):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::crossfadeChanged):
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::addClient):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::addClient):
(WebCore::CSSImageGeneratorValue::removeClient):
CSSImageGeneratorValue::m_clients is now a HashCountedSet<RenderObject*>, tweak accordingly.
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove MemoryUsageSupport class
https://bugs.webkit.org/show_bug.cgi?id=115913
Reviewed by Andreas Kling.
MemoryUsageSupport was just used by a single call site in InspectorTimelineAgent,
and the function called always returns zero on all platforms! Remove it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore):
(WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
* platform/MemoryUsageSupport.cpp: Removed.
* platform/MemoryUsageSupport.h: Removed.
* platform/qt/MemoryUsageSupportQt.cpp: Removed.
2013-05-10 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION (r149652): Videos do not play on cnn.com, just black box
https://bugs.webkit.org/show_bug.cgi?id=115887
Reviewed by Antti Koivisto.
The bug was caused by window and document named item maps counting the same element twice
when it has the same id and name attribute values. Fixed the bug by avoiding to add or remove
an element per id and name attribute updates when it had already been added or removed by
name and id attribute updates respectively.
We do this by checking whether the other attribute affects the element's precense in window
and document named item maps and avoiding to add or remove the attribute when they do and
the other attribute is present in updateId and updateName.
Consider a scenario when an object element has id "foo", and name attribute is about to be also
set to "foo". If the id attribute doesn't affect element's presense in window or document
named item maps, we're done. If it does, then the maps already have this element so we don't
want to add it again. Conversely, if the element already has id and name attributes set to
"foo", and we're moving the id attribute, then we want to remove the element from the maps only
if the id doesn't affect the presence of the element in the maps.
Unfortuntely, this logic doesn't work when we're inserting or removing an element on its entirely
because updateId and updateName are called when both id and name attributes are present so skip
this step (AlwaysUpdateHTMLDocumentNamedItemMaps) for the id attribute to break the symmetry.
Test: fast/dom/HTMLDocument/image-with-same-id-and-name.html
fast/dom/HTMLDocument/object-with-same-id-and-name.html
* dom/Element.cpp:
(WebCore::Element::insertedInto): Call updateId and updateName with
AlwaysUpdateHTMLDocumentNamedItemMaps.
(WebCore::Element::removedFrom): Ditto.
(WebCore::Element::updateName): Don't add or remove this element if the id attribute has already
done so except when we're inserting, removing, or cloning an element.
(WebCore::Element::updateId): Ditto for the name attribute.
(WebCore::Element::cloneAttributesFromElement): Added a comment and assert that we never call this
function when this element is in the document. We can't update window and documemt named item
maps here because image element's id attribute value, for example, is present in the document's
named item map if it has a name attribute. Since this function calls updateId and updateName
before updating attributes, this check is going to fail in DocumentNameCollection's
nodeMatchesIfIdAttributeMatch and bad things will happen.
* dom/Element.h:
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren): Clone children and attributes before
inserting the swapped span to avoid hitting the assertion in cloneAttributesFromElement we added.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
2013-05-09 Dean Jackson <dino@apple.com>
Don't trust character widths for internal OS X fonts in form controls
https://bugs.webkit.org/show_bug.cgi?id=115883
<rdar://problem/13817757>
Reviewed by Darin Adler.
We ignore the character width for a bunch of fonts when predicting
the width of a form control. Some of the internal fonts in OS X are
not in the ignored list. Rather than add them, simply test for
fonts whose family begins with a period character ".".
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::hasValidAvgCharWidth): Return false for
any family that starts with "."
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904
Reviewed by Martin Robinson.
* bindings/gobject/WebKitDOMEventTarget.cpp:
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:
2013-05-10 Zoltan Arvai <zarvai@inf.u-szeged.hu>
Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.
* workers/SharedWorkerThread.cpp: include "SecurityOrigin.h"
2013-05-10 Claudio Saavedra <csaavedra@igalia.com>
Fix build after r149864.
Unreviewed build fix.
* loader/ThreadableLoader.h: include <wtf/text/AtomicString.h>
when building with RESOURCE_TIMING enabled.
2013-05-10 Anders Carlsson <andersca@apple.com>
Fix build.
* bindings/js/ScriptController.cpp:
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove ScriptInstance.h
https://bugs.webkit.org/show_bug.cgi?id=115900
Reviewed by Andreas Kling.
Remove yet another abstraction now that we don't support V8.
* GNUmakefile.list.am:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptController.h:
(Bindings):
(ScriptController):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::createScriptInstanceForWidget):
* bindings/js/ScriptInstance.h: Removed.
* html/HTMLPlugInElement.cpp:
(WebCore::HTMLPlugInElement::getInstance):
* html/HTMLPlugInElement.h:
(Bindings):
(HTMLPlugInElement):
* platform/graphics/wince/MediaPlayerProxy.h:
(WebMediaPlayerProxy):
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderSnapshottedPlugIn.cpp:
2013-05-10 Anders Carlsson <andersca@apple.com>
Unreviewed, rolling out r149866.
http://trac.webkit.org/changeset/149866
https://bugs.webkit.org/show_bug.cgi?id=115898
Broke tests
* dom/Document.cpp:
(WebCore::Document::setDomain):
(WebCore::Document::initSecurityContext):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::isolatedCopy):
(WebCore::SecurityOrigin::setDomainFromDOM):
(WebCore::SecurityOrigin::grantUniversalAccess):
* page/SecurityOrigin.h:
(SecurityOrigin):
2013-05-10 Andrei Bucur <abucur@adobe.com>
Remove overflow dead code
https://bugs.webkit.org/show_bug.cgi?id=115893
Reviewed by Antti Koivisto.
The patch removes unused public overflow accesor functions from RenderOverflow and InlineFlowBox.
Tests: no tests, code cleanup.
* rendering/InlineFlowBox.h: Removed logicalLeftLayoutOverflow and logicalRightLayoutOverflow.
* rendering/RenderOverflow.h: Removed setMinYLayoutOverflow, setMaxYLayoutOverflow,
setMinXLayoutOverflow, setMaxXLayoutOverflow, setMinYVisualOverflow, setMaxYVisualOverflow,
setMinXVisualOverflow and setMaxXVisualOverflow.
2013-05-10 Anders Carlsson <andersca@apple.com>
Begin making SecurityOrigin immutable
https://bugs.webkit.org/show_bug.cgi?id=115898
Reviewed by Andreas Kling.
Replace SecurityOrigin::setDomainFromDOM and SecurityOrigin::grantUniversalAccess with
member functions that return new SecurityOrigin objects.
* dom/Document.cpp:
(WebCore::Document::setDomain):
Update the security origin to one returned by copyWithDomainSetFromDOM.
(WebCore::Document::initSecurityContext):
Set the security origin to one returned by copyWithUniversalAccessGranted().
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
Add a new constructor that takes all the member variables as parameters. This is a little unwieldy at the moment,
but all the boolean parameters could be replaced by a bitmask of flags.
(WebCore::SecurityOrigin::isolatedCopy):
Call the new constructor.
(WebCore::SecurityOrigin::copyWithDomainSetFromDOM):
Return a new security origin with m_domainWasSetInDOM set to true and the domain updated.
(WebCore::SecurityOrigin::copyWithUniversalAccessGranted):
Return a new security origin with m_universalAccess set to true.
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove ScriptController::updateSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=115895
Reviewed by Antti Koivisto.
ScriptController::updateSecurityOrigin is just dead code now that the V8 bindings are gone.
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* dom/Document.cpp:
(WebCore::Document::setIsViewSource):
(WebCore::Document::setDomain):
* dom/Document.h:
(Document):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::enforceSandboxFlags):
* dom/SecurityContext.h:
(SecurityContext):
2013-05-10 Anders Carlsson <andersca@apple.com>
Stop including SecurityOrigin.h where unnecessary
https://bugs.webkit.org/show_bug.cgi?id=115897
Reviewed by Antti Koivisto.
Move rarely called functions out of line so headers don't have to include SecurityOrigin.h
* Modules/indexeddb/IDBFactoryBackendImpl.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::databaseDebugName):
* Modules/webdatabase/DatabaseBackendBase.h:
(DatabaseBackendBase):
* Modules/webdatabase/DatabaseSync.h:
* bindings/js/JSDOMWindowCustom.h:
* html/parser/XSSAuditor.cpp:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::~ThreadableLoaderOptions):
(WebCore::ThreadableLoader::create):
* loader/ThreadableLoader.h:
(ThreadableLoaderOptions):
* loader/WorkerThreadableLoader.cpp:
* workers/DedicatedWorkerContext.cpp:
* workers/DedicatedWorkerThread.cpp:
* workers/SharedWorkerContext.cpp:
* workers/WorkerThread.cpp:
* workers/WorkerThread.h:
2013-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r149839.
* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::gtkStyleChangedCallback):
2013-05-09 Chris Fleizach <cfleizach@apple.com>
AX: VoiceOver is no longer seeing items in poorly formed tables
https://bugs.webkit.org/show_bug.cgi?id=115837
Reviewed by Darin Adler.
In case the author didn't include the rows of a table as the
direct children, a table needs to dive down its descendant chain
until the rows are found.
I also took the opportunity to clean up a bit around what the different
meanings of table are in the accessibility classes.
Test: accessibility/poorly-formed-aria-table.html
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addRowDescendant):
(WebCore::AccessibilityARIAGrid::addChildren):
* accessibility/AccessibilityARIAGrid.h:
(AccessibilityARIAGrid):
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::parentTable):
(WebCore):
* accessibility/AccessibilityARIAGridRow.h:
(AccessibilityARIAGridRow):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isTable):
* accessibility/AccessibilityTable.h:
(AccessibilityTable):
(WebCore::AccessibilityTable::isTable):
(WebCore::toAccessibilityTable):
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::parentTable):
2013-05-09 Yael Aharon <yael.aharon@intel.com>
REGRESSION: Disabled multiline select element now responds to (certain) clicks
https://bugs.webkit.org/show_bug.cgi?id=115710
Reviewed by Kent Tamura.
After http://trac.webkit.org/changeset/140286, select elements can scroll whether they
are disabled or not. While they scroll, they also change the selected item.
This patch allows the select element to scroll, but does not change the selection
if the select element is disabled.
Test: fast/forms/select/listbox-disabled-scroll-no-onchange.html
Test: fast/forms/select/listbox-disabled-no-autoscroll.html
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::autoscroll):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::stopAutoscroll):
2013-05-09 Anders Carlsson <andersca@apple.com>
Clean up SecurityOrigin::databaseIdentifier
https://bugs.webkit.org/show_bug.cgi?id=115882
Reviewed by Beth Dakin.
Remove m_encodedHost and just call encodeHost from databaseIdentifier().
Also, use a StringBuilder when constructing the database identifier to avoid allocating
temporary String objects over and over.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore):
(WebCore::SecurityOrigin::createFromDatabaseIdentifier):
(WebCore::SecurityOrigin::databaseIdentifier):
* page/SecurityOrigin.h:
(SecurityOrigin):
2013-05-09 Anders Carlsson <andersca@apple.com>
Remove m_securityOrigin from XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=115881
Reviewed by Alexey Proskuryakov.
The security origin passed to XMLHttpRequest::create was always null, so just get rid of the member variable completely.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::create):
(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::securityOrigin):
* xml/XMLHttpRequest.h:
(XMLHttpRequest):
2013-05-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
[NoInterfaceObject] extended attribute should be removed for several interfaces
https://bugs.webkit.org/show_bug.cgi?id=115852
Reviewed by Benjamin Poulain.
Remove [NoInterfaceObject] extended attribute from the following Web IDL
interfaces: SecurityPolicy, History, Location, Navigator, Performance,
PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceNavigation,
PerformanceResourceTiming, PerformanceTiming and Screen.
These interfaces should not have the [NoInterfaceObject] extended attribute
according to their respective specifications:
- http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-history-interface
- http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-location-interface
- https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#securitypolicy
- http://www.w3.org/html/wg/drafts/html/master/webappapis.html#the-navigator-object
- http://www.w3.org/TR/navigation-timing/#performance
- https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PerformanceTimeline/Overview.html#sec-PerformanceEntry-interface
- http://www.w3.org/TR/navigation-timing/#performancenavigation
- http://www.w3.org/TR/navigation-timing/#performancetiming
- http://www.w3.org/TR/user-timing/#performancemark
- http://www.w3.org/TR/user-timing/#performancemeasure
- http://www.w3c-test.org/webperf/specs/ResourceTiming/#performanceresourcetiming
- http://dev.w3.org/csswg/cssom-view/#the-screen-interface
The new behavior is consistent with the specifications, Firefox and soon Blink.
No new tests, already covered by existing tests.
* page/DOMSecurityPolicy.idl:
* page/History.idl:
* page/Location.idl:
* page/Navigator.idl:
* page/Performance.idl:
* page/PerformanceEntry.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceResourceTiming.idl:
* page/PerformanceTiming.idl:
* page/Screen.idl:
2013-05-09 Robert Hogan <robert@webkit.org>
REGRESSION (Safari 3-Safari 4): Replaced element with percent height in table has incorrect height
https://bugs.webkit.org/show_bug.cgi?id=26394
Reviewed by David Hyatt.
Text controls or any object that has scrollable content should not flex inside a table cell.
This makes our behaviour the same as IE, FF and Opera (Presto).
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):
2013-05-09 Anders Carlsson <andersca@apple.com>
Build fix.
* WebCore.exp.in:
2013-05-09 Anders Carlsson <andersca@apple.com>
Add a StorageStrategy hook for creating transient local storage namespaces
https://bugs.webkit.org/show_bug.cgi?id=115870
Reviewed by Geoffrey Garen.
* WebCore.exp.in:
Export symbol needed by WebKit2.
* dom/Document.cpp:
(WebCore::Document::topOrigin):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* workers/WorkerContext.h:
Remove const qualifier from topOrigin() to avoid ugly const_casts when assigning into a RefPtr<SecurityOrigin> variable.
* page/PageGroup.cpp:
(WebCore::PageGroup::transientLocalStorage):
Do a single hash lookup instead of three and use the SecurityOrigin itself as the hash key instead of a string representation of it.
* page/PageGroup.h:
Update HashMap declaration.
* storage/StorageNamespace.cpp:
(WebCore::StorageNamespace::transientLocalStorageNamespace):
Add new implementation that will optionally call out to the storage strategy.
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::transientLocalStorageNamespace):
Move the default implementation here from PageGroup.
* storage/StorageStrategy.cpp:
(WebCore::StorageStrategy::transientLocalStorageNamespace):
Call the default implementation.
2013-05-09 Enrica Casucci <enrica@apple.com>
A change in system environment should force all CSS properties to be recomputed.
https://bugs.webkit.org/show_bug.cgi?id=115872
<rdar://problem/13781171>
Reviewed by Antti Koivisto.
When a change in the global environment occurs, for example system colors,
we need to make sure all the CSS properties are recomputed and not fetched
from the cache. For this reason we invalidate the properties cache.
I've also renamed the function to give it a more meaningful name.
* page/Page.cpp:
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
* page/Page.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::platformColorsDidChange):
2013-05-09 Antti Koivisto <antti@apple.com>
Reoptimize free-standing :focus/link/visited/-webkit-any-link selectors.
<http://webkit.org/b/115590>
Reviewed by Darin Adler.
Common pseudo selectors should go into their respective rule buckets instead of ending up in the universal one.
* css/RuleSet.cpp:
(WebCore::RuleSet::findBestRuleSetAndAdd):
Check tag selectors with * local name (usually created for namespace) for a suitable narrower bucket too.
2013-05-09 Darin Adler <darin@apple.com>
RenderQuote has giant function for language to quotes map
https://bugs.webkit.org/show_bug.cgi?id=115807
Reviewed by Anders Carlsson.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote): Updated for m_isAttached name change.
(WebCore::RenderQuote::~RenderQuote): Updated for name change, and also split
assertion with && in it into two separate assertions.
(WebCore::checkNumberOfDistinctQuoteCharacters): Added. Helper function that is used
to check that the number of distinct quote characters is small enough to fit into
our fixed size array below.
(WebCore::quotesForLanguage): Replaces the old quotesDataLanguageMap function.
Returns a pointer to a struct that contains the four quote characters. This new
function doesn't have the massive amount of code that the old one did. We use the
standard library bsearch function to do a binary search.
(WebCore::stringForQuoteCharacter): Added. This returns a string for a given quote
character; one string for any given character.
(WebCore::quotationMarkString): Added. Returns the string for the quotation mark.
(WebCore::apostropheStringImpl): Added. Returns the string for the apostrophe.
(WebCore::RenderQuote::originalText): Rewrote this to include all the logic that
used to be in the quotesData function.
(WebCore::RenderQuote::attachQuote): Tweak assertions as above. Removed unneeded
special case for the first quote in a RenderView; sharing the code is better and
there is no significant performance difference. Also use m_isAttached directly
when looking at predecessores so there is no need for an isAttached function.
(WebCore::RenderQuote::detachQuote): Updated assertions and for name change.
(WebCore::RenderQuote::updateDepth): Ditto.
* rendering/RenderQuote.h: Removed unneeded includes. Marked the class FINAL since
we call the originalText function in the class and we don't want to do a virtual
function dispatch for that. Removed uneeded const from an argument. Removed a
stray semicolon. Removed the quotesData and isAttached functions, since they are no
longer needed. Renamed m_attached to m_isAttached.
* rendering/style/QuotesData.cpp: Removed the overload of QuotesData::create that
takes four quote strings. This was only used to build up the quotes table.
* rendering/style/QuotesData.h: Ditto.
2013-05-09 Max Feil <mfeil@rim.com>
shouldUsePluginDocument() needs to be respected when a document is created
https://bugs.webkit.org/show_bug.cgi?id=110308
Reviewed by Rob Buis.
In DOMImplementation::createDocument() we should create
a PluginDocument for mime types that return "true" for
shouldAlwaysUsePluginDocument(), even if there is no pluginData
for them. This lets a client choose plugins for which the "missing
plugin" text or icon should appear more consistently. Otherwise
plugins referenced by iFrames will be treated as an HTMLDocument,
possibly resulting in binary files rendered as gibberish text.
Layout test platform/blackberry/plugins/swf-as-src-of-iframe.html
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
2013-05-09 Timothy Hatcher <timothy@apple.com>
Fix an exception when hovering native functions while paused in the debugger.
https://webkit.org/b/115866
rdar://problem/13681982
Reviewed by Darin Adler and Joseph Pecoraro.
* inspector/InjectedScriptSource.js:
(InjectedScript.prototype.getFunctionDetails): Return an error if the details
is null or undefined.
2013-05-09 Darin Adler <darin@apple.com>
[Mac] CFError leak under Objective-C garbage collection
https://bugs.webkit.org/show_bug.cgi?id=115862
Reviewed by Benjamin Poulain.
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::nsError): Use adoptCF instead of adoptNS since
the CFError needs a CFRelease, not an -[NSObject release].
2013-05-09 Alberto Garcia <agarcia@igalia.com>
BlackBerry: fix call to PluginLayerWebKitThread::setHolePunchRect()
https://bugs.webkit.org/show_bug.cgi?id=114953
Reviewed by Rob Buis.
data->layer needs a cast in order to call setHolePunchRect().
* plugins/blackberry/NPCallbacksBlackBerry.cpp:
(WebCore::npSetHolePunchHandler):
2013-05-09 Mike Fenton <mifenton@rim.com>
[BlackBerry] Style updates required based on new check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=115857
Reviewed by Rob Buis.
Update WebCore/platform/graphics BlackBerry sources
to match check-webkit-style updates.
Internally reviewed by Jakob Petsovits.
* platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::readPixelsIMG):
(WebCore::GraphicsContext3D::paintToCanvas):
* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayerBlackBerry::updateLayerPosition):
* platform/graphics/blackberry/IntRectBlackBerry.cpp:
(WebCore::IntRect::IntRect):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WTF::::deref):
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::initializeSharedGLObjects):
(WebCore::LayerFilterRenderer::actionsForOperations):
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::setViewport):
(WebCore::LayerRenderer::compositeBuffer):
(WebCore::LayerRenderer::drawColor):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::setFrame):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::play):
(WebCore::MediaPlayerPrivate::waitMetadataTimerFired):
* platform/image-decoders/blackberry/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::JPEGImageDecoder):
2013-05-09 Mike Fenton <mifenton@rim.com>
[BlackBerry] Style updates required based on new check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=115857
Reviewed by Rob Buis.
Update WebCore/platform/network/blackberry
to match check-webkit-style updates.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::initialize):
(WebCore::NetworkJob::handleSetCookieHeader):
(WebCore::NetworkJob::sendResponseIfNeeded):
(WebCore::NetworkJob::shouldSendClientData):
* platform/network/blackberry/NetworkJob.h:
(NetworkJob):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::isRSSContent):
(WebCore::transcode):
2013-05-09 Mike Fenton <mifenton@rim.com>
[BlackBerry] Style updates required based on new check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=115857
Reviewed by Rob Buis.
Update WebCore/platform/blackberry to match check-webkit-style updates.
No functional changes.
* platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::getRawCookies):
* platform/blackberry/CookieMap.h:
(WebCore::CookieMap::count):
* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/LoggingBlackBerry.cpp:
* platform/blackberry/PageClientBlackBerry.h:
(Platform):
(Graphics):
(WebCore):
* platform/blackberry/ParsedCookie.cpp:
(WebCore::ParsedCookie::appendWebCoreCookie):
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
(WebCore::RenderThemeBlackBerry::paintButton):
(WebCore::RenderThemeBlackBerry::paintSliderThumb):
* platform/blackberry/SSLKeyGeneratorBlackBerry.cpp:
(WebCore::signedPublicKeyAndChallengeString):
* platform/blackberry/ScrollAnimatorBlackBerry.h:
2013-05-09 Chris Rogers <crogers@google.com>
Require use of AudioBus::create() to avoid ref-counting issues
https://bugs.webkit.org/show_bug.cgi?id=115836
Reviewed by Andreas Kling.
There were a couple of places still embedding raw AudioBus objects as
member variables or local variables causing ref-counting problems
now that AudioBus is ref-counted. Make AudioBus constructor private
to enforce use of AudioBus::create().
Adapted from Blink patch:
https://chromiumcodereview.appspot.com/14628008/
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::LocalAudioInputProvider::LocalAudioInputProvider):
(WebCore::AudioDestinationNode::LocalAudioInputProvider::set):
(WebCore::AudioDestinationNode::LocalAudioInputProvider::provideInput):
(LocalAudioInputProvider):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::AudioNodeInput):
(WebCore::AudioNodeInput::updateInternalBus):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::AudioNodeOutput):
(WebCore::AudioNodeOutput::updateInternalBus):
* Modules/webaudio/AudioParam.cpp:
(WebCore::AudioParam::calculateFinalValues):
* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::setBuffer):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
(WebCore::MediaStreamAudioDestinationNode::process):
* Modules/webaudio/MediaStreamAudioDestinationNode.h:
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::ScriptProcessorNode):
(WebCore::ScriptProcessorNode::process):
* Modules/webaudio/ScriptProcessorNode.h:
(ScriptProcessorNode):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::create):
(WebCore):
(WebCore::AudioBus::AudioBus):
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/AudioBus.h:
(AudioBus):
* platform/audio/AudioFIFO.cpp:
(WebCore::AudioFIFO::AudioFIFO):
(WebCore::AudioFIFO::consume):
(WebCore::AudioFIFO::push):
* platform/audio/AudioFIFO.h:
(AudioFIFO):
* platform/audio/AudioPullFIFO.cpp:
(WebCore::AudioPullFIFO::AudioPullFIFO):
(WebCore::AudioPullFIFO::fillBuffer):
* platform/audio/AudioPullFIFO.h:
(AudioPullFIFO):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::AudioResampler):
(WebCore::AudioResampler::configureChannels):
* platform/audio/MultiChannelResampler.cpp:
* platform/audio/Reverb.cpp:
(WebCore::Reverb::initialize):
* platform/audio/SincResampler.cpp:
(WebCore::SincResampler::consumeSource):
(WebCore):
* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* platform/audio/gstreamer/AudioDestinationGStreamer.h:
(AudioDestinationGStreamer):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::AudioDestinationIOS):
(WebCore::AudioDestinationIOS::render):
* platform/audio/ios/AudioDestinationIOS.h:
(AudioDestinationIOS):
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::AudioDestinationMac):
(WebCore::AudioDestinationMac::render):
* platform/audio/mac/AudioDestinationMac.h:
(AudioDestinationMac):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
2013-05-09 Alberto Garcia <agarcia@igalia.com>
[BlackBerry] Upstream the input popups
https://bugs.webkit.org/show_bug.cgi?id=114608
Reviewed by Rob Buis.
This patch contains contributions from many members of the
BlackBerry WebKit team, including:
Chris Hutten-Czapski
David Hoon
Jessica Cao
Rob Buis
Tiancheng Jiang
* Resources/blackberry/colorControlBlackBerry.css: Added.
(.color-picker-popup-area):
(.color-picker-content):
(.color-picker-block):
(#color-picker-swatch-block):
(.color-picker-switcher):
(.color-picker-check-mark):
(.color-picker-option):
(.color-picker-button):
(.color-picker-highlight):
(input):
(.color-picker-sharp):
(.color-picker-off):
(.color-picker-inactive-font):
(.color-picker-row):
(.color-picker-hex-style):
(.color-picker-input):
(.color-picker-well):
(.color-picker-input .color-picker-well):
(.color-picker-slider):
(.color-picker-slider-output):
(.color-picker-range):
(.color-picker-range::-webkit-slider-thumb):
(.color-picker-range::-webkit-slider-thumb:active):
(.red-ranger-bg):
(.green-ranger-bg):
(.blue-ranger-bg):
(@media only screen and (height: 768px)):
(@media only screen and (height: 720px)):
* Resources/blackberry/colorControlBlackBerry.js: Added.
(.):
* Resources/blackberry/popupControlBlackBerry.css:
(body):
(.popup-area):
(.popup-header):
(.popup-content):
(.popup-buttons):
(.popup-button):
(@media only screen and (width: 720px) and (height: 720px)):
* Resources/blackberry/selectControlBlackBerry.css:
(.popup-content):
(@media (min-height: 918px)):
(.option):
(@media only screen and (width: 720px) and (height: 720px)):
(.contents):
(.option:active):
(.selected):
(.selected .contents::after):
(.text):
(.disabled):
(.optgroup):
(.optgroup-option):
* Resources/blackberry/selectControlBlackBerry.js:
(.):
* Resources/blackberry/timeControlBlackBerry.css: Added.
(#popup-content-time):
(.column):
(.column:not(:last-child)):
(.cell):
(.yearmonthdate .cell div:last-child):
(.row-highlight-container):
(.row-highlight-filler):
(.row-highlight):
(.tall-bit):
(@media only screen and (width: 720px) and (height: 720px)):
* Resources/blackberry/timeControlBlackBerry.js: Added.
(.):
2013-05-09 Rob Buis <rbuis@rim.com>
[BlackBerry] texmap code generates warnings
https://bugs.webkit.org/show_bug.cgi?id=115815
Reviewed by Benjamin Poulain.
Add USE(TEXTURE_MAPPER) guards since Source/WebCore/CMakeLists.txt includes
these files unconditionally.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/texmap/TextureMapperBackingStore.cpp:
* platform/graphics/texmap/TextureMapperBackingStore.h:
* platform/graphics/texmap/TextureMapperFPSCounter.cpp:
* platform/graphics/texmap/TextureMapperFPSCounter.h:
* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/graphics/texmap/TextureMapperGL.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/TextureMapperTile.cpp:
* platform/graphics/texmap/TextureMapperTile.h:
* platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
* platform/graphics/texmap/TextureMapperTiledBackingStore.h:
2013-05-09 Alberto Garcia <agarcia@igalia.com>
PluginDatabase: add plugin directory for the BlackBerry port.
https://bugs.webkit.org/show_bug.cgi?id=114943
Reviewed by Rob Buis.
XP_UNIX is defined for the BlackBerry port, but we don't want to
share the same code here.
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::defaultPluginDirectories):
(WebCore::PluginDatabase::isPreferredPluginDirectory):
2013-05-09 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Remove Memory Distribution and Memory Snapshots Panels
https://bugs.webkit.org/show_bug.cgi?id=115850
Reviewed by Andreas Kling.
Removed the Memory Instrumentation Code after r148921.
No new tests, no behavior change.
* inspector/compile-front-end.py:
* inspector/front-end/NativeMemorySnapshotView.js: Removed.
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel):
* inspector/front-end/Settings.js:
(WebInspector.Settings):
(WebInspector.ExperimentsSettings):
* inspector/front-end/SettingsScreen.js:
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.css:
* inspector/front-end/inspector.js:
(WebInspector._panelDescriptors):
* inspector/front-end/nativeMemoryProfiler.css: Removed.
2013-05-09 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK build fix after r149796.
* GNUmakefile.am: Add a phony target for the window constructors file and include it among
the dependencies for the non-generated code.
2013-05-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix for Qt minimal build.
r149796 broke builds that have WEB_SOCKETS flag disabled.
* page/DOMWindow.idl:
2013-05-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for [NoInterfaceObject] Web IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=115714
Reviewed by Kentaro Hara.
*Constructor attributes on the global DOMWindow object are now automatically
generated for each non-callback interface that is not declared with the
[NoInterfaceObject] extended attribute. It is thus no longer needed for
developers to manually add *Constructor attributes for their new interfaces
unless they wish to register an "extra" constructor for their interface.
This patch does not modify at all the behavior on JS side. To achieve this,
[NoInterfaceObject] extended attribute is added to interfaces that should
not have it according to specification (e.g. History, Location, ...).
This can be improved later as the behavior should not change with this
patch.
No new tests, no behavior change.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeyMessageEvent.idl:
* Modules/encryptedmedia/MediaKeyNeededEvent.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMFileSystem.idl:
* Modules/filesystem/DOMFileSystemSync.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/DirectoryReaderSync.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/EntryArray.idl:
* Modules/filesystem/EntryArraySync.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileEntrySync.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/Metadata.idl:
* Modules/gamepad/Gamepad.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Coordinates.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/geolocation/Geoposition.idl:
* Modules/geolocation/PositionError.idl:
* Modules/indexeddb/DOMWindowIndexedDatabase.idl:
* Modules/indexeddb/IDBAny.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/DOMWindowMediaStream.idl: Removed.
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/MediaStreamTrackEvent.idl:
* Modules/mediastream/NavigatorUserMediaError.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDTMFToneChangeEvent.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCDataChannelEvent.idl:
* Modules/mediastream/RTCIceCandidateEvent.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/DOMWindowNotifications.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/DOMWindowSpeech.idl: Removed.
* Modules/speech/DOMWindowSpeechSynthesis.idl:
* Modules/speech/SpeechGrammar.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionAlternative.idl:
* Modules/speech/SpeechRecognitionError.idl:
* Modules/speech/SpeechRecognitionEvent.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* Modules/speech/SpeechSynthesis.idl:
* Modules/speech/SpeechSynthesisVoice.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/AudioSourceNode.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DOMWindowWebAudio.idl: Removed.
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webaudio/ScriptProcessorNode.idl:
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveTable.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLError.idl:
* Modules/webdatabase/SQLResultSet.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/websockets/DOMWindowWebSocket.idl: Removed.
* Modules/websockets/WebSocket.idl:
* PlatformBlackBerry.cmake:
* UseJSC.cmake:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseTypedef):
* bindings/scripts/preprocess-idls.pl:
(GenerateConstructorAttribute):
(getFileContents):
(getPartialInterfaceNameFromIDL):
(isCallbackInterfaceFromIDL):
(trim):
(getInterfaceExtendedAttributesFromIDL):
* css/CSSFontFaceLoadEvent.idl:
* css/CSSFontFaceRule.idl:
* css/CSSSupportsRule.idl:
* css/CSSUnknownRule.idl:
* css/DOMWindowCSS.idl:
* css/FontLoader.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* dom/CustomElementConstructor.idl:
* dom/DOMError.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/NodeIterator.idl:
* dom/ShadowRoot.idl:
* dom/TreeWalker.idl:
* dom/WebKitNamedFlow.idl:
* fileapi/FileException.idl:
* fileapi/FileReaderSync.idl:
* html/HTMLAudioElement.idl:
* html/HTMLDetailsElement.idl:
* html/HTMLOptionElement.idl:
* html/MediaError.idl:
* html/MediaKeyError.idl:
* html/MicroDataItemValue.idl:
* html/RadioNodeList.idl:
* html/ValidityState.idl:
* html/canvas/CanvasRenderingContext.idl:
* html/canvas/DOMPath.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/EXTTextureFilterAnisotropic.idl:
* html/canvas/OESElementIndexUint.idl:
* html/canvas/OESStandardDerivatives.idl:
* html/canvas/OESTextureFloat.idl:
* html/canvas/OESTextureHalfFloat.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLCompressedTextureATC.idl:
* html/canvas/WebGLCompressedTexturePVRTC.idl:
* html/canvas/WebGLCompressedTextureS3TC.idl:
* html/canvas/WebGLContextAttributes.idl:
* html/canvas/WebGLDebugRendererInfo.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLDepthTexture.idl:
* html/canvas/WebGLLoseContext.idl:
* html/canvas/WebGLVertexArrayObjectOES.idl:
* html/track/AudioTrack.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrack.idl:
* html/track/VideoTrackList.idl:
* inspector/InjectedScriptHost.idl:
* inspector/InspectorFrontendHost.idl:
* inspector/JavaScriptCallFrame.idl:
* inspector/ScriptProfile.idl:
* inspector/ScriptProfileNode.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/AbstractView.idl:
* page/BarInfo.idl:
* page/Console.idl:
* page/Crypto.idl:
* page/DOMSecurityPolicy.idl:
* page/DOMWindow.idl:
* page/History.idl:
* page/Location.idl:
* page/MemoryInfo.idl:
* page/Navigator.idl:
* page/PagePopupController.idl:
* page/Performance.idl:
* page/PerformanceEntry.idl:
* page/PerformanceEntryList.idl:
* page/PerformanceMark.idl:
* page/PerformanceMeasure.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceResourceTiming.idl:
* page/PerformanceTiming.idl:
* page/Screen.idl:
* page/SpeechInputResult.idl:
* page/SpeechInputResultList.idl:
* page/WorkerNavigator.idl:
* page/make_settings.pl:
(generateInternalSettingsIdlFile):
* svg/ElementTimeControl.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFilterPrimitiveStandardAttributes.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLocatable.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTransformable.idl:
* svg/SVGURIReference.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* testing/MallocStatistics.idl:
* testing/TypeConversions.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/SharedWorkerContext.idl:
* workers/WorkerContext.idl:
* workers/WorkerLocation.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
2013-05-09 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Buildfix after r149694
https://bugs.webkit.org/show_bug.cgi?id=115797
Reviewed by Gustavo Noronha Silva.
Some interfaces, such as a return value and parameters of functions are changed.
No new tests since no functionality changed.
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::animationHasStepsTimingFunction):
(WebCore::GraphicsLayerClutter::timingFunctionForAnimationValue):
(WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
(WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
(WebCore::GraphicsLayerClutter::setAnimationEndpoints):
(WebCore::GraphicsLayerClutter::setAnimationKeyframes):
* platform/graphics/clutter/GraphicsLayerClutter.h:
(GraphicsLayerClutter):
2013-05-08 Rob Buis <rbuis@rim.com>
Fix some compiler warnings (miscellaneous)
https://bugs.webkit.org/show_bug.cgi?id=80790
Reviewed by Brent Fulgham.
Get rid of the following warning for BlackBerry:
NavigatorContentUtils.cpp:60:78: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
by not compiling any of the code to add protocols to the protocol whitelist.
* Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
(WebCore::initProtocolHandlerWhitelist):
2013-05-08 peavo@outlook.com <peavo@outlook.com>
[Windows] The function seekFile() is not implemented.
https://bugs.webkit.org/show_bug.cgi?id=115246
Reviewed by Brent Fulgham.
Implemented seekFile() function for Windows.
* platform/win/FileSystemWin.cpp:
(WebCore::seekFile):
2013-05-08 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Fix a typo in Settings.js
https://bugs.webkit.org/show_bug.cgi?id=115849
Reviewed by Joseph Pecoraro.
No new tests, no behavior change.
* inspector/front-end/Settings.js:
(WebInspector.Settings):
2013-05-08 Ryosuke Niwa <rniwa@webkit.org>
SecurityOrigin doesn’t need to forward declare or include Document
https://bugs.webkit.org/show_bug.cgi?id=115847
Reviewed by Alexey Proskuryakov.
Merge https://chromium.googlesource.com/chromium/blink/+/fc7a88caa9c41f3471d8994a530643e5225f82fc.
Removed unused Document forward declaration+include from SecurityOrigin.
* page/SecurityOrigin.cpp:
* page/SecurityOrigin.h:
2013-05-08 David Kilzer <ddkilzer@apple.com>
BUILD FIX: Don't use adoptCF() with NSDictionary * object
Fixes the following build failure:
In file included from Source/WebCore/platform/network/mac/ResourceErrorMac.mm:27:
In file included from Source/WebCore/platform/network/cf/ResourceError.h:31:
/usr/local/include/wtf/RetainPtr.h:81:13: error: static_assert failed "Don't use adoptCF with Objective-C pointer types, use adoptNS."
static_assert(!std::is_convertible<T, id>::value, "Don't use adoptCF with Objective-C pointer types, use adoptNS.");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/wtf/RetainPtr.h:274:16: note: in instantiation of member function 'WTF::RetainPtr<NSDictionary *>::RetainPtr' requested here
return RetainPtr<T>(AdoptCF, o);
^
Source/WebCore/platform/network/mac/ResourceErrorMac.mm:214:44: note: in instantiation of function template specialization 'WTF::adoptCF<NSDictionary *>' requested here
RetainPtr<NSDictionary> userInfo = adoptCF((NSDictionary *) CFErrorCopyUserInfo(error));
^
1 error generated.
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::nsError): Switch from adoptCF() to
adoptNS(). This is in USE(CFNETWORK) code, so it's not
exercised on the Mac.
2013-05-08 Ryosuke Niwa <rniwa@webkit.org>
Remove Editor::setSelectionOffsets
https://bugs.webkit.org/show_bug.cgi?id=115831
Reviewed by Andreas Kling.
Removed the function added in r120985 for Chromium Android port.
* editing/Editor.cpp:
* editing/Editor.h:
2013-05-07 Ryosuke Niwa <rniwa@webkit.org>
Potential use-after-free of Frame
https://bugs.webkit.org/show_bug.cgi?id=115774
Reviewed by Simon Fraser.
Merge https://chromium.googlesource.com/chromium/blink/+/c5b4a6db82e8280c7fc55ee3dc3a84c6b026e66e.
* page/Frame.cpp:
(WebCore::Frame::setPrinting):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::deviceOrPageScaleFactorChanged):
2013-05-08 Roger Fong <roger_fong@apple.com>
Unreviewed build fix, AppleWin port.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
(WebCore::MediaPlayerPrivateAVFoundation::seek):
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
(WebCore):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(MediaPlayerPrivateAVFoundation):
2013-05-08 Xingnan Wang <xingnan.wang@intel.com>
Heap-use-after-free in WebCore::AudioNodeOutput::pull
https://bugs.webkit.org/show_bug.cgi?id=111362
Reviewed by Chris Rogers.
* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::createFromAudioFileData):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::AudioNodeInput):
(WebCore::AudioNodeInput::updateInternalBus):
* Modules/webaudio/AudioNodeInput.h:
(AudioNodeInput):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::AudioNodeOutput):
(WebCore::AudioNodeOutput::updateInternalBus):
(WebCore::AudioNodeOutput::pull):
(WebCore::AudioNodeOutput::bus):
* Modules/webaudio/AudioNodeOutput.h:
(AudioNodeOutput):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
* Modules/webaudio/OfflineAudioDestinationNode.h:
(OfflineAudioDestinationNode):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/AudioBus.h:
(AudioBus):
* platform/audio/AudioFileReader.h:
(WebCore):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::AudioResampler):
(WebCore::AudioResampler::configureChannels):
* platform/audio/AudioResampler.h:
(AudioResampler):
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
* platform/audio/MultiChannelResampler.cpp:
* platform/audio/Reverb.cpp:
(WebCore::Reverb::initialize):
* platform/audio/Reverb.h:
(Reverb):
* platform/audio/efl/AudioBusEfl.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(AudioFileReader):
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/mac/AudioFileReaderMac.h:
(AudioFileReader):
* platform/audio/qt/AudioBusQt.cpp:
(WebCore::AudioBus::loadPlatformResource):
2013-05-08 Eli Fidler <efidler@blackberry.com>
[BlackBerry] Fix usage of BlackBerry::Platform::String
https://bugs.webkit.org/show_bug.cgi?id=115781
Reviewed by Rob Buis.
BlackBerry PRs 304193 and 327181
Internally Reviewed by Mike Lattanzio, Arvid Nilsson, Joe Mason, Jeff Rogers, and George Staikos
We currently have a problem where we're passing UTF-8 encoded data into
the char* constructors of BlackBerry::Platform::String. This means the string
thinks its data is not UTF-8.
* platform/blackberry/ClipboardBlackBerry.cpp:
(WebCore::ClipboardBlackBerry::setData):
(WebCore::ClipboardBlackBerry::writeURL):
(WebCore::ClipboardBlackBerry::writePlainText):
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::getRawCookies):
(WebCore::CookieManager::getBackingStoreCookies):
* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::CookieParser):
(WebCore::CookieParser::parseOneCookie):
* platform/blackberry/CursorBlackBerry.cpp:
(WebCore::Cursor::Cursor):
* platform/blackberry/PlatformBlob.cpp:
(WebCore::PlatformBlob::nextDataItem):
* platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
(WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::moveOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::copyOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::removeOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createFileOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread):
(WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread):
* platform/graphics/blackberry/ImageBlackBerry.cpp:
(WebCore::Image::loadPlatformResource):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::load):
(WebCore::MediaPlayerPrivate::notifyChallengeResult):
(WebCore::toWebMediaStreamSource):
(WebCore::toWebMediaStreamDescriptor):
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob):
* platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
* platform/network/blackberry/rss/RSSFilterStream.cpp:
(WebCore::RSSFilterStream::notifyStatusReceived):
(WebCore::RSSFilterStream::notifyHeadersReceived):
(WebCore::RSSFilterStream::convertContentToHtml):
(WebCore::RSSFilterStream::charset):
(WebCore::RSSFilterStream::removeHeader):
(WebCore::RSSFilterStream::updateHeader):
(WebCore::RSSFilterStream::updateRSSHeaders):
* platform/network/blackberry/rss/RSSFilterStream.h:
* platform/text/blackberry/StringBlackBerry.cpp:
(WTF::String::operator BlackBerry::Platform::String):
2013-05-08 Anders Carlsson <andersca@apple.com>
Assert at compile time that we don't pass Objective-C object pointers to adoptCF
https://bugs.webkit.org/show_bug.cgi?id=115823
Reviewed by Geoffrey Garen.
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
Use adoptNS for CALayer.
2013-05-08 Eric Carlson <eric.carlson@apple.com>
TextTrackCue should support empty content
https://bugs.webkit.org/show_bug.cgi?id=115821
Reviewed by Jer Noble.
Test: media/track/track-cue-empty-text-crash.html
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't bother trying to render
cues with no content.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::getCueAsHTML): Return early if there isn't a node tree.
(WebCore::TextTrackCue::createCueRenderingTree): Ditto.
(WebCore::TextTrackCue::determineTextDirection): Ditto.
(WebCore::TextTrackCue::updateDisplayTree): Return early if there isn't a cue rendering tree.
2013-05-08 Roger Fong <roger_fong@apple.com>
Unreviewed AppleWin build fix.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
(MediaPlayerPrivateAVFoundationCF):
(WebCore::MediaPlayerPrivateAVFoundationCF::currentTrack):
2013-05-08 José Dapena Paz <jdapena@igalia.com> and Zan Dobersek <zdobersek@igalia.com>
[GTK] Plumb the Automake build system for the Battery Status API feature
https://bugs.webkit.org/show_bug.cgi?id=115718
Reviewed by Martin Robinson.
No new tests - no new functionality. The feature is not enabled yet, though all the relevant tests
pass when it is.
* GNUmakefile.am: Add the Modules/battery directory to the list of search paths for header inclusions.
Include the same directory under the IDL_PATH variable so the IDL files it contains are processed.
List these IDL files using a wildcard under the EXTRA_DIST list.
* GNUmakefile.list.am: Add the build targets for the module source files, IDLs and resulting JS bindings.
* bindings/gobject/GNUmakefile.am: Add the build targets for the GObject DOM bindings.
2013-05-08 Roger Fong <roger_fong@apple.com>
Unreviewed. AppleWin VS2010 build fix.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
2013-05-08 Darin Adler <darin@apple.com>
REGRESSION(r149700): fast/css-generated-content/close-quote-negative-depth.html
https://bugs.webkit.org/show_bug.cgi?id=115776
Reviewed by Anders Carlsson.
I changed depth to more closely match what is in the CSS3 specification.
There may be a more optimal way to make it work, but this seems the most straightforward.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::RenderQuote): Initialize m_depth to -1 because that depth
is consistent with the empty string that is the initial value of the text. The
real depth will be calculated when the node is attached.
(WebCore::RenderQuote::originalText): Removed the "depth - 1" logic that
used to be done for close quotes. Instead, the updateDepth function now correctly
subtracts one for the close quote itself, not just afterward. Also added an early
exit when the depth is negative; these changes together fix the bug.
(WebCore::RenderQuote::attachQuote): Added a call to updateDepth even for the render
quote head, we now need that to set the depth either to 0 or to -1.
(WebCore::RenderQuote::detachQuote): Removed code to set m_depth to 0; if we are not
resetting the text then m_depth should be left matching the text, otherwise updateDepth
might not do its job correctly if the quote is later re-attached. What matters is that
m_depth and the text are in sync.
(WebCore::RenderQuote::updateDepth): Changed updating logic in two ways. First,
compute the depth in a local variable rather than computing it in a data member
after first saving off the old value of the data member. That's clearer style.
Second, add the code to change negative depths to zero when propagating to the
next quote in the chain, which matches how the standard is written, and decrement
the depth of the close quote itself, not the quote after the close quote.
2013-05-08 Eric Carlson <eric.carlson@apple.com>
Prevent crash when track is deleted during video element deletion.
https://bugs.webkit.org/show_bug.cgi?id=106183
Reviewed by Dean Jackson.
Test: media/track/track-remove-crash.html
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removedFrom): Set m_inActiveDocument to false so we
do not process text track cues or dispatch related events.
2013-05-08 Eric Carlson <eric.carlson@apple.com>
[Mac] Unreviewed buildfix after r149741.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible):
2013-05-08 Eric Carlson <eric.carlson@apple.com>
[Mac] Inband text tracks are not in track menu on Lion
https://bugs.webkit.org/show_bug.cgi?id=115740
Reviewed by Dean Jackson.
No new tests, covered by existing tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_closedCaptionsVisible
to false immediately, it will be reset to the appropriate value if necessary.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Remove m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Remove m_legacyWebKitClosedCaptionsVisible.
* html/HTMLMediaElement.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Remove
HAVE(AVFOUNDATION_TEXT_TRACK_SUPPORT) requirement. AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h: Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::seek): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Ditto.
(WebCore::MediaPlayerPrivateAVFoundation::trackModeChanged): Ditto.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Ditto.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Ditto.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::kind): Don't look at media characteristics,
a legacy CC track is always Captions.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::isClosedCaptions): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::containsOnlyForcedSubtitles): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::isMainProgramContent): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::isEasyToRead): Ditto.
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::label): Use different AVFoundation API on 10.7.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP.
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setClosedCaptionsVisible): Do nothing. AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Support legacy CC tracks
only on 10.8. AVFOUNDATION_TEXT_TRACK_SUPPORT -> AVFOUNDATION_MEDIA_SELECTION_GROUP
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): AVFOUNDATION_TEXT_TRACK_SUPPORT ->
AVFOUNDATION_MEDIA_SELECTION_GROUP
2013-05-08 Sergio Villar Senin <svillar@igalia.com>
Allow blank spaces before colon (:) on CSS variable definition
https://bugs.webkit.org/show_bug.cgi?id=115802
Reviewed by Darin Adler.
Test: css3/css-variable-definition.html
Modified the grammar to allow blank spaces before the colon on CSS
variable definitions.
* css/CSSGrammar.y.in:
2013-05-08 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
[GStreamer] Does memory buffering even with preload set to none
https://bugs.webkit.org/show_bug.cgi?id=115754
Reviewed by Philippe Normand.
Covered by existing tests.
Revision 148840 fixed on-disk buffering being done when preload is set to none,
but memory buffering is still being done. That is because setting the state to
paused causes GStreamer to start loading the media, to gather information. Only
doing that when committing the load avoids that while maintaining the tested
behaviour unchanged.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load): move setting pause state to commitLoad.
(WebCore::MediaPlayerPrivateGStreamer::commitLoad): see above.
2013-05-08 Andreas Kling <akling@apple.com>
SVGStyledElement::getPresentationAttribute() does not need to be virtual.
From Blink r149888 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149888>
* svg/SVGStyledElement.h:
2013-05-08 Allan Sandfeld Jensen <allan.jensen@digia.com>
Crash when loading link to audio file
https://bugs.webkit.org/show_bug.cgi?id=115794
Reviewed by Jocelyn Turcotte.
Do not access a null pointer frame.
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
2013-05-08 Christophe Dumez <ch.dumez@sisa.samsung.com>
Remove unused [TransferList] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=115788
Reviewed by Kentaro Hara.
Remove [TransferList] extended attribute and corresponding tests as it has no
effect on the generated JSC bindings.
No new tests, no behavior change.
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
(WebDOMTestSerializedScriptValueInterface):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
* bindings/scripts/test/CPP/WebDOMTestTypedefs.h:
(WebDOMTestTypedefs):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(JSTestSerializedScriptValueInterfacePrototype):
(JSTestSerializedScriptValueInterfaceConstructor):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
* bindings/scripts/test/ObjC/DOMTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl:
2013-05-08 Dongseong Hwang <dongseong.hwang@intel.com>
Make optional arguments in CanvasRenderingContext2D match the spec.
https://bugs.webkit.org/show_bug.cgi?id=115723
Reviewed by Dean Jackson.
WebKit r98985 set many arguments optional although the canvas spec[1] does not
indicate. So this patch corrects CanvasRenderingContext2D.idl to match the spec.
[1] http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/
Covered by existing tests:
canvas/philip/tests/2d.missingargs.html
fast/canvas/canvas-overloads-strokeRect.html
inspector/profiler/canvas2d/canvas2d-profiler-capturing-basics.html
* html/canvas/CanvasRenderingContext2D.idl:
2013-05-08 Ryosuke Niwa <rniwa@webkit.org>
Remove unused method and de-virtualize others in Element.h
https://bugs.webkit.org/show_bug.cgi?id=115770
Reviewed by Andreas Kling.
Merge https://chromium.googlesource.com/chromium/blink/+/c2c2ff9cb69f46f5cc9d289b2bfbdb8ab5bd3e49
The de-virtualization possibilities were noted whilst "FINALizing" the Node
hierarchy. If a method is successfully marked FINAL but then fails when marked
OVERRIDE as well, the method by definition does not need to be virtual.
* WebCore.exp.in:
* dom/Element.h:
(WebCore::Element::hasAuthorShadowRoot):
2013-05-06 Darin Adler <darin@apple.com>
Use adoptCF and adoptNS in more places
https://bugs.webkit.org/show_bug.cgi?id=115657
Reviewed by Sam Weinig.
This is similar to my last set of changes, but covers code that I missed with
global replace using the Safari Xcode workspace.
* platform/cf/win/CertificateCFWin.cpp:
(WebCore::copyCertificateToData):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
(WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
(WebCore::MediaPlayerPrivateAVFoundationCF::totalBytes):
(WebCore::mimeTypeCache):
(WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged):
(WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged):
(WebCore::AVFWrapper::createAssetForURL):
(WebCore::AVFWrapper::createPlayer):
(WebCore::AVFWrapper::createPlayerItem):
(WebCore::AVFWrapper::setAsset):
(WebCore::AVFWrapper::platformLayer):
(WebCore::AVFWrapper::createAVCFVideoLayer):
(WebCore::AVFWrapper::createImageGenerator):
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
(WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(toCACFTimingFunction):
(PlatformCAAnimation::PlatformCAAnimation):
(PlatformCAAnimation::setFromValue):
(PlatformCAAnimation::setToValue):
(PlatformCAAnimation::setValues):
(PlatformCAAnimation::setKeyTimes):
(PlatformCAAnimation::setTimingFunctions):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::setBackgroundColor):
(PlatformCALayer::setBorderColor):
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
(PlatformCALayerWinInternal::PlatformCALayerWinInternal):
(PlatformCALayerWinInternal::addTile):
* platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
(WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost):
* platform/graphics/gstreamer/PlatformVideoWindowMac.mm:
(PlatformVideoWindow::PlatformVideoWindow):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData):
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::getPostScriptName):
(WebCore::FontPlatformData::platformDataInit):
* platform/graphics/win/GraphicsContextCGWin.cpp:
(WebCore::GraphicsContext::drawWindowsBitmap):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::create):
* platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
(WebCore::MediaPlayerPrivateFullscreenWindow::setRootChildLayer):
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::rfc2616DateStringFromTime):
(WebCore::QTCFDictionaryCreateWithDataCallback):
(WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveCurrentImage):
* platform/graphics/win/WKCAImageQueue.cpp:
(WebCore::WKCAImageQueue::WKCAImageQueue):
* platform/image-decoders/ImageDecoder.h:
(WebCore::ImageDecoder::qcmsOutputDeviceProfile):
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::core):
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::cookieDomain):
(WebCore::cookieName):
(WebCore::cookiePath):
(WebCore::cookieValue):
(WebCore::filterCookies):
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::certificatePath):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::urlFromPath):
(WebCore::getURL):
* platform/win/LocalizedStringsWin.cpp:
(WebCore::createWebKitBundle):
(WebCore::localizedString):
* platform/win/SearchPopupMenuWin.cpp:
(WebCore::SearchPopupMenuWin::saveRecentSearches):
(WebCore::SearchPopupMenuWin::loadRecentSearches):
* plugins/mac/PluginPackageMac.cpp:
(WebCore::stringListFromResourceId):
(WebCore::PluginPackage::fetchInfo):
(WebCore::PluginPackage::load):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::platformStart):
* rendering/RenderThemeSafari.cpp:
(WebCore::RenderThemeSafari::platformFocusRingColor):
(WebCore::RenderThemeSafari::paintMenuListButtonGradients):
(WebCore::RenderThemeSafari::paintSliderTrack):
Use adoptCF and adoptNS throughout.
2013-05-07 Benjamin Poulain <bpoulain@apple.com>
Make CanvasStyle's CMYKAValues allocated on the heap and move the pointer in the union.
https://bugs.webkit.org/show_bug.cgi?id=115764
Reviewed by Andreas Kling.
CMYKA input is uncommon enough that we should not pay the price for
every CanvasStyle.
Make those values heap allocated and put the pointer in the union. Since
the RGBA32 values are needed for CMYKA, a RGBA32 value is added to the structure.
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::~CanvasStyle):
(WebCore::CanvasStyle::isEquivalentColor):
(WebCore::CanvasStyle::isEquivalentCMYKA):
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(CMYKAValues):
(WebCore::CanvasStyle::CMYKAValues::CMYKAValues):
(WebCore::CanvasStyle::color):
(WebCore):
2013-05-07 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues for requests in PluginView
https://bugs.webkit.org/show_bug.cgi?id=115731
Reviewed by Sam Weinig.
* plugins/PluginView.cpp:
(WebCore::PluginView::~PluginView): Removed the call to deleteAllValues.
(WebCore::PluginView::requestTimerFired): Use release to remove an OwnPtr
from m_requests rather than an explicit delete. Also use !isEmpty instead
of size > 0.
(WebCore::PluginView::scheduleRequest): Changed argument type to PassOwnPtr.
(WebCore::PluginView::load): Use adoptPtr to call scheduleRequest.
* plugins/PluginView.h: Changed argument type of scheduleRequest to
PassOwnPtr, and m_requests to a Vector<OwnPtr>.
2013-05-07 Antti Koivisto <antti@apple.com>
Remove SelectRuleFeatureSet
https://bugs.webkit.org/show_bug.cgi?id=115757
Reviewed by Benjamin Poulain.
This is dead code.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore):
(WebCore::Element::didAffectSelector):
* dom/Element.h:
(Element):
* dom/ElementShadow.h:
(WebCore::ElementShadow::invalidateDistribution):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::ContentDistributor):
(WebCore):
* html/shadow/ContentDistributor.h:
(ContentDistributor):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::insertedInto):
(WebCore::InsertionPoint::removedFrom):
* html/shadow/InsertionPoint.h:
(InsertionPoint):
* html/shadow/SelectRuleFeatureSet.cpp: Removed.
* html/shadow/SelectRuleFeatureSet.h: Removed.
* testing/Internals.cpp:
(WebCore):
* testing/Internals.idl:
2013-05-07 Anders Carlsson <andersca@apple.com>
Store the quotes in the same allocation as the QuotesData object
https://bugs.webkit.org/show_bug.cgi?id=115768
Reviewed by Andreas Kling.
Since the QuotesData object is immutable we don't need a Vector to store the quote pairs,
they can just be stored after the class data.
* rendering/style/QuotesData.cpp:
(WebCore::sizeForQuotesDataWithQuoteCount):
Helper function for computing the allocation size.
(WebCore::QuotesData::create):
Use fastMalloc + placement new.
(WebCore::QuotesData::QuotesData):
Use placement new to allocate the quote pairs.
(WebCore::QuotesData::~QuotesData):
Destroy the quote pairs.
(WebCore::QuotesData::openQuote):
Stop using Vector.
(WebCore::QuotesData::closeQuote):
Ditto.
(WebCore::operator==):
Ditto.
* rendering/style/QuotesData.h:
2013-05-07 Benjamin Poulain <bpoulain@apple.com>
We should not ref() the RefPtr twice in CanvasStyle
Reviewed by Darin Adler.
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
We leak the ref of PassRefPtr, we should not ref() it a second time.
2013-05-07 Ryosuke Niwa <rniwa@webkit.org>
Devirtualize Document class type checking
https://bugs.webkit.org/show_bug.cgi?id=115755
Reviewed by Benjamin Poulain.
Merge https://chromium.googlesource.com/chromium/blink/+/dae5adc768d5ce6bff301df6515745da8ea24950
Document has a bunch of virtual bool is*Document() methods on it, but it also has
two bools for XHTML and HTML documents which is silly. We can merge them all
together into an enum of values and devirtualize the type checking methods.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::createElement):
* dom/Document.h:
(WebCore::Document::create):
(WebCore::Document::createXHTML):
(WebCore::Document::isHTMLDocument):
(WebCore::Document::isXHTMLDocument):
(WebCore::Document::isImageDocument):
(WebCore::Document::isSVGDocument):
(WebCore::Document::isPluginDocument):
(WebCore::Document::isMediaDocument):
(WebCore::Document):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::HTMLDocument):
* html/HTMLDocument.h:
(WebCore::HTMLDocument):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::ImageDocument):
* html/ImageDocument.h:
(WebCore::ImageDocument):
* html/MediaDocument.cpp:
(WebCore::MediaDocument::MediaDocument):
* html/MediaDocument.h:
(WebCore::MediaDocument):
* html/PluginDocument.cpp:
(WebCore::PluginDocument::PluginDocument):
* html/PluginDocument.h:
(WebCore::PluginDocument):
* loader/PlaceholderDocument.h:
(WebCore::PlaceholderDocument::PlaceholderDocument):
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::SVGDocument):
* svg/SVGDocument.h:
(WebCore::SVGDocument):
2013-05-07 Anders Carlsson <andersca@apple.com>
Begin unraveling the mess that is QuotesData
https://bugs.webkit.org/show_bug.cgi?id=115765
Reviewed by Andreas Kling.
Change QuotesData to be an immutable object and fix other things that are broken.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
QuotesData::addPair is gone. Instead, create the Vector up front and pass it to QuotesData.
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::originalText):
Update for renames.
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::create):
Remove the create overload that wasn't used. Add a new create overload that takes a Vector.
(WebCore::QuotesData::openQuote):
Rename this from getOpenQuote and clean it up.
(WebCore::QuotesData::closeQuote):
Rename this from getCloseQuote and clean it up.
(WebCore::operator==):
Replace the equals member function with a proper equality operator.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
Stop calling QuotesData::equals. Use the same idiom as used for other properties.
(WebCore::RenderStyle::setQuotes):
* rendering/style/StyleRareInheritedData.cpp:
Use operator==.
(WebCore::quotesDataEquivalent):
Add helper function.
(WebCore::StyleRareInheritedData::operator==):
Call quotesDataEquivalent.
2013-05-06 Enrica Casucci <enrica@apple.com>
Support -webkit-system-font on OS X.
https://bugs.webkit.org/show_bug.cgi?id=115758
<rdar://problem/13433854>
Reviewed by Dean Jackson.
Test: platform/mac/fast/text/systemFont.html
* platform/mac/WebFontCache.mm:
(+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2013-05-07 Benjamin Poulain <bpoulain@apple.com>
Move CanvasGradient and CanvasPattern in the union of CanvasStyle
https://bugs.webkit.org/show_bug.cgi?id=115759
Reviewed by Andreas Kling.
The Gradient and Pattern are exclusive with the other values, but they
were left out of the union because they are ref-counted.
This patch moves them in the union, and simply does the ref-counting manually.
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::~CanvasStyle):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(WebCore::CanvasStyle::canvasGradient):
(WebCore::CanvasStyle::canvasPattern):
2013-05-07 Anders Carlsson <andersca@apple.com>
Remove custom allocator support from PODArena
https://bugs.webkit.org/show_bug.cgi?id=115762
Reviewed by Andreas Kling.
Nobody uses PODArena with a custom allocator, so just get rid of it and always use fastMalloc/fastFree.
* platform/PODArena.h:
(WebCore::PODArena::PODArena):
(WebCore::PODArena::allocateBase):
(WebCore::PODArena::Chunk::Chunk):
(WebCore::PODArena::Chunk::~Chunk):
(Chunk):
* platform/PODFreeListArena.h:
(WebCore::PODFreeListArena::allocate):
(WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
2013-05-07 Anders Carlsson <andersca@apple.com>
Clean up KeyframeValueList and related classes
https://bugs.webkit.org/show_bug.cgi?id=115738
Reviewed by Simon Fraser.
Add static create() functions to the AnimationValue subclasses, and change a bunch of parameters
and return values that can never be null from pointer types to reference types to better indicate this.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::filterOperationsAt):
(WebCore::GraphicsLayer::validateFilterOperations):
(WebCore::operationsAt):
(WebCore::GraphicsLayer::validateTransformOperations):
* platform/graphics/GraphicsLayer.h:
(AnimationValue):
(WebCore::AnimationValue::AnimationValue):
(WebCore::FloatAnimationValue::create):
(FloatAnimationValue):
(WebCore::FloatAnimationValue::FloatAnimationValue):
(WebCore::TransformAnimationValue::create):
(TransformAnimationValue):
(WebCore::TransformAnimationValue::value):
(WebCore::TransformAnimationValue::TransformAnimationValue):
(WebCore::FilterAnimationValue::create):
(WebCore::FilterAnimationValue::value):
(WebCore::FilterAnimationValue::FilterAnimationValue):
(FilterAnimationValue):
(WebCore::KeyframeValueList::~KeyframeValueList):
(KeyframeValueList):
(WebCore::KeyframeValueList::at):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::animationHasStepsTimingFunction):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
(WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
(WebCore::GraphicsLayerCA::timingFunctionForAnimationValue):
(WebCore::GraphicsLayerCA::setAnimationEndpoints):
(WebCore::GraphicsLayerCA::setAnimationKeyframes):
(WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
(WebCore::GraphicsLayerCA::setFilterAnimationEndpoints):
(WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation):
(WebCore::RenderLayerBacking::startTransition):
2013-05-07 Anders Carlsson <andersca@apple.com>
Add and remove databases and origins from the database tracker
https://bugs.webkit.org/show_bug.cgi?id=115752
Reviewed by Andreas Kling.
Add symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-07 Beth Dakin <bdakin@apple.com>
Still possible to fire paint-related LayoutMilestones before CA has committed the
changes
https://bugs.webkit.org/show_bug.cgi?id=115753
-and corresponding-
<rdar://problem/13822315>
Reviewed by Simon Fraser.
To ensure we wait for the CA commit, we should wait until the end of the runloop
with a zero-delay timer.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
(WebCore):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
2013-05-07 Chris Fleizach <cfleizach@apple.com>
Bug 115694 - Fix bad cast to RenderHTMLCanvas
https://bugs.webkit.org/show_bug.cgi?id=115694
Reviewed by Ryosuke Niwa.
Don't cast to RenderHTML until we check what kind of object it is.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2013-05-07 Anders Carlsson <andersca@apple.com>
The storage database tracker should know when databases come and go
https://bugs.webkit.org/show_bug.cgi?id=115748
Reviewed by Andreas Kling.
Export symbol needed by WebKit2.
* WebCore.exp.in:
2013-05-07 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in SVGResourcesCache
https://bugs.webkit.org/show_bug.cgi?id=115729
Reviewed by Benjamin Poulain.
* rendering/svg/SVGResourcesCache.cpp:
(WebCore::SVGResourcesCache::~SVGResourcesCache): Removed call to deleteAllValues.
(WebCore::SVGResourcesCache::addResourcesFromRenderObject): Use adoptPtr and release
to create new SVGResources object.
(WebCore::SVGResourcesCache::removeResourcesFromRenderObject): Use take to remove
the SVGResources from the map rather than a get combined with delete/take.
(WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Removed unneeded
call to contains, since get already returns 0 if there is no item in the map.
(WebCore::SVGResourcesCache::resourceDestroyed): Use typedef for the map type so
we don't have to repeat the type.
* rendering/svg/SVGResourcesCache.h: Added typedef CacheMap, and changed value
type to OwnPtr.
2013-05-07 Anders Carlsson <andersca@apple.com>
REGRESSION(r149647): Assertion failure in LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal
https://bugs.webkit.org/show_bug.cgi?id=115711
Reviewed by Andreas Kling.
Export SQLiteDatabase::close.
* WebCore.exp.in:
2013-05-06 Ryosuke Niwa <rniwa@webkit.org>
Add an 'isReadOnly' member to IDL parse tree structure
https://bugs.webkit.org/show_bug.cgi?id=115704
Reviewed by Kentaro Hara.
Add an 'isReadOnly' member to IDL parse tree structure by merging
https://chromium.googlesource.com/chromium/blink/+/d6add80ecd08bcd88a6ae0e1698d929830b3bd8b
and update Objective-C, C++, and GObject binding generators to use isReadOnly.
* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorGObject.pm:
(GetWriteableProperties):
(GenerateProperty):
(GenerateFunctions):
* bindings/scripts/CodeGeneratorJS.pm:
(IsReadonly):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLParser.pm:
(parseAttributeRest):
(parseExceptionField):
(parseAttributeRestOld):
2013-05-07 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in SMILTimeContainer
https://bugs.webkit.org/show_bug.cgi?id=115730
Reviewed by Geoffrey Garen.
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::~SMILTimeContainer): Removed call to deleteAllValues.
(WebCore::SMILTimeContainer::schedule): Use add instead of get/set to put a new
AnimationsVector into the map as needed.
(WebCore::SMILTimeContainer::setElapsed): Added get since values are OwnPtr now.
(WebCore::SMILTimeContainer::updateAnimations): Ditto.
* svg/animation/SMILTimeContainer.h: Changed value type of GroupedAnimationsMap
to OwnPtr instead of raw pointer.
2013-05-07 Anders Carlsson <andersca@apple.com>
Remove AlwaysInline.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115727
Reviewed by Brent Fulgham.
The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason
to keep AlwaysInline.h around anymore.
* WebCore.vcproj/WebCore.vcproj:
* bindings/js/JSDOMWindowCustom.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* platform/graphics/filters/FEConvolveMatrix.h:
* rendering/InlineIterator.h:
* rendering/InlineTextBox.cpp:
* rendering/RenderBlockLineLayout.cpp:
* rendering/RenderText.cpp:
2013-05-07 peavo@outlook.com <peavo@outlook.com>
[Curl] POST requests sometimes fail.
https://bugs.webkit.org/show_bug.cgi?id=111844
Reviewed by Brent Fulgham.
Curl adds the header 'Expect: 100-Continue' when sending a POST request.
When we receive the header 'HTTP/1.1 100 Continue', we should not call
ResourceHandleClient::didReceiveResponse(), as this will cancel the request,
because the MIME type is empty in this case, causing the POST request to fail.
This header is only sent as an info header, or provisional response.
In addition, this patch changes the classification of http code 304 (Not modified).
It is not reported as a redirect anymore, but as a response
(ResourceHandleClient::didReceiveResponse() is called.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::isHttpInfo): Added helper method to determine if http code is http info.
(WebCore::isHttpRedirect): Added helper method to determine if http code is http redirect.
(WebCore::headerCallback): Just return when receiving the header'HTTP/1.1 100 Continue'.
2013-05-07 Carlos Garcia Campos <cgarcia@igalia.com>
[X11][BlackBerry] Check if MOZ_X11 is defined instead of XP_UNIX npruntime_internal.h
https://bugs.webkit.org/show_bug.cgi?id=113687
Reviewed by Anders Carlsson.
It's assumed that all UNIX platforms use X11 for plugins, which is
not the case of BlackBerry.
* bridge/npruntime_internal.h: Use MOZ_X11 instead of XP_UNIX.
2013-05-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
https://bugs.webkit.org/show_bug.cgi?id=115646
Reviewed by Darin Adler.
No new tests, no new functionality.
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::get):
(WebCore::AXObjectCache::remove):
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::objectFromAXID):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::getImage):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::rootEditableElementForSelectionOnMouseDown):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elementForAlias):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::findInsertionPointFor):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::resourceForURL):
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::archiveResourceForURL):
* page/PageGroup.cpp:
(WebCore::PageGroup::transientLocalStorage):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::pauseTransitionAtTime):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateMaskLayer):
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::getBlobDataFromURL):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::pluginForMIMEType):
(WebCore::PluginDatabase::MIMETypeForExtension):
* rendering/RenderCounter.cpp:
(WebCore::makeCounterNode):
(showCounterRendererTree):
* svg/graphics/filters/SVGFilterBuilder.cpp:
(WebCore::SVGFilterBuilder::getEffectById):
Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
2013-05-06 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in KeyframeValueList
https://bugs.webkit.org/show_bug.cgi?id=115652
Reviewed by Simon Fraser.
Also made a few related style fixes in the functions touched.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::KeyframeValueList::insert): Change argument type to PassOwnPtr
and update use of m_values since it has OwnPtr now instead of raw pointer.
* platform/graphics/GraphicsLayer.h: Move conditional includes to a
separate paragraph, removed an unneeded forward class declaration.
(WebCore::AnimationValue::AnimationValue): Marked this constructor explicit
and removed an unneeded if statement.
(WebCore::AnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
(WebCore::FloatAnimationValue::clone): Changed this to return a PassOwnPtr.
(WebCore::TransformAnimationValue::TransformAnimationValue): Marked explicit.
(WebCore::TransformAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
(WebCore::FilterAnimationValue::FilterAnimationValue): Marked explicit.
(WebCore::FilterAnimationValue::clone): Changed to use adoptPtr and PassOwnPtr.
(WebCore::KeyframeValueList::KeyframeValueList): Marked explicit.
(WebCore::KeyframeValueList::~KeyframeValueList): Removed, since the default
destructor works without an explicit deleteAllValues call.
(WebCore::KeyframeValueList::at): Added call to get needed since the vector
contains OwnPtr now.
(WebCore::KeyframeValueList::insert): Changed to take PassOwnPtr and then
removed now-redundant comment saying "takes ownership of the pointer".
(WebCore::KeyframeValueList::m_values): Changed type to Vector<OwnPtr>.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::startAnimation): Added adoptPtr next to the
all the places new was done before calling KeyframeValueList::insert. Also
simplified the booleans and #if in this function.
(WebCore::RenderLayerBacking::startTransition): Ditto.
2013-05-06 Ryosuke Niwa <rniwa@webkit.org>
[Replaceable] attributes must be readonly
https://bugs.webkit.org/show_bug.cgi?id=115692
Reviewed by Kentaro Hara.
Merge https://chromium.googlesource.com/chromium/blink/+/ac61fbfe875d3c3c37d529683139ceb0ad4330bb.
Web IDL specification says [Replaceable] attributes are readonly:
http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Replaceable
Update the two instances of [Replaceable] in WebCore that didn't have readonly modifier to match
the specifcation and the rest of WebCore. There should be no behavioral changes as the code generator
already assumed [Replaceable] attributes are readonly.
* html/HTMLDocument.idl:
* page/DOMWindow.idl:
2013-05-06 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in DocumentMarkerController
https://bugs.webkit.org/show_bug.cgi?id=115655
Reviewed by Andreas Kling.
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::~DocumentMarkerController): Added here
so the destructor isn't implicitly inline.
(WebCore::DocumentMarkerController::detach): Removed now-unneeded code to
call deleteAllValues. Also moved code to set m_possiblyExistingMarkerTypes
to after clearing m_markers to be consistent with how other functions do it.
(WebCore::DocumentMarkerController::addMarker): Changed code to use the
add idiom to avoid double hash table lookup. Changed to use adoptPtr since
the map now contains OwnPtr.
(WebCore::DocumentMarkerController::removeMarkers): Removed explicit calls
to delete list since removing the entry from the map now deletes the list.
Moved the code to check if m_markers has become empty so it's only called
when we actually remove something from m_markers.
(WebCore::DocumentMarkerController::markerContainingPoint): Added get().
(WebCore::DocumentMarkerController::renderedRectsForMarkers): Added get().
(WebCore::DocumentMarkerController::removeMarkers): Changed to use a new
interface to removeMarkersFromList. This eliminated the need to copy the
entire map when removing markers; instead we can just copy the keys.
(WebCore::DocumentMarkerController::removeMarkersFromList): Changed to use
an iterator instead of being passed the key/value pair from the map. Also
rearranged the logic so there is less repeated code and removed some now-
unneeded comments.
(WebCore::DocumentMarkerController::repaintMarkers): Added get().
(WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect):
Added get().
(WebCore::DocumentMarkerController::showMarkers): Added get().
* dom/DocumentMarkerController.h: Removed implementation of the destructor
that called the detach function; that was just sharing the now-unneeded
call to deleteAllValues. Changed the type of the map to use an OwnPtr for
the value. Changed the interface of removeMarkersFromList to take a map
iterator instead of a key/value pair.
2013-05-06 Beth Dakin <bdakin@apple.com>
Reproducible crash in RenderBoxModelObject::adjustedPositionRelativeToOffsetParent()
https://bugs.webkit.org/show_bug.cgi?id=115685
-and corresponding-
<rdar://problem/13700734>
Reviewed by Sam Weinig.
This fix here is just to rollout the change that caused this regression, which is
http://trac.webkit.org/changeset/147395 . That change was not intended to cause any
behavioral differences. The change made it so RenderObject::offsetParent() returned
an Element* instead of a RenderBoxModelObject*. However, can muddle things when the
object we are returning is a continuation. Multiple RenderObjects have the same
Element in a continuation, so this new code can lead to a crash in
adjustedPositionRelativeToOffsetParent() when we expect to walk the RenderObject
chain and find the offsetParent in the Element’s parent chain. But we might crash in
some complicated continuation scenarios because we lost this disambiguation of which
RenderObject to start with.
Roll out.
* dom/Element.cpp:
(WebCore::Element::offsetParent):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetParent):
* rendering/RenderObject.h:
(RenderObject):
2013-05-06 Ryosuke Niwa <rniwa@webkit.org>
Unify ways to cache named item in HTMLCollections
https://bugs.webkit.org/show_bug.cgi?id=115584
Reviewed by Antti Koivisto.
Refactor the code to share the same infrastructure for both id and name attributes maps.
Also get rid of shouldRegisterAsNamedItem and shouldRegisterAsExtraNamedItem from various Element subclasses
as these member functions were duplicating the information in HTMLNameCollection.cpp. Nevertheless, HTMLImageElement
and HTMLObjectElement still update HTMLDocument's window and document name getter maps when their presence as named
item changes due to an attribute change and children changes respectively.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter): Use windowNamedItemMap().containsSingle() instead of collection->hasExactlyOneItem() to
avoid instantiating HTMLCollection until we know for sure we're returning multiple items.
(WebCore::JSDOMWindow::getOwnPropertySlot): Call windowNamedItemMap().contains() instead of document->hasNamedItem()
since the latter has been removed.
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto.
(WebCore::JSDOMWindow::getOwnPropertyDescriptor): Ditto.
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName): Call documentNamedItemMap().contains() instead of
document->hasExtraNamedItem() since the latter has been removed.
(WebCore::JSHTMLDocument::nameGetter): Use documentNamedItemMap().containsSingle() instead of
collection->hasExactlyOneItem() to avoid instantiating HTMLCollection when we're returning the first item.
* dom/Document.cpp:
(WebCore::Document::windowNamedItems): Instantiate WindowNameCollection, which is a subclass of HTMLNameCollection,
instead of HTMLNameCollection since the latter class no longer has a public constructor.
(WebCore::Document::documentNamedItems): Ditto; instantiate DocumentNameCollection.
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesName): Added for name attribute.
(WebCore::keyMatchesWindowNamedItem): Added for window name getter.
(WebCore::keyMatchesDocumentNamedItem): Added for document name getter.
(WebCore::DocumentOrderedMap::getElementByName): Added for name attribute.
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem): Added for window name getter.
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem): Added for document name getter.
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle): Added.
(WebCore::DocumentOrderedMap::containsMultiple): Fixed the bug that containsMultiple returns true even when
the duplicate count has been reduced to 1. Unfortunately this behavior change is not testable because the old code
worked properly (though less efficient) even if this function returned a wrong value.
* dom/Element.cpp:
(WebCore::Element::insertedInto):
(WebCore::Element::removedFrom):
(WebCore::Element::updateName): Added. Updates TreeScope's name attribute map as well as HTMLDocument's window name
and document name maps.
(WebCore::Element::updateId): Added the code to update HTMLDocument's window name and document name maps.
* dom/Element.h:
(Element): Removed shouldRegisterAsNamedItem, shouldRegisterAsExtraNamedItem, updateNamedItemRegistration, and
updateExtraNamedItemRegistration as they're no longer used.
* dom/TreeScope.cpp:
(SameSizeAsTreeScope):
(WebCore::TreeScope::getElementByName): Added.
(WebCore::TreeScope::addElementByName): Added.
(WebCore::TreeScope::removeElementByName): Added.
* dom/TreeScope.h:
(WebCore::TreeScope::hasElementWithName): Added.
(WebCore::TreeScope::containsMultipleElementsWithName): Added.
* html/HTMLAppletElement.h:
(HTMLAppletElement):
* html/HTMLCollection.cpp:
(WebCore::isMatchingElement): Use HTMLNameCollection subclasses' nodeMatches.
(WebCore::HTMLCollection::namedItem): Added a fast path for named item.
(WebCore::HTMLCollection::hasNamedItem): Use namedItem to avoid the work in the fast path.
* html/HTMLCollection.h:
(HTMLCollection): Removed checkForNameMatch.
* html/HTMLDocument.cpp:
(WebCore): Removed various member functions related to m_namedItemCounts and m_extraNamedItemCounts.
* html/HTMLDocument.h:
(WebCore::HTMLDocument::documentNamedItemMap): Added.
(WebCore::HTMLDocument::windowNamedItemMap): Added.
(HTMLDocument): Replaced m_namedItemCounts and m_extraNamedItemCounts by m_documentNamedItem and m_windowNamedItem.
Note that they're not one to one.
* html/HTMLEmbedElement.h:
(HTMLEmbedElement):
* html/HTMLFormElement.h:
(HTMLFormElement):
* html/HTMLIFrameElement.cpp: Removed the code to track the element's name since we already do this in Element.
(WebCore::HTMLIFrameElement::parseAttribute):
* html/HTMLIFrameElement.h:
(HTMLIFrameElement):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Update the HTMLDocument's maps when the name attribute's existence
changes its presence on window and document name getters in turn. This behavior change, again, appears to be
untestable due to the old being more graceful when DocumentOrderedMap returned a wrong value.
* html/HTMLImageElement.h:
* html/HTMLNameCollection.cpp:
(WebCore::HTMLNameCollection::HTMLNameCollection): No longer overrides itemAfter. This enables backwards traversals
of the tree along with other optimizations in HTMLCollection.
(WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch): Added. Used in Element::updateName to determine
whether add() or remove() should be called on HTMLDocument's maps.
(WebCore::WindowNameCollection::nodeMatches): Added.
(WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch): Added. Used in Element::updateName to determine
whether add() or remove() should be called on HTMLDocument's maps.
(WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch): Ditto.
(WebCore::DocumentNameCollection::nodeMatches): Added.
* html/HTMLNameCollection.h:
(HTMLNameCollection): Removed create since this class shouldn't be instantiated on its own.
(WebCore::WindowNameCollection): Added.
(WebCore::WindowNameCollection::create): Added.
(WebCore::WindowNameCollection::nodeMatches): Added.
(WebCore::WindowNameCollection::nodeMatchesIfIdAttributeMatch): Added.
(WebCore::WindowNameCollection::WindowNameCollection): Added.
(WebCore::DocumentNameCollection): Added.
(WebCore::DocumentNameCollection::create): Added.
(WebCore::DocumentNameCollection::nodeMatches): Added.
(WebCore::DocumentNameCollection::DocumentNameCollection): Added.
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem): Update both window and document getter maps of HTMLDocument when
the visibility of this element changes due to the DOM mutations in the subtree.
* html/HTMLObjectElement.h:
(WebCore::HTMLObjectElement):
(WebCore::toHTMLObjectElement): Added.
2013-05-06 Andreas Kling <akling@apple.com>
Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
<http://webkit.org/b/115674>
Reviewed by Alexey Proskuryakov.
Don't cache the Document::renderer() in a local since layout may blow it away.
* dom/Document.cpp:
(WebCore::Document::implicitClose):
2013-05-06 Anders Carlsson <andersca@apple.com>
More work on LocalStorageDatabaseTracker
https://bugs.webkit.org/show_bug.cgi?id=115680
Reviewed by Andreas Kling.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-06 Manuel Rego Casasnovas <rego@igalia.com>
[GTK] Add webkit_uri_scheme_request_finish_error
https://bugs.webkit.org/show_bug.cgi?id=94316
Reviewed by Anders Carlsson.
No behaviour change, covered by existing tests.
* platform/network/soup/ResourceError.h:
(ResourceError): Rename genericIOError() to genericGError().
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::httpError): Use genercicGError() instead of
genericIOError().
(WebCore::ResourceError::genericGError): Use error domain instead of
always return a G_IO_ERROR.
* platform/network/soup/ResourceHandleSoup.cpp: Use genericGError()
instead of genericIOError().
(WebCore::redirectSkipCallback):
(WebCore::readCallback):
2013-05-06 Bem Jones-Bey <bjonesbe@adobe.com>
Heap-use-after-free in WebCore::InlineFlowBox::deleteLine
https://bugs.webkit.org/show_bug.cgi?id=114772
Reviewed by David Hyatt.
Fix the new use after free issues in Ruby.
Test: fast/ruby/ruby-svg-crash.html
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::removeChild):
2013-05-06 Robert Hogan <robert@webkit.org>
REGRESSION(r140024): child of fixed div inside of absolute div does not get resized when window is resized
https://bugs.webkit.org/show_bug.cgi?id=115379
Reviewed by David Hyatt.
When detecting whether a fixed pos object needed to move with an absolute ancestor we checked
whether the logical width of the fixed pos object had changed. This check prevented the fixed pos
object from detecting later on that it needed to relayout its children in layoutBlock(). So recompute the width
for our check instead of updating it.
Test: fast/block/positioning/child-of-fixed-pos-after-movement.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
2013-05-06 Mike Lattanzio <mlattanzio@blackberry.com>
[BlackBerry] Enable and Expose Text Autosizing through BlackBerry::WebKit::WebSettings
https://bugs.webkit.org/show_bug.cgi?id=113808
Reviewed by Rob Buis.
Added TextAutosizer.cpp to the BlackBerry build.
* PlatformBlackBerry.cmake:
2013-05-06 Darin Adler <darin@apple.com>
Use OwnPtr instead of deleteAllValues in SVGAttributeToPropertyMap
https://bugs.webkit.org/show_bug.cgi?id=115653
Reviewed by Andreas Kling.
Also made a few style fixes to the code at the same time.
* svg/properties/SVGAttributeToPropertyMap.cpp:
(WebCore::SVGAttributeToPropertyMap::addProperties): Changed argument to
const because there was no reason for it to be non-const. Added calls to
get() since the items in the map are now OwnPtr. Added a couple FIXMEs
about performance mistakes.
(WebCore::SVGAttributeToPropertyMap::addProperty): Added a FIXME about
a small performance mistake, and updated to use OwnPtr instead of raw
pointers.
(WebCore::SVGAttributeToPropertyMap::synchronizeProperties): Added a call
to get().
* svg/properties/SVGAttributeToPropertyMap.h: Removed now-unneeded
constructor and destructor definitions. Changed the type for the
addProperties to be const&. Added a comment about incorrect function
naming. Changed the type of the map data member to use OwnPtr.
2013-05-06 Antti Koivisto <antti@apple.com>
Remove more code that was only needed for younger/older shadow trees
https://bugs.webkit.org/show_bug.cgi?id=115662
Reviewed by Andreas Kling.
This is dead code.
* WebCore.exp.in:
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::nodeCanBeDistributed):
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/EventPathWalker.cpp:
(WebCore::EventPathWalker::moveToParent):
* html/shadow/ContentDistributor.cpp:
(WebCore::ScopeContentDistribution::ScopeContentDistribution):
(WebCore::ScopeContentDistribution::registerInsertionPoint):
(WebCore::ScopeContentDistribution::unregisterInsertionPoint):
(WebCore):
(WebCore::ScopeContentDistribution::hasInsertionPoint):
(WebCore::ContentDistributor::invalidate):
* html/shadow/ContentDistributor.h:
(ScopeContentDistribution):
* html/shadow/InsertionPoint.cpp:
(WebCore::InsertionPoint::contains):
(WebCore::resolveReprojection):
(WebCore::collectInsertionPointsWhereNodeIsDistributed):
* html/shadow/InsertionPoint.h:
* testing/Internals.cpp:
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
2013-05-06 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Update HTML5 progress bar UX.
https://bugs.webkit.org/show_bug.cgi?id=115284.
Reviewed by Rob Buis.
BlackBerry PR 331729.
Internally Reviewed by Jeff Rogers.
Use GL render to paint progress bar to meet UX specs.
Also change the slider range to GL render.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):
(WebCore::RenderThemeBlackBerry::paintSliderTrack):
(WebCore::RenderThemeBlackBerry::paintProgressTrackRect):
(WebCore::drawProgressTexture):
(WebCore::RenderThemeBlackBerry::paintProgressBar):
* platform/blackberry/RenderThemeBlackBerry.h:
(RenderThemeBlackBerry):
2013-05-06 Bem Jones-Bey <bjonesbe@adobe.com>
[CSS Exclusions] remove unused -webkit-wrap property
https://bugs.webkit.org/show_bug.cgi?id=102105
Reviewed by Darin Adler.
Remove -webkit-wrap property and all mentions. This property doesn't
exist in the spec anymore, and was never implemented more than just
parsing the property.
* WebCore.order:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
(WebCore::StylePropertySet::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::shorthandForProperty):
* css/StylePropertyShorthand.h:
(WebCore):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
2013-05-06 Anders Carlsson <andersca@apple.com>
Write storage changes to disk
https://bugs.webkit.org/show_bug.cgi?id=115660
Reviewed by Andreas Kling.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-06 Tiancheng Jiang <tijiang@rim.com>
[BlackBerry] Update HTML5 progress bar UX.
https://bugs.webkit.org/show_bug.cgi?id=115284.
Reviewed by Rob Buis.
BlackBerry PR 331729.
Internally Reviewed by Jeff Rogers.
* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore):
(WebCore::createLinearGradient):
(WebCore::RenderThemeBlackBerry::paintSliderTrack):
(WebCore::RenderThemeBlackBerry::paintSliderTrackRect):
(WebCore::RenderThemeBlackBerry::paintProgressBar):
* platform/blackberry/RenderThemeBlackBerry.h:
(RenderThemeBlackBerry):
2013-05-06 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[texmap] draw content if graphics layer displays a video
https://bugs.webkit.org/show_bug.cgi?id=114742
Reviewed by Noam Rosenthal.
Bug #86410 focuses on having composited/accelerated video using the
TextureMapper. But the video is not rendered fast by using the
repaint() method. In the case of the TextureMapper it is required to
call a content display as fast as possible.
This patch adds the class TextureMapperPlatformLayer::Client with the
method setLayerNeedsDisplay(). The GraphicsLayerTextureMapper
implements this new class and the new method calls
setContentsNeedsDisplay(), causing a faster content display when
requested.
No new tests. Covered by existing tests.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToMedia): sets itself
as the TextureMapperPlatformLayer's client
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::setLayerNeedsDisplay):
TextureMapperPlatformLayer::Client::setLayerNeedsDisplay implementation
(GraphicsLayerTextureMapper):
* platform/graphics/texmap/TextureMapperPlatformLayer.h:
(Client): New class
(WebCore::TextureMapperPlatformLayer::TextureMapperPlatformLayer):
(WebCore::TextureMapperPlatformLayer::setClient): client setter
(WebCore::TextureMapperPlatformLayer::setLayerNeedsDisplay): facade
for client's method
2013-05-02 David Hyatt <hyatt@apple.com>
Improve the performance of RenderDeprecatedFlexibleBox.
https://bugs.webkit.org/show_bug.cgi?id=115543.
Optimize deprecated flexible box layout to be much faster. This patch implements
the following optimizations in the deprecated flexible box:
(1) Defer repainting of children until they have been placed into their final
positions. This is done by collecting all of the old frame rects into a Vector
and then doing a walk after layout is finished to repaint any of the children if
they moved from that position. This code matches the new RenderFlexibleBox's system
for repainting moved children.
(2) Implement support for layout deltas. We keep a Vector of layout deltas for each
child as we shift them around, and every time we lay a child out again, we apply that
child's current layout delta to avoid repainting at the new position. RenderFlexibleBox
does not have support for layout deltas yet, so we'll need to implement this in the
new flexbox code as well.
(3) Optimize flexible objects to avoid laying them out unflexed. When laying out
horizontal and vertical boxes now, we lay out the inflexible items first. We then
check to see if the inflexible extent of all those children has changed.
If this extent didn't change, and the flexible items either don't need layout or there
is only one flexing item, then we avoid laying out the item in an unflexed state
and simply lay out one time with the flex applied instead. The new RenderFlexibleBox
does not have these optimizations and would benefit from them in the block-direction box
case (it uses preferred logical widths in the inline-direction box case, and so avoided
layouts in that direction already).
Reviewed by Beth Dakin.
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::appendChildFrameRects):
Cache all of the old child frame rects so that we can compare them with the final
positions for repaintDuringLayoutIfMoved. This collection is identical to what the
new flexbox code does.
(WebCore::appendChildLayoutDeltas):
Build up a vector that tracks layout deltas. We apply these layout deltas every
time we lay out a child so that any repainting done during layout ignores our shifted
position and just keeps using the old position. The new flexbox does not have this
code yet.
(WebCore::repaintChildrenDuringLayoutIfMoved):
After final placement of children, we do a single pass over all of the children and
repaint them if they shifted their positions. This matches how the new flexbox works.
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
Collect the frame rects and layout deltas, and defer repainting of children to the
end of layout.
(WebCore::gatherFlexChildrenInfo):
Don't clear flex overrides when gathering flex information. Add additional information
such as the number of flexing items so that we can use it to optimize flex layout.
(WebCore::layoutChildIfNeededApplyingDelta):
A helper for applying your current layout delta for a child when laying that child out.
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
Both methods are patched to aggregate layout deltas as children move around during
the multiple passes. In addition we now optimize layout in a couple of cases, such
as when the inflexible space stays the same (thus giving a flexible object the
same amount of available space, avoiding a need to lay out unflexed first).
(WebCore::RenderDeprecatedFlexibleBox::placeChild):
Patched to add to our cached layout delta for that child when we do a movement.
* rendering/RenderDeprecatedFlexibleBox.h:
Changes to method signatures.
2013-05-04 Andy Estes <aestes@apple.com>
REGRESSION (r125592): Reproducible crash in DOMWindow::open when a delegate closes the new window in decidePolicyForNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=115609
Reviewed by Oliver Hunt.
When a window created by window.open() is navigated, the embedder might
close it in decidePolicyForNavigationAction. If this happens, we end up
with a pointer to a deleted Frame.
Fix this by keeping a strong reference to the Frame created by
createWindow(). We can later determine if the window was closed by
checking if the new Frame has a detached Page.
Added an API test: WebKit1.CloseNewWindowInNavigationPolicyDelegate.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
2013-05-06 Zan Dobersek <zdobersek@igalia.com>
[GTK] Move GeolocationProviderGeoclue into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115591
Reviewed by Martin Robinson.
No new tests - no new functionality.
* GNUmakefile.am: Remove the Source/WebCore/platform/geoclue directory from the webkitgtk_cppflags list.
* GNUmakefile.list.am: Move the GeolocationProviderGeoclue(Client) sources under platform_sources.
2013-05-06 Zoltan Arvai <zarvai@inf.u-szeged.hu>
[Qt][Win] Unreviewed buildfix after r149579.
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::addQtWebKitPluginPath):
2013-05-06 Antoine Quint <graouts@apple.com>
Manage the presentation of the snapshotted plug-in using JavaScript
https://bugs.webkit.org/show_bug.cgi?id=115548
Reviewed by Dean Jackson.
* Resources/plugIns.js:
(createOverlay):
Implement the createOverlay(shadowRoot, titleText, subtitleText) method
that is called from WebCore (HTMLPlugInImageElement::didAddUserAgentShadowRoot)
to allow the injected script to customize the shadow root for a snapshotted
plug-in. This is a default implementation, clients are expected to customize
this by providing their own JS file with enhanced behavior.
* css/CSSDefaultStyleSheets.cpp:
(WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
Since we no longer have a default shadow tree generated in C++, it makes little
sense for clients to extend the default snapshotted plug-in stylesheet, so we
only insert it if no custom one is provided by the chrome client.
* css/plugIns.css:
Better styling of the default snapshotted plug-in overlay look by using CSS
flex boxes. Also using more explicit selector as an optimization.
* dom/Document.cpp:
(WebCore::Document::ensurePlugInsInjectedScript):
Expose a new method to allow HTMLPlugInImageElement instances to ensure that
the JavaScript code required to customize the snapshotted plug-in's shadow root
is indeed injected in the current document. The actual injection would only
happen once per document so all snapshotted plug-ins share the same scripting
context.
* dom/Document.h:
Expose the new ensurePlugInsInjectedScript method and the m_hasInjectedPlugInsScript
property used to ensure injection happens only once per document.
* html/HTMLPlugInImageElement.cpp:
(WebCore::titleText):
(WebCore::subtitleText):
Store the localized strings for each mime-type in a static hash map as it can be
costly to retrieve them each time from the client. It is expected the chrome client
will want to provide localized strings taking into account the snapshotted plug-in's
mime-type, so we're adding this as a parameter.
(WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
Dispatch a "resize" event to the shadow root to notify the injected script that the
snapshotted plug-in's metrics have changed and to allow the overlay to update itself
as a result.
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
Remove all the DOM generation code in favor of an approach where we create a shared
DOM scripting world in which we inject JavaScript code that will perform the same
task but will additionally be provided by the client in order to provide a completely
custom overlay for the snapshotted plug-in. The sole contract is for the JavaScript
to implement a createOverlay(shadowRoot, titleText, subtitleText) method.
(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
Renamed method to be generic to the overlay as opposed to text labels and use the
element with CSS class name "snapshot-overlay" as the comparison node.
* html/HTMLPlugInImageElement.h:
(HTMLPlugInImageElement):
Removing a couple of unused members since we no longer generate the shadow DOM from C++
and rename the partOfSnapshotLabel method to partOfSnapshotOverlay.
* page/ChromeClient.h:
(WebCore::ChromeClient::plugInStartLabelTitle):
(WebCore::ChromeClient::plugInStartLabelSubtitle):
(WebCore::ChromeClient::plugInExtraScript):
Pass in the mime-type to plugInStartLabelTitle and plugInStartLabelSubtitle and expose
a new plugInExtraScript method to allow the chrome client to provide a custom JS file
for the management of the shadow root.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::handleEvent):
Update the terminology from "label" to "overlay" per the changes made in HTMLPlugInImageElement.
2013-05-06 Robert Hogan <robert@webkit.org>
REGRESSION(r140907) - Backport blink r149612 to fix vertical-align and rowspan issue
https://bugs.webkit.org/show_bug.cgi?id=115611
Patch by Julien Chaffraix.
Reviewed by Benjamin Poulain.
Backport phttps://src.chromium.org/viewvc/blink?view=rev&revision=149612 from
https://chromiumcodereview.appspot.com/14105010
Fix the rows' height computation with vertical-align: baseline and rowspan.
r140907 was careful in avoiding updating the baseline descent for
spanning cells. However it still added the non-spanning cells baseline
descent to the spanning cells' row height computation.
This change avoids the previous issue by not adding the baseline
descent in this case.
Test: fast/table/baseline-align-rowspan.html
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove Vector::prepend
https://bugs.webkit.org/show_bug.cgi?id=115618
Reviewed by Geoffrey Garen.
Replace calls to Vector::prepend with either Vector::insert,
or a combination of Vector::append and Vector::reverse.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::scrollToGlobalPoint):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::addStops):
* css/CSSValueList.h:
(WebCore::CSSValueList::prepend):
* dom/Document.cpp:
(WebCore::Document::iconURLs):
* editing/TextIterator.cpp:
(WebCore::SearchBuffer::prependContext):
* editing/VisibleUnits.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
* history/HistoryItem.cpp:
(WebCore::HistoryItem::padDailyCountsForNewVisit):
(WebCore::HistoryItem::collapseDailyVisitsToWeekly):
* inspector/InjectedScriptHost.cpp:
(WebCore::InjectedScriptHost::addInspectedObject):
* platform/graphics/SVGGlyph.cpp:
(WebCore::charactersWithArabicForm):
2013-05-05 Sam Weinig <sam@webkit.org>
Remove empty function SQLiteFileSystem::registerSQLiteVFS() and its callers
https://bugs.webkit.org/show_bug.cgi?id=115619
Reviewed by Dan Bernstein.
* Modules/webdatabase/DatabaseTracker.cpp:
* platform/sql/SQLiteFileSystem.cpp:
* platform/sql/SQLiteFileSystem.h:
* storage/StorageTracker.cpp:
2013-05-05 Chris Fleizach <cfleizach@apple.com>
AX: aria-checked not exposed correctly on menuitemcheckbox or menuitemradio roles
https://bugs.webkit.org/show_bug.cgi?id=115499
Reviewed by Tim Horton.
Expose isChecked() for menu item objects.
Return the Mac-platform specific value that you find on menu items for "checked" menu items.
Test: platform/mac/accessibility/aria-menuitem-checked-value.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isChecked):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2013-05-05 Tim Horton <timothy_horton@apple.com>
[wk2] Page Overlays: deviceScaleFactor doesn't update when the display changes
https://bugs.webkit.org/show_bug.cgi?id=115577
<rdar://problem/13762583>
Reviewed by Darin Adler.
* WebCore.exp.in:
Export GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants
2013-05-05 Anders Carlsson <andersca@apple.com>
Remove the Vector::append overload that takes a Vector
https://bugs.webkit.org/show_bug.cgi?id=115535
Reviewed by Andreas Kling.
Use Vector::appendVector instead.
* Modules/indexeddb/IDBBackingStore.cpp:
(WebCore::IDBBackingStore::putRecord):
(WebCore::IDBBackingStore::putIndexDataForRecord):
* Modules/indexeddb/IDBLevelDBCoding.cpp:
(WebCore::IDBLevelDBCoding::encodeStringWithLength):
(WebCore::IDBLevelDBCoding::encodeIDBKey):
(WebCore::IDBLevelDBCoding::encodeIDBKeyPath):
(WebCore::IDBLevelDBCoding::SchemaVersionKey::encode):
(WebCore::IDBLevelDBCoding::MaxDatabaseIdKey::encode):
(WebCore::IDBLevelDBCoding::DataVersionKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseFreeListKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseNameKey::encode):
(WebCore::IDBLevelDBCoding::DatabaseMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::IndexMetaDataKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreFreeListKey::encode):
(WebCore::IDBLevelDBCoding::IndexFreeListKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreNamesKey::encode):
(WebCore::IDBLevelDBCoding::IndexNamesKey::encode):
(WebCore::IDBLevelDBCoding::ObjectStoreDataKey::encode):
(WebCore::IDBLevelDBCoding::ExistsEntryKey::encode):
(WebCore::IDBLevelDBCoding::IndexDataKey::encode):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::clear):
(WebCore::AudioContext::scheduleNodeDeletion):
* accessibility/AccessibilityARIAGrid.cpp:
(WebCore::AccessibilityARIAGrid::addTableCellChild):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::cells):
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::add):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::addToMatchedPropertiesCache):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/Range.cpp:
(WebCore::Range::getBorderAndTextQuads):
* html/FormController.cpp:
(WebCore::FormController::getReferencedFilePaths):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setLineDash):
* html/parser/HTMLFormattingElementList.cpp:
(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
* html/track/WebVTTToken.h:
(WebCore::WebVTTToken::addNewClass):
(WebCore::WebVTTToken::addNewAnnotation):
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::preferredLanguages):
* platform/FileChooser.cpp:
(WebCore::FileChooserSettings::acceptTypes):
* platform/SharedBufferChunkReader.cpp:
(WebCore::SharedBufferChunkReader::nextChunk):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::getSitesInMediaCache):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateSublayerList):
* platform/mac/PasteboardMac.mm:
(WebCore::createWritableTypesForImage):
(WebCore::writableTypesForImage):
(WebCore::Pasteboard::writeSelectionForTypes):
* platform/network/FormDataBuilder.cpp:
(WebCore::FormDataBuilder::generateUniqueBoundaryString):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::defaultPluginDirectories):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRunsForSegment):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::OverlapMap::popCompositingContainer):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::splitColumn):
* svg/SVGGlyphMap.h:
(WebCore::SVGGlyphMap::collectGlyphsForString):
* xml/XPathNodeSet.h:
(WebCore::XPath::NodeSet::append):
2013-05-05 Anders Carlsson <andersca@apple.com>
Try to fix the Windows build.
Make plugIns.js have a non-zero length.
* Resources/plugIns.js:
2013-05-04 Dean Jackson <dino@apple.com>
Animations and Transitions should not start when globally suspended
https://bugs.webkit.org/show_bug.cgi?id=114915
Reviewed by Sam Weinig.
When the Document's AnimationController was suspended, we still
started new transitions and animations. Change this so that
animations enter a paused-but-new state, where they are frozen
until the AnimationController resumes. At that time, it is as
if they had just appeared: any delay counts down before
the animation starts.
For transitions, the change in value must still happen, but
it does so immediately. No transitionend event should be fired.
This produces a slightly confusing behaviour, because any
in-progress transitions are suspended, but any new style changes
happen instantly. This might sound contradictory, but in general
suspending the document is a rare (and dangerous) thing to do.
Previously, the Document would call resumeAnimations as it loaded,
effectively starting all the animations. This meant if you suspended
animations before loading a document, it was ignored as soon as the
load finished. Now there is a separate method startAnimationsIfNotSuspended
which checks to see if the document is suspended as it loads.
In order to handle this case, I added a new state to the Animation
machinery: AnimationStatePausedNew. This is an animation that was created
in the suspended state.
Tests: animations/added-while-suspended.html
transitions/started-while-suspended.html
* WebCore.exp.in: Export AnimationController::isSuspended().
* dom/Document.cpp:
(WebCore::Document::implicitClose):
resumeAnimationsForDocument() -> startAnimationsIfNotSuspended()
* page/animation/AnimationBase.cpp:
(WebCore::nameForState): New name for AnimationStatePausedNew.
(WebCore::AnimationBase::updateStateMachine): Handle new state AnimationStatePausedNew. The
most important change is that when go from PausedNew to Running, we jump back into
the New state and continue from there.
(WebCore::AnimationBase::updatePlayState): suspended -> isSuspended
* page/animation/AnimationBase.h: New state: AnimationStatePausedNew
(WebCore::AnimationBase::waitingToStart): Add AnimationStatePausedNew.
(WebCore::AnimationBase::paused): Add AnimationStatePausedNew.
(WebCore::AnimationBase::isNew): Add AnimationStatePausedNew.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialise m_suspended.
(WebCore::AnimationControllerPrivate::clear): suspended -> isSuspended
(WebCore::AnimationControllerPrivate::updateAnimations): Ditto.
(WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer): Ditto.
(WebCore::AnimationControllerPrivate::suspendAnimations): Update m_suspended.
(WebCore::AnimationControllerPrivate::resumeAnimations): Ditto.
(WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
(WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
(WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): New method that will
only resume animations if we were not globally suspended.
(WebCore::AnimationController::isSuspended): New method.
(WebCore::AnimationController::suspendAnimations): Add logging.
(WebCore::AnimationController::resumeAnimations): Add logging.
(WebCore::AnimationController::suspendAnimationsForDocument): Add logging.
(WebCore::AnimationController::resumeAnimationsForDocument): Add logging.
(WebCore::AnimationController::startAnimationsIfNotSuspended): Calls private method.
* page/animation/AnimationController.h:
(AnimationController): Add isSuspended() and animationsForDocumentMayStart().
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::isSuspended): New method.
(AnimationControllerPrivate): Add m_isSuspended member.
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::CompositeAnimation): Moved from header - initialise m_isSuspended.
(WebCore::CompositeAnimation::updateTransitions): Do not create ImplicitAnimation if suspended.
(WebCore::CompositeAnimation::updateKeyframeAnimations): Move to AnimationStatePausedNew if suspended.
(WebCore::CompositeAnimation::suspendAnimations): m_suspended -> m_isSuspended
(WebCore::CompositeAnimation::resumeAnimations): Ditto.
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::isSuspended): Renamed from suspended()
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate): If we're in the AnimationStatePausedNew state, then
we need to go to the first frame (to handle fill mode).
* testing/Internals.cpp:
(WebCore::Internals::animationsAreSuspended): New exposed method to reflect AnimationController.
* testing/Internals.h: Add animationsAreSuspended.
* testing/Internals.idl: Ditto.
2013-05-04 Sam Weinig <sam@webkit.org>
Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
matching where they are in WebKit2.
Reviewed by Anders Carlsson.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/mac/PopupMenuMac.h: Removed.
* platform/mac/PopupMenuMac.mm: Removed.
* platform/mac/SearchPopupMenuMac.h: Removed.
* platform/mac/SearchPopupMenuMac.mm: Removed.
2013-05-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of special cases in AddIncludesForTypeInImpl
https://bugs.webkit.org/show_bug.cgi?id=115602
Reviewed by Benjamin Poulain.
Get rid of the special cases in AddIncludesForTypeInImpl subroutine in the
JS bindings generator. Those are no longer needed and special cases should
be avoided in the generator.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForTypeInImpl):
2013-05-04 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of AddIncludesForSVGAnimatedType in bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115603
Reviewed by Benjamin Poulain.
Remove AddIncludesForSVGAnimatedType subroutine from the bindings generator
as it is a special case which is no longer needed.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
2013-05-04 Antoine Quint <graouts@apple.com>
Update code generators to handle a new JavaScript file for snapshotted plug-ins
https://bugs.webkit.org/show_bug.cgi?id=115596
Reviewed by Dean Jackson.
In preparation for https://webkit.org/b/115548, adding a new JS file at
Resources/plugIns.js that we will use to provide presentation for the
snapshotted plug-ins overlay.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Resources/plugIns.js: Added.
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
2013-05-04 Andreas Kling <akling@apple.com>
REGRESSION(r142647): Flaky Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
<http://webkit.org/b/115322>
<rdar://problem/13810719>
Reviewed by Anders Carlsson.
Don't cache the FrameView::renderView() in a local since updating Widgets may blow it away.
* page/FrameView.cpp:
(WebCore::FrameView::performPostLayoutTasks):
2013-05-04 Andreas Kling <akling@apple.com>
Remove GraphicsContext::strokeArc(), which is unused.
From Blink r149608 by <jbroman@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149608>
This is no longer used since almost a year ago, when HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) was inlined.
* platform/graphics/GraphicsContext.h:
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/wince/GraphicsContextWinCE.cpp:
2013-05-04 Andreas Kling <akling@apple.com>
Remove unused CSSSelector::isCustomPseudoType().
From Blink r149574 by <dominicc@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149574>
* css/CSSSelector.h:
* css/CSSSelector.cpp:
2013-05-04 Andreas Kling <akling@apple.com>
Remove ShadowRoot's previous/next ShadowRoot pointers.
<http://webkit.org/b/115588>
Reviewed by Anders Carlsson.
ShadowRoot no longer inherits from DoublyLinkedListNode<ShadowRoot> because that code wasn't
doing anything anymore. Shrinks ShadowRoot by two pointers.
* dom/ElementShadow.h:
* dom/ShadowRoot.cpp:
(SameSizeAsShadowRoot):
(WebCore::ShadowRoot::ShadowRoot):
(WebCore::ShadowRoot::~ShadowRoot):
* dom/ShadowRoot.h:
2013-05-04 Andreas Kling <akling@apple.com>
RenderObject: don't change GraphicsContext state when not drawing dashed/dotted lines.
From Blink r149546 by <jbroman@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149546>
Previously, there was asymmetry between changing and restoring state (certain state
would be restored only if thickness was positive, i.e. a line was actually drawn.)
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
2013-05-03 Andreas Kling <akling@apple.com>
Remove CSS selector profiler branches from ElementRuleCollector loop.
<http://webkit.org/b/115581>
Reviewed by Antti Koivisto.
Templatize the method so we don't have to check for active inspector frontends on every
pass through the loop.
Time spent in this loop goes down from 0.5% to 0.2% on iTunes Store, WebCore binary size
goes up 480 bytes (sorry Benjamin, I'll make it up to you.)
* css/ElementRuleCollector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
(WebCore::ElementRuleCollector::doCollectMatchingRulesForList):
2013-04-30 Robert Hogan <robert@webkit.org>
REGRESSION(r140907): Incorrect baseline on cells after updating vertical-align
https://bugs.webkit.org/show_bug.cgi?id=115432
Reviewed by Julien Chaffraix.
If a cell changes vertical-align any intrinsic padding it has is now redundant. It
needs to calculate its new height from RenderTableRow::layout() and then find its
new intrinsic padding in RenderTableSection::layoutRows().
Test: fast/table/correct-baseline-after-style-change.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleDidChange):
2013-05-03 Arnaud Renevier <a.renevier@sisa.samsung.com>
incorrect repainting when a table has a transform
https://bugs.webkit.org/show_bug.cgi?id=109867
Reviewed by Simon Fraser.
Disable LayoutState when table, tableRow or tableSection render
objects have transforms or reflections.
Tests: fast/repaint/reflection-table-layout.html
fast/repaint/transform-table-layout.html
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layout):
(WebCore::RenderTableSection::layoutRows):
2013-05-03 Antti Koivisto <antti@apple.com>
Remove concept of younger and older shadow trees
https://bugs.webkit.org/show_bug.cgi?id=115570
Reviewed by Andreas Kling.
Younger and older shadow trees are an obscure corner of the Shadow DOM spec.
Support only one shadow tree per element. This simplifies many things.
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseChild):
(WebCore::ComposedShadowTreeWalker::traverseSiblingInCurrentTree):
(WebCore):
(WebCore::ComposedShadowTreeWalker::traverseParent):
(WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
(WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
* dom/ComposedShadowTreeWalker.h:
(WebCore::ComposedShadowTreeWalker::assertPrecondition):
(ComposedShadowTreeWalker):
* dom/ContainerNodeAlgorithms.cpp:
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
(WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
(WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
(WebCore::ChildFrameDisconnector::collectFrameOwners):
(WebCore::assertConnectedSubrameCountIsConsistent):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
* dom/Element.cpp:
(WebCore::Element::authorShadowRoot):
(WebCore::Element::userAgentShadowRoot):
(WebCore::Element::ensureUserAgentShadowRoot):
* dom/Element.h:
(Element):
(WebCore::Element::hasAuthorShadowRoot):
* dom/Element.idl:
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::addShadowRoot):
Allow only one ShadowRoot per ElementShadow. Remove linked list handling.
(WebCore::ElementShadow::removeAllShadowRoots):
(WebCore::ElementShadow::attach):
(WebCore::ElementShadow::detach):
(WebCore::ElementShadow::childNeedsStyleRecalc):
(WebCore::ElementShadow::needsStyleRecalc):
(WebCore::ElementShadow::recalcStyle):
(WebCore::ElementShadow::removeAllEventListeners):
* dom/ElementShadow.h:
(WebCore::ElementShadow::shadowRoot):
(ElementShadow):
(WebCore::ElementShadow::host):
(WebCore::Node::shadowRoot):
(WebCore):
* dom/Node.cpp:
(WebCore):
(WebCore::Node::showNodePathForThis):
(WebCore::traverseTreeAndMark):
(WebCore::showSubTreeAcrossFrame):
* dom/Node.h:
(Node):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::insertedInto):
* dom/ShadowRoot.h:
(ShadowRoot):
Remove LinkedList base.
* dom/TreeScopeAdopter.cpp:
(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveTreeToNewDocument):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::invalidate):
(WebCore::ContentDistributor::ensureSelectFeatureSet):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::unbind):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* page/FocusController.cpp:
(WebCore::FocusNavigationScope::FocusNavigationScope):
(WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::uploadButton):
* svg/SVGTRefElement.cpp:
(WebCore::SVGTRefElement::updateReferencedText):
(WebCore::SVGTRefElement::detachTarget):
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::clearResourceReferences):
(WebCore::SVGUseElement::buildShadowAndInstanceTree):
(WebCore::SVGUseElement::buildShadowTree):
* testing/Internals.cpp:
(WebCore::Internals::ensureShadowRoot):
(WebCore::Internals::shadowRoot):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
2013-05-03 Martin Robinson <mrobinson@igalia.com>
Simplify the #ifdefs in GraphicsContext3D.h
https://bugs.webkit.org/show_bug.cgi?id=115568
Reviewed by Daniel Bates.
* platform/graphics/GraphicsContext3D.h:
(GraphicsContext3D): Combine #ifdefs paths that have a common
implementation. This reduces the #ifdef paths from many to just three.
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::platformTexture): Move the implementation
here to simplify the header.
* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::platformTexture): Ditto.
(WebCore):
2013-05-03 Brendan Long <b.long@cablelabs.com>
[Qt] Build with --video-track fails because String(AtomicString) is ambiguous
https://bugs.webkit.org/show_bug.cgi?id=115551
Reviewed by Benjamin Poulain.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::configureTextTrackGroup):
Change String(textTrack->kind()) to textTrack->kind().string(), and same thing with language.
2013-05-03 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GStreamer] GStreamer log crashes in MediaPlayerPrivateGStreamerBase because of uninitialized category
https://bugs.webkit.org/show_bug.cgi?id=115575
Reviewed by Philippe Normand.
No new tests needed.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
Using extern debug category.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
Declaring debug category as not static.
2013-05-03 Brent Fulgham <bfulgham@webkit.org>
[WinCairo] Unreviewed VS2010 Build Correction.
* WebCore.vcxproj/WebCore.vcxproj: Exclude CG-only
SubimageCacheWithTimer.cpp from WinCairo build.
2013-05-03 Viatcheslav Ostapenko <viatchslav.o@samsung.com>
[Cairo] Anti-aliasing should not be always disabled for lines
https://bugs.webkit.org/show_bug.cgi?id=109535
Reviewed by Martin Robinson.
Don't disable antialiasing for text lines because it produces ugly picture if
page is scaled.
Test: fast/css3-text/css3-text-decoration/text-decoration-line-scaled.html
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::drawLineOnCairoContext):
2013-05-03 Daniel Bates <dbates@webkit.org>
Remove unnecessary include HTMLNames.h from RenderThemeGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=115571
Reviewed by Martin Robinson.
* platform/gtk/RenderThemeGtk.cpp:
2013-05-03 Alexey Proskuryakov <ap@apple.com>
[Mac] setMetadataURL incorrectly treats path bytes as Latin-1
https://bugs.webkit.org/show_bug.cgi?id=115557
Reviewed by Sam Weinig.
* platform/mac/FileSystemMac.mm: (WebCore::setMetaData): Use the correct constructor.
2013-05-03 Andrei Bucur <abucur@adobe.com>
Move pixelSnappedLayoutOverflowRect and maxLayoutOverflow from RenderBox
https://bugs.webkit.org/show_bug.cgi?id=115550
Reviewed by Simon Fraser.
The patch moves pixelSnappedLayoutOverflowRect and maxLayoutOverflow out
of RenderBox somewhere logically closer to their usage place.
pixelSnappedLayoutOverflowRect - moved to RenderView because it's called only
for RenderView at this moment.
There are other places when the overflow rect is pixel snapped but only after
the rect is adjusted for writing modes or inflated.
maxLayoutOverflow - moved to RenderTreeAsText.cpp as a static function because
it's used only there.
Tests: no new functional change.
* rendering/RenderBox.h: The functions declarations are removed.
* rendering/RenderTreeAsText.cpp:
(WebCore::maxLayoutOverflow):
* rendering/RenderView.h:
(WebCore::RenderView::pixelSnappedLayoutOverflowRect):
2013-05-03 Andreas Kling <akling@apple.com>
StyleResolver: Have "list of matched rules" API vend internal types instead of CSSOM wrappers.
<http://webkit.org/b/115563>
Reviewed by Antti Koivisto.
Change styleRulesForElement() and pseudoStyleRulesForElement() to return Vectors of StyleRuleBase
instead of CSSRuleLists. This defers instantiating CSSOM wrappers until they're actually needed
for exposure to web API.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):
Create a StaticCSSRuleList and populate it with CSSOM wrappers for the matched rules.
This is the one place where we expose this functionality to the web.
* css/ElementRuleCollector.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchedRuleList):
(WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
Collect internal StyleRuleBase pointers here instead of creating wrappers.
* css/StyleResolver.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleRulesForElement):
(WebCore::StyleResolver::pseudoStyleRulesForElement):
Vend said pointers.
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
Dodge CSSOM wrapper instantiation (Woop woop!)
* inspector/InspectorCSSAgent.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildObjectForRule):
Split buildObjectForRule() into two versions, one for CSSStyleRule and one for StyleRule.
The CSSStyleRule one doesn't need a special path for parent-less rules, since those always
come in through the StyleRule interface instead. This factoring can be improved further
after this change.
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::buildArrayForRuleList):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
Tweaked for changes in StyleResolver API.
2013-05-03 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r145042): Downloading a file sometimes results in could not create
a sandbox extension Console message and file stays as a .download file
https://bugs.webkit.org/show_bug.cgi?id=115559
<rdar://problem/13785101>
Reviewed by Sam Weinig.
CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
creates a string with maximum possible buffer size. This was confusing resolveSymlinksInPath().
* platform/cf/FileSystemCF.cpp: (WebCore::fileSystemRepresentation):
Change fileSystemRepresentation to be less surprising. Really, we should rip apart
CString and update callers to use better defined semantics, but this is the one function
that repeatedly causes problems in practice.
2013-05-03 Andreas Kling <akling@apple.com>
CSSRule style declarations getters shouldn't be const.
<http://webkit.org/b/115572>
Reviewed by Antti Koivisto.
Accessing the CSSStyleDeclaration for a CSSRule is a potentially mutating operation,
and should not be const.
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::style):
* css/CSSFontFaceRule.h:
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::style):
* css/CSSPageRule.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::style):
* css/CSSStyleRule.h:
(CSSStyleRule):
* css/WebKitCSSFilterRule.cpp:
(WebCore::WebKitCSSFilterRule::style):
* css/WebKitCSSFilterRule.h:
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::WebKitCSSKeyframeRule::style):
* css/WebKitCSSKeyframeRule.h:
(WebKitCSSKeyframeRule):
* css/WebKitCSSViewportRule.cpp:
(WebCore::WebKitCSSViewportRule::style):
* css/WebKitCSSViewportRule.h:
2013-05-03 Andreas Kling <akling@apple.com>
Use NotNull tag for placement new in WebCore.
<http://webkit.org/b/115569>
Reviewed by Antti Koivisto.
Avoid emitting null checks where we use placement new to construct objects into safe locations.
* css/StylePropertySet.cpp:
(WebCore::ImmutableStylePropertySet::create):
* dom/Element.cpp:
(WebCore::ShareableElementData::createWithAttributes):
(WebCore::ShareableElementData::ShareableElementData):
(WebCore::UniqueElementData::makeShareableCopy):
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::init):
(WebCore::createQualifiedName):
* dom/make_names.pl:
(printNamesCppFile):
* platform/ThreadGlobalData.h:
(WebCore::threadGlobalData):
* platform/graphics/GlyphPage.h:
(WebCore::GlyphPage::createForMixedFontData):
2013-01-11 Andreas Kling <akling@apple.com>
Simplify CSSSelectorList creation/adoption.
<http://webkit.org/b/106649>
Reviewed by Antti Koivisto.
Remove the optimization that special-cased construction of CSSSelectorLists with a single entry.
This is in preparation for changing the way we store the selector lists on style rules.
* css/CSSParser.h:
* css/CSSSelector.h:
Remove move(PassOwnPtr<CSSSelector> from, CSSSelector* to), inlining it into
CSSSelectorList::adoptSelectorVector instead.
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::deleteSelectors):
Handle all selector list lengths the same way.
(WebCore::CSSSelectorList::adoptSelectorVector):
Merge move() from CSSSelector.h into this code since it was the only call site.
Also some minor readability cleanups.
2013-05-03 Antti Koivisto <antti@apple.com>
Remove HTMLShadowElement
https://bugs.webkit.org/show_bug.cgi?id=115555
Reviewed by Andreas Kling.
This is not used internally.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/ComposedShadowTreeWalker.cpp:
* dom/NodeRenderingContext.cpp:
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* html/InputType.cpp:
(WebCore::InputType::destroyShadowSubtree):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distribute):
* html/shadow/HTMLShadowElement.cpp: Removed.
* html/shadow/HTMLShadowElement.h: Removed.
* html/shadow/HTMLShadowElement.idl: Removed.
* page/DOMWindow.idl:
2013-05-03 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
Remove WTF::ListRefPtr class
https://bugs.webkit.org/show_bug.cgi?id=115516
Reviewed by Anders Carlsson.
ListRefPtr was used only by FontFamily class, besides it strongly depended
on FontFamily class semantics which made it non-generic and inappropriate
for being present inside WTF.
This patch removes WTF::ListRefPtr class and moves its the functionality
into FontFamily class.
No new tests, no change in the behavior.
* page/FrameTree.h:
(FrameTree):
* platform/graphics/FontFamily.h:
(FontFamily):
(WebCore::FontFamily::~FontFamily):
(WebCore):
2013-05-03 Allan Sandfeld Jensen <allan.jensen@digia.com>
Crash when calling QWebFrame::evaluateJavaScript
https://bugs.webkit.org/show_bug.cgi?id=113434
Reviewed by Simon Hausmann.
We must take the JS API lock before accessing internal JS methods.
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::unwrapBoxedPrimitive):
(JSC::Bindings::getGregorianDateTimeUTC):
(JSC::Bindings::convertQVariantToValue):
2013-05-02 Xan Lopez <xlopez@igalia.com>
[GTK] Fine tune dependencies for glslang generated files
https://bugs.webkit.org/show_bug.cgi?id=115537
Reviewed by Martin Robinson.
Make glslang.* explictly depend on glslang_tab.*, since the
dependency does exist. Otherwise Make might decide to compile
things ahead of time and fail.
* GNUmakefile.am:
2013-05-02 KyungTae Kim <ktf.kim@samsung.com>
Fix build warnings on ResourceHandleClient.h
https://bugs.webkit.org/show_bug.cgi?id=115540
Reviewed by Alexey Proskuryakov.
Comment out the parameter names for 'getOrCreateReadBuffer' to fix -Wunused-parameter build warnings.
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::getOrCreateReadBuffer):
2013-05-02 Roger Fong <roger_fong@apple.com>
Following r149463, set Path for WebCore makefile as well.
* WebCore.vcxproj/WebCore.make:
2013-05-02 Eric Carlson <eric.carlson@apple.com>
Unreviewed fix for Mac Lion build after r149503.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2013-05-02 David Kilzer <ddkilzer@apple.com>
BUILD FIX: Move Mac-only symbols into the shared symbol list
* WebCore.exp.in: Move symbols.
2013-05-02 Antti Koivisto <antti@apple.com>
Shadow DOM removal: Get rid of ContentSelectorQuery
https://bugs.webkit.org/show_bug.cgi?id=115533
Reviewed by Anders Carlsson.
This is only used for Shadow DOM distribution. <details> element works fine without it.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::distributeSelectionsTo):
* html/shadow/ContentSelectorQuery.cpp: Removed.
* html/shadow/ContentSelectorQuery.h: Removed.
* html/shadow/HTMLContentElement.cpp:
2013-05-02 Arnaud Renevier <a.renevier@sisa.samsung.com>
border-radius clipping a canvas does not always clip
https://bugs.webkit.org/show_bug.cgi?id=113343
Reviewed by Simon Fraser.
clipToRect method clip context to clipRect, and then clip to rounded
rect if clipRect has a radius. But currently, clipToRect exit early if
clipToRect is equal to paintDirtyRect.
This patch allows clipping to rounded corner ever if clipToRect is
equal to paintDirtyRect.
Test: fast/overflow/border-radius-clipping-2.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
2013-05-02 Eric Carlson <eric.carlson@apple.com>
Caption menu does not include in-band captions
https://bugs.webkit.org/show_bug.cgi?id=111934
Reviewed by Dean Jackson.
No new tests, upated existing tests for these changes.
* WebCore.xcodeproj/project.pbxproj: Add new files.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::loadInternal): Clear the LoadMediaResource from m_pendingActionFlags
in case there is a pending async load.
(WebCore::HTMLMediaElement::configureTextTrackGroup): Always log the track score.
(WebCore::HTMLMediaElement::configureTextTracks): Call configureTextTrackDisplay so
m_legacyWebKitClosedCaptionsVisible is always updated immediately.
(WebCore::HTMLMediaElement::setWebkitClosedCaptionsVisible): Use m_legacyWebKitClosedCaptionsVisible.
(WebCore::HTMLMediaElement::webkitClosedCaptionsVisible): Ditto.
* html/HTMLMediaElement.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::CaptionUserPreferences): Initialize m_displayMode to ForcedOnly
because it is no longer used for testing only.
(WebCore::CaptionUserPreferences::notify): Post notifications when not in testing-only mode.
* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate a track score when
webkitClosedCaptionsVisible has been set.
(WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Don't filter track list when we
don't have the media accessibility framework. Make logging more informative.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
(WebCore::InbandTextTrackPrivateAVFObjC::create): Take a AVFInbandTrackParent instead of a
MediaPlayerPrivateAVFoundationObjC.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::InbandTextTrackPrivateAVFObjC): Ditto.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Added.
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm: Added.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): We only have legible output when
HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT is defined.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Ditto.
(WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Create a legacy CC track if
there are no media selection options and there is a CC AVAssetTrack.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyCCTracks): New, process CC tracks.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processNewAndRemovedTextTracks): New, refactored
common setup/cleanup code from processMediaSelectionOptions.
(WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Renamed from
processTextTracks. Move common setup/cleanup code to processNewAndRemovedTextTracks.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Deal with legacy CC tracks.
2013-05-02 Eric Carlson <eric.carlson@apple.com>
[Mac] caption track menu includes "easy to read" in-band tracks twice
https://bugs.webkit.org/show_bug.cgi?id=115529
Reviewed by Dean Jackson.
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::sortedTrackListForMenu): Check to see if a track is
easy-to-read after checking if it is forced only.
2013-05-02 Antti Koivisto <antti@apple.com>
Remove SiblingTraversalStrategies.h
https://bugs.webkit.org/show_bug.cgi?id=115532
Reviewed by Andreas Kling.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/SiblingTraversalStrategies.h: Removed.
2013-05-02 Antti Koivisto <antti@apple.com>
Shadow DOM removal: Make SelectorChecker non-generic
https://bugs.webkit.org/show_bug.cgi?id=115526
Reviewed by Andreas Kling.
Without Shadow DOM distribution we don't need SiblingTraversalStrategies anymore.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* css/SelectorChecker.cpp:
(WebCore):
(WebCore::isFirstChildElement):
(WebCore::isLastChildElement):
(WebCore::isFirstOfType):
(WebCore::isLastOfType):
(WebCore::countElementsBefore):
(WebCore::countElementsOfTypeBefore):
(WebCore::countElementsAfter):
(WebCore::countElementsOfTypeAfter):
(WebCore::SelectorChecker::match):
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(SelectorChecker):
* css/SiblingTraversalStrategies.h:
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):
* html/shadow/ContentSelectorQuery.cpp:
(WebCore::ContentSelectorDataList::checkContentSelector):
2013-05-02 Anders Carlsson <andersca@apple.com>
Simplify WebCoreObjCExtras by using WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=115524
Reviewed by Andreas Kling.
* platform/mac/WebCoreObjCExtras.mm:
(deallocCallback):
(WebCoreObjCScheduleDeallocateOnMainThread):
2013-05-02 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/13740375> Non-ASCII downloaded file names are garbled when using NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115520
Reviewed by Darin Adler.
Covered by existing tests when using NetworkProcess.
* WebCore.exp.in:
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::responseContentDispositionEncodingFallbackArray):
Added a getter for encoding fallback array.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
Removed obsolete checks for presence of fallback array methods, they were available
since 10.6.8.
2013-05-01 Enrica Casucci <enrica@apple.com>
text-combine: horizontal does not work properly for some fonts.
https://bugs.webkit.org/show_bug.cgi?id=115503.
Reviewed by Dave Hyatt.
For some fonts that don't have width variants, we fail to combine glyphs
because we believe they don't fit. That decision is made comparing the run width
with the font computed size multiplied by a margin factor.
I've increased the margin from 10% to 15%.
Test: fast/text/text-combine-different-fonts.html
* rendering/RenderCombineText.cpp:
2013-05-01 Joseph Pecoraro <pecoraro@apple.com>
Null check plugInClient earlier in snapshotting path
https://bugs.webkit.org/show_bug.cgi?id=115498
Reviewed by Darin Adler.
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2013-05-01 Seokju Kwon <seokju.kwon@gmail.com>
Web Inspector: Fix check-inspector-strings script and fix localized strings
https://bugs.webkit.org/show_bug.cgi?id=115495
Reviewed by Joseph Pecoraro.
No new tests, because there is no change in behavior.
* English.lproj/localizedStrings.js:
2013-05-01 Tim Horton <timothy_horton@apple.com>
<object data="<some data URL>"> MIME types aren't case-insensitive
https://bugs.webkit.org/show_bug.cgi?id=115494
Reviewed by Darin Adler.
Test: fast/images/object-data-url-case-insensitivity.html
MIME types are defined to be case-insensitive, but many places in WebCore
only compare them against lower-case strings. Most entry points for MIME
types lower-case them, but mimeTypeFromDataURL doesn't, causing, for example,
data:image/png;... to work, but data:iMaGe/PNG;... to fail.
To fix this, lower-case the string returned from mimeTypeFromDataURL.
* platform/KURL.cpp:
(WebCore::mimeTypeFromDataURL):
2013-05-01 Ryosuke Niwa <rniwa@webkit.org>
[Mac] Text replacement should use correction indicator
https://bugs.webkit.org/show_bug.cgi?id=115471
Reviewed by Darin Adler.
Support autocorrection panel for text replacements by making AlternativeTextTypeCorrection
handle text replacements as well as automatic spelling correction.
No new tests. Unfortunately this feature is not testable as is. We need to provide some
internals or testRunner methods to make this feature testable in the long term.
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired): Trigger both TextCheckingTypeReplacement
and TextCheckingTypeShowCorrectionPanel.
* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor): Autocorrection panel maybe used for both
TextCheckingTypeReplacement and TextCheckingTypeShowCorrectionPanel.
2013-05-01 Tim Horton <timothy_horton@apple.com>
Move knowledge of PDF/PostScript MIME types into MIMETypeRegistry
https://bugs.webkit.org/show_bug.cgi?id=115487
Reviewed by Darin Adler.
No new tests, just a refactoring.
* WebCore.exp.in:
Export newly-added isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
Adopt MIMETypeRegistry::isPDFOrPostScriptMIMEType instead of duplicating
the list of MIME types. The previous list did not include PostScript, but
it seems reasonable to put plugins ahead of built-in support for it in addition to PDF.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializePDFAndPostScriptMIMETypes): Added.
(WebCore::initializeMIMETypeRegistry): Call initializePDFAndPostScriptMIMETypes.
(WebCore::MIMETypeRegistry::isPDFOrPostScriptMIMEType):
Consult our new HashSet to see if the given MIME type is one of those used for PDF or PS.
(WebCore::MIMETypeRegistry::getPDFAndPostScriptMIMETypes): Added.
* platform/MIMETypeRegistry.h:
(MIMETypeRegistry): Add isPDFOrPostScriptMIMEType and getPDFAndPostScriptMIMETypes.
2013-05-01 Anders Carlsson <andersca@apple.com>
Implement LocalStorageDatabase::importItems
https://bugs.webkit.org/show_bug.cgi?id=115493
Reviewed by Andreas Kling.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-01 Anders Carlsson <andersca@apple.com>
Begin work on loading items from the local storage database
https://bugs.webkit.org/show_bug.cgi?id=115489
Reviewed by Andreas Kling.
Export symbols and SQLite headers needed.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
2013-05-01 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] Programmatic layout tests fail when subpixel layout is disabled
https://bugs.webkit.org/show_bug.cgi?id=115455
First round of changes to restore platform/mac exclusion tests that started failing when
subpixel layout was turned off.
Reviewed by Dirk Schulze.
* rendering/ExclusionPolygon.cpp:
(WebCore::appendArc): Ensure that the 3rd of 5 added vertices is in the center of the arc.
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Use ceiledLayoutUnit() for downwards-snapping first fit location.
* rendering/ExclusionRectangle.cpp:
(WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): Ditto.
2013-05-01 Enrica Casucci <enrica@apple.com>
Incorrect layout for blocks containing ideographs with -webkit-linebox-contain: glyphs, font, inline-box.
https://bugs.webkit.org/show_bug.cgi?id=115478.
Reviewed by Dave Hyatt.
Test: fast/block/lineboxcontain/block-with-ideographs.xhtml
When computing ascent and descent we need to take into account
the baseline type. RootInlineBox::ascentAndDescentForBox failed
to do that in few cases.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::ascentAndDescentForBox):
2013-05-01 Anders Carlsson <andersca@apple.com>
Add LocalStorageDatabase class
https://bugs.webkit.org/show_bug.cgi?id=115486
Reviewed by Sam Weinig.
Export symbols needed by WebKit2.
* WebCore.exp.in:
2013-05-01 Eric Carlson <eric.carlson@apple.com>
[Mac Lion] Assertion failure in MediaControlTextTrackContainerElement::updateDisplay()
https://bugs.webkit.org/show_bug.cgi?id=115289
Reviewed by Jer Noble.
No new tests, this is a speculative fix for an infrequent assertion.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackRemoveCue): Mark the cue as inactive when it is removed
from the active set.
2013-05-01 Joseph Pecoraro <pecoraro@apple.com>
TextTrackMenu crashes in ports where MediaElement players are lazily created
https://bugs.webkit.org/show_bug.cgi?id=115485
Null check the player for ports, like iOS, that lazily create the player.
Reviewed by Eric Carlson.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::platformTextTrackMenu):
(WebCore::HTMLMediaElement::closeCaptionTracksChanged):
2013-05-01 Anders Carlsson <andersca@apple.com>
Add FunctionDispatcher class and make RunLoop derive from it
https://bugs.webkit.org/show_bug.cgi?id=115480
Reviewed by Sam Weinig.
Change RunLoop to be a subclass of FunctionDispatcher.
* platform/RunLoop.h:
(RunLoop):
2013-05-01 Eric Carlson <eric.carlson@apple.com>
HTMLMediaElement::updateActiveTextTrackCues can do unnecessary work
https://bugs.webkit.org/show_bug.cgi?id=81856
Reviewed by Jer Noble.
No new tests, covered by existing tests.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::ignoreTrackDisplayUpdateRequests): Add an early return when there
is obviously no work to be done.
2013-04-30 Jer Noble <jer.noble@apple.com>
Closed caption lines overlap
https://bugs.webkit.org/show_bug.cgi?id=115438
<rdar://problem/13351747>
Reviewed by Eric Carlson.
Take the line-box padding into account when determining line hight by setting
the -webkit-line-box-contain property to include 'inline-box'.
* css/mediaControls.css:
(video::-webkit-media-text-track-container):
2013-05-01 David Kilzer <ddkilzer@apple.com>
BUILD FIX (r149410): CFRunLoopStop() doesn't know what to do with a RetainPtr<CFRunLoopRef>
Fixes the following build failure:
WebCore/platform/cf/RunLoopCF.cpp:82:5: error: no matching function for call to 'CFRunLoopStop'
CFRunLoopStop(m_runLoop);
^~~~~~~~~~~~~
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::stop): Call RetainPtr::get().
2013-05-01 Per-Erik Brodin <per-erik.brodin@ericsson.com>
EventSource: Loss of reconnect time precision due to integer division
https://bugs.webkit.org/show_bug.cgi?id=115358
Make sure precision is not lost when converting the reconnect time from milliseconds to seconds.
Reviewed by Alexey Proskuryakov.
Test: http/tests/eventsource/eventsource-retry-precision.html
* page/EventSource.cpp:
(WebCore::EventSource::scheduleReconnect):
2013-05-01 Andreas Kling <akling@apple.com>
REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
<http://webkit.org/b/115386>
<rdar://problem/13769995>
Reviewed by Antti Koivisto.
Only send synchronous resize events for the main frame. Subframes change size during layout,
so it never really makes sense for them to use synchronous dispatch anyway.
* page/FrameView.cpp:
(WebCore::FrameView::dispatchResizeEvent):
2013-05-01 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed trivial buildfix after r149432.
* testing/Internals.cpp:
(WebCore):
2013-05-01 Sergio Villar Senin <svillar@igalia.com>
Show a block cursor in overtype mode
https://bugs.webkit.org/show_bug.cgi?id=114819
Reviewed by Ryosuke Niwa.
Test: editing/selection/block-cursor-overtype-mode.html
Overtype mode will use block cursor instead of a caret to
highlight the next character to be replaced. It will fully cover
the next character to be replaced (except at the end of a line
where the usual blinking caret will be shown).
This new block cursor is internally implemented as a selection
(not exposed to JavaScript) because the selection code knows how
to deal with bidi text.
* WebCore.exp.in: Export symbols for testing purposes.
* WebCore.order: Ditto.
* editing/Editor.cpp:
(WebCore::Editor::toggleOverwriteModeEnabled): Added a call to
FrameLoader::setShouldShowBlockCursor.
(WebCore):
* editing/Editor.h:
(Editor):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::updateAppearance): Use a 1-character
long selection to paint the cursor in overtype mode.
(WebCore::FrameSelection::setShouldShowBlockCursor):
(WebCore):
* editing/FrameSelection.h:
(WebCore::FrameSelection::shouldShowBlockCursor):
(FrameSelection):
* testing/Internals.cpp:
(WebCore):
(WebCore::Internals::selectionBounds): Added a new method which
returns the IntRect issued by FrameSelection::bounds().
* testing/Internals.h: Ditto.
* testing/Internals.idl: Ditto.
2013-04-30 Darin Adler <darin@apple.com>
[Mac] Remove adoptNS/retain pairs, since the two cancel each other out
https://bugs.webkit.org/show_bug.cgi?id=115426
Reviewed by Anders Carlsson.
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimation::PlatformCAAnimation):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::nsURLResponse):
Remove adoptNS and release from code that is doing both.
2013-04-29 Sam Weinig <sam@webkit.org>
Add API to allow WebKit2 banners to get mouse events
https://bugs.webkit.org/show_bug.cgi?id=115395
Reviewed by Beth Dakin.
* WebCore.exp.in:
* platform/ScrollView.cpp:
(WebCore::ScrollView::rootViewToTotalContents):
* platform/ScrollView.h:
Add and expose rootViewToTotalContents().
2013-04-30 Anders Carlsson <andersca@apple.com>
Make RunLoop ref-counted
https://bugs.webkit.org/show_bug.cgi?id=115384
Reviewed by Benjamin Poulain.
Add a RunLoop::Holder class which creates and holds the ref-counted RunLoop object.
* platform/RunLoop.cpp:
(RunLoop::Holder):
(WebCore::RunLoop::Holder::Holder):
(WebCore::RunLoop::Holder::runLoop):
(WebCore::RunLoop::current):
* platform/RunLoop.h:
2013-04-30 Anders Carlsson <andersca@apple.com>
Clean up RunLoop code
https://bugs.webkit.org/show_bug.cgi?id=115454
Reviewed by Andreas Kling.
Delete a couple of functions from RunLoopCF.cpp and just use the generic ones in RunLoop.cpp,
use RetainPtr instead of manual retain/release. Always use an AutoreleasePool when calling performWork or timers.
* platform/RunLoop.cpp:
(WebCore::RunLoop::setUseApplicationRunLoopOnMainRunLoop):
(WebCore):
* platform/RunLoop.h:
(TimerBase):
(RunLoop):
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::performWork):
(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::~RunLoop):
(WebCore::RunLoop::wakeUp):
(WebCore::RunLoop::TimerBase::timerFired):
(WebCore::RunLoop::TimerBase::TimerBase):
(WebCore::RunLoop::TimerBase::start):
(WebCore::RunLoop::TimerBase::stop):
(WebCore::RunLoop::TimerBase::isActive):
* platform/mac/RunLoopMac.mm:
(WebCore::RunLoop::run):
(WebCore::RunLoop::stop):
2013-04-30 David Hyatt <hyatt@apple.com>
<button> ignores margin-bottom.
https://bugs.webkit.org/show_bug.cgi?id=114940
Reviewed by Beth Dakin.
Make sure that the inner block inside the <button> (flexbox) acts like it
establishes a block formatting context, i.e., it should refuse to collapse
its margins with its children. This causes margins to stay inside the <button>
and be honored, adding to the button's overall height.
Basically we have to remove the restriction that anonymous blocks can't be
BFCs on the bottom margin.
Added fast/forms/content-with-margins-inside-button.html
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::handleAfterSideOfBlock):
2013-04-30 Andrei Bucur <abucur@adobe.com>
Cleanup HTMLOListElement<->RenderListItem bridge
https://bugs.webkit.org/show_bug.cgi?id=115434
Reviewed by Darin Adler.
Refactor the way HTMLOListElement is accessing its list items. Instead
of exposing the nextListItem function, wrap the desiredfunctionality
in static methods on RenderListItem. This should make the code more readable.
I've also added more constness to some functions in RenderListItem.
Tests: No new tests, just refactoring.
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::updateItemValues): Use updateItemValuesForOrderedList.
(WebCore::HTMLOListElement::recalculateItemCount): Use itemCountForOrderedList.
* rendering/RenderListItem.cpp:
(WebCore::isList): Add more constness.
(WebCore::nextListItem): Make local to the CPP and add constness.
(WebCore::previousListItem): Add constness.
(WebCore::RenderListItem::updateItemValuesForOrderedList): Called by OL elements.
(WebCore::RenderListItem::itemCountForOrderedList): Called by OL elements.
(WebCore::previousOrNextItem):
* rendering/RenderListItem.h: Add updateItemValuesForOrderedList and itemCountForOrderedList.
2013-04-30 Anders Carlsson <andersca@apple.com>
More StorageTracker cleanup
https://bugs.webkit.org/show_bug.cgi?id=115435
Reviewed by Andreas Kling.
Use bind instead of "onMainThread" helper functions.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::deleteEmptyDatabase):
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
(WebCore::StorageTracker::deleteOriginWithIdentifier):
* storage/StorageTracker.h:
(StorageTracker):
2013-04-30 Geoffrey Garen <ggaren@apple.com>
Objective-C JavaScriptCore API should publicly support bridging to C
https://bugs.webkit.org/show_bug.cgi?id=115447
Reviewed by Mark Hahnenberg.
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::javaScriptContext):
* bindings/objc/WebScriptObject.mm:
(-[WebScriptObject JSValue]):
2013-04-30 Simon Fraser <simon.fraser@apple.com>
Fix an issue with JSPerformance.cpp in the WebCore.xcodeproj where
it was being recognized as a diretory rather than a file, introduced
in r149359.
* WebCore.xcodeproj/project.pbxproj:
2013-04-30 Beth Dakin <bdakin@apple.com>
Page::pageCount() is inaccurate when we allow the first paint in App Mode
https://bugs.webkit.org/show_bug.cgi?id=115442
-and corresponding-
<rdar://problem/13758445>
Reviewed by Dave Hyatt.
We should set the height here all the time, even if it is the first layout.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
2013-04-30 Andreas Kling <akling@apple.com>
Don't create StyleResolvers just to invalidate them.
<http://webkit.org/b/115436>
Reviewed by Geoffrey Garen.
Renamed Document::styleResolver() to ensureStyleResolver() so it's clear that it never returns null.
Removed a bunch of unnecessary null-checks I spotted while doing this.
Also fixed Element::willModifyAttribute() and FrameView::setFrameRect() to not create a StyleResolver
and immediately invalidate it in some cases.
* css/FontLoader.cpp:
(WebCore::FontLoader::loadFont):
(WebCore::FontLoader::checkFont):
(WebCore::FontLoader::resolveFontStyle):
* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::prepareEvaluator):
* css/StyleMedia.cpp:
(WebCore::StyleMedia::matchMedium):
* dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::styleForPage):
* dom/Document.h:
(WebCore::Document::ensureStyleResolver):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/Element.cpp:
(WebCore::StyleResolverParentPusher::push):
(WebCore::StyleResolverParentPusher::~StyleResolverParentPusher):
(WebCore::Element::styleForRenderer):
(WebCore::Element::recalcStyle):
(WebCore::Element::willModifyAttribute):
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::recalcStyle):
(WebCore::ShadowRoot::attach):
* dom/Text.cpp:
(WebCore::Text::recalcTextStyle):
* editing/EditingStyle.cpp:
(WebCore::styleFromMatchedRulesForElement):
* html/HTMLCanvasElement.cpp:
* html/HTMLCanvasElement.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::customStyleForRenderer):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::updateNonRenderStyle):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::updateNonRenderStyle):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::customStyleForRenderer):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::customStyleForRenderer):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::getMatchedCSSRules):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::fontSelector):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::getUncachedPseudoStyle):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::checkRegionStyle):
(WebCore::RenderRegion::computeStyleInRegion):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::fontSelector):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* svg/SVGElement.cpp:
(WebCore::SVGElement::customStyleForRenderer):
* svg/SVGElementRareData.h:
(WebCore::SVGElementRareData::overrideComputedStyle):
2013-04-30 Simon Fraser <simon.fraser@apple.com>
Cap max CALayer tree depth to avoid crashes
https://bugs.webkit.org/show_bug.cgi?id=115431
<rdar://problem/13401861>
Reviewed by Tim Horton.
Core Animation can crash if fed deeply nested layer trees.
Avoid this by capping CALayer tree depth at some empirically-determined
level.
Test: compositing/layer-creation/deep-tree.html
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::CommitState::CommitState): Add treeDepth to the CommitState.
* platform/graphics/ca/GraphicsLayerCA.cpp: Set cMaxLayerTreeDepth to 250
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): We need a dummy CommitState
here. It is not expected that flushCompositingStateForThisLayerOnly() will be called for
a layer in the middle of the hierarchy, only for custom-managed leaf layers, so we don't try
to compute the correct tree depth.
(WebCore::GraphicsLayerCA::recursiveCommitChanges): Pass in the commitState. Since this is
copied for each frame, no need to decrement commitState.treeDepth.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Increment treeDepth once or
twice. If we've reached max, be sure to set the ChildrenChanged flag. We delay tree truncation
until commitLayerChangesAfterSublayers() since ChildrenChanged can be set again when children
are being processed.
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):
(WebCore::GraphicsLayerCA::updateSublayerList): If we've hit max depth, just set
empty sublayers.
2013-04-30 Darin Adler <darin@apple.com>
Formatting tweaks
https://bugs.webkit.org/show_bug.cgi?id=115427
Reviewed by Andreas Kling.
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage): Fixed indenting to match
normal WebKit style.
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::pinnedInDirection): Removed an excess "+" that is harmless
but strange.
* platform/mac/SharedBufferMac.mm: Tweaked blank lines for better paragraphing.
2013-04-30 Ryosuke Niwa <rniwa@webkit.org>
Simplify ContainerNode::removeChildren
https://bugs.webkit.org/show_bug.cgi?id=115398
Reviewed by Andreas Kling.
Back port https://chromium.googlesource.com/chromium/blink/+/b981f01cd065236b5ff7e3a8446d15b384c1b557
by Andrei Bucur, which includes both this and his r148754.
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChildren):
2013-04-30 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] Move default buffer handling from ResourceHandleClient to ResourceHandlesoup
https://bugs.webkit.org/show_bug.cgi?id=115364
Reviewed by Martin Robinson.
ResourceHandleClient that is cross-platform file is not the right
place for the default ResourceHandle read buffer. We can make
getBuffer return 0 by default and handle it in ResourceHandleSoup,
creating a default buffer when the client doesn't provide one.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(StreamingClient::getOrCreateReadBuffer): Adapt to API change.
* platform/network/ResourceHandle.h:
(ResourceHandle): Add ensureReadBuffer().
* platform/network/ResourceHandleClient.cpp:
(WebCore::ResourceHandleClient::~ResourceHandleClient): Remove
soup specific code.
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::getOrCreateReadBuffer): Rename
getBuffer() as getOrCreateReadBuffer() and use a reference for the
out parameter instead of a pointer.
(ResourceHandleClient): Remove soup specific code.
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal): Rename
m_buffer and m_bufferSize as m_readBufferPtr and m_readBufferSize
and add m_readBuffer to be used as default read buffer.
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::ResourceHandle::ensureReadBuffer): Helper function to
make usre we have a read buffer before a read operation. It first
checks if the client provides a buffer and if it doesn't it
creates or reuses the default buffer.
(WebCore::redirectSkipCallback): Call ensureReadBuffer() and adapt
to variable name changes.
(WebCore::cleanupSoupRequestOperation): Adapt to variable name
changes.
(WebCore::nextMultipartResponsePartCallback): Call
ensureReadBuffer() and adapt to variable name changes.
(WebCore::sendRequestCallback): Ditto.
(WebCore::readCallback): Ditto.
2013-04-30 Andreas Kling <akling@apple.com>
REGRESSION(r149287): Assertion failure in fast/frames/flattening/iframe-flattening-crash.html
<http://webkit.org/b/115386>
<rdar://problem/13769995>
Reviewed by Darin Adler.
Put the resize event on the Document's event queue if it happens while layout is in progress.
This avoids re-entering layout while laying out flattened subframes.
Also move the little logic for the resize event from EventHandler to FrameView (the only client.)
* page/EventHandler.cpp:
* page/EventHandler.h:
* page/FrameView.cpp:
(WebCore::FrameView::dispatchResizeEvent):
2013-04-30 Anders Carlsson <andersca@apple.com>
Fix build.
* WebCore.exp.in:
* storage/StorageTracker.h:
(StorageTracker):
2013-04-30 Anders Carlsson <andersca@apple.com>
More StorageTracker cleanup
https://bugs.webkit.org/show_bug.cgi?id=115429
Reviewed by Andreas Kling.
Make a bunch of member functions private, and remove StorageTracker::syncLocalStorage.
* WebCore.exp.in:
* storage/StorageTracker.cpp:
* storage/StorageTracker.h:
(StorageTracker):
2013-04-30 Andreas Kling <akling@apple.com>
REGRESSION(r149313) Crash at WebCore::FrameView::setFrameRect() when navigating back to previous page while find banner is displayed.
<http://webkit.org/b/115421>
<rdar://problem/13765739>
Reviewed by Antti Koivisto.
Add missing null-checks for Document and StyleResolver when re-evaluating media queries due to viewport changes.
No layout test, since we can't show the find banner from WebCore, and I can't think of another way to
trigger a back navigation to a Document-less Frame that would also change the FrameView's size.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
2013-04-30 Glenn Adams <glenn@skynav.com>
The bison grammar for @supports should return 0 in case of an error
https://bugs.webkit.org/show_bug.cgi?id=115402
Reviewed by Darin Adler.
Back ported from https://chromium.googlesource.com/chromium/blink/+/74399c27c8b93286bae03a1d6371735935b34d85.
Test: css3/supports-crash.html
* css/CSSGrammar.y.in:
2013-04-30 Darin Adler <darin@apple.com>
[CG] Over-release in MIME type registry code
https://bugs.webkit.org/show_bug.cgi?id=115423
Reviewed by Eric Carlson.
Sam Weinig spotted these by code inspection. I don't know how to make a test demonstrating
the problem, but this is clearly an over-release.
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes): Removed incorrect adoptCF call on a string we
are getting from a CFArray.
(WebCore::initializeSupportedImageMIMETypesForEncoding): Ditto.
2013-04-30 Mike Lattanzio <mlattanzio@blackberry.com>
[BlackBerry] ImageBuffer::copyImage leaking memory
https://bugs.webkit.org/show_bug.cgi?id=115359
Reviewed by George Staikos.
Use a WebCore::Vector to ensure the temporary data is destroyed.
The TiledImage does not take ownership of the data.
* platform/graphics/blackberry/ImageBufferBlackBerry.cpp:
(WebCore::ImageBuffer::copyImage):
2013-04-30 Noam Rosenthal <noam@webkit.org>
[Texmap] Avoid using overlap/non-overlap region in cases where the overhead is bigger than the gain
https://bugs.webkit.org/show_bug.cgi?id=115226
Reviewed by Allan Sandfeld Jensen.
When there are several fragmeneted overlap regions, or when the overlap region is bigger than the
non-overlap region, it's more efficient to have a single intermediate surface rather than split
the rendering to overlap/non-overlap.
Covered by tests in compositing/overlap-blending.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::shouldBlend):
Readability fix.
(WebCore::TextureMapperLayer::paintUsingOverlapRegions):
Consolidate to one overlap rect when one of the following occurs:
- The overlap region's area is larger than the non-overlap region area.
- There are many fragmented overlap regions and no non-overlap regions.
2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Stop using "in" keyword in IDL files
https://bugs.webkit.org/show_bug.cgi?id=115418
Reviewed by Kentaro Hara.
Stop using "in" keyword in IDL files as this is no longer part of the
Web IDL specification and it brings no additional information.
For now, the IDL parser will still accept the "in" keyword for operation
argument to not break anything. However, we should remove support for it
later on.
No new tests, no behavior change.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryEntrySync.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/EntriesCallback.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/EntryArray.idl:
* Modules/filesystem/EntryArraySync.idl:
* Modules/filesystem/EntryCallback.idl:
* Modules/filesystem/EntrySync.idl:
* Modules/filesystem/ErrorCallback.idl:
* Modules/filesystem/FileCallback.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileSystemCallback.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/FileWriterCallback.idl:
* Modules/filesystem/FileWriterSync.idl:
* Modules/filesystem/MetadataCallback.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/geolocation/PositionCallback.idl:
* Modules/geolocation/PositionErrorCallback.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCErrorCallback.idl:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCStatsCallback.idl:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/notifications/NotificationPermissionCallback.idl:
* Modules/quota/StorageErrorCallback.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/quota/StorageQuotaCallback.idl:
* Modules/quota/StorageUsageCallback.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferCallback.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/OfflineAudioContext.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/webdatabase/SQLTransactionSyncCallback.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/test/TestCallback.idl:
* bindings/scripts/test/TestCustomNamedGetter.idl:
* bindings/scripts/test/TestDomainSecurity.idl:
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestMediaQueryListListener.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestOverloadedConstructors.idl:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestSupplemental.idl:
* bindings/scripts/test/TestTypedArray.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMImplementation.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeList.idl:
* dom/OverflowEvent.idl:
* dom/PropertyNodeList.idl:
* dom/Range.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/ShadowRoot.idl:
* dom/StringCallback.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/TouchList.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileList.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMFormData.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAudioElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLOutputElement.idl:
* html/HTMLPropertiesCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/TimeRanges.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
* inspector/InjectedScriptHost.idl:
* inspector/InspectorFrontendHost.idl:
* inspector/JavaScriptCallFrame.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/Console.idl:
* page/Crypto.idl:
* page/DOMSecurityPolicy.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/PagePopupController.idl:
* page/Performance.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/Storage.idl:
* storage/StorageEvent.idl:
* svg/ElementTimeControl.idl:
* svg/SVGAngle.idl:
* svg/SVGColor.idl:
* svg/SVGDocument.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGLocatable.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathElement.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPoint.idl:
* svg/SVGPointList.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStringList.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransform.idl:
* svg/SVGTransformList.idl:
* testing/InternalSettings.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
2013-04-30 Noam Rosenthal <noam@webkit.org>
[Texmap] Use fewer intermediate surfaces when compositing filters
https://bugs.webkit.org/show_bug.cgi?id=115224
Reviewed by Allan Sandfeld Jensen.
Until now, when rendering CSS filters, the filters were applied to the texture
and then the resulting texture would be composited to the target surface with
its transform/opacity.
This requires at least two intermediate surface passes for every filtered layer.
This patch makes it so that the last filter pass is applied together with the
resulting surface's opacity and transform, during composition.
Tested by css3/filters tests, whichn now scroll/zoom a lot faster.
* platform/graphics/texmap/TextureMapper.h:
(WebCore::BitmapTexture::applyFilters):
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGLData::TextureMapperGLData):
(TextureMapperGLData):
(WebCore):
(WebCore::optionsForFilterType):
(WebCore::getPassesRequiredForFilter):
(WebCore::gauss):
(WebCore::gaussianKernel):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::isCustomFilter):
* platform/graphics/texmap/TextureMapperGL.h:
(TextureMapperGL):
(BitmapTextureGL):
(FilterInfo):
* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::applyFilters):
* platform/graphics/texmap/TextureMapperImageBuffer.h:
(BitmapTextureImageBuffer):
(WebCore::BitmapTextureGL::FilterInfo::FilterInfo):
(WebCore::BitmapTextureGL::filterInfo):
(WebCore::BitmapTextureGL::applyFilters):
Modify TextureMapperGL to remember the last filter operation applied
to a BitmapTexture and apply it when the texture is composited.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface):
Simplify the call to applyFilters, since now TextureMapperGL is responsible
for maintaining the content texture.
2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
[EFL] Enable scaled cursors
https://bugs.webkit.org/show_bug.cgi?id=106242
Reviewed by Gyuyoung Kim.
Correctly copy WebCore::Cursor's m_imageScaleFactor
member in CursorEfl.cpp when MOUSE_CURSOR_SCALE is
enabled.
No new tests, already covered by existing tests.
* platform/efl/CursorEfl.cpp:
(WebCore::Cursor::Cursor):
(WebCore::Cursor::operator=):
2013-04-30 Thiago Marcos P. Santos <thiago.santos@intel.com>
CSSParser::parseFontFamily should allow the keyword "default" as part of a font name
https://bugs.webkit.org/show_bug.cgi?id=107231
Reviewed by Ryosuke Niwa.
Make sure that using the keyword "default" as font family doesn't
invalidate the whole declaration. It is also OK to use a font that
has "default" as part of a composite name (i.e. "default foo").
This matches the behavior of Firefox and IE.
Test: fast/css/font-family-parse-keyword.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFamily):
2013-04-30 Zalan Bujtas <zalan@apple.com>
Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
https://bugs.webkit.org/show_bug.cgi?id=111244
Reviewed by David Kilzer.
Enable performance.now() as a minimal subset of Web Timing API.
It returns DOMHighResTimeStamp, a monotonically increasing value representing the
number of milliseconds from the start of the navigation of the current document.
JS libraries use this API to check against the requestAnimationFrame() timestamp.
Test: fast/dom/Window/web-timing-minimal-performance-now.html
* Configurations/FeatureDefines.xcconfig:
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTargetFactory.in:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::resetDOMWindowProperties):
(WebCore):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* page/Performance.cpp:
(WebCore):
* page/Performance.h:
(Performance):
* page/Performance.idl:
2013-04-30 Commit Queue <rniwa@webkit.org>
Unreviewed, rolling out r149338.
http://trac.webkit.org/changeset/149338
https://bugs.webkit.org/show_bug.cgi?id=115409
Broke layout/perf/API tests on non-Mac:
ThreadSpecific<RefPtr<RunLoop>> does not initialize RunLoop
(Requested by rakuco on #webkit).
* platform/RunLoop.cpp:
(WebCore::RunLoop::current):
* platform/RunLoop.h:
(RunLoop):
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::initializeMainRunLoop):
(WebCore::RunLoop::current):
(WebCore::RunLoop::~RunLoop):
* platform/efl/RunLoopEfl.cpp:
(WebCore::RunLoop::~RunLoop):
* platform/gtk/RunLoopGtk.cpp:
(WebCore::RunLoop::~RunLoop):
* platform/win/RunLoopWin.cpp:
(WebCore::RunLoop::~RunLoop):
2013-04-30 Alberto Garcia <agarcia@igalia.com>
ImageBufferData: add BlackBerry header
https://bugs.webkit.org/show_bug.cgi?id=115408
Reviewed by Carlos Garcia Campos.
* platform/graphics/ImageBufferData.h:
2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Replace "Optional" extended attribute by proper Web IDL "optional" keyword
https://bugs.webkit.org/show_bug.cgi?id=115380
Reviewed by Kentaro Hara.
Replace [Optional] with standard WebIDL optional type prefix:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-optional-argument
The default behavior now matches WebIDL: [Optional] => optional
Two cases where WebKit has extended bindings behavior still
require a non-standard IDL attribute:
[Optional=DefaultIsNullString] => [Default=NullString] optional
[Optional=DefaultIsUndefined] => [Default=Undefined] optional
Based on corresponding Blink patch from Joshua Bell for compatibility.
No new tests, no behavior change.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength):
(GenerateFunctionParametersCheck):
(GenerateArgumentsCountCheck):
(GenerateParametersCheck):
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOptionalOrRequiredArgument):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl: optional cannot be used in a typedef.
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMImplementation.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventTarget.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeList.idl:
* dom/OverflowEvent.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMFormData.idl:
* html/DOMTokenList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAudioElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/Performance.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/StorageEvent.idl:
* svg/ElementTimeControl.idl:
* svg/SVGDocument.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGLocatable.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
2013-04-30 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Fix the USE(3D_GRAPHICS) build with the standard OpenGL on Windows
https://bugs.webkit.org/show_bug.cgi?id=114684
Reviewed by Simon Hausmann.
Currently USE(3D_GRAPHICS) is only supported with OpenGLES through ANGLE
on Windows. Allow building with the stock opengl32.lib on Windows by adding
missing glCompressedTex* entries in OpenGLShims.
Those are used in Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
and will be substituted by the preprocessor.
* platform/graphics/OpenGLShims.cpp:
(WebCore::initializeOpenGLShims):
* platform/graphics/OpenGLShims.h:
(_OpenGLFunctionTable):
2013-04-29 Alberto Garcia <agarcia@igalia.com>
Remove all remaining Skia code
https://bugs.webkit.org/show_bug.cgi?id=115263
Reviewed by Benjamin Poulain.
* html/HTMLCanvasElement.cpp:
(WebCore): Remove the MaxSkiaDim constant, which was a leftover
from r149193.
* platform/graphics/harfbuzz/FontHarfBuzz.cpp: Removed.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Removed.
* platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Removed.
* platform/graphics/harfbuzz/HarfBuzzFaceSkia.cpp: Removed.
2013-04-29 Anders Carlsson <andersca@apple.com>
Fix build.
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::getCompositeFontReferenceFontData):
2013-04-29 Simon Fraser <simon.fraser@apple.com>
Don't do CGContext flipping when painting subframes in WebKit1 on post-MountainLion OSes
https://bugs.webkit.org/show_bug.cgi?id=115392
<rdar://problem/13421519>
Reviewed by Beth Dakin.
Sync up with AppKit behavior changes that could cause subviews to be flipped when
painted.
* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):
2013-04-29 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH: need to identify the default voice per language
https://bugs.webkit.org/show_bug.cgi?id=115366
Reviewed by Tim Horton.
Use a WKSystemInterface method to determine which voice per language is the default voice.
When looking for a voice, there may not be a default at all, so we need to search until we
find a default.
* WebCore.exp.in:
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-04-29 James Craig <james@cookiecrook.com>
Settings.in selectionIncludesAltImageText should default to true, due to update in HTML spec.
https://bugs.webkit.org/show_bug.cgi?id=115283
Reviewed by Chris Fleizach.
Config change due to this spec update:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21403
http://html5.org/tools/web-apps-tracker?from=7854&to=7855
Updated existing test coverage.
* page/Settings.in:
2013-04-29 Anders Carlsson <andersca@apple.com>
Make RunLoop ref-counted
https://bugs.webkit.org/show_bug.cgi?id=115384
Reviewed by Sam Weinig.
This is a step towards creating a shared base class that both RunLoop and WorkQueue will derive from.
* platform/RunLoop.cpp:
(WebCore::RunLoop::current):
(WebCore::RunLoop::~RunLoop):
(WebCore):
* platform/RunLoop.h:
(RunLoop):
* platform/cf/RunLoopCF.cpp:
(WebCore::RunLoop::initializeMainRunLoop):
(WebCore::RunLoop::current):
(WebCore::RunLoop::~RunLoop):
2013-04-29 Brent Fulgham <bfulgham@webkit.org>
[Windows, WinCairo] Remove link and include directives for pthread.
https://bugs.webkit.org/show_bug.cgi?id=115381
Reviewed by Benjamin Poulain.
Update various VS2005 and VS2010 property sheets to remove
reference to the pthreads Include path and instructions to
link to the pthreads library.
* WebCore.vcproj/QTMovieWinCommon.vsprops:
* WebCore.vcproj/WebCoreCommon.vsprops:
* WebCore.vcproj/WebCoreDebug.vsprops:
* WebCore.vcproj/WebCoreDebugAll.vsprops:
* WebCore.vcproj/WebCoreProduction.vsprops:
* WebCore.vcproj/WebCorePthreads.vsprops: Removed.
* WebCore.vcproj/WebCoreRelease.vsprops:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/WebCoreDebug.props:
* WebCore.vcxproj/WebCoreDebugWinCairo.props:
* WebCore.vcxproj/WebCoreProduction.props:
* WebCore.vcxproj/WebCorePthreads.props: Removed.
* WebCore.vcxproj/WebCoreRelease.props:
* WebCore.vcxproj/WebCoreReleaseWinCairo.props:
2013-04-29 Benjamin Poulain <benjamin@webkit.org>
Do not allocate Static Strings for Notification::permissionString
https://bugs.webkit.org/show_bug.cgi?id=115316
Reviewed by Geoffrey Garen.
The code is not nearly hot enough to justify keeping this memory around.
* Modules/notifications/Notification.cpp:
(WebCore::Notification::permission):
(WebCore::Notification::permissionString):
* Modules/notifications/Notification.h:
(Notification):
2013-04-29 Anders Carlsson <andersca@apple.com>
Remove StorageTracker::originsLoaded
https://bugs.webkit.org/show_bug.cgi?id=115382
Reviewed by Sam Weinig.
Remove m_finishedImportingOriginIdentifiers.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::StorageTracker):
(WebCore::StorageTracker::finishedImportingOriginIdentifiers):
* storage/StorageTracker.h:
(StorageTracker):
2013-04-29 Anders Carlsson <andersca@apple.com>
Get rid of StorageTracker::setClient
https://bugs.webkit.org/show_bug.cgi?id=115376
Reviewed by Sam Weinig.
* WebCore.exp.in:
* storage/StorageTracker.cpp:
* storage/StorageTracker.h:
(StorageTracker):
2013-04-22 Jeffrey Pfau <jpfau@apple.com>
Change approach to third-party blocking for LocalStorage
https://bugs.webkit.org/show_bug.cgi?id=115004
Reviewed by Maciej Stachowiak.
Instead of outright blocking LocalStorage that's used in a third-party
context, silently partition it based on the origin of the top context.
These partitions are then discarded when the page group is unloaded.
No new tests; modified existing tests to account for changes.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::localStorage):
* page/PageGroup.cpp:
(WebCore::PageGroup::localStorage):
(WebCore):
(WebCore::PageGroup::transientLocalStorage):
* page/PageGroup.h:
(PageGroup):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canAccessStorage):
2013-04-29 Yi Shen <max.hong.shen@gmail.com>
HTML Editing: Insertion point jumps when using link detection
https://bugs.webkit.org/show_bug.cgi?id=82198
Reviewed by Ryosuke Niwa.
Add links should be done only when typing a word separator (e.g. space or dot) which
breaks the text into two parts - the link and the rest of the text. Reflected in
code, we should only add link when the caret position is at the right end location of
TextChecking result. Otherwise, the text on the right of a word separator could be
highlighted as a link and the insertion point jumps unexpectedly.
Tests: update editing/inserting/typing-space-to-trigger-smart-link.html
* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor):
2013-04-29 Beth Dakin <bdakin@apple.com>
Need a LayoutMilestone to fire when we have done our first paint after suppressing
incremental layout
https://bugs.webkit.org/show_bug.cgi?id=115330
-and corresponding-
<rdar://problem/12722365>
Reviewed by Simon Fraser.
To meet the needs of all of our clients, we really need two milestones. One
indicating that a layout has happened after setVisualUpdatesAllowed(true), and
another indicating that painting has happened.
If layout is needed when setVisualUpdatesAllowed(true) is called, we need to
update it so that we can guarantee the first paint is really happening at this
time. Also fire the DidFirstLayoutAfterSuppressedIncrementalRendering milestone,
and call add DidFirstPaintAfterSuppressedIncrementalRendering to the FrameView's
pending paint milestones.
up the painting milestone.
* dom/Document.cpp:
(WebCore::Document::setVisualUpdatesAllowed):
FrameView now stores m_milestonesPendingPaint. We'll send and clear them once we
have painted.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::addPaintPendingMilestones):
(WebCore::FrameView::firePaintRelatedMilestones):
* page/FrameView.h:
(WebCore::FrameView::milestonesPendingPaint):
Two new milestones.
* page/LayoutMilestones.h:
(WebCore):
We don't need m_headerLayerAwaitingFirstFlush anymore since we can use FrameView's
pending paint milestones instead.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor):
2013-04-29 David Hyatt <hyatt@apple.com>
[Mac] Links can't be hovered or clicked with overlay scrollbars hidden.
https://bugs.webkit.org/show_bug.cgi?id=99379
This is also <rdar://problem/10929565> Overlay scrollbars prevent hit-testing on
content underneath them, even when hidden
Reviewed by Beth Dakin.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::verticalScrollbarWidth):
(WebCore::RenderLayer::horizontalScrollbarHeight):
2013-04-29 Anders Carlsson <andersca@apple.com>
Begin cleaning up StorageTracker
https://bugs.webkit.org/show_bug.cgi?id=115373
Reviewed by Andreas Kling.
Rename Mutexes to use "Mutex" and not "Guard".
Don't use static locals for ".localstorage" and "*.localstorage" strings.
Put end iterator declarations together with begin declarations.
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::setDatabaseDirectoryPath):
(WebCore::StorageTracker::trackerDatabasePath):
(WebCore::StorageTracker::openTrackerDatabase):
(WebCore::StorageTracker::finishedImportingOriginIdentifiers):
(WebCore::StorageTracker::syncImportOriginIdentifiers):
(WebCore::StorageTracker::syncFileSystemAndTrackerDatabase):
(WebCore::StorageTracker::setOriginDetails):
(WebCore::StorageTracker::syncSetOriginDetails):
(WebCore::StorageTracker::origins):
(WebCore::StorageTracker::deleteAllOrigins):
(WebCore::StorageTracker::syncDeleteAllOrigins):
(WebCore::StorageTracker::deleteOrigin):
(WebCore::StorageTracker::syncDeleteOrigin):
(WebCore::StorageTracker::willDeleteAllOrigins):
(WebCore::StorageTracker::willDeleteOrigin):
(WebCore::StorageTracker::canDeleteOrigin):
(WebCore::StorageTracker::cancelDeletingOrigin):
(WebCore::StorageTracker::setClient):
(WebCore::StorageTracker::databasePathForOrigin):
(WebCore::StorageTracker::diskUsageForOrigin):
* storage/StorageTracker.h:
(StorageTracker):
2013-04-29 Andreas Kling <akling@apple.com>
Don't check for @media rules affected by viewport changes in every layout.
<http://webkit.org/b/115370>
<rdar://problem/13765739>
Reviewed by Antti Koivisto.
Move the logic that checks if any @media rules are affected by a change in the viewport
size to FrameView::setFrameRect(). This way it's no longer necessary to do the style
recalc synchronously, which allows us to coalesce multiple updates in some cases.
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::layout):
2013-04-29 Anders Carlsson <andersca@apple.com>
Remove the last StorageSyncManager function
https://bugs.webkit.org/show_bug.cgi?id=115371
Reviewed by Sam Weinig.
Move the import scheduling to the StorageAreaSync constructor. Remove code to set m_importComplete to true
since that could only happen if the StorageSyncManager's thread is null which doesn't make any sense.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::StorageAreaSync):
(WebCore::StorageAreaSync::create):
* storage/StorageSyncManager.cpp:
* storage/StorageSyncManager.h:
(StorageSyncManager):
2013-04-29 Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
Remove unused method RenderMeter::valueRatio()
https://bugs.webkit.org/show_bug.cgi?id=115266
Reviewed by Darin Adler.
The removed method is not used anywhere.
No new tests are required.
* rendering/RenderMeter.cpp:
* rendering/RenderMeter.h:
(RenderMeter):
2013-04-29 Anders Carlsson <andersca@apple.com>
Remove two more StorageSyncManager wrapper functions
https://bugs.webkit.org/show_bug.cgi?id=115367
Reviewed by Andreas Kling.
* storage/StorageAreaSync.cpp:
(WebCore::StorageAreaSync::scheduleFinalSync):
(WebCore::StorageAreaSync::syncTimerFired):
* storage/StorageSyncManager.cpp:
* storage/StorageSyncManager.h:
2013-04-29 Stephen Chenney <schenney@chromium.org>
SVGElement destructor can use invalid iterator
https://bugs.webkit.org/show_bug.cgi?id=115361
Reviewed by Philip Rogers.
When an SVGElement object has rare data, its destructor gets a
hash map iterator for the rare data, uses it to clear resources,
then uses the iterator to delete the rare data. However, the resource
cleanup can delete other SVG elements, thus modifying the hash map
from which the iterator came and hence invalidating the iterator
itself.
The fix is to re-get the iterator before deleting the rare data.
Test: svg/custom/svg-element-destructor-iteration-crash.html
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement): Get a new iterator after clearing rare data.
2013-04-29 Brady Eidson <beidson@apple.com>
REGRESSION: We see authentication challenge sheets for favicon requests.
<rdar://problem/13753470> and https://bugs.webkit.org/show_bug.cgi?id=115288
Reviewed by Alexey Proskuryakov.
No new tests (Not in a tested config, might fix existing test).
Rename ClientCrossOriginCredentialPolicy to ClientCredentialPolicy, make it be three options.
and move it to ResourceHandleTypes where it belongs:
* loader/ResourceLoaderOptions.h:
* platform/network/ResourceHandleTypes.h:
Expose the ClientCredentialPolicy the ResourceLoader was created with:
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::clientCredentialPolicy):
Rework the “should ask client” clause for the new values of ClientCredentialPolicy:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
Rework loadResourceSynchronously() to include a ClientCredentialPolicy argument:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/FrameLoader.h:
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously):
* loader/LoaderStrategy.h:
Never ask the client for credentials for icon loads:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
Update all other users of ClientCredentialPolicy to the appropriate new value,
and update all users of loadResourceSynchronously to the new function signature:
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/FrameLoader.h:
(FrameLoader):
* loader/LoaderStrategy.cpp:
(WebCore::LoaderStrategy::loadResourceSynchronously):
* loader/LoaderStrategy.h:
(LoaderStrategy):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::defaultCachedResourceOptions):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
* WebCore.exp.in:
2013-04-29 Anders Carlsson <andersca@apple.com>
Add a StorageSyncManager::dispatch helper function
https://bugs.webkit.org/show_bug.cgi?id=115365
Reviewed by Andreas Kling.
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::dispatch):
(WebCore):
(WebCore::StorageSyncManager::close):
(WebCore::StorageSyncManager::scheduleImport):
(WebCore::StorageSyncManager::scheduleSync):
(WebCore::StorageSyncManager::scheduleDeleteEmptyDatabase):
* storage/StorageSyncManager.h:
(StorageSyncManager):
2013-04-29 Anders Carlsson <andersca@apple.com>
Re-indent StorageSyncManager and remove SecurityOrigin forward declaration.
Rubber-stamped by Andreas Kling.
* storage/StorageSyncManager.h:
2013-04-27 Anders Carlsson <andersca@apple.com>
Get rid of StorageTask
https://bugs.webkit.org/show_bug.cgi?id=115313
Reviewed by Andreas Kling.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* storage/StorageSyncManager.cpp:
* storage/StorageTask.cpp: Removed.
* storage/StorageTask.h: Removed.
* storage/StorageThread.cpp:
(WebCore::StorageThread::threadEntryPoint):
(WebCore::StorageThread::dispatch):
(WebCore::StorageThread::terminate):
* storage/StorageThread.h:
(StorageThread):
* storage/StorageTracker.cpp:
2013-04-29 Andreas Kling <akling@apple.com>
Add branch-prediction hint to FAST_RETURN_IF_NO_FRONTENDS.
<http://webkit.org/b/115357>
Reviewed by Anders Carlsson.
Since this macro is used in some very hot code paths, give the compiler an extra hint
to try and minimize the impact it has when the inspector is not active.
* inspector/InspectorInstrumentation.h:
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Add WTF_USE_IMLANG_FONT_LINK2
https://bugs.webkit.org/show_bug.cgi?id=115198
Reviewed by Andreas Kling.
Add this new define to have a central place for switching
the IMLangFontLinkType and adop all usages of the type.
This makes the usage of the code easier on desktop pcs.
* platform/graphics/FontCache.h:
(WebCore):
* platform/graphics/wince/FontCacheWinCE.cpp:
(WebCore::currentFontContainsCharacter):
(WebCore::createMLangFont):
(WebCore::FontCache::getFontDataForCharacters):
* platform/graphics/wince/SimpleFontDataWinCE.cpp:
(WebCore::SimpleFontData::containsCharacters):
2013-04-29 Noam Rosenthal <noam@webkit.org>
Get rid of "non-composited contents" in CoordinatedLayerTreeHost
https://bugs.webkit.org/show_bug.cgi?id=110355
Reviewed by Jocelyn Turcotte.
When in force compositing mode, always assume that the main layer needs
a backing store. Make setVisibleContentRectTrajectoryVector and accumulatedCoverRect
recursive so that they don't rely on a specialized layer.
No new testable behavior, changes to coverRect and trajectory vector only
affect tiling latency in rare cases that are not trivial to test.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer:setVisibleContentRectTrajectoryVector):
Make the trajectory vector recursive, though limited only to layers with
translate/identity. This allows us to keep the trajectory vector while removing
the non-composited contents specialization.
(WebCore::CoordinatedGraphicsLayer::accumulatedCoverRect):
Added accumulatedCoverRect, so that the coverRect calculations for the UI process
are not bound to the non-composited contents layer.
(WebCore::CoordinatedGraphicsLayer::findDescendantWithContentsRecursively):
Instead of saving a reference to the non-composited contents layer, we assume that
the first layer we found recursively which has contents is the one to be used for
coverRect/trajectory calculations.
(WebCore):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintsIntoWindow):
Always create a layer for the non-composited contents when in forceCompositing mode.
2013-04-29 Dirk Schulze <krit@webkit.org>
Animate clip rect() between different Length types
https://bugs.webkit.org/show_bug.cgi?id=115336
Reviewed by Andreas Kling.
At the moment the animation for the 'clip' property
has an early return if the type of two Length values
does not match. This patch removes this early return.
Modified existing tests to cover the changes.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
2013-04-29 Andreas Kling <akling@apple.com>
When updating geometry, send JavaScript resize before before layout/paint.
<http://webkit.org/b/115199>
<rdar://problem/13735535>
Reviewed by Geoffrey Garen.
Make the "resize" event synchronous and dispatch it before doing any automatic
resize-induced layout. This avoids unnecessary work in cases where an event handler
does something that dirties style.
It also avoids a kind of JS-side FOUC that happens if we drop out to the runloop
and paint before the resize event handler runs; for example, when viewing a popup
on <http://lokeshdhakar.com/projects/lightbox2/> and resizing the window, the dark
overlay sometimes resizes out of sync with the web view, since a paint may happen
between automatic layout and the resize event.
* page/EventHandler.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchResizeEvent):
* page/FrameView.h:
* page/FrameView.cpp:
(WebCore::FrameView::dispatchResizeEvent):
Renamed sendResizeEvent() to dispatchResizeEvent() and made it dispatch the event
synchronously instead of adding it to the DocumentEventQueue.
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::setFrameRect):
Dispatch the "resize" event right when the new frame rect is set.
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Remove OS(WINCE) from (Render|Scrollbar)ThemeWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=115348
Reviewed by Andreas Kling.
Compile DIBPixelData.cpp on Windows CE too, which allows us
to get rid of a few #if OS(WINCE) in other code parts.
* PlatformWinCE.cmake:
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::setRGBABitmapAlpha):
* platform/win/ScrollbarThemeWin.cpp:
(WebCore::ScrollbarThemeWin::paintTrackPiece):
(WebCore::ScrollbarThemeWin::paintButton):
(WebCore::ScrollbarThemeWin::paintThumb):
* rendering/RenderThemeWin.cpp:
(WebCore::drawControl):
2013-04-29 Eli Fidler <efidler@blackberry.com>
[BlackBerry] Fake-bold monospace fonts need to use non-fake-bold advances
https://bugs.webkit.org/show_bug.cgi?id=115280
Reviewed by George Staikos.
BlackBerry PR 330864
Tested by fast/css/css3-ch-unit.html
* platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
(WebCore::FontPlatformData::applyState):
(WebCore::FontPlatformData::isFixedPitch):
* platform/graphics/blackberry/ITypeUtils.h:
* platform/graphics/blackberry/SimpleFontDataBlackBerry.cpp:
(WebCore::SimpleFontData::platformWidthForGlyph):
2013-04-29 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Clean up code related with the children management stuff for clutter based AC
https://bugs.webkit.org/show_bug.cgi?id=114260
Reviewed by Gustavo Noronha Silva.
Remove unused or usless code for children management stuff.
No new tests since no functionality changed.
* platform/graphics/clutter/GraphicsLayerActor.cpp:
(_GraphicsLayerActorPrivate):
(graphics_layer_actor_class_init):
(graphicsLayerActorAllocate):
(graphicsLayerActorDraw):
(graphicsLayerActorNew):
(graphicsLayerActorSetSublayers):
* platform/graphics/clutter/GraphicsLayerActor.h:
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::idleDestroy):
(WebCore::GraphicsLayerClutter::ensureStructuralLayer):
(WebCore::GraphicsLayerClutter::updateLayerDrawsContent):
2013-04-29 Patrick Gansterer <paroga@webkit.org>
[WIN] Guard cfHDropFormat() with USE(CF) instead of OS(WINCE)
https://bugs.webkit.org/show_bug.cgi?id=115195
Reviewed by Andreas Kling.
USE(CF) is the correct guard, which works on desktop pcs too.
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::files):
* platform/win/DragDataWin.cpp:
(WebCore::DragData::containsFiles):
(WebCore::DragData::numberOfFiles):
(WebCore::DragData::asFilenames):
2013-04-29 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
* GNUmakefile.am: Add missing scripts to EXTRA_DIST.
* GNUmakefile.list.am: Add missing files to compilation.
2013-04-29 Noam Rosenthal <noam@webkit.org>
[Qt] fast/canvas/webgl/webgl-composite-modes.html broken after r148433.
https://bugs.webkit.org/show_bug.cgi?id=115243
Reviewed by Jocelyn Turcotte.
When compositing a layer with a canvas or directly composited image, it is
wrong to use TextureMapperLayer::setBackingStore. Instead, setContentsLayer
should be used, which allows for the layer to have both a backing store and
a contents layer.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintSelf):
* platform/graphics/texmap/TextureMapperLayer.h:
(State):
(WebCore::TextureMapperLayer::State::State):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
(WebCore::CoordinatedGraphicsScene::destroyCanvasIfNeeded):
(WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix.
* bindings/js/WorkerScriptDebugServer.cpp: Added missing header.
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Unreviewed build fix.
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::generateComponents):
2013-04-29 Patrick Gansterer <paroga@webkit.org>
Remove OS(WINCE) from HTMLSelectElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=115194
Reviewed by Andreas Kling.
Use the same files like the the other PLATFORM(WIN) ports use.
* PlatformWinCE.cmake:
* html/HTMLSelectElement.cpp:
(WebCore):
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
StaticHashSetNodeList is unnecessary
https://bugs.webkit.org/show_bug.cgi?id=115219
Reviewed by Antonio Gomes.
Moved Document::nodesFromRect into Internals::nodesFromRect per
https://chromium.googlesource.com/chromium/blink/+/78207c5c34383fbb807bb9347deb67168f09bb04.
Also made TouchAdjustment functions use HashListSet directly instead of wrapping it inside
a StaticHashSetNodeList since there was no need to use the latter.
With these two changes, I deleted StaticHashSetNodeList.
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore):
* dom/Document.h:
(Document):
* dom/StaticHashSetNodeList.cpp: Removed.
* dom/StaticHashSetNodeList.h: Removed.
* page/EventHandler.cpp:
(WebCore::EventHandler::bestClickableNodeForTouchPoint):
(WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::compileSubtargetList):
(WebCore::TouchAdjustment::compileZoomableSubtargets):
(WebCore::findBestClickableCandidate):
(WebCore::findBestContextMenuCandidate):
(WebCore::findBestZoomableArea):
* page/TouchAdjustment.h:
(WebCore):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):
2013-04-28 Dean Jackson <dino@apple.com>
[Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
https://bugs.webkit.org/show_bug.cgi?id=115310
Reviewed by Simon Fraser.
Disable the automatic pixel doubling in canvas backing stores on high
dpi devices. This will potentially make canvases look worse of high dpi
displays, but only if they were ignoring devicePixelRatio. Since the
majority of high dpi displays *do not* auto-double (including mobile
devices and other desktop browsers), this provides consistency and less
chance of unnecessary memory use.
* Configurations/FeatureDefines.xcconfig: Remove ENABLE_HIGH_DPI_CANVAS_macosx.
2013-04-28 Christophe Dumez <ch.dumez@sisa.samsung.com>
Get rid of [Callback] IDL extended attribute for parameters
https://bugs.webkit.org/show_bug.cgi?id=115250
Reviewed by Kentaro Hara.
Remove the WebKit-specific [Callback] extended attribute and make the bindings
generator smart enough to know when a parameter is of callback type on its
own.
No new tests, no behavior change.
* DerivedSources.make: Use WebCore/Modules as IDL include path instead of using
subdirs. The generator will search recursively anyway and the list of subdirs was
incomplete.
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* bindings/gobject/GNUmakefile.am: Add missing IDL include dirs.
* bindings/scripts/CodeGenerator.pm:
(IsWrapperType):
(IsCallbackInterface):
* bindings/scripts/CodeGeneratorGObject.pm:
(SkipFunction):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheckExpression):
(GenerateParametersCheck):
* bindings/scripts/IDLAttributes.txt: Remove "Callback" extended attribute.
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
(WebDOMTestCallback::callbackWithArrayParam):
(WebDOMTestCallback::callbackWithSerializedScriptValueParam):
(WebDOMTestCallback::callbackWithNonBoolReturnType):
(WebDOMTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/CPP/WebDOMTestCallback.h:
(WebDOMTestCallback):
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
(WebDOMTestObj::convert1):
(WebDOMTestObj::convert2):
(WebDOMTestObj::convert4):
(WebDOMTestObj::convert5):
* bindings/scripts/test/CPP/WebDOMTestObj.h:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
(WebDOMTestSerializedScriptValueInterface::acceptTransferList):
(WebDOMTestSerializedScriptValueInterface::multiTransferList):
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
(WebDOMTestSerializedScriptValueInterface):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
(WebDOMTestTypedefs::multiTransferList):
* bindings/scripts/test/CPP/WebDOMTestTypedefs.h:
(WebDOMTestTypedefs):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_callback_with_array_param):
(webkit_dom_test_callback_callback_with_serialized_script_value_param):
(webkit_dom_test_callback_callback_with_non_bool_return_type):
(webkit_dom_test_callback_callback_requires_this_to_pass):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_convert1):
(webkit_dom_test_obj_convert2):
(webkit_dom_test_obj_convert4):
(webkit_dom_test_obj_convert5):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
(webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_multi_transfer_list):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithArrayParam):
(WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bindings/scripts/test/JS/JSTestCallback.h:
(JSTestCallback):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
(WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
* bindings/scripts/test/ObjC/DOMTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
(-[DOMTestCallback callbackWithArrayParam:]):
(-[DOMTestCallback callbackWithSerializedScriptValueParam:strArg:]):
(-[DOMTestCallback callbackWithNonBoolReturnType:]):
(-[DOMTestCallback callbackRequiresThisToPass:testNodeParam:]):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj convert1:]):
(-[DOMTestObj convert2:]):
(-[DOMTestObj convert4:]):
(-[DOMTestObj convert5:]):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
(-[DOMTestSerializedScriptValueInterface acceptTransferList:transferList:]):
(-[DOMTestSerializedScriptValueInterface multiTransferList:tx:second:txx:]):
* bindings/scripts/test/ObjC/DOMTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
(-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
* bindings/scripts/test/TestCallback.idl: Use valid types instead of Class1, Class2, ...
so that the bindings generator does not complain about not being able to resolve
them.
* bindings/scripts/test/TestObj.idl: Use valid parameter types instead of 'a', 'b', 'd', 'e'
so that the bindings generator does not complain about them.
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl:
* css/FontLoader.idl:
* dom/DataTransferItem.idl:
* page/DOMWindow.idl:
2013-04-27 Darin Adler <darin@apple.com>
Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
https://bugs.webkit.org/show_bug.cgi?id=115307
Reviewed by Geoffrey Garen.
This change was done by a global replace followed by compiling and inspecting for
cases that needed to be tweaked by hand.
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::attachWrapper):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::attachWrapper):
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::methodNamed):
(JSC::Bindings::ObjcClass::fieldNamed):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcField::ObjcField):
* editing/mac/EditorMac.mm:
(WebCore::Editor::fontAttributesForSelectionStart):
* history/cf/HistoryPropertyList.cpp:
(WebCore::HistoryPropertyListWriter::releaseData):
* html/HTMLMediaElement.cpp:
(WebCore::createFileURLForApplicationCacheResource):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::rawDataRepresentation):
* loader/archive/cf/LegacyWebArchiveMac.mm:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::willCacheResponse):
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::userPrefersCaptions):
(WebCore::CaptionUserPreferencesMac::userPrefersSubtitles):
(WebCore::CaptionUserPreferencesMac::captionsWindowCSS):
(WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS):
(WebCore::CaptionUserPreferencesMac::captionsTextColor):
(WebCore::CaptionUserPreferencesMac::captionsDefaultFontCSS):
(WebCore::CaptionUserPreferencesMac::preferredLanguages):
(WebCore::trackDisplayName):
* platform/Language.cpp:
(WebCore::displayNameForLanguageLocale):
* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagSearchWeb):
(WebCore::imageTitle):
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypes):
(WebCore::initializeSupportedImageMIMETypesForEncoding):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::AudioFileReader):
* platform/cf/KURLCFNet.cpp:
(WebCore::KURL::fileSystemPath):
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::maybeTransferPlatformData):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setContentsToImage):
* platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
(WebCore::LayerFlushScheduler::schedule):
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimation::PlatformCAAnimation):
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::addAnimationForKey):
(PlatformCALayer::setBackgroundColor):
(PlatformCALayer::setBorderColor):
* platform/graphics/cg/BitmapImageCG.cpp:
(WebCore::BitmapImage::checkForSolidColor):
(WebCore::BitmapImage::getCGImageArray):
* platform/graphics/cg/ColorCG.cpp:
(WebCore::cachedCGColor):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::setURLForRect):
* platform/graphics/cg/ImageBufferCG.cpp:
(WebCore::createIOSurface):
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::clip):
(WebCore::ImageBuffer::putByteArray):
(WebCore::CGImageEncodeToData):
(WebCore::CGImageToDataURL):
(WebCore::ImageBuffer::toDataURL):
(WebCore::ImageDataToDataURL):
* platform/graphics/cg/ImageBufferDataCG.cpp:
(WebCore::ImageBufferData::getData):
(WebCore::ImageBufferData::putData):
* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::imageWithColorSpace):
(WebCore::Image::drawPattern):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::setData):
(WebCore::ImageSource::isSizeAvailable):
(WebCore::ImageSource::frameSizeAtIndex):
(WebCore::ImageSource::orientationAtIndex):
(WebCore::ImageSource::getHotSpot):
(WebCore::ImageSource::repetitionCount):
(WebCore::ImageSource::createFrameAtIndex):
(WebCore::ImageSource::frameDurationAtIndex):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::dataChanged):
* platform/graphics/cg/PathCG.cpp:
(WebCore::createScratchContext):
(WebCore::Path::contains):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::setFont):
(WebCore::createFeatureSettingDictionary):
(WebCore::cascadeToLastResortFontDescriptor):
(WebCore::cascadeToLastResortAndDisableSwashesFontDescriptor):
(WebCore::FontPlatformData::ctFont):
(WebCore::FontPlatformData::description):
* platform/graphics/gpu/mac/DrawingBufferMac.mm:
(WebCore::DrawingBuffer::DrawingBuffer):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(-[WebCascadeList objectAtIndex:]):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/mac/GraphicsContext3DMac.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):
(WebCore::linearRGBColorSpaceRef):
* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::getTIFFRepresentation):
(WebCore::BitmapImage::getNSImage):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
(WebCore::MediaPlayerPrivateQTKit::createQTMovie):
(WebCore::MediaPlayerPrivateQTKit::createQTMovieView):
(WebCore::MediaPlayerPrivateQTKit::createQTVideoRenderer):
(WebCore::MediaPlayerPrivateQTKit::createQTMovieLayer):
(WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
(WebCore::addFileTypesToCache):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::SimpleFontData::getCFStringAttributes):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::fontHasVerticalGlyphs):
(WebCore::SimpleFontData::getCompositeFontReferenceFontData):
(WebCore::SimpleFontData::platformCharWidthInit):
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/graphics/mac/WebGLLayer.mm:
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
* platform/mac/ContentFilterMac.mm:
(WebCore::ContentFilter::ContentFilter):
* platform/mac/ContextMenuItemMac.mm:
(WebCore::ContextMenuItem::ContextMenuItem):
* platform/mac/CursorMac.mm:
(WebCore::createCustomCursor):
(WebCore::createNamedCursor):
* platform/mac/DisplaySleepDisabler.cpp:
(WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
* platform/mac/DragImageMac.mm:
(WebCore::dissolveDragImageToFraction):
(WebCore::createDragImageFromImage):
* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
* platform/mac/Language.mm:
(WebCore::httpStyleLanguageCode):
(WebCore::platformUserPreferredLanguages):
* platform/mac/LocalizedStringsMac.cpp:
(WebCore::localizedString):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::getDataSelection):
(WebCore::Pasteboard::writeSelectionForTypes):
(WebCore::fragmentFromWebArchive):
* platform/mac/PlatformClockCM.mm:
(PlatformClockCM::PlatformClockCM):
(PlatformClockCM::initializeWithTimingSource):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::addTypes):
(WebCore::PlatformPasteboard::setTypes):
(WebCore::PlatformPasteboard::setPathnamesForType):
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::PlatformSpeechSynthesizer::speak):
* platform/mac/PopupMenuMac.mm:
(WebCore::PopupMenuMac::populate):
(WebCore::PopupMenuMac::show):
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
(-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::createCFData):
* platform/mac/WebCoreNSStringExtras.mm:
(stringEncodingForResource):
* platform/network/ProtectionSpace.cpp:
(WebCore::ProtectionSpace::receivesCredentialSecurely):
* platform/network/SynchronousLoaderClient.cpp:
(WebCore::SynchronousLoaderClient::platformBadResponseError):
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
* platform/network/cf/FormDataStreamCFNet.cpp:
(WebCore::advanceCurrentStream):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::overrideCookieStorage):
* platform/network/cf/ProxyServerCFNet.cpp:
(WebCore::proxyAutoConfigurationResultCallback):
(WebCore::processProxyServers):
(WebCore::addProxyServersForURL):
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::platformLazyInit):
(WebCore::ResourceError::cfError):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::willSendRequest):
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::handleDataArray):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::setHeaderFields):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::executePACFileURL):
(WebCore::SocketStreamHandle::chooseProxy):
(WebCore::SocketStreamHandle::createStreams):
(WebCore::SocketStreamHandle::addCONNECTCredentials):
(WebCore::SocketStreamHandle::readStreamCallback):
(WebCore::SocketStreamHandle::writeStreamCallback):
(WebCore::SocketStreamHandle::reportErrorToClient):
* platform/network/mac/AuthenticationMac.mm:
(WebCore::mac):
(WebCore::AuthenticationChallenge::setAuthenticationClient):
* platform/network/mac/CookieJarMac.mm:
(WebCore::filterCookies):
* platform/network/mac/NetworkStateNotifierMac.cpp:
(WebCore::NetworkStateNotifier::updateState):
(WebCore::NetworkStateNotifier::NetworkStateNotifier):
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::createNSErrorFromResourceErrorBase):
(WebCore::ResourceError::nsError):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::updateNSURLRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::initNSURLResponse):
(WebCore::ResourceResponse::nsURLResponse):
(WebCore::ResourceResponse::platformLazyInit):
* platform/network/mac/UTIUtilities.mm:
(WebCore::mimeTypeFromUTITree):
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::adjustMIMETypeIfNecessary):
* platform/text/cf/HyphenationCF.cpp:
(WebCore::::createValueForNullKey):
(WebCore::lastHyphenLocation):
* platform/text/mac/HyphenationMac.mm:
(WebCore::::createValueForKey):
(WebCore::lastHyphenLocation):
* platform/text/mac/LocaleMac.mm:
(WebCore::determineLocale):
(WebCore::LocaleMac::LocaleMac):
(WebCore::LocaleMac::initializeLocaleData):
* platform/text/mac/TextBreakIteratorInternalICUMac.mm:
(WebCore::textBreakLocalePreference):
(WebCore::canonicalLanguageIdentifier):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::levelIndicatorFor):
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintSliderTrack):
(WebCore::RenderThemeMac::popupButton):
(WebCore::RenderThemeMac::search):
(WebCore::RenderThemeMac::searchMenuTemplate):
(WebCore::RenderThemeMac::sliderThumbHorizontal):
(WebCore::RenderThemeMac::sliderThumbVertical):
(WebCore::RenderThemeMac::textField):
Use adoptNS and adoptCF free functions.
2013-04-27 Ryosuke Niwa <rniwa@webkit.org>
Pressing mouse button inside a dragstart event causes a crash
https://bugs.webkit.org/show_bug.cgi?id=115296
Reviewed by Darin Adler.
Add a missing null pointer check. We should better encapsulate the states in DragState in the long term
but this is good enough for now.
Test: fast/events/mousedown-inside-dragstart-should-not-cause-crash.html
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):
2013-04-27 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed build fix when disabling video and video-track.
* platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2013-04-27 Geoffrey Garen <ggaren@apple.com>
WebGL shouldn't allocate a "length" Identifier just to move some numbers around
https://bugs.webkit.org/show_bug.cgi?id=115317
Reviewed by Dean Jackson.
Saw this while debugging an ammo.js bug.
* bindings/js/JSArrayBufferViewHelper.h:
(WebCore::setWebGLArrayWithTypedArrayArgument):
(WebCore::setWebGLArrayHelper):
(WebCore::constructArrayBufferViewWithTypedArrayArgument):
(WebCore::constructArrayBufferView):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toVector): Use the pre-computed "length" identifier instead of
allocating a new one for each vector operation. There are lots more
optimizations we could do here. This is a start.
2013-04-27 Anders Carlsson <andersca@apple.com>
Remove two more StorageTask types
https://bugs.webkit.org/show_bug.cgi?id=115312
Reviewed by Dean Jackson.
* storage/StorageTask.cpp:
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::setOriginDetails):
(WebCore::StorageTracker::deleteOrigin):
* storage/StorageTracker.h:
2013-04-27 Anders Carlsson <andersca@apple.com>
Get rid of more uses of StorageTask
https://bugs.webkit.org/show_bug.cgi?id=115311
Reviewed by Dean Jackson.
Make StorageAreaSync derive from ThreadSafeRefCounted as well, since it's passed between threads.
* storage/StorageAreaSync.h:
* storage/StorageSyncManager.cpp:
(WebCore::StorageSyncManager::scheduleImport):
(WebCore::StorageSyncManager::scheduleSync):
(WebCore::StorageSyncManager::scheduleDeleteEmptyDatabase):
* storage/StorageTask.cpp:
(WebCore::StorageTask::StorageTask):
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
(StorageTask):
2013-04-27 Anders Carlsson <andersca@apple.com>
Indent StorageAreaSync to match the style guidelines.
Rubber-stamped by Andreas Kling.
* storage/StorageAreaSync.h:
2013-04-27 Anders Carlsson <andersca@apple.com>
Replace uses of StorageTask with StorageThread::dispatch and WTF::bind
https://bugs.webkit.org/show_bug.cgi?id=115309
Reviewed by Andreas Kling.
* storage/StorageTask.cpp:
(WebCore::StorageTask::StorageTask):
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
* storage/StorageThread.cpp:
(WebCore::StorageThread::terminate):
(WebCore::StorageThread::releaseFastMallocFreeMemoryInAllThreads):
* storage/StorageThread.h:
* storage/StorageTracker.cpp:
(WebCore::StorageTracker::importOriginIdentifiers):
(WebCore::StorageTracker::deleteAllOrigins):
2013-04-27 Anders Carlsson <andersca@apple.com>
Add StorageThread::dispatch
https://bugs.webkit.org/show_bug.cgi?id=115308
Reviewed by Andreas Kling.
StorageThread::dispatch takes a Function<void ()> and runs it on the storage thread. This will be used to eventually get rid of StorageTask.
* storage/StorageTask.cpp:
(WebCore::StorageTask::StorageTask):
(WebCore::StorageTask::performTask):
* storage/StorageTask.h:
(WebCore::StorageTask::createDispatch):
* storage/StorageThread.cpp:
(WebCore::StorageThread::dispatch):
* storage/StorageThread.h:
(StorageThread):
2013-04-27 Jer Noble <jer.noble@apple.com>
REGRESSION (r147261): Audio controls background not displayed after loading audio file
https://bugs.webkit.org/show_bug.cgi?id=115221
Reviewed by Darin Adler.
As in r147261, set a flex-shrink: 0 to avoid shrinking the media controls panel
below the specified height.
No new tests; fixes the media/media-document-audio-repaint.html test.
* css/mediaControlsQuickTime.css:
(audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2013-04-26 Jer Noble <jer.noble@apple.com>
Video playback has corruption on the edges of the video
https://bugs.webkit.org/show_bug.cgi?id=115216
Reviewed by Simon Fraser.
Test: media/video-poster-background.html
RenderImage correctly answers foregroundIsKnownToBeOpaqueInRect() method
when a poster image is displayed, but once the video begins playing and
the poster image is no longer displayed, RenderImage will continue to
answer 'true' even when the video does not occupy the entire render box.
Override foregroundIsKnownToBeOpaqueInRect() in order to more correctly
answer the question for the video layer.
* rendering/RenderImage.h: Make foregroundIsKnownToBeOpaqueInRect() protected
(vs. private).
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect): Added. Return
true if the rect parameter is entirely contained by the video box.
* rendering/RenderVideo.h:
2013-04-26 Hans Muller <hmuller@adobe.com>
[CSS Exclusions] ExclusionShape bounding box methods should return LayoutRects
https://bugs.webkit.org/show_bug.cgi?id=115117
Reviewed by Dirk Schulze.
Redefined the ExclusionShape API in terms of LayoutUnits, instead of floats: all of the
ExclusionShape methods now have LayoutUnit parameters and return LayoutUnit values.
This is more natural, since the callers work exclusively in LayoutUnits.
This is strictly a refactoring, no new tests were needed.
* rendering/ExclusionPolygon.cpp:
(WebCore::ExclusionPolygon::getExcludedIntervals):
(WebCore::ExclusionPolygon::getIncludedIntervals):
(WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop):
* rendering/ExclusionPolygon.h:
* rendering/ExclusionRectangle.cpp:
(WebCore::ExclusionRectangle::getExcludedIntervals):
(WebCore::ExclusionRectangle::getIncludedIntervals):
(WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop):
* rendering/ExclusionRectangle.h:
* rendering/ExclusionShape.cpp:
(WebCore::ExclusionShape::createExclusionShape):
* rendering/ExclusionShape.h:
(LineSegment):
(ExclusionShape):
* rendering/ExclusionShapeInfo.cpp:
(WebCore):
(WebCore::::computedShape):
* rendering/ExclusionShapeInfo.h:
(WebCore):
(WebCore::ExclusionShapeInfo::shapeLogicalTop):
(WebCore::ExclusionShapeInfo::shapeLogicalBottom):
(ExclusionShapeInfo):
* rendering/ExclusionShapeInsideInfo.cpp:
(WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop):
* rendering/ExclusionShapeInsideInfo.h:
* rendering/ExclusionShapeOutsideInfo.h:
2013-04-26 Jer Noble <jer.noble@apple.com>
Nil-check the results of -[AVPlayerItemVideoOutput copyPixelBufferForItemTime:itemTimeForDisplay:].
https://bugs.webkit.org/show_bug.cgi?id=115265
Reviewed by Eric Carlson.
copyPixelBufferForItemTime:itemTimeForDisplay: can return nil, even
when hasNewPixelBufferForItemTime: returns YES. Check the results
before passing the buffer on to VTPixelTransferSessionTransferImage()
which does not NULL-check its parameters.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
2013-04-26 Roger Fong <roger_fong@apple.com>
Uninflate caret rect.
http://bugs.webkit.org/show_bug.cgi?id=114997.
<rdar://problem/12629007>.
Reviewed by Timothy Horton.
Inflation was causing painting errors with focus rings.
It is no longer needed after disabling subpixel layout.
* editing/FrameSelection.cpp:
(WebCore::repaintCaretForLocalRect):
2013-04-26 Roger Fong <roger_fong@apple.com>
Unreviewed build fix.
* platform/LayoutUnit.h:
(WebCore::LayoutUnit::LayoutUnit):
2013-04-26 Michael Saboff <msaboff@apple.com>
WebCore ObjC bridge is missing support for bool type
https://bugs.webkit.org/show_bug.cgi?id=115276
Reviewed by Geoffrey Garen.
Added code to handle conversion between ObjC and JS booleans.
* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeObjcMethod):
* bridge/objc/objc_utility.h:
* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):
(JSC::Bindings::convertObjcValueToValue):
(JSC::Bindings::objcValueTypeForType):
2013-04-26 Roger Fong <roger_fong@apple.com>
Make Apple Windows VS2010 build results into and get dependencies from __32 suffixed folders.
Make the DebugSuffix configuration use _debug dependencies.
* WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCairoRelease.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinPostBuild.cmd:
* WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props:
* WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
* WebCore.vcxproj/WebCore.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.vcxproj/WebCoreCommon.props:
* WebCore.vcxproj/WebCoreDebug.props:
* WebCore.vcxproj/WebCoreDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGenerated.make:
* WebCore.vcxproj/WebCoreGenerated.vcxproj:
* WebCore.vcxproj/WebCoreGeneratedCommon.props:
* WebCore.vcxproj/WebCoreGeneratedDebug.props:
* WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props:
* WebCore.vcxproj/WebCoreGeneratedProduction.props:
* WebCore.vcxproj/WebCoreGeneratedRelease.props:
* WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreProduction.props:
* WebCore.vcxproj/WebCoreRelease.props:
* WebCore.vcxproj/WebCoreReleaseWinCairo.props:
* WebCore.vcxproj/WebCoreTestSupport.vcxproj:
* WebCore.vcxproj/build-generated-files.sh:
* WebCore.vcxproj/copyForwardingHeaders.cmd:
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2013-04-26 Roger Fong <roger_fong@apple.com>
Disable sub-pixel layout on mac.
https://bugs.webkit.org/show_bug.cgi?id=114999.
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
* WebCore.exp.in:
Export symbol needed to be added for IntRect(const LayoutRect&) constructor,
which is now being used in pixelSnappedIntRect(const LayoutRect&) in LayoutRect.h after disabling sub-pixel layout.
2013-04-26 Simon Fraser <simon.fraser@apple.com>
Layer-backed WebViews don't repaint content outside the visible area
https://bugs.webkit.org/show_bug.cgi?id=115275
Reviewed by Beth Dakin.
Export ScrollView::setPaintsEntireContents(bool).
* WebCore.exp.in:
2013-04-26 Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org>
Change RenderMeter::valueRatio() visibility to public
https://bugs.webkit.org/show_bug.cgi?id=115266
This function is currently unused.
However, it is necessary to implement a RenderTheme capable of rendering Meter elements.
Reviewed by Alexis Menard.
No new tests, because no behaviour is changed.
* rendering/RenderMeter.h:
(RenderMeter):
2013-04-26 Timothy Hatcher <timothy@apple.com>
Add Runtime.parse to the Inspector protocol.
This will be used to parse console expressions for errors
before evaluating them fully.
https://webkit.org/b/115242
Reviewed by Oliver Hunt.
* ForwardingHeaders/parser/ParserError.h: Added.
* inspector/Inspector.json:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::parse):
* inspector/InspectorRuntimeAgent.h:
(InspectorRuntimeAgent):
2013-04-26 Benjamin Poulain <bpoulain@apple.com>
Fix the copyright years after r149057
* page/DiagnosticLoggingKeys.cpp: I accidentally removed a year from
the copyright in r149057.
2013-04-26 Konrad Piascik <kpiascik@blackberry.com>
Web Inspector: Crash due to null items from getDOMStorageItems
https://bugs.webkit.org/show_bug.cgi?id=115176
Reviewed by Joseph Pecoraro.
findStorageArea was returning a null storageArea causing the items
input paramater to not be set. This was happening without any error
being set at all. Set an error to prevent a crash when we try to
convert the result to a JSON string.
Added tests to check if session and local storage are empty that
they are still functional.
* inspector/InspectorDOMStorageAgent.cpp:
(WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2013-04-26 Martin Robinson <mrobinson@igalia.com>
Remove the remaining Skia #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=114886
Reviewed by Benjamin Poulain.
* html/HTMLCanvasElement.cpp: Remove Skia #ifdef references.
* platform/graphics/BitmapImage.cpp: Ditto.
* platform/graphics/FloatPoint.h: Ditto.
* platform/graphics/FloatRect.h: Ditto.
* platform/graphics/FontCache.h: Ditto.
* platform/graphics/Gradient.cpp: Ditto.
* platform/graphics/Gradient.h: Ditto.
* platform/graphics/GraphicsContext.cpp: Ditto.
* platform/graphics/GraphicsContext.h: Ditto.
* platform/graphics/GraphicsContext3D.h: Ditto.
* platform/graphics/ImageBuffer.cpp: Ditto.
* platform/graphics/ImageBuffer.h: Ditto.
* platform/graphics/ImageBufferData.h: Ditto.
* platform/graphics/IntPoint.h: Ditto.
* platform/graphics/IntRect.h: Ditto.
* platform/graphics/NativeImagePtr.h: Ditto.
* platform/graphics/Path.h: Ditto.
* platform/graphics/Pattern.cpp: Ditto.
* platform/graphics/Pattern.h: Ditto.
* platform/graphics/filters/FEBlend.h: Ditto.
* platform/graphics/filters/FEColorMatrix.h: Ditto.
* platform/graphics/filters/FEComponentTransfer.h: Ditto.
* platform/graphics/filters/FEComposite.h: Ditto.
* platform/graphics/filters/FEConvolveMatrix.h: Ditto.
* platform/graphics/filters/FEDisplacementMap.h: Ditto.
* platform/graphics/filters/FEGaussianBlur.h: Ditto.
* platform/graphics/filters/FELighting.h: Ditto.
* platform/graphics/filters/FEMorphology.h: Ditto.
* platform/graphics/filters/FEOffset.h: Ditto.
* platform/graphics/filters/FilterEffect.cpp: Ditto.
* platform/graphics/filters/FilterEffect.h: Ditto.
* platform/graphics/transforms/AffineTransform.h: Ditto.
* platform/graphics/transforms/TransformationMatrix.h: Ditto.
* platform/image-decoders/ImageDecoder.cpp: Ditto.
* platform/image-decoders/ImageDecoder.h: Ditto.
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Ditto.
* platform/image-decoders/webp/WEBPImageDecoder.cpp: Ditto.
* platform/mac/LocalCurrentGraphicsContext.h: Ditto.
* platform/mac/LocalCurrentGraphicsContext.mm: Ditto.
* rendering/svg/RenderSVGResourceSolidColor.cpp: Ditto.
* svg/graphics/SVGImage.cpp: Ditto.
* svg/graphics/SVGImage.h: Ditto.
2013-04-26 Allan Sandfeld Jensen <allan.jensen@digia.com>
Assert in JSC::Heap::unprotect when closing facebook.com web site
https://bugs.webkit.org/show_bug.cgi?id=115058
Reviewed by Darin Adler.
Grab a JSLock before calling RootObject::invalidate().
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::~ScriptController):
2013-04-26 Eric Carlson <eric.carlson@apple.com>
[Mac] in-band cues sometimes have incorrect duration
https://bugs.webkit.org/show_bug.cgi?id=115200
Reviewed by Jer Noble.
No new tests, this is not possible to test in DRT.
* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::addGenericCue): Don't add completed cues to the map.
(WebCore::InbandTextTrack::removeGenericCue): Log when a cue is removed from the track.
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::InbandTextTrackPrivateAVF): Initialize m_pendingCueStatus.
(WebCore::InbandTextTrackPrivateAVF::processCue): Never call update() on a cue that is delivered
while seeking.
(WebCore::InbandTextTrackPrivateAVF::beginSeeking): Flush all incomplete cues, remember that
we are seeking.
(WebCore::InbandTextTrackPrivateAVF::resetCueValues):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seek): Call track->beginSeeking() instead of resetCueValues().
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Call track->endSeeking().
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::kind): Include class name in Kind enum values to
avoid compile error.
2013-04-26 Andreas Kling <akling@apple.com>
Remove wxWebKit from WebCore.
<http://webkit.org/b/115255>
Reviewed by Anders Carlsson.
* DerivedSources.make:
* WebCorePrefix.h:
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::port):
* config.h:
* html/HTMLFormElement.cpp:
* platform/ContextMenu.h:
(ContextMenu):
* platform/ContextMenuItem.h:
* platform/Cursor.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileSystem.h:
* platform/PlatformExportMacros.h:
* platform/PlatformKeyboardEvent.h:
(PlatformKeyboardEvent):
* platform/PlatformMenuDescription.h:
* platform/PlatformMouseEvent.h:
(PlatformMouseEvent):
* platform/PlatformWheelEvent.h:
(PlatformWheelEvent):
* platform/ScrollView.cpp:
* platform/ScrollView.h:
(ScrollView):
* platform/Widget.h:
* platform/win/SharedTimerWin.cpp:
2013-04-26 Zalan Bujtas <zalan@apple.com>
use-after-free removing a frame from its parent in a beforeload event of an OBJECT element
https://bugs.webkit.org/show_bug.cgi?id=113964
Object elements have the tendecny to modify or even fully remove
the containing Document inside beforeload callback. While Document is removed,
RenderArena gets destroyed. Retained RenderWidgets fails to function with NULL arena.
Protect RendereArena from getting wiped out, when Document is removed
during FrameView::updateWidget().
Reviewed by Antti Koivisto.
Test: fast/frames/crash-remove-iframe-during-object-beforeload.html
* dom/Document.cpp:
(WebCore::Document::attach):
* dom/Document.h:
(Document):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidgets):
* rendering/RenderArena.h:
(RenderArena):
(WebCore::RenderArena::create):
2013-04-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Optimize function and interface object length computation in bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115247
Reviewed by Kentaro Hara.
Introduce new GetFunctionLength() function that efficiently compute the length
of a function (i.e. its number of mandatory parameters).
We now call GetFunctionLength() instead of GenerateFunctionParametersCheck()
whenever we care only interested in the function length and not the actual
expression for checking the parameters. This is much more efficient as
GenerateFunctionParametersCheck() does a lot more processing than we need in
this case.
No new tests, no behavior change.
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength):
(GenerateImplementation):
(GenerateConstructorHelperMethods):
2013-04-26 Andreas Kling <akling@apple.com>
Web Audio: Remove reduplicative addInput() in AnalyserNode.
<http://webkit.org/b/115244>
From Blink r149155 by <james.wei@intel.com>:
The parent class BasicInspectorNode already called addInput() and addOutput().
So it is reduplicative to call them in AnalyserNode.
* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::AnalyserNode):
* Modules/webaudio/AudioBasicInspectorNode.cpp:
(WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
* Modules/webaudio/AudioBasicInspectorNode.h:
(AudioBasicInspectorNode):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
2013-04-26 Allan Sandfeld Jensen <allan.jensen@digia.com>
Mouseenter and mouseleave events not supported
https://bugs.webkit.org/show_bug.cgi?id=18930
Reviewed by David Hyatt.
Implements mouseenter and mouseleave events from W3C DOM Level 3 Events.
These event are already supported by all other major browsers.
To avoid performance regressions the new events are only dispatched when
there are event listeners for them.
Tests: fast/events/mouseenter-mouseleave-capture.html
fast/events/mouseenter-mouseleave.html
* bindings/scripts/CodeGenerator.pm:
* dom/Document.cpp:
(WebCore::Document::prepareMouseEvent):
(WebCore::Document::updateHoverActiveState):
* dom/Document.h:
(Document):
* dom/Document.idl:
* dom/Element.h:
(Element):
* dom/Element.idl:
* dom/EventListenerMap.cpp:
(WebCore::EventListenerMap::containsCapturing):
* dom/EventListenerMap.h:
(EventListenerMap):
* dom/EventNames.h:
* dom/EventTarget.h:
(EventTarget):
(WebCore::EventTarget::hasCapturingEventListeners):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::toElement):
(WebCore::MouseEvent::fromElement):
* html/HTMLAttributeNames.in:
* html/HTMLElement.cpp:
(WebCore::HTMLElement::eventNameForAttributeName):
* page/DOMWindow.h:
(DOMWindow):
* page/DOMWindow.idl:
* svg/SVGElement.cpp:
(WebCore::SVGElement::parseAttribute):
* svg/SVGElementInstance.h:
(SVGElementInstance):
* svg/SVGElementInstance.idl:
2013-04-26 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for Web IDL partial interfaces to the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115228
Reviewed by Kentaro Hara.
Add support for Web IDL partial interfaces to the bindings generator:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-partial-interface
Also drop support for the the WebKit-specific [Supplemental] extended
attribute and use partial interfaces instead in existing IDL files.
No new tests, no behavior change.
* Modules/battery/NavigatorBattery.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DataTransferItemFileSystem.idl:
* Modules/filesystem/HTMLInputElementFileSystem.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/NavigatorGamepad.idl:
* Modules/geolocation/NavigatorGeolocation.idl:
* Modules/indexeddb/DOMWindowIndexedDatabase.idl:
* Modules/indexeddb/WorkerContextIndexedDatabase.idl:
* Modules/mediastream/DOMWindowMediaStream.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/navigatorcontentutils/NavigatorContentUtils.idl:
* Modules/networkinfo/NavigatorNetworkInfoConnection.idl:
* Modules/notifications/DOMWindowNotifications.idl:
* Modules/notifications/WorkerContextNotifications.idl:
* Modules/quota/DOMWindowQuota.idl:
* Modules/quota/NavigatorStorageQuota.idl:
* Modules/quota/WorkerNavigatorStorageQuota.idl:
* Modules/speech/DOMWindowSpeech.idl:
* Modules/speech/DOMWindowSpeechSynthesis.idl:
* Modules/vibration/NavigatorVibration.idl:
* Modules/webaudio/DOMWindowWebAudio.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/DOMWindowWebSocket.idl:
* Modules/websockets/WorkerContextWebSocket.idl:
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parsePartialDefinition):
* bindings/scripts/generate-bindings.pl:
* bindings/scripts/preprocess-idls.pl:
(getPartialInterfaceNameFromIDLFile):
* bindings/scripts/test/TestSupplemental.idl:
* page/DOMWindowPagePopup.idl:
2013-04-25 Mihnea Ovidenie <mihnea@adobe.com>
[CSS Regions] Hit testing is broken for absolutely positioned regions that have overflow: hidden
https://bugs.webkit.org/show_bug.cgi?id=113874
Reviewed by David Hyatt.
Test: fast/regions/hit-test-abspos-overflow-region.html
When a region is an out-of-flow positioned object with an overflow clip, we need
to make sure that hit testing works also for cases other than foreground (content)
hit testing. This patch moves the previous hit testing code, that delegated foreground
hit testing to the region's flow thread hit testing, into the hitTestContent method,
now that RenderRegion is RenderBlock based.
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::hitTestContents):
* rendering/RenderRegion.h:
(RenderRegion):
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
Copy and paste can strip !important CSS rules due to a bug in mergeStyleFromRules
https://bugs.webkit.org/show_bug.cgi?id=115217
Reviewed by Darin Adler.
The bug was caused by mergeStyleFromRules overriding "important" style rules with "unimportant" inline styles.
Fixed the bug by using addParsedProperty, which respects !important, in MutableStylePropertySet's
mergeAndOverrideOnConflict, which was only used in editing code. Now that we've fixed this function, we can use
it in ViewportStyleResolver::addViewportRule as well.
Test: editing/pasteboard/copy-paste-with-important-rules.html
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict): Fixed to respect !important.
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::addViewportRule): Use mergeAndOverrideOnConflict now that the code is identical.
2013-04-25 Andreas Kling <akling@apple.com>
StylePropertySet::getPropertyShorthand() should return a String.
<http://webkit.org/b/115213>
Reviewed by Anders Carlsson.
Return a String directly from getPropertyShorthand() instead of forcing clients
to call getPropertyNameString().
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyShorthand):
* css/StylePropertySet.h:
(StylePropertySet):
2013-04-25 Chris Fleizach <cfleizach@apple.com>
WEB SPEECH: language support does not work as expected
https://bugs.webkit.org/show_bug.cgi?id=115119
Reviewed by Alexey Proskuryakov.
Make the Mac platform synthesizer have access to all the voices installed on the system.
* WebCore.exp.in:
* platform/mac/PlatformSpeechSynthesizerMac.mm:
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
2013-04-25 Chris Fleizach <cfleizach@apple.com>
<meter> element not exposed to accessibility
https://bugs.webkit.org/show_bug.cgi?id=109023
rdar://problem/13658964
Reviewed by Tim Horton.
Makes the <meter> element appear in the AX tree by reusing the
AccessibilityProgressIndicator element to handle either progress or meter
elements.
Test: accessibility/meter-element.html
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
(WebCore::AXObjectCache::getOrCreate):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):
(WebCore::AccessibilityNodeObject::visibleText):
* accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::AccessibilityProgressIndicator):
(WebCore::AccessibilityProgressIndicator::create):
(WebCore::AccessibilityProgressIndicator::valueForRange):
(WebCore::AccessibilityProgressIndicator::maxValueForRange):
(WebCore::AccessibilityProgressIndicator::minValueForRange):
(WebCore::AccessibilityProgressIndicator::progressElement):
(WebCore::AccessibilityProgressIndicator::meterElement):
* accessibility/AccessibilityProgressIndicator.h:
(AccessibilityProgressIndicator):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::firstChild):
(WebCore::AccessibilityRenderObject::lastChild):
These methods are modified to handle when there is no rendered children, but there are Node
children. The node children are desired when calculating text within a node, for example.
2013-04-25 Qiankun Miao <qiankun.miao@intel.com>
[CSS Shaders] Remove the meshType from the CustomFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=102529
Reviewed by Dean Jackson.
No new tests, no new functionality.
MeshType can be accessed from program, so remove the m_meshType
related code in CustomFilterOperation.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
* platform/graphics/filters/CustomFilterOperation.cpp:
(WebCore::CustomFilterOperation::CustomFilterOperation):
(WebCore::CustomFilterOperation::blend):
* platform/graphics/filters/CustomFilterOperation.h:
(WebCore::CustomFilterOperation::create):
(WebCore::CustomFilterOperation::meshType):
(CustomFilterOperation):
(WebCore::CustomFilterOperation::operator==):
* platform/graphics/texmap/coordinated/CoordinatedCustomFilterOperation.h:
(WebCore::CoordinatedCustomFilterOperation::CoordinatedCustomFilterOperation):
2013-04-25 Kent Tamura <tkent@chromium.org>
Ignore invalid regular expressions for input[pattern].
https://bugs.webkit.org/show_bug.cgi?id=115204
Reviewed by Darin Adler.
According to the specification, we should not proceed regular expression
matching if a pattern attribute value is an invalid regular
expression. We had a bug that invalid expressions such as
pattern=")foo(" made RegularExpression objects successfully.
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-pattern-attribute
> If an input element has a pattern attribute specified, and the
> attribute's value, when compiled as a JavaScript regular expression with
> the global, ignoreCase, and multiline flags disabled (see ECMA262
> Edition 5, sections 15.10.7.2 through 15.10.7.4), compiles successfully,
> then the resulting regular expression is the element's compiled pattern
> regular expression. If the element has no such attribute, or if the
> value doesn't compile successfully, then the element has no compiled
> pattern regular expression.
This imports a part of Blink r148951.
Tests: Update fast/forms/ValidityState-patternMismatch.html
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
Check correctness of pattern attribute value before wrapping with parentheses.
* platform/text/RegularExpression.cpp:
(WebCore::RegularExpression::isValid): Added.
* platform/text/RegularExpression.h:
(RegularExpression): Declare isValid.
2013-04-25 Antoine Quint <graouts@apple.com>
Glyphs may fail to render when using SVG font
https://bugs.webkit.org/show_bug.cgi?id=115193
Reviewed by Simon Fraser.
Calling SimpleFontData::applyTransforms() when the font used is
an SVG font makes little sense since Core Text doesn’t know or
understand SVG fonts and would be passed some other, unrelated
platform font.
* platform/graphics/SimpleFontData.h:
(WebCore::SimpleFontData::applyTransforms):
2013-04-25 Jer Noble <jer.noble@apple.com>
Media elements shouldn't resume playback when a page is restored from the back/forward cache if the WKView isn't in a window
https://bugs.webkit.org/show_bug.cgi?id=115191
Reviewed by Eric Carlson.
If a page is suspended, then resumed when its WebView or WKView has been removed from a window,
the page's media elements will unpause. Check whether media is allowed to start during resume()
via Page::canMediaStart() and if not, register for mediaCanStart notifications. Then, in
mediaCanStart() if the media is force-paused, unpause it.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::mediaCanStart):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::pageConsentRequiredForResume):
2013-04-25 Andreas Kling <akling@apple.com>
Remove ENABLE(PARSED_STYLE_SHEET_CACHING) and make it always-on.
Rubber-stamped by Anders Koivisto.
* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
2013-04-25 Patrick Gansterer <paroga@webkit.org>
Remove OS(WINCE) from AccessibilityObject.h
https://bugs.webkit.org/show_bug.cgi?id=115192
Reviewed by Andreas Kling.
Use the same files like the the other PLATFORM(WIN) ports use.
* PlatformWinCE.cmake:
* accessibility/AccessibilityObject.h:
(AccessibilityObject):
2013-04-25 Alberto Garcia <agarcia@igalia.com>
Add definition of GlyphBufferGlyph for BlackBerry
https://bugs.webkit.org/show_bug.cgi?id=115183
Reviewed by Xan Lopez.
BlackBerry uses an unsigned int.
* platform/graphics/GlyphBuffer.h:
(WebCore):
2013-04-25 Joseph Pecoraro <pecoraro@apple.com>
ScriptExecutionContext log exception should include a column number
https://bugs.webkit.org/show_bug.cgi?id=114315
Reviewed by Oliver Hunt.
Test: inspector/console/console-exception-stack-traces.html
* bindings/js/ScriptCallStackFactory.h:
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):
Generate a ScriptCallStack from an exception. Use the vm.exceptionStack
if available, and fallback to the exception object where needed.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
Always include a non-empty call stack with exceptions.
Where not provided, fallback to the exception object.
* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::PendingException::PendingException):
(ScriptExecutionContext::PendingException):
(WebCore::ScriptExecutionContext::reportException):
* workers/DefaultSharedWorkerRepository.cpp:
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/SharedWorkerContext.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::performTask):
Plumb columnNumber through as needed.
2013-04-25 Gregg Tavares <gman@chromium.org>
Fix build files so WebGLDebugXXX extensions can be used if enabled.
https://bugs.webkit.org/show_bug.cgi?id=113976
Reviewed by Dean Jackson.
No new tests as no new functionality.
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
cloneChildNodes looks for deleteButtonController in each level of recursion
https://bugs.webkit.org/show_bug.cgi?id=115146
Reviewed by Andreas Kling.
Obtain the delete button controller upfront, and shallow copy descendents of each child
so that we don't look for the delete button controller inside cloneNode called on each child.
Performance Tests: DOM/CloneNodes.html
* dom/ContainerNode.cpp:
(WebCore::cloneChildNodesAvoidingDeleteButon): Extracted.
(WebCore::ContainerNode::cloneChildNodes):
2013-04-25 Ryosuke Niwa <rniwa@webkit.org>
HTMLOptionsCollection's namedItem and name getter should return the first item
https://bugs.webkit.org/show_bug.cgi?id=115150
Reviewed by Andreas Kling.
Following the resolution in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038355.html,
the spefication has been updated to only return the first item when there are multiple items of the same name
in HTMLOptionsCollection; this new behavior matches that of Firefox and Opera (Presto).
Implement this new behavior to remove the custom binding code and use the fast path in namedItem and name
getter of HTMLOptionsCollection. (Obtaining all items for a given name is expensive!).
Tests: fast/dom/HTMLSelectElement/named-options.html
fast/dom/html-collections-named-getter.html
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore): Removed the custom bindings for name getter and namedItem.
* html/HTMLOptionsCollection.idl:
2013-04-25 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ConsoleMessage should include line and column number where possible
https://bugs.webkit.org/show_bug.cgi?id=114929
- adds "m_column" to WebCore::ConsoleMessage
- adds "column" to Console.ConsoleMessage in the inspector protocol
- set the column number for console.* functions (Console.cpp)
- set the column number for XSLT errors (XSLTProcessor)
- plumb columnNumber everywhere else it is needed, set it to 0 and file
bugs for all cases missing columnNumber that could provide it.
Reviewed by Timothy Hatcher.
Test: inspector/console/console-url-line-column.html
inspector/console/console-messages-stack-traces.html
* inspector/ConsoleMessage.h:
* inspector/ConsoleMessage.cpp:
(WebCore::ConsoleMessage::ConsoleMessage):
(WebCore::ConsoleMessage::autogenerateMetadata):
(WebCore::ConsoleMessage::addToFrontend):
(WebCore::ConsoleMessage::isEqual):
Add m_column and set it where appropriate.
* inspector/Inspector.json:
Add column property to Console.ConsoleMessage.
* page/Console.cpp:
(WebCore::internalAddMessage):
(WebCore::Console::profile):
Set columnNumber like lineNumber from the last stack frame.
(WebCore::Console::groupEnd):
Line and column are unused in this message type, set both to 0.
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::XSLTProcessor::parseErrorFunc):
* xml/XSLTProcessorQt.cpp:
(WebCore::XSLTMessageHandler::handleMessage):
Add real column numbers, the XSLT handlers already had it available.
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/ScriptExecutionContext.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::addConsoleMessage):
* dom/Document.cpp:
(WebCore::Document::logExceptionToConsole):
(WebCore::Document::addMessage):
* dom/Document.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::addMessageToConsole):
(WebCore::InspectorConsoleAgent::stopTiming):
(WebCore::InspectorConsoleAgent::didFinishXHRLoading):
(WebCore::InspectorConsoleAgent::didReceiveResponse):
(WebCore::InspectorConsoleAgent::didFailLoading):
* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleInstrumentation.h:
(WebCore::InspectorInstrumentation::addMessageToConsole):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
(WebCore::InspectorInstrumentation::addProfileImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::addProfile):
(WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
(WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
(WebCore::InspectorProfilerAgent::start):
(WebCore::InspectorProfilerAgent::stop):
* inspector/InspectorProfilerAgent.h:
(InspectorProfilerAgent):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::addMessageToConsole):
* page/ChromeClient.h:
(WebCore::ChromeClient::addMessageToConsole):
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::logToConsole):
* page/PageConsole.cpp:
(WebCore::PageConsole::addMessage):
* page/PageConsole.h:
* workers/DefaultSharedWorkerRepository.cpp:
(SharedWorkerProxy):
(WebCore::postExceptionTask):
(WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
* workers/SharedWorkerContext.cpp:
(WebCore::SharedWorkerContext::logExceptionToConsole):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::logExceptionToConsole):
(WebCore::WorkerContext::addConsoleMessage):
(WebCore::WorkerContext::addMessage):
(WebCore::WorkerContext::addMessageToWorkerConsole):
* workers/WorkerContext.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerExceptionTask::create):
(WebCore::WorkerExceptionTask::WorkerExceptionTask):
(WebCore::WorkerExceptionTask::performTask):
(WorkerExceptionTask):
(WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
(WebCore::postConsoleMessageTask):
(WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
* workers/WorkerMessagingProxy.h:
(WorkerMessagingProxy):
* workers/WorkerReportingProxy.h:
(WorkerReportingProxy):
Plumb columnNumber through where appropriate. File bugs where missing.
2013-04-25 Allan Sandfeld Jensen <allan.jensen@digia.com>
[Qt] Animated opacity does not trigger accelerated compositing
https://bugs.webkit.org/show_bug.cgi?id=115107
Reviewed by Simon Fraser.
Add extra option to also trigger compositing on animated opacity.
* page/ChromeClient.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2013-04-25 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
Sec-WebSocket-Extensions header field must not appear more than once in an HTTP response.
https://bugs.webkit.org/show_bug.cgi?id=115128
Reviewed by Alexey Proskuryakov.
According to WebSocket specification Sec-WebSocket-Extensions header field
must not appear more than once in an HTTP response. It is ok if it appears
more than once in client request. Also add a check for invalid UTF-8
characters when parsing Sec-WebSocket-Extensions quoted string.
Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header.html
* Modules/websockets/WebSocketExtensionParser.cpp:
(WebCore::WebSocketExtensionParser::consumeQuotedString): Return false if there is
invalid character in the quoted string being parsed.
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readHTTPHeaders): Check if Sec-WebSocket-Extensions
appears more than once in header response. Abort handshake if it does.
2013-04-25 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
REGRESSION(r148758): Remove WTFLogAlways call from IconLoader.
https://bugs.webkit.org/show_bug.cgi?id=115182
Reviewed by Dan Bernstein.
The call added in r148758 was apparently a leftover from some debugging
session, and it makes the Interactive/window-resize.html performance
test randomly fail on Qt and EFL due to WTFLogAlways writing to stderr.
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished):
2013-04-25 Christophe Dumez <ch.dumez@sisa.samsung.com>
Add support for Web IDL callback interfaces to the bindings generator
https://bugs.webkit.org/show_bug.cgi?id=115179
Reviewed by Kentaro Hara.
Add support in the bindings generator for Web IDL callback interfaces:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-callback-interface
Drop support for the WebKit-specific [Callback] extended attributes
on Web IDL interfaces and update existing IDL files to use proper
callback interfaces instead.
No new tests, no behavior change.
* Modules/filesystem/EntriesCallback.idl:
* Modules/filesystem/EntryCallback.idl:
* Modules/filesystem/ErrorCallback.idl:
* Modules/filesystem/FileCallback.idl:
* Modules/filesystem/FileSystemCallback.idl:
* Modules/filesystem/FileWriterCallback.idl:
* Modules/filesystem/MetadataCallback.idl:
* Modules/geolocation/PositionCallback.idl:
* Modules/geolocation/PositionErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaErrorCallback.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/RTCErrorCallback.idl:
* Modules/mediastream/RTCSessionDescriptionCallback.idl:
* Modules/mediastream/RTCStatsCallback.idl:
* Modules/notifications/NotificationPermissionCallback.idl:
* Modules/quota/StorageErrorCallback.idl:
* Modules/quota/StorageQuotaCallback.idl:
* Modules/quota/StorageUsageCallback.idl:
* Modules/webaudio/AudioBufferCallback.idl:
* Modules/webdatabase/DatabaseCallback.idl:
* Modules/webdatabase/SQLStatementCallback.idl:
* Modules/webdatabase/SQLStatementErrorCallback.idl:
* Modules/webdatabase/SQLTransactionCallback.idl:
* Modules/webdatabase/SQLTransactionErrorCallback.idl:
* Modules/webdatabase/SQLTransactionSyncCallback.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateInterface):
* bindings/scripts/IDLParser.pm:
(parseCallbackRestOrInterface):
* bindings/scripts/test/TestCallback.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/StringCallback.idl:
* html/VoidCallback.idl:
2013-04-25 Adrian Perez de Castro <aperez@igalia.com>
[GStreamer] Add audio/speex MIME type as supported
https://bugs.webkit.org/show_bug.cgi?id=115032
Reviewed by Philippe Normand.
GStreamer has support for the Speex codec (http://www.speex.org).
Speex streams may be embedded in a Ogg container, or standalone.
The case of the Ogg container is already covered by the "*/ogg"
MIME types declared as supported by the GStreamer media playing
code, but for standalone streams to work, "audio/speex" has to
be added.
With this, and the needed GStreamer plugin installed, the GTK+
launcher is able to correctly play Speex streams served with
"Content-type: audio/speex".
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2013-04-25 Andreas Kling <akling@apple.com>
Add FINAL decorators to the InlineBox class hierarchy.
<http://webkit.org/b/115177>
Reviewed by Antti Koivisto.
From Blink r148628 by <cevans@chromium.org>:
FINAL is a macro in wtf/Compiler.h that does the correct thing if the compiler does not support "final")
The approach used is as simple as possible whilst being thorough.
So, leaf classes have FINAL applied to the whole class whereas intermediary classes have FINAL applied to relevant methods.
FINAL allows a compiler to devirtualize call sites and turn them into direct calls. As you might expect, this is perf positive:
(clang on Linux):
- line_layout.html goes from 120 runs/s -> 123 runs/2, +2.5%
- html5-full-render.html goes from 3176ms -> 3162ms, +0.4%
I have confidence that the former result is statistically significant (as the numbers are very very stable) but not the latter.
* rendering/EllipsisBox.h:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
* rendering/RootInlineBox.h:
* rendering/TrailingFloatsRootInlineBox.h:
* rendering/svg/SVGInlineFlowBox.h:
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGRootInlineBox.h:
2013-04-25 Andreas Kling <akling@apple.com>
CSS parser: Add error recovery while parsing @-webkit-keyframes key values.
<http://webkit.org/b/115175>
From Blink r148714 by <apavlov@chromium.org>:
If not a percentage, "from", or "to" value is used in a key list, the rule is erroneous,
and due to the absense of recovery, the parser skips the following, valid CSS rule.
On a related note, keyframes, whose selectors contain invalid keys, should be discarded
altogether, according to <http://www.w3.org/TR/css3-animations/#keyframes>
Tests: animations/keyframes-invalid-keys.html
fast/css/webkit-keyframes-errors.html
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiers):
2013-04-25 Antti Koivisto <antti@apple.com>
REGRESSION (r147797): Animations slideshows of images on www.thesuperficial.com are slow
https://bugs.webkit.org/show_bug.cgi?id=115172
Reviewed by Andreas Kling.
On this page ads dynamically loaded to subframes on slideshow navigation switch us to state where we throttle layer flushes.
Fix by ignoring any subframe-originated loads when determining throttling.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadProgressingStatusChanged):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::isMainLoadProgressing):
Rename, ignore subframe originated loads. Subframe loads that are initiated during the main load still count.
* loader/ProgressTracker.h:
(ProgressTracker):
* page/FrameView.cpp:
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
* page/FrameView.h:
(FrameView):
* rendering/RenderLayerBacking.cpp:
(WebCore::computeTileCoverage):
2013-04-25 Andreas Kling <akling@apple.com>
SVG: Fix viewBox animations on shapes with non-scaling-stroke.
<http://webkit.org/b/115173>
From Blink r149058 by <pdr@chromium.org>:
Previously hasAttribute() to determine if a viewBox was set in the transform
code for non-scaling-strokes. hasAttribute() should not be used in this case,
as it will return false if the attribute is not set but the value is animating.
This patch switches to checking if the viewBox is empty instead of checking for
the presence of the attribute.
Test: svg/stroke/animated-non-scaling-stroke.html
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::localCoordinateSpaceTransform):
* svg/SVGSVGElement.h:
(WebCore::SVGSVGElement::hasEmptyViewBox):
2013-04-25 Andreas Kling <akling@apple.com>
Remove isPluginElement hack in Document::setFocusedNode()
<http://webkit.org/b/115171>
From Blink r148800 by <tkent@chromium.org>:
This hack is no longer necessary because r147591 made isFocusable for plugin
elements work correctly.
* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
2013-04-25 Per-Erik Brodin <per-erik.brodin@ericsson.com>
EventSource: Synchronous loader callback not handled properly
https://bugs.webkit.org/show_bug.cgi?id=115104
When attempting a cross-origin request towards a non-HTTP URL, an early verification
of the protocol scheme will cause didFailAccessControlCheck to be called synchronously
before the loader has even finished being created. This special case was not handled
properly, since we tried to cancel a non-existing loader, which resulted in a crash.
In addition to checking whether a request is in flight before trying to cancel it,
this change also schedules the initial creation of the loader to happen asynchronously
when an EventSource is constructed, so that a script can register for the error event
before it is dispatched (as a result of passing a non-HTTP URL to the constructor).
Reviewed by Alexey Proskuryakov.
Test: http/tests/eventsource/eventsource-cors-non-http.html
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
(WebCore::EventSource::create):
(WebCore::EventSource::scheduleInitialConnect):
(WebCore):
(WebCore::EventSource::scheduleReconnect):
(WebCore::EventSource::connectTimerFired):
(WebCore::EventSource::close):
(WebCore::EventSource::abortConnectionAttempt):
* page/EventSource.h:
(EventSource):
2013-04-25 Patrick Gansterer <paroga@webkit.org>
Unreviewed WinCE build fix after r148545.
* page/wince/FrameWinCE.cpp:
2013-04-24 Kent Tamura <tkent@chromium.org>
Back references don't work in pattern attribute
https://bugs.webkit.org/show_bug.cgi?id=105875
Reviewed by Geoffrey Garen.
This imports a part of Blink r148951.
Tests: Update fast/forms/ValidityState-patternMismatch.html
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
Don't use capturing parentheses. They affected back references in
pattern attribute values.
2013-04-24 Tim Horton <timothy_horton@apple.com>
PDFPlugin: Cursor should become an i-beam when over selectable text
https://bugs.webkit.org/show_bug.cgi?id=115018
<rdar://problem/12645012>
Reviewed by Alexey Proskuryakov.
* WebCore.exp.in: Export the I-beam and arrow cursors.
2013-04-24 Simon Fraser <simon.fraser@apple.com>
Garbage at the top of http://www.technologyreview.com after scrolling
https://bugs.webkit.org/show_bug.cgi?id=114825
Reviewed by Tim Horton.
Garbage pixels are caused by GraphicsLayerCA setting a layer to be opaque,
but then not painting anything into it. On this page, the element is
toggled to be visibility:hidden on scrolling, but RenderLayer::backgroundIsKnownToBeOpaqueInRect()
failed to consider that as something that can cause backgrounds not to be opaque.
For the bug to happen, some subtle interactions with r142012 come into play
for the layer to remain visible, hence the slightly complex testcase.
Test: compositing/contents-opaque/visibility-hidden.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2013-04-24 Simon Fraser <simon.fraser@apple.com>
Dump layer opaqueness in the Compositing log output
https://bugs.webkit.org/show_bug.cgi?id=115132
Reviewed by Tim Horton.
It's useful to see whether we consider layers to be opaque in the Compositing
log channel output, so dump it.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
2013-04-24 Seokju Kwon <seokju.kwon@gmail.com>
Add efl to JSInspectorFrontendHost::port()
https://bugs.webkit.org/show_bug.cgi?id=115137
Reviewed by Timothy Hatcher.
No new tests, because there is no change in behavior.
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::port):
2013-04-24 Kangil Han <kangil.han@samsung.com>
Function parameter quotePair can be passed by reference
https://bugs.webkit.org/show_bug.cgi?id=115089
Reviewed by Alexey Proskuryakov.
Minor performance patch.
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::addPair):
* rendering/style/QuotesData.h:
(QuotesData):
2013-04-24 Brady Eidson <beidson@apple.com>
Implementors of CachedResource subclasses should be forced to decide if encoded data can be replaced.
https://bugs.webkit.org/show_bug.cgi?id=115140
Reviewed by Beth Dakin.
No new tests (No behavior change).
This makes mayTryReplaceEncodedData() return false in CachedResource, but overrides to true
in all CachedResource subclasses besides CachedFont (which already has an implementation).
* loader/cache/CachedCSSStyleSheet.h:
* loader/cache/CachedImage.h:
* loader/cache/CachedRawResource.h:
* loader/cache/CachedResource.h:
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedScript.h:
* loader/cache/CachedShader.h:
* loader/cache/CachedTextTrack.h:
* loader/cache/CachedXSLStyleSheet.h:
2013-04-24 Brady Eidson <beidson@apple.com>
Once a custom font is cached to disk, it starts failing to render until the page is refreshed.
<rdar://problem/13622998> and https://bugs.webkit.org/show_bug.cgi?id=115131
Reviewed by Alexey Proskuryakov.
No new tests (Not a tested config, nor are disk cache issues currently testable).
* loader/cache/CachedResource.h:
(WebCore::CachedResource:: mayTryReplaceEncodedData): Allow subclasses to refuse encoded data replacement.
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::tryReplaceEncodedData): Only try if shouldTryReplaceEncodedData() is true.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::CachedFont):
(WebCore::CachedFont::ensureCustomFontData):
(WebCore::CachedFont::mayTryReplaceEncodedData): Return false if the custom font data has ever been created.
* loader/cache/CachedFont.h:
2013-04-24 Beth Dakin <bdakin@apple.com>
Vertical overlay scrollbar in iframes fades in and out rapidly when you scroll in
a circle
https://bugs.webkit.org/show_bug.cgi?id=115124
-and corresponding-
<rdar://problem/13168957>
Reviewed by Anders Carlsson.
With http://trac.webkit.org/changeset/119834 we started calling
ScrollbarPainterController's contentAreaScrolled/contentAreaScrolledInDirection
API on a zero-delay timer instead of calling it right away. This prevented some
crashes that we saw whenever this was called during a layout. However, that delay,
combined with the particulars of contentAreaScrolledInDirection cause this bug
where sometimes the scrollbars in an iframe will fade out very noticeably when
scrolling in a circle.
This change makes it so we will only use the zero-delay timer if the
ScrollableArea is not currently handling a wheel event. If it IS handling a wheel
event, then we will send the notifications to AppKit right away. I confirmed that
this change did not reintroduce the old crashes.
Keep track of whether we are currently handling a wheel event with the new member
variable m_isHandlingWheelEvent.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):
(WebCore::EventHandler::handleWheelEvent):
* page/EventHandler.h:
(WebCore::EventHandler::isHandlingWheelEvent):
(EventHandler):
To prevent layering violations, the ScrollableArea sub-classes will have to access
this information from the EventHandler.
* page/FrameView.cpp:
(WebCore::FrameView::isHandlingWheelEvent):
* page/FrameView.h:
* platform/ScrollableArea.h:
(WebCore::ScrollableArea::isHandlingWheelEvent):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::isHandlingWheelEvent):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::isHandlingWheelEvent):
* rendering/RenderListBox.h:
sendContentAreaScrolledSoon() can be private. Also add new function
sendContentAreaScrolled().
* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
If the ScrollableArea is handling a wheel event, call
sendContentAreaScrolled(), otherwise call sendContentAreaScrolledSoon()
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::sendContentAreaScrolled):
Re-factored to use sendContentAreaScrolled()
(WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
2013-04-24 Ryosuke Niwa <rniwa@webkit.org>
Fix a merge error in r149007 (was missing a null check added in r148777).
* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::containingBlockForAbsolutePosition):
2013-04-24 Otto Derek Cheung <otcheung@rim.com>
Battery API won't return updated battery status until client calls didChangeBatteryStatus
https://bugs.webkit.org/show_bug.cgi?id=114891
Reviewed by Rob Buis.
The BatteryStatus object in BatteryManager won't get updated until BatteryClient calls
didChangeBatteryStatus in BatteryController. Any attempts to call webkitBattery.charged()
or other get functions will always return the default values until the next battery status
change object gets passed to the controller.
We need to update the manager when we attach it to the controller, and update all
existing managers when the controller receives it's first battery status object.
* Modules/battery/BatteryController.cpp:
(WebCore::BatteryController::addListener):
(WebCore::BatteryController::updateBatteryStatus):
* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::didChangeBatteryStatus):
(WebCore::BatteryManager::updateBatteryStatus):
(WebCore):
* Modules/battery/BatteryManager.h:
(BatteryManager):
2013-04-24 Jacky Jiang <zhajiang@blackberry.com>
Clean up unused code in ViewportArguments.h
https://bugs.webkit.org/show_bug.cgi?id=115121
Reviewed by Benjamin Poulain.
The target-densityDPI emulation implementation has been removed by
r147893, so clean up the remaining code as well.
* dom/ViewportArguments.h:
2013-04-24 Andreas Kling <akling@apple.com>
ElementData should use 'unsigned' attribute indices.
<http://webkit.org/b/115103>
Reviewed by Antti Koivisto.
Switch to using 'unsigned' for attribute indices. This gives consistent behavior
on 32/64-bit, and the underlying storage is already limited by Vector's 32-bit capacity.
Added an ElementData::attributeNotFound constant (-1) since we can't use WTF::notFound.
* dom/Element.cpp:
(WebCore::Element::detachAttribute):
(WebCore::Element::removeAttribute):
(WebCore::Element::setAttribute):
(WebCore::Element::setSynchronizedLazyAttribute):
(WebCore::Element::setAttributeInternal):
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::Element::removeAttributeInternal):
(WebCore::UniqueElementData::removeAttribute):
(WebCore::ElementData::getAttributeItemIndexSlowCase):
* dom/Element.h:
(ElementData):
(UniqueElementData):
(Element):
(WebCore::Element::getAttributeItemIndex):
(WebCore::Element::attributeCount):
(WebCore::ElementData::length):
(WebCore::ElementData::getAttributeItem):
(WebCore::ElementData::getAttributeItemIndex):
* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
(WebCore::NamedNodeMap::length):
* dom/NamedNodeMap.h:
(NamedNodeMap):
2013-04-24 Andreas Kling <akling@apple.com>
ElementData::attributeItem() should bounds-check the index.
<http://webkit.org/b/115076>
Reviewed by Antti Koivisto.
Switch the ASSERT_WITH_SECURITY_IMPLICATION to a RELEASE_ASSERT.
* dom/Element.h:
(WebCore::ElementData::attributeItem):
2013-04-23 Andreas Kling <akling@apple.com>
Setting an inline style property to "" shouldn't cause style recalc unless the property was present.
<http://webkit.org/b/115122>
Reviewed by Antti Koivisto.
StylePropertySet::setProperty() handles empty strings by removing the property entirely.
If there was no property to remove, it shouldn't claim that it changed something, as that
will cause the CSSOM wrapper to mark the element for style recalc.
A common idiom that triggers this is excessive use of { element.style.display = ''; }
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
2013-04-23 Ryosuke Niwa <rniwa@webkit.org>
Moving word boundaries backwards fails when there is a text node starting with an apostrophe
https://bugs.webkit.org/show_bug.cgi?id=115070
Reviewed by Alexey Proskuryakov.
The bug was caused by previousBoundary erroneously assuming that we don't need any more context if a word
boundary is found at the beginning of a string. For example, when "I'll" is split into two text nodes,
"I" and "'ll", there is a word boundary between "'" and "ll" in "'ll" so we need to examine the whole "I'll".
Fixed the bug by obtaining more context when the character starts exactly at offset 1 in a text node to
work around this bug. In the long term, we probably need to provide Foundation of the entire context since in
languages like Hebrew and some of European languages, there could be many accents and combining characters
between split into multiple text nodes as one variant is seen in the newly added test case.
Test: editing/selection/previous-word-boundary-across-text-nodes.html
* editing/VisibleUnits.cpp:
(WebCore::previousBoundary):
2013-04-24 Benjamin Poulain <bpoulain@apple.com>
Do not use static string in DiagnosticLoggingKeys
https://bugs.webkit.org/show_bug.cgi?id=115093
Reviewed by Andreas Kling.
The code is not hot enough to justify keeping the memory around.
This removes 3kb from the binary on x86_64.
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mediaLoadedKey):
(WebCore::DiagnosticLoggingKeys::mediaLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadedKey):
(WebCore::DiagnosticLoggingKeys::pluginLoadingFailedKey):
(WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
(WebCore::DiagnosticLoggingKeys::pageContainsMediaEngineKey):
(WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey):
(WebCore::DiagnosticLoggingKeys::passKey):
(WebCore::DiagnosticLoggingKeys::failKey):
(WebCore::DiagnosticLoggingKeys::noopKey):
* page/DiagnosticLoggingKeys.h:
(DiagnosticLoggingKeys):
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Remove wxWebKit #ifdefs from WebCore/platform/graphics
https://bugs.webkit.org/show_bug.cgi?id=115081
Reviewed by Geoffrey Garen.
* platform/graphics/BitmapImage.h:
(BitmapImage):
* platform/graphics/Color.h:
(Color):
* platform/graphics/FloatRect.h:
(FloatRect):
* platform/graphics/FloatSize.h:
(FloatSize):
* platform/graphics/FontPlatformData.h:
* platform/graphics/GlyphBuffer.h:
(WebCore):
(WebCore::GlyphBuffer::glyphAt):
(WebCore::GlyphBuffer::add):
* platform/graphics/Gradient.h:
* platform/graphics/GraphicsContext.h:
(GraphicsContext):
* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/ImageBufferData.h:
* platform/graphics/IntPoint.h:
(IntPoint):
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
(IntSize):
* platform/graphics/NativeImagePtr.h:
(WebCore):
* platform/graphics/Path.h:
* platform/graphics/Pattern.h:
* platform/graphics/SimpleFontData.h:
(SimpleFontData):
(WebCore::SimpleFontData::widthForGlyph):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::collectComplexTextRuns):
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
* platform/graphics/transforms/AffineTransform.h:
(AffineTransform):
* platform/graphics/transforms/TransformationMatrix.h:
(TransformationMatrix):
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Remove wxWebKit #ifdefs from WebCore/plugins
https://bugs.webkit.org/show_bug.cgi?id=115080
Reviewed by Geoffrey Garen.
* plugins/PluginView.h:
(PluginView):
* plugins/mac/PluginViewMac.mm:
(WebCore::nativeWindowFor):
(WebCore::cgHandleFor):
(WebCore::topLevelOffsetFor):
(WebCore::PluginView::platformStart):
* plugins/win/PluginViewWin.cpp:
(windowHandleForPageClient):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::snapshot):
2013-04-24 Benjamin Poulain <benjamin@webkit.org>
Remove wxWebKit #ifdefs from WebCore/page
https://bugs.webkit.org/show_bug.cgi?id=115079
Reviewed by Geoffrey Garen.
* page/FrameView.cpp:
(WebCore::FrameView::wheelEvent):
* page/Settings.cpp:
(WebCore):
* page/Settings.h:
(Settings):
2013-04-24 Chris Fleizach <cfleizach@apple.com>
AX: WAI-ARIA landmarks no longer speak type of landmark on iOS
https://bugs.webkit.org/show_bug.cgi?id=114547
Reviewed by David Kilzer.
We want iOS to speak the landmark type.
I've moved the landmark role description to the base Mac class and exposed
these localized strings to iOS (the ones used to return landmark descriptions).
I've also updated the accessibilityLabel to account for landmark type, but also
handle multiple label sources more gracefully by appending commas, which changed a few
tests in minor ways.
Test: platform/iphone-simulator/accessibility/landmark-type.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityLabel]):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase ariaLandmarkRoleDescription]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore):
(WebCore::AXButtonActionVerb):
(WebCore::AXRadioButtonActionVerb):
(WebCore::AXTextFieldActionVerb):
(WebCore::AXCheckedCheckBoxActionVerb):
(WebCore::AXUncheckedCheckBoxActionVerb):
(WebCore::AXLinkActionVerb):
(WebCore::AXMenuListPopupActionVerb):
(WebCore::AXMenuListActionVerb):
* platform/LocalizedStrings.h:
(WebCore):
2013-04-24 Andreas Kling <akling@apple.com>
CSS attribute selectors cause unnecessary style recalc when setting attribute to same value.
<http://webkit.org/b/115116>
<rdar://problem/13727709>
Reviewed by Simon Fraser.
The logic that dirties the style if there's a relevant attribute selector in the document
shouldn't run if the attribute is being overwritten with an identical value.
Move this into willModifyAttribute() instead, since we need access to both the old and the new value.
This reduces unnecessary style recalculation in Mac App Store content.
* dom/Element.cpp:
(WebCore::Element::attributeChanged):
(WebCore::Element::willModifyAttribute):
2013-04-24 Jonathan Feldstein <jfeldstein@blackberry.com>
[BlackBerry] Fixes the San Angeles demo on khronos.org
https://bugs.webkit.org/show_bug.cgi?id=115106
Reviewed by Rob Buis
Internally Reviewed by Jeremy Nicholl and Arvid Nilsson
Fixes a bug in which the currently bound vertex array object's vertex array
state was being modified as opposed to the default vertex array state.
* platform/graphics/blackberry/EGLImageLayerWebKitThread.cpp:
(EGLImageLayerWebKitThread::blitToFrontBuffer):
2013-04-24 Nico Weber <thakis@chromium.org>
Fold RenderThemeMacShared into RenderThemeMac
https://bugs.webkit.org/show_bug.cgi?id=115086
Reviewed by Anders Carlsson.
No intended functionality change.
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderThemeMac.h:
(RenderThemeMac):
(WebCore::RenderThemeMac::supportsControlTints):
(WebCore::RenderThemeMac::scrollbarControlSizeForPart):
(WebCore::RenderThemeMac::supportsSelectionForegroundColors):
(WebCore::RenderThemeMac::supportsClosedCaptioning):
(WebCore::RenderThemeMac::updateActiveState):
* rendering/RenderThemeMac.mm:
(-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]):
(-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
(-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::~RenderThemeMac):
(WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor):
(WebCore):
(WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor):
(WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor):
(WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor):
(WebCore::RenderThemeMac::platformFocusRingColor):
(WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor):
(WebCore::toFontWeight):
(WebCore::RenderThemeMac::systemFont):
(WebCore::convertNSColorToColor):
(WebCore::menuBackgroundColor):
(WebCore::RenderThemeMac::platformColorsDidChange):
(WebCore::RenderThemeMac::systemColor):
(WebCore::RenderThemeMac::usesTestModeFocusRingColor):
(WebCore::RenderThemeMac::isControlStyled):
(WebCore::RenderThemeMac::adjustRepaintRect):
(WebCore::RenderThemeMac::inflateRect):
(WebCore::RenderThemeMac::convertToPaintingRect):
(WebCore::RenderThemeMac::updateCheckedState):
(WebCore::RenderThemeMac::updateEnabledState):
(WebCore::RenderThemeMac::updateFocusedState):
(WebCore::RenderThemeMac::updatePressedState):
(WebCore::RenderThemeMac::controlSupportsTints):
(WebCore::RenderThemeMac::controlSizeForFont):
(WebCore::RenderThemeMac::setControlSize):
(WebCore::RenderThemeMac::sizeForFont):
(WebCore::RenderThemeMac::sizeForSystemFont):
(WebCore::RenderThemeMac::setSizeFromFont):
(WebCore::RenderThemeMac::setFontFromControlSize):
(WebCore::RenderThemeMac::controlSizeForSystemFont):
(WebCore::RenderThemeMac::paintTextField):
(WebCore::RenderThemeMac::adjustTextFieldStyle):
(WebCore::RenderThemeMac::paintCapsLockIndicator):
(WebCore::RenderThemeMac::paintTextArea):
(WebCore::RenderThemeMac::adjustTextAreaStyle):
(WebCore::RenderThemeMac::popupButtonMargins):
(WebCore::RenderThemeMac::popupButtonSizes):
(WebCore::RenderThemeMac::popupButtonPadding):
(WebCore::RenderThemeMac::paintMenuList):
(WebCore::RenderThemeMac::meterSizeForBounds):
(WebCore::RenderThemeMac::paintMeter):
(WebCore::RenderThemeMac::supportsMeter):
(WebCore::RenderThemeMac::levelIndicatorStyleFor):
(WebCore::RenderThemeMac::levelIndicatorFor):
(WebCore::RenderThemeMac::progressBarSizes):
(WebCore::RenderThemeMac::progressBarMargins):
(WebCore::RenderThemeMac::minimumProgressBarHeight):
(WebCore::RenderThemeMac::animationRepeatIntervalForProgressBar):
(WebCore::RenderThemeMac::animationDurationForProgressBar):
(WebCore::RenderThemeMac::adjustProgressBarStyle):
(WebCore::RenderThemeMac::paintProgressBar):
(WebCore::TopGradientInterpolate):
(WebCore::BottomGradientInterpolate):
(WebCore::MainGradientInterpolate):
(WebCore::TrackGradientInterpolate):
(WebCore::RenderThemeMac::paintMenuListButtonGradients):
(WebCore::RenderThemeMac::paintMenuListButton):
(WebCore::menuListButtonSizes):
(WebCore::RenderThemeMac::adjustMenuListStyle):
(WebCore::RenderThemeMac::popupInternalPaddingLeft):
(WebCore::RenderThemeMac::popupInternalPaddingRight):
(WebCore::RenderThemeMac::popupInternalPaddingTop):
(WebCore::RenderThemeMac::popupInternalPaddingBottom):
(WebCore::RenderThemeMac::adjustMenuListButtonStyle):
(WebCore::RenderThemeMac::setPopupButtonCellState):
(WebCore::RenderThemeMac::menuListSizes):
(WebCore::RenderThemeMac::minimumMenuListSize):
(WebCore::RenderThemeMac::adjustSliderTrackStyle):
(WebCore::RenderThemeMac::paintSliderTrack):
(WebCore::RenderThemeMac::adjustSliderThumbStyle):
(WebCore::RenderThemeMac::paintSliderThumb):
(WebCore::RenderThemeMac::paintSearchField):
(WebCore::RenderThemeMac::setSearchCellState):
(WebCore::RenderThemeMac::searchFieldSizes):
(WebCore::RenderThemeMac::setSearchFieldSize):
(WebCore::RenderThemeMac::adjustSearchFieldStyle):
(WebCore::RenderThemeMac::paintSearchFieldCancelButton):
(WebCore::RenderThemeMac::cancelButtonSizes):
(WebCore::RenderThemeMac::adjustSearchFieldCancelButtonStyle):
(WebCore::RenderThemeMac::resultsButtonSizes):
(WebCore::RenderThemeMac::adjustSearchFieldDecorationStyle):
(WebCore::RenderThemeMac::paintSearchFieldDecoration):
(WebCore::RenderThemeMac::adjustSearchFieldResultsDecorationStyle):
(WebCore::RenderThemeMac::paintSearchFieldResultsDecoration):
(WebCore::RenderThemeMac::adjustSearchFieldResultsButtonStyle):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):
(WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
(WebCore::RenderThemeMac::sliderTickSize):
(WebCore::RenderThemeMac::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeMac::adjustSliderThumbSize):
(WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
(WebCore::RenderThemeMac::popupButton):
(WebCore::RenderThemeMac::search):
(WebCore::RenderThemeMac::searchMenuTemplate):
(WebCore::RenderThemeMac::sliderThumbHorizontal):
(WebCore::RenderThemeMac::sliderThumbVertical):
(WebCore::RenderThemeMac::textField):
(WebCore::RenderThemeMac::fileListNameForWidth):
* rendering/RenderThemeMacShared.h: Removed.
* rendering/RenderThemeMacShared.mm: Removed.
2013-04-24 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Visible rect doesn't update after resizing a window.
https://bugs.webkit.org/show_bug.cgi?id=115096
Reviewed by Gustavo Noronha Silva.
Once we set actor's a clip rect, we should update the rect when resizing the actor.
No new tests since no new functionality.
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::setSize):
2013-04-24 ChangSeok Oh <changseok.oh@collabora.com>
[GTK][AC] Fix unexpected clear of ClutterContent.
https://bugs.webkit.org/show_bug.cgi?id=115099
Reviewed by Gustavo Noronha Silva.
adoptGRef doesn't increase a reference count. So if a actor has a valid ClutterContent,
it would be cleared unexpectedly by smart pointer when escaping a function.
No new tests, no functionality changed.
* platform/graphics/clutter/GraphicsLayerActor.cpp:
(graphicsLayerActorUpdateTexture):
2013-04-24 Alberto Garcia <agarcia@igalia.com>
DOMFileSystemBase: fix multiple definitions in the BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=114950
Reviewed by Xan Lopez.
The following methods are already defined in DOMFileSystemBlackBerry.cpp:
crackFileSystemURL()
createFileSystemURL()
isValidType()
supportsToURL()
* Modules/filesystem/DOMFileSystemBase.cpp:
(WebCore):
2013-04-24 George Staikos <gstaikos@rim.com>
[BlackBerry] Add support for JPEG image quality during encoding.
https://bugs.webkit.org/show_bug.cgi?id=105773
Reviewed by Xan Lopez.
PR 271611
Internally reviewed by Liam Quinn.
Pass the quality flag into the encoder, with a default of 65
Covered by existing tests.
* platform/image-encoders/JPEGImageEncoder.cpp:
(WebCore::compressRGBABigEndianToJPEG):
* platform/image-encoders/JPEGImageEncoder.h:
(WebCore):
2013-04-24 Csaba Osztrogonác <ossy@webkit.org>
Fix cast-align WebCore/platform/graphics/GraphicsContext3D.cpp on ARM
https://bugs.webkit.org/show_bug.cgi?id=115036
Reviewed by Benjamin Poulain.
* platform/graphics/GraphicsContext3D.cpp:
(WebCore):
2013-04-24 Andreas Kling <akling@apple.com>
Remove unnecessary MutableStylePropertySet casts.
<http://webkit.org/b/115075>
Reviewed by Geoffrey Garen.
Get rid of some now-unneeded static_casts that were left from the StylePropertySet
refactoring last weekend.
* css/StylePropertySet.cpp:
(WebCore::MutableStylePropertySet::setProperty):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::triStateOfStyle):
(WebCore::EditingStyle::removeStyleFromRulesAndContext):
2013-04-24 Kangil Han <kangil.han@samsung.com>
[Minor code cleanup] Remove duplicated condition check
https://bugs.webkit.org/show_bug.cgi?id=115082
Reviewed by Andreas Kling.
areRectsPartiallyAligned() has duplicated condition check, so remove it.
* page/SpatialNavigation.cpp:
(WebCore::areRectsPartiallyAligned):
2013-04-24 Krzysztof Wolanski <k.wolanski@samsung.com>
[EFL] Fix build warnings caused by missing images attributes for default buttons
https://bugs.webkit.org/show_bug.cgi?id=114955
Reviewed by Gyuyoung Kim.
Added default image for each button from mediacontrol catalog.
No new tests, because there is no change in behavior.
* platform/efl/DefaultTheme/widget/mediacontrol/fullscreenbutton/fullscreen_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/mutebutton/mute_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/playpausebutton/playpause_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/seekbackwardbutton/seekbackward_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/seekforwardbutton/seekforward_button.edc:
* platform/efl/DefaultTheme/widget/mediacontrol/togglecaptionsbutton/toggle_captions_button.edc:
2013-04-24 Christophe Dumez <ch.dumez@sisa.samsung.com>
Unreviewed build fix with gstreamer 0.10.x after r147555.
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(webKitWebAudioSrcLoop):
== Rolled over to ChangeLog-2013-04-24 ==