WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160097
First parameter to Window.getComputedStyle() should be mandatory and non-nullable
https://bugs.webkit.org/show_bug.cgi?id=160097
Summary
First parameter to Window.getComputedStyle() should be mandatory and non-null...
Chris Dumez
Reported
2016-07-22 13:34:10 PDT
First parameter to Window.getComputedStyle() should be mandatory and non-nullable: -
https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
Firefox and Chrome agree with the specification.
Attachments
Patch
(16.72 KB, patch)
2016-07-22 13:48 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-07-22 13:48:16 PDT
Created
attachment 284370
[details]
Patch
WebKit Commit Bot
Comment 2
2016-07-22 15:57:15 PDT
Comment on
attachment 284370
[details]
Patch Clearing flags on attachment: 284370 Committed
r203623
: <
http://trac.webkit.org/changeset/203623
>
WebKit Commit Bot
Comment 3
2016-07-22 15:57:22 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 4
2016-07-22 22:03:32 PDT
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.
Simon Fraser (smfr)
Comment 5
2016-07-23 12:23:39 PDT
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]
Chris Dumez
Comment 6
2016-07-23 14:08:47 PDT
(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.
Chris Dumez
Comment 7
2016-07-23 14:11:43 PDT
(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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug