Bug 115436

Summary: Don't create StyleResolvers just to invalidate them.
Product: WebKit Reporter: Andreas Kling <kling>
Component: CSSAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, kling, webkit-ews
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ggaren: review+, webkit-ews: commit-queue-

Description Andreas Kling 2013-04-30 12:13:25 PDT
Document::styleResolver() has tricked me more than once into null-checking the return value.
Let's rename it to ensureStyleResolver() and never null-check again! Muwa ha ha!
Comment 1 Andreas Kling 2013-04-30 12:14:02 PDT
Created attachment 200139 [details]
Patch
Comment 2 Andreas Kling 2013-04-30 12:14:28 PDT
Comment on attachment 200139 [details]
Patch

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

> Source/WebCore/ChangeLog:4
> +        <http://webkit.org/b/

inb4 stylebot
Comment 3 WebKit Commit Bot 2013-04-30 12:16:44 PDT
Attachment 200139 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/css/FontLoader.cpp', u'Source/WebCore/css/MediaQueryMatcher.cpp', u'Source/WebCore/css/StyleMedia.cpp', u'Source/WebCore/dom/Document.cpp', u'Source/WebCore/dom/Document.h', u'Source/WebCore/dom/DocumentStyleSheetCollection.cpp', u'Source/WebCore/dom/Element.cpp', u'Source/WebCore/dom/NodeRenderingContext.cpp', u'Source/WebCore/dom/ShadowRoot.cpp', u'Source/WebCore/dom/Text.cpp', u'Source/WebCore/editing/EditingStyle.cpp', u'Source/WebCore/html/HTMLCanvasElement.cpp', u'Source/WebCore/html/HTMLCanvasElement.h', u'Source/WebCore/html/HTMLInputElement.cpp', u'Source/WebCore/html/HTMLOptGroupElement.cpp', u'Source/WebCore/html/HTMLOptionElement.cpp', u'Source/WebCore/html/HTMLPlugInImageElement.cpp', u'Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp', u'Source/WebCore/html/shadow/DateTimeEditElement.cpp', u'Source/WebCore/inspector/InspectorCSSAgent.cpp', u'Source/WebCore/page/DOMWindow.cpp', u'Source/WebCore/page/FrameView.cpp', u'Source/WebCore/page/animation/KeyframeAnimation.cpp', u'Source/WebCore/rendering/RenderListBox.cpp', u'Source/WebCore/rendering/RenderMenuList.cpp', u'Source/WebCore/rendering/RenderObject.cpp', u'Source/WebCore/rendering/RenderRegion.cpp', u'Source/WebCore/rendering/RenderSearchField.cpp', u'Source/WebCore/rendering/svg/RenderSVGInlineText.cpp', u'Source/WebCore/svg/SVGElement.cpp', u'Source/WebCore/svg/SVGElementRareData.h']" exit_code: 1
Source/WebCore/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Total errors found: 1 in 30 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Geoffrey Garen 2013-04-30 12:18:42 PDT
Comment on attachment 200139 [details]
Patch

r=me
Comment 5 Early Warning System Bot 2013-04-30 12:26:35 PDT
Comment on attachment 200139 [details]
Patch

Attachment 200139 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/50464
Comment 6 Early Warning System Bot 2013-04-30 12:28:13 PDT
Comment on attachment 200139 [details]
Patch

Attachment 200139 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/47724
Comment 7 Andreas Kling 2013-04-30 12:41:46 PDT
Committed r149392: <http://trac.webkit.org/changeset/149392>