Changeset 116794 in webkit
- Timestamp:
- May 11, 2012 12:40:30 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r116792 r116794 1 2012-05-11 Anders Carlsson <andersca@apple.com> 2 3 REGRESSION(r116687): [Chromium] plugins/embed-attributes-style.html shows a garbled string 4 https://bugs.webkit.org/show_bug.cgi?id=86170 5 6 Reviewed by Andreas Kling. 7 8 The string we are passing to the TextRun constructor needs to stay alive for longer so revert back to the old 9 behavior where we store it as a member variable. 10 11 * rendering/RenderEmbeddedObject.cpp: 12 (WebCore::unavailablePluginReplacementText): 13 (WebCore): 14 (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason): 15 (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): 16 * rendering/RenderEmbeddedObject.h: 17 (RenderEmbeddedObject): 18 1 19 2012-05-11 Simon Fraser <simon.fraser@apple.com> 2 20 -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r116695 r116794 103 103 #endif 104 104 105 static String unavailablePluginReplacementText(RenderEmbeddedObject::PluginUnavailabilityReason pluginUnavailabilityReason) 106 { 107 switch (pluginUnavailabilityReason) { 108 case RenderEmbeddedObject::PluginMissing: 109 return missingPluginText(); 110 case RenderEmbeddedObject::PluginCrashed: 111 return crashedPluginText(); 112 case RenderEmbeddedObject::InsecurePluginVersion: 113 return insecurePluginVersionText(); 114 } 115 116 ASSERT_NOT_REACHED(); 117 return String(); 118 } 119 105 120 void RenderEmbeddedObject::setPluginUnavailabilityReason(PluginUnavailabilityReason pluginUnavailabilityReason) 106 121 { … … 108 123 m_showsUnavailablePluginIndicator = true; 109 124 m_pluginUnavailabilityReason = pluginUnavailabilityReason; 125 126 m_unavailablePluginReplacementText = unavailablePluginReplacementText(pluginUnavailabilityReason); 110 127 } 111 128 … … 194 211 font = Font(fontDescription, 0, 0); 195 212 font.update(0); 196 197 run = TextRun( unavailablePluginReplacementText());213 214 run = TextRun(m_unavailablePluginReplacementText); 198 215 textWidth = font.width(run); 199 216 … … 206 223 207 224 return true; 208 }209 210 String RenderEmbeddedObject::unavailablePluginReplacementText() const211 {212 switch (m_pluginUnavailabilityReason) {213 case PluginMissing:214 return missingPluginText();215 case PluginCrashed:216 return crashedPluginText();217 case InsecurePluginVersion:218 return insecurePluginVersionText();219 }220 221 ASSERT_NOT_REACHED();222 return String();223 225 } 224 226 -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.h
r116695 r116794 79 79 bool isInUnavailablePluginIndicator(const LayoutPoint&) const; 80 80 bool getReplacementTextGeometry(const LayoutPoint& accumulatedOffset, FloatRect& contentRect, Path&, FloatRect& replacementTextRect, Font&, TextRun&, float& textWidth) const; 81 String unavailablePluginReplacementText() const;82 81 83 82 bool m_hasFallbackContent; // FIXME: This belongs on HTMLObjectElement. … … 85 84 bool m_showsUnavailablePluginIndicator; 86 85 PluginUnavailabilityReason m_pluginUnavailabilityReason; 86 String m_unavailablePluginReplacementText; 87 87 bool m_unavailablePluginIndicatorIsPressed; 88 88 bool m_mouseDownWasInUnavailablePluginIndicator;
Note: See TracChangeset
for help on using the changeset viewer.