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