Comments (15)
r174 incorporates this improvement to the trunk. Improves the code that handles
getting and setting attributes, and simplifies style parsing. getAttribute() is
used
in rendering code instead of styles. Styles are now parsed upon being set
instead of
upon rendering. This merges r117, 118, r128, r129 and portions of r148 and r155,
from James experimental branch.
Issue 14 was also resolved by r174.
Original comment by [email protected]
on 7 Feb 2009 at 6:02
- Changed state: Fixed
from svgweb.
Unfortunately the native support in Firefox and Safari keep attributes and
style=""
values separate. The SVG spec itself doesn't have enough detail around correct
behavior, but Firefox and Safari are identical in this respect. Reopening bug
with
two goals:
* Restore separate attribute and style="" handling
* Get photos.svg to work with separated handling (Rick said that photos.svg was
failing before this -- perhaps it's related to something else).
Original comment by [email protected]
on 30 Mar 2009 at 8:55
- Changed state: Accepted
from svgweb.
I'm making these changes on my branch so far (branches/brad-merge-to-trunk).
Here's
an overview of the architecture I am going to take.
I am adding two new methods, setStyle() and getStyle(). There is now still
getAttribute() and setAttribute(), but those only get and set the XML
attributes and
do not affect the CSS style="" string. There will also be a new getStyleOrAttr()
method that can be used to get a final value ready for displaying, such as
getStyleOrAttr('fill')
Original comment by [email protected]
on 30 Mar 2009 at 11:30
from svgweb.
BTW, I should mention that I am keeping the nice 'inherit' code, which will
look up
the style tree through ancestors for inherited styles if they are not present
on the
node that getStyle() is called on.
Original comment by [email protected]
on 31 Mar 2009 at 12:10
from svgweb.
r348 on branches/brad-merge-to-trunk implements this change. Commit message
with details:
"attributes and styles are now tracked separately again to match what
Firefox and Safari does; new getStyle() and setStyle() methods are now there,
and getAttribute and setAttribute only return XML attributes now rather than
including CSS ones like in the past. We suport inherited styles in getStyle().
New method getStyleOrAttr() should be called when you want to get some value
that could be set either in XML or style='' string in order to build up
something to display. Note that getAttribute, getStyle, and getStyleOrAttr now
return null instead of an empty string when a prop name is not present. Tested
on my own files but I have not tested this on Rick's demo.html files yet."
I'm not able yet to test photos.svg; I will isolate what the issue is there
later as
I get closer to supporting rendering that file on my branch.
Original comment by [email protected]
on 31 Mar 2009 at 1:25
from svgweb.
Original comment by [email protected]
on 31 Mar 2009 at 1:26
- Changed title: Separate handling XML attributes and style values separately
from svgweb.
Note: there are a number of issues with my change. I'm tracking down the bugs
now and
will have another SVN checkin that should fix some new regressions from this
change.
Original comment by [email protected]
on 31 Mar 2009 at 5:50
from svgweb.
r354 contains more fixes for this bug. However, I believe there might still be
some
regressions from this refactoring so I wouldn't apply it to trunk yet.
Original comment by [email protected]
on 31 Mar 2009 at 6:00
from svgweb.
More fixes in r357.
Original comment by [email protected]
on 31 Mar 2009 at 6:51
from svgweb.
More fixes in r358 around correctly applying opacity to images, which I
regressed
with my earlier changes for this bug.
Original comment by [email protected]
on 31 Mar 2009 at 7:26
from svgweb.
r361 fixes a regression I introduced around gradients. Fixed now.
Original comment by [email protected]
on 31 Mar 2009 at 8:17
from svgweb.
r362 fixes regression in filters caused by this refactoring.
Original comment by [email protected]
on 31 Mar 2009 at 9:00
from svgweb.
r363 needed as well.
Original comment by [email protected]
on 31 Mar 2009 at 9:04
from svgweb.
Gradients fixed in r364. This should be the last set of fixes necessary.
Keeping open
though until I can test photos.svg.
Original comment by [email protected]
on 31 Mar 2009 at 10:13
from svgweb.
I implemented this a long time ago. Also, since I brought trunk back in a few
days
which has these together I had to re-seperate them once again.
Original comment by [email protected]
on 10 Jun 2009 at 5:30
- Changed state: Fixed
from svgweb.
Related Issues (20)
- SVG Web Issue: text event, or pointer event problems
- Flash Player 11 - class not found flash.display.GraphicsPath HOT 3
- Android 2.3 and less support?
- TextPath dont display with forcing flash HOT 2
- mobile Firefox does not support color stroke and fill pickers
- Android stock browser can't change colors in linear/radial gradient
- IE 9/10 has error 'cannot find method setProperty' HOT 6
- Shows Error when open the page that contain SVG
- rrrrrrr
- Suggest to add shortcuts to zoom-in/zoom-out/original image, and handtool for panning
- Print from Flash menu does not print image at the current zoom level.
- svgweb conflict with css3-mediaqueries-js
- SVG currentScale doesn't work
- Stand-alone flash not working HOT 1
- After svg loaded in window ,then refreshing svg images on the same window,2nd time not loading
- IE11 is not recognized as IE in svgweb code HOT 2
- render slow in webkit browser
- how to manipulate svg file using java ?
- Just TEST
- jquery
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svgweb.