Title: [98921] trunk/Source/WebKit/chromium
Revision
98921
Author
[email protected]
Date
2011-10-31 17:27:35 -0700 (Mon, 31 Oct 2011)

Log Message

[chromium] Calling methods of WebFontImpl causes assertions
https://bugs.webkit.org/show_bug.cgi?id=71232

Added FontCachePurgePreventer in several methods.

Patch by Yuzhu Shen <[email protected]> on 2011-10-31
Reviewed by James Robinson.

* src/WebFontImpl.cpp:
(WebKit::WebFontImpl::calculateWidth):
(WebKit::WebFontImpl::offsetForPosition):
(WebKit::WebFontImpl::selectionRectForText):
(WebKit::WebFontImpl::estimateTextBounds):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (98920 => 98921)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-11-01 00:21:34 UTC (rev 98920)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-11-01 00:27:35 UTC (rev 98921)
@@ -1,3 +1,18 @@
+2011-10-31  Yuzhu Shen  <[email protected]>
+
+        [chromium] Calling methods of WebFontImpl causes assertions
+        https://bugs.webkit.org/show_bug.cgi?id=71232
+
+        Added FontCachePurgePreventer in several methods.
+
+        Reviewed by James Robinson.
+
+        * src/WebFontImpl.cpp:
+        (WebKit::WebFontImpl::calculateWidth):
+        (WebKit::WebFontImpl::offsetForPosition):
+        (WebKit::WebFontImpl::selectionRectForText):
+        (WebKit::WebFontImpl::estimateTextBounds):
+
 2011-10-28  Nat Duca  <[email protected]>
 
         [chromium] Connect CCThreadProxy to FrameRateController and SchedulerStateMachine via CCScheduler

Modified: trunk/Source/WebKit/chromium/src/WebFontImpl.cpp (98920 => 98921)


--- trunk/Source/WebKit/chromium/src/WebFontImpl.cpp	2011-11-01 00:21:34 UTC (rev 98920)
+++ trunk/Source/WebKit/chromium/src/WebFontImpl.cpp	2011-11-01 00:27:35 UTC (rev 98921)
@@ -138,21 +138,25 @@
 
 int WebFontImpl::calculateWidth(const WebTextRun& run) const
 {
+    FontCachePurgePreventer fontCachePurgePreventer;
     return m_font.width(run, 0);
 }
 
 int WebFontImpl::offsetForPosition(const WebTextRun& run, float position) const
 {
+    FontCachePurgePreventer fontCachePurgePreventer;
     return m_font.offsetForPosition(run, position, true);
 }
 
 WebFloatRect WebFontImpl::selectionRectForText(const WebTextRun& run, const WebFloatPoint& leftBaseline, int height, int from, int to) const
 {
+    FontCachePurgePreventer fontCachePurgePreventer;
     return m_font.selectionRectForText(run, leftBaseline, height, from, to);
 }
 
 WebRect WebFontImpl::estimateTextBounds(const WebTextRun& run, const WebFloatPoint& leftBaseline) const
 {
+    FontCachePurgePreventer fontCachePurgePreventer;
     int totalWidth = m_font.width(run, 0);
     const FontMetrics& fontMetrics = m_font.fontMetrics();
     return WebRect(leftBaseline.x - (fontMetrics.ascent() + fontMetrics.descent()) / 2,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to