DescriptionHandle CSSImageValue URLs in inline styles in templates correctly
When importing or adopting nodes across Documents, this patch checks for
baseURL mismatches between the two documents and re-resolves URLs for
CSSImageValues in those cases. Without this patch, the URLs are empty
when they enter the Document (since they tried to resolve against an
empty baseURL when they were created).
This requires storing the un-resolved URL inside the CSSImageValue alongside
the resolved URL, and some unfortunately hacky code in Element.cpp to handle
re-resolving.
The resolve-on-adoption behavior matches the behavior recently specced for
<img> elements in HTML (see http://html5.org/tools/web-apps-tracker?from=8508&to=8509)
This does not yet support any other form of url() in CSS (-webkit-image-set
being the most glaring omission). I've left FIXMEs in the code to handle those,
but I fear adding any more hacks in Element.cpp; in order to support this
generally, some serious refactoring in the CSSValue class hierarchy is required.
BUG=229142
R=ojan@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167931
Patch Set 1 #Patch Set 2 : Now with fewer test failures and proper re-resolution behavior #Patch Set 3 : Various refinements #Patch Set 4 : Ready for review #
Total comments: 2
Patch Set 5 : Removed template usage #Patch Set 6 : Removed template usage #Messages
Total messages: 15 (0 generated)
|