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

Unified Diff: Source/core/rendering/RenderTextControlSingleLine.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderText.cpp ('k') | Source/core/rendering/RenderTheme.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTextControlSingleLine.cpp
diff --git a/Source/core/rendering/RenderTextControlSingleLine.cpp b/Source/core/rendering/RenderTextControlSingleLine.cpp
index 49611a65f94350765e048ce7b471bae103138bdf..5e54e2e1b9de4afb9790dbb3b1ed189d798c9a90 100644
--- a/Source/core/rendering/RenderTextControlSingleLine.cpp
+++ b/Source/core/rendering/RenderTextControlSingleLine.cpp
@@ -253,7 +253,7 @@ void RenderTextControlSingleLine::styleDidChange(StyleDifference diff, const Ren
void RenderTextControlSingleLine::capsLockStateMayHaveChanged()
{
- if (!node() || !document())
+ if (!node())
return;
// Only draw the caps lock indicator if these things are true:
@@ -263,8 +263,8 @@ void RenderTextControlSingleLine::capsLockStateMayHaveChanged()
// 4) The caps lock is on
bool shouldDrawCapsLockIndicator = false;
- if (Frame* frame = document()->frame())
- shouldDrawCapsLockIndicator = inputElement()->isPasswordField() && frame->selection()->isFocusedAndActive() && document()->focusedElement() == node() && PlatformKeyboardEvent::currentCapsLockState();
+ if (Frame* frame = document().frame())
+ shouldDrawCapsLockIndicator = inputElement()->isPasswordField() && frame->selection()->isFocusedAndActive() && document().focusedElement() == node() && PlatformKeyboardEvent::currentCapsLockState();
if (shouldDrawCapsLockIndicator != m_shouldDrawCapsLockIndicator) {
m_shouldDrawCapsLockIndicator = shouldDrawCapsLockIndicator;
@@ -372,7 +372,7 @@ PassRefPtr<RenderStyle> RenderTextControlSingleLine::createInnerTextStyle(const
bool RenderTextControlSingleLine::textShouldBeTruncated() const
{
- return document()->focusedElement() != node() && style()->textOverflow() == TextOverflowEllipsis;
+ return document().focusedElement() != node() && style()->textOverflow() == TextOverflowEllipsis;
}
void RenderTextControlSingleLine::autoscroll(const IntPoint& position)
« no previous file with comments | « Source/core/rendering/RenderText.cpp ('k') | Source/core/rendering/RenderTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698