Page Speed Optimization Libraries
1.13.35.1
|
Public Member Functions | |
CssImageRewriter (CssFilter::Context *root_context, CssFilter *filter, CacheExtender *cache_extender, ImageRewriteFilter *image_rewriter, ImageCombineFilter *image_combiner) | |
bool | RewriteCss (int64 image_inline_max_bytes, RewriteContext *parent, CssHierarchy *hierarchy, MessageHandler *handler) |
bool | FlatteningEnabled () const |
Is flattening enabled? | |
bool | RewritesEnabled (int64 image_inline_max_bytes) const |
Are any rewrites enabled? | |
void | RewriteSlot (const ResourceSlotPtr &slot, int64 image_inline_max_bytes, RewriteContext *parent) |
Static Public Member Functions | |
static void | InitStats (Statistics *statistics) |
static void | InheritChildImageInfo (RewriteContext *context) |
|
static |
Propagates image information in child rewrites of context into it. Expected to be called from context->Harvest().
bool net_instaweb::CssImageRewriter::RewriteCss | ( | int64 | image_inline_max_bytes, |
RewriteContext * | parent, | ||
CssHierarchy * | hierarchy, | ||
MessageHandler * | handler | ||
) |
Attempts to rewrite the given CSS, starting nested rewrites for each import and image to be rewritten. If successful, it mutates the CSS to point to new images and flattens all (if enabled). Returns true if rewriting is enabled.
void net_instaweb::CssImageRewriter::RewriteSlot | ( | const ResourceSlotPtr & | slot, |
int64 | image_inline_max_bytes, | ||
RewriteContext * | parent | ||
) |
Rewrite an image already loaded into a slot. Used by RewriteImage and AssociationTransformer to rewrite images in either case.