Commit 237d4fb7 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Imported Upstream version 2.10.6

parent 83d5a15d
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKit2GTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.10.5</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.10.6</p></div>
</div>
<hr>
</div>
......
......@@ -177,7 +177,7 @@ against at application run time.</p>
<hr>
<div class="refsect2">
<a name="WEBKIT-MICRO-VERSION:CAPS"></a><h3>WEBKIT_MICRO_VERSION</h3>
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (5)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (6)
</pre>
<p>Like <a class="link" href="webkit2gtk-4.0-WebKitVersion.html#webkit-get-micro-version" title="webkit_get_micro_version ()"><code class="function">webkit_get_micro_version()</code></a>, but from the headers used at
application compile time, rather than from the library linked
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitDOMGTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.10.5</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.10.6</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.10.6
=================
What's new in WebKitGTK+ 2.10.6?
- Fix a deadlock in the Web Process when JavaScript garbage collector was running for a web worker
thread that made google maps to hang.
- Fix media controls displaying without controls attribute.
- Fix a Web Process crash when quickly attempting many DnD operations.
=================
WebKitGTK+ 2.10.5
=================
......
......@@ -54,18 +54,19 @@ ControllerGtk.prototype = {
this.controls.enclosure.appendChild(this.controls.panel);
},
configureControls: function() {
if (this.controls.configured)
return;
this.configureInlineControls();
this.controls.configured = true;
this.addControls();
shouldHaveControls: function()
{
return this.video.controls || this.isFullScreen();
},
reconnectControls: function()
{
this.configureControls();
Controller.prototype.disconnectControls.apply(this, arguments);
this.configureInlineControls();
if (this.shouldHaveControls())
this.addControls();
},
setStatusHidden: function(hidden)
......@@ -133,6 +134,13 @@ ControllerGtk.prototype = {
return true;
},
removeControls: function()
{
if (this.controls.enclosure.parentNode)
this.controls.enclosure.parentNode.removeChild(this.controls.enclosure);
this.destroyCaptionMenu();
},
addControls: function()
{
this.base.appendChild(this.controls.enclosure);
......
......@@ -1761,19 +1761,19 @@ float FrameView::yPositionForHeaderLayer(const FloatPoint& scrollPosition, float
return scrollY;
}
float FrameView::yPositionForRootContentLayer(const FloatPoint& scrollPosition, float topContentInset, float headerHeight)
float FrameView::yPositionForFooterLayer(const FloatPoint& scrollPosition, float topContentInset, float totalContentsHeight, float footerHeight)
{
return yPositionForHeaderLayer(scrollPosition, topContentInset) + headerHeight;
return yPositionForHeaderLayer(scrollPosition, topContentInset) + totalContentsHeight - footerHeight;
}
float FrameView::yPositionForFooterLayer(const FloatPoint& scrollPosition, float topContentInset, float totalContentsHeight, float footerHeight)
FloatPoint FrameView::positionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight)
{
return yPositionForHeaderLayer(scrollPosition, topContentInset) + totalContentsHeight - footerHeight;
return FloatPoint(0, yPositionForHeaderLayer(scrollPosition, topContentInset) + headerHeight) - toFloatSize(scrollOrigin);
}
float FrameView::yPositionForRootContentLayer() const
FloatPoint FrameView::positionForRootContentLayer() const
{
return yPositionForRootContentLayer(scrollPosition(), topContentInset(), headerHeight());
return positionForRootContentLayer(scrollPosition(), scrollOrigin(), topContentInset(), headerHeight());
}
#if PLATFORM(IOS)
......
......@@ -289,8 +289,8 @@ public:
// These layers are positioned differently when there is a topContentInset, a header, or a footer. These value need to be computed
// on both the main thread and the scrolling thread.
static float yPositionForInsetClipLayer(const FloatPoint& scrollPosition, float topContentInset);
WEBCORE_EXPORT static float yPositionForRootContentLayer(const FloatPoint& scrollPosition, float topContentInset, float headerHeight);
WEBCORE_EXPORT float yPositionForRootContentLayer() const;
WEBCORE_EXPORT static FloatPoint positionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight);
WEBCORE_EXPORT FloatPoint positionForRootContentLayer() const;
static float yPositionForHeaderLayer(const FloatPoint& scrollPosition, float topContentInset);
static float yPositionForFooterLayer(const FloatPoint& scrollPosition, float topContentInset, float totalContentsHeight, float footerHeight);
......
......@@ -329,10 +329,9 @@ void AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll(ScrollingNo
float topContentInset = frameView.topContentInset();
FloatPoint positionForInsetClipLayer = FloatPoint(0, FrameView::yPositionForInsetClipLayer(scrollPosition, topContentInset));
FloatPoint positionForContentsLayer = FloatPoint(scrolledContentsLayer->position().x(),
FrameView::yPositionForRootContentLayer(scrollPosition, topContentInset, frameView.headerHeight()));
FloatPoint positionForHeaderLayer = FloatPoint(scrollOffsetForFixed.width(), FrameView::yPositionForHeaderLayer(scrollPosition, topContentInset));
FloatPoint positionForFooterLayer = FloatPoint(scrollOffsetForFixed.width(),
FloatPoint positionForContentsLayer = frameView.positionForRootContentLayer();
FloatPoint positionForHeaderLayer = FloatPoint(scrollPositionForFixed.x(), FrameView::yPositionForHeaderLayer(scrollPosition, topContentInset));
FloatPoint positionForFooterLayer = FloatPoint(scrollPositionForFixed.x(),
FrameView::yPositionForFooterLayer(scrollPosition, topContentInset, frameView.totalContentsSize().height(), frameView.footerHeight()));
if (programmaticScroll || scrollingLayerPositionAction == SetScrollingLayerPosition) {
......
......@@ -59,6 +59,7 @@
#include "RenderNamedFlowFragment.h"
#include "RenderNamedFlowThread.h"
#include "RenderRegion.h"
#include "RenderSVGResourceClipper.h"
#include "RenderTableCell.h"
#include "RenderTextFragment.h"
#include "RenderTheme.h"
......@@ -2460,8 +2461,18 @@ bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu
return false;
break;
}
// FIXME: handle Reference/Box
case ClipPathOperation::Reference:
case ClipPathOperation::Reference: {
const auto& referenceClipPathOperation = downcast<ReferenceClipPathOperation>(*style().clipPath());
auto* element = document().getElementById(referenceClipPathOperation.fragment());
if (!element || !element->renderer())
break;
if (!is<SVGClipPathElement>(*element))
break;
auto& clipper = downcast<RenderSVGResourceClipper>(*element->renderer());
if (!clipper.hitTestClipContent(FloatRect(borderBoxRect()), FloatPoint(locationInContainer.point() - localOffset)))
return false;
break;
}
case ClipPathOperation::Box:
break;
}
......
......@@ -2123,9 +2123,9 @@ LayoutPoint RenderLayer::convertToLayerCoords(const RenderLayer* ancestorLayer,
return locationInLayerCoords;
}
LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer) const
LayoutSize RenderLayer::offsetFromAncestor(const RenderLayer* ancestorLayer, ColumnOffsetAdjustment adjustForColumns) const
{
return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint()));
return toLayoutSize(convertToLayerCoords(ancestorLayer, LayoutPoint(), adjustForColumns));
}
#if PLATFORM(IOS)
......@@ -3823,7 +3823,7 @@ void RenderLayer::clipToRect(const LayerPaintingInfo& paintingInfo, GraphicsCont
// containing block chain so we check that also.
for (RenderLayer* layer = rule == IncludeSelfForBorderRadius ? this : parent(); layer; layer = layer->parent()) {
if (layer->renderer().hasOverflowClip() && layer->renderer().style().hasBorderRadius() && inContainingBlockChain(this, layer)) {
LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer)), layer->size());
LayoutRect adjustedClipRect = LayoutRect(toLayoutPoint(layer->offsetFromAncestor(paintingInfo.rootLayer, AdjustForColumns)), layer->size());
adjustedClipRect.move(paintingInfo.subpixelAccumulation);
context->clipRoundedRect(layer->renderer().style().getRoundedInnerBorderFor(adjustedClipRect).pixelSnappedRoundedRectForPainting(deviceScaleFactor));
}
......
......@@ -432,7 +432,7 @@ public:
enum ColumnOffsetAdjustment { DontAdjustForColumns, AdjustForColumns };
void convertToPixelSnappedLayerCoords(const RenderLayer* ancestorLayer, IntPoint& location, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
LayoutPoint convertToLayerCoords(const RenderLayer* ancestorLayer, const LayoutPoint&, ColumnOffsetAdjustment adjustForColumns = DontAdjustForColumns) const;
LayoutSize offsetFromAncestor(const RenderLayer*) const;
LayoutSize offsetFromAncestor(const RenderLayer*, ColumnOffsetAdjustment = DontAdjustForColumns) const;
int zIndex() const { return renderer().style().zIndex(); }
......
......@@ -2157,9 +2157,8 @@ void RenderLayerCompositor::clearBackingForAllLayers()
void RenderLayerCompositor::updateRootLayerPosition()
{
if (m_rootContentLayer) {
const IntRect& documentRect = m_renderView.documentRect();
m_rootContentLayer->setSize(documentRect.size());
m_rootContentLayer->setPosition(FloatPoint(documentRect.x(), documentRect.y() + m_renderView.frameView().yPositionForRootContentLayer()));
m_rootContentLayer->setSize(m_renderView.frameView().contentsSize());
m_rootContentLayer->setPosition(m_renderView.frameView().positionForRootContentLayer());
m_rootContentLayer->setAnchorPoint(FloatPoint3D());
}
if (m_clipLayer) {
......
......@@ -437,6 +437,7 @@ public:
virtual bool isSVGForeignObject() const { return false; }
virtual bool isSVGResourceContainer() const { return false; }
virtual bool isSVGResourceFilter() const { return false; }
virtual bool isSVGResourceClipper() const { return false; }
virtual bool isSVGResourceFilterPrimitive() const { return false; }
// FIXME: Those belong into a SVG specific base-class for all renderers (see above)
......
......@@ -63,6 +63,7 @@ private:
void element() const = delete;
virtual const char* renderName() const override { return "RenderSVGResourceClipper"; }
bool isSVGResourceClipper() const override { return true; }
bool pathOnlyClipping(GraphicsContext*, const AffineTransform&, const FloatRect&);
bool drawContentIntoMaskImage(const ClipperMaskImage&, const FloatRect& objectBoundingBox);
......@@ -75,6 +76,9 @@ private:
}
SPECIALIZE_TYPE_TRAITS_RENDER_SVG_RESOURCE(RenderSVGResourceClipper, ClipperResourceType)
SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::RenderSVGResourceClipper)
static bool isType(const WebCore::RenderObject& renderer) { return renderer.isSVGResourceClipper(); }
static bool isType(const WebCore::RenderSVGResource& resource) { return resource.resourceType() == WebCore::ClipperResourceType; }
SPECIALIZE_TYPE_TRAITS_END()
#endif
......@@ -94,8 +94,13 @@ void RenderSVGResourceContainer::markAllClientsForInvalidation(InvalidationMode
m_isInvalidating = true;
bool needsLayout = mode == LayoutAndBoundariesInvalidation;
bool markForInvalidation = mode != ParentOnlyInvalidation;
auto* root = SVGRenderSupport::findTreeRootObject(*this);
for (auto* client : m_clients) {
// We should not mark any client outside the current root for invalidation
if (root != SVGRenderSupport::findTreeRootObject(*client))
continue;
if (is<RenderSVGResourceContainer>(*client)) {
downcast<RenderSVGResourceContainer>(*client).removeAllClientsFromCache(markForInvalidation);
continue;
......
......@@ -66,7 +66,6 @@ private:
void addClient(RenderElement&);
void removeClient(RenderElement&);
private:
virtual void willBeDestroyed() override final;
void registerResource();
......
......@@ -443,12 +443,10 @@ bool RenderSVGRoot::hasRelativeDimensions() const
void RenderSVGRoot::addResourceForClientInvalidation(RenderSVGResourceContainer* resource)
{
RenderElement* svgRoot = resource->parent();
while (svgRoot && !is<RenderSVGRoot>(*svgRoot))
svgRoot = svgRoot->parent();
RenderSVGRoot* svgRoot = SVGRenderSupport::findTreeRootObject(*resource);
if (!svgRoot)
return;
downcast<RenderSVGRoot>(*svgRoot).m_resourcesNeedingToInvalidateClients.add(resource);
svgRoot->m_resourcesNeedingToInvalidateClients.add(resource);
}
}
......@@ -89,7 +89,11 @@ void RenderSVGShape::updateShapeFromElement()
bool RenderSVGShape::isEmpty() const
{
return path().isEmpty();
// This function should never be called before assigning a new Path to m_path.
// But this bug can happen if this renderer was created and its layout was not
// done before painting. Assert this did not happen but do not crash.
ASSERT(hasPath());
return !hasPath() || path().isEmpty();
}
void RenderSVGShape::fillShape(GraphicsContext* context) const
......
......@@ -371,7 +371,7 @@ void RenderSVGText::layout()
m_needsReordering = true;
m_needsPositioningValuesUpdate = false;
updateCachedBoundariesInParents = true;
} else if (m_needsTextMetricsUpdate || SVGRenderSupport::findTreeRootObject(*this).isLayoutSizeChanged()) {
} else if (m_needsTextMetricsUpdate || SVGRenderSupport::findTreeRootObject(*this)->isLayoutSizeChanged()) {
// If the root layout size changed (eg. window size changes) or the transform to the root
// context has changed then recompute the on-screen font size.
updateFontInAllDescendants(this, &m_layoutAttributesBuilder);
......
......@@ -184,9 +184,14 @@ bool SVGRenderSupport::paintInfoIntersectsRepaintRect(const FloatRect& localRepa
return localTransform.mapRect(localRepaintRect).intersects(paintInfo.rect);
}
const RenderSVGRoot& SVGRenderSupport::findTreeRootObject(const RenderElement& start)
RenderSVGRoot* SVGRenderSupport::findTreeRootObject(RenderElement& start)
{
return *lineageOfType<RenderSVGRoot>(start).first();
return lineageOfType<RenderSVGRoot>(start).first();
}
const RenderSVGRoot* SVGRenderSupport::findTreeRootObject(const RenderElement& start)
{
return lineageOfType<RenderSVGRoot>(start).first();
}
static inline void invalidateResourcesOfChildren(RenderElement& renderer)
......@@ -225,6 +230,15 @@ bool SVGRenderSupport::transformToRootChanged(RenderElement* ancestor)
return false;
}
void SVGRenderSupport::layoutDifferentRootIfNeeded(const RenderElement& renderer)
{
if (auto* resources = SVGResourcesCache::cachedResourcesForRenderer(renderer)) {
auto* svgRoot = SVGRenderSupport::findTreeRootObject(renderer);
ASSERT(svgRoot);
resources->layoutDifferentRootIfNeeded(svgRoot);
}
}
void SVGRenderSupport::layoutChildren(RenderElement& start, bool selfNeedsLayout)
{
bool layoutSizeChanged = layoutSizeOfNearestViewportChanged(start);
......@@ -273,6 +287,7 @@ void SVGRenderSupport::layoutChildren(RenderElement& start, bool selfNeedsLayout
child->setNeedsLayout(MarkOnlyThis);
if (child->needsLayout()) {
layoutDifferentRootIfNeeded(downcast<RenderElement>(*child));
downcast<RenderElement>(*child).layout();
// Renderers are responsible for repainting themselves when changing, except
// for the initial paint to avoid potential double-painting caused by non-sensical "old" bounds.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment