Bug 76848

Summary: Eliminate CSSElementStyleDeclaration
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: macpherson, rakuco, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77745    
Attachments:
Description Flags
patch kling: review+

Description Antti Koivisto 2012-01-23 11:25:17 PST
CSSElementStyleDeclaration has little functionality. It can merge with CSSMutableStyleDeclaration simplifying the code.
Comment 1 Antti Koivisto 2012-01-23 12:47:28 PST
Created attachment 123600 [details]
patch
Comment 2 WebKit Review Bot 2012-01-23 12:49:18 PST
Attachment 123600 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1

Source/WebCore/css/CSSMutableStyleDeclaration.h:150:  The parameter name "element" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2012-01-23 13:01:26 PST
Comment on attachment 123600 [details]
patch

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

r=me

> Source/WebCore/css/CSSStyleRule.cpp:-108
> -    if (!doc && m_style->isElementStyleDeclaration()) {
> -        if (StyledElement* element = static_cast<CSSElementStyleDeclaration*>(m_style.get())->element())
> -            doc = element->document();
> -    }

Oh dear. Who put this crap here? :(
Comment 4 Antti Koivisto 2012-01-23 14:26:58 PST
http://trac.webkit.org/changeset/105642