Range.getClientRects() / getBoundingClientRect() should return DOMRect types: - https://drafts.csswg.org/cssom-view/#extensions-to-the-range-interface
Created attachment 308476 [details] WIP Patch
Created attachment 308478 [details] Patch
Comment on attachment 308478 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308478&action=review > Source/WebCore/dom/DOMRect.h:44 > + static Vector<Ref<DOMRect>> createVector(const Vector<FloatQuad>&); I think its a little weird to have a "create" function, even one with a suffix, as a class function if it doesn't return the class (or a Ref<> of said class). I think this would be clearer as a free function. > Source/WebCore/dom/Range.h:-38 > -class ClientRectList; Are there any remaining uses of ClientRect or ClientRectList? Can we remove them?
(In reply to Sam Weinig from comment #3) > Comment on attachment 308478 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=308478&action=review > > > Source/WebCore/dom/DOMRect.h:44 > > + static Vector<Ref<DOMRect>> createVector(const Vector<FloatQuad>&); > > I think its a little weird to have a "create" function, even one with a > suffix, as a class function if it doesn't return the class (or a Ref<> of > said class). I think this would be clearer as a free function. Ok, will do. > > > Source/WebCore/dom/Range.h:-38 > > -class ClientRectList; > > Are there any remaining uses of ClientRect or ClientRectList? Can we remove > them? Yes and yes. See related radars. I am doing this gradually.
Created attachment 308529 [details] Patch
Created attachment 308530 [details] Patch
(In reply to Chris Dumez from comment #4) > (In reply to Sam Weinig from comment #3) > > Comment on attachment 308478 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=308478&action=review > > > > > Source/WebCore/dom/DOMRect.h:44 > > > + static Vector<Ref<DOMRect>> createVector(const Vector<FloatQuad>&); > > > > I think its a little weird to have a "create" function, even one with a > > suffix, as a class function if it doesn't return the class (or a Ref<> of > > said class). I think this would be clearer as a free function. > > Ok, will do. > > > > > > Source/WebCore/dom/Range.h:-38 > > > -class ClientRectList; > > > > Are there any remaining uses of ClientRect or ClientRectList? Can we remove > > them? > > Yes and yes. See related radars. I am doing this gradually. I meant related bugs: https://bugs.webkit.org/show_bug.cgi?id=171412 https://bugs.webkit.org/show_bug.cgi?id=171393
Comment on attachment 308530 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=308530&action=review > Source/WebCore/WebCore.xcodeproj/project.pbxproj:3325 > 83120C711C56F3FB001CB112 /* HTMLDataElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 834B86A71C56E83A00F3F0E3 /* HTMLDataElement.h */; }; > + 83149FF61EB38B3700089665 /* DOMRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83149FF51EB38B1200089665 /* DOMRect.cpp */; }; Should probably run sort-Xcode-project-file
Committed r215946: <http://trac.webkit.org/changeset/215946>