Ctr+F search in Profiles panel should search only in the selected profile

This CL removes the code that supported search through all profiles in the Profiles panel. In the offline discussion we unanimously agreed that the search should apply to the selected profile only.

This change also removes bubble from SidebarTreeElement. The bubble was used to show search matches count in the corresponding profile only. It allowed to also remove searchSmall*.png icons and CSS styles that referenced them.

BUG=316104
R=vsevik@chromium.org

Review URL: https://codereview.chromium.org/66343002

git-svn-id: svn://svn.chromium.org/blink/trunk@161592 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: [Elements] Restore scrollTop after hidden DOM tree updates

R=pfeldman@chromium.org, pfeldman, vsevik
BUG=316215

Review URL: https://codereview.chromium.org/66423002

git-svn-id: svn://svn.chromium.org/blink/trunk@161593 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: [StrictTypeChecking] methods

BUG=239771
NOTRY=true

Review URL: https://codereview.chromium.org/58923005

git-svn-id: svn://svn.chromium.org/blink/trunk@161594 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Update the accessibility tree when a modal dialog is opened/closed.

When a node's inertness changes, we must notify the AX tree since
the node may need to be added or removed from the tree.

This patch does the following.
1) When an modal dialog opens/closes, essentially we traverse the AX
tree and call notifyIfIgnoredValueChanged on each object. However, once
an object is found whose ignored value changed, it's not necessary to
descend into its subtree by virtue of the childrenCleared/addChild
mechanism.

An earlier attempt called notifyIfIgnoredValueChanged only on immediate
children of the HTMLBodyElement. This is insufficient because siblings
of <dialog> are roots of newly (or formerly) inert subtrees, and some
objects are not descendants of body due to renderer reparenting (e.g.
modal dialogs).

2) Modifies AXObject::isInertOrAriaHidden to climb the AX tree until an
object with non-null node() is found, when evaluating inertness. This is
necessary because some objects such as one created with
MenuListPopupRole don't have a node, but should be considered inert.

The test for this patch is Chrome-side:
https://codereview.chromium.org/64273003

BUG=304779

Review URL: https://codereview.chromium.org/59663005

git-svn-id: svn://svn.chromium.org/blink/trunk@161595 bbb929c8-8fbe-4397-9dbb-9b2b20218538
ComposedTreeWalker does't have to return a node if an insertion point has no distributed nodes.

A content insertion point never has child nodes if the insertion point has distributed nodes after r161137.

A shadow insertion point may have child nodes even if the insertion point has
no distributed nodes.  We should return 0 in this case because child nodes of the
shadow insertion point must not be treated as fallback elements after r161137.

The relevant spec is:
https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#distributions

BUG=None

Review URL: https://codereview.chromium.org/60203009

git-svn-id: svn://svn.chromium.org/blink/trunk@161596 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove unnecessary step() calls from readystatechange-and-abort.html

BUG=none

Review URL: https://codereview.chromium.org/61753006

git-svn-id: svn://svn.chromium.org/blink/trunk@161597 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make "InsertHTML" and "Indent" commands to handle DOM tree modification during processing

This patch makes "InsertHTML" and "Indent" commands to handle DOM tree modification during processing. When calling Node::insertBefore(), JavaScript may be executed, e.g. <iframe src="javascript:...">, and it modifies DOM tree.

On issue 314469, use-after-free is caused at |startBlock| variable which holds raw Node pointer removed during script execution in ReplaceSelectionCommand::doApply().

Changes for CompositeEditCommand::cloneParagraphUnderNewElement() is similar to ReplaceSelectionCommand::doApply(). |outerNode| is removed during CompositeEditCommand::appendNode(), which inserts <iframe src="javascript:...">.

BUG=314469
TEST=LayoutTests/editing/inserting/insert-with-javascript-protocol-crash.html

Review URL: https://codereview.chromium.org/64103002

git-svn-id: svn://svn.chromium.org/blink/trunk@161598 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Cleanup DateMath.{cpp,h}.

Remove the following unused variables and functions:
- maxECMAScriptTime
- msPerMonth
- parseES5DatePortion()
- parseES5TimePortion()
- parseES5DateFromNullTerminatedCharacters()
- timeClip()

Unexpose the following variables and functions:
- hoursPerDay
- secondsPerHour
- equivalentYearForDST()
- parseDateFromNullTerminatedCharacters(const char*, bool&, int&)
- jsCurrentTime()
- msToDays()
- msToMinutes()
- msToHours()

BUG=

Review URL: https://codereview.chromium.org/60013012

git-svn-id: svn://svn.chromium.org/blink/trunk@161599 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: [TreatReturnedNullStringAs] methods

V. simple change b/c already implemented in type handling.

BUG=239771
NOTRY=true

Review URL: https://codereview.chromium.org/60753003

git-svn-id: svn://svn.chromium.org/blink/trunk@161600 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Remove no longer flaky virtual/web-animations-css/transitions/extra-transition.html from TestExpectations

This test is not longer flaky:
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=extra-transition.html

BUG=

Review URL: https://codereview.chromium.org/62383003

git-svn-id: svn://svn.chromium.org/blink/trunk@161601 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Minor optimization in FrameSelection::setNonDirectionalSelectionIfNeeded().

We can avoid a second call to newSelection.visibleExtent() by maintaining a local
variable for the same.

A call to visibleExtent() further entails computing of VisiblePosition which can
be avoided the second time round.
This change also makes it similar to the handling of newSelection.visibleBase().

Review URL: https://codereview.chromium.org/64323002

git-svn-id: svn://svn.chromium.org/blink/trunk@161602 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Move TreeBoundaryCrossingRules to its own file.

There's no benefit to it being nested inside DocumentRuleSets.
A separate file makes it easier to navigate the code.

Review URL: https://codereview.chromium.org/64443003

git-svn-id: svn://svn.chromium.org/blink/trunk@161603 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Reland: Focus changes should be use affectedBy optimization

This was reverted in https://codereview.chromium.org/61553008/
but after further investigation those flakes appear unrelated
to this change.  Relanding.

Original review by esprehn was done in:
https://codereview.chromium.org/63183004

Previously any time you hide/showed your Chrome window
we would recalcStyle on the entire document (<body> and below).

Similarly whenever you clicked on anything in Chrome
we would recalc style of the entire body (unless the caret
was already somewhere else).  For applications which don't
normally take focus, this meant a zillion extra full-document
style recalcs.

This was especially bad for applications with animation triggered
from click, as those animations would first cause a full document
style recalc before their animation could start.

I don't believe we have any way to count style recalcs in a test
so there is no good way to test this yet.  I could write a
performance microbenchmark, but that would be more like a
regression test since it just tests for the presence of this
optimization.

R=esprehn
BUG=315923

Review URL: https://codereview.chromium.org/64643007

git-svn-id: svn://svn.chromium.org/blink/trunk@161604 bbb929c8-8fbe-4397-9dbb-9b2b20218538
IDL compiler: [Unforgeable] methods

Last extended attribute for methods!
Also refactored two blocks (3-way conditionals) into functions,
which feels simpler and more direct, and added renaming FIXME.

BUG=239771
NOTRY=true

Review URL: https://codereview.chromium.org/64763004

git-svn-id: svn://svn.chromium.org/blink/trunk@161605 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Post-process font-face rules in addRulesFromSheet.

Store the rules as a Vector on RuleSet and then post-process them
after addRulesFromSheet.

RuleSet shouldn't need to know about StyleResolver or scoping nodes.
This is a first step in that direction. In addition to being cleaner,
this will allow us to share RuleSets across CSSSTyleSheets.

Review URL: https://codereview.chromium.org/64843003

git-svn-id: svn://svn.chromium.org/blink/trunk@161606 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Command-B and Command-I should work in contenteditable

All key events with the command key were marked as isSystemKey which
prevents Blink from handling them.

Command-B and Command-I are OS X standard key bindings but OS X doesn't handle them and we don't have them
in the menubar so we need to handle them inside Blink.

I also removed some unused lines from keyDownEntries in EditorClientImpl.cpp.

BUG=308680

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161459

Review URL: https://codereview.chromium.org/39073002

git-svn-id: svn://svn.chromium.org/blink/trunk@161607 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Don't force a style recalc just to clear the selection.

clearRenderViewSelection was a very silly function which
was copy-pasta'd into two files.  In both cases it took
a Position even though it only needed the Document*
and then null-checked RenderView (even though an Active
Document always has a RenderView) and then would update
style (unconditionally) only to clear the selection.

RenderView::setSelection won't update the rendering tree
so it is nice to pass it an up-to-date rendering tree
but in the case of clearing selection we don't care.

This changed one test result as a bi-product of removing
this synchronous style recalc.  My understanding is that
this test was triggering the insertion of empty text
nodes as a result of synchronous style recalc during parsing
(which has been the case in many tests in the past).
It's also possible that this empty text node was the result of
inserting the caret and forcing the creation of a text node
to hold the caret.

In either case, by deferring this unecessary recalc we have
now made this unecessary empty text node go away too.

R=esprehn,ojan
BUG=315854

Review URL: https://codereview.chromium.org/65683004

git-svn-id: svn://svn.chromium.org/blink/trunk@161608 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Clean up/micro-optimize {HTML,SVG}ElementFactory

Avoid unnecessary null checks in ElementFactory by passing in a Document&
and pushing fallback element creation into generated factory functions themselves.

The only noticeable change is that *Element::create methods now must return non-null,
but that seems a reasonable invarient to enforce (and from my inspection of existing
code, it's currently true).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/65713003

git-svn-id: svn://svn.chromium.org/blink/trunk@161609 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix scrollbar corruption on Mac 10.6.

Fix unitialized value.

Don't rely on an overridden virtual function being called in the base
class' constructor.

BUG=309478

Review URL: https://codereview.chromium.org/65773002

git-svn-id: svn://svn.chromium.org/blink/trunk@161610 bbb929c8-8fbe-4397-9dbb-9b2b20218538