Separate constraining for overhang from fixed-position zooming behavior in scrollOffs...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-19  Simon Fraser  <simon.fraser@apple.com>
2
3         Separate constraining for overhang from fixed-position zooming behavior in scrollOffsetForFixedPosition()
4         https://bugs.webkit.org/show_bug.cgi?id=110267
5
6         Reviewed by Beth Dakin.
7
8         The static scrollOffsetForFixedPosition() function in ScrollingCoordinator did two things;
9         it constrained the scroll position when rubber-banding, and applied the special scaling for
10         fixed position when zoomed.
11         
12         Separate these out so that we can use the rubber-banding constrained elsewhere.
13
14         * page/FrameView.cpp:
15         (WebCore::FrameView::scrollOffsetForFixedPosition): The static function is here now.
16         * page/FrameView.h:
17         * page/scrolling/ScrollingCoordinator.cpp: Code moved to FrameView.
18         * page/scrolling/ScrollingCoordinator.h:
19         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
20         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition): scrollOffsetForFixedPosition()
21         is now on FrameView.
22         * platform/ScrollableArea.cpp:
23         (WebCore::constrainedScrollPosition): Helper to constrain one axis for overhang.
24         (WebCore::ScrollableArea::constrainScrollPositionForOverhang): Static function that
25         can be called by FrameView::scrollOffsetForFixedPosition().
26         * platform/ScrollableArea.h: Static function constrainScrollPositionForOverhang()
27         so we can call it from another thread. Also a member fuction of the same name, which takes
28         the scrollPosition as input (so we can feed it a layer position in a later patch).
29
30 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
31
32         Fix checkThatTokensAreSafeToSendToAnotherThread() now that the preload scanner is enabled
33         https://bugs.webkit.org/show_bug.cgi?id=110258
34
35         Reviewed by Adam Barth.
36
37         We were hitting this ASSERT on numerous tests with the background parser enabled. This copy fixes the assertion.
38
39         No new tests becuase covered by existing tests.
40
41         * html/parser/HTMLResourcePreloader.h:
42         (WebCore::PreloadRequest::setCharset):
43
44 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
45
46         Fix typo: inititatorFor->initiatorFor
47         https://bugs.webkit.org/show_bug.cgi?id=110260
48
49         Reviewed by Adam Barth.
50
51         No new tests because no changed functionality.
52
53         * html/parser/HTMLPreloadScanner.cpp:
54         (WebCore::TokenPreloadScanner::initiatorFor):
55         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
56         * html/parser/HTMLPreloadScanner.h:
57
58 2013-02-19  Tony Chang  <tony@chromium.org>
59
60         Convert 3 settings to use Settings.in
61         https://bugs.webkit.org/show_bug.cgi?id=109875
62
63         Reviewed by Ryosuke Niwa.
64
65         Convert mediaEnabled, applicationChromeMode and DOMPasteAllowed to
66         use Settings.in. They previously had inconsistently named setters.
67
68         No new tests, this is a refactoring.
69
70         * Source/WebCore/WebCore.exp.in: Remove symbols that are now inlined from exports.
71         * Source/WebCore/WebCore.order: Remove symbols that no longer exist.
72         * dom/make_names.pl:
73         (printConstructorInterior): Rename isMediaEnabled to mediaEnabled.
74         (printWrapperFunctions): Rename isMediaEnabled to mediaEnabled.
75         * editing/EditorCommand.cpp:
76         (WebCore::supportedPaste): Rename isDOMPasteAllowed to DOMPasteAllowed.
77         * page/Settings.cpp:
78         (WebCore::Settings::Settings): Remove custom code.
79         * page/Settings.h:
80         (Settings): Remove custom code.
81         * page/Settings.in: Add entries for mediaEnabled, applicationChromeMode and DOMPasteAllowed.
82         * page/make_settings.pl:
83         (setterFunctionName): Expand uppercase rules to include DOM.
84         * rendering/RenderTheme.cpp:
85         (WebCore::RenderTheme::isDefault): Rename inApplicationChromeMode to applicationChromeMode.
86         * rendering/RenderThemeWin.cpp:
87         (WebCore::documentIsInApplicationChromeMode): Rename inApplicationChromeMode to applicationChromeMode.
88
89 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
90
91         [CSS Grid Layout] Refactor the code in preparation of auto placement support
92         https://bugs.webkit.org/show_bug.cgi?id=110244
93
94         Reviewed by Ojan Vafai.
95
96         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
97
98         In order to support auto placement, we need to iterate over the grid items with
99         auto row / column several times. This changes makes us do that in a very simple,
100         not-yet-conformant way. While touching this code, the distinction between grid-auto-flow
101         none and row / column was better drawn (and enforced).
102
103         * rendering/RenderGrid.cpp:
104         (WebCore::RenderGrid::resolveGridPositionFromStyle):
105         Made it illegal to call resolveGridPositionFromStyle if the grid track is auto and
106         grid-auto-flow is not none. This would catch bad use of the function.
107
108         (WebCore::RenderGrid::maximumIndexInDirection):
109         Updated to bail out if the grid track is auto. Also improved the comment.
110
111         (WebCore::RenderGrid::placeItemsOnGrid):
112         Updated the function to do several iterations. Also handled the grid-auto-flow: none
113         case differently as it shouldn't need the extra iteration(s).
114
115 2013-02-19  David Hyatt  <hyatt@apple.com>
116
117         [New Multicolumn] REGRESSION: RenderMultiColumnSets broken by the RenderRegion -> RenderBlock subclassing.
118         https://bugs.webkit.org/show_bug.cgi?id=110239.
119
120         Reviewed by Simon Fraser.
121
122         Test: fast/multicol/newmulticol/column-rules-fixed-height.html
123
124         * rendering/RenderBlock.cpp:
125         (WebCore::RenderBlock::columnRectAt):
126         Make sure the columnGap() in the old multicolumn code is always expressed as a LayoutUnit. This was the
127         one place where it was still an int.
128
129         * rendering/RenderFlowThread.cpp:
130         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
131         Rework the painting of flow thread portions to account for the fact that regions paint at an integral
132         translation. This means you have to construct clipping around that integral destination. Subpixel layout
133         regions did not clip correctly as a result of this issue.
134
135         * rendering/RenderMultiColumnSet.cpp:
136         (WebCore::RenderMultiColumnSet::columnRectAt):
137         Fix the same bug with columnGap() that the old column code has, i.e., one spot where it was an int.
138
139         (WebCore::RenderMultiColumnSet::paintObject):
140         RenderMultiColumnSet should be using paintObject and not paint and it needs to check for visibility
141         and phases now that it is a RenderBlock subclass.
142
143         (WebCore::RenderMultiColumnSet::paintColumnRules):
144         Fix the bug that Opera guys fixed in the old multi-column code. They didn't patch the new code, so this
145         takes care of that.
146
147         * rendering/RenderMultiColumnSet.h:
148         (RenderMultiColumnSet):
149         Change to use paintObject instead of paint.
150
151 2013-02-19  Branimir Lambov  <blambov@google.com>
152
153         Fix 'slice' aspect ratio calculation
154         https://bugs.webkit.org/show_bug.cgi?id=99984
155
156         Reviewed by Dirk Schulze.
157
158         Previously the calculation for the 'slice' aspect ratio would incorrectly calculate the
159         source rect location based on the destination rect offset. This caused our source rect to be
160         incorrect, and sometimes render outside the visible area completely. After this patch
161         our implementation matches the implementation of both Gecko and Presto.
162
163         The relevant spec section:
164         http://www.w3.org/TR/SVG/single-page.html#coords-PreserveAspectRatioAttribute
165
166         Tests: svg/as-image/image-preserveAspectRatio-all.svg
167                svg/filters/feImage-preserveAspectRatio-all.svg
168
169         * svg/SVGPreserveAspectRatio.cpp:
170         (WebCore::SVGPreserveAspectRatio::transformRect):
171
172 2013-02-19  Kentaro Hara  <haraken@google.com>
173
174         [V8] ScriptRunner::runCompiledScript() should return Handle<Value>() when OOM occurs
175         https://bugs.webkit.org/show_bug.cgi?id=110254
176
177         Reviewed by Adam Barth.
178
179         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=176951
180
181         Currently ScriptRunner::runCompiledScript() calls
182         ASSERT(script.IsEmpty()) when OOM occurs. The Chromium bug is
183         hitting the ASSERT(). The ASSERT() does not make sense at all.
184         Instead, we should return an empty handle when OOM occurs.
185
186         No tests. The bug happens only when OOM occurs.
187
188         * bindings/v8/ScriptRunner.cpp:
189         (WebCore::ScriptRunner::runCompiledScript):
190
191 2013-02-19  Elliott Sprehn  <esprehn@chromium.org>
192
193         Support both MutationObserver and WebKitMutationObserver
194         https://bugs.webkit.org/show_bug.cgi?id=109776
195
196         Reviewed by Ojan Vafai.
197
198         We should allow new MutationObserver now that we support parser generated
199         mutations. This leaves the old prefixed constructor in until we decide
200         people don't depend on it.
201
202         Test: fast/dom/MutationObserver/mutation-observer-prefix.html
203
204         * page/DOMWindow.idl:
205
206 2013-02-19  Elliott Sprehn  <esprehn@chromium.org>
207
208         Remove RenderText::updateText
209         https://bugs.webkit.org/show_bug.cgi?id=109991
210
211         Reviewed by Eric Seidel.
212
213         There's no reason for the generic RenderText::updateText virtual hook
214         anymore now that r143060 made RenderQuote stop setting dirty bits during
215         layout since the hook is only used by RenderCounter.
216
217         Instead add updateCounterIfNeeded and make it clear this is a hack for
218         counters.
219
220         * rendering/RenderBlockLineLayout.cpp:
221         (WebCore::updateCounterIfNeeded): Added, not handles the counter specific hack.
222         (WebCore::dirtyLineBoxesForRenderer):
223         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
224         * rendering/RenderCounter.cpp:
225         (WebCore::RenderCounter::updateCounter):
226         * rendering/RenderCounter.h:
227         (RenderCounter):
228         * rendering/RenderQuote.cpp:
229         (WebCore::RenderQuote::styleDidChange):
230         (WebCore::RenderQuote::updateDepth):
231         * rendering/RenderQuote.h:
232         (RenderQuote):
233         * rendering/RenderText.h:
234         (RenderText):
235
236 2013-02-19  Tony Chang  <tony@chromium.org>
237
238         Border changes on tables with collapsed borders doesn't relayout table cells
239         https://bugs.webkit.org/show_bug.cgi?id=109774
240
241         Reviewed by David Hyatt.
242
243         Test: fast/table/border-collapsing/dynamic-border-width-change.html
244
245         Changes to border top and border bottom on table rows also changes the size
246         of the table cell causing a relayout to be needed.
247
248         * rendering/RenderTableRow.cpp:
249         (WebCore::borderWidthChanged): Also include border top and bottom.
250         (WebCore::RenderTableRow::styleDidChange): Remove logical from the helper function name.
251
252 2013-02-19  Kentaro Hara  <haraken@chromium.org>
253
254         Unreviewed. Rebaselined run-bindings-tests.
255
256         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
257         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
258         * bindings/scripts/test/JS/JSTestObj.cpp:
259         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
260
261 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
262
263         [GTK][AC] Implement matrix transform animation with clutter ac backend
264         https://bugs.webkit.org/show_bug.cgi?id=109848
265
266         Reviewed by Gustavo Noronha Silva.
267
268         Clutter 1.12 doesn't support additive transform animations yet, so the combination
269         of two or more transformations(such as rotation after translation) runs unexpectedly.
270         So we use a matrix transformation instead for the case.
271
272         Covered by existing animation tests.
273
274         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
275         (WebCore::getValueFunctionNameForTransformOperation):
276         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
277         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
278         (WebCore::toClutterActorPropertyString): Add actor property "transform"
279         (WebCore::clutterMatrixProgress): Handle interpolation between two matrices instead of default clutter_matrix_progress.
280         (WebCore):
281         (WebCore::PlatformClutterAnimation::supportsAdditiveValueFunction):
282         (WebCore::PlatformClutterAnimation::setFromValue): for TransformationMatrix.
283         (WebCore::PlatformClutterAnimation::setToValue): ditto.
284         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
285         (WebCore::PlatformClutterAnimation::addTransformTransition):
286         * platform/graphics/clutter/PlatformClutterAnimation.h:
287         (PlatformClutterAnimation):
288         * platform/graphics/clutter/TransformationMatrixClutter.cpp: Add copy constructor for CoglMatrix.
289         (WebCore::TransformationMatrix::TransformationMatrix):
290         (WebCore):
291         * platform/graphics/transforms/TransformationMatrix.h:
292         (TransformationMatrix):
293
294 2013-02-19  Kassy Coan  <kassycoan@chromium.org>
295
296         Update FeatureObserver on top level navigation in addition to page destruction.
297         https://bugs.webkit.org/show_bug.cgi?id=109874
298
299         Reviewed by Adam Barth.
300
301         No new tests. Only effect is to histogram more frequently.
302
303         * loader/FrameLoader.cpp:
304         (WebCore::FrameLoader::dispatchDidCommitLoad):
305         * page/FeatureObserver.cpp:
306         (WebCore::FeatureObserver::~FeatureObserver):
307         (WebCore):
308         (WebCore::FeatureObserver::updateMeasurements):
309         (WebCore::FeatureObserver::didCommitLoad):
310         * page/FeatureObserver.h:
311         (FeatureObserver):
312
313 2013-02-19  Morten Stenshorne  <mstensho@opera.com>
314
315         Remove unnecessary (and problematic) copy-constructor from LayoutUnit
316         https://bugs.webkit.org/show_bug.cgi?id=110121
317
318         This copy constructor does what a default copy constructor would do, so
319         it's not necessary. Furthermore, this copy constructor is the only
320         reason why LayoutUnit becomes non-POD, and that triggers a gdb bug,
321         making it impossible to do things like "print location()" when inside
322         some RenderBlock, for instance.
323
324         Gdb bug http://sourceware.org/bugzilla/show_bug.cgi?id=15154 reported.
325
326         Reviewed by Benjamin Poulain.
327
328         No tests. Apart from dealing with buggy debuggers, this is just code cleanup.
329
330         * platform/LayoutUnit.h:
331
332 2013-02-19  Emil A Eklund  <eae@chromium.org>
333
334         LayoutUnit::epsilon shouldn't be necessary to place floats
335         https://bugs.webkit.org/show_bug.cgi?id=94000
336
337         Reviewed by Levi Weintraub.
338         
339         Currently, to get float placement correct, we need to have an
340         epsilon tolerance in RenderBlock::computeLogicalLocationForFloat
341         for the width of the line to fit them on. This really shouldn't
342         be necessary, and probably indicates we're losing precision
343         elsewhere.
344         
345         Remove epsilon as it no longer appears to be needed. All layout
346         tests pass without it.
347
348         No new tests, covered by existing tests.
349
350         * rendering/RenderBlock.cpp:
351         (WebCore::RenderBlock::computeLogicalLocationForFloat):
352
353 2013-02-19  Tim Volodine  <timvolodine@chromium.org>
354
355         Text Autosizing: prevent oscillation of font sizes during autosizing
356         https://bugs.webkit.org/show_bug.cgi?id=108205
357
358         Reviewed by Kenneth Rohde Christiansen.
359
360         On some websites autosized font-sizes oscillate due to layouts caused by
361         hovering or incremental page loading (and on other sites font sizes do
362         eventually stabilize, but it takes many layouts before they reach a steady
363         size). To prevent all these cases, we no longer allow the autosizing
364         multiplier to change after it has been set (to a value other than 1).
365
366         This won't always give exactly the same results, but testing on 2000 top
367         sites shows that this makes little difference in practice, and it prevents
368         these very jarring cases. As a happy side-effect, this speeds up layouts
369         as font sizes change less.
370
371         Test: fast/text-autosizing/oscillation-javascript-fontsize-change.html
372
373         * page/FrameView.cpp:
374         (WebCore::FrameView::setFrameRect):
375         * page/Settings.cpp:
376         (WebCore::Settings::setTextAutosizingFontScaleFactor):
377         * rendering/TextAutosizer.cpp:
378         (WebCore::TextAutosizer::recalculateMultipliers):
379         (WebCore):
380         (WebCore::TextAutosizer::processContainer):
381         * rendering/TextAutosizer.h:
382         (TextAutosizer):
383
384 2013-02-19  Youenn Fablet  <youennf@gmail.com>
385
386         [EFL][DRT] http/tests/loading/307-after-303-after-post.html times out
387         https://bugs.webkit.org/show_bug.cgi?id=93214
388
389         Ensured that GET verb is consistently used for any request
390         coming after a redirection that triggers switching to GET.
391
392         Reviewed by Martin Robinson.
393
394         * platform/network/soup/ResourceHandleSoup.cpp:
395         (WebCore::doRedirect):
396
397 2013-02-19  Andras Becsi  <andras.becsi@digia.com>
398
399         [Qt] Fix compilation if Qt was configured with -no-rtti
400         https://bugs.webkit.org/show_bug.cgi?id=110234
401
402         Reviewed by Noam Rosenthal.
403
404         Availability of dynamic_cast should be checked.
405
406         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
407         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
408
409 2013-02-18  Alexey Proskuryakov  <ap@apple.com>
410
411         Unregistered blob URLs have incorrect MIME type
412         https://bugs.webkit.org/show_bug.cgi?id=110166
413
414         Reviewed by Sam Weinig.
415
416         * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::shouldUseInnerURL): Added a FIXME.
417
418         * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponseOnError):
419         Pass an accurate MIME type (for a delegate to see).
420
421 2013-02-19  Joshua Bell  <jsbell@chromium.org>
422
423         IndexedDB: additional checks on LevelDB decoding
424         https://bugs.webkit.org/show_bug.cgi?id=109711
425
426         Reviewed by Tony Chang.
427
428         Watch out for decoding errors caused by corrupted data, and exit various
429         decode/compare operations earlier.
430
431         Covered by existing LayoutTests and Chromium's webkit_unit_tests
432
433         * Modules/indexeddb/IDBLevelDBCoding.cpp:
434         (WebCore::IDBLevelDBCoding::decodeStringWithLength): Bail if length is negative.
435         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): Distinguish error case.
436         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): Bail if length is negative.
437         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): Distinguish error case.
438         (WebCore::IDBLevelDBCoding::compare): Plumb through "ok".
439         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare): Ditto.
440         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare): Ditto.
441         (WebCore::IDBLevelDBCoding::IndexDataKey::compare): Ditto.
442         * Modules/indexeddb/IDBLevelDBCoding.h: Updated method signatures.
443
444 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
445
446         [GTK][AC] Implement keyframe animations with clutter ac backend
447         https://bugs.webkit.org/show_bug.cgi?id=110057
448
449         Reviewed by Gustavo Noronha Silva.
450
451         This patch brings accelerated keyframe animation with clutter to WebKitGtk+.
452         Changes of GraphicsLayerClutter are based on GraphicsLayerCA. But major changes
453         of PlatformClutterAnimation are implemented with clutter keyframe transition apis.
454         See http://developer.gnome.org/clutter/stable/ClutterKeyframeTransition.html
455
456         Covered by existing animation tests.
457
458         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
459         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
460         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
461         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
462         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
463         (WebCore::toClutterActorPropertyString):
464         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
465         (WebCore::PlatformClutterAnimation::setTimingFunction):
466         (WebCore::PlatformClutterAnimation::setValues):
467         (WebCore::PlatformClutterAnimation::setKeyTimes):
468         (WebCore::PlatformClutterAnimation::setTimingFunctions):
469         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
470         (WebCore):
471         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
472         (WebCore::PlatformClutterAnimation::addOpacityTransition):
473         (WebCore::PlatformClutterAnimation::addTransformTransition):
474         (WebCore::PlatformClutterAnimation::addAnimationForKey):
475         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
476         * platform/graphics/clutter/PlatformClutterAnimation.h:
477         (PlatformClutterAnimation):
478
479 2013-02-19  Claudio Saavedra  <csaavedra@igalia.com>
480
481         [harfbuzz] Crash in harfbuzz related code
482         https://bugs.webkit.org/show_bug.cgi?id=110145
483
484         Reviewed by Martin Robinson.
485
486         Patch by Behdad Esfahbod <behdad@google.com>
487
488         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
489         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Ask harfbuzz
490         to guess the segment properties.
491
492 2013-02-19  Pavel Podivilov  <podivilov@chromium.org>
493
494         Web Inspector: release backtrace object group on each step.
495         https://bugs.webkit.org/show_bug.cgi?id=110223
496
497         Reviewed by Pavel Feldman.
498
499         * inspector/InspectorDebuggerAgent.cpp:
500         (WebCore):
501         (WebCore::InspectorDebuggerAgent::stepOver):
502         (WebCore::InspectorDebuggerAgent::stepInto):
503         (WebCore::InspectorDebuggerAgent::stepOut):
504
505 2013-02-19  Sheriff Bot  <webkit.review.bot@gmail.com>
506
507         Unreviewed, rolling out r142975.
508         http://trac.webkit.org/changeset/142975
509         https://bugs.webkit.org/show_bug.cgi?id=110225
510
511         Introduces hard-to-reproduce crashes upon inspected page
512         navigation on Mac (Requested by apavlov on #webkit).
513
514         * dom/DocumentStyleSheetCollection.cpp:
515         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
516         * inspector/Inspector.json:
517         * inspector/InspectorCSSAgent.cpp:
518         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
519         (WebCore::InspectorCSSAgent::clearFrontend):
520         (WebCore::InspectorCSSAgent::enable):
521         (WebCore::InspectorCSSAgent::getAllStyleSheets):
522         (WebCore::InspectorCSSAgent::collectStyleSheets):
523         (WebCore::InspectorCSSAgent::bindStyleSheet):
524         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
525         (WebCore::InspectorCSSAgent::detectOrigin):
526         (WebCore::InspectorCSSAgent::buildObjectForRule):
527         * inspector/InspectorCSSAgent.h:
528         (InspectorCSSAgent):
529         * inspector/InspectorInstrumentation.cpp:
530         (WebCore):
531         * inspector/InspectorInstrumentation.h:
532         (WebCore):
533         (InspectorInstrumentation):
534         * inspector/front-end/CSSStyleModel.js:
535         (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
536         (WebInspector.CSSStyleModelResourceBinding.prototype.):
537         (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
538         (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
539         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetIdForResource):
540         (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders):
541         (WebInspector.CSSStyleModelResourceBinding.prototype.headersLoaded):
542         (WebInspector.CSSStyleModelResourceBinding.prototype._requestViaInspectorResource):
543         (WebInspector.CSSStyleModelResourceBinding.prototype._getOrCreateInspectorResource):
544         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
545         * inspector/front-end/SASSSourceMapping.js:
546         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
547         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
548         * inspector/front-end/StylesSidebarPane.js:
549         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback):
550         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
551         * inspector/front-end/StylesSourceMapping.js:
552         (WebInspector.StyleContentBinding.prototype.callback):
553         (WebInspector.StyleContentBinding.prototype.setStyleContent):
554         (WebInspector.StyleContentBinding.prototype.):
555         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
556
557 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
558
559         RenderGrid::computedUsedBreadthOfGridTracks can read past m_grid's size
560         https://bugs.webkit.org/show_bug.cgi?id=110126
561
562         Reviewed by Ojan Vafai.
563
564         The issue comes from how we store the column information inside m_grid.
565         Because m_grid is a Vector of rows, we could lose the column information
566         if we had no row, no grid item but some columns defined in CSS. As the
567         logic would assume that our row / column size would be greater than what
568         the style defines explicitely, we would access past our Vector's boundary.
569
570         The fix is to ensure that we have at least a row so that we can store the
571         column information in every case. This fix is overly broad as it also forces
572         the grid to have one column, which shouldn't be an issue.
573
574         Test: fast/css-grid-layout/grid-element-empty-row-column.html
575
576         * rendering/RenderGrid.cpp:
577         (WebCore::RenderGrid::maximumIndexInDirection):
578         Forced this function to return at least one as the maximum index so that
579         m_grid has at least one row / column.
580
581         (WebCore::RenderGrid::placeItemsOnGrid):
582         Added a ASSERT that m_grid is bigger than the explicit grid-rows / grid-columns.
583         Also changed an existing ASSERT to use gridWasPopulated for consistency and changed
584         the code not to call gridRowCount as it would ASSERT (we are in the middle of populating
585         the grid).
586
587         * rendering/RenderGrid.h:
588         (WebCore::RenderGrid::gridWasPopulated):
589         Added this helper function.
590
591         (WebCore::RenderGrid::gridColumnCount):
592         Replaced a now unneeded branch with an ASSERT. As placeItemsOnGrid should be called
593         prior to read m_grid, this change should be fine.
594
595         (WebCore::RenderGrid::gridRowCount):
596         Added an ASSERT.
597
598 2013-02-19  Sergio Villar Senin  <svillar@igalia.com>
599
600         [Soup] Use synchronous calls to close completely processed streams
601         https://bugs.webkit.org/show_bug.cgi?id=107432
602
603         Reviewed by Martin Robinson.
604
605         There is no need to close already processed streams in asynchronous
606         calls since they won't block. Using the synchronous call will save
607         us some code and unnecessary asynchronous burden. This is kind of
608         a code refactor so no new tests needed.
609
610         * platform/network/soup/ResourceHandleSoup.cpp:
611         (WebCore):
612         (WebCore::redirectSkipCallback):
613         (WebCore::readCallback):
614
615 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
616
617         Web Inspector: [Canvas] use timeline's didBeginFrame for marking frame end calls
618         https://bugs.webkit.org/show_bug.cgi?id=110130
619
620         Reviewed by Pavel Feldman.
621
622         In Web Inspector canvas profiler use timeline's didBeginFrame for marking frame end calls instead of an ad-hoc timeout-based solution.
623
624         * inspector/InjectedScriptCanvasModule.cpp:
625         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
626         (WebCore):
627         * inspector/InjectedScriptCanvasModule.h:
628         (InjectedScriptCanvasModule):
629         * inspector/InjectedScriptCanvasModuleSource.js:
630         (.):
631         * inspector/InspectorCanvasAgent.cpp:
632         (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
633         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
634         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
635         (WebCore::InspectorCanvasAgent::frameNavigated):
636         (WebCore::InspectorCanvasAgent::didBeginFrame):
637         (WebCore):
638         * inspector/InspectorCanvasAgent.h:
639         (InspectorCanvasAgent):
640         * inspector/InspectorController.cpp:
641         (WebCore::InspectorController::didBeginFrame):
642
643 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
644
645         Web Inspector: Decouple various file system project implementation parts for better testability and cover with tests.
646         https://bugs.webkit.org/show_bug.cgi?id=110204
647
648         Reviewed by Pavel Feldman.
649
650         Extracted FileSystemWorkspaceProvider from IsolatedFileSystemManager to take care of managing workspace projects and projectDelegates.
651         Replaced FileMapping.urlForURI with urlForPath method that does not need any information about workspace structure anymore.
652
653         Test: inspector/file-system-project.html
654
655         * inspector/front-end/FileMapping.js:
656         (WebInspector.FileMapping.prototype.urlForPath):
657         * inspector/front-end/FileSystemProjectDelegate.js:
658         (WebInspector.FileSystemProjectDelegate):
659         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
660         (WebInspector.FileSystemProjectDelegate.prototype.populate):
661         (WebInspector.FileSystemWorkspaceProvider):
662         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
663         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
664         * inspector/front-end/IsolatedFileSystem.js:
665         (WebInspector.IsolatedFileSystem):
666         (WebInspector.IsolatedFileSystem.prototype.name):
667         (WebInspector.IsolatedFileSystem.prototype.rootURL):
668         * inspector/front-end/IsolatedFileSystemManager.js:
669         (WebInspector.IsolatedFileSystemManager):
670         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
671         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
672         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
673         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
674         * inspector/front-end/inspector.js:
675
676 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
677
678         Web Inspector: [Canvas] do not replace replay image with spinner icon
679         https://bugs.webkit.org/show_bug.cgi?id=110213
680
681         Reviewed by Pavel Feldman.
682
683         Otherwise it's visually hard to see changes in the replay image. Instead show a small spinner icon in the bottom right corner.
684
685         * inspector/front-end/CanvasProfileView.js:
686         (WebInspector.CanvasProfileView):
687         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
688         * inspector/front-end/canvasProfiler.css:
689         (#canvas-replay-image-container):
690         (.canvas-debug-info):
691         (.canvas-spinner-icon):
692
693 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
694
695         Web Inspector: [Canvas] UI: tweak replay control buttons behavior
696         https://bugs.webkit.org/show_bug.cgi?id=110207
697
698         Reviewed by Pavel Feldman.
699
700         New behavior for control buttons in the Canvas profiler.
701         - The NextCall button (~StepInto) on a node group should expand it and move into its first child (instead of expanding and moving into the next node group)
702         - The NextDrawCall button (~StepOver) should move to a next node that has children (instead of just iterating call group nodes, ignoring frame nodes).
703         - The ReplayLast button should select the last expanded node (instead of always selecting last frame group node).
704
705         * inspector/front-end/CanvasProfileView.js:
706         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
707         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
708         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
709
710 2013-02-19  Andrei Bucur  <abucur@adobe.com>
711
712         [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo
713         https://bugs.webkit.org/show_bug.cgi?id=109914
714
715         Reviewed by David Hyatt.
716
717         This patch moves a part of the invalidation operations inside the RenderFlowThread::invalidateRegions call. The maps
718         are cleared anyway at layout time but doing this earlier makes sure the flow thread is in a more consistent state
719         (the RenderFlowThread object has both the region chain invalidated and the regions information cleared).
720
721         RenderFlowThread::removeRenderBoxRegionInfo will check if the region chain is invalidated. If true, it means the
722         flow thread has a layout scheduled and the regions information is not yet reliable. In this case we just return from the
723         function and wait for the layout to cleanup the box information.
724
725         Test: fast/regions/remove-box-info-assert.html
726
727         * rendering/RenderFlowThread.cpp:
728         (WebCore::RenderFlowThread::removeRegionFromThread):
729         (WebCore::RenderFlowThread::invalidateRegions):
730         (WebCore):
731         (WebCore::RenderFlowThread::layout):
732         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
733         * rendering/RenderFlowThread.h:
734         * rendering/RenderNamedFlowThread.cpp:
735         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
736
737 2013-02-19  Alberto Garcia  <agarcia@igalia.com>
738
739         Fix build broekn by r142988.
740         https://bugs.webkit.org/show_bug.cgi?id=109530
741
742         Unreviewed. Build fix.
743
744         Properly add shortMonthFormat() to the LocaleNone class.
745
746         * platform/text/LocaleNone.cpp:
747         (LocaleNone):
748         (WebCore::LocaleNone::shortMonthFormat):
749
750 2013-02-19  Anton Vayvod  <avayvod@chromium.org>
751
752         [Text Autosizing] Combine narrow descendants of a cluster into groups that should be autosized with the same multiplier.
753         https://bugs.webkit.org/show_bug.cgi?id=109825
754
755         Enhancement of the approach introduced in https://bugs.webkit.org/show_bug.cgi?id=109573.
756         Instead of using the same text size multiplier for all narrow descendants of any autosizing
757         cluster, group the descendants by how much narrower they are than the cluster's
758         |blockContainingAllText| and process each group separately with a different multiplier for
759         each one.
760         For example, we want nested comments on the page to be autosized as a group but separately
761         from a sidebar on the same page.
762
763         Reviewed by Kenneth Rohde Christiansen.
764
765         Updated the existing test to verify the patch.
766
767         * rendering/TextAutosizer.cpp:
768         (WebCore::TextAutosizer::processClusterInternal):
769
770             Splits the narrow descendants of the autosizing cluster into groups before processing
771             each group individually.
772
773         (WebCore::TextAutosizer::getNarrowDescendantsGroupedByWidth):
774
775             Sorts the narrow descendants of the given cluster into groups, combining them by the
776             difference between their content widths. If sorted by width, two consecutive nodes
777             belong to the same group if their width difference is no greater than 100 CSS units.
778
779         * rendering/TextAutosizer.h:
780
781             New method definitions.
782
783 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
784
785         Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
786         https://bugs.webkit.org/show_bug.cgi?id=110124
787
788         Reviewed by Yury Semikhatsky.
789
790         Publish userProvidedName into grid node.
791
792         * inspector/front-end/HeapSnapshotGridNodes.js:
793         (WebInspector.HeapSnapshotGenericObjectNode):
794         (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
795         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
796         * inspector/front-end/HeapSnapshotProxy.js:
797         (WebInspector.HeapSnapshotWorker):
798         * inspector/front-end/NativeHeapSnapshot.js:
799         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
800
801 2013-02-19  Arpita Bahuguna  <a.bah@samsung.com>
802
803         Caret is not displayed when trying to focus inside a contenteditable element containing an empty block.
804         https://bugs.webkit.org/show_bug.cgi?id=108053
805
806         Reviewed by Ryosuke Niwa.
807
808         Test: editing/selection/caret-in-div-containing-empty-block.html
809
810         * rendering/RenderBox.cpp:
811         (WebCore::RenderBox::localCaretRect):
812         When trying to compute the caret rect for the contenteditable div, the
813         border and the padding were not considered. Because of this, for the
814         given test case, which had a border defined on the containing div, the
815         caret was being painted just atop the border, thereby masking it.
816
817         Have modified the code to ensure that the computed caret rect takes
818         into account the border and padding (if any) specified on the box, but only
819         if the node doesn't have content that shall be skipped for editing.
820
821         We do not add border and padding while computing the caret rect for any
822         element that either has no content or has content that shall be skipped
823         for editing purposes. This holds true for table elements as well.
824
825         This helps avoid the caret displacement previsouly observed before/after
826         any controls placed within the contenteditable box, when considering
827         border and padding in computation of the caret rect.
828
829 2013-02-19  Mihnea Ovidenie  <mihnea@adobe.com>
830
831         CSSRegions: crash positioned object with inline containing block in flow thread
832         https://bugs.webkit.org/show_bug.cgi?id=108307
833
834         Reviewed by David Hyatt.
835
836         The fix for https://bugs.webkit.org/show_bug.cgi?id=69896 allowed positioned blocks work
837         with variable width regions. However, the information needed for that is available only
838         when the container used for positioning is a block.
839
840         This patch ensures we are using this solution only when the container used for positioning
841         is a block. This needs to be revisited when we will extend support for other types of boxes
842         as mentioned in RenderBox::renderBoxRegionInfo.
843
844         Test: fast/regions/positioned-object-inline-cb-crash.html
845
846         * rendering/RenderBox.cpp:
847         (WebCore::RenderBox::renderBoxRegionInfo):
848         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
849         (WebCore::RenderBox::computePositionedLogicalWidth): Make sure we are using containerBlocks
850         that are blocks. Add an assert that the type of containerBlock we are using can have
851         computed RenderBoxRegionInfo.
852         (WebCore::RenderBox::computePositionedLogicalHeight):
853         * rendering/RenderBoxModelObject.h:
854         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion): This helper method
855         will return the boxes that may have computed RenderBoxRegionInfo. Currently,
856         returns true for blocks only.
857
858 2013-02-19  Ryosuke Niwa  <rniwa@webkit.org>
859
860         Yet anther JSC build fix after r143304.
861
862         * bindings/js/JSDOMBinding.h:
863         (WebCore::argumentOrNull):
864
865 2013-02-19  Kentaro Hara  <haraken@chromium.org>
866
867         Unreviewed build fix. Fixed warning caused by r143305.
868
869         * bindings/scripts/CodeGeneratorJS.pm:
870         (GenerateParametersCheck):
871         * bindings/scripts/CodeGeneratorV8.pm:
872         (GenerateParametersCheck):
873
874 2013-02-19  Kentaro Hara  <haraken@chromium.org>
875
876         Unreviewed build fix after r143304.
877
878         * bindings/js/JSDOMBinding.h:
879         (WebCore::argumentOrNull):
880
881 2013-02-19  Kentaro Hara  <haraken@chromium.org>
882
883         [V8] Remove redundant usage of MAYBE_MISSING_PARAMETER() macro
884         https://bugs.webkit.org/show_bug.cgi?id=109899
885
886         Reviewed by Adam Barth.
887
888         Currently:
889
890         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined) returns args[index].
891         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsNullString) returns Local<Value>()
892         if args[index] is missing (i.e. the length of |args| is less than |index|).
893         It returns args[index] otherwise.
894
895         No one other than CodeGeneratorV8.pm uses
896         MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined). Instead, we simply use
897         args[index]. We should remove the redundant usage from CodeGeneratorV8.pm too.
898         The long-name macro has been making generated code less readable.
899
900         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
901
902         No tests. No change in behavior.
903
904         * bindings/scripts/CodeGeneratorV8.pm:
905         (GenerateParametersCheck):
906         * bindings/scripts/test/V8/V8Float64Array.cpp:
907         (WebCore::Float64ArrayV8Internal::fooCallback):
908         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
909         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
910         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
911         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
912         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
913         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
914         (WebCore::TestEventTargetV8Internal::itemCallback):
915         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
916         * bindings/scripts/test/V8/V8TestInterface.cpp:
917         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
918         (WebCore::V8TestInterface::constructorCallback):
919         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
920         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
921         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
922         (WebCore::V8TestNamedConstructorConstructorCallback):
923         * bindings/scripts/test/V8/V8TestObj.cpp:
924         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
925         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
926         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
927         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
928         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
929         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
930         (WebCore::TestObjV8Internal::optionsObjectCallback):
931         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
932         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
933         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
934         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
935         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
936         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
937         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
938         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
939         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
940         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
941         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
942         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
943         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
944         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
945         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
946         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
947         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
948         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
949         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
950         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
951         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
952         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
953         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
954         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
955         (WebCore::TestObjV8Internal::domStringListFunctionCallback):
956         (WebCore::TestObjV8Internal::convert1Callback):
957         (WebCore::TestObjV8Internal::convert2Callback):
958         (WebCore::TestObjV8Internal::convert4Callback):
959         (WebCore::TestObjV8Internal::convert5Callback):
960         (WebCore::TestObjV8Internal::strictFunctionCallback):
961         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
962         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
963         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
964         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
965         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
966         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
967         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
968         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
969         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
970         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
971         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
972         (WebCore::TestTypedefsV8Internal::funcCallback):
973         (WebCore::TestTypedefsV8Internal::setShadowCallback):
974         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
975         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
976         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
977         (WebCore::TestTypedefsV8Internal::stringArrayFunction2Callback):
978         (WebCore::V8TestTypedefs::constructorCallback):
979         * bindings/v8/V8BindingMacros.h:
980         (WebCore):
981         * bindings/v8/custom/V8HistoryCustom.cpp:
982         (WebCore::V8History::pushStateCallbackCustom):
983         (WebCore::V8History::replaceStateCallbackCustom):
984
985 2013-02-19  Kentaro Hara  <haraken@chromium.org>
986
987         [JSC] MAYBE_MISSING_PARAMETER(..., DefaultIsNullString) macro is redundant
988         https://bugs.webkit.org/show_bug.cgi?id=109902
989
990         Reviewed by Adam Barth.
991
992         Currently:
993
994         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined)
995           returns exec->argument(index).
996         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsNullString)
997           returns JSValue() if exec->argument(index) is missing
998           (i.e. the length of the argument is less than index).
999           It returns exec->argument(index) otherwise.
1000
1001         No one other than CodeGeneratorJS.pm uses
1002         MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined).
1003         Instead, we simply use exec->argument(index). We should remove
1004         the redundant usage in CodeGeneratorJS.pm too. The long-name macro
1005         has been making generated code less readable.
1006
1007         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
1008
1009         c.f. corresponding V8 bug: https://bugs.webkit.org/show_bug.cgi?id=109899
1010
1011         No tests. No change in behavior.
1012
1013         * bindings/js/JSDOMBinding.h:
1014         (WebCore):
1015         * bindings/scripts/CodeGeneratorJS.pm:
1016         (GenerateParametersCheck):
1017         * bindings/scripts/test/JS/JSFloat64Array.cpp:
1018         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
1019         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1020         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
1021         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1022         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1023         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1024         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1025         (WebCore::jsTestEventTargetPrototypeFunctionItem):
1026         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
1027         * bindings/scripts/test/JS/JSTestInterface.cpp:
1028         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
1029         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1030         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1031         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1032         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1033         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
1034         * bindings/scripts/test/JS/JSTestObj.cpp:
1035         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1036         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1037         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1038         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1039         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1040         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1041         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1042         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1043         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
1044         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1045         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1046         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
1047         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
1048         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
1049         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1050         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1051         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1052         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1053         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1054         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1055         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1056         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
1057         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1058         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1059         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1060         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
1061         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
1062         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
1063         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1064         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1065         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
1066         (WebCore::jsTestObjPrototypeFunctionConvert1):
1067         (WebCore::jsTestObjPrototypeFunctionConvert2):
1068         (WebCore::jsTestObjPrototypeFunctionConvert4):
1069         (WebCore::jsTestObjPrototypeFunctionConvert5):
1070         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1071         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1072         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
1073         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
1074         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1075         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
1076         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
1077         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
1078         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
1079         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1080         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
1081         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
1082         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
1083         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1084         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
1085         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
1086         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
1087         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1088         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1089         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
1090         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
1091         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
1092
1093 2013-02-18  Hayato Ito  <hayato@chromium.org>
1094
1095         Make EventDispatcher take an Event object in its constructor.
1096         https://bugs.webkit.org/show_bug.cgi?id=109898
1097
1098         Reviewed by Dimitri Glazkov.
1099
1100         Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero.
1101
1102         Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr<EventDispatcher*>)
1103         if mediator's event() returns null.
1104
1105         Also Added a layout test to catch this kind of crash in the future.
1106
1107         Test: fast/events/platform-wheelevent-with-delta-zero-crash.html
1108
1109         * dom/EventDispatchMediator.cpp:
1110         (WebCore::EventDispatchMediator::dispatchEvent):
1111         * dom/EventDispatcher.cpp:
1112         (WebCore::EventDispatcher::dispatchEvent):
1113         (WebCore::EventDispatcher::EventDispatcher):
1114         (WebCore::EventDispatcher::ensureEventPath):
1115         (WebCore::EventDispatcher::dispatchSimulatedClick):
1116         (WebCore::EventDispatcher::dispatch):
1117         (WebCore::EventDispatcher::dispatchEventPreProcess):
1118         (WebCore::EventDispatcher::dispatchEventAtCapturing):
1119         (WebCore::EventDispatcher::dispatchEventAtTarget):
1120         (WebCore::EventDispatcher::dispatchEventAtBubbling):
1121         (WebCore::EventDispatcher::dispatchEventPostProcess):
1122         * dom/EventDispatcher.h:
1123         (EventDispatcher):
1124         (WebCore::EventDispatcher::node):
1125         (WebCore::EventDispatcher::event):
1126         * dom/FocusEvent.cpp:
1127         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1128         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1129         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1130         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1131         * dom/GestureEvent.cpp:
1132         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1133         * dom/MouseEvent.cpp:
1134         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1135         * dom/WheelEvent.cpp:
1136         (WebCore::WheelEventDispatchMediator::dispatchEvent):
1137         Assert event() rather than an early exit since this code path should be hit only when event() is non-null.
1138
1139 2013-02-18  Takashi Sakamoto  <tasak@google.com>
1140
1141         :before/:after pseudo elements do not always apply to the proper element
1142         https://bugs.webkit.org/show_bug.cgi?id=93925
1143
1144         Reviewed by Dimitri Glazkov.
1145
1146         Disable sharing a style with siblings if :after or :before pseudo style
1147         is unique.
1148
1149         Test: fast/css/before-after-pseudo-class.html
1150
1151         * css/StyleResolver.cpp:
1152         (WebCore::StyleResolver::canShareStyleWithElement):
1153         Added a new condition, hasUniquePseudoStyle.
1154         * rendering/style/RenderStyle.cpp:
1155         (WebCore::RenderStyle::hasUniquePseudoStyle):
1156         Added to check whether any pseudo style has unique bit or not.
1157         (WebCore):
1158         * rendering/style/RenderStyle.h:
1159
1160 2013-02-18  Andy Estes  <aestes@apple.com>
1161
1162         Focusing a new frame (via window.focus()) should blur the active element in the current frame
1163         https://bugs.webkit.org/show_bug.cgi?id=110172
1164
1165         Reviewed by Ryosuke Niwa.
1166
1167         When a change in the focused node crosses a frame boundary, WebKit
1168         doesn't always succeed in blurring the old focused node before focusing
1169         the new one.
1170
1171         Each document remembers its focused node, and a Page-scoped
1172         FocusController remembers the focused frame. If a new focused node is
1173         in a different frame than the focused frame, FocusController tells the
1174         old frame's document to clear its focused node before focusing the new
1175         one (and remembering the new frame).
1176
1177         Unfortunately, web content can confuse FocusController by calling
1178         window.focus() at the wrong time. Since window.focus() changes
1179         FocusController's focused frame without focusing a new node,
1180         FocusController won't think that a frame boundary is being crossed if a
1181         node in this frame is later focused. Therefore it won't clear the old
1182         frame's focused node (it won't even know which frame contained the old
1183         focused node), causing at least two bugs:
1184
1185         1) The node in the old frame will not receive a blur event.
1186         2) Calling document.activeElement on the main frame will return the
1187            previously focused node, but the HTML5 spec says it should return
1188            the frame owner element if a subframe has focus.
1189
1190         Fix both of these bugs by explicitly clearing the current frame's
1191         focused node if window.focus() changes the focused frame. This fix
1192         carries some compatibility risk by changing a long-standing behavior
1193         of the engine (we've had this bug since the beginning of the project,
1194         AFAICT). On the upside, it matches the behavior of both Firefox and IE,
1195         matches what HTML5 says about subframe focus, and fixes at least one
1196         well-known enterprise web app.
1197
1198         Tests: fast/dom/HTMLDocument/active-element-frames.html
1199                fast/frames/frame-focus-blurs-active-element.html
1200
1201         * page/DOMWindow.cpp:
1202         (WebCore::DOMWindow::focus): If the frame being focused is not the same
1203         as the currently focused frame, clear the currently focused frame's
1204         focused node.
1205
1206 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
1207
1208         Clean up the boolean argument to visibleContentRect
1209         https://bugs.webkit.org/show_bug.cgi?id=110167
1210
1211         Reviewed by Simon Fraser.
1212
1213         Replace the boolean argument to visibleContentRect() with
1214         an enum.
1215
1216         No behavior change.
1217
1218         * WebCore.exp.in:
1219         * dom/Document.cpp:
1220         (WebCore::Document::viewportSize):
1221         * inspector/InspectorOverlay.cpp:
1222         (WebCore::InspectorOverlay::update):
1223         * page/DOMWindow.cpp:
1224         (WebCore::DOMWindow::innerHeight):
1225         (WebCore::DOMWindow::innerWidth):
1226         * page/FrameView.cpp:
1227         (WebCore::FrameView::calculateScrollbarModesForLayout):
1228         (WebCore::FrameView::layout):
1229         (WebCore::FrameView::performPostLayoutTasks):
1230         (WebCore::FrameView::windowClipRect):
1231         * page/SpatialNavigation.cpp:
1232         (WebCore::canScrollInDirection):
1233         * platform/ScrollView.cpp:
1234         (WebCore::ScrollView::unscaledVisibleContentSize):
1235         (WebCore::ScrollView::visibleContentRect):
1236         (WebCore::ScrollView::layoutSize):
1237         (WebCore::ScrollView::updateScrollbars):
1238         (WebCore::ScrollView::paint):
1239         * platform/ScrollView.h:
1240         * platform/ScrollableArea.cpp:
1241         (WebCore::ScrollableArea::visibleContentRect):
1242         * platform/ScrollableArea.h:
1243         * rendering/RenderDialog.cpp:
1244         (WebCore::RenderDialog::layout):
1245         * rendering/RenderLayer.cpp:
1246         (WebCore::RenderLayer::maximumScrollPosition):
1247         (WebCore::RenderLayer::visibleContentRect):
1248         * rendering/RenderLayer.h:
1249         * rendering/RenderLayerCompositor.cpp:
1250         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1251         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1252
1253 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
1254
1255         That didn't work either. Just make it public. This is why I hate nested classes. They just don't work.
1256
1257         * rendering/RenderBlock.h:
1258         (RenderBlock):
1259
1260 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
1261
1262         Windows build fix. Apparently Visual Studio still has a lot of bugs with respect to nested classes.
1263         Work around it by directly instantiating the class inside createFloatingObjects.
1264
1265         * rendering/RenderBlock.cpp:
1266         (WebCore::RenderBlock::createFloatingObjects): Directly instantiate FloatingObjects.
1267         * rendering/RenderBlock.h:
1268         (RenderBlock): Moved the declaration of createFloatingObjects up.
1269         (FloatingObjects::FloatingObjects):
1270
1271 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
1272
1273         Merge handleSpecialChild into layoutBlockChildren
1274         https://bugs.webkit.org/show_bug.cgi?id=110165
1275
1276         Reviewed by Darin Adler.
1277
1278         Merge handleSpecialChild, handlePositionedChild, and handleFloatingChild into layoutBlockChildren
1279         to make the semantics of the code clear and to get rid of the outdated comment about how there are
1280         four types of four types of special children.
1281
1282         * rendering/RenderBlock.cpp:
1283         (WebCore::RenderBlock::layoutBlockChildren):
1284         * rendering/RenderBlock.h:
1285         (RenderBlock):
1286
1287 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
1288
1289         Encapsulate FloatingObject's constructor inside create
1290         https://bugs.webkit.org/show_bug.cgi?id=110169
1291
1292         Reviewed by Darin Adler.
1293
1294         Added FloatingObject::create and made FloatingObject's constructor private.
1295         Also added RenderBlock::ensureFloatingObjects to help lazily creating FloatingObjects.
1296
1297         * rendering/RenderBlock.cpp:
1298         (WebCore::RenderBlock::insertFloatingObject):
1299         (WebCore::RenderBlock::addOverhangingFloats):
1300         (WebCore::RenderBlock::addIntrudingFloats):
1301         (WebCore::RenderBlock::ensureFloatingObjects):
1302         (WebCore::RenderBlock::FloatingObjects::create):
1303         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
1304         * rendering/RenderBlock.h:
1305         (FloatingObjects):
1306         (RenderBlock):
1307
1308 2013-02-18  Anders Carlsson  <andersca@apple.com>
1309
1310         Add a DefaultHash for RefPtr<SecurityOrigin>
1311         https://bugs.webkit.org/show_bug.cgi?id=110170
1312
1313         Reviewed by Andreas Kling.
1314
1315         Remove all explicit uses of SecurityOriginHash.
1316
1317         * Modules/webdatabase/DatabaseTracker.h:
1318         * Modules/webdatabase/OriginQuotaManager.h:
1319         * loader/appcache/ApplicationCacheStorage.cpp:
1320         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
1321         * loader/cache/MemoryCache.h:
1322         * page/SecurityOriginHash.h:
1323         * storage/StorageNamespaceImpl.h:
1324         (StorageNamespaceImpl):
1325
1326 2013-02-18  David Hyatt  <hyatt@apple.com>
1327
1328         Padding and border changes don't trigger the relayout of children in some cases.
1329         https://bugs.webkit.org/show_bug.cgi?id=109639.
1330
1331         Reviewed by Ryosuke Niwa.
1332
1333         The fix for this bug was way too general and involved putting code into RenderBox. Since
1334         RenderBox makes no assumptions about what kind of layout system might derive from it, it
1335         was incorrect to just mark all children as needing layout whenever borders and padding
1336         changed widths.
1337         
1338         This patch takes the two cases handled by the original code and makes them more
1339         specialized down in subclasses, i.e., RenderBlock and RenderTableRow. RenderBlock has
1340         been refined to only check if children aren't inline and to also not invalidate
1341         floats or irrelevant positioned objects that might not even have this block as their
1342         containing block.
1343         
1344         The RenderTableRow code is specialized to only care about collapsing borders and
1345         to only check borders rather than padding. It also requires that a child be a cell
1346         in order to do the invalidation.
1347
1348         Covered by existing tests, since this is just specializing the code to more precisely
1349         cover the test cases that have already been written.
1350
1351         Longer term, it should be layout code that figures this stuff out rather than style
1352         change code, but that involves more dramatic changes that can wait.
1353
1354         Test: fast/block/positioning/border-change-relayout-test.html
1355
1356         * rendering/RenderBlock.cpp:
1357         (WebCore::borderOrPaddingLogicalWidthChanged):
1358         (WebCore):
1359         (WebCore::RenderBlock::styleDidChange):
1360         * rendering/RenderBox.cpp:
1361         (WebCore):
1362         (WebCore::RenderBox::styleDidChange):
1363         * rendering/RenderTableRow.cpp:
1364         (WebCore::borderLogicalWidthChanged):
1365         (WebCore):
1366         (WebCore::RenderTableRow::styleDidChange):
1367
1368 2013-02-18  Mark Lam  <mark.lam@apple.com>
1369
1370         Small follow up to r143271: Fix SQLTransaction leak.
1371         https://bugs.webkit.org/show_bug.cgi?id=110052.
1372
1373         Reviewed by Geoffrey Garen.
1374
1375         Applied Geoff's suggestion nullify m_frontend sooner for greater
1376         code clarity. Also added some comments about m_frontend.
1377
1378         No new tests.
1379
1380         * Modules/webdatabase/SQLTransactionBackend.cpp:
1381         (WebCore::SQLTransactionBackend::doCleanup):
1382         * Modules/webdatabase/SQLTransactionBackend.h:
1383         (SQLTransactionBackend):
1384
1385 2013-02-18  Geoffrey Garen  <ggaren@apple.com>
1386
1387         Shrank the SourceProvider cache
1388         https://bugs.webkit.org/show_bug.cgi?id=110158
1389
1390         Reviewed by Oliver Hunt.
1391
1392         Test: fast/js/regress/nested-function-parsing.html
1393
1394         No need to keep statistics on cache size, since we're going to throw it
1395         away no matter what.
1396
1397         * WebCore.order:
1398         * bindings/js/CachedScriptSourceProvider.h:
1399         (CachedScriptSourceProvider):
1400         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1401         * loader/cache/CachedScript.cpp:
1402         (WebCore::CachedScript::destroyDecodedData):
1403         (WebCore):
1404         (WebCore::CachedScript::reportMemoryUsage):
1405         * loader/cache/CachedScript.h:
1406         (CachedScript):
1407
1408 2013-02-18  peavo@outlook.com  <peavo@outlook.com>
1409
1410         [Curl] The function cookiesForDOM() does not behave correctly.
1411         https://bugs.webkit.org/show_bug.cgi?id=109923
1412
1413         Reviewed by Brent Fulgham.
1414
1415         The cookiesForDOM() function should return a list of matching cookies, both persistent and session cookies.
1416
1417         * platform/network/curl/CookieJarCurl.cpp:
1418         (WebCore::readCurlCookieToken): Added function to read next token from Curl cookie string.
1419         (WebCore::addMatchingCurlCookie): Added function to add matching cookies to cookie list.
1420         (WebCore::setCookiesFromDOM): Add domain and path from url to cookie if not already set.
1421         (WebCore::cookiesForDOM): Return a list of matching cookies, both session and persistent cookies.
1422
1423 2013-02-17  Mark Lam  <mark.lam@apple.com>
1424
1425         Fix SQLTransaction leak.
1426         https://bugs.webkit.org/show_bug.cgi?id=110052.
1427
1428         Reviewed by Geoffrey Garen.
1429
1430         With https://bugs.webkit.org/show_bug.cgi?id=104750, there is now a circular
1431         reference between SQLTransaction and its backend. The clean up process needs
1432         to be fixed to explicitly break this reference cycle.
1433
1434         The 5 phases of the SQLTransaction (and backend) phases and their clean up
1435         actions are:
1436
1437         Phase 1. After Birth, before scheduling
1438         - During shutdown, DatabaseThread::databaseThread() calls
1439           DatabaseBackendAsync::close(). DatabaseBackendAsync::close() iterates
1440           DatabaseBackendAsync::m_transactionQueue and calls
1441           SQLtransactionBackend::notifyDatabaseThreadIsShuttingDown() on each
1442           transaction there.
1443
1444         Phase 2. After scheduling, before state AcquireLock
1445         - ~DatabaseTask() calls SQLtransactionBackend's
1446           notifyDatabaseThreadIsShuttingDown().
1447
1448         Phase 3. After state AcquireLock, before "lockAcquired"
1449         - During shutdown, DatabaseThread::databaseThread() calls
1450           SQLTransactionCoordinator::shutdown(), which calls
1451           SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown().
1452
1453         Phase 4: After "lockAcquired", before state CleanupAndTerminate
1454         - Same as Phase 3.
1455
1456         Phase 5: After state CleanupAndTerminate
1457         - state CleanupAndTerminate calls SQLTransactionBackend::doCleanup().
1458
1459         See comment at the top of SQLTransactionBackend.cpp for more details.
1460
1461         Other supporting changes:
1462         - Moved Database::close() to the DatabaseBackendAsync.
1463         - Moved the "if already cleaned up" check from SQLTransactionBackend's
1464           notifyDatabaseThreadIsShuttingDown() to doCleanup().
1465         - Added a check to prevent SQLTransactionCoordinator's releaseLock()
1466           from running when it's shutting down.
1467
1468         No new tests.
1469
1470         * Modules/webdatabase/Database.cpp:
1471         * Modules/webdatabase/Database.h:
1472         * Modules/webdatabase/DatabaseBackendAsync.cpp:
1473         (WebCore::DatabaseBackendAsync::close): Move from Database.cpp.
1474         * Modules/webdatabase/DatabaseBackendAsync.h:
1475         * Modules/webdatabase/DatabaseTask.cpp:
1476         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
1477         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::~DatabaseTransactionTask):
1478         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
1479         * Modules/webdatabase/DatabaseTask.h:
1480         (DatabaseBackendAsync::DatabaseTransactionTask):
1481         * Modules/webdatabase/DatabaseThread.cpp:
1482         (WebCore::DatabaseThread::databaseThread):
1483         * Modules/webdatabase/SQLTransactionBackend.cpp:
1484         (WebCore::SQLTransactionBackend::doCleanup):
1485         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
1486         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
1487         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1488         (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
1489         (WebCore::SQLTransactionCoordinator::acquireLock):
1490         (WebCore::SQLTransactionCoordinator::releaseLock):
1491         (WebCore::SQLTransactionCoordinator::shutdown):
1492         * Modules/webdatabase/SQLTransactionCoordinator.h:
1493         (SQLTransactionCoordinator):
1494
1495 2013-02-18  David Kilzer  <ddkilzer@apple.com>
1496
1497         Fix WebCore Xcode project
1498
1499         * WebCore.xcodeproj/project.pbxproj: Fix path for CDMPrivate.h.
1500
1501 2013-02-18  Julien Chaffraix  <jchaffraix@webkit.org>
1502
1503         [CSS Grid Layout] Refactor grid position resolution code to support an internal grid representation
1504         https://bugs.webkit.org/show_bug.cgi?id=109718
1505
1506         Reviewed by Ojan Vafai.
1507
1508         In order to support auto placement (where we can't infer a grid item's position from its style),
1509         we need to have 2 code paths:
1510         - One that places the elements on the grid representation.
1511         - One that reuse the grid representation to return the position.
1512
1513         This code path implements this split so that we can add auto placement in a follow-up patch(es).
1514         Also in order to avoid a O(n^2) behavior [walking over our grid to find a grid item's position],
1515         the cached position code path needed an efficient way to find the grid items -> position mapping.
1516
1517         Refactoring, covered by existing tests.
1518
1519         * rendering/RenderGrid.cpp:
1520         (WebCore::RenderGrid::cachedGridCoordinate):
1521         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1522         These methods implements the above split. The first one
1523         reuses our cached information whereas the other one is
1524         used to build the cache.
1525
1526         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1527         (WebCore::RenderGrid::layoutGridItems):
1528         Added some code to clear the grid items' position.
1529
1530         (WebCore::RenderGrid::findChildLogicalPosition):
1531         (WebCore::RenderGrid::logicalContentHeightForChild):
1532         Updated these functions to use cachedGridPosition.
1533
1534         (WebCore::RenderGrid::maximumIndexInDirection):
1535         Added a comment about why we don't use cachedGridPosition.
1536
1537         (WebCore::RenderGrid::insertItemIntoGrid):
1538         Added this helper function to insert into the grid and
1539         cache the position in the reverse lookup map.
1540
1541         (WebCore::RenderGrid::placeItemsOnGrid):
1542         Updated to call insertItemIntoGrid. Also added an ASSERT
1543         similar to m_grid.
1544
1545         (WebCore::RenderGrid::clearGrid):
1546         Added this helper function to clear our grid structure.
1547
1548         * rendering/RenderGrid.h:
1549         (GridCoordinate):
1550         (WebCore::RenderGrid::GridCoordinate::GridCoordinate):
1551         Added this POD to hold the coordinates in our reverse map.
1552
1553 2013-02-18  Stephen Chenney  <schenney@chromium.org>
1554
1555         feFlood incorrectly applied color-interpolation-filters
1556         https://bugs.webkit.org/show_bug.cgi?id=109985
1557
1558         Reviewed by Dirk Schulze.
1559
1560         The SVG spec defines the color-interpolation-filters property for all
1561         filter effect elements in order to control cases where a color is
1562         based on some arithmetic computation on other colors. For example,
1563         when computing gradients or blending colors. feFlood simply fills a
1564         region with the given color, and that given color is always defined to
1565         be in sRGB space, so the feFlood result should always be sRGB.
1566
1567         The new behavior matches both Opera and Firefox.
1568
1569         Tests: svg/filters/feFlood-color-interpolation-expected.svg
1570                svg/filters/feFlood-color-interpolation.svg
1571
1572         * platform/graphics/filters/FEFlood.cpp:
1573         (WebCore::FEFlood::platformApplySoftware): Force the color mode to be
1574         sRGB before returning.
1575
1576 2013-02-18  Mark Lam  <mark.lam@apple.com>
1577
1578         Introduced AbstractSQLStatement and AbstractSQLStatementBackend.
1579         https://bugs.webkit.org/show_bug.cgi?id=110148.
1580
1581         Reviewed by Geoff Garen.
1582
1583         This is part of the webdatabase refactoring for webkit2.
1584         - Also changed the frontend and backend to only refer to the
1585           abstract interface of each other.
1586
1587         No new tests.
1588
1589         * GNUmakefile.list.am:
1590         * Modules/webdatabase/AbstractSQLStatement.h: Added.
1591         (AbstractSQLStatement):
1592         (WebCore::AbstractSQLStatement::~AbstractSQLStatement):
1593         * Modules/webdatabase/AbstractSQLStatementBackend.h: Added.
1594         (AbstractSQLStatementBackend):
1595         (WebCore::AbstractSQLStatementBackend::~AbstractSQLStatementBackend):
1596         * Modules/webdatabase/SQLStatement.cpp:
1597         (WebCore::SQLStatement::setBackend):
1598         * Modules/webdatabase/SQLStatement.h:
1599         (SQLStatement):
1600         * Modules/webdatabase/SQLStatementBackend.cpp:
1601         (WebCore::SQLStatementBackend::create):
1602         (WebCore::SQLStatementBackend::SQLStatementBackend):
1603         (WebCore::SQLStatementBackend::frontend):
1604         * Modules/webdatabase/SQLStatementBackend.h:
1605         (SQLStatementBackend):
1606         * Modules/webdatabase/SQLTransaction.cpp:
1607         (WebCore::SQLTransaction::deliverStatementCallback):
1608         * Modules/webdatabase/SQLTransactionBackend.cpp:
1609         (WebCore::SQLTransactionBackend::currentStatement):
1610         (WebCore::SQLTransactionBackend::executeSQL):
1611         * Modules/webdatabase/SQLTransactionBackend.h:
1612         (SQLTransactionBackend):
1613         * Target.pri:
1614         * WebCore.gypi:
1615         * WebCore.vcproj/WebCore.vcproj:
1616         * WebCore.vcxproj/WebCore.vcxproj:
1617         * WebCore.vcxproj/WebCore.vcxproj.filters:
1618         * WebCore.xcodeproj/project.pbxproj:
1619
1620 2013-02-18  David Kilzer  <ddkilzer@apple.com>
1621
1622         BUILD FIX (r143230): Fix renamed header and implementation of -[WebAccessibilityObjectWrapper accessibilityPostedNotification:]
1623         <http://webkit.org/b/110077>
1624
1625         Fixes the following build failures:
1626
1627             AccessibilityObjectIOS.mm:35:9: fatal error: 'AccessibilityObjectWrapperIOS.h' file not found
1628             #import "AccessibilityObjectWrapperIOS.h"
1629                     ^
1630             1 error generated.
1631
1632             WebAccessibilityObjectWrapperIOS.mm:2051:35: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'?
1633                 if (AXNotificationCallback && notificationString)
1634                                               ^~~~~~~~~~~~~~~~~~
1635                                               notificationType
1636             WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here
1637             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1638                                                                                             ^
1639             WebAccessibilityObjectWrapperIOS.mm:2052:38: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'?
1640                     AXNotificationCallback(self, notificationString, AXPostedNotificationContext);
1641                                                  ^~~~~~~~~~~~~~~~~~
1642                                                  notificationType
1643             WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here
1644             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1645                                                                                             ^
1646             WebAccessibilityObjectWrapperIOS.mm:2052:38: error: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'WebCore::AXObjectCache::AXNotification'
1647                     AXNotificationCallback(self, notificationString, AXPostedNotificationContext);
1648                                                  ^~~~~~~~~~~~~~~~~~
1649             WebAccessibilityObjectWrapperIOS.mm:2049:81: error: conflicting parameter types in implementation of 'accessibilityPostedNotification:': 'NSString *' vs 'WebCore::AXObjectCache::AXNotification' [-Werror,-Wmismatched-parameter-types]
1650             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1651                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
1652             WebAccessibilityObjectWrapperBase.h:48:53: note: previous definition is here
1653             - (void)accessibilityPostedNotification:(NSString *)notificationName;
1654                                                      ~~~~~~~~~~ ^
1655             4 errors generated.
1656
1657         * accessibility/ios/AccessibilityObjectIOS.mm: Fix name of
1658         included header.
1659         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1660         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
1661         Fix implementation to match declaration.
1662
1663         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
1664         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1665         * accessibility/ios/AXObjectCacheIOS.mm:
1666         - Clean up #endif comments.
1667
1668 2013-02-18  Jer Noble  <jer.noble@apple.com>
1669
1670         EME: Add a CDMPrivate implementation using AVFoundation.
1671         https://bugs.webkit.org/show_bug.cgi?id=109739
1672
1673         Reviewed by Eric Carlson.
1674
1675         Add a CDMPrivate implementation using AVFoundation, similar to the EME v1 implementation
1676         in MediaPlayerPrivateAVFoundationObjC. This requires passing the AVAssetResourceLoadingRequest
1677         from the MediaPlayerPrivateAVFoundationObjC instance to CDMSessionAVFoundation. To do so
1678         without adding platform-specific API to MediaPlayer, add a static map from MediaPlayer ->
1679         MediaPlayerPrivateAVFoundationObjC instances to be used to vend the AVAssetResourceLoadingRequest
1680         to CDMSessionAVFoundation.
1681
1682         * Modules/encryptedmedia/CDM.cpp:
1683         (WebCore::installedCDMFactories): Add the factory for CDMPrivateAVFoundation.
1684         * Modules/encryptedmedia/CDM.h:
1685         * Modules/encryptedmedia/CDMPrivateAVFoundation.h: Added.
1686         (WebCore::CDMPrivateAVFoundation::create): Simple factory method.
1687         (WebCore::CDMPrivateAVFoundation::~CDMPrivateAVFoundation): Simple virtual destructor.
1688         (WebCore::CDMPrivateAVFoundation::cdm): Simple getter.
1689         (WebCore::CDMPrivateAVFoundation::CDMPrivateAVFoundation): Simple constructor.
1690         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm: Added.
1691         (WebCore::CDMSessionAVFoundation::~CDMSessionAVFoundation): Simple destructor.
1692         (WebCore::CDMPrivateAVFoundation::supportsKeySytem): Check whether the given key system is supported.
1693         (WebCore::CDMPrivateAVFoundation::supportsMIMEType): Check whether the given MIME type is supported.
1694         (WebCore::CDMPrivateAVFoundation::createSession): Return a new CDMSessionAVFoundation.
1695         (WebCore::CDMSessionAVFoundation::CDMSessionAVFoundation): Simple constructor.
1696         (WebCore::CDMSessionAVFoundation::generateKeyRequest): Retrieve the AVAssetResourceLoadingRequest
1697             from the MediaPlayer, and use it to generate a key request.
1698         (WebCore::CDMSessionAVFoundation::releaseKeys): No-op.
1699         (WebCore::CDMSessionAVFoundation::update): Add the passed in key to the AVAssetResourceLoadingRequest.
1700         * WebCore.xcodeproj/project.pbxproj:
1701         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1702         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1703         (WebCore::playerToPrivateMap): Lazily instantiate static map.
1704         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Register with the playerToPrivateMap.
1705         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Unregister from same.
1706         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Also send keyNeeded event in ENCRYPTED_MEDIA_V2.
1707         (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData): Convert this 
1708             method from file-static to class static.
1709         (WebCore::MediaPlayerPrivateAVFoundationObjC::takeRequestForPlayerAndKeyURI): Pull the AVAssetResourceLoadingRequest
1710             from m_keyURIToRequestMap and return it, if present.
1711
1712 2013-02-18  Philip Rogers  <pdr@google.com>
1713
1714         Fix scaling of tiled SVG backgrounds on high-dpi displays
1715         https://bugs.webkit.org/show_bug.cgi?id=110047
1716
1717         Reviewed by Dirk Schulze.
1718
1719         This patch fixes the scaling of SVG when used for drawing patterns. Tiled/patterend SVG
1720         images are first drawn into an image buffer and then the image buffer is used to stamp
1721         out tiles. Because it is a raster source, the size of the image buffer needs to
1722         be scaled to the final resolution of the device. After scaling the image buffer, the
1723         source rect and pattern transforms need to be adjusted so they align in device pixel
1724         coordinates. This adjustment was not done before this patch, causing pixelated rendering.
1725
1726         Additionally, a FIXME has been added due to webkit.org/b/110065 and the image buffer
1727         has been manually scaled (using "zoomedAndScaledContainerRect") instead of relying
1728         on the ImageBuffer's resolutionScale parameter.
1729
1730         Test: svg/as-background-image/tiled-background-image.html
1731
1732         * svg/graphics/SVGImage.cpp:
1733         (WebCore::SVGImage::drawPatternForContainer):
1734
1735             Note that fixing the FIXME does not change that the source rect and transform need
1736             to be adjusted for page scale.
1737
1738 2013-02-18  David Hyatt  <hyatt@apple.com>
1739
1740         Make seamless iframes paginate properly in their enclosing document's pagination context.
1741         https://bugs.webkit.org/show_bug.cgi?id=106125
1742         <rdar://problem/12922720> Text in iframe is clipped while printing
1743
1744         Reviewed by Simon Fraser.
1745
1746         Added new tests in fast/multicol and fast/region.
1747
1748         * rendering/RenderBlock.cpp:
1749         (WebCore::RenderBlock::clampToStartAndEndRegions):
1750         Don't clamp when the RenderView is the containing block of an object in a RenderFlowThread.
1751
1752         * rendering/RenderObject.cpp:
1753         (WebCore::RenderObject::containerForRepaint):
1754         Don't attempt any repaint container antics when we're in a seamless iframe, since the ancestor
1755         document will actually do the handoff into the flow thread.
1756
1757         * rendering/RenderView.cpp:
1758         (WebCore::enclosingSeamlessRenderer):
1759         Heper function to test for an enclosing seamless iframe.
1760         
1761         (WebCore::RenderView::addChild):
1762         Subclass addChild on RenderView to properly set the inRenderFlowThread state for a seamless
1763         child document so thta it will check regions.
1764
1765         (WebCore::RenderView::initializeLayoutState):
1766         New helper method for setting up the initial layout state of a RenderView. If inside a seamless
1767         paginated ancestor, set up the appropriate pagination information so the child document
1768         knows about it. This method will expand to inherit info about line grids and exclusions eventually
1769         also.
1770
1771         (WebCore::RenderView::layout):
1772         Now calls initializeLayoutState to set up the layout state.
1773
1774         * rendering/RenderView.h:
1775         (WebCore::RenderView::pageLogicalHeight):
1776         (WebCore::RenderView::setPageLogicalHeight):
1777         (RenderView):
1778         Fix the type of the page logical height methods to be LayoutUnit instead of unsigned.
1779
1780 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1781
1782         Unreviewed, rolling out r143145.
1783         http://trac.webkit.org/changeset/143145
1784         https://bugs.webkit.org/show_bug.cgi?id=110143
1785
1786         Causes frequent crashes. (Requested by eric_carlson on
1787         #webkit).
1788
1789         * dom/EventDispatchMediator.cpp:
1790         (WebCore::EventDispatchMediator::dispatchEvent):
1791         * dom/EventDispatcher.cpp:
1792         (WebCore::EventDispatcher::dispatchEvent):
1793         (WebCore::EventDispatcher::EventDispatcher):
1794         (WebCore::EventDispatcher::ensureEventPath):
1795         (WebCore::EventDispatcher::dispatchSimulatedClick):
1796         (WebCore::EventDispatcher::dispatchEventPreProcess):
1797         (WebCore::EventDispatcher::dispatchEventAtCapturing):
1798         (WebCore::EventDispatcher::dispatchEventAtTarget):
1799         (WebCore::EventDispatcher::dispatchEventAtBubbling):
1800         (WebCore::EventDispatcher::dispatchEventPostProcess):
1801         * dom/EventDispatcher.h:
1802         (EventDispatcher):
1803         (WebCore::EventDispatcher::node):
1804         (WebCore):
1805         * dom/FocusEvent.cpp:
1806         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1807         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1808         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1809         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1810         * dom/GestureEvent.cpp:
1811         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1812         * dom/MouseEvent.cpp:
1813         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1814
1815 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1816
1817         [Soup] Free cookies explicitly in loops instead of using GOwnPtr
1818         https://bugs.webkit.org/show_bug.cgi?id=110103
1819
1820         Reviewed by Martin Robinson.
1821
1822         Free cookies explicitly in loops instead of using GOwnPtr for this.
1823         Until now, the code was mixing both styles. This patch makes the
1824         code consistent one way. Adopting list items with GOwnPtr for the
1825         sole purpose to free them makes the freeing less obvious and may
1826         lead to mistakes if someone refactors the code and calls "break;"
1827         to abort loop iteration.
1828
1829         No new tests, no behavior change.
1830
1831         * platform/network/soup/CookieJarSoup.cpp:
1832         (WebCore::getRawCookies):
1833         (WebCore::deleteCookie):
1834         (WebCore::getHostnamesWithCookies):
1835
1836 2013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1837
1838         [JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
1839         https://bugs.webkit.org/show_bug.cgi?id=109987
1840
1841         Reviewed by Pavel Feldman.
1842
1843         Improved an existing test to cover this.
1844
1845         * bindings/js/ScriptDebugServer.cpp:
1846         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1847         Remove the sourceURL parsing and script.url replacement from the JSC
1848         implementation of ScriptDebugServer. The WebCore inspector code that
1849         this was added for already does this, at a more appropriate time.
1850
1851 2013-02-18  Mike West  <mkwst@chromium.org>
1852
1853         compareDocumentPosition reports disconnected nodes as following each other
1854         https://bugs.webkit.org/show_bug.cgi?id=108274
1855
1856         Reviewed by Dimitri Glazkov.
1857
1858         jQuery has had to implement their own sorting mechanism in Sizzle[1] due
1859         to Node::compareDocumentPosition always reporting disconnected nodes
1860         as following each other. According to spec[2], we should instead be
1861         indicating that the result is (a) disconnected, (b) implementation
1862         specific, and (c) deterministically ordered.
1863
1864         [1]: https://github.com/jquery/sizzle/commit/1c8aec91284af8d8c14447976235d5dd72b0d75e
1865         [2]: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
1866
1867         Test: fast/dom/compare-document-position-disconnected-nodes.html
1868
1869         * dom/Node.cpp:
1870         (WebCore::Node::compareDocumentPosition):
1871             After walking the parentNode chain of both Nodes, compare the root.
1872             If the Nodes don't share a root, they're in distinct trees, and
1873             should return as described above. We determine which element
1874             "preceeds" the other in an arbitrary fashion via pointer comparison.
1875
1876 2013-02-18  Andrey Adaikin  <aandrey@chromium.org>
1877
1878         Web Inspector: [Canvas] fix replay log grouping by frames
1879         https://bugs.webkit.org/show_bug.cgi?id=110122
1880
1881         Reviewed by Pavel Feldman.
1882
1883         Bug: log grouping by frames did not work if a frame end call is not a draw call.
1884         Drive-by: Last draw call group may not contain a draw call. In this case merge it into the previous group.
1885
1886         * inspector/front-end/CanvasProfileView.js:
1887         (WebInspector.CanvasProfileView.prototype._appendCallNode):
1888         (WebInspector.CanvasProfileView.prototype._maybeMergeLastDrawCallGroups):
1889
1890 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1891
1892         [Soup] Superfluous HashMap check in SocketStreamHandleSoup::getHandleFromId()
1893         https://bugs.webkit.org/show_bug.cgi?id=110107
1894
1895         Reviewed by Martin Robinson.
1896
1897         Remove Superfluous HashMap::contains() call in SocketStreamHandleSoup::getHandleFromId()
1898         as HashMap::get() will already return 0 in this case anyway.
1899
1900         No new tests, no behavior change.
1901
1902         * platform/network/soup/SocketStreamHandleSoup.cpp:
1903         (WebCore):
1904         (WebCore::getHandleFromId):
1905
1906 2013-02-18  Zan Dobersek  <zdobersek@igalia.com>
1907
1908         Stop placing std::isfinite and std::signbit inside the global scope
1909         https://bugs.webkit.org/show_bug.cgi?id=109817
1910
1911         Reviewed by Darin Adler.
1912
1913         Prefix calls to the isfinite and signbit methods with std:: as the two
1914         methods are no longer being imported into the global scope.
1915
1916         No new tests as there's no change in functionality.
1917
1918         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1919         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
1920         * bindings/js/JSDOMBinding.cpp:
1921         (WebCore::jsDateOrNull):
1922         * bindings/js/JSDOMBinding.h:
1923         (WebCore::finiteInt32Value):
1924         * bindings/v8/V8Binding.h:
1925         (WebCore::v8DateOrNull):
1926         * css/CSSPrimitiveValue.cpp:
1927         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1928         * html/BaseDateAndTimeInputType.cpp:
1929         (WebCore::BaseDateAndTimeInputType::parseToNumber):
1930         * html/HTMLInputElement.cpp:
1931         (WebCore::HTMLInputElement::setValueAsNumber):
1932         * html/HTMLMeterElement.cpp:
1933         (WebCore::HTMLMeterElement::setMin):
1934         (WebCore::HTMLMeterElement::setMax):
1935         (WebCore::HTMLMeterElement::setValue):
1936         (WebCore::HTMLMeterElement::setLow):
1937         (WebCore::HTMLMeterElement::setHigh):
1938         (WebCore::HTMLMeterElement::setOptimum):
1939         * html/HTMLProgressElement.cpp:
1940         (WebCore::HTMLProgressElement::value):
1941         (WebCore::HTMLProgressElement::setValue):
1942         (WebCore::HTMLProgressElement::max):
1943         (WebCore::HTMLProgressElement::setMax):
1944         * html/MonthInputType.cpp:
1945         (WebCore::MonthInputType::valueAsDate):
1946         (WebCore::MonthInputType::defaultValueForStepUp):
1947         (WebCore::MonthInputType::parseToNumber):
1948         * html/NumberInputType.cpp:
1949         (WebCore::NumberInputType::typeMismatchFor):
1950         (WebCore::NumberInputType::sanitizeValue):
1951         (WebCore::NumberInputType::hasBadInput):
1952         * html/RangeInputType.cpp:
1953         (WebCore::RangeInputType::typeMismatchFor):
1954         * html/TimeInputType.cpp:
1955         (WebCore::TimeInputType::defaultValueForStepUp):
1956         * html/canvas/CanvasPathMethods.cpp:
1957         (WebCore::CanvasPathMethods::moveTo):
1958         (WebCore::CanvasPathMethods::lineTo):
1959         (WebCore::CanvasPathMethods::quadraticCurveTo):
1960         (WebCore::CanvasPathMethods::bezierCurveTo):
1961         (WebCore::CanvasPathMethods::arcTo):
1962         (WebCore::CanvasPathMethods::arc):
1963         (WebCore::CanvasPathMethods::rect):
1964         * html/canvas/CanvasRenderingContext2D.cpp:
1965         (WebCore::CanvasRenderingContext2D::setLineWidth):
1966         (WebCore::CanvasRenderingContext2D::setMiterLimit):
1967         (WebCore::CanvasRenderingContext2D::setShadowOffsetX):
1968         (WebCore::CanvasRenderingContext2D::setShadowOffsetY):
1969         (WebCore::CanvasRenderingContext2D::setShadowBlur):
1970         (WebCore::lineDashSequenceIsValid):
1971         (WebCore::CanvasRenderingContext2D::setLineDashOffset):
1972         (WebCore::CanvasRenderingContext2D::scale):
1973         (WebCore::CanvasRenderingContext2D::rotate):
1974         (WebCore::CanvasRenderingContext2D::translate):
1975         (WebCore::CanvasRenderingContext2D::transform):
1976         (WebCore::CanvasRenderingContext2D::setTransform):
1977         (WebCore::validateRectForCanvas):
1978         (WebCore::CanvasRenderingContext2D::isPointInPath):
1979         (WebCore::CanvasRenderingContext2D::isPointInStroke):
1980         (WebCore::CanvasRenderingContext2D::drawImage):
1981         (WebCore::CanvasRenderingContext2D::createLinearGradient):
1982         (WebCore::CanvasRenderingContext2D::createRadialGradient):
1983         (WebCore::CanvasRenderingContext2D::createImageData):
1984         (WebCore::CanvasRenderingContext2D::getImageData):
1985         (WebCore::CanvasRenderingContext2D::putImageData):
1986         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1987         * html/parser/HTMLParserIdioms.cpp:
1988         (WebCore::parseToDoubleForNumberType):
1989         * html/shadow/MediaControlElements.cpp:
1990         (WebCore::MediaControlTimelineElement::setDuration):
1991         * html/shadow/MediaControls.cpp:
1992         (WebCore::MediaControls::reset):
1993         * html/shadow/MediaControlsApple.cpp:
1994         (WebCore::MediaControlsApple::reset):
1995         * html/shadow/MediaControlsBlackBerry.cpp:
1996         (WebCore::MediaControlFullscreenTimelineElement::setDuration):
1997         (WebCore::MediaControlsBlackBerry::reset):
1998         * inspector/InspectorValues.cpp:
1999         (WebCore::InspectorBasicValue::writeJSON):
2000         * loader/cache/CachedResource.cpp:
2001         (WebCore::CachedResource::currentAge):
2002         (WebCore::CachedResource::freshnessLifetime):
2003         * page/DOMWindow.cpp:
2004         (WebCore::DOMWindow::adjustWindowRect):
2005         * platform/DateComponents.cpp:
2006         (WebCore::DateComponents::setMillisecondsSinceEpochForDate):
2007         (WebCore::DateComponents::setMillisecondsSinceEpochForDateTime):
2008         (WebCore::DateComponents::setMillisecondsSinceEpochForMonth):
2009         (WebCore::DateComponents::setMillisecondsSinceMidnight):
2010         (WebCore::DateComponents::setMonthsSinceEpoch):
2011         (WebCore::DateComponents::setMillisecondsSinceEpochForWeek):
2012         * platform/Decimal.cpp:
2013         (WebCore::Decimal::fromDouble):
2014         * platform/FileSystem.h:
2015         (WebCore::isValidFileTime):
2016         * platform/LocalizedStrings.cpp:
2017         (WebCore::localizedMediaTimeDescription):
2018         * platform/graphics/cairo/CairoUtilities.cpp:
2019         (WebCore::drawPatternToCairoContext):
2020         * platform/graphics/cairo/PathCairo.cpp:
2021         (WebCore::Path::addArc):
2022         (WebCore::Path::contains):
2023         * platform/graphics/cg/PathCG.cpp:
2024         (WebCore::Path::addArc):
2025         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
2026         (WebCore::FullscreenVideoControllerGStreamer::timeToString):
2027         * platform/graphics/openvg/PathOpenVG.cpp:
2028         (WebCore::Path::addArc):
2029         * platform/graphics/skia/SkiaUtils.h:
2030         (WebCore::WebCoreFloatToSkScalar):
2031         (WebCore::WebCoreDoubleToSkScalar):
2032         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2033         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::maxTimeSeekable):
2034         * platform/gtk/LocalizedStringsGtk.cpp:
2035         (WebCore::localizedMediaTimeDescription):
2036         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2037         (timeToString):
2038         * platform/network/ResourceResponseBase.cpp:
2039         (WebCore::parseDateValueInHeader):
2040         * platform/qt/LocalizedStringsQt.cpp:
2041         (WebCore::localizedMediaTimeDescription):
2042         * rendering/RenderFlexibleBox.cpp:
2043         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
2044         * rendering/RenderMediaControlsChromium.cpp:
2045         (WebCore::formatChromiumMediaControlsTime):
2046         * rendering/RenderTheme.cpp:
2047         (WebCore::RenderTheme::formatMediaControlsTime):
2048         * rendering/style/RenderStyle.cpp:
2049         (WebCore::RenderStyle::setFontSize):
2050         * svg/SVGPathParser.cpp:
2051         (WebCore::SVGPathParser::decomposeArcToCubic):
2052         * xml/XPathFunctions.cpp:
2053         (WebCore::XPath::FunRound::round):
2054         * xml/XPathValue.cpp:
2055         (WebCore::XPath::Value::toString):
2056
2057 2013-02-18  Chris Fleizach  <cfleizach@apple.com>
2058
2059         AX: Make iOS wrapper use the WebAccessibilityObjectBase wrapper
2060         https://bugs.webkit.org/show_bug.cgi?id=110077
2061
2062         Reviewed by David Kilzer.
2063
2064         Make the iOS wrapper a subclass of the shared wrapper so that iOS can re-use code from the Mac.
2065         Rename the iOS file to reflect the class name.
2066
2067         * WebCore.xcodeproj/project.pbxproj:
2068         * accessibility/ios/AXObjectCacheIOS.mm:
2069         (WebCore::AXObjectCache::attachWrapper):
2070         (WebCore::AXObjectCache::postPlatformNotification):
2071         * accessibility/ios/AccessibilityObjectWrapperIOS.h: Removed.
2072         * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Removed.
2073         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.h.
2074         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.mm.
2075         (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
2076         (-[WebAccessibilityObjectWrapper attachmentView]):
2077         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]):
2078
2079 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2080
2081         Unreviewed, rolling out r143210.
2082         http://trac.webkit.org/changeset/143210
2083         https://bugs.webkit.org/show_bug.cgi?id=110128
2084
2085         Still causing some test timeouts (Requested by anttik on
2086         #webkit).
2087
2088         * platform/SharedTimer.h:
2089         (SharedTimer):
2090         (WebCore):
2091         (WebCore::MainThreadSharedTimer::stop):
2092         * platform/ThreadTimers.cpp:
2093         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
2094         * platform/mac/SharedTimerMac.mm:
2095         (WebCore):
2096         (WebCore::PowerObserver::restartSharedTimer):
2097         (WebCore::setSharedTimerFireInterval):
2098         (WebCore::stopSharedTimer):
2099
2100 2013-02-18  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2101
2102         Web Inspector: Disable hiding the debugger when it is below the source code
2103         https://bugs.webkit.org/show_bug.cgi?id=110106
2104
2105         Reviewed by Pavel Feldman.
2106
2107         When the "Split horizontally" option is checked in the Sources panel the button responsible for the sidebar
2108         visibility is hidden and the sidebar is force-shown. Also set the "Split sidebar" option default to true.
2109
2110         No new tests.
2111
2112         * inspector/front-end/ScriptsPanel.js:
2113         (WebInspector.ScriptsPanel):
2114         * inspector/front-end/scriptsPanel.css:
2115         (.split-view-horizontal #scripts-debug-sidebar-resizer-widget):
2116
2117 2013-02-18  Bear Travis  <betravis@adobe.com>
2118
2119         [CSS Exclusions] Support outside-shape layout for shape-inside property
2120         https://bugs.webkit.org/show_bug.cgi?id=102571
2121
2122         Reviewed by David Hyatt.
2123
2124         A shape-inside value of 'outside-shape' should resolve to the value of
2125         the shape-outside property for layout. This patch introduces a helper
2126         method to resolve shape-inside in RenderStyle, and replaces calls to
2127         RenderStyle::shapeInside() when the resolved (layout) value should be
2128         used.
2129
2130         Test: fast/exclusions/shape-inside/shape-inside-outside-shape.html
2131
2132         * rendering/ExclusionShapeInfo.cpp:
2133         (WebCore::::computedShape): Use the resolved shape-inside getter.
2134         * rendering/ExclusionShapeInsideInfo.h:
2135         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Ditto.
2136         (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Ditto.
2137         * rendering/RenderBlock.cpp:
2138         (WebCore::RenderBlock::styleDidChange): Ditto.
2139         (WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto.
2140         * rendering/style/RenderStyle.h: Add the resolved shape inside getter.
2141
2142 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
2143
2144         Web Inspector: hide vertical-sidebar-split in dock-to-right mode behind single experimental flag.
2145         https://bugs.webkit.org/show_bug.cgi?id=110119
2146
2147         Reviewed by Vsevolod Vlasov.
2148
2149         Removed context menus, made it toggle automatically upon dock orientation change.
2150
2151         * inspector/front-end/DockController.js:
2152         (WebInspector.DockController.prototype._toggleDockState):
2153         * inspector/front-end/ElementsPanel.js:
2154         (WebInspector.ElementsPanel):
2155         (WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired):
2156         (WebInspector.ElementsPanel.prototype._dockSideChanged):
2157         (WebInspector.ElementsPanel.prototype._setVerticalSplit):
2158         * inspector/front-end/ScriptsPanel.js:
2159         (WebInspector.ScriptsPanel):
2160         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
2161         (WebInspector.ScriptsPanel.prototype._dockSideChanged):
2162         * inspector/front-end/Settings.js:
2163         (WebInspector.ExperimentsSettings):
2164         * inspector/front-end/inspector.css:
2165         * inspector/front-end/scriptsPanel.css:
2166         (#scripts-sidebar-stack-pane):
2167         (div.sidebar-pane-stack#scripts-debug-sidebar-contents):
2168         * inspector/front-end/tabbedPane.css:
2169         (.tabbed-pane):
2170
2171 2013-02-18  ChangSeok Oh  <shivamidow@gmail.com>
2172
2173         [GTK] Fix nits for configuration
2174         https://bugs.webkit.org/show_bug.cgi?id=110083
2175
2176         Reviewed by Martin Robinson.
2177
2178         Remove trailing white space. It has caused annoying warning while configuration.
2179
2180         No new tests since no funtionality change.
2181
2182         * GNUmakefile.list.am:
2183
2184 2013-02-18  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2185
2186         [WebGL][EFL] Refactor GraphicsContext3DPrivate to add support for SharedContext.
2187         https://bugs.webkit.org/show_bug.cgi?id=109988
2188
2189         Reviewed by Kenneth Rohde Christiansen.
2190
2191         Covered by existing WebGL tests.
2192
2193         This patch refactors PlatformContext and GraphicsContext3DPrivate to
2194         add support for Shared Context. This would help share GL resources
2195         between transport surface and offscreen surface without having to worry
2196         about the context state. So far, we used the same drawable as transport
2197         surface and offscreen surface. After this patch we use pixmap surface as
2198         offscreen surface and use shared context to render texture content to
2199         transport surface. This would also align as to how shared surface is implemented
2200         on EFL and Qt ports.
2201
2202         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2203         (WebCore::GraphicsContext3D::GraphicsContext3D):
2204         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2205         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2206         (WebCore):
2207         (WebCore::GraphicsContext3DPrivate::initialize):
2208         (WebCore::GraphicsContext3DPrivate::makeSharedContextCurrent):
2209         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
2210         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2211         (GraphicsContext3DPrivate):
2212         * platform/graphics/opengl/GLPlatformContext.cpp:
2213         (WebCore::GLPlatformContext::initialize):
2214         * platform/graphics/opengl/GLPlatformContext.h:
2215         Needed changes to take shared context into use.
2216
2217         * platform/graphics/opengl/GLPlatformSurface.cpp:
2218         (WebCore::GLPlatformSurface::createOffScreenSurface):
2219         (WebCore::GLPlatformSurface::updateContents):
2220         * platform/graphics/opengl/GLPlatformSurface.h:
2221         (GLPlatformSurface):
2222         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
2223         (WebCore::GLXConfigSelector::GLXConfigSelector):
2224         (WebCore::GLXConfigSelector::visualInfo):
2225         (WebCore::GLXConfigSelector::pixmapContextConfig):
2226         (GLXConfigSelector):
2227         (WebCore::GLXConfigSelector::reset):
2228         * platform/graphics/surfaces/glx/GLXContext.cpp:
2229         Added support to query configiration supporting
2230         pixmap surface.
2231
2232         (WebCore::GLXOffScreenContext::initialize):
2233         * platform/graphics/surfaces/glx/GLXContext.h:
2234         (GLXOffScreenContext):
2235         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2236         (WebCore::GLXTransportSurface::GLXTransportSurface):
2237         (WebCore::GLXTransportSurface::swapBuffers):
2238         (WebCore::GLXOffScreenSurface::GLXOffScreenSurface):
2239         (WebCore::GLXOffScreenSurface::~GLXOffScreenSurface):
2240         (WebCore::GLXOffScreenSurface::initialize):
2241         (WebCore::GLXOffScreenSurface::configuration):
2242         (WebCore::GLXOffScreenSurface::destroy):
2243         (WebCore::GLXOffScreenSurface::freeResources):
2244         (WebCore::GLXOffScreenSurface::setGeometry):
2245         Renamed GLXPBuffer surface as GLXOffScreenSurface.
2246
2247         * platform/graphics/surfaces/glx/GLXSurface.h:
2248         (GLXTransportSurface):
2249         (GLXOffScreenSurface):
2250         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
2251         (WebCore::GraphicsSurfacePrivate::createSurface):
2252         * platform/graphics/surfaces/glx/X11Helper.cpp:
2253         (WebCore::X11Helper::createPixmap):
2254         (WebCore):
2255         (WebCore::X11Helper::destroyPixmap):
2256         (WebCore::X11Helper::createOffScreenWindow):
2257         * platform/graphics/surfaces/glx/X11Helper.h:
2258         (X11Helper):
2259         Added functions to create and destroy pixmap.
2260
2261 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
2262
2263         Web Inspector: Native Memory Instrumentation: Generate meta information for HeapSnapshot parser.
2264         https://bugs.webkit.org/show_bug.cgi?id=110104
2265
2266         Reviewed by Yury Semikhatsky.
2267
2268         The format of Native heap snapshot is slightly different so it should provide its own meta information.
2269
2270
2271         * inspector/HeapGraphSerializer.cpp:
2272         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2273         (WebCore::HeapGraphSerializer::finish):
2274         (WebCore::HeapGraphSerializer::reportMemoryUsage):
2275         (WebCore::HeapGraphSerializer::registerTypeString):
2276         (WebCore):
2277         * inspector/HeapGraphSerializer.h:
2278         (HeapGraphSerializer):
2279         * inspector/Inspector.json:
2280         * inspector/InspectorMemoryAgent.cpp:
2281         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2282         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2283         * inspector/InspectorMemoryAgent.h:
2284         (InspectorMemoryAgent):
2285         * inspector/front-end/HeapSnapshot.js:
2286         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
2287         * inspector/front-end/NativeHeapSnapshot.js:
2288         (WebInspector.NativeHeapSnapshot):
2289
2290 2013-02-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2291
2292         [GTK] Force single header includes in GObject DOM bindings
2293         https://bugs.webkit.org/show_bug.cgi?id=104676
2294
2295         Reviewed by Xan Lopez.
2296
2297         Only including <webkitdom/webkitdom.h> should be allowed from
2298         apps.
2299
2300         * bindings/scripts/CodeGeneratorGObject.pm:
2301         (GenerateHeader):
2302         * bindings/scripts/gobject-generate-headers.pl:
2303         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
2304         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
2305         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2306         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
2307         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
2308         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2309         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
2310         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2311         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
2312         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
2313         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
2314         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2315         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
2316         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2317
2318 2013-02-16  Antti Koivisto  <antti@apple.com>
2319
2320         Reschedule shared CFRunLoopTimer instead of reconstructing it
2321         https://bugs.webkit.org/show_bug.cgi?id=109765
2322
2323         Reviewed by Andreas Kling.
2324
2325         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
2326
2327         * platform/SharedTimer.h:
2328         (WebCore::SharedTimer::willEnterNestedEventLoop):
2329         (WebCore):
2330         (MainThreadSharedTimer):
2331         (WebCore::MainThreadSharedTimer::willEnterNestedEventLoop):
2332         * platform/ThreadTimers.cpp:
2333         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
2334         * platform/mac/SharedTimerMac.mm:
2335         (WebCore):
2336         (WebCore::PowerObserver::clearSharedTimer):
2337         (WebCore::ensurePowerObserver):
2338         (WebCore::sharedTimer):
2339         (WebCore::reinsertSharedTimer):
2340         
2341             Before entering nested runloop (used for inspector debugger mostly) reconstruct and reinsert the timer. For some reason
2342             the timer doesn't fire otherwise.
2343
2344         (WebCore::setSharedTimerFireInterval):
2345         (WebCore::stopSharedTimer):
2346
2347 2013-02-18  Alexander Pavlov  <apavlov@chromium.org>
2348
2349         Web Inspector: [Resources] Only remember the tree element selection if explicitly made by user
2350         https://bugs.webkit.org/show_bug.cgi?id=110105
2351
2352         Reviewed by Pavel Feldman.
2353
2354         This change instructs the Resources panel to remember the selected tree element only if it has been
2355         selected by the user (not automatically, like selecting a parent when its child is removed).
2356         All onselect() overrides pass the selectedByUser argument value
2357         to BaseStorageTreeElement.prototype.onselect.
2358         Drive-by: Use === comparisons everywhere.
2359
2360         * inspector/front-end/ResourcesPanel.js:
2361         (WebInspector.ResourcesPanel.prototype._reset): Do not detach [immutable] category views.
2362         (WebInspector.BaseStorageTreeElement.prototype.onselect): Remember itemURL on user gesture only.
2363         (WebInspector.StorageCategoryTreeElement.prototype.onselect):
2364         (WebInspector.FrameTreeElement.prototype.onselect):
2365         (WebInspector.FrameResourceTreeElement.prototype.onselect):
2366         (WebInspector.DatabaseTreeElement.prototype.onselect):
2367         (WebInspector.DatabaseTableTreeElement.prototype.onselect):
2368         (WebInspector.IDBDatabaseTreeElement.prototype.onselect):
2369         (WebInspector.IDBObjectStoreTreeElement.prototype.onselect):
2370         (WebInspector.IDBIndexTreeElement.prototype.onselect):
2371         (WebInspector.DOMStorageTreeElement):
2372         (WebInspector.DOMStorageTreeElement.prototype.onselect):
2373         (WebInspector.CookieTreeElement.prototype.onselect):
2374         (WebInspector.ApplicationCacheManifestTreeElement.prototype.onselect):
2375         (WebInspector.ApplicationCacheFrameTreeElement.prototype.onselect):
2376         (WebInspector.FileSystemTreeElement.prototype.onselect):
2377         (WebInspector.FileSystemTreeElement.prototype.clear):
2378         (WebInspector.ResourcesSearchController.prototype.nextSearchResult):
2379
2380 2013-02-18  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2381
2382         Web Inspector: Color picker should not be available in Computed Styles pane
2383         https://bugs.webkit.org/show_bug.cgi?id=109697
2384
2385         Reviewed by Pavel Feldman.
2386
2387         Refactored PropertiesSection and TreeElement inheritors in StylesSidebarPane.js for cleaner separation
2388         of read-only and editable properties.
2389
2390         * inspector/front-end/StylesSidebarPane.js:
2391         (WebInspector.StylePropertiesSection.prototype.onpopulate):
2392         (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty):
2393         (WebInspector.ComputedStylePropertiesSection):
2394         (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate):
2395         (WebInspector.BlankStylePropertiesSection):
2396         (WebInspector.StylePropertyTreeElementBase):
2397         (WebInspector.StylePropertyTreeElementBase.prototype.node):
2398         (WebInspector.StylePropertyTreeElementBase.prototype.editablePane):
2399         (WebInspector.StylePropertyTreeElementBase.prototype.onattach):
2400         (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.linkifyURL):
2401         (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.):
2402         (WebInspector.StylePropertyTreeElementBase.prototype):
2403         (.event):
2404         (.isRevert):
2405
2406 2013-02-18  Andrey Adaikin  <aandrey@chromium.org>
2407
2408         Web Inspector: [Canvas] group replay log calls by frames
2409         https://bugs.webkit.org/show_bug.cgi?id=110101
2410
2411         Reviewed by Pavel Feldman.
2412
2413         Group canvas replay log by frames, then by draw calls.
2414
2415         * inspector/InjectedScriptCanvasModuleSource.js:
2416         (.):
2417         * inspector/Inspector.json:
2418         * inspector/front-end/CanvasProfileView.js:
2419         (WebInspector.CanvasProfileView):
2420         (WebInspector.CanvasProfileView.prototype.dispose):
2421         (WebInspector.CanvasProfileView.prototype._appendCallNode):
2422         (WebInspector.CanvasProfileView.prototype._appendDrawCallGroup):
2423
2424 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2425
2426         [Soup] CookieJarSoup::deleteCookie() should stop looking for the cookie after it is removed
2427         https://bugs.webkit.org/show_bug.cgi?id=110100
2428
2429         Reviewed by Kenneth Rohde Christiansen.
2430
2431         CookieJarSoup::deleteCookie() retrieves the list of cookies that apply to a given URL, then
2432         iterates through the cookies to find the one with the right name and delete it. However, the
2433         current implementation keeps on comparing cookie names after the cookie was removed. This
2434         patch introduces a "wasDeleted" boolean to stop comparing cookie names after the cookie was
2435         deleted. Note that we cannot break as soon as the cookie is found as we need to keep iterating
2436         so that the cookies get freed by GOwnPtr.
2437
2438         No new tests, no behavior change.
2439
2440         * platform/network/soup/CookieJarSoup.cpp:
2441         (WebCore::deleteCookie):
2442
2443 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2444
2445         Web Inspector: Create separate project for each domain for UISourceCode based on browser resources.
2446         https://bugs.webkit.org/show_bug.cgi?id=109691
2447
2448         Reviewed by Pavel Feldman.
2449
2450         Separate project of certain type is now created for each domain.
2451         UISourceCode path represents a path in the project now.
2452         UISourceCode uri is now calculated based on project id and path.
2453         It is also possible to calculate path based on projectId and URI, which is used for uiSourceCodeForURI() methods.
2454
2455         * inspector/front-end/FileSystemProjectDelegate.js:
2456         (WebInspector.FileSystemProjectDelegate.prototype._filePathForPath):
2457         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2458         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2459         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2460         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2461         * inspector/front-end/ScriptSnippetModel.js:
2462         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2463         * inspector/front-end/SimpleWorkspaceProvider.js:
2464         (WebInspector.SimpleProjectDelegate):
2465         (WebInspector.SimpleProjectDelegate.projectId):
2466         (WebInspector.SimpleProjectDelegate.prototype.id):
2467         (WebInspector.SimpleProjectDelegate.prototype.displayName):
2468         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2469         (WebInspector.SimpleWorkspaceProvider):
2470         (WebInspector.SimpleWorkspaceProvider.splitURL):
2471         (WebInspector.SimpleWorkspaceProvider._pathForSplittedURL):
2472         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2473         (WebInspector.SimpleWorkspaceProvider.prototype._projectDelegate):
2474         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2475         (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName):
2476         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFile):
2477         (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName):
2478         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2479         * inspector/front-end/UISourceCode.js:
2480         (WebInspector.UISourceCode.uri):
2481         (WebInspector.UISourceCode.path):
2482         (WebInspector.UISourceCode.prototype.uri):
2483         * inspector/front-end/Workspace.js:
2484         (WebInspector.Project.prototype._fileAdded):
2485         (WebInspector.Project.prototype._fileRemoved):
2486         (WebInspector.Project.prototype.uiSourceCodeForURI):
2487
2488 2013-02-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2489
2490         [EFL] Rebaseline failure media tests after r142947
2491         https://bugs.webkit.org/show_bug.cgi?id=109904
2492
2493         Reviewed by Kenneth Rohde Christiansen.
2494
2495         * css/mediaControlsEfl.css: Align time text vertically.
2496         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2497
2498 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2499
2500         Web Inspector: Extract FileSystemUtils from FileSystemProjectDelegate as IsolatedFileSystem class.
2501         https://bugs.webkit.org/show_bug.cgi?id=110086
2502
2503         Reviewed by Pavel Feldman.
2504
2505         Extracted IsolatedFileSystem class that could be mocked for tests now.
2506         Renamed IsolatedFileSystemModel to IsolatedFileSystemManager.
2507
2508         * WebCore.gypi:
2509         * WebCore.vcproj/WebCore.vcproj:
2510         * inspector/compile-front-end.py:
2511         * inspector/front-end/FileSystemProjectDelegate.js:
2512         (WebInspector.FileSystemProjectDelegate):
2513         (WebInspector.FileSystemProjectDelegate.prototype.id):
2514         (WebInspector.FileSystemProjectDelegate.prototype.displayName):
2515         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2516         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2517         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2518         * inspector/front-end/IsolatedFileSystem.js: Added.
2519         (WebInspector.IsolatedFileSystem):
2520         (WebInspector.IsolatedFileSystem.errorMessage):
2521         (WebInspector.IsolatedFileSystem.prototype.id):
2522         (WebInspector.IsolatedFileSystem.prototype.path):
2523         (WebInspector.IsolatedFileSystem.prototype._requestFileSystem):
2524         (WebInspector.IsolatedFileSystem.prototype.fileSystemLoaded):
2525         (WebInspector.IsolatedFileSystem.prototype.innerCallback):
2526         (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
2527         (WebInspector.IsolatedFileSystem.prototype.fileEntryLoaded):
2528         (WebInspector.IsolatedFileSystem.prototype.fileLoaded):
2529         (WebInspector.IsolatedFileSystem.prototype.readerLoadEnd):
2530         (WebInspector.IsolatedFileSystem.prototype.errorHandler):
2531         (WebInspector.IsolatedFileSystem.prototype.requestFileContent):
2532         (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated.fileTruncated):
2533         (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated):
2534         (WebInspector.IsolatedFileSystem.prototype.writerEnd):
2535         (WebInspector.IsolatedFileSystem.prototype.setFileContent):
2536         (WebInspector.IsolatedFileSystem.prototype.):
2537         (WebInspector.IsolatedFileSystem.prototype.toArray):
2538         (WebInspector.IsolatedFileSystem.prototype._readDirectory):
2539         (WebInspector.IsolatedFileSystem.prototype._requestEntries):
2540         * inspector/front-end/IsolatedFileSystemManager.js: Renamed from Source/WebCore/inspector/front-end/IsolatedFileSystemModel.js.
2541         (WebInspector.IsolatedFileSystemManager):
2542         (WebInspector.IsolatedFileSystemManager.prototype.mapping):
2543         (WebInspector.IsolatedFileSystemManager.prototype.supportsFileSystems):
2544         (WebInspector.IsolatedFileSystemManager.prototype._requestFileSystems):
2545         (WebInspector.IsolatedFileSystemManager.prototype.addFileSystem):
2546         (WebInspector.IsolatedFileSystemManager.prototype.removeFileSystem):
2547         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemsLoaded):
2548         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
2549         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemPaths):
2550         (WebInspector.IsolatedFileSystemManager.prototype._processPendingFileSystemRequests):
2551         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemAdded):
2552         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
2553         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
2554         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
2555         (WebInspector.IsolatedFileSystemDispatcher):
2556         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemsLoaded):
2557         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemRemoved):
2558         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemAdded):
2559         * inspector/front-end/SettingsScreen.js:
2560         (WebInspector.WorkspaceSettingsTab.prototype._createFileSystemsEditor):
2561         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemRow.removeFileSystemClicked):
2562         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemClicked):
2563         * inspector/front-end/WebKit.qrc:
2564         * inspector/front-end/inspector.html:
2565         * inspector/front-end/inspector.js:
2566
2567 2013-02-18  Huang Dongsung  <luxtella@company100.net>
2568
2569         [EFL][WK2] compositing/layer-creation/fixed-position-out-of-view-scaled.html is flaky
2570         https://bugs.webkit.org/show_bug.cgi?id=110059
2571
2572         Reviewed by Kenneth Rohde Christiansen.
2573
2574         Remove the ASSERT check in TextureMapperLayer. This assertion seems
2575         valid because CoordinatedGraphicsScene::adjustPositionForFixedLayers() calls
2576         TextureMapperLayer::setScrollPositionDeltaIfNeeded() when the graphics
2577         layer is a fixed position layer. However, the assertion can be failed
2578         because it is possible that TextureMapperLayer is a non-fixed position
2579         layer when the graphics layer that holds the TextureMapperLayer is a
2580         fixed position layer. When CoordinatedGraphicsScene flushes,
2581         TextureMapperLayer becomes a fixed position layer.
2582
2583         No new tests. No change in behavior.
2584
2585         * platform/graphics/texmap/TextureMapperLayer.cpp:
2586         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
2587
2588 2013-02-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2589
2590         [WK2][EFL] Unified text checker implementation
2591         https://bugs.webkit.org/show_bug.cgi?id=107682
2592
2593         Reviewed by Anders Carlsson.
2594
2595         No new tests, covered by editing/spelling tests.
2596
2597         * platform/text/TextChecking.h:
2598         (WebCore):
2599         Enabling unified text checker feature for WebKit-EFL.
2600
2601 2013-02-18  Nico Weber  <thakis@chromium.org>
2602
2603         [chromium/clang] Remove -Wno-return-type-c-linkage
2604         https://bugs.webkit.org/show_bug.cgi?id=110098
2605
2606         Reviewed by Jochen Eisinger.
2607
2608         The one instance where this triggered was removed in
2609         http://trac.webkit.org/changeset/141184 . A clang that has this
2610         warning landed in chromium r182694, so it should be safe to turn
2611         the warning on now.
2612
2613         * WebCore.gyp/WebCore.gyp:
2614
2615 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
2616
2617         Web Inspector: provide basic console.table implementation (no [,columns] support)
2618         https://bugs.webkit.org/show_bug.cgi?id=109453
2619
2620         Reviewed by Vsevolod Vlasov.
2621
2622         Test: inspector/console/console-format-table.html
2623
2624         Using console preview infrastructure to support console.table.
2625
2626         * English.lproj/localizedStrings.js:
2627         * inspector/ConsoleAPITypes.h:
2628         * inspector/ConsoleMessage.cpp:
2629         (WebCore::messageTypeValue):
2630         (WebCore::ConsoleMessage::addToFrontend):
2631         * inspector/InjectedScript.cpp:
2632         (WebCore::InjectedScript::wrapObject):
2633         (WebCore):
2634         (WebCore::InjectedScript::wrapTable):
2635         * inspector/InjectedScript.h:
2636         (InjectedScript):
2637         * inspector/InjectedScriptSource.js:
2638         (.):
2639         * inspector/Inspector.json:
2640         * inspector/InspectorDOMAgent.cpp:
2641         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2642         * inspector/front-end/ConsoleMessage.js:
2643         (WebInspector.ConsoleMessageImpl):
2644         (WebInspector.ConsoleMessageImpl.prototype.willHide):
2645         (WebInspector.ConsoleMessageImpl.prototype._format):
2646         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
2647         (WebInspector.ConsoleMessageImpl.prototype._renderPropertyPreview):
2648         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
2649         * inspector/front-end/ConsoleModel.js:
2650         * inspector/front-end/ConsoleView.js:
2651         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
2652         (WebInspector.ConsoleView.prototype._consoleCleared):
2653         (WebInspector.ConsoleView.prototype._updateMessageList):
2654         (WebInspector.ConsoleCommand.prototype.wasShown):
2655         (WebInspector.ConsoleCommand.prototype.willHide):
2656         (WebInspector.ConsoleGroup.prototype.addMessage):
2657         * inspector/front-end/DataGrid.js:
2658         (.sortDataGrid.comparator):
2659         (.sortDataGrid):
2660         (WebInspector.DataGrid.createSortableDataGrid):
2661         (WebInspector.DataGrid.prototype.renderInline):
2662         * inspector/front-end/DatabaseQueryView.js:
2663         (WebInspector.DatabaseQueryView.prototype._queryFinished):
2664         * inspector/front-end/dataGrid.css:
2665         (.data-grid.inline):
2666         (.data-grid.inline td.corner):
2667         * inspector/front-end/resourcesPanel.css:
2668         (.storage-view > .data-grid):
2669         * page/Console.cpp:
2670         (WebCore::Console::table):
2671         (WebCore):
2672         * page/Console.h:
2673         (Console):
2674         * page/Console.idl:
2675
2676 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2677
2678         Web Inspector: JavaScriptSourceFrame should inherit UISourceCodeFrame
2679         https://bugs.webkit.org/show_bug.cgi?id=110091
2680
2681         Reviewed by Pavel Feldman.
2682
2683         Removed duplicated code from JavaScriptSourceFrame and made it inherit UISourceCodeFrame.
2684
2685         * inspector/front-end/JavaScriptSourceFrame.js:
2686         (WebInspector.JavaScriptSourceFrame):
2687         (WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged):
2688         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
2689         * inspector/front-end/ScriptsPanel.js:
2690         * inspector/front-end/UISourceCodeFrame.js:
2691         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2692         (WebInspector.UISourceCodeFrame.prototype.onTextChanged):
2693         (WebInspector.UISourceCodeFrame.prototype._onFormattedChanged):
2694         (WebInspector.UISourceCodeFrame.prototype.onUISourceCodeContentChanged):
2695         (WebInspector.UISourceCodeFrame.prototype._innerSetContent):
2696
2697 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2698
2699         Web Inspector: Remove unused _files field in FileSystemProjectDelegate
2700         https://bugs.webkit.org/show_bug.cgi?id=110082
2701
2702         Reviewed by Pavel Feldman.
2703
2704         * inspector/front-end/FileSystemProjectDelegate.js:
2705         (WebInspector.FileSystemProjectDelegate):
2706         (WebInspector.FileSystemProjectDelegate.prototype._addFile):
2707         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2708
2709 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
2710
2711         Web Inspector: allow 0 as a formatted parameter in console message.
2712         https://bugs.webkit.org/show_bug.cgi?id=110096
2713
2714         Reviewed by Vsevolod Vlasov.
2715
2716         * inspector/front-end/ConsoleMessage.js:
2717         (WebInspector.ConsoleMessageImpl.prototype.append):
2718         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
2719
2720 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
2721
2722         Unreviewed speculative fix for Chromium Mac.
2723
2724         * WebCore.gypi:
2725
2726 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
2727
2728         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
2729         https://bugs.webkit.org/show_bug.cgi?id=109554
2730
2731         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
2732         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
2733
2734         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
2735         It helps me to do the tests for the serializer.
2736
2737         Reviewed by Yury Semikhatsky.
2738
2739         It is covered by newly added tests in TestWebKitAPI.
2740
2741         * inspector/HeapGraphSerializer.cpp:
2742         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2743         (WebCore::HeapGraphSerializer::pushUpdate):
2744         (WebCore::HeapGraphSerializer::reportNode):
2745         (WebCore::HeapGraphSerializer::toNodeId):
2746         (WebCore::HeapGraphSerializer::addRootNode):
2747         * inspector/HeapGraphSerializer.h:
2748         (HeapGraphSerializer):
2749         (Client):
2750         (WebCore::HeapGraphSerializer::Client::~Client):
2751         * inspector/InspectorMemoryAgent.cpp:
2752         (WebCore):
2753         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2754
2755 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2756
2757         Unreviewed, rolling out r143100.
2758         http://trac.webkit.org/changeset/143100
2759         https://bugs.webkit.org/show_bug.cgi?id=110088
2760
2761         Breaks file system support in workspace. (Requested by vsevik
2762         on #webkit).
2763
2764         * inspector/front-end/ScriptSnippetModel.js:
2765         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2766         * inspector/front-end/SimpleWorkspaceProvider.js:
2767         (WebInspector.SimpleProjectDelegate):
2768         (WebInspector.SimpleProjectDelegate.prototype.id):
2769         (WebInspector.SimpleProjectDelegate.prototype.displayName):
2770         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2771         (WebInspector.SimpleWorkspaceProvider):
2772         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2773         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2774         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
2775         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2776         * inspector/front-end/UISourceCode.js:
2777         (WebInspector.UISourceCode.prototype.uri):
2778         * inspector/front-end/Workspace.js:
2779         (WebInspector.Project.prototype._fileAdded):
2780         (WebInspector.Project.prototype._fileRemoved):
2781         (WebInspector.Project.prototype.uiSourceCodeForURI):
2782         (WebInspector.Workspace.prototype.projectForUISourceCode):
2783
2784 2013-02-15  Eugene Klyuchnikov  <eustas@chromium.org>
2785
2786         Web Inspector: Introduce ProfilesPanelDescriptor.
2787         https://bugs.webkit.org/show_bug.cgi?id=109906
2788
2789         Reviewed by Pavel Feldman.
2790
2791         Some constants/methods should be accesible before ProfilesPanel
2792         is instantiated.
2793
2794         Extracted methods to check if profile is "user-initiated" and what is
2795         its index.
2796
2797         Also profile URL regexp moved to ProfilesPanelDescriptor.
2798
2799         * inspector/front-end/ProfilesPanelDescriptor.js: Added.
2800         * WebCore.gypi: Added ProfilesPanelDescriptor.js
2801         * WebCore.vcproj/WebCore.vcproj: Ditto.
2802         * inspector/compile-front-end.py: Ditto.
2803         * inspector/front-end/WebKit.qrc: Ditto.
2804         * inspector/front-end/inspector.html: Ditto.
2805         * inspector/front-end/HeapSnapshotView.js: Adopted changes.
2806         * inspector/front-end/ProfilesPanel.js: Ditto.
2807         * inspector/front-end/externs.js: Ditto.
2808         * inspector/front-end/inspector.js: Ditto.
2809
2810 2013-02-17  Dimitri Glazkov  <dglazkov@chromium.org>
2811
2812         Stop passing around SelectorChecker in SelectorQuery, now that it's stack-allocated.
2813         https://bugs.webkit.org/show_bug.cgi?id=110038
2814
2815         Reviewed by Andreas Kling.
2816
2817         No functional changes, covered by existing tests.
2818
2819         * dom/SelectorQuery.cpp:
2820         (WebCore::SelectorDataList::matches): Moved instantiation of SelectorChecker in here.
2821         (WebCore::SelectorDataList::queryAll): Got rid of unneeded SelectorChecker arg.
2822         (WebCore::SelectorDataList::queryFirst): Ditto.
2823         (WebCore::SelectorDataList::execute): Moved instantiation of SelectorChecker in here.
2824         (WebCore::SelectorQuery::matches): Removed instantiation of SelectorChecker here.
2825         (WebCore::SelectorQuery::queryAll): Ditto.
2826         (WebCore::SelectorQuery::queryFirst): Ditto.
2827         * dom/SelectorQuery.h:
2828         (WebCore): Tweaked headers to make SelectorChecker just an implementation detail.
2829         (SelectorDataList): Tweaked decls to remove SelectorChecker args.
2830
2831 2013-02-17  Dimitri Glazkov  <dglazkov@chromium.org>
2832
2833         Stop passing around SelectorChecker in ContentSelectorQuery.
2834         https://bugs.webkit.org/show_bug.cgi?id=110041
2835
2836         Now that SelectorChecker has no interesting state, we can simplify ContentSelectorQuery and get rid of a class.
2837
2838         Reviewed by Andreas Kling.
2839
2840         No functional changes, covered by existing tests.
2841
2842         * html/shadow/ContentSelectorQuery.cpp:
2843         (WebCore::ContentSelectorDataList::checkContentSelector): Zapped ContentSelectorChecker and moved its only remaining method here.
2844         (WebCore::ContentSelectorDataList::matches): Removed SelectorChecker argument.
2845         (WebCore::ContentSelectorQuery::ContentSelectorQuery): Removed an unnecessary member.
2846         (WebCore::ContentSelectorQuery::matches): Removed unnecessary argument.
2847         * html/shadow/ContentSelectorQuery.h:
2848         (WebCore): Cleaned up the file.
2849         (ContentSelectorDataList): Updated decls.
2850         (ContentSelectorQuery): Ditto.
2851
2852 2013-02-17  Mike West  <mkwst@chromium.org>
2853
2854         WheelEvent should not target text nodes.
2855         https://bugs.webkit.org/show_bug.cgi?id=109939
2856
2857         Reviewed by Darin Adler.
2858
2859         WheelEvent, like other mouse events, should not target text nodes.
2860         EventHandler correctly handles other mouse events by retargeting
2861         events to text nodes' parents; this patch adds that logic to the
2862         WheelEvent handler.
2863
2864         This should allow jQuery to stop working around WebKit's behavior[1].
2865
2866         [1]: https://github.com/jquery/jquery/commit/c61150427fc8ccc8e884df8f221a6c9bb5477929
2867
2868         Test: fast/events/wheelevent-in-text-node.html
2869
2870         * page/EventHandler.cpp:
2871         (WebCore::EventHandler::handleWheelEvent):
2872             If a WheelEvent's hit test lands on a text node, retarget the
2873             event to the text node's parent. Do this before latching the node.
2874
2875 2013-02-17  Filip Pizlo  <fpizlo@apple.com>
2876
2877         Move all Structure out-of-line inline methods to StructureInlines.h
2878         https://bugs.webkit.org/show_bug.cgi?id=110024
2879
2880         Rubber stamped by Sam Weinig.
2881
2882         No new tests because no new behavior. Just rewiring includes.
2883
2884         * ForwardingHeaders/parser/SourceProviderCache.h: Added.
2885         * loader/cache/CachedScript.cpp:
2886
2887 2013-02-17  Hayato Ito  <hayato@chromium.org>
2888
2889         Make EventDispatcher take an Event object in its constructor.
2890         https://bugs.webkit.org/show_bug.cgi?id=109898
2891
2892         Reviewed by Dimitri Glazkov.
2893
2894         That makes EventDispatcher more RAII-like so that we can calculate
2895         an EventPath in its constructor.  I'll remove
2896         EventDispatcher::ensureEventPath() in a following patch.
2897
2898         No tests. No change in behavior.
2899
2900         * dom/EventDispatchMediator.cpp:
2901         (WebCore::EventDispatchMediator::dispatchEvent):
2902         * dom/EventDispatcher.cpp:
2903         (WebCore::EventDispatcher::dispatchEvent):
2904         (WebCore::EventDispatcher::EventDispatcher):
2905         (WebCore::EventDispatcher::ensureEventPath):
2906         (WebCore::EventDispatcher::dispatchSimulatedClick):
2907         (WebCore::EventDispatcher::dispatch):
2908         (WebCore::EventDispatcher::dispatchEventPreProcess):
2909         (WebCore::EventDispatcher::dispatchEventAtCapturing):
2910         (WebCore::EventDispatcher::dispatchEventAtTarget):
2911         (WebCore::EventDispatcher::dispatchEventAtBubbling):
2912         (WebCore::EventDispatcher::dispatchEventPostProcess):
2913         * dom/EventDispatcher.h:
2914         (EventDispatcher):
2915         (WebCore::EventDispatcher::node):
2916         (WebCore::EventDispatcher::event):
2917         * dom/FocusEvent.cpp:
2918         (WebCore::FocusEventDispatchMediator::dispatchEvent):
2919         (WebCore::BlurEventDispatchMediator::dispatchEvent):
2920         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
2921         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
2922         * dom/GestureEvent.cpp:
2923         (WebCore::GestureEventDispatchMediator::dispatchEvent):
2924         * dom/MouseEvent.cpp:
2925         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2926
2927 2013-02-17  Philip Rogers  <pdr@google.com>
2928
2929         Fix non-root SVG viewport under zoom
2930         https://bugs.webkit.org/show_bug.cgi?id=99453
2931
2932         Reviewed by Dirk Schulze.
2933
2934         The root SVG element handles zoom differently than other SVG nodes because it needs
2935         to translate between CSS (where zoom is applied to all units) and SVG (where zoom is only
2936         applied at the top level). A good description of this difference can be found here:
2937         http://trac.webkit.org/browser/trunk/Source/WebCore/css/StyleResolver.cpp?rev=142855#L2598
2938
2939         SVG elements can appear as children in the SVG tree as well, and in this mode
2940         SVGSVGElement should not consider the current zoom level. This patch fixes a bug
2941         where non-root viewport calculations were removing zoom.
2942
2943         Test: svg/custom/symbol-zoom.html
2944
2945         * svg/SVGSVGElement.cpp:
2946         (WebCore::SVGSVGElement::currentViewportSize):
2947             This change removes the unnecessary zoom calculation for non-root nodes. This is similar
2948             to how zoom is handled elsewhere, e.g., SVGSVGElement::localCoordinateSpaceTransform.
2949
2950 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
2951
2952         AX: Upstream iOS Accessibility files
2953         https://bugs.webkit.org/show_bug.cgi?id=110071
2954
2955         Reviewed by David Kilzer.
2956
2957         Upstream the iOS Accessibility files for WebCore. 
2958
2959         * WebCore.xcodeproj/project.pbxproj:
2960         * accessibility/ios: Added.
2961         * accessibility/ios/AXObjectCacheIOS.mm: Added.
2962         (WebCore):
2963         (WebCore::AXObjectCache::detachWrapper):
2964         (WebCore::AXObjectCache::attachWrapper):
2965         (WebCore::AXObjectCache::postPlatformNotification):
2966         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2967         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2968         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
2969         (WebCore::AXObjectCache::handleScrolledToAnchor):
2970         * accessibility/ios/AccessibilityObjectIOS.mm: Added.
2971         (-[WAKView accessibilityIsIgnored]):
2972         (WebCore):
2973         (WebCore::AccessibilityObject::detachFromParent):
2974         (WebCore::AccessibilityObject::overrideAttachmentParent):
2975         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
2976         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
2977         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2978         * accessibility/ios/AccessibilityObjectWrapperIOS.h: Added.
2979         (WAKView):
2980         * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Added.
2981         (AccessibilityUnignoredAncestor):
2982         (-[WebAccessibilityTextMarker initWithTextMarker:cache:]):
2983         (-[WebAccessibilityTextMarker initWithData:cache:]):
2984         (-[WebAccessibilityTextMarker initWithData:accessibilityObject:]):
2985         (+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
2986         (-[WebAccessibilityTextMarker dataRepresentation]):
2987         (-[WebAccessibilityTextMarker visiblePosition]):
2988         (-[WebAccessibilityTextMarker description]):
2989         (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
2990         (-[WebAccessibilityObjectWrapper detach]):
2991         (-[WebAccessibilityObjectWrapper dealloc]):
2992         (-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]):
2993         (-[WebAccessibilityObjectWrapper accessibilityObject]):
2994         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2995         (-[WebAccessibilityObjectWrapper accessibilityPostProcessHitTest:]):
2996         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
2997         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
2998         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
2999         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
3000         (-[WebAccessibilityObjectWrapper accessibilityLanguage]):
3001         (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
3002         (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
3003         (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
3004         (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
3005         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
3006         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
3007         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
3008         (-[WebAccessibilityObjectWrapper isAccessibilityElement]):
3009         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
3010         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
3011         (-[WebAccessibilityObjectWrapper tableCellParent]):
3012         (-[WebAccessibilityObjectWrapper tableParent]):
3013         (-[WebAccessibilityObjectWrapper accessibilityTitleElement]):
3014         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
3015         (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
3016         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
3017         (-[WebAccessibilityObjectWrapper accessibilityColumnRange]):
3018         (-[WebAccessibilityObjectWrapper accessibilityPlaceholderValue]):
3019         (-[WebAccessibilityObjectWrapper accessibilityValue]):
3020         (-[WebAccessibilityObjectWrapper accessibilityIsComboBox]):
3021         (-[WebAccessibilityObjectWrapper accessibilityHint]):
3022         (-[WebAccessibilityObjectWrapper accessibilityURL]):
3023         (-[WebAccessibilityObjectWrapper _convertIntRectToScreenCoordinates:]):
3024         (-[WebAccessibilityObjectWrapper accessibilityElementRect]):
3025         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
3026         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
3027         (-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
3028         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
3029         (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
3030         (-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]):
3031         (-[WebAccessibilityObjectWrapper _accessibilityNextElementsWithCount:]):
3032         (-[WebAccessibilityObjectWrapper _accessibilityPreviousElementsWithCount:]):
3033         (-[WebAccessibilityObjectWrapper accessibilityRequired]):
3034         (-[WebAccessibilityObjectWrapper accessibilityFlowToElements]):
3035         (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
3036         (-[WebAccessibilityObjectWrapper isAttachment]):
3037         (-[WebAccessibilityObjectWrapper _accessibilityActivate]):
3038         (-[WebAccessibilityObjectWrapper attachmentView]):
3039         (rendererForView):
3040         (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
3041         (-[WebAccessibilityObjectWrapper postFocusChangeNotification]):
3042         (-[WebAccessibilityObjectWrapper postSelectedTextChangeNotification]):
3043         (-[WebAccessibilityObjectWrapper postLayoutChangeNotification]):
3044         (-[WebAccessibilityObjectWrapper postLiveRegionChangeNotification]):
3045         (-[WebAccessibilityObjectWrapper postLoadCompleteNotification]):
3046         (-[WebAccessibilityObjectWrapper postChildrenChangedNotification]):
3047         (-[WebAccessibilityObjectWrapper postInvalidStatusChangedNotification]):
3048         (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):
3049         (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
3050         (-[WebAccessibilityObjectWrapper accessibilityIncreaseSelection:]):
3051         (-[WebAccessibilityObjectWrapper accessibilityDecreaseSelection:]):
3052         (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
3053         (-[WebAccessibilityObjectWrapper accessibilityIncrement]):
3054         (-[WebAccessibilityObjectWrapper accessibilityDecrement]):
3055         (-[WebAccessibilityObjectWrapper _addAccessibilityObject:toTextMarkerArray:]):
3056         (-[WebAccessibilityObjectWrapper stringForTextMarkers:]):
3057         (blockquoteLevel):
3058         (AXAttributeStringSetBlockquoteLevel):
3059         (AXAttributeStringSetHeadingLevel):
3060         (AXAttributeStringSetFont):
3061         (AXAttributeStringSetNumber):
3062         (AXAttributeStringSetStyle):
3063         (AXAttributedStringAppendText):
3064         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
3065         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
3066         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
3067         (-[WebAccessibilityObjectWrapper positionForTextMarker:]):
3068         (-[WebAccessibilityObjectWrapper textMarkerRange]):
3069         (-[WebAccessibilityObjectWrapper elementTextRange]):
3070         (-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
3071         (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
3072         (-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
3073         (-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):
3074         (-[WebAccessibilityObjectWrapper stringForRange:]):
3075         (-[WebAccessibilityObjectWrapper attributedStringForRange:]):
3076         (-[WebAccessibilityObjectWrapper elementsForRange:]):
3077         (-[WebAccessibilityObjectWrapper selectionRangeString]):
3078         (-[WebAccessibilityObjectWrapper selectedTextMarker]):
3079         (-[WebAccessibilityObjectWrapper lineEndMarkerForMarker:]):
3080         (-[WebAccessibilityObjectWrapper lineStartMarkerForMarker:]):
3081         (-[WebAccessibilityObjectWrapper nextMarkerForMarker:]):
3082         (-[WebAccessibilityObjectWrapper previousMarkerForMarker:]):
3083         (-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
3084         (-[WebAccessibilityObjectWrapper textMarkerForPoint:]):
3085         (-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
3086         (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]):
3087         (-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):
3088         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
3089         (-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
3090         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
3091         (-[WebAccessibilityObjectWrapper accessibilityInvalidStatus]):
3092         (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
3093         (-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]):
3094         (-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]):
3095         (-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]):
3096         (-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]):
3097         (-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]):
3098         (-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]):
3099         (-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]):
3100         (-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
3101         (-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]):
3102         (-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]):
3103         (-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]):
3104         (-[WebAccessibilityObjectWrapper accessibilityMathType]):
3105         (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]):
3106         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]):
3107         (-[WebAccessibilityObjectWrapper description]):
3108
3109 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
3110
3111         AX: rename WebAccessibilityObjectWrapper to WebAccessibilityObjectWrapperBase
3112         https://bugs.webkit.org/show_bug.cgi?id=110061
3113
3114         Reviewed by David Kilzer.
3115
3116         Rename the base accessibility wrapper class so that the iOS class can share the same name.
3117
3118         * WebCore.xcodeproj/project.pbxproj:
3119         * accessibility/mac/AXObjectCacheMac.mm:
3120         (WebCore::AXObjectCache::attachWrapper):
3121         * accessibility/mac/WebAccessibilityObjectWrapper.h: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h.
3122         * accessibility/mac/WebAccessibilityObjectWrapper.mm: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm.
3123         * accessibility/mac/WebAccessibilityObjectWrapperBase.h: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.h.
3124         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm.
3125         * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Removed.
3126         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed.
3127
3128 2013-02-17  Andreas Kling  <akling@apple.com>
3129
3130         REGRESSION(r143125): ~5% performance hit on Chromium's intl2 page cycler.
3131         <http://webkit.org/b/108835>
3132
3133         Reviewed by Ojan Vafai.
3134
3135         Streamline the case where GlyphPage has a per-glyph SimpleFontData* lookup table to allow
3136         taking earlier branches on pages with lots of mixed-font text.
3137         We accomplish this by explicitly storing a null SimpleFontData* for glyph #0 in the per-glyph
3138         lookup table instead of relying on "if (!glyph)" checks in getters.
3139
3140         This is a speculative optimization, I can't get stable enough numbers locally to tell if this
3141         will resolve the issue on the bots.
3142
3143         * platform/graphics/GlyphPage.h:
3144         (WebCore::GlyphPage::glyphDataForIndex):
3145         (WebCore::GlyphPage::fontDataForCharacter):
3146         (WebCore::GlyphPage::setGlyphDataForIndex):
3147
3148 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
3149
3150         WebSpeech: plumb through a method to generate fake speech jobs for testing
3151         https://bugs.webkit.org/show_bug.cgi?id=107351
3152
3153         Reviewed by Adam Barth.
3154
3155         We can't reliably use the platforms synthesizer to test speech synthesis internals.
3156         This patch adds an Internals method to enable a mock synthesizer, which is inherits
3157         from the PlatformSpeechSythesizer.
3158
3159         The fake synthesizer goes through all the motions of a real synthesizer but doesn't do anything.
3160         A bunch of changes were needed here to make PlatformSpeechSynthesizer subclassable so that the
3161         right virtual are used.
3162
3163         The Mock synthesizer only lives in WebCoreTestSupport. Because PlatformSpeechSynthesizer uses
3164         a RetainPtr, I needed to make WebCoreTestSupport link CoreFoundation
3165
3166 2013-02-17  Csaba Osztrogon√°c  <ossy@webkit.org>
3167
3168         [Qt] Unreviewed buildfix for !USE(LIBXML) builds after r143112.
3169
3170         * xml/parser/XMLDocumentParserQt.cpp:
3171         (WebCore::XMLDocumentParser::XMLDocumentParser):
3172
3173 2013-02-17  Andreas Kling  <akling@apple.com>
3174
3175         Optimize GlyphPage for case where all glyphs are available in the same font.
3176         <http://webkit.org/b/108835>
3177         <rdar://problem/13157042>
3178
3179         Reviewed by Antti Koivisto.
3180
3181         Let GlyphPage begin optimistically assuming that all its glyphs will be represented in
3182         the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*.
3183
3184         If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData*
3185         is allocated transparently.
3186
3187         This was landed before with some bogus branch prediction hints and didn't fare well on
3188         page cyclers (intl2 specifically.) These have been removed this time around, and will
3189         hopefully be regression-free.
3190
3191         4.98 MB progression on Membuster3.
3192
3193         * platform/graphics/GlyphPageTreeNode.cpp:
3194         (WebCore::GlyphPageTreeNode::initializePage):
3195         * platform/graphics/GlyphPage.h:
3196         (WebCore::GlyphPage::createUninitialized):
3197         (WebCore::GlyphPage::createZeroedSystemFallbackPage):
3198         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
3199
3200             There are now three ways of constructing a GlyphPage, two of them are only used for
3201             creating system fallback pages.
3202
3203         (WebCore::GlyphPage::setGlyphDataForIndex):
3204
3205             Hold off creating a SimpleFontData* array until we're sure there are two different
3206             SimpleFontData* backing the glyphs in this page.
3207             We don't store font data for glyph #0, instead we let the getters always return null for it.
3208
3209         (WebCore::GlyphPage::~GlyphPage):
3210
3211             Free the SimpleFontData* array if needed.
3212
3213         (WebCore::GlyphPage::glyphDataForCharacter):
3214         (WebCore::GlyphPage::glyphDataForIndex):
3215         (WebCore::GlyphPage::fontDataForCharacter):
3216
3217             The font data for glyph #0 is always a null pointer now.
3218
3219         (WebCore::GlyphPage::clearForFontData):
3220
3221             Updated for new storage format.
3222
3223         * rendering/svg/SVGTextRunRenderingContext.cpp:
3224         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
3225
3226             Fix bug where non-zero glyph was temporarily associated with null font data,
3227             which triggered the new assertion in setGlyphDataForIndex().
3228
3229 2013-02-16  Andreas Kling  <akling@apple.com>
3230
3231         Remove multi-threading gunk from WebKit2's PluginInfoStore.
3232         <http://webkit.org/b/110046>
3233
3234         Reviewed by Alexey Proskuryakov.
3235
3236         Remove now-unused code for making deep (isolated) copies of WebCore plugin structures.
3237
3238         * plugins/PluginData.h:
3239         (MimeClassInfo):
3240         (PluginInfo):
3241
3242 2013-02-16  Alexey Proskuryakov  <ap@apple.com>
3243
3244         Identifier generated twice in FrameLoader::loadResourceSynchronously()
3245         https://bugs.webkit.org/show_bug.cgi?id=110022
3246
3247         Reviewed by Darin Adler.
3248
3249         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously):
3250         Fix an apparent refactoring mistake.
3251
3252 2013-02-16  Andreas Kling  <akling@apple.com>
3253
3254         [JSC] Remove custom mark function for NamedNodeMap.
3255         <http://webkit.org/b/110029>
3256
3257         Reviewed by Darin Adler.
3258
3259         NamedNodeMap refs and unrefs its Element owner, so there's no need for the wrapper to keep the Element alive.
3260
3261         Covered by fast/dom/Attr/access-after-element-destruction.html
3262
3263         * bindings/js/JSNamedNodeMapCustom.cpp:
3264         * dom/NamedNodeMap.idl:
3265
3266 2013-02-16  Peter Nelson  <peter@peterdn.com>
3267
3268         REGRESSION(r143076): Crash when calling removeNamedItem or removeNamedItemNS with a non-existent attribute of newly created element.
3269         <http://webkit.org/b/110019>
3270
3271         Reviewed by Andreas Kling.
3272
3273         Now checks Element::hasAttributes() before calling Element::getAttributeItemIndex().
3274
3275         Test: http/tests/misc/acid3.html
3276
3277         * dom/NamedNodeMap.cpp:
3278         (WebCore::NamedNodeMap::removeNamedItem):
3279         (WebCore::NamedNodeMap::removeNamedItemNS):
3280
3281 2013-02-16  Andreas Kling  <akling@apple.com>
3282
3283         Element: Devirtualize attribute synchronization functions.
3284         <http://webkit.org/b/110033>
3285
3286         Reviewed by Darin Adler.
3287
3288         Devirtualize the functions that perform re-serialization of lazy attributes and give
3289         them "synchronize"-style names:
3290
3291             - SVGElement::synchronizeAnimatedSVGAttribute()
3292             - StyledElement::synchronizeStyleAttributeInternal()
3293
3294         * dom/Element.cpp:
3295         (WebCore::Element::synchronizeAllAttributes):
3296         (WebCore::Element::synchronizeAttribute):
3297         * dom/Element.h:
3298         * dom/StyledElement.cpp:
3299         (WebCore::StyledElement::synchronizeStyleAttribute):
3300         * dom/StyledElement.h:
3301         (StyledElement):
3302         * rendering/svg/RenderSVGResourceGradient.cpp:
3303         (WebCore::RenderSVGResourceGradient::applyResource):
3304         * rendering/svg/RenderSVGResourcePattern.cpp:
3305         (WebCore::RenderSVGResourcePattern::buildPattern):
3306         * svg/SVGElement.cpp:
3307         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute):
3308         * svg/SVGElement.h:
3309         (SVGElement):
3310
3311 2013-02-16  Andreas Kling  <akling@apple.com>
3312
3313         Element: Avoid unrelated attribute synchronization on other attribute access.
3314         <http://webkit.org/b/110025>
3315
3316         Reviewed by Darin Adler.
3317
3318         We've been extremely trigger happy with re-serializing the style attribute (and SVG animatables)
3319         whenever any Element attribute API was used. This patch narrows this down to (almost always)
3320         only synchronizing an attribute when someone specifically wants to read/update it.
3321
3322         Also removed two more confusing ElementData accessors:
3323
3324             - Element::elementDataWithSynchronizedAttributes()
3325             - Element::ensureElementDataWithSynchronizedAttributes()
3326
3327         * dom/Element.h:
3328         * dom/Element.cpp:
3329         (WebCore::Element::hasAttributes):
3330         (WebCore::Element::hasEquivalentAttributes):
3331         (WebCore::Element::cloneAttributesFromElement):
3332         (WebCore::Element::synchronizeAllAttributes):
3333
3334             Renamed updateInvalidAttributes() to synchronizeAllAttributes().
3335             This function should only be used when we need every single attribute to be up-to-date.
3336
3337         (WebCore::Element::synchronizeAttribute):
3338
3339             Broke out logic for synchronizing a specific attribute, given either a full QualifiedName
3340             or a localName.
3341
3342         (WebCore::Element::setSynchronizedLazyAttribute):
3343
3344             Don't call ensureUniqueElementData() indisciminately here. This avoids converting the attribute
3345             storage when re-serializing the inline style yields the same CSS text that was already in the
3346             style attribute.
3347
3348         (WebCore::Element::hasAttribute):
3349         (WebCore::Element::hasAttributeNS):
3350         (WebCore::Element::getAttribute):
3351         (WebCore::Element::getAttributeNode):
3352         (WebCore::Element::getAttributeNodeNS):
3353         (WebCore::Element::setAttribute):
3354         (WebCore::Element::setAttributeNode):
3355         (WebCore::Element::removeAttributeNode):
3356
3357             Only synchronize the attribute in question.
3358
3359         * dom/Node.cpp:
3360         (WebCore::Node::compareDocumentPosition):
3361
3362             Call synchronizeAllAttributes() when comparing two Attr nodes on the same Element instead
3363             of relying on the side-effects of another function doing this.
3364
3365 2013-02-16  Seokju Kwon  <seokju.kwon@gmail.com>
3366
3367         Fix build warnings after r139853
3368         https://bugs.webkit.org/show_bug.cgi?id=109929
3369
3370         Reviewed by Alexey Proskuryakov.
3371
3372         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter
3373         when INSPECTOR is disabled.
3374
3375         No new tests, no behavior change.
3376
3377         * inspector/InspectorInstrumentation.h:
3378         (WebCore::InspectorInstrumentation::frameStartedLoading):
3379         (WebCore::InspectorInstrumentation::frameStoppedLoading):
3380         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
3381         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
3382
3383 2013-02-16  Sheriff Bot  <webkit.review.bot@gmail.com>
3384
3385         Unreviewed, rolling out r142734.
3386         http://trac.webkit.org/changeset/142734
3387         https://bugs.webkit.org/show_bug.cgi?id=110018
3388
3389         "Triggered crashes on lots of websites" (Requested by ggaren
3390         on #webkit).
3391
3392         * bindings/js/JSLocationCustom.cpp:
3393         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3394
3395 2013-02-16  Robert Hogan  <robert@webkit.org>
3396
3397         percentage top value of position:relative element not calculated using parent's min-height unless height set
3398         https://bugs.webkit.org/show_bug.cgi?id=14762
3399
3400         Reviewed by Julien Chaffraix.
3401
3402         Percentage height "is calculated with respect to the height of the generated box's containing block" says  
3403         http://www.w3.org/TR/CSS21/visudet.html#the-height-property and "If the height of the containing block is not 
3404         specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the
3405         value computes to 'auto'." So when calculating the used height of a replaced element do not crawl through ancestor 
3406         blocks except when traversing anonymous blocks. Ensure that anonymous table cells are not skipped through though.
3407
3408         http://www.w3.org/TR/CSS21/tables.html#height-layout adds "In CSS 2.1, the height of a cell box is the minimum 
3409         height required by the content." This height is decided by allowing table cells to report their height as auto.
3410         It's not clear why http://trac.webkit.org/changeset/91242 decided it should no longer do this - doing so caused