Bug 122722 - Make absoluteQuads/Rects functions return Vectors
Summary: Make absoluteQuads/Rects functions return Vectors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-13 03:34 PDT by Antti Koivisto
Modified: 2013-10-13 04:04 PDT (History)
12 users (show)

See Also:


Attachments
patch (19.03 KB, patch)
2013-10-13 03:48 PDT, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2013-10-13 03:34:11 PDT
instead of collecting to Vectors.
Comment 1 Antti Koivisto 2013-10-13 03:48:15 PDT
Created attachment 214095 [details]
patch
Comment 2 Andreas Kling 2013-10-13 03:55:40 PDT
Comment on attachment 214095 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=214095&action=review

> Source/WebCore/ChangeLog:8
> +        No new tests (OOPS!).

OOPS!

> Source/WebCore/dom/Range.cpp:1944
> +                Vector<FloatQuad> textQuads = renderText.absoluteQuadsForRange(startOffset, endOffset);

Could use auto for this.

> Source/WebCore/dom/Range.cpp:1947
>                  quads.appendVector(textQuads);

Sidenote: I wonder if an appendVector(Vector&&) would be a useful optimization.

> Source/WebCore/rendering/RenderText.cpp:261
>  void RenderText::absoluteRects(Vector<IntRect>& rects, const LayoutPoint& accumulatedOffset) const

I wish this method were called collectAbsoluteRects() or something like that.
Same whine for the other similarly named ones.
Comment 3 Antti Koivisto 2013-10-13 04:04:24 PDT
https://trac.webkit.org/r157366