<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[172591] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/172591">172591</a></dd>
<dt>Author</dt> <dd>antti@apple.com</dd>
<dt>Date</dt> <dd>2014-08-14 10:49:55 -0700 (Thu, 14 Aug 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove nonRendererStyle
https://bugs.webkit.org/show_bug.cgi?id=135938
Reviewed by Andreas Kling.
It is used to support styling of non-renderer option elements. We have a better
mechanism for this, Element::computedStyle().
* dom/Element.cpp:
(WebCore::Element::resetComputedStyle):
(WebCore::Element::willResetComputedStyle):
Add a virtual callback for computed style reset.
* dom/Element.h:
* dom/Node.h:
(WebCore::Node::nonRendererStyle): Deleted.
* dom/NodeRenderStyle.h:
(WebCore::Node::renderStyle):
renderStyle() now always matches renderer()->style()
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
(WebCore::HTMLOptGroupElement::isFocusable):
(WebCore::HTMLOptGroupElement::didAttachRenderers): Deleted.
(WebCore::HTMLOptGroupElement::willDetachRenderers): Deleted.
(WebCore::HTMLOptGroupElement::updateNonRenderStyle): Deleted.
(WebCore::HTMLOptGroupElement::nonRendererStyle): Deleted.
(WebCore::HTMLOptGroupElement::customStyleForRenderer): Deleted.
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::isFocusable):
Use computedStyle.
(WebCore::HTMLOptionElement::willResetComputedStyle):
(WebCore::HTMLOptionElement::didAttachRenderers): Deleted.
(WebCore::HTMLOptionElement::willDetachRenderers): Deleted.
(WebCore::HTMLOptionElement::updateNonRenderStyle): Deleted.
(WebCore::HTMLOptionElement::nonRendererStyle): Deleted.
(WebCore::HTMLOptionElement::customStyleForRenderer): Deleted.
(WebCore::HTMLOptionElement::didRecalcStyle): Deleted.
* html/HTMLOptionElement.h:
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
(RenderMenuList::setTextFromOption):
Use computedStyle.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomNodeh">trunk/Source/WebCore/dom/Node.h</a></li>
<li><a href="#trunkSourceWebCoredomNodeRenderStyleh">trunk/Source/WebCore/dom/NodeRenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptGroupElementcpp">trunk/Source/WebCore/html/HTMLOptGroupElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptGroupElementh">trunk/Source/WebCore/html/HTMLOptGroupElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptionElementcpp">trunk/Source/WebCore/html/HTMLOptionElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptionElementh">trunk/Source/WebCore/html/HTMLOptionElement.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMenuListcpp">trunk/Source/WebCore/rendering/RenderMenuList.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/ChangeLog        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2014-08-14 Antti Koivisto <antti@apple.com>
+
+ Remove nonRendererStyle
+ https://bugs.webkit.org/show_bug.cgi?id=135938
+
+ Reviewed by Andreas Kling.
+
+ It is used to support styling of non-renderer option elements. We have a better
+ mechanism for this, Element::computedStyle().
+
+ * dom/Element.cpp:
+ (WebCore::Element::resetComputedStyle):
+ (WebCore::Element::willResetComputedStyle):
+
+ Add a virtual callback for computed style reset.
+
+ * dom/Element.h:
+ * dom/Node.h:
+ (WebCore::Node::nonRendererStyle): Deleted.
+ * dom/NodeRenderStyle.h:
+ (WebCore::Node::renderStyle):
+
+ renderStyle() now always matches renderer()->style()
+
+ * html/HTMLOptGroupElement.cpp:
+ (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
+ (WebCore::HTMLOptGroupElement::isFocusable):
+ (WebCore::HTMLOptGroupElement::didAttachRenderers): Deleted.
+ (WebCore::HTMLOptGroupElement::willDetachRenderers): Deleted.
+ (WebCore::HTMLOptGroupElement::updateNonRenderStyle): Deleted.
+ (WebCore::HTMLOptGroupElement::nonRendererStyle): Deleted.
+ (WebCore::HTMLOptGroupElement::customStyleForRenderer): Deleted.
+ * html/HTMLOptGroupElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::isFocusable):
+
+ Use computedStyle.
+
+ (WebCore::HTMLOptionElement::willResetComputedStyle):
+ (WebCore::HTMLOptionElement::didAttachRenderers): Deleted.
+ (WebCore::HTMLOptionElement::willDetachRenderers): Deleted.
+ (WebCore::HTMLOptionElement::updateNonRenderStyle): Deleted.
+ (WebCore::HTMLOptionElement::nonRendererStyle): Deleted.
+ (WebCore::HTMLOptionElement::customStyleForRenderer): Deleted.
+ (WebCore::HTMLOptionElement::didRecalcStyle): Deleted.
+ * html/HTMLOptionElement.h:
+ * rendering/RenderMenuList.cpp:
+ (RenderMenuList::updateOptionsWidth):
+ (RenderMenuList::setTextFromOption):
+
+ Use computedStyle.
+
</ins><span class="cx"> 2014-08-14 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> [MSE] Altering the quality of a YouTube video will cause the video to distort and display an error message
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/dom/Element.cpp        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -2861,11 +2861,17 @@
</span><span class="cx"> {
</span><span class="cx"> if (!hasRareData() || !elementRareData()->computedStyle())
</span><span class="cx"> return;
</span><del>- elementRareData()->resetComputedStyle();
- for (auto& child : descendantsOfType<Element>(*this)) {
- if (child.hasRareData())
- child.elementRareData()->resetComputedStyle();
- }
</del><ins>+
+ auto reset = [](Element& element) {
+ if (!element.hasRareData() || !element.elementRareData()->computedStyle())
+ return;
+ if (element.hasCustomStyleResolveCallbacks())
+ element.willResetComputedStyle();
+ element.elementRareData()->resetComputedStyle();
+ };
+ reset(*this);
+ for (auto& child : descendantsOfType<Element>(*this))
+ reset(child);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Element::clearStyleDerivedDataBeforeDetachingRenderer()
</span><span class="lines">@@ -2903,6 +2909,11 @@
</span><span class="cx"> ASSERT(hasCustomStyleResolveCallbacks());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Element::willResetComputedStyle()
+{
+ ASSERT(hasCustomStyleResolveCallbacks());
+}
+
</ins><span class="cx"> void Element::willAttachRenderers()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasCustomStyleResolveCallbacks());
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/dom/Element.h        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -546,6 +546,7 @@
</span><span class="cx">
</span><span class="cx"> virtual bool willRecalcStyle(Style::Change);
</span><span class="cx"> virtual void didRecalcStyle(Style::Change);
</span><ins>+ virtual void willResetComputedStyle();
</ins><span class="cx"> virtual void willAttachRenderers();
</span><span class="cx"> virtual void didAttachRenderers();
</span><span class="cx"> virtual void willDetachRenderers();
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.h (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.h        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/dom/Node.h        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -686,8 +686,6 @@
</span><span class="cx"> virtual void refEventTarget() override;
</span><span class="cx"> virtual void derefEventTarget() override;
</span><span class="cx">
</span><del>- virtual RenderStyle* nonRendererStyle() const { return nullptr; }
-
</del><span class="cx"> Element* ancestorElement() const;
</span><span class="cx">
</span><span class="cx"> void trackForDebugging();
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NodeRenderStyle.h (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NodeRenderStyle.h        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/dom/NodeRenderStyle.h        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -34,11 +34,10 @@
</span><span class="cx">
</span><span class="cx"> inline RenderStyle* Node::renderStyle() const
</span><span class="cx"> {
</span><del>- // Using a ternary here confuses the Solaris Studio 12/12.1/12.2 compilers:
- // Bug is CR 6569194, "Problem with question operator binding in inline function"
- if (RenderObject* renderer = this->renderer())
- return &renderer->style();
- return nonRendererStyle();
</del><ins>+ auto* renderer = this->renderer();
+ if (!renderer)
+ return nullptr;
+ return &renderer->style();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptGroupElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptGroupElement.cpp (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptGroupElement.cpp        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/html/HTMLOptGroupElement.cpp        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> : HTMLElement(tagName, document)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(hasTagName(optgroupTag));
</span><del>- setHasCustomStyleResolveCallbacks();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<HTMLOptGroupElement> HTMLOptGroupElement::create(const QualifiedName& tagName, Document& document)
</span><span class="lines">@@ -56,8 +55,11 @@
</span><span class="cx">
</span><span class="cx"> bool HTMLOptGroupElement::isFocusable() const
</span><span class="cx"> {
</span><del>- // Optgroup elements do not have a renderer so we check the renderStyle instead.
- return supportsFocus() && renderStyle() && renderStyle()->display() != NONE;
</del><ins>+ if (!supportsFocus())
+ return false;
+ // Optgroup elements do not have a renderer.
+ auto* style = const_cast<HTMLOptGroupElement&>(*this).computedStyle();
+ return style && style->display() != NONE;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const AtomicString& HTMLOptGroupElement::formControlType() const
</span><span class="lines">@@ -90,38 +92,6 @@
</span><span class="cx"> toHTMLSelectElement(select)->setRecalcListItems();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void HTMLOptGroupElement::didAttachRenderers()
-{
- // If after attaching nothing called styleForRenderer() on this node we
- // manually cache the value. This happens if our parent doesn't have a
- // renderer like <optgroup> or if it doesn't allow children like <select>.
- if (!m_style && parentNode()->renderStyle())
- updateNonRenderStyle(*parentNode()->renderStyle());
-}
-
-void HTMLOptGroupElement::willDetachRenderers()
-{
- m_style.clear();
-}
-
-void HTMLOptGroupElement::updateNonRenderStyle(RenderStyle& parentStyle)
-{
- m_style = document().ensureStyleResolver().styleForElement(this, &parentStyle);
-}
-
-RenderStyle* HTMLOptGroupElement::nonRendererStyle() const
-{
- return m_style.get();
-}
-
-PassRefPtr<RenderStyle> HTMLOptGroupElement::customStyleForRenderer(RenderStyle& parentStyle)
-{
- // styleForRenderer is called whenever a new style should be associated
- // with an Element so now is a good time to update our cached style.
- updateNonRenderStyle(parentStyle);
- return m_style;
-}
-
</del><span class="cx"> String HTMLOptGroupElement::groupLabelText() const
</span><span class="cx"> {
</span><span class="cx"> String itemText = document().displayStringModifiedByEncoding(getAttribute(labelAttr));
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptGroupElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptGroupElement.h (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptGroupElement.h        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/html/HTMLOptGroupElement.h        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -46,21 +46,12 @@
</span><span class="cx"> virtual bool isFocusable() const override;
</span><span class="cx"> virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="cx"> virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
</span><del>- virtual void didAttachRenderers() override;
- virtual void willDetachRenderers() override;
</del><span class="cx">
</span><span class="cx"> virtual void childrenChanged(const ChildChange&) override;
</span><span class="cx">
</span><span class="cx"> virtual void accessKeyAction(bool sendMouseEvents) override;
</span><span class="cx">
</span><del>- // <optgroup> never has a renderer so we manually manage a cached style.
- void updateNonRenderStyle(RenderStyle& parentStyle);
- virtual RenderStyle* nonRendererStyle() const override;
- virtual PassRefPtr<RenderStyle> customStyleForRenderer(RenderStyle& parentStyle) override;
-
</del><span class="cx"> void recalcSelectOptions();
</span><del>-
- RefPtr<RenderStyle> m_style;
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> NODE_TYPE_CASTS(HTMLOptGroupElement)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptionElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptionElement.cpp (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptionElement.cpp        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/html/HTMLOptionElement.cpp        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -88,24 +88,13 @@
</span><span class="cx"> return element.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void HTMLOptionElement::didAttachRenderers()
-{
- // If after attaching nothing called styleForRenderer() on this node we
- // manually cache the value. This happens if our parent doesn't have a
- // renderer like <optgroup> or if it doesn't allow children like <select>.
- if (!m_style && parentNode()->renderStyle())
- updateNonRenderStyle(*parentNode()->renderStyle());
-}
-
-void HTMLOptionElement::willDetachRenderers()
-{
- m_style.clear();
-}
-
</del><span class="cx"> bool HTMLOptionElement::isFocusable() const
</span><span class="cx"> {
</span><del>- // Option elements do not have a renderer so we check the renderStyle instead.
- return supportsFocus() && renderStyle() && renderStyle()->display() != NONE;
</del><ins>+ if (!supportsFocus())
+ return false;
+ // Option elements do not have a renderer.
+ auto* style = const_cast<HTMLOptionElement&>(*this).computedStyle();
+ return style && style->display() != NONE;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String HTMLOptionElement::text() const
</span><span class="lines">@@ -300,26 +289,8 @@
</span><span class="cx"> setAttribute(labelAttr, label);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void HTMLOptionElement::updateNonRenderStyle(RenderStyle& parentStyle)
</del><ins>+void HTMLOptionElement::willResetComputedStyle()
</ins><span class="cx"> {
</span><del>- m_style = document().ensureStyleResolver().styleForElement(this, &parentStyle);
-}
-
-RenderStyle* HTMLOptionElement::nonRendererStyle() const
-{
- return m_style.get();
-}
-
-PassRefPtr<RenderStyle> HTMLOptionElement::customStyleForRenderer(RenderStyle& parentStyle)
-{
- // styleForRenderer is called whenever a new style should be associated
- // with an Element so now is a good time to update our cached style.
- updateNonRenderStyle(parentStyle);
- return m_style;
-}
-
-void HTMLOptionElement::didRecalcStyle(Style::Change)
-{
</del><span class="cx"> // FIXME: This is nasty, we ask our owner select to repaint even if the new
</span><span class="cx"> // style is exactly the same.
</span><span class="cx"> if (auto select = ownerSelectElement()) {
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptionElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptionElement.h (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptionElement.h        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/html/HTMLOptionElement.h        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -71,8 +71,6 @@
</span><span class="cx">
</span><span class="cx"> virtual bool isFocusable() const override;
</span><span class="cx"> virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
</span><del>- virtual void didAttachRenderers() override;
- virtual void willDetachRenderers() override;
</del><span class="cx">
</span><span class="cx"> virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
</span><span class="cx">
</span><span class="lines">@@ -81,18 +79,12 @@
</span><span class="cx">
</span><span class="cx"> virtual void childrenChanged(const ChildChange&) override;
</span><span class="cx">
</span><del>- // <option> never has a renderer so we manually manage a cached style.
- void updateNonRenderStyle(RenderStyle& parentStyle);
- virtual RenderStyle* nonRendererStyle() const override;
- virtual PassRefPtr<RenderStyle> customStyleForRenderer(RenderStyle& parentStyle) override;
</del><ins>+ virtual void willResetComputedStyle() override;
</ins><span class="cx">
</span><del>- virtual void didRecalcStyle(Style::Change) override;
-
</del><span class="cx"> String collectOptionInnerText() const;
</span><span class="cx">
</span><span class="cx"> bool m_disabled;
</span><span class="cx"> bool m_isSelected;
</span><del>- RefPtr<RenderStyle> m_style;
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> NODE_TYPE_CASTS(HTMLOptionElement)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (172590 => 172591)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMenuList.cpp        2014-08-14 16:39:47 UTC (rev 172590)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp        2014-08-14 17:49:55 UTC (rev 172591)
</span><span class="lines">@@ -222,7 +222,7 @@
</span><span class="cx"> if (theme().popupOptionSupportsTextIndent()) {
</span><span class="cx"> // Add in the option's text indent. We can't calculate percentage values for now.
</span><span class="cx"> float optionWidth = 0;
</span><del>- if (RenderStyle* optionStyle = element->renderStyle())
</del><ins>+ if (RenderStyle* optionStyle = element->computedStyle())
</ins><span class="cx"> optionWidth += minimumValueForLength(optionStyle->textIndent(), 0);
</span><span class="cx"> if (!text.isEmpty()) {
</span><span class="cx"> const Font& font = style().font();
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx"> Element* element = listItems[i];
</span><span class="cx"> if (isHTMLOptionElement(element)) {
</span><span class="cx"> text = toHTMLOptionElement(element)->textIndentedToRespectGroupLabel();
</span><del>- m_optionStyle = element->renderStyle();
</del><ins>+ m_optionStyle = element->computedStyle();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>