Use m_everHadLayout in RenderObject::checkForRepaintDuringLayout()
https://bugs.webkit.org/show_bug.cgi?id=20885

Reviewed by Dan Bernstein.

Source/WebCore:

Fix FIXME in checkForRepaintDuringLayout, making RenderObjects
no longer paint on first layout, but instead require their
parent containers to paint them.
This appears to have fixed one minor SVG overpainting issue
in svg/use-detach-expected.png.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlock):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::checkForRepaintDuringLayout):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren):

LayoutTests:

Updated result.  Appears to be a progression.  I suspect
we were over-drawing the <g> container before and now we're
just drawing the two objects which change.

* platform/chromium-mac/svg/custom/use-detach-expected.png:
* platform/chromium-linux/svg/custom/use-detach-expected.png:
* platform/mac/svg/custom/use-detach-expected.png:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, update TestExpectations for chromium gardening.
https://bugs.webkit.org/show_bug.cgi?id=93589

Mark svg/dom/SVGScriptElement/script-change-externalResourcesRequired-while-loading.svg as slow for Mac10.6 (dbg).

Patch by Takashi Toyoshima <toyoshim@chromium.org> on 2012-08-09

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DOMCharacterDataModified should not be fired inside shadows
https://bugs.webkit.org/show_bug.cgi?id=93427

Reviewed by Ryosuke Niwa.

Source/WebCore:

CharacterData::dispatchModifiedEvent() fires DOMCharacterDataModified event even if
the node is in shadow. But it shouldn't. Check dispatchChildInsertionEvents() and
dispatchChildRemovalEvents() to see how other MutationEvents are suppressed behind shadows.
This change follows the same path to suppress DOMCharacterDataModified.

Tests: fast/dom/shadow/suppress-mutation-events-in-shadow-characterdata.html
       fast/forms/textarea-and-mutation-events-appending-text.html

* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent):

LayoutTests:

Added two tests. This also fixes existing test, which cover the wrong behavior.

* fast/dom/shadow/suppress-mutation-events-in-shadow-characterdata-expected.txt: Added.
* fast/dom/shadow/suppress-mutation-events-in-shadow-characterdata.html: Added.
* fast/events/dom-character-data-modified-textarea-crash.html:
- DOMCharacterDataModified shouldn't be fired in this case.
  Fixed to allow test to terminate without the event.
  Note that The event was fired by <textarea>, which is fixed by this change.
* fast/forms/textarea-and-mutation-events-appending-text-expected.txt: Added.
* fast/forms/textarea-and-mutation-events-appending-text.html: Added.
* svg/custom/tref-nested-events-crash.svg:
- DOMCharacterDataModified shouldn't be fired in this case.
  Fixed to allow test to terminate without the event.
  Note that The event was fired by SVGShadowText, which is just an implentation detail and
  should not be exposed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][Win] Build system bug revealed by r124835
https://bugs.webkit.org/show_bug.cgi?id=93339

Reviewed by Tor Arne Vestbø.

Don't add "LC_ALL=c" on Windows in svnRevisionForDirectory() and in pathRelativeToSVNRepositoryRootForPath().

* Scripts/VCSUtils.pm:
(isWindows): Copied from webkitdirs.pm.
(svnRevisionForDirectory):
(pathRelativeToSVNRepositoryRootForPath):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Pull in the android_tools directory for Android
https://bugs.webkit.org/show_bug.cgi?id=84843

Reviewed by Jochen Eisinger.

Pull in the android_tools directory for Chromium Android checkouts. This
repository, living in Chromium's, contains checked in versions of the
Android NDK and SDK meant to make builds and updates easier.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: improve large array logging experience
https://bugs.webkit.org/show_bug.cgi?id=93499

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Group elements in chunks of 100, not smaller.

* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.FunctionScopeMainTreeElement):
(WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
(WebInspector.ArrayGroupingTreeElement._populateRanges):

LayoutTests:

* inspector/console/console-big-array-expected.txt:
* inspector/console/console-big-array.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: use WebInspector.ProgressIndicator in AdvancedSearchController
https://bugs.webkit.org/show_bug.cgi?id=93362

Reviewed by Vsevolod Vlasov.

- drop custom status bar used in AdvancedSearchController, use WebInspector.ProgressIndicator;
- perform additional cancelation check after invoking searchResultCallback to account for stopSearch called from within callback;
- fix compilation warnings in ProgressBar;

* inspector/front-end/AdvancedSearchController.js:
(WebInspector.SearchView):
(WebInspector.SearchView.prototype.searchStarted):
(WebInspector.SearchView.prototype.addSearchResult):
(WebInspector.SearchView.prototype.searchFinished):
(WebInspector.SearchView.prototype._onCancel):
* inspector/front-end/ProgressBar.js:
(WebInspector.CompositeProgress.prototype.createSubProgress):
* inspector/front-end/ScriptsSearchScope.js:
(WebInspector.ScriptsSearchScope.prototype.performSearch.searchCallbackWrapper):
* inspector/front-end/inspector.css:
(.progress-bar-container progress):
(body.platform-mac .progress-bar-container progress):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Floored and truncated rounded confused.
https://bugs.webkit.org/show_bug.cgi?id=93475

Reviewed by Levi Weintraub.

Source/WebCore:

Fix the common mistake of confusing truncating (round towards zero) and
flooring (round down). They are only identical for positive numbers,
not for negative numbers.

This patch fixes instances of misimplemented or misused floor in the
layout and geometric code. And also uses the new correct implementations
to clean up the code for enclosingRect.

* platform/FractionalLayoutUnit.h:
(WebCore::FractionalLayoutUnit::fromFloatFloor):
(FractionalLayoutUnit):
(WebCore::FractionalLayoutUnit::ceil):
(WebCore::FractionalLayoutUnit::floor):
* platform/graphics/FloatPoint.h:
(WebCore::FloatPoint::FloatPoint):
(WebCore::roundedIntPoint):
(WebCore::flooredIntPoint):
(WebCore::ceiledIntPoint):
(WebCore::flooredIntSize):
* platform/graphics/FloatRect.cpp:
(WebCore::enclosingIntRect):
(WebCore::enclosedIntRect):
* platform/graphics/FloatSize.h:
(WebCore::roundedIntSize):
(WebCore::flooredIntSize):
(WebCore::flooredIntPoint):
* platform/graphics/FractionalLayoutPoint.h:
(WebCore::flooredIntPoint):
(WebCore::flooredFractionalLayoutPoint):
(WebCore::ceiledFractionalLayoutPoint):
* platform/graphics/FractionalLayoutRect.cpp:
(WebCore::enclosingIntRect):
(WebCore::enclosingFractionalLayoutRect):
* platform/graphics/FractionalLayoutSize.h:
(WebCore::flooredIntSize):
* platform/graphics/IntRect.cpp:
(WebCore::IntRect::IntRect):
* rendering/LayoutTypes.h:
(WebCore::flooredLayoutPoint):
(WebCore::floorToInt):
(WebCore::isIntegerValue):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::convertToLayerCoords):

LayoutTests:

* platform/chromium/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: display progress bar while loading timeline data
https://bugs.webkit.org/show_bug.cgi?id=92762

Reviewed by Pavel Feldman.

Source/WebCore:

- display progress while loading timeline data;
- disable status bar buttons while operation is in progress;
- ignore save/load/record while operation is in progress;
- disable context menu items while operation is in progress;
- misc. compilation warning fixes;

* inspector/front-end/ProgressBar.js:
(WebInspector.CompositeProgress.prototype.createSubProgress):
* inspector/front-end/TimelineModel.js:
(WebInspector.TimelineModel.prototype._loadNextChunk):
(WebInspector.TimelineModel.prototype.loadFromFile.parseAndImportData):
(WebInspector.TimelineModel.prototype.loadFromFile.onLoad):
(WebInspector.TimelineModel.prototype.loadFromFile.onError):
(WebInspector.TimelineModel.prototype.loadFromFile.onProgress):
(WebInspector.TimelineModel.prototype.loadFromFile):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype.get statusBarItems):
(WebInspector.TimelinePanel.prototype._createStatusBarItems):
(WebInspector.TimelinePanel.prototype._setOperationInProgress):
(WebInspector.TimelinePanel.prototype._contextMenu):
(WebInspector.TimelinePanel.prototype._saveToFile):
(WebInspector.TimelinePanel.prototype._loadFromFile):
(WebInspector.TimelinePanel.prototype.get _toggleTimelineButtonClicked):
(WebInspector.TimelinePanel.prototype.sidebarResized):
* inspector/front-end/utilities.js: added Array.prototype.select(field) to map array of objects to array containing particular field of each object.

LayoutTests:

- fix loading tests to pass mock progress indicator;

* inspector/timeline/timeline-load-incompatible.html:
* inspector/timeline/timeline-load.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Page popups can show up at wrong locations
https://bugs.webkit.org/show_bug.cgi?id=93556

Reviewed by Kent Tamura.

Source/WebCore:

No new tests. Cannot test popup position.

* html/shadow/CalendarPickerElement.cpp:
(WebCore::CalendarPickerElement::contentSize):

Source/WebKit/chromium:

We were showing the popup at wrong positions. When there isn't enough
room below and above the element it adjusts the position but we weren't
resetting the adjustment when we resize the popup. This patch will make
the popup adjust the popup position each time we resize.

* src/ColorChooserUIController.cpp:
(WebKit::ColorChooserUIController::contentSize):
* src/WebPagePopupImpl.cpp:
(WevKit::PagePopupChromeClient::setWindowRect):
(WebKit::WebPagePopupImpl::init): Use reposition().
(WebKit::WebPagePopupImpl::reposition): Repositions the page popup based on the popup size.
(WebKit):
(WebKit::WebPagePopupImpl::resize): Use reposition().
* src/WebPagePopupImpl.h:
(WebPagePopupImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, update TestExpectations with one more test to rebase after r125167

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening.

* platform/qt-5.0/fast/js/global-constructors-expected.txt:
* platform/qt/Skipped:
* platform/qt/fast/dom/constructed-objects-prototypes-expected.txt:
* platform/qt/fast/events/keyevent-iframe-removed-crash-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r125171.
http://trac.webkit.org/changeset/125171

Broke the Chromium Android build.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-09  Pavel Feldman  <pfeldman@chromium.org>

        Web Inspector: generate preview for the objects dumped into the console upon logging.
        https://bugs.webkit.org/show_bug.cgi?id=35801

        Reviewed by Vsevolod Vlasov.

        As of today, dumping an object (array) into console will result in objects' properties being
        read upon console object expansion (i.e. lazily). This means that dumping the same object while
        mutating it will be hard to debug using the console.

        This change starts generating abbreviated previews for objects / arrays at the moment of their
        logging and passes this information along into the front-end. This only happens when the front-end
        is already opened, it only works for console.log(), not live console interaction.

        Covered by the existing console tests + collections test has been expanded to capture both: pre and post-

        * inspector/ConsoleMessage.cpp:
        (WebCore::ConsoleMessage::addToFrontend):
        * inspector/ConsoleMessage.h:
        (ConsoleMessage):
        * inspector/InjectedScript.cpp:
        (WebCore::InjectedScript::wrapObject):
        * inspector/InjectedScript.h:
        (InjectedScript):
        * inspector/InjectedScriptSource.js:
        (.):
        * inspector/Inspector.json:
        * inspector/InspectorConsoleAgent.cpp:
        (WebCore::InspectorConsoleAgent::enable):
        (WebCore::InspectorConsoleAgent::addConsoleMessage):
        * inspector/front-end/ConsoleMessage.js:
        (WebInspector.ConsoleMessageImpl.prototype._format):
        (WebInspector.ConsoleMessageImpl.prototype._formatParameter):
        (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
        (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArrayOrObject):
        (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
        (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
        (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
        (WebInspector.ConsoleMessageImpl.prototype._printArray):
        (WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
        (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
        * inspector/front-end/DOMExtension.js:
        (Element.prototype.createTextChild):
        * inspector/front-end/ObjectPropertiesSection.js:
        (WebInspector.ObjectPropertiesSection):
        * inspector/front-end/PropertiesSection.js:
        * inspector/front-end/RemoteObject.js:
        (WebInspector.RemoteObject):
        (WebInspector.RemoteObject.fromPayload):
        (WebInspector.RemoteObject.prototype.get preview):
        * inspector/front-end/Section.js:
        * inspector/front-end/inspector.css:
        (.console-group-messages .section .header .title):
        (.section .console-formatted-node):
        (.console-object-preview):
        (.section .properties .name, .event-properties .name, .console-formatted-object .name):

2012-08-09  Pavel Feldman  <pfeldman@chromium.org>

        Web Inspector: generate preview for the objects dumped into the console upon logging.
        https://bugs.webkit.org/show_bug.cgi?id=35801

        Reviewed by Vsevolod Vlasov.

        * inspector/console/command-line-api-inspect-expected.txt:
        * inspector/console/console-dir-expected.txt:
        * inspector/console/console-eval-global-expected.txt:
        * inspector/console/console-eval-global.html:
        * inspector/console/console-format-collections-expected.txt:
        * inspector/console/console-format-collections.html:
        * inspector/console/console-format-expected.txt:
        * inspector/console/console-format.html:
        * inspector/console/console-log-document-proto-expected.txt:
        * inspector/console/console-log-document-proto.html:
        * inspector/console/console-log-toString-object-expected.txt:
        * inspector/debugger/watch-expressions-panel-switch-expected.txt:
        * inspector/elements/event-listener-sidebar-expected.txt:
        * inspector/elements/event-listeners-about-blank-expected.txt:
        * platform/chromium/inspector/console/console-dir-expected.txt:
        * platform/chromium/inspector/console/console-eval-global-expected.txt: Removed.
        * platform/chromium/inspector/console/console-format-collections-expected.txt:
        * platform/chromium/inspector/console/console-format-expected.txt: Removed.
        * platform/chromium/inspector/console/console-log-document-proto-expected.txt:
        * platform/chromium/inspector/debugger/watch-expressions-panel-switch-expected.txt:
        * platform/chromium/inspector/elements/event-listener-sidebar-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening: updated results for 125167.

Patch by Florin Malita <fmalita@chromium.org> on 2012-08-09

* platform/chromium-linux/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt:
* platform/chromium-mac/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt:
* platform/chromium-win/svg/custom/pattern-userSpaceOnUse-userToBaseTransform-expected.txt:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/12035637> 32-bit PluginProcess launches without appropriate DYLD environment variables if UI process is 64-bit only
https://bugs.webkit.org/show_bug.cgi?id=93596

Reviewed by Mark Rowe.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess): Changed to pass the current architecture, rather than
the intended child process architecture, to the DynamicLinkerEnvironmentExtractor constructor.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening: updated Win results for 125160.

Patch by Florin Malita <fmalita@chromium.org> on 2012-08-09

* platform/chromium-win/svg/custom/use-detach-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSHeap and FastMallocStatistics based memory measurement for performance-tests
https://bugs.webkit.org/show_bug.cgi?id=90858

PerformanceTests:

Reviewed Ryosuke Niwa.

Measure the memory usage of the performancetests with the help of the windows.memory.usedJSHeapSize
object and the window.internals.fastMallocStatistics() function call.

* resources/runner.js:
(PerfTestRunner.logStatistics):
(PerfTestRunner.printStatistics):
(PerfTestRunner.storeHeapResults):
(PerfTestRunner.getUsedFastMallocHeap):
(PerfTestRunner.getUsedJSHeap):
(PerfTestRunner.getAndPrintMemoryStatistics):
(PerfTestRunner.ignoreWarmUpAndLog):
(PerfTestRunner.initAndStartLoop):

Tools:

Reviewed by Ryosuke Niwa.

Measure the memory usage of the performancetests with the help of the windows.memory.usedJSHeapSize
object and the window.internals.fastMallocStatistics() function call.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
(PerfTest.parse_output):
(PerfTest.output_statistics):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add memory measurement to balls.html and dromaeorunner.js
https://bugs.webkit.org/show_bug.cgi?id=93617

Reviewed by Adam Barth.

Since we added memory measurement support to performance tests we need to modify these tests.

* Animation/balls.html:
* Dromaeo/resources/dromaeorunner.js:

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