Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 void LayoutSVGResourceContainer::markClientForInvalidation(LayoutObject* client, InvalidationMode mode) | 157 void LayoutSVGResourceContainer::markClientForInvalidation(LayoutObject* client, InvalidationMode mode) |
| 158 { | 158 { |
| 159 ASSERT(client); | 159 ASSERT(client); |
| 160 ASSERT(!m_clients.isEmpty()); | 160 ASSERT(!m_clients.isEmpty()); |
| 161 | 161 |
| 162 switch (mode) { | 162 switch (mode) { |
| 163 case LayoutAndBoundariesInvalidation: | 163 case LayoutAndBoundariesInvalidation: |
| 164 case BoundariesInvalidation: | 164 case BoundariesInvalidation: |
| 165 client->setNeedsBoundariesUpdate(); | 165 client->setNeedsBoundariesUpdate(); |
| 166 break; | 166 break; |
| 167 case PaintInvalidation: | 167 case PaintInvalidation: { |
| 168 client->setShouldDoFullPaintInvalidation(); | 168 PaintInvalidationReason reason = PaintInvalidationFull; |
| 169 // Since LayoutSVGInlineTexts don't have SVGResources (they use their | |
| 170 // parent's), they will not be notified of changes to paint servers. So | |
| 171 // if the client is one that could have a LayoutSVGInlineText use a | |
| 172 // paint invalidation reason that will force paint invalidation of the | |
| 173 // entire <text>/<tspan>/... subtree. | |
| 174 // TODO(fs): Allowing LayoutSVGInlineTexts to have should allow them to | |
|
fs
2015/09/10 10:41:13
Unless you can tell me up-front that this won't wo
pdr.
2015/09/11 06:22:04
This seems reasonable to me.
Ultra nit: missing a
fs
2015/09/11 16:32:16
I accidentally an entire word! Will fix if we end
| |
| 175 // get direct invalidation notifications (while getting redundant ones | |
| 176 // for the parent text content element's.) | |
| 177 if (client->isSVGText() || client->isSVGInline()) | |
| 178 reason = PaintInvalidationLocationChange; | |
|
pdr.
2015/09/11 06:22:04
This is pragmatic but I worry it could confuse us
fs
2015/09/11 16:32:16
Yes, I was pondering that, and decided against it
| |
| 179 client->setShouldDoFullPaintInvalidation(reason); | |
| 169 break; | 180 break; |
| 181 } | |
| 170 case ParentOnlyInvalidation: | 182 case ParentOnlyInvalidation: |
| 171 break; | 183 break; |
| 172 } | 184 } |
| 173 } | 185 } |
| 174 | 186 |
| 175 void LayoutSVGResourceContainer::addClient(LayoutObject* client) | 187 void LayoutSVGResourceContainer::addClient(LayoutObject* client) |
| 176 { | 188 { |
| 177 ASSERT(client); | 189 ASSERT(client); |
| 178 m_clients.add(client); | 190 m_clients.add(client); |
| 179 clearInvalidationMask(); | 191 clearInvalidationMask(); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 314 // This will process the rest of the ancestors. | 326 // This will process the rest of the ancestors. |
| 315 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); | 327 toLayoutSVGResourceContainer(current)->removeAllClientsFromCache(); |
| 316 break; | 328 break; |
| 317 } | 329 } |
| 318 | 330 |
| 319 current = current->parent(); | 331 current = current->parent(); |
| 320 } | 332 } |
| 321 } | 333 } |
| 322 | 334 |
| 323 } | 335 } |
| OLD | NEW |