Title: [153094] trunk/Source/WebCore
- Revision
- 153094
- Author
- [email protected]
- Date
- 2013-07-24 12:11:44 -0700 (Wed, 24 Jul 2013)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (153093 => 153094)
--- trunk/Source/WebCore/ChangeLog 2013-07-24 19:03:30 UTC (rev 153093)
+++ trunk/Source/WebCore/ChangeLog 2013-07-24 19:11:44 UTC (rev 153094)
@@ -1,3 +1,17 @@
+2013-07-24 Andreas Kling <[email protected]>
+
+ 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 <[email protected]>
Make KURL::hasPath private
Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (153093 => 153094)
--- trunk/Source/WebCore/rendering/RenderMenuList.cpp 2013-07-24 19:03:30 UTC (rev 153093)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp 2013-07-24 19:11:44 UTC (rev 153094)
@@ -57,7 +57,7 @@
: RenderFlexibleBox(element)
, m_buttonText(0)
, m_innerBlock(0)
- , m_optionsChanged(true)
+ , m_needsOptionsWidthUpdate(true)
, m_optionsWidth(0)
, m_lastActiveIndex(-1)
, m_popupIsVisible(false)
@@ -165,8 +165,10 @@
adjustInnerStyle();
bool fontChanged = !oldStyle || oldStyle->font() != style()->font();
- if (fontChanged)
+ if (fontChanged) {
updateOptionsWidth();
+ m_needsOptionsWidthUpdate = false;
+ }
}
void RenderMenuList::updateOptionsWidth()
@@ -206,9 +208,9 @@
void RenderMenuList::updateFromElement()
{
- if (m_optionsChanged) {
+ if (m_needsOptionsWidthUpdate) {
updateOptionsWidth();
- m_optionsChanged = false;
+ m_needsOptionsWidthUpdate = false;
}
if (m_popupIsVisible)
Modified: trunk/Source/WebCore/rendering/RenderMenuList.h (153093 => 153094)
--- trunk/Source/WebCore/rendering/RenderMenuList.h 2013-07-24 19:03:30 UTC (rev 153093)
+++ trunk/Source/WebCore/rendering/RenderMenuList.h 2013-07-24 19:11:44 UTC (rev 153094)
@@ -51,7 +51,7 @@
void showPopup();
void hidePopup();
- void setOptionsChanged(bool changed) { m_optionsChanged = changed; }
+ void setOptionsChanged(bool changed) { m_needsOptionsWidthUpdate = changed; }
void didSetSelectedIndex(int listIndex);
@@ -137,7 +137,7 @@
RenderText* m_buttonText;
RenderBlock* m_innerBlock;
- bool m_optionsChanged;
+ bool m_needsOptionsWidthUpdate;
int m_optionsWidth;
int m_lastActiveIndex;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes