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

Side by Side Diff: Source/WebCore/rendering/RenderSearchField.cpp

Issue 13861033: Remove Apple's unused implementation of private browsing from WebCore (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Repatch to ToT Created 7 years, 8 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/WebCore/plugins/PluginViewBase.h ('k') | Source/WebCore/storage/StorageAreaImpl.h » ('j') | 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) 2006, 2007, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 void RenderSearchField::addSearchResult() 84 void RenderSearchField::addSearchResult()
85 { 85 {
86 HTMLInputElement* input = inputElement(); 86 HTMLInputElement* input = inputElement();
87 if (input->maxResults() <= 0) 87 if (input->maxResults() <= 0)
88 return; 88 return;
89 89
90 String value = input->value(); 90 String value = input->value();
91 if (value.isEmpty()) 91 if (value.isEmpty())
92 return; 92 return;
93 93
94 Settings* settings = document()->settings();
95 if (!settings || settings->privateBrowsingEnabled())
96 return;
97
98 int size = static_cast<int>(m_recentSearches.size()); 94 int size = static_cast<int>(m_recentSearches.size());
99 for (int i = size - 1; i >= 0; --i) { 95 for (int i = size - 1; i >= 0; --i) {
100 if (m_recentSearches[i] == value) 96 if (m_recentSearches[i] == value)
101 m_recentSearches.remove(i); 97 m_recentSearches.remove(i);
102 } 98 }
103 99
104 m_recentSearches.insert(0, value); 100 m_recentSearches.insert(0, value);
105 while (static_cast<int>(m_recentSearches.size()) > input->maxResults()) 101 while (static_cast<int>(m_recentSearches.size()) > input->maxResults())
106 m_recentSearches.removeLast(); 102 m_recentSearches.removeLast();
107 103
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 if (containerRenderer->logicalHeight() <= contentLogicalHeight()) 372 if (containerRenderer->logicalHeight() <= contentLogicalHeight())
377 return; 373 return;
378 374
379 // A quirk for find-in-page box on Safari Windows. 375 // A quirk for find-in-page box on Safari Windows.
380 // http://webkit.org/b/63157 376 // http://webkit.org/b/63157
381 LayoutUnit logicalHeightDiff = containerRenderer->logicalHeight() - contentL ogicalHeight(); 377 LayoutUnit logicalHeightDiff = containerRenderer->logicalHeight() - contentL ogicalHeight();
382 containerRenderer->setLogicalTop(containerRenderer->logicalTop() - (logicalH eightDiff / 2 + layoutMod(logicalHeightDiff, 2))); 378 containerRenderer->setLogicalTop(containerRenderer->logicalTop() - (logicalH eightDiff / 2 + layoutMod(logicalHeightDiff, 2)));
383 } 379 }
384 380
385 } 381 }
OLDNEW
« no previous file with comments | « Source/WebCore/plugins/PluginViewBase.h ('k') | Source/WebCore/storage/StorageAreaImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698