Bug 140239

Summary: Web Inspector: Editing Inline Styles Not Working
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Brian Burg <burg>
Status: RESOLVED FIXED    
Severity: Normal CC: burg, commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Joseph Pecoraro
Reported 2015-01-07 20:37:25 PST
* SUMMARY Editing Inline Styles Not Working. * TEST <style>body { background-color: red; }</style> <body bgColor="blue" style="background-color:green"></body> * STEPS TO REPRODUCE 1. Inspect <body> of test case 2. Disable inline "green" style. 3. Attempt to change "red" style to "purple". Or try to disable. => Does not work.
Attachments
Patch (2.07 KB, patch)
2015-01-07 21:29 PST, Brian Burg
no flags
Radar WebKit Bug Importer
Comment 1 2015-01-07 20:37:34 PST
Joseph Pecoraro
Comment 2 2015-01-07 20:42:45 PST
Regression caused by "purge PassRefPtr from Inspector code and use Ref for typed and untyped protocol objects": http://trac.webkit.org/changeset/178060 Doh.
Joseph Pecoraro
Comment 3 2015-01-07 21:18:19 PST
Looks like this was due to an InspectorStyleSheet change: - RefPtr<Inspector::InspectorValue> ordinalValue = value->get("ordinal"); - if (!ordinalValue || !ordinalValue->asInteger(m_ordinal)) + int ordinalValue; + if (!value->getInteger("ordinal", ordinalValue)) m_ordinal used to be getting set, but now it isn't, causing it to have a garbage value.
Brian Burg
Comment 4 2015-01-07 21:29:48 PST
Joseph Pecoraro
Comment 5 2015-01-07 21:51:56 PST
Comment on attachment 244240 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=244240&action=review Thanks! > Source/WebCore/inspector/InspectorStyleSheet.h:69 > - if (!value->getString("styleSheetId", m_styleSheetId)) > + if (!value->getString(ASCIILiteral("styleSheetId"), m_styleSheetId)) > return; > > - int ordinalValue; > - if (!value->getInteger("ordinal", ordinalValue)) > - m_styleSheetId = ""; > + if (!value->getInteger(ASCIILiteral("ordinal"), m_ordinal)) > + m_styleSheetId = String(); We could swap the order of these and avoid this awkward cleanup.
Joseph Pecoraro
Comment 6 2015-01-07 21:55:44 PST
(In reply to comment #5) > Comment on attachment 244240 [details] > Patch > > We could swap the order of these and avoid this awkward cleanup. Bah, then we'd need to clean up ordinal. I guess we do need awkwardness.
WebKit Commit Bot
Comment 7 2015-01-07 22:19:39 PST
Comment on attachment 244240 [details] Patch Clearing flags on attachment: 244240 Committed r178105: <http://trac.webkit.org/changeset/178105>
WebKit Commit Bot
Comment 8 2015-01-07 22:19:43 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.