WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
8091
Changes made to DOM styles via Obj-C not immediately visible
https://bugs.webkit.org/show_bug.cgi?id=8091
Summary
Changes made to DOM styles via Obj-C not immediately visible
Jim Correia
Reported
2006-03-30 14:06:25 PST
see also
rdar://4496964
Programatically change DOM styles via the Objective-C interface doesn't automatically update the display in the WebView. Consider the attached example. Build and run. Click the Change DOM button. The changes are not immediately visible. Mousing over the web view makes the change visible. Sending the webview a -setNeedsDisplay:YES or sending -setNeedsToApplyStyles:YES to the document view doesn't work around the problem either. The code which manipulates the DOM looks like this: DOMDocument *document = [[webView mainFrame] DOMDocument]; DOMElement *element = [document getElementById: @"foo"]; DOMCSSStyleDeclaration *style = [element style]; [style setBackground :@"red"];
Attachments
Example app
(36.17 KB, application/octet-stream)
2006-03-30 14:06 PST
,
Jim Correia
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jim Correia
Comment 1
2006-03-30 14:06:57 PST
Created
attachment 7405
[details]
Example app
Joost de Valk (AlthA)
Comment 2
2006-07-09 13:34:51 PDT
Confirming the behavior, though i don't know for sure if this is wrong :)
Timothy Hatcher
Comment 3
2007-02-22 14:18:03 PST
This still happens. Using setValue:forKey: is a workaround, because that causes the change to happen in the JavaScript binding (which always does an update layout and paints if needed). It seems we should do something similar on the ObjC binding side, or make WebCore smarter about when to update automatically.
Ahmad Saleem
Comment 4
2022-08-10 09:25:14 PDT
rniwa@webkit.org
- Is this need anymore? Thanks!
Ryosuke Niwa
Comment 5
2022-08-10 10:33:47 PDT
We're not improving legacy webkit API at this point.
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