OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
488 { | 488 { |
489 for (Element* element = ElementTraversal::firstWithin(*rootNode()); element; element = ElementTraversal::nextIncludingPseudo(*element)) { | 489 for (Element* element = ElementTraversal::firstWithin(*rootNode()); element; element = ElementTraversal::nextIncludingPseudo(*element)) { |
490 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root ->olderShadowRoot()) | 490 for (ShadowRoot* root = element->youngestShadowRoot(); root; root = root ->olderShadowRoot()) |
491 root->setNeedsStyleRecalcForViewportUnits(); | 491 root->setNeedsStyleRecalcForViewportUnits(); |
492 RenderStyle* style = element->renderStyle(); | 492 RenderStyle* style = element->renderStyle(); |
493 if (style && style->hasViewportUnits()) | 493 if (style && style->hasViewportUnits()) |
494 element->setNeedsStyleRecalc(LocalStyleChange); | 494 element->setNeedsStyleRecalc(LocalStyleChange); |
495 } | 495 } |
496 } | 496 } |
497 | 497 |
498 const KURL& TreeScope::baseURL() const | |
499 { | |
500 if (!m_baseURL.isEmpty() || document() == this) | |
esprehn
2014/01/14 00:36:36
Why not just make this virtual and let document ov
| |
501 return m_baseURL; | |
502 return document().baseURL(); | |
503 } | |
504 | |
498 KURL TreeScope::completeURL(const String& url) const | 505 KURL TreeScope::completeURL(const String& url) const |
499 { | 506 { |
500 return document().completeURLWithOverride(url, baseURL()); | 507 return document().completeURLWithOverride(url, baseURL()); |
501 } | 508 } |
502 | 509 |
503 } // namespace WebCore | 510 } // namespace WebCore |
OLD | NEW |