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

Side by Side Diff: third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.cpp

Issue 1455943002: [Oilpan] Prepare full definition of classes before using Member (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 m_propertySet->ref(); 342 m_propertySet->ref();
343 #endif 343 #endif
344 } 344 }
345 345
346 DEFINE_TRACE(StyleRuleCSSStyleDeclaration) 346 DEFINE_TRACE(StyleRuleCSSStyleDeclaration)
347 { 347 {
348 visitor->trace(m_parentRule); 348 visitor->trace(m_parentRule);
349 PropertySetCSSStyleDeclaration::trace(visitor); 349 PropertySetCSSStyleDeclaration::trace(visitor);
350 } 350 }
351 351
352 InlineCSSStyleDeclaration::InlineCSSStyleDeclaration(Element* parentElement)
353 : m_parentElement(parentElement)
354 {
355 }
356
352 MutableStylePropertySet& InlineCSSStyleDeclaration::propertySet() const 357 MutableStylePropertySet& InlineCSSStyleDeclaration::propertySet() const
353 { 358 {
354 return m_parentElement->ensureMutableInlineStyle(); 359 return m_parentElement->ensureMutableInlineStyle();
355 } 360 }
356 361
357 void InlineCSSStyleDeclaration::didMutate(MutationType type) 362 void InlineCSSStyleDeclaration::didMutate(MutationType type)
358 { 363 {
359 if (type == NoChanges) 364 if (type == NoChanges)
360 return; 365 return;
361 366
362 if (!m_parentElement) 367 if (!m_parentElement)
363 return; 368 return;
364 369
365 m_parentElement->clearMutableInlineStyleIfEmpty(); 370 m_parentElement->clearMutableInlineStyleIfEmpty();
366 m_parentElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT racing::create(StyleChangeReason::InlineCSSStyleMutated)); 371 m_parentElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForT racing::create(StyleChangeReason::InlineCSSStyleMutated));
367 m_parentElement->invalidateStyleAttribute(); 372 m_parentElement->invalidateStyleAttribute();
368 StyleAttributeMutationScope(this).didInvalidateStyleAttr(); 373 StyleAttributeMutationScope(this).didInvalidateStyleAttr();
369 } 374 }
370 375
371 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const 376 CSSStyleSheet* InlineCSSStyleDeclaration::parentStyleSheet() const
372 { 377 {
373 return m_parentElement ? &m_parentElement->document().elementSheet() : nullp tr; 378 return m_parentElement ? &m_parentElement->document().elementSheet() : nullp tr;
374 } 379 }
375 380
381 Element* InlineCSSStyleDeclaration::parentElement() const
382 {
383 return m_parentElement;
384 }
385
376 #if !ENABLE(OILPAN) 386 #if !ENABLE(OILPAN)
377 void InlineCSSStyleDeclaration::ref() 387 void InlineCSSStyleDeclaration::ref()
378 { 388 {
379 m_parentElement->ref(); 389 m_parentElement->ref();
380 } 390 }
381 391
382 void InlineCSSStyleDeclaration::deref() 392 void InlineCSSStyleDeclaration::deref()
383 { 393 {
384 m_parentElement->deref(); 394 m_parentElement->deref();
385 } 395 }
386 #endif 396 #endif
387 397
388 DEFINE_TRACE(InlineCSSStyleDeclaration) 398 DEFINE_TRACE(InlineCSSStyleDeclaration)
389 { 399 {
390 visitor->trace(m_parentElement); 400 visitor->trace(m_parentElement);
391 AbstractPropertySetCSSStyleDeclaration::trace(visitor); 401 AbstractPropertySetCSSStyleDeclaration::trace(visitor);
392 } 402 }
393 403
394 } // namespace blink 404 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698