1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 02:39:23 +02:00

compound CSS selectors support (in progress)

This commit is contained in:
Nikolay Pultsin 2014-10-11 20:51:49 +02:00
parent 237e3b191e
commit 4d4a096e3f
7 changed files with 180 additions and 32 deletions

View file

@ -23,14 +23,15 @@
#include "StyleSheetTable.h"
#include "StyleSheetUtil.h"
#include "CSSSelector.h"
bool StyleSheetTable::isEmpty() const {
return myControlMap.empty() && myPageBreakBeforeMap.empty() && myPageBreakAfterMap.empty();
}
void StyleSheetTable::addMap(const std::string &tag, const std::string &aClass, const AttributeMap &map) {
if ((!tag.empty() || !aClass.empty()) && !map.empty()) {
const Key key(tag, aClass);
void StyleSheetTable::addMap(shared_ptr<CSSSelector> selector, const AttributeMap &map) {
if (!selector.isNull() && selector->Next.isNull() && !map.empty()) {
const Key key(selector->Tag, selector->Class);
myControlMap[key] = createOrUpdateControl(map, myControlMap[key]);
const std::string &pbb = value(map, "page-break-before");