Feature #4188 » 0001-Cache-non-existent-properties-in-cssProperty.patch
src/Wt/Render/Block.C | ||
---|---|---|
{
|
||
styleSheet_ = styleSheet;
|
||
css_.clear();
|
||
noPropertyCache_.reset();
|
||
for (unsigned int i = 0; i < children_.size(); ++i)
|
||
children_[i]->setStyleSheet(styleSheet);
|
||
}
|
||
... | ... | |
if (!node_)
|
||
return std::string();
|
||
if (noPropertyCache_[property])
|
||
return std::string();
|
||
if (css_.empty()) {
|
||
if (styleSheet_) {
|
||
for (unsigned int i = 0; i < styleSheet_->rulesetSize(); ++i) {
|
||
... | ... | |
if (i != css_.end())
|
||
return i->second.value_;
|
||
else
|
||
else {
|
||
noPropertyCache_.set(property);
|
||
return std::string();
|
||
}
|
||
}
|
||
std::string Block::attributeValue(const char *attribute) const
|
src/Wt/Render/Block.h | ||
---|---|---|
mutable std::map<std::string, PropertyValue> css_;
|
||
mutable WFont font_;
|
||
StyleSheet* styleSheet_;
|
||
mutable std::bitset<PropertyLastPlusOne> noPropertyCache_;
|
||
/* For table */
|
||
int tableRowCount_, tableColCount_;
|
src/web/DomElement.h | ||
---|---|---|
PropertyStyleVisibility, PropertyStyleDisplay,
|
||
/* CSS 3 */
|
||
PropertyStyleBoxSizing };
|
||
PropertyStyleBoxSizing,
|
||
/* Keep as last, e.g. for bitset sizing. Otherwise, unused. */
|
||
PropertyLastPlusOne };
|
||
/*! \class DomElement web/DomElement web/DomElement
|
||
* \brief Class to represent a client-side DOM element (proxy).
|
- « Previous
- 1
- 2
- 3
- Next »