Summary: | First parameter to Window.getComputedStyle() should be mandatory and non-nullable | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | DOM | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, cdumez, commit-queue, darin, dbates, rniwa, sam, simon.fraser | ||||
Priority: | P2 | Keywords: | WebExposed | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | 161206 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Chris Dumez
2016-07-22 13:34:10 PDT
Created attachment 284370 [details]
Patch
Comment on attachment 284370 [details] Patch Clearing flags on attachment: 284370 Committed r203623: <http://trac.webkit.org/changeset/203623> All reviewed patches have been landed. Closing bug. Comment on attachment 284370 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=284370&action=review > Source/WebCore/css/CSSComputedStyleDeclaration.h:51 > + ComputedStyleExtractor(RefPtr<Node>&&, bool allowVisitedStyle = false, PseudoId = NOPSEUDO); Does this have to work on a Node, or maybe just on an Element? Does this have to take a RefPtr, or maybe just a Ref? > Source/WebCore/inspector/InspectorCSSAgent.cpp:646 > + RefPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(*element, true); Should use auto. > Source/WebCore/page/DOMWindow.h:231 > + RefPtr<CSSStyleDeclaration> getComputedStyle(Element&, const String& pseudoElt) const; Should return Ref, not RefPtr. > Source/WebCore/testing/Internals.h:110 > + RefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Element&) const; Should return Ref, not RefPtr. This broke the windows build, as EWS indicates: C:\cygwin\home\buildbot\slave\win-debug\build\Source\WebKit\win\DOMCoreClasses.cpp(804): error C2664: 'WTF::RefPtr<WebCore::CSSStyleDeclaration> WebCore::DOMWindow::getComputedStyle(WebCore::Element &,const WTF::String &) const': cannot convert argument 1 from 'WebCore::Element *' to 'WebCore::Element &' [C:\cygwin\home\buildbot\slave\win-debug\build\WebKitBuild\Debug\Source\WebKit\WebKit.vcxproj] C:\cygwin\home\buildbot\slave\win-debug\build\Source\WebKit\win\DOMCoreClasses.cpp(804): error C2228: left of '.get' must have class/struct/union [C:\cygwin\home\buildbot\slave\win-debug\build\WebKitBuild\Debug\Source\WebKit\WebKit.vcxproj] (In reply to comment #5) > This broke the windows build, as EWS indicates: > > C:\cygwin\home\buildbot\slave\win- > debug\build\Source\WebKit\win\DOMCoreClasses.cpp(804): error C2664: > 'WTF::RefPtr<WebCore::CSSStyleDeclaration> > WebCore::DOMWindow::getComputedStyle(WebCore::Element &,const WTF::String &) > const': cannot convert argument 1 from 'WebCore::Element *' to > 'WebCore::Element &' > [C:\cygwin\home\buildbot\slave\win- > debug\build\WebKitBuild\Debug\Source\WebKit\WebKit.vcxproj] > C:\cygwin\home\buildbot\slave\win- > debug\build\Source\WebKit\win\DOMCoreClasses.cpp(804): error C2228: left of > '.get' must have class/struct/union > [C:\cygwin\home\buildbot\slave\win- > debug\build\WebKitBuild\Debug\Source\WebKit\WebKit.vcxproj] I'll fix shortly. Thanks. (In reply to comment #6) > (In reply to comment #5) > > This broke the windows build, as EWS indicates: > > > > C:\cygwin\home\buildbot\slave\win- > > debug\build\Source\WebKit\win\DOMCoreClasses.cpp(804): error C2664: > > 'WTF::RefPtr<WebCore::CSSStyleDeclaration> > > WebCore::DOMWindow::getComputedStyle(WebCore::Element &,const WTF::String &) > > const': cannot convert argument 1 from 'WebCore::Element *' to > > 'WebCore::Element &' > > [C:\cygwin\home\buildbot\slave\win- > > debug\build\WebKitBuild\Debug\Source\WebKit\WebKit.vcxproj] > > C:\cygwin\home\buildbot\slave\win- > > debug\build\Source\WebKit\win\DOMCoreClasses.cpp(804): error C2228: left of > > '.get' must have class/struct/union > > [C:\cygwin\home\buildbot\slave\win- > > debug\build\WebKitBuild\Debug\Source\WebKit\WebKit.vcxproj] > > I'll fix shortly. Thanks. <http://trac.webkit.org/changeset/203651> should fix the Windows build. |