| 193 | } |
| 194 | |
| 195 | bool Node::removeChild(Node* child) { |
| 196 | auto p = std::find(children_.begin(), children_.end(), child); |
| 197 | if (p != children_.end()) { |
| 198 | if (child->style().display() == Display::Contents) { |
| 199 | contentsChildrenCount_--; |
| 200 | } |
| 201 | |
| 202 | children_.erase(p); |
| 203 | return true; |
| 204 | } |
| 205 | return false; |
| 206 | } |
| 207 | |
| 208 | void Node::removeChild(size_t index) { |
| 209 | if (children_[index]->style().display() == Display::Contents) { |
no test coverage detected