summaryrefslogtreecommitdiff
path: root/Source/WebCore/html
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html')
-rw-r--r--Source/WebCore/html/HTMLPlugInElement.cpp6
-rw-r--r--Source/WebCore/html/HTMLPlugInElement.h2
-rw-r--r--Source/WebCore/html/shadow/ContentDistributor.cpp3
-rw-r--r--Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp2
-rw-r--r--Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp2
-rw-r--r--Source/WebCore/html/shadow/HTMLContentElement.cpp3
-rw-r--r--Source/WebCore/html/shadow/HTMLContentElement.idl1
-rw-r--r--Source/WebCore/html/shadow/InsertionPoint.cpp6
-rw-r--r--Source/WebCore/html/shadow/InsertionPoint.h2
-rw-r--r--Source/WebCore/html/shadow/SliderThumbElement.cpp8
10 files changed, 26 insertions, 9 deletions
diff --git a/Source/WebCore/html/HTMLPlugInElement.cpp b/Source/WebCore/html/HTMLPlugInElement.cpp
index 9947a736e..2d965624a 100644
--- a/Source/WebCore/html/HTMLPlugInElement.cpp
+++ b/Source/WebCore/html/HTMLPlugInElement.cpp
@@ -72,6 +72,12 @@ HTMLPlugInElement::~HTMLPlugInElement()
#endif
}
+bool HTMLPlugInElement::canProcessDrag() const
+{
+ const PluginViewBase* plugin = pluginWidget() && pluginWidget()->isPluginViewBase() ? static_cast<const PluginViewBase*>(pluginWidget()) : 0;
+ return plugin ? plugin->canProcessDrag() : false;
+}
+
void HTMLPlugInElement::detach()
{
m_instance.clear();
diff --git a/Source/WebCore/html/HTMLPlugInElement.h b/Source/WebCore/html/HTMLPlugInElement.h
index d7bcb166e..859ac2edc 100644
--- a/Source/WebCore/html/HTMLPlugInElement.h
+++ b/Source/WebCore/html/HTMLPlugInElement.h
@@ -66,6 +66,8 @@ public:
bool canContainRangeEndPoint() const { return false; }
+ bool canProcessDrag() const;
+
protected:
HTMLPlugInElement(const QualifiedName& tagName, Document*);
diff --git a/Source/WebCore/html/shadow/ContentDistributor.cpp b/Source/WebCore/html/shadow/ContentDistributor.cpp
index 40059c609..ec367ef2c 100644
--- a/Source/WebCore/html/shadow/ContentDistributor.cpp
+++ b/Source/WebCore/html/shadow/ContentDistributor.cpp
@@ -89,6 +89,9 @@ void ContentDistributor::distribute(Element* host)
distributeNodeChildrenTo(point, older);
older->setAssignedTo(point);
}
+
+ if (ElementShadow* shadow = node->parentNode()->isElementNode() ? toElement(node->parentNode())->shadow() : 0)
+ shadow->invalidateDistribution();
}
}
}
diff --git a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp b/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp
index ffb03979d..f843fa630 100644
--- a/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp
+++ b/Source/WebCore/html/shadow/DateTimeNumericFieldElement.cpp
@@ -82,7 +82,7 @@ PassRefPtr<RenderStyle> DateTimeNumericFieldElement::customStyleForRenderer()
float maxiumWidth = style->font().width(m_placeholder);
maxiumWidth = std::max(maxiumWidth, style->font().width(formatValue(maximum())));
maxiumWidth = std::max(maxiumWidth, style->font().width(value()));
- style->setWidth(Length(maxiumWidth, Fixed));
+ style->setMinWidth(Length(maxiumWidth, Fixed));
return style.release();
}
diff --git a/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp b/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp
index 742208f53..f8aae7a6d 100644
--- a/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp
+++ b/Source/WebCore/html/shadow/DateTimeSymbolicFieldElement.cpp
@@ -68,7 +68,7 @@ PassRefPtr<RenderStyle> DateTimeSymbolicFieldElement::customStyleForRenderer()
float maxiumWidth = style->font().width(visibleEmptyValue());
for (unsigned index = 0; index < m_symbols.size(); ++index)
maxiumWidth = std::max(maxiumWidth, style->font().width(m_symbols[index]));
- style->setWidth(Length(maxiumWidth, Fixed));
+ style->setMinWidth(Length(maxiumWidth, Fixed));
return style.release();
}
diff --git a/Source/WebCore/html/shadow/HTMLContentElement.cpp b/Source/WebCore/html/shadow/HTMLContentElement.cpp
index 912cfdf51..6c063c1b6 100644
--- a/Source/WebCore/html/shadow/HTMLContentElement.cpp
+++ b/Source/WebCore/html/shadow/HTMLContentElement.cpp
@@ -40,14 +40,13 @@ namespace WebCore {
using HTMLNames::selectAttr;
-static const QualifiedName& contentTagName(Document* document)
+static const QualifiedName& contentTagName(Document*)
{
#if ENABLE(SHADOW_DOM)
if (!RuntimeEnabledFeatures::shadowDOMEnabled())
return HTMLNames::webkitShadowContentTag;
return HTMLNames::contentTag;
#else
- UNUSED_PARAM(document);
return HTMLNames::webkitShadowContentTag;
#endif
}
diff --git a/Source/WebCore/html/shadow/HTMLContentElement.idl b/Source/WebCore/html/shadow/HTMLContentElement.idl
index 448c979a3..b286c48fd 100644
--- a/Source/WebCore/html/shadow/HTMLContentElement.idl
+++ b/Source/WebCore/html/shadow/HTMLContentElement.idl
@@ -30,4 +30,5 @@
] interface HTMLContentElement : HTMLElement {
[Reflect] attribute DOMString select;
attribute boolean resetStyleInheritance;
+ NodeList getDistributedNodes();
};
diff --git a/Source/WebCore/html/shadow/InsertionPoint.cpp b/Source/WebCore/html/shadow/InsertionPoint.cpp
index 7aecaa56e..092077467 100644
--- a/Source/WebCore/html/shadow/InsertionPoint.cpp
+++ b/Source/WebCore/html/shadow/InsertionPoint.cpp
@@ -88,11 +88,9 @@ bool InsertionPoint::isActive() const
return true;
}
-PassRefPtr<NodeList> InsertionPoint::distributedNodes() const
+PassRefPtr<NodeList> InsertionPoint::getDistributedNodes() const
{
- if (!attached())
- return 0;
-
+ document()->updateLayout();
Vector<RefPtr<Node> > nodes;
for (size_t i = 0; i < m_distribution.size(); ++i)
diff --git a/Source/WebCore/html/shadow/InsertionPoint.h b/Source/WebCore/html/shadow/InsertionPoint.h
index 2ef36c1c5..95f7995d7 100644
--- a/Source/WebCore/html/shadow/InsertionPoint.h
+++ b/Source/WebCore/html/shadow/InsertionPoint.h
@@ -49,7 +49,7 @@ public:
bool isShadowBoundary() const;
bool isActive() const;
- PassRefPtr<NodeList> distributedNodes() const;
+ PassRefPtr<NodeList> getDistributedNodes() const;
virtual const AtomicString& select() const = 0;
virtual bool isSelectValid() const = 0;
diff --git a/Source/WebCore/html/shadow/SliderThumbElement.cpp b/Source/WebCore/html/shadow/SliderThumbElement.cpp
index b045e2389..5e53eced1 100644
--- a/Source/WebCore/html/shadow/SliderThumbElement.cpp
+++ b/Source/WebCore/html/shadow/SliderThumbElement.cpp
@@ -169,9 +169,17 @@ void RenderSliderContainer::layout()
HTMLInputElement* input = node()->shadowHost()->toInputElement();
bool isVertical = hasVerticalAppearance(input);
style()->setFlexDirection(isVertical ? FlowColumn : FlowRow);
+ TextDirection oldTextDirection = style()->direction();
+ if (isVertical) {
+ // FIXME: Work around rounding issues in RTL vertical sliders. We want them to
+ // render identically to LTR vertical sliders. We can remove this work around when
+ // subpixel rendering is enabled on all ports.
+ style()->setDirection(LTR);
+ }
RenderFlexibleBox::layout();
+ style()->setDirection(oldTextDirection);
// These should always exist, unless someone mutates the shadow DOM (e.g., in the inspector).
if (!input->sliderThumbElement() || !input->sliderThumbElement()->renderer())
return;