Title: [122191] trunk/Source/WebCore
Revision
122191
Author
[email protected]
Date
2012-07-09 21:34:13 -0700 (Mon, 09 Jul 2012)

Log Message

Improve performance of RenderInline::absoluteQuads for deeply nested inlines.
https://bugs.webkit.org/show_bug.cgi?id=90715

Patch by Kiran Muppala <[email protected]> on 2012-07-09
Reviewed by Maciej Stachowiak.

No new tests: functionality unchanged.

* rendering/RenderInline.cpp: Cache transformation from local to absolute coordinates using a
RenderGeometryMap and use it for subsequent mappings.
(WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
(WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::operator()):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (122190 => 122191)


--- trunk/Source/WebCore/ChangeLog	2012-07-10 04:31:39 UTC (rev 122190)
+++ trunk/Source/WebCore/ChangeLog	2012-07-10 04:34:13 UTC (rev 122191)
@@ -1,3 +1,17 @@
+2012-07-09  Kiran Muppala  <[email protected]>
+
+        Improve performance of RenderInline::absoluteQuads for deeply nested inlines.
+        https://bugs.webkit.org/show_bug.cgi?id=90715
+
+        Reviewed by Maciej Stachowiak.
+
+        No new tests: functionality unchanged.
+
+        * rendering/RenderInline.cpp: Cache transformation from local to absolute coordinates using a
+        RenderGeometryMap and use it for subsequent mappings.
+        (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
+        (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::operator()):
+
 2012-07-09  Yoshifumi Inoue  <[email protected]>
 
         [Chromium-Mac] Implement functions for localized time format information

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (122190 => 122191)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2012-07-10 04:31:39 UTC (rev 122190)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2012-07-10 04:34:13 UTC (rev 122191)
@@ -648,18 +648,26 @@
 class AbsoluteQuadsGeneratorContext {
 public:
     AbsoluteQuadsGeneratorContext(const RenderInline* renderer, Vector<FloatQuad>& quads, bool* wasFixed)
-        : m_renderer(renderer)
-        , m_quads(quads)
-        , m_wasFixed(wasFixed) { }
+        : m_quads(quads)
+        , m_wasFixed(wasFixed)
+        , m_geometryMap()
+    {
+        RenderObject* root = renderer->parent();
+        while (root && root->parent())
+            root = root->parent();
 
+        if (root)
+            m_geometryMap.pushMappingsToAncestor(renderer, toRenderBoxModelObject(root));
+    }
+
     void operator()(const FloatRect& rect)
     {
-        m_quads.append(m_renderer->localToAbsoluteQuad(rect));
+        m_quads.append(m_geometryMap.absoluteRect(rect));
     }
 private:
-    const RenderInline* m_renderer;
     Vector<FloatQuad>& m_quads;
     bool* m_wasFixed;
+    RenderGeometryMap m_geometryMap;
 };
 
 } // unnamed namespace
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to