Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: Source/core/dom/TreeScope.cpp

Issue 135643004: Make TreeScope::baseURL pure virtual (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Handle fallback in baseURL Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/TreeScope.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/TreeScope.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698