As a step to use toFoo, this patch introduces STYLE_SHEET_TYPE_CASTS for toCSSStyleSheet(). This will help to detect wrong type cast. Additonally this patch helps to remove argument type of RefPtr.
Created attachment 238017 [details] Patch
CC'ing Darin.
Comment on attachment 238017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238017&action=review > Source/WebCore/dom/ProcessingInstruction.cpp:225 > - static_cast<CSSStyleSheet*>(m_sheet.get())->contents().parseString(sheet); > + toCSSStyleSheet(m_sheet)->contents().parseString(sheet); Since we are assuming m_sheet is non-null, it would be better style to write: toCSSStyleSheet(*m_sheet)->contents() This ensures we don't compile in bogus null checks, although itβs possible the compiler is smart enough to not compile them anyway. > Source/WebCore/dom/ProcessingInstruction.cpp:238 > - static_cast<CSSStyleSheet*>(m_sheet.get())->contents().checkLoaded(); > + toCSSStyleSheet(m_sheet)->contents().checkLoaded(); Ditto. > Source/WebCore/inspector/InspectorCSSAgent.cpp:686 > StyleSheet* styleSheet = list->item(i); Should be StyleSheet& instead of StyleSheet*.
Created attachment 238096 [details] Patch for landing
Created attachment 238101 [details] Patch for landing
Comment on attachment 238101 [details] Patch for landing Clearing flags on attachment: 238101 Committed r173611: <http://trac.webkit.org/changeset/173611>
All reviewed patches have been landed. Closing bug.