Move seamless stylesheet collecting to DocumentStyleSheetCollection
https://bugs.webkit.org/show_bug.cgi?id=100655

Reviewed by Andreas Kling.

Move the code from StyleResolver to DocumentStyleSheetCollection. StyleResolver should focus on resolving style.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
        
    Use standard create() pattern.

(WebCore):
* css/StyleResolver.h:
(StyleResolver):
* dom/Document.cpp:
(WebCore::Document::Document):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::collectActiveCSSStyleSheetsFromSeamlessParents):
        
    Since parent activeAuthorStyleSheets() contains all seamlessly inherited sheets too, this does not need to
    iterate to ancestors anymore.

(WebCore):
(WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::create):
(DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::styleSheetsForStyleSheetList):
(WebCore::DocumentStyleSheetCollection::activeAuthorStyleSheets):
        
    activeAuthorStyleSheets() now includes the stylesheets inherited from the seamless parent too.

(WebCore::DocumentStyleSheetCollection::needsUpdateActiveStylesheetsOnStyleRecalc):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Timeline: make cpu-monitoring feature available only on capable browsers
https://bugs.webkit.org/show_bug.cgi?id=100530

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-10-29
Reviewed by Yury Semikhatsky.

Motivation: cpu-monitoring feature looks like a glitch,
when it is not supported by browser.

Source/WebCore:

* inspector/Inspector.json: Added capability getter to protocol.
* inspector/InspectorClient.h: Added capability getter.
* inspector/InspectorTimelineAgent.cpp: Proxy to request to client.
* inspector/InspectorTimelineAgent.h: Added capability getter.
* inspector/front-end/Settings.js: Added capability field.
* inspector/front-end/TimelinePanel.js: Check capability.
* inspector/front-end/inspector.js: Forward capability value.

Source/WebKit/chromium:

* src/InspectorClientImpl.cpp: Implemented capability getter.
* src/InspectorClientImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Timeline: Overview bars do not correspond to timeline bars
https://bugs.webkit.org/show_bug.cgi?id=100500

Patch by Eugene Klyuchnikov <eustas.bug@gmail.com> on 2012-10-29
Reviewed by Yury Semikhatsky.

Fix: do not shorten bars by nested records of the same category.

* inspector/front-end/TimelineOverviewPane.js: Check added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132789 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix vertical alignment in toolbar backgrounds and overflow button.
https://bugs.webkit.org/show_bug.cgi?id=100373

Patch by Patrick Dubroy <dubroy@chromium.org> on 2012-10-29
Reviewed by Pavel Feldman.

Fix the background image for the selected toolbar item to be vertically centered.
Make close button and toolbar overflow button vertically centered for any toolbar
height.

* inspector/front-end/Toolbar.js: Remove unused variable.
* inspector/front-end/inspector.css:
(.toolbar-item.toggleable):
(body.compact .toolbar-item.toggleable):
(.toolbar-item.toggleable.toggled-on):
(body.compact .toolbar-label):
(#toolbar-dropdown-arrow):
(#close-button-left, #close-button-right):
(.toolbar-item.close-left):
* inspector/front-end/inspector.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Refactoring] Use isActiveInsertionPoint() instead of isInsertionPoint()
https://bugs.webkit.org/show_bug.cgi?id=100459

Reviewed by Hajime Morita.

Checking InsertionPoint and its activeness with two if-statement is error-prone. We would like to
use a utility function which checks both at once.

We rewrite some lines with such function.

No new tests, simple refactoring.

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::traverseNode):
* html/shadow/ContentDistributor.cpp:
(WebCore::ContentDistributor::populate):
(WebCore::ContentDistributor::distribute):
(WebCore::ContentDistributor::distributeNodeChildrenTo):
* html/shadow/InsertionPoint.h:
(WebCore::isInsertionPoint): Since our convention is the argument of this kind of function should not be null,
we would like to make it similar to the other functions.
(WebCore::toInsertionPoint):
(WebCore::isLowerEncapsulationBoundary):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Fix a build error
https://bugs.webkit.org/show_bug.cgi?id=100649

Patch by Robin Cao <robin.cao@torchmobile.com.cn> on 2012-10-29
Reviewed by Kentaro Hara.

r127876 changed the signature of WebCore::EventHandler::hitTestResultAtPoint()
and this commit was later reverted. We need to update a call site in the
BlackBerry port to make it build.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::hitTestResult):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Error/warning count is one pixel off.
https://bugs.webkit.org/show_bug.cgi?id=100660

Reviewed by Pavel Feldman.

The error/warning count div had a top padding of 6. That was one pixel
too many.

* inspector/front-end/inspector.css:
(#error-warning-count):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132793 268f45cc-cd09-0410-ab3c-d52691b4dbfc