| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 ShadowRoot* containingRoot = containingShadowRoot(); | 55 ShadowRoot* containingRoot = containingShadowRoot(); |
| 56 if (!containingRoot) | 56 if (!containingRoot) |
| 57 return nullptr; | 57 return nullptr; |
| 58 | 58 |
| 59 updateDistribution(); | 59 updateDistribution(); |
| 60 | 60 |
| 61 ShadowRoot* older = containingRoot->olderShadowRoot(); | 61 ShadowRoot* older = containingRoot->olderShadowRoot(); |
| 62 if (!older || !older->isOpenOrV0() || older->shadowInsertionPointOfYoungerSh
adowRoot() != this) | 62 if (!older || !older->isOpenOrV0() || older->shadowInsertionPointOfYoungerSh
adowRoot() != this) |
| 63 return nullptr; | 63 return nullptr; |
| 64 | 64 |
| 65 ASSERT(older->isOpenOrV0()); | 65 DCHECK(older->isOpenOrV0()); |
| 66 return older; | 66 return older; |
| 67 } | 67 } |
| 68 | 68 |
| 69 Node::InsertionNotificationRequest HTMLShadowElement::insertedInto(ContainerNode
* insertionPoint) | 69 Node::InsertionNotificationRequest HTMLShadowElement::insertedInto(ContainerNode
* insertionPoint) |
| 70 { | 70 { |
| 71 if (insertionPoint->isConnected()) { | 71 if (insertionPoint->isConnected()) { |
| 72 // Warn if trying to reproject between user agent and author shadows. | 72 // Warn if trying to reproject between user agent and author shadows. |
| 73 ShadowRoot* root = containingShadowRoot(); | 73 ShadowRoot* root = containingShadowRoot(); |
| 74 if (root && root->olderShadowRoot() && root->type() != root->olderShadow
Root()->type()) { | 74 if (root && root->olderShadowRoot() && root->type() != root->olderShadow
Root()->type()) { |
| 75 String message = String::format("<shadow> doesn't work for %s elemen
t host.", root->host().tagName().utf8().data()); | 75 String message = String::format("<shadow> doesn't work for %s elemen
t host.", root->host().tagName().utf8().data()); |
| 76 document().addConsoleMessage(ConsoleMessage::create(RenderingMessage
Source, WarningMessageLevel, message)); | 76 document().addConsoleMessage(ConsoleMessage::create(RenderingMessage
Source, WarningMessageLevel, message)); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 return InsertionPoint::insertedInto(insertionPoint); | 79 return InsertionPoint::insertedInto(insertionPoint); |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| OLD | NEW |